Lines Matching refs:fmt
22 static void check(const char *fmt, int expect_type, int expect_size)
27 if (utilfdt_decode_type(fmt, &type, &size))
28 FAIL("format '%s': valid format string returned failure", fmt);
30 FAIL("format '%s': expected type='%c', got type='%c'", fmt,
33 FAIL("format '%s': expected size=%d, got size=%d", fmt,
37 static void checkfail(const char *fmt)
42 if (!utilfdt_decode_type(fmt, &type, &size))
44 fmt);
57 char fmt[10], *ptr;
60 if (strlen(modifier) + 2 >= sizeof(fmt))
62 strcpy(fmt, modifier);
63 ptr = fmt + strlen(fmt);
68 check(fmt, 'i', expected_size);
71 check(fmt, 'u', expected_size);
74 check(fmt, 'x', expected_size);
77 check(fmt, 's', -1);
82 char fmt[10];
96 *fmt = ch;
97 fmt[1] = '\0';
98 checkfail(fmt);