--- src/apprentice.c +++ src/apprentice.c 2013-03-22 10:07:26.293440720 +0000 @@ -2057,8 +2057,16 @@ check_format_type(const char *ptr, int t quad = 1; /*FALLTHROUGH*/ case FILE_FMT_NUM: + if (*ptr == '#') + ptr++; + if (*ptr == ' ') + ptr++; if (*ptr == '-') ptr++; + if (*ptr == '+') + ptr++; + if (*ptr == '\'') + ptr++; if (*ptr == '.') ptr++; while (isdigit((unsigned char)*ptr)) ptr++; @@ -2100,6 +2108,9 @@ check_format_type(const char *ptr, int t default: return -1; } + case 'o': + case 'x': + case 'X': case 'd': return 0; default: