Commit 989f7d64 authored by Alexandre Julliard's avatar Alexandre Julliard

make_unicode: Generate the language groups registry keys.

parent 4c51d779
......@@ -3613,6 +3613,7 @@ static BOOL CALLBACK enum_proc(LGRPID group, LCID lcid, LPSTR locale, LONG_PTR l
SCRIPT_CONTROL sc;
SCRIPT_STATE ss;
LCID lcid_old;
BOOL todo;
if (!IsValidLocale(lcid, LCID_INSTALLED)) return TRUE;
......@@ -3623,7 +3624,10 @@ static BOOL CALLBACK enum_proc(LGRPID group, LCID lcid, LPSTR locale, LONG_PTR l
lcid_old = GetThreadLocale();
if (!SetThreadLocale(lcid)) return TRUE;
todo = !GetLocaleInfoW(lcid, LOCALE_IDIGITSUBSTITUTION | LOCALE_RETURN_NUMBER, NULL, 0);
hr = ScriptRecordDigitSubstitution(lcid, &sds);
todo_wine_if( todo )
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ScriptApplyDigitSubstitution(&sds, &sc, &ss);
......
......@@ -4570,6 +4570,24 @@ sub build_locale_data()
add_string( "k0-windows-us" ) # FIXME # keyboard_layout
}
# output language groups
my %groups;
add_registry_key( "Locale", "00000409" );
foreach my $loc (@locales)
{
next unless defined $loc->{lcid};
next if ($loc->{lcid} & 0x80000000);
next if !defined($loc->{alias}) && $loc->{name} !~ /-$loc->{territory}/; # skip neutral locales
my $group = locale_entry( $loc, "group", 1 );
my $name = sprintf( "%08x", $loc->{lcid} );
my $val = sprintf( "%x", $group );
add_registry_value( "Locale", $name, $val ) unless ($loc->{lcid} & 0x000f0000);
add_registry_value( "Locale\\Alternate Sorts", $name, $val ) if $loc->{name} =~ /_/;
$groups{$val} = 1;
}
foreach my $group (keys %groups) { add_registry_value( "Language Groups", $group, "1" ); }
my $nb_lcids = scalar keys %lcids;
my $nb_locales = scalar grep { !defined $_->{alias} } @locales;
my $nb_lcnames = scalar keys %lcnames;
......@@ -4656,7 +4674,8 @@ sub dump_registry_script($%)
my ($def, @vals) = @{$keys{$k}};
for (my $i = 0; $i < @subkeys; $i++)
{
printf OUTPUT "%*s%s%s\n%*s{\n", 4 * $indent, "", $subkeys[$i],
printf OUTPUT "%*s%s%s\n%*s{\n", 4 * $indent, "",
$subkeys[$i] =~ /\s/ ? "'$subkeys[$i]'" : $subkeys[$i],
$i == $#subkeys && $def ? " = s '$def'" : "", 4 * $indent, "";
$indent++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment