file/file-4.18-printf.dif

53 lines
867 B
Plaintext

--- src/apprentice.c
+++ src/apprentice.c 2006-11-22 16:09:57.000000000 +0000
@@ -886,8 +886,16 @@
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++;
@@ -907,6 +915,7 @@
case 'i':
case 'd':
case 'u':
+ case 'o':
case 'x':
case 'X':
return 0;
@@ -921,12 +930,16 @@
case 'i':
case 'd':
case 'u':
+ case 'o':
case 'x':
case 'X':
return 0;
default:
return -1;
}
+ case 'o':
+ case 'x':
+ case 'X':
case 'd':
return 0;
default:
@@ -937,6 +950,7 @@
case 'c':
case 'd':
case 'u':
+ case 'o':
case 'x':
case 'X':
return 0;