From fa25c8f3df6791727b9384c9b405c996ac68b8ab Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Fri, 15 May 2020 18:11:58 -0700 Subject: feat: added buffered io to libn --- sys/libn/string.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sys/libn/string.c') diff --git a/sys/libn/string.c b/sys/libn/string.c index ca53bdc..100c1fe 100644 --- a/sys/libn/string.c +++ b/sys/libn/string.c @@ -27,10 +27,10 @@ enum }; int -utf8·chartorune(Rune* r, byte* s) +utf8·chartorune(rune* r, byte* s) { int c[UTFmax], i; - Rune l; + rune l; c[0] = *(ubyte*)(s); if (c[0] < Tx) { @@ -65,10 +65,10 @@ bad: } int -utf8·runetochar(byte* s, Rune* r) +utf8·runetochar(byte* s, rune* r) { int i, j; - Rune c; + rune c; c = *r; if (c <= Rune1) { @@ -95,7 +95,7 @@ utf8·runetochar(byte* s, Rune* r) } int -utf8·runelen(Rune r) +utf8·runelen(rune r) { byte s[10]; return utf8·runetochar(s, &r); @@ -105,7 +105,7 @@ int utf8·fullrune(byte* s, int n) { int i; - Rune c; + rune c; if (n <= 0) return 0; c = *(ubyte*) s; @@ -122,7 +122,7 @@ byte* utf8·findrune(byte* s, long c) { long c1; - Rune r; + rune r; int n; if (c < RuneSync) return strchr(s, c); -- cgit v1.2.1