-
Notifications
You must be signed in to change notification settings - Fork 543
Open
Description
#include <stdio.h>
// gcc -O0 -o mpaland mpaland.c && ./mpaland
// gcc -DMPALAND -O0 -o mpaland mpaland.c && ./mpaland
#ifdef MPALAND
void _putchar(char character)
{
putchar(character);
}
#include "printf/printf.c"
#endif
void main(void) {
printf("- main() starting\n");
printf("- value with comma: %'d\n", 1234);
printf("- main() ending\n");
}
Run without mpaland printf:
$ gcc -O0 -o mpaland mpaland.c && ./mpaland
- main() starting
- value with comma: 1234
- main() ending
Run with mpaland printf:
$ gcc -DMPALAND -O0 -o mpaland mpaland.c && ./mpaland
- main() starting
- value with comma: 'd
- main() ending
It would be great if mpaland / printf could be compatible with the sprintf() format comma syntax, even if commas are not printed due to the locale (as with the above example via glibc). It would be even better if mpaland / printf implemented comma output too, although obviously not by manipulating the locale...
Metadata
Metadata
Assignees
Labels
No labels