Lines Matching defs:fmt
83 char *fmt = NULL;
102 fmt = optarg;
112 if (!fmt)
157 if (fmt != NULL) {
158 if (!valid_format(fmt))
159 errx(1, "invalid format string: `%s'", fmt);
160 fmt = unescape(fmt);
166 fmt = generate_format(first, incr, last, equalize, pad);
170 printf(fmt, first);
175 printf(fmt, first);
226 valid_format(const char *fmt)
230 while (*fmt != '\0') {
232 if (*fmt != '\0' && *fmt != '%') {
234 fmt++;
235 } while (*fmt != '\0' && *fmt != '%');
238 if (*fmt != '\0') {
240 fmt++;
243 if (*fmt == '%') {
244 fmt++;
248 if (strchr("eEfgG", *fmt) &&
250 fmt++;
254 if (isdigit((unsigned char)*fmt) ||
255 strchr("+- 0#.", *fmt))
260 } while (*fmt != '\0');