summaryrefslogtreecommitdiffhomepage
path: root/examples/sview_split.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-05-13 14:36:25 +0200
committerTyge Løvset <[email protected]>2022-05-13 14:36:25 +0200
commit688a828e3bfaa1d56d50e132b31930d964e26c5d (patch)
treee8649a2ec64c34bc0ca251ed8208edf1d9d70d23 /examples/sview_split.c
parenteda5a6418d0dda97261e340998f8f7e23a8e57b2 (diff)
downloadSTC-modified-688a828e3bfaa1d56d50e132b31930d964e26c5d.tar.gz
STC-modified-688a828e3bfaa1d56d50e132b31930d964e26c5d.zip
Changed csview c_PRIsv macro. Now must be prefixed with "%", to match with PRIxYYY macros from inttypes.h. E.g. printf("%40" c_PRIsv "\n", c_ARGsv(sv)); to specify 40 character right aligned output of sv. Check your usage.
Diffstat (limited to 'examples/sview_split.c')
-rw-r--r--examples/sview_split.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/sview_split.c b/examples/sview_split.c
index 3e3c584b..3594a599 100644
--- a/examples/sview_split.c
+++ b/examples/sview_split.c
@@ -10,7 +10,7 @@ int main()
const csview month = csview_token(date, c_sv("/"), &pos);
const csview day = csview_token(date, c_sv("/"), &pos);
- printf(c_PRIsv ", " c_PRIsv ", " c_PRIsv "\n",
+ printf("%" c_PRIsv ", %" c_PRIsv ", %" c_PRIsv "\n",
c_ARGsv(year), c_ARGsv(month), c_ARGsv(day));
c_auto (cstr, y, m, d) {