Alexandre Julliard : tools: Move the cpmap.pl script to tools/make_unicode.

Alexandre Julliard julliard at winehq.org
Thu Jul 7 13:33:46 CDT 2011


Module: wine
Branch: master
Commit: 704a330a8e3e928529193d30d60bb2e0a5ccd835
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=704a330a8e3e928529193d30d60bb2e0a5ccd835

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Jul  7 15:05:52 2011 +0200

tools: Move the cpmap.pl script to tools/make_unicode.

---

 libs/wine/cpmap.pl => tools/make_unicode     |   36 ++++++++++++++-----------
 libs/wine/defaults => tools/unicode-defaults |    0
 2 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/libs/wine/cpmap.pl b/tools/make_unicode
similarity index 98%
rename from libs/wine/cpmap.pl
rename to tools/make_unicode
index 3d09f10..7e6beef 100755
--- a/libs/wine/cpmap.pl
+++ b/tools/make_unicode
@@ -29,7 +29,7 @@ my $UNIDATA = "http://www.unicode.org/Public/6.0.0/ucd";
 my $SORTKEYS = "http://www.unicode.org/reports/tr10/allkeys.txt";
 
 # Defaults mapping
-my $DEFAULTS = "./defaults";
+my $DEFAULTS = "tools/unicode-defaults";
 
 # Default char for undefined mappings
 my $DEF_CHAR = ord '?';
@@ -1716,7 +1716,7 @@ sub handle_bestfit_file($$$)
     }
     close $INPUT;
 
-    my $output = sprintf "c_%03d.c", $codepage;
+    my $output = sprintf "libs/wine/c_%03d.c", $codepage;
     open OUTPUT,">$output.new" or die "Cannot create $output";
 
     printf "Building %s from %s (%s)\n", $output, $filename, $comment;
@@ -1757,7 +1757,7 @@ sub HANDLE_FILE(@)
 
     ADD_DEFAULT_MAPPINGS();
 
-    my $output = sprintf "c_%03d.c", $codepage;
+    my $output = sprintf "libs/wine/c_%03d.c", $codepage;
     open OUTPUT,">$output.new" or die "Cannot create $output";
 
     printf "Building %s from %s (%s)\n", $output, $filename || "hardcoded data", $comment;
@@ -1801,10 +1801,13 @@ sub save_file($)
 
 ################################################################
 # output the list of codepage tables into the cptable.c file
-sub OUTPUT_CPTABLE()
+sub output_cptable($)
 {
+    my $output = shift;
     my @tables_decl = ();
 
+    printf "Building %s\n", $output;
+
     foreach my $file (@allfiles)
     {
         my ($codepage,$filename,$comment) = @$file;
@@ -1818,7 +1821,7 @@ sub OUTPUT_CPTABLE()
         push @tables_decl, sprintf("    &cptable_%03d,\n", $codepage);
     }
     push @tables_decl, "};";
-    REPLACE_IN_FILE( "cptable.c", @tables_decl );
+    REPLACE_IN_FILE( $output, @tables_decl );
 }
 
 ################################################################
@@ -1850,23 +1853,24 @@ sub REPLACE_IN_FILE($@)
 ################################################################
 # main routine
 
+chdir ".." if -f "./make_unicode";
 READ_DEFAULTS( $DEFAULTS );
-DUMP_CASE_MAPPINGS( "casemap.c" );
-DUMP_SORTKEYS( "collation.c", READ_SORTKEYS_FILE() );
-DUMP_COMPOSE_TABLES( "compose.c" );
-DUMP_CTYPE_TABLES( "wctype.c" );
-dump_mirroring( "../../dlls/usp10/mirror.c" );
-dump_shaping( "../../dlls/usp10/shaping.c" );
-dump_linebreak( "../../dlls/usp10/linebreak.c" );
-dump_indic( "../../dlls/usp10/indicsyllable.c" );
-dump_intl_nls("../../tools/l_intl.nls");
+DUMP_CASE_MAPPINGS( "libs/wine/casemap.c" );
+DUMP_SORTKEYS( "libs/wine/collation.c", READ_SORTKEYS_FILE() );
+DUMP_COMPOSE_TABLES( "libs/wine/compose.c" );
+DUMP_CTYPE_TABLES( "libs/wine/wctype.c" );
+dump_mirroring( "dlls/usp10/mirror.c" );
+dump_shaping( "dlls/usp10/shaping.c" );
+dump_linebreak( "dlls/usp10/linebreak.c" );
+dump_indic( "dlls/usp10/indicsyllable.c" );
+dump_intl_nls("tools/l_intl.nls");
 
 foreach my $file (@allfiles) { HANDLE_FILE( @{$file} ); }
 
-OUTPUT_CPTABLE();
+output_cptable("libs/wine/cptable.c");
 
 exit 0;
 
 # Local Variables:
-# compile-command: "./cpmap.pl && make -k"
+# compile-command: "./make_unicode"
 # End:
diff --git a/libs/wine/defaults b/tools/unicode-defaults
similarity index 100%
rename from libs/wine/defaults
rename to tools/unicode-defaults




More information about the wine-cvs mailing list