From 1da7fcde310674d2b4b181bfbe2c1d5ec10f1c0b Mon Sep 17 00:00:00 2001 From: "Mike D. Lowis" Date: Tue, 22 Sep 2015 16:23:21 -0400 Subject: [PATCH] moved all generated utf files to a subdirectory --- source/utf/{ => runetype}/alphas.c | 0 source/utf/{ => runetype}/controls.c | 0 source/utf/{ => runetype}/digits.c | 0 source/utf/{ => runetype}/lowers.c | 0 source/utf/{ => runetype}/marks.c | 0 source/utf/{ => runetype}/numbers.c | 0 source/utf/{ => runetype}/other.c | 0 source/utf/{ => runetype}/otherletters.c | 0 source/utf/{ => runetype}/punctuation.c | 0 source/utf/{ => runetype}/spaces.c | 0 source/utf/{ => runetype}/symbols.c | 0 source/utf/{ => runetype}/titles.c | 0 source/utf/{ => runetype}/tolower.c | 0 source/utf/{ => runetype}/totitle.c | 0 source/utf/{ => runetype}/toupper.c | 0 source/utf/{ => runetype}/uppers.c | 0 tools/unicode.rb | 21 +-------------------- 17 files changed, 1 insertion(+), 20 deletions(-) rename source/utf/{ => runetype}/alphas.c (100%) rename source/utf/{ => runetype}/controls.c (100%) rename source/utf/{ => runetype}/digits.c (100%) rename source/utf/{ => runetype}/lowers.c (100%) rename source/utf/{ => runetype}/marks.c (100%) rename source/utf/{ => runetype}/numbers.c (100%) rename source/utf/{ => runetype}/other.c (100%) rename source/utf/{ => runetype}/otherletters.c (100%) rename source/utf/{ => runetype}/punctuation.c (100%) rename source/utf/{ => runetype}/spaces.c (100%) rename source/utf/{ => runetype}/symbols.c (100%) rename source/utf/{ => runetype}/titles.c (100%) rename source/utf/{ => runetype}/tolower.c (100%) rename source/utf/{ => runetype}/totitle.c (100%) rename source/utf/{ => runetype}/toupper.c (100%) rename source/utf/{ => runetype}/uppers.c (100%) diff --git a/source/utf/alphas.c b/source/utf/runetype/alphas.c similarity index 100% rename from source/utf/alphas.c rename to source/utf/runetype/alphas.c diff --git a/source/utf/controls.c b/source/utf/runetype/controls.c similarity index 100% rename from source/utf/controls.c rename to source/utf/runetype/controls.c diff --git a/source/utf/digits.c b/source/utf/runetype/digits.c similarity index 100% rename from source/utf/digits.c rename to source/utf/runetype/digits.c diff --git a/source/utf/lowers.c b/source/utf/runetype/lowers.c similarity index 100% rename from source/utf/lowers.c rename to source/utf/runetype/lowers.c diff --git a/source/utf/marks.c b/source/utf/runetype/marks.c similarity index 100% rename from source/utf/marks.c rename to source/utf/runetype/marks.c diff --git a/source/utf/numbers.c b/source/utf/runetype/numbers.c similarity index 100% rename from source/utf/numbers.c rename to source/utf/runetype/numbers.c diff --git a/source/utf/other.c b/source/utf/runetype/other.c similarity index 100% rename from source/utf/other.c rename to source/utf/runetype/other.c diff --git a/source/utf/otherletters.c b/source/utf/runetype/otherletters.c similarity index 100% rename from source/utf/otherletters.c rename to source/utf/runetype/otherletters.c diff --git a/source/utf/punctuation.c b/source/utf/runetype/punctuation.c similarity index 100% rename from source/utf/punctuation.c rename to source/utf/runetype/punctuation.c diff --git a/source/utf/spaces.c b/source/utf/runetype/spaces.c similarity index 100% rename from source/utf/spaces.c rename to source/utf/runetype/spaces.c diff --git a/source/utf/symbols.c b/source/utf/runetype/symbols.c similarity index 100% rename from source/utf/symbols.c rename to source/utf/runetype/symbols.c diff --git a/source/utf/titles.c b/source/utf/runetype/titles.c similarity index 100% rename from source/utf/titles.c rename to source/utf/runetype/titles.c diff --git a/source/utf/tolower.c b/source/utf/runetype/tolower.c similarity index 100% rename from source/utf/tolower.c rename to source/utf/runetype/tolower.c diff --git a/source/utf/totitle.c b/source/utf/runetype/totitle.c similarity index 100% rename from source/utf/totitle.c rename to source/utf/runetype/totitle.c diff --git a/source/utf/toupper.c b/source/utf/runetype/toupper.c similarity index 100% rename from source/utf/toupper.c rename to source/utf/runetype/toupper.c diff --git a/source/utf/uppers.c b/source/utf/runetype/uppers.c similarity index 100% rename from source/utf/uppers.c rename to source/utf/runetype/uppers.c diff --git a/tools/unicode.rb b/tools/unicode.rb index 5c13c37..a309dbd 100755 --- a/tools/unicode.rb +++ b/tools/unicode.rb @@ -4,8 +4,7 @@ require 'fileutils' require 'stringio' Database = "./tools/UnicodeData-8.0.0.txt" -OutputDir = "./source/utf" -TestFile = "./tests/utf/test_unicodedata.c" +OutputDir = "./source/utf/runetype" # Struct definition for representing a unicode character UnicodeChar = Struct.new( @@ -151,23 +150,6 @@ def generate_to_table(type) end end -def generate_test_file() - puts "Generating #{TestFile}" - File.open(TestFile, "w") do |f| - f.print("#include \n") - f.print("#include \n") - f.print("\nTEST_SUITE(UnicodeData) {\n") - $tests.each_pair do |codept,tests| - if codept < 250000 - f.print(" TEST(Codepoint_#{codept.to_s(16)}) {\n") - tests.each {|t| f.print " CHECK(#{t});\n" } - f.print(" }\n") - end - end - f.print("}\n") - end -end - #------------------------------------------------------------------------------ # Read in the unicode character database and sort it into type classes @@ -196,5 +178,4 @@ end generate_to_table(:tolower) generate_to_table(:toupper) generate_to_table(:totitle) -#generate_test_file() -- 2.55.0