Jesse Allen the3dfxdude@gmail.com writes:
@@ -191,11 +191,14 @@ } buf; } pf_output;
+#define INTEGERSIZE_LONG 1 +#define INTEGERSIZE_LONGLONG 2
typedef struct pf_flags_t { char Sign, LeftAlign, Alternate, PadZero; char FieldLength, Precision;
- char IntegerLength, IntegerDouble;
- char IntegerLength, IntegerDouble, IntegerSize;
The IntegerDouble field was supposed to be used for that already, no need to add another one.
@@ -384,6 +387,16 @@ sprintf(p, ".%d", flags->Precision); p += strlen(p); }
- if( flags->IntegerLength == 'I' )
- {
sprintf(p, "l");
p++;
- }
- if( flags->IntegerSize == INTEGERSIZE_LONGLONG )
- {
sprintf(p, "l");
p++;
- }
This assumes that the system printf supports %ll formats, that's not portable.