[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH 1/4] make_unicode: Create tables with data needed by nameprep algorithm
From:       Alexandre Julliard <julliard () winehq ! org>
Date:       2012-04-25 15:08:38
Message-ID: 8762cndf2h.fsf () wine ! dyndns ! org
[Download RAW message or body]

Piotr Caban <piotr@codeweavers.com> writes:

> +        dump_nameprep_range($INPUT, $nameprep_flags{"unassigned"}, \@flags_table) if (/A.1/);
> +        dump_nameprep_range($INPUT, $nameprep_flags{"prohibited"}, \@flags_table) if (/C.1.2/);
> +        dump_nameprep_range($INPUT, $nameprep_flags{"prohibited"}, \@flags_table) if (/C.2.2/);
> +        dump_nameprep_range($INPUT, $nameprep_flags{"prohibited"}, \@flags_table) if (/C.3/);
> +        dump_nameprep_range($INPUT, $nameprep_flags{"prohibited"}, \@flags_table) if (/C.4/);
> +        dump_nameprep_range($INPUT, $nameprep_flags{"prohibited"}, \@flags_table) if (/C.5/);
> +        dump_nameprep_range($INPUT, $nameprep_flags{"prohibited"}, \@flags_table) if (/C.6/);
> +        dump_nameprep_range($INPUT, $nameprep_flags{"prohibited"}, \@flags_table) if (/C.7/);
> +        dump_nameprep_range($INPUT, $nameprep_flags{"prohibited"}, \@flags_table) if (/C.8/);
> +        dump_nameprep_range($INPUT, $nameprep_flags{"prohibited"}, \@flags_table) if (/C.9/);
> +        dump_nameprep_range($INPUT, $nameprep_flags{"bidi_ral"}, \@flags_table) if (/D.1/);
> +        dump_nameprep_range($INPUT, $nameprep_flags{"bidi_l"}, \@flags_table) if (/D.2/);
> +
> +        dump_nameprep_map($INPUT, \@mapping_table) if (/B.1/);
> +        dump_nameprep_map($INPUT, \@mapping_table) if (/B.2/);

These names are confusing, the functions are loading data not dumping it.

> +    for (my $i = 0; $i < 65536; $i++)
> +    {
> +        next unless defined $flags_table[$i];
> +        $flags_table[$i] += $i;
> +    }
> +
> +    open OUTPUT,">$filename.new" or die "Cannot create $filename";
> +    print "Building $filename\n";
> +    print OUTPUT "/* Nameprep algorithm related data */\n";
> +    print OUTPUT "/* generated from $STRINGPREP */\n";
> +    print OUTPUT "/* DO NOT EDIT!! */\n\n";
> +    print OUTPUT "#include \"wine/unicode.h\"\n\n";
> +    DUMP_CASE_TABLE( "nameprep_char_type", @flags_table );

It doesn't make sense to use a case table for this, it's just flags.

-- 
Alexandre Julliard
julliard@winehq.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic