aboutsummaryrefslogtreecommitdiff
path: root/include/libn.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libn.h')
-rw-r--r--include/libn.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/libn.h b/include/libn.h
index 721defd..a4b9bf5 100644
--- a/include/libn.h
+++ b/include/libn.h
@@ -155,8 +155,8 @@ typedef uint32 rune;
int utf8·fullrune(byte *s, int n);
byte *utf8·findrune(byte *s, long i);
byte *utf8·findrrune(byte* s, long c);
-int utf8·chartorune(rune *r, byte *s);
-int utf8·runetochar(byte *s, rune *r);
+int utf8·bytetorune(rune *r, byte *s);
+int utf8·runetobyte(byte *s, rune *r);
int utf8·len(byte *s);
int utf8·runelen(rune r);
int utf8·isletter(rune r);
@@ -377,6 +377,8 @@ uint64 rng·randi(int max);
/* from plan9 libc */
+#define ERRMAX 128 /* max length of error string */
+
#define SET(x) ((x)=0)
#define USED(x) if(x){}else{}
#ifdef __GNUC__
@@ -397,7 +399,7 @@ extern char *argv0;
argc--; argv++; break;\
}\
_argc = 0;\
- while(*_args && (_args += utf8·chartorune(&_argc, _args)))\
+ while(*_args && (_args += utf8·bytetorune(&_argc, _args)))\
switch(_argc)
#define ARGEND SET(_argt);USED(_argt);USED(_argc);USED(_args);}USED(argv);USED(argc);
#define ARGF() (_argt=_args, _args="",\