X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fstring.c;h=be1a1d7a4771ddaf2a90cb4ce97552a4ff1f9211;hb=2820726f1d93bd7ccc43805d1b6a4613b606ee10;hp=ad074e37e152acd28e7e4782206fc84434e2508d;hpb=5dac72a78aa02e48af484ac75059e760151ba1fc;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/string.c b/src/src/string.c index ad074e37e..be1a1d7a4 100644 --- a/src/src/string.c +++ b/src/src/string.c @@ -1141,7 +1141,7 @@ common use is a null string and zero size and pointer, on first use for a string being built. The "if" above then allocates, but Coverity assume that the "if" might not happen and whines for a null-deref done by the memcpy(). */ -/* coverity[deref_parm_field_in_call] */ +/* coverity[deref_parm_field_in_call] : FALSE */ memcpy(string + p, s, count); *ptr = p + count; return string; @@ -1212,10 +1212,10 @@ on whether the variable length list of data arguments are given explicitly or as a va_list item. The formats are the usual printf() ones, with some omissions (never used) and -two additions for strings: %S forces lower case, and %#s or %#S prints nothing -for a NULL string. Without the # "NULL" is printed (useful in debugging). There -is also the addition of %D and %M, which insert the date in the form used for -datestamped log files. +three additions for strings: %S forces lower case, %T forces upper case, and +%#s or %#S prints nothing for a NULL string. Without thr # "NULL" is printed +(useful in debugging). There is also the addition of %D and %M, which insert +the date in the form used for datestamped log files. Arguments: buffer a buffer in which to put the formatted string @@ -1428,6 +1428,7 @@ while (*fp != 0) case 's': case 'S': /* Forces *lower* case */ + case 'T': /* Forces *upper* case */ s = va_arg(ap, char *); if (s == NULL) s = null; @@ -1475,6 +1476,8 @@ while (*fp != 0) sprintf(CS p, "%*.*s", width, precision, s); if (fp[-1] == 'S') while (*p) { *p = tolower(*p); p++; } + else if (fp[-1] == 'T') + while (*p) { *p = toupper(*p); p++; } else while (*p) p++; if (!yield) goto END_FORMAT;