diff options
| author | Tyge Lovset <[email protected]> | 2022-05-29 00:36:08 +0200 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2022-05-29 00:42:06 +0200 |
| commit | a341dbc0ce456198d5773c7260e93e8433228ee2 (patch) | |
| tree | 7759f0cf00201b348bb90868e4553aaed0e3c98e /include/stc/forward.h | |
| parent | 06c8dffeb571a3aa6143425704062de4aa879d2c (diff) | |
| download | STC-modified-a341dbc0ce456198d5773c7260e93e8433228ee2.tar.gz STC-modified-a341dbc0ce456198d5773c7260e93e8433228ee2.zip | |
Renamed cstr_replace_first() => cstr_replace_one().
cstr.h now #include "utf8.h".
Added iterator (utf8) to cstr and other utf8 functions postfixed by _u8().
Also renamed some utf8 functions in csview to better names.
Diffstat (limited to 'include/stc/forward.h')
| -rw-r--r-- | include/stc/forward.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/stc/forward.h b/include/stc/forward.h index 635c63df..67f5f0f2 100644 --- a/include/stc/forward.h +++ b/include/stc/forward.h @@ -45,7 +45,7 @@ typedef struct { char* data; size_t size, cap; } cstr_buf;
typedef char cstr_value;
#if defined STC_CSTR_V1
- typedef struct cstr { char* str; } cstr;
+ typedef struct { char* str; } cstr;
#else
typedef union {
struct { char data[sizeof(cstr_buf) - 1]; unsigned char last; } sml;
@@ -53,9 +53,12 @@ typedef char cstr_value; } cstr;
#endif
-typedef struct csview { const char* str; size_t size; } csview;
-typedef union csview_iter { const char *ref; csview codep; } csview_iter;
+typedef struct { const char* str; size_t size; } csview;
typedef char csview_value;
+typedef union {
+ const char *ref;
+ csview chr;
+} csview_iter, cstr_iter;
#define c_true(...) __VA_ARGS__
#define c_false(...)
|
