aboutsummaryrefslogtreecommitdiff
path: root/src/base/utf/vendor/mkrunetype.c
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-12-05 15:17:44 -0800
committerNicholas Noll <nbnoll@eml.cc>2021-12-05 15:17:44 -0800
commitb48327d357e0818d1a6ae2a064cfa7d1567e1242 (patch)
tree4677f228a9846937a7ec71c72a1ab63ab69d68ab /src/base/utf/vendor/mkrunetype.c
parentc200dd832789afa298ba45e0b9efdec96c0e92cc (diff)
feat(huge): huge refactor (in progress).
Commented out libc includes to uncover all explicit dependencies. A large fraction has now been ported over (no testing). I did not port over the command line tools, such as the rc shell. These will be done independently - as of now I just want the library to stand independent. Compilation currently fails due to the lack of math functions.
Diffstat (limited to 'src/base/utf/vendor/mkrunetype.c')
-rw-r--r--src/base/utf/vendor/mkrunetype.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/base/utf/vendor/mkrunetype.c b/src/base/utf/vendor/mkrunetype.c
index 3d75ce8..dd6e2c7 100644
--- a/src/base/utf/vendor/mkrunetype.c
+++ b/src/base/utf/vendor/mkrunetype.c
@@ -39,7 +39,7 @@ isrange(char *label, char *prop, int force)
{
char ident[128];
if(snprintf(ident, arrlen(ident), "is%s_range", label) == arrlen(ident))
- panicf("out of identifier space\n");
+ fatal("out of identifier space\n");
return putrange(ident, prop, force);
}
@@ -49,7 +49,7 @@ ispair(char *label, char *prop)
{
char ident[128];
if(snprintf(ident, arrlen(ident), "is%s_pair", label) == arrlen(ident))
- panicf("out of identifier space\n");
+ fatal("out of identifier space\n");
return putpair(ident, prop);
}
@@ -59,7 +59,7 @@ issingle(char *label, char *prop)
{
char ident[128];
if(snprintf(ident, arrlen(ident), "is%s_single", label) == arrlen(ident))
- panicf("out of identifier space\n");
+ fatal("out of identifier space\n");
return putsingle(ident, prop);
}
@@ -125,7 +125,7 @@ torange(char *label, int *index, int force)
d = DELTA(index[l], l);
if(d != (rune)d)
- panicf("bad map delta %d", d);
+ fatal("bad map delta %d", d);
for(r = l+1; r < NumRunes; r++){
if(DELTA(index[r], r) != d)
@@ -162,7 +162,7 @@ topair(char *label, int *index)
d = DELTA(index[l], l);
if(d != (rune)d)
- panicf("bad delta %d", d);
+ fatal("bad delta %d", d);
for(r = l+2; r < NumRunes; r += 2){
if(DELTA(index[r], r) != d)
@@ -198,7 +198,7 @@ tosingle(char *label, int *index)
d = DELTA(index[i], i);
if(d != (rune)d)
- panicf("bad map delta %d", d);
+ fatal("bad map delta %d", d);
if(!start){
printf("static rune to%s_single[] = {\n", label);
@@ -268,7 +268,7 @@ static void
usage(void)
{
fprintf(stderr, "usage: mkrunetype <UnicodeData.txt>\n");
- exit(1);
+ rt·exit(1);
}
int
@@ -285,7 +285,7 @@ main(int argc, char *argv[])
usage();
if((err=io·open(argv[0], sys·ORead, &utf8)))
- panicf("can't open %s: %d: %s\n", argv[0], err, strerror(err));
+ fatal("can't open %s: %d: %s\n", argv[0], err, strerror(err));
/* by default each character maps to itself */
for(i = 0; i < NumRunes; i++) {
@@ -350,7 +350,7 @@ main(int argc, char *argv[])
break;
default: badproperty:
- panicf("unrecognized category '%s'", prop);
+ fatal("unrecognized category '%s'", prop);
}
/* grab transformations */
if(*field[Fupper])