Merging upstream version 1.14.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
868b5312e8
commit
d6fd2fdea9
305 changed files with 20664 additions and 6099 deletions
|
@ -144,3 +144,18 @@ int wdc_UtilsStrCompare(char *pcSrc, char *pcDst)
|
|||
return *pcSrc - *pcDst;
|
||||
}
|
||||
|
||||
void wdc_StrFormat(char *formatter, size_t fmt_sz, char *tofmt, size_t tofmtsz)
|
||||
{
|
||||
|
||||
fmt_sz = snprintf(formatter,fmt_sz, "%-*.*s",
|
||||
(int)tofmtsz, (int)tofmtsz, tofmt);
|
||||
/* trim() the obnoxious trailing white lines */
|
||||
while (fmt_sz) {
|
||||
if (formatter[fmt_sz - 1] != ' ' && formatter[fmt_sz - 1] != '\0') {
|
||||
formatter[fmt_sz] = '\0';
|
||||
break;
|
||||
}
|
||||
fmt_sz--;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue