Lines Matching defs:fmt
315 * Convert a token value to a string; use "fmt" if not found.
318 tok2strbuf(register const struct tok *lp, register const char *fmt,
328 if (fmt == NULL)
329 fmt = "#%d";
331 (void)snprintf(buf, bufsize, fmt, v);
336 * Convert a token value to a string; use "fmt" if not found.
339 tok2str(register const struct tok *lp, register const char *fmt,
348 return tok2strbuf(lp, fmt, v, ret, sizeof(buf[0]));
352 * Convert a bit token value to a string; use "fmt" if not found.
357 bittok2str_internal(register const struct tok *lp, register const char *fmt,
387 /* bummer - lets print the "unknown" message as advised in the fmt string if we got one */
388 (void)snprintf(buf, sizeof(buf), fmt == NULL ? "#%08x" : fmt, v);
393 * Convert a bit token value to a string; use "fmt" if not found.
397 bittok2str_nosep(register const struct tok *lp, register const char *fmt,
400 return (bittok2str_internal(lp, fmt, v, ""));
404 * Convert a bit token value to a string; use "fmt" if not found.
408 bittok2str(register const struct tok *lp, register const char *fmt,
411 return (bittok2str_internal(lp, fmt, v, ", "));
421 tok2strary_internal(register const char **lp, int n, register const char *fmt,
428 if (fmt == NULL)
429 fmt = "#%d";
430 (void)snprintf(buf, sizeof(buf), fmt, v);
739 error(const char *fmt, ...)
744 va_start(ap, fmt);
745 (void)vfprintf(stderr, fmt, ap);
747 if (*fmt) {
748 fmt += strlen(fmt);
749 if (fmt[-1] != '\n')
758 warning(const char *fmt, ...)
763 va_start(ap, fmt);
764 (void)vfprintf(stderr, fmt, ap);
766 if (*fmt) {
767 fmt += strlen(fmt);
768 if (fmt[-1] != '\n')