diff options
author | H. Peter Anvin <hpa@smyrno.hos.anvin.org> | 2005-12-04 18:36:06 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@smyrno.hos.anvin.org> | 2005-12-04 18:36:06 -0800 |
commit | 6d4ddcfd62b997bb8454e521c635c47a6a848816 (patch) | |
tree | a856f6121d9d394ef067323e9c771ea776fa4649 | |
parent | c35d346b8fff2bae4a8738461711ed46ada04ed3 (diff) | |
download | libucd-6d4ddcfd62b997bb8454e521c635c47a6a848816.tar.gz |
Age is coded as 31.7 not 7.31
-rwxr-xr-x | convert_ucd.pl | 2 | ||||
-rw-r--r-- | libucd_int.h | 6 | ||||
-rw-r--r-- | ucd.h | 1 |
3 files changed, 7 insertions, 2 deletions
diff --git a/convert_ucd.pl b/convert_ucd.pl index 9d85cc2..5cc3e97 100755 --- a/convert_ucd.pl +++ b/convert_ucd.pl @@ -442,7 +442,7 @@ sub make_properties_array() # many minor versions per major version.) my $age = $$cp{'Age'} || '0.0'; my (@sage) = split(/\./, $age); - $mine .= sprintf("\t\t(%d << 5) + %d, /* $age */\n", $sage[0], $sage[1]); + $mine .= sprintf("\t\t(%d << 3) + %d, /* $age */\n", $sage[0], $sage[1]); # Canonical Combining Class my $ccc = $$cp{'Canonical_Combining_Class'} || 'NR'; diff --git a/libucd_int.h b/libucd_int.h index 675ab79..aa4354d 100644 --- a/libucd_int.h +++ b/libucd_int.h @@ -27,7 +27,7 @@ struct _libucd_property_array { int24 simple_uppercase; int24 simple_lowercase; int24 simple_titlecase; - uint8_t age; /* (major << 5) + minor */ + uint8_t age; /* (major << 3) + minor */ uint8_t combining_class; unsigned sentence_break :4; unsigned grapheme_cluster_break :4; @@ -42,6 +42,7 @@ struct _libucd_property_array { unsigned /* unused */ :1; } ALIGNED(32); extern const struct _libucd_property_array _libucd_property_array[]; +extern const int _libucd_property_array_count; struct _libucd_ucstoname_tab { int24 ucs; @@ -55,4 +56,7 @@ struct _libucd_nametoucs_tab { }; extern const struct _libucd_nametoucs_tab _libucd_nametoucs_tab[]; +#define UCS_CNT 0x110000 +#define UCS_MAX (UCS_CNT-1) + #endif @@ -554,6 +554,7 @@ struct unicode_character_data { uint8_t numeric_value_num; uint8_t numeric_value_den; uint8_t numeric_value_exp; + uint8_t age_ma, age_mi; enum unicode_general_category general_category; enum unicode_block block; enum unicode_script script; |