X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=snprintf.c;h=036d904963753302297e945009c4356e3aa01a86;hp=72c3d118e279e6eb09047dd0d4f811e5c4759c5b;hb=95fc7c1442ca6109151bbd34716cd9caeb85042a;hpb=0f44dc85fc1280372ffab911d701e703d803fb4b diff --git a/snprintf.c b/snprintf.c index 72c3d11..036d904 100644 --- a/snprintf.c +++ b/snprintf.c @@ -50,6 +50,7 @@ #include #include #include "lib/str.h" +#include "lib/debug.h" /* Define this as a fall through, HAVE_STDARG_H is probably already set */ @@ -401,7 +402,7 @@ static void fmtstr (char *buffer, size_t * currlen, size_t maxlen, value = ""; } - for (strln = 0; value[strln]; ++strln); /* safe_strlen */ + for (strln = 0; value[strln]; ++strln); /* mutt_strlen */ padlen = min - strln; if (padlen < 0) padlen = 0; @@ -479,7 +480,7 @@ static void fmtint (char *buffer, size_t * currlen, size_t maxlen, spadlen = -spadlen; /* Left Justifty */ #ifdef DEBUG_SNPRINTF - dprint (1, (debugfile, "zpad: %d, spad: %d, min: %d, max: %d, place: %d\n", + debug_print (1, ("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n", zpadlen, spadlen, min, max, place)); #endif @@ -602,7 +603,7 @@ static void fmtfp (char *buffer, size_t * currlen, size_t maxlen, } #ifdef DEBUG_SNPRINTF - dprint (1, (debugfile, "fmtfp: %f =? %d.%d\n", fvalue, intpart, fracpart)); + debug_print (1, ("fmtfp: %f =? %d.%d\n", fvalue, intpart, fracpart)); #endif /* Convert integer part */ @@ -688,7 +689,7 @@ int vsnprintf (char *str, size_t count, const char *fmt, va_list args) { str[0] = 0; dopr (str, count, fmt, args); - return (safe_strlen (str)); + return (mutt_strlen (str)); } #endif /* !HAVE_VSNPRINTF */ @@ -716,7 +717,7 @@ int snprintf (va_alist) (void) vsnprintf (str, count, fmt, ap); VA_END; - return (safe_strlen (str)); + return (mutt_strlen (str)); } #ifdef TEST_SNPRINTF @@ -767,7 +768,7 @@ int main (void) for (y = 0; fp_nums[y] != 0; y++) { snprintf (buf1, sizeof (buf1), fp_fmt[x], fp_nums[y]); sprintf (buf2, fp_fmt[x], fp_nums[y]); - if (safe_strcmp (buf1, buf2)) { + if (mutt_strcmp (buf1, buf2)) { printf ("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", /* __SPRINTF_CHECKED__ */ fp_fmt[x], buf1, buf2); fail++; @@ -779,7 +780,7 @@ int main (void) for (y = 0; int_nums[y] != 0; y++) { snprintf (buf1, sizeof (buf1), int_fmt[x], int_nums[y]); sprintf (buf2, int_fmt[x], int_nums[y]); - if (safe_strcmp (buf1, buf2)) { + if (mutt_strcmp (buf1, buf2)) { printf ("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", /* __SPRINTF_CHECKED__ */ int_fmt[x], buf1, buf2); fail++;