Printf 01 - #300
Conversation
|
It would be good to split into |
1/ Import stb_sprintf.h from https://github.com/nothings/stb at commit 31c1ad3745 under the licence choice of MIT. 2/ Markup stb_sprintf.h, with our choice of licence at the top, so it's prominent and clear which applies in our case. 3/ Remove old prf.c 4/ Create new prf.c to import the new stb_sprintf.h and wrap various functions.
|
LGTM. |
|
Seems to be a problem with zero padding with %P, old code prints '0090:00b7', new '90:00B7' |
|
Okay, I have a fix for the field width. Next question I had to choose upper or lower case hex for %P. I chose upper, but it seems the old implementation was lower. Which would you like upper or lower? |
|
I don't mind. |
|
I think I'll split this PR into printf and debug parts, so just the first two patches for this PR, okay? |
|
Of course the split is okey. |
|
Okay, so just the two patches now for printf replacement. I fixed the field width and made the values lowercase hex. The output log compares very well with master, with only the host pointers and random FLOPPY messages differing. |
|
Thanks! |
First draft of using a printf replacement, and added enhancements to support %P
and %Fs.