diff port/C/asprintf.h @ 548:f48bb09bccc7

Misc: huge cleanup, switch to spaces
author David Demelier <markand@malikania.fr>
date Wed, 15 Jun 2016 13:13:26 +0200
parents dc1b5143c5e3
children 266f32919d0a
line wrap: on
line diff
--- a/port/C/asprintf.h	Wed Jun 15 11:59:17 2016 +0200
+++ b/port/C/asprintf.h	Wed Jun 15 13:13:26 2016 +0200
@@ -1,7 +1,7 @@
 /*
  * asprintf.h -- basic port of asprintf / vsprintf functions
  *
- * Copyright (c) 2011, 2012 David Demelier <markand@malikania.fr>
+ * Copyright (c) 2011-2016 David Demelier <markand@malikania.fr>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -16,6 +16,9 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#ifndef ASPRINTF_H
+#define ASPRINTF_H
+
 #include <stdarg.h>
 
 #ifdef __cplusplus
@@ -23,14 +26,19 @@
 #endif
 
 #ifdef __GNUC__
-#  define _asp_at_printf(i1, i2)	__attribute__ ((format (printf, i1, i2)))
+#  define ASPRINTF_FMT(i1, i2)	__attribute__ ((format (printf, i1, i2)))
 #else
-#  define _asp_at_printf(i1, i2)
+#  define ASPRINTF_FMT(i1, i2)
 #endif
 
-int	asprintf(char **, const char *, ...) _asp_at_printf(2, 3);
-int	vasprintf(char **, const char *, va_list);
+int
+asprintf(char **, const char *, ...) ASPRINTF_FMT(2, 3);
+
+int
+vasprintf(char **, const char *, va_list);
 
 #ifdef __cplusplus
 }
 #endif
+
+#endif /* !ASPRINTF_H */