libgrapheme

unicode string library
git clone git://git.suckless.org/libgrapheme
Log | Files | Refs | README | LICENSE

commit 1157be852f7a057d87db412cbc30fd5b8850f44d
parent c31ca4f0d107e505602fc746dd09001b33dd1811
Author: Laslo Hunhold <dev@frign.de>
Date:   Sun, 28 Aug 2022 15:02:17 +0200

Fix a few small things in the manual-generators

Namely, add spaces to avoid mangling and properly escape backslashes.

Signed-off-by: Laslo Hunhold <dev@frign.de>

Diffstat:
Mman/grapheme_decode_utf8.sh | 4++--
Mman/grapheme_encode_utf8.sh | 2+-
Mman/grapheme_to_lowercase.sh | 2+-
Mman/grapheme_to_titlecase.sh | 2+-
Mman/grapheme_to_uppercase.sh | 2+-
Mman/template/to_case.sh | 2+-
6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/man/grapheme_decode_utf8.sh b/man/grapheme_decode_utf8.sh @@ -77,7 +77,7 @@ print_cps(const char *str, size_t len) */ break; } - printf("%"PRIxLEAST32"\\n", cp); + printf("%"PRIxLEAST32"\\\\n", cp); } } @@ -90,7 +90,7 @@ print_cps_nul_terminated(const char *str) for (off = 0; (ret = grapheme_decode_utf8(str + off, SIZE_MAX, &cp)) > 0 && cp != 0; off += ret) { - printf("%"PRIxLEAST32"\\n", cp); + printf("%"PRIxLEAST32"\\\\n", cp); } } .Ed diff --git a/man/grapheme_encode_utf8.sh b/man/grapheme_encode_utf8.sh @@ -90,7 +90,7 @@ cps_to_utf8_alloc(const uint_least32_t *cp, size_t cplen) break; } } - str[off] = '\\0'; + str[off] = '\\\\0'; return str; } diff --git a/man/grapheme_to_lowercase.sh b/man/grapheme_to_lowercase.sh @@ -1,2 +1,2 @@ -CASE="lowercase"\ +CASE="lowercase" \ $SH man/template/to_case.sh diff --git a/man/grapheme_to_titlecase.sh b/man/grapheme_to_titlecase.sh @@ -1,2 +1,2 @@ -CASE="titlecase"\ +CASE="titlecase" \ $SH man/template/to_case.sh diff --git a/man/grapheme_to_uppercase.sh b/man/grapheme_to_uppercase.sh @@ -1,2 +1,2 @@ -CASE="uppercase"\ +CASE="uppercase" \ $SH man/template/to_case.sh diff --git a/man/template/to_case.sh b/man/template/to_case.sh @@ -1,6 +1,6 @@ cat << EOF .Dd 2022-08-26 -.Dt GRAPHEME_TO_$(echo $CASE | tr [:lower:] [:upper:]) 3 +.Dt GRAPHEME_TO_$(printf $CASE | tr [:lower:] [:upper:]) 3 .Os suckless.org .Sh NAME .Nm grapheme_to_$CASE