Skip to content

Commit

Permalink
Update Unicode tables.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwsw committed Jul 8, 2019
1 parent 2436151 commit 1594008
Show file tree
Hide file tree
Showing 10 changed files with 652 additions and 64 deletions.
4 changes: 2 additions & 2 deletions Makefile.aut
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ wide.uni: unicode/EastAsianWidth.txt

unicode/UnicodeData.txt:
mkdir -p unicode
curl -s -o $@ ftp:https://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt
curl -s -u 'anonymous:${EMAIL}' -o $@ ftp:https://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt
unicode/EastAsianWidth.txt:
mkdir -p unicode
curl -s -o $@ ftp:https://ftp.unicode.org/Public/UNIDATA/EastAsianWidth.txt
curl -s -u 'anonymous:$(EMAIL)' -o $@ ftp:https://ftp.unicode.org/Public/UNIDATA/EastAsianWidth.txt

distfiles: ${DISTFILES}

Expand Down
2 changes: 1 addition & 1 deletion compose.uni
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Generated by "./mkutable -f2 Mn Me -- unicode/UnicodeData.txt" on Wed Feb 13 17:57:05 PST 2019 */
/* Generated by "./mkutable unicode/UnicodeData.txt" on Sat Jul 6 09:26:19 PDT 2019 */
{ 0x0300, 0x036f }, /* Mn */
{ 0x0483, 0x0487 }, /* Mn */
{ 0x0488, 0x0489 }, /* Me */
Expand Down
2 changes: 1 addition & 1 deletion fmt.uni
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Generated by "./mkutable -f2 Cf -- unicode/UnicodeData.txt" on Wed Feb 13 17:57:05 PST 2019 */
/* Generated by "./mkutable unicode/UnicodeData.txt" on Sat Jul 6 09:26:19 PDT 2019 */
{ 0x00ad, 0x00ad }, /* Cf */
{ 0x0600, 0x0605 }, /* Cf */
{ 0x061c, 0x061c }, /* Cf */
Expand Down
18 changes: 9 additions & 9 deletions mkutable
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ my $USAGE = <<__EOF__;
-f = zero-based type field (default 2)
__EOF__

use vars qw( $opt_f $opt_n );
use Getopt::Std;
use vars qw( $opt_f $opt_n );

my $type_field = 2;

# Override Unicode tables for certain control chars
Expand All @@ -24,13 +25,10 @@ my %force_space = (
exit (main() ? 0 : 1);

sub main {
my $date = `date`;
chomp $date;
my $args = join ' ', @ARGV;
my $header = "/* Generated by \"$0 $args\" on $date */\n";

die $USAGE if not getopts('f:n');
$type_field = $opt_f if $opt_f;

my %types;
my $arg;
while ($arg = shift @ARGV) {
Expand All @@ -39,7 +37,10 @@ sub main {
}
my %out = ( 'types' => \%types );

print $header;
my $date = `date`;
chomp $date;
print "/* Generated by \"$0 $args\" on $date */\n";

my $last_code = 0;
while (<>) {
chomp;
Expand All @@ -52,13 +53,12 @@ sub main {
$lo_code = hex $1;
$hi_code = hex $2;
} else {
$lo_code = $hi_code = hex $fields[0];
$lo_code = $hi_code = hex $codes;
}
my $type = $fields[$type_field];
$type =~ s/\s//g;
for ($last_code = $lo_code; $last_code <= $hi_code; ++$last_code) {
$type = 'Zs' if $force_space{$last_code};
output(\%out, $last_code, $type);
output(\%out, $last_code, $force_space{$last_code} ? 'Zs' : $type);
}
}
output(\%out, $last_code);
Expand Down
1 change: 0 additions & 1 deletion screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,6 @@ ltget_env(capname)
char *capname;
{
char name[64];
char *s;

if (termcap_debug)
{
Expand Down
2 changes: 1 addition & 1 deletion ubin.uni
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Generated by "./mkutable -f2 Cc Cs Co Zl Zp -- unicode/UnicodeData.txt" on Wed Feb 13 17:57:06 PST 2019 */
/* Generated by "./mkutable unicode/UnicodeData.txt" on Sat Jul 6 09:27:01 PDT 2019 */
{ 0x0000, 0x0007 }, /* Cc */
{ 0x000b, 0x000b }, /* Cc */
{ 0x000e, 0x001f }, /* Cc */
Expand Down
116 changes: 77 additions & 39 deletions unicode/EastAsianWidth.txt

Large diffs are not rendered by default.

Loading

0 comments on commit 1594008

Please sign in to comment.