Kaydet (Commit) db1118a6 authored tarafından Eike Rathke's avatar Eike Rathke

cut cruft

Change-Id: Ibd1669b22e990d21b3fb35a6d412067e80b602b8
üst 929ab83d
...@@ -56,20 +56,13 @@ sub Usage() ...@@ -56,20 +56,13 @@ sub Usage()
"If option --single is given, only the first match will be processed.\n\n"; "If option --single is given, only the first match will be processed.\n\n";
} }
my $SOLARVERSION = $ENV{"SOLARVERSION"}; my $SRC_ROOT = $ENV{"SRC_ROOT"};
my $INPATH = $ENV{"INPATH"}; if (!defined($SRC_ROOT))
my $SRC_ROOT = $ENV{"SRC_ROOT"};
my $UPDMINOREXT = $ENV{"UPDMINOREXT"};
if (!defined($SOLARVERSION) || !defined($INPATH) || !defined($SRC_ROOT))
{ {
print "\nNeed \$SOLARVERSION, \$INPATH and \$SRC_ROOT, please set your OOo environment!\n"; print "\nNeed \$SRC_ROOT, please set your LibreOffice environment!\n";
Usage(); Usage();
exit 1; exit 1;
} }
if (!defined($UPDMINOREXT)) {
$UPDMINOREXT = '';
}
my $SOLENVINC = "$SOLARVERSION/$INPATH/inc$UPDMINOREXT";
my $LANGUAGE_MASK_PRIMARY = 0x03ff; my $LANGUAGE_MASK_PRIMARY = 0x03ff;
...@@ -99,13 +92,9 @@ sub grepFile($$$$@) ...@@ -99,13 +92,9 @@ sub grepFile($$$$@)
my $found = 0; my $found = 0;
my $areopen = 0; my $areopen = 0;
my $arecloser = ''; my $arecloser = '';
my $file;
# Try module under current working directory first to catch local # Try module under current working directory first to catch local
# modifications. A Not yet delivered lang.h is a special case. # modifications.
if ("$path/$module/$name" eq "$SOLENVINC/i18nlangtag/lang.h") { my $file = "./$module/$name";
$file = "./include/$module/lang.h"; }
else {
$file = "./$module/$name"; }
if (!($found = open( IN, $file))) if (!($found = open( IN, $file)))
{ {
# Then with the given path. # Then with the given path.
...@@ -113,13 +102,6 @@ sub grepFile($$$$@) ...@@ -113,13 +102,6 @@ sub grepFile($$$$@)
if (!($found = open( IN, $file))) if (!($found = open( IN, $file)))
{ {
print "No $file\n"; print "No $file\n";
$file = "$path/$module.lnk/$name";
if (!($found = open( IN, $file))) {
print "No $file.\n";
$file = "$path/$module.link/$name";
if (!($found = open( IN, $file))) {
print "No $file either.\n"; }
}
} }
} }
if ($found) if ($found)
...@@ -232,7 +214,7 @@ sub main() ...@@ -232,7 +214,7 @@ sub main()
# #define LANGUAGE_AFRIKAANS 0x0436 # #define LANGUAGE_AFRIKAANS 0x0436
@resultlist = grepFile( @resultlist = grepFile(
$modifier . '^\s*#\s*define\s+[A-Z_]*' . $grepdef, $modifier . '^\s*#\s*define\s+[A-Z_]*' . $grepdef,
$SOLENVINC, "i18nlangtag", "lang.h", ()); "$SRC_ROOT", "i18nlangtag", "lang.h", ());
} }
else else
{ {
...@@ -241,7 +223,7 @@ sub main() ...@@ -241,7 +223,7 @@ sub main()
my $buf = sprintf( "0x%04X", $lcid); my $buf = sprintf( "0x%04X", $lcid);
@resultlist = grepFile( @resultlist = grepFile(
'^\s*#\s*define\s+\w+\s+' . $buf, '^\s*#\s*define\s+\w+\s+' . $buf,
$SOLENVINC, "i18nlangtag", "lang.h", ()); "$SRC_ROOT", "i18nlangtag", "lang.h", ());
} }
for $result (@resultlist) for $result (@resultlist)
{ {
...@@ -294,7 +276,7 @@ sub main() ...@@ -294,7 +276,7 @@ sub main()
# #define LANGUAGE_AFRIKAANS 0x0436 # #define LANGUAGE_AFRIKAANS 0x0436
@resultlist = grepFile( @resultlist = grepFile(
$modifier . '^\s*#\s*define\s+[A-Z_]*' . $grepdef, $modifier . '^\s*#\s*define\s+[A-Z_]*' . $grepdef,
$SOLENVINC, "i18nlangtag", "lang.h", ()); "$SRC_ROOT", "i18nlangtag", "lang.h", ());
my @lcidlist; my @lcidlist;
for $result (@resultlist) for $result (@resultlist)
{ {
...@@ -330,16 +312,7 @@ sub main() ...@@ -330,16 +312,7 @@ sub main()
push( @langcoungreplist, '\b' . $lang . '\b'); push( @langcoungreplist, '\b' . $lang . '\b');
} }
my $file = "$SRC_ROOT/i18npool/source/localedata/data/$loca.xml"; my $file = "$SRC_ROOT/i18npool/source/localedata/data/$loca.xml";
my $found; my $found = open( LD, $file);
if (!($found = open( LD, $file)))
{
$file = "$SRC_ROOT/i18npool.lnk/source/localedata/data/$loca.xml";
if (!($found = open( LD, $file)))
{
$file = "$SRC_ROOT/i18npool.link/source/localedata/data/$loca.xml";
$found = open( LD, $file);
}
}
if ($found) if ($found)
{ {
print "Found $file:\n"; print "Found $file:\n";
...@@ -356,7 +329,7 @@ sub main() ...@@ -356,7 +329,7 @@ sub main()
close( LD); close( LD);
} }
else { else {
print "No $SRC_ROOT/i18npool/source/localedata/data/$loca.xml\n"; } print "No $file\n"; }
} }
} }
......
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