From 176d5769d9b0c1ce450423545aa05761f18e516d Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 31 Jan 2011 12:38:54 -0500 Subject: [PATCH] lib9: update to Unicode 6.0.0 R=r CC=golang-dev https://golang.org/cl/4121042 --- src/lib9/utf/Makefile | 16 + src/lib9/utf/mkrunetype.c | 10 +- src/lib9/utf/runetype.c | 47 +- src/lib9/utf/runetypebody-6.0.0.c | 1565 +++++++++++++++++++++++++++++ src/lib9/utf/utf.h | 6 - 5 files changed, 1588 insertions(+), 56 deletions(-) create mode 100644 src/lib9/utf/runetypebody-6.0.0.c 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