Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
adapt the prototypes of the declaration to the prototypes of the definition
[simgrid.git] / src / xbt / snprintf.c
index 9f99d67..6196c88 100644 (file)
  */
 
 
-\f
 /* ============================================= */
 /* NO USER SERVICABLE PARTS FOLLOWING THIS POINT */
 /* ============================================= */
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdarg.h>
-/* to get a working stdarg.h */
 
-
-#include "portable.h"
+#include "portable.h" /* to get a working stdarg.h */
 
 #include <assert.h>
 #include <errno.h>
+#include "xbt/str.h"
 
 #ifdef isdigit
 #undef isdigit
 
 /* prototypes */
 
+
 #if defined(NEED_ASPRINTF)
 int asprintf   (char **ptr, const char *fmt, /*args*/ ...);
 #endif
-#if defined(NEED_VASPRINTF)
+#if defined(NEED_VASPRINTF) 
 int vasprintf  (char **ptr, const char *fmt, va_list ap);
 #endif
+
 #if defined(NEED_ASNPRINTF)
 int asnprintf  (char **ptr, size_t str_m, const char *fmt, /*args*/ ...);
 #endif
@@ -1045,7 +1045,10 @@ char *bprintf(const char*fmt, ...) {
   char *res;
   
   va_start(ap, fmt);
-  vasprintf(&res,fmt,ap);
+  
+       
+       vasprintf(&res,fmt,ap);
+       
   va_end(ap);
   return res;
 }