diff --git a/src/lib9/utf/Makefile b/src/lib9/utf/Makefile index bd15f9eabf1..c3b9ec5d066 100644 --- a/src/lib9/utf/Makefile +++ b/src/lib9/utf/Makefile @@ -14,3 +14,19 @@ OFILES=\ mkrunetype.$O\ include ../../Make.ccmd + +UnicodeData-%.txt: + curl http://www.unicode.org/Public/$*/ucd/UnicodeData.txt >_$@ + mv _$@ $@ + +runetypebody-%.c: mkrunetype UnicodeData-%.txt + mkrunetype -p UnicodeData-$*.txt >_$@ + mv _$@ $@ + +CLEANFILES+=UnicodeData.txt + +UNICODE_VERSION=6.0.0 + +test: mkrunetype UnicodeData-$(UNICODE_VERSION).txt + mkrunetype -c UnicodeData-$(UNICODE_VERSION).txt + diff --git a/src/lib9/utf/mkrunetype.c b/src/lib9/utf/mkrunetype.c index 848056451dd..06d52b57268 100644 --- a/src/lib9/utf/mkrunetype.c +++ b/src/lib9/utf/mkrunetype.c @@ -93,8 +93,9 @@ usage(void) exit(1); } -int -main(int argc, char *argv[]){ +void +main(int argc, char *argv[]) +{ FILE *in; char buf[MAX_LINE], buf2[MAX_LINE]; char *fields[NFIELDS + 1], *fields2[NFIELDS + 1]; @@ -239,7 +240,7 @@ main(int argc, char *argv[]){ }else{ mktables(argv[0], usepairs); } - return 0; + exit(0); } /* @@ -562,7 +563,8 @@ mkto(const char* label, int* map, int usepairs) // Make only range tables and a function for is