- struct {
- int arg;
- char *fmt;
- char *result;
- } static const cases[]={
- // arg, fmt, result
- {0xab, "%04x", "00ab"},
- {0xffff, "0x%02X", "0xFFFF"},
- {0xffffu, "%u", "65535"},
- {1234, "%+6d", " +1234"},
- {12345, "% d", " 12345"},
- {-1234, "%d", "-1234"},
- {32767, "%8d", " 32767"},
- {1, "%%%d", "%1"},
- {1001, "%08i", "00001001"},
- {101, "%-+8d", "+101 "},
- {01234, "%o(oct)", "1234(oct)"},
-
- // do we want to check these:
- #if defined(SDCC) && !defined(SDCC_z80) && CHECK_B
- {0x4142, "%bc %bx", "\x41 42"}, /* non-std: print as bytes! */
- {0xfffe, "0x%02bX%02bx", "0xFFfe"}, /* non-std: print as bytes! */
- #elif defined(SDCC) && defined(SDCC_z80) && CHECK_B
- {0x4142, "%bc %bx", "\x42 41"}, /* non-std: print as bytes! */
- {0xfffe, "0x%02bX%02bx", "0xFEff"}, /* non-std: print as bytes! */
- #endif
- };
+struct
+{
+ int arg;
+ char *fmt;
+ char *result;
+} static const cases[] = {
+ // arg, fmt, result
+ {0xab, "%04x", "00ab"},
+ {0xffff, "0x%02X", "0xFFFF"},
+ {0xffffu, "%u", "65535"},
+ {1234, "%+6d", " +1234"},
+ {12345, "% d", " 12345"},
+ {-1234, "%d", "-1234"},
+ {32767, "%8d", " 32767"},
+ {1, "%%%d", "%1"},
+ {1001, "%08i", "00001001"},
+ {101, "%-+8d", "+101 "},
+ {01234, "%o(oct)", "1234(oct)"},
+
+ // do we want to check these:
+#if defined(SDCC) && !defined(SDCC_z80) && CHECK_B
+ {0x4142, "%bc %bx", "\x41 42"}, /* non-std: print as bytes! */
+ {0xfffe, "0x%02bX%02bx", "0xFFfe"}, /* non-std: print as bytes! */
+#elif defined(SDCC) && defined(SDCC_z80) && CHECK_B
+ {0x4142, "%bc %bx", "\x42 41"}, /* non-std: print as bytes! */
+ {0xfffe, "0x%02bX%02bx", "0xFEff"}, /* non-std: print as bytes! */
+#endif
+};