]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - gmqcc.h
fix macro parameters
[xonotic/gmqcc.git] / gmqcc.h
diff --git a/gmqcc.h b/gmqcc.h
index 3539155df83549b6cbeb175a4d5041f2621a250b..1e0544667b6a54628ee7e379589b3180655ba671 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -300,7 +300,7 @@ void  util_meminfo       ();
 bool  util_filexists     (const char *);
 bool  util_strupper      (const char *);
 bool  util_strdigit      (const char *);
-char *util_strdup        (const char *);
+char *_util_Estrdup        (const char *, const char *, size_t);
 void  util_debug         (const char *, const char *, ...);
 void  util_endianswap    (void *,  size_t, unsigned int);
 
@@ -317,15 +317,19 @@ int util_asprintf (char **ret, const char *fmt, ...);
 
 
 #ifdef NOTRACK
-#    define mem_a(x)    malloc (x)
-#    define mem_d(x)    free   ((void*)x)
-#    define mem_r(x, n) realloc((void*)x, n)
+#    define mem_a(x)      malloc (x)
+#    define mem_d(x)      free   ((void*)x)
+#    define mem_r(x, n)   realloc((void*)x, n)
+#    define mem_af(x,f,l) malloc (x)
 #else
-#    define mem_a(x)    util_memory_a((x), __LINE__, __FILE__)
-#    define mem_d(x)    util_memory_d((void*)(x))
-#    define mem_r(x, n) util_memory_r((void*)(x), (n), __LINE__, __FILE__)
+#    define mem_a(x)      util_memory_a((x), __LINE__, __FILE__)
+#    define mem_d(x)      util_memory_d((void*)(x))
+#    define mem_r(x, n)   util_memory_r((void*)(x), (n), __LINE__, __FILE__)
+#    define mem_af(x,f,l) util_memory_a((x), __LINE__, __FILE__)
 #endif /*! NOTRACK */
 
+#define util_strdup(X)  _util_Estrdup((X), __FILE__, __LINE__)
+
 /*
  * A flexible vector implementation: all vector pointers contain some
  * data about themselfs exactly - sizeof(vector_t) behind the pointer
@@ -466,7 +470,6 @@ void        util_hsdel(hash_set_t *);
 void           fs_file_close  (FILE *);
 int            fs_file_error  (FILE *);
 int            fs_file_getc   (FILE *);
-int            fs_file_flush  (FILE *);
 int            fs_file_printf (FILE *, const char *, ...);
 int            fs_file_puts   (FILE *, const char *);
 int            fs_file_seek   (FILE *, long int, int);
@@ -479,11 +482,10 @@ FILE          *fs_file_open   (const char *, const char *);
 int            fs_file_getline(char  **, size_t *, FILE *);
 
 /* directory handling */
+int            fs_dir_make    (const char *);
 DIR           *fs_dir_open    (const char *);
 int            fs_dir_close   (DIR *);
 struct dirent *fs_dir_read    (DIR *);
-int            fs_dir_make    (const char *);
-int            fs_dir_change  (const char *);
 
 
 /*===================================================================*/