From bf212e80fb0f1d83902de520e9cee098187383f7 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 8 Apr 2024 22:34:51 +0200 Subject: Tweaks to uprop_get_*() --- gen/prop/gc | 85 ++++++++++++++++++++++++------------------------------------- gen/prop/nv | 2 +- 2 files changed, 34 insertions(+), 53 deletions(-) (limited to 'gen') diff --git a/gen/prop/gc b/gen/prop/gc index 48c6659..219df8a 100755 --- a/gen/prop/gc +++ b/gen/prop/gc @@ -2,56 +2,19 @@ set -e cd "${0%/*}/../.." -exec >include/unicode/__gc.h - -cat <lib/unicode/prop/uprop_get_gc.c gawk ' BEGIN { FS = ";" -} - -{ - s = "GC_" toupper($3) - lo = strtonum("0X" $1) - - if ($2 ~ /First/) { - getline - hi = strtonum("0X" $1) - } else - hi = lo - - for (i = lo; i <= hi; i++) - props[i] = s -} - -END { - for (i = 0; i <= 0xFF; i++) - print props[i] "," -} -' data/UnicodeData.txt | paste -d' ' - - - - - - - - | sed 's/^/\t/' - -cat <