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);
161 if (!valid_format(fmt))
168 fmt = generate_format(first, incr, last, equalize, pad);
172 printf(fmt, first);
177 printf(fmt, first);
228 valid_format(const char *fmt)
232 while (*fmt != '\0') {
234 if (*fmt != '%') {
235 fmt++;
238 fmt++;
241 if (*fmt == '%') {
242 fmt++;
247 while (*fmt != '\0' && strchr("#0- +'", *fmt)) {
248 fmt++;
252 while (*fmt != '\0' && strchr("0123456789", *fmt)) {
253 fmt++;
257 if (*fmt == '.') {
258 fmt++;
259 while (*fmt != '\0' && strchr("0123456789", *fmt)) {
260 fmt++;
265 switch (*fmt) {