Lines Matching defs:fmt
91 char pad, *fmt, *cur_print, *last_print;
96 fmt = NULL;
117 fmt = optarg;
127 if (!fmt)
172 if (fmt != NULL) {
173 if (!valid_format(fmt))
174 errx(1, "invalid format string: `%s'", fmt);
175 fmt = unescape(fmt);
176 if (!valid_format(fmt))
183 fmt = generate_format(first, incr, last, equalize, pad);
187 printf(fmt, cur);
202 asprintf(&cur_print, fmt, cur);
203 asprintf(&last_print, fmt, last);
258 valid_format(const char *fmt)
262 while (*fmt != '\0') {
264 if (*fmt != '%') {
265 fmt++;
268 fmt++;
271 if (*fmt == '%') {
272 fmt++;
277 while (*fmt != '\0' && strchr("#0- +'", *fmt)) {
278 fmt++;
282 while (*fmt != '\0' && strchr("0123456789", *fmt)) {
283 fmt++;
287 if (*fmt == '.') {
288 fmt++;
289 while (*fmt != '\0' && strchr("0123456789", *fmt)) {
290 fmt++;
295 switch (*fmt) {