changeset 2404:bcd33c77c605

Cosmetic cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 13 Jan 2020 20:04:54 +0200
parents 6e86a048a760
children 1f74cc842d71
files src/dmlib.h src/dmtool.h
diffstat 2 files changed, 24 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/src/dmlib.h	Sun Jan 12 20:53:35 2020 +0200
+++ b/src/dmlib.h	Mon Jan 13 20:04:54 2020 +0200
@@ -394,11 +394,13 @@
 
 /* Global variables
  */
-extern char *dmProgName,
-            *dmProgDesc,
-            *dmProgVersion,
-            *dmProgAuthor,
-            *dmProgLicense;
+extern char
+    *dmProgName,
+    *dmProgDesc,
+    *dmProgVersion,
+    *dmProgAuthor,
+    *dmProgLicense;
+
 
 extern int dmVerbosity;
 void       dmInitProg(char *name, char *desc, char *version, char *author, char *license);
@@ -420,11 +422,11 @@
 const char *dmErrorStr(const int error);
 
 #ifdef DM_DEBUG
-#    define dmErrorDBG dmError
-#    define dmErrorDBGMsg dmErrorMsg
+#  define dmErrorDBG dmError
+#  define dmErrorDBGMsg dmErrorMsg
 #else
-#    define dmErrorDBG(ecode, fmt, ...) (ecode) // Dummy
-#    define dmErrorDBGMsg(fmt, ...)
+#  define dmErrorDBG(ecode, fmt, ...) (ecode) // Dummy
+#  define dmErrorDBGMsg(fmt, ...)
 #endif
 
 void *     dmMalloc(size_t len);
@@ -454,8 +456,6 @@
     DM_TRIM_BOTH     = 3
 };
 
-
-
 char *     dm_strdup(const char *str);
 char *     dm_strndup(const char *str, const size_t n);
 char *     dm_strdup_trim(const char *src, const int flags);
@@ -490,9 +490,9 @@
     DMMutexLock locks[8];
 } DMMutex;
 
-#define dmMutexLock(x) dmDOMutexLock(x, __FILE__, (int) __LINE__)
-#define dmMutexUnlock(x) dmDOMutexUnlock(x, __FILE__, (int) __LINE__)
-#define dmCreateMutex(x) dmDOCreateMutex(__FILE__, (int) __LINE__)
+#  define  dmMutexLock(x) dmDOMutexLock(x, __FILE__, (int) __LINE__)
+#  define  dmMutexUnlock(x) dmDOMutexUnlock(x, __FILE__, (int) __LINE__)
+#  define  dmCreateMutex(x) dmDOCreateMutex(__FILE__, (int) __LINE__)
 
 int        dmDOMutexLock(DMMutex *mutex, const char *file, const int line);
 int        dmDOMutexUnlock(DMMutex *mutex, const char *file, const int line);
@@ -500,13 +500,14 @@
 void       dmDestroyMutex(DMMutex *mutex);
 
 #else
-#define DMMutex SDL_mutex
-#define dmCreateMutex() SDL_CreateMutex()
-#define dmDestroyMutex(x) SDL_DestroyMutex(x)
-#define dmMutexLock(x) SDL_mutexP(x)
-#define dmMutexUnlock(x) SDL_mutexV(x)
+#  define  DMMutex SDL_mutex
+#  define  dmCreateMutex() SDL_CreateMutex()
+#  define  dmDestroyMutex(x) SDL_DestroyMutex(x)
+#  define  dmMutexLock(x) SDL_mutexP(x)
+#  define  dmMutexUnlock(x) SDL_mutexV(x)
 #endif
 
+
 /* Endianess swapping macros
  */
 #define DM_SWAP_16_LE_BE(value) ((Uint16) ( \
--- a/src/dmtool.h	Sun Jan 12 20:53:35 2020 +0200
+++ b/src/dmtool.h	Mon Jan 13 20:04:54 2020 +0200
@@ -7,8 +7,11 @@
 #ifndef DMTOOL_H
 #define DMTOOL_H 1
 
+
 // Get rid of the SDL_main mess for some commandline tools
 #define _SDL_main_h
 #define SDL_main main
 
-#endif
+
+#endif // DMTOOL_H
+