-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
request: sprintf() comma compatibility #71
Comments
Also, I had to add this #ifdef in this other example of using mpaload / printf() otherwise it seg fault. Presumably this is linked to not understanding the comma syntax and therefore the number of parameters somehow are not dealt with correctly? [1] https://gist.github.com/simonhf/2a7b7eb98d2a10c549e8cc858bbefd53#file-svnprintf-c-L58 |
Hi Simon, |
Hi Marco, Yep, I understand. I like the idea of the config define. My PR does not implement the formatting, but is a pre-cursor step allowing the apostrophe to be present in the format string even though it has no effect. Without the PR then the apostrophe messes up the format string and/or causes a seg fault... |
Run without mpaland printf:
Run with mpaland printf:
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...
[1] https://stackoverflow.com/questions/1449805/how-to-format-a-number-from-1123456789-to-1-123-456-789-in-c
The text was updated successfully, but these errors were encountered: