Skip to content

Commit

Permalink
Showing 3 changed files with 798 additions and 808 deletions.
30 changes: 13 additions & 17 deletions scripts/UnicodePropertiesTemplate.java
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
/*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do
* so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.jcodings.unicode;

import org.jcodings.Config;
import org.jcodings.unicode.UnicodeEncoding.CodeRangeEntry;

public class UnicodeProperties {
static final CodeRangeEntry[]CodeRangeTable = Config.USE_UNICODE_PROPERTIES ?
new CodeRangeEntry[] {
static final CodeRangeEntry[]CodeRangeTable = new CodeRangeEntry[] {
%{extcrs}
} : new CodeRangeEntry[] {
%{stdcrs}
};
};
}
4 changes: 1 addition & 3 deletions scripts/generate.rb
Original file line number Diff line number Diff line change
@@ -89,9 +89,7 @@ def generate_coderange_list
end.flatten(1)

open("#{SRC_DIR}/unicode/UnicodeProperties.java", "wb") do |f| f <<
open("UnicodePropertiesTemplate.java", "rb").read.
sub(/%\{stdcrs\}/, "#{INDENT * 4}null").
sub(/%\{extcrs\}/, out.map{|name, table| "#{INDENT * 4}" + "new CodeRangeEntry(\"#{name}\", \"CR_#{table}\")"}.join(",\n"))
open("UnicodePropertiesTemplate.java", "rb").read.sub(/%\{extcrs\}/, out.map{|name, table| "#{INDENT * 2}" + "new CodeRangeEntry(\"#{name}\", \"CR_#{table}\")"}.join(",\n"))
end
end

1,572 changes: 784 additions & 788 deletions src/org/jcodings/unicode/UnicodeProperties.java

Large diffs are not rendered by default.

0 comments on commit f64ed52

Please sign in to comment.