diff options
| author | Tyge Løvset <[email protected]> | 2022-05-13 14:36:25 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-05-13 14:36:25 +0200 |
| commit | 688a828e3bfaa1d56d50e132b31930d964e26c5d (patch) | |
| tree | e8649a2ec64c34bc0ca251ed8208edf1d9d70d23 /include | |
| parent | eda5a6418d0dda97261e340998f8f7e23a8e57b2 (diff) | |
| download | STC-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 'include')
| -rw-r--r-- | include/stc/csview.h | 2 | ||||
| -rw-r--r-- | include/stc/utf8.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/csview.h b/include/stc/csview.h index 4cbe1ee2..5bc25215 100644 --- a/include/stc/csview.h +++ b/include/stc/csview.h @@ -30,7 +30,7 @@ #define csview_null c_sv("")
#define csview_new(literal) c_sv(literal)
#define csview_npos (SIZE_MAX >> 1)
-#define c_PRIsv "%.*s"
+#define c_PRIsv ".*s"
#define c_ARGsv(sv) (int)(sv).size, (sv).str
STC_API csview csview_substr(csview sv, intptr_t pos, size_t n);
diff --git a/include/stc/utf8.h b/include/stc/utf8.h index 9a1493b6..50fbefc7 100644 --- a/include/stc/utf8.h +++ b/include/stc/utf8.h @@ -15,7 +15,7 @@ int main() csview sv = csview_from_s(s1);
c_foreach (i, csview, sv)
- printf(c_PRIsv ",", c_ARGsv(i.codep));
+ printf("%" c_PRIsv ",", c_ARGsv(i.codep));
}
}
// Output:
|
