diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-01-23 02:03:50 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-01-23 02:03:50 +0100 |
commit | 16107cd6a31c204d347add809712044666ef688a (patch) | |
tree | cef430cdd0cd2e433903dca3d386fa095b2e33f1 /src | |
parent | 1256660e1f0cea877b6d453704343f07d73d6224 (diff) |
Prefer char8_t strings to char strings
Diffstat (limited to 'src')
-rw-r--r-- | src/grab.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -70,7 +70,7 @@ struct ops { }; struct sv { - char *p; + char8_t *p; size_t len; }; @@ -100,7 +100,7 @@ static bool fflag = GIT_GRAB; static put_func *putf; static struct { - const char *p, *bp; + const char8_t *p, *bp; size_t col, row; } pos; @@ -567,7 +567,7 @@ svposcmp(const void *a, const void *b) void putm(struct sv sv, struct matches *ms, const char *filename) { - const char *p; + const char8_t *p; struct matches valid; static const char *fn, *hl, *ln, *se; @@ -640,7 +640,7 @@ putm(struct sv sv, struct matches *ms, const char *filename) struct u8view v; size_t len = sv.p - pos.p; - while (u8gnext(&v, (const char8_t **)&pos.p, &len)) { + while (u8gnext(&v, &pos.p, &len)) { if (islbrk(v)) { pos.col = 1; pos.row++; @@ -731,7 +731,7 @@ putm_nc(struct sv sv, struct matches *ms, const char *filename) struct u8view v; size_t len = sv.p - pos.p; - while (u8gnext(&v, (const char8_t **)&pos.p, &len)) { + while (u8gnext(&v, &pos.p, &len)) { if (islbrk(v)) { pos.col = 1; pos.row++; |