A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
autogenerated file
[simgrid.git]
/
src
/
xbt
/
snprintf.c
diff --git
a/src/xbt/snprintf.c
b/src/xbt/snprintf.c
index
0d4fe9c
..
6196c88
100644
(file)
--- a/
src/xbt/snprintf.c
+++ b/
src/xbt/snprintf.c
@@
-1,4
+1,3
@@
-#include "gras_config.h"
/*
* snprintf.c - a portable implementation of snprintf
/*
* snprintf.c - a portable implementation of snprintf
@@
-281,7
+280,6
@@
*/
*/
-
\f
/* ============================================= */
/* NO USER SERVICABLE PARTS FOLLOWING THIS POINT */
/* ============================================= */
/* ============================================= */
/* NO USER SERVICABLE PARTS FOLLOWING THIS POINT */
/* ============================================= */
@@
-323,9
+321,12
@@
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
-#include "gras_config.h" /* to get a working stdarg.h */
+
+#include "portable.h" /* to get a working stdarg.h */
+
#include <assert.h>
#include <errno.h>
#include <assert.h>
#include <errno.h>
+#include "xbt/str.h"
#ifdef isdigit
#undef isdigit
#ifdef isdigit
#undef isdigit
@@
-379,12
+380,14
@@
/* prototypes */
/* prototypes */
+
#if defined(NEED_ASPRINTF)
int asprintf (char **ptr, const char *fmt, /*args*/ ...);
#endif
#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
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
#if defined(NEED_ASNPRINTF)
int asnprintf (char **ptr, size_t str_m, const char *fmt, /*args*/ ...);
#endif
@@
-1042,7
+1045,10
@@
char *bprintf(const char*fmt, ...) {
char *res;
va_start(ap, fmt);
char *res;
va_start(ap, fmt);
- vasprintf(&res,fmt,ap);
+
+
+ vasprintf(&res,fmt,ap);
+
va_end(ap);
return res;
}
va_end(ap);
return res;
}