X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4e78565ea6b354a0e6250a87b483f909665a0ac3..7e9089a13ddf2e277b8c25877aef808174f9fffa:/src/xbt/snprintf.c diff --git a/src/xbt/snprintf.c b/src/xbt/snprintf.c index 641f294e10..89df5fbaae 100644 --- a/src/xbt/snprintf.c +++ b/src/xbt/snprintf.c @@ -1,3 +1,8 @@ +/* Copyright (c) 2005-2010, 2012-2015. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ /* * snprintf.c - a portable implementation of snprintf @@ -316,7 +321,7 @@ #define LINUX_COMPATIBLE #endif -#include "portable.h" /* to get a working stdarg.h */ +#include "src/portable.h" /* to get a working stdarg.h */ #include #include @@ -365,17 +370,17 @@ #endif #define fast_memcpy(d,s,n) \ - { register size_t nn = (size_t)(n); \ + { size_t nn = (size_t)(n); \ if (nn >= breakeven_point) memcpy((d), (s), nn); \ else if (nn > 0) { /* proc call overhead is worth only for large strings*/\ - register char *dd; register const char *ss; \ + char *dd; const char *ss; \ for (ss=(s), dd=(d); nn>0; nn--) *dd++ = *ss++; } } #define fast_memset(d,c,n) \ - { register size_t nn = (size_t)(n); \ + { size_t nn = (size_t)(n); \ if (nn >= breakeven_point) memset((d), (int)(c), nn); \ else if (nn > 0) { /* proc call overhead is worth only for large strings*/\ - register char *dd; register const int cc=(int)(c); \ + char *dd; const int cc=(int)(c); \ for (dd=(d); nn>0; nn--) *dd++ = cc; } } /* prototypes */ @@ -427,16 +432,12 @@ int portable_vsnprintf(char *str, size_t str_m, const char *fmt, /* declarations */ -static char credits[] = "\n\ - @(#)snprintf.c, v2.2: Mark Martinec, \n\ - @(#)snprintf.c, v2.2: Copyright 1999, Mark Martinec. Frontier Artistic License applies.\n\ - @(#)snprintf.c, v2.2: http://www.ijs.si/software/snprintf/\n"; - -static void __foo__(void) -{ - printf("%s", credits); - __foo__(); -} +/* + Old copyright + snprintf.c, v2.2: Mark Martinec, + snprintf.c, v2.2: Copyright 1999, Mark Martinec. Frontier Artistic License applies. + snprintf.c, v2.2: http://www.ijs.si/software/snprintf +*/ #if defined(NEED_ASPRINTF) int asprintf(char **ptr, const char *fmt, /*args */ ...)