Skip to content

Changing fmt in tfp_printf(fmt, ...) to be a const pointer, reduces w… - #12

Open
trygvis wants to merge 7 commits into
cjlano:masterfrom
trygvis:master
Open

Changing fmt in tfp_printf(fmt, ...) to be a const pointer, reduces w…#12
trygvis wants to merge 7 commits into
cjlano:masterfrom
trygvis:master

Conversation

@trygvis

Copy link
Copy Markdown

…arnings from the compiler.

o Adding test cases.
This allows %*s where the leading padding is taken from an extra
argument so that this:
char buf[] = "0123456789";
printf("%*s", 5, &buf[5]);
yields
56789
@trygvis
trygvisforce-pushed the master branch 2 times, most recently from 30ae4f4 to eef97eaCompareFebruary 23, 2018 13:57
This allows %*s where the leading padding is taken from an extra
argument so that this:
char buf[] = "0123456789";
printf("'%*s'", 5, &buf[5]);
yields
'56789'
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@trygvis