diff options
Diffstat (limited to 'src/pkg/unicode/maketables.go')
| -rw-r--r-- | src/pkg/unicode/maketables.go | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/pkg/unicode/maketables.go b/src/pkg/unicode/maketables.go index 421d29455..07b931d7e 100644 --- a/src/pkg/unicode/maketables.go +++ b/src/pkg/unicode/maketables.go @@ -73,7 +73,7 @@ var category = map[string]bool{ // UnicodeData.txt has form: // 0037;DIGIT SEVEN;Nd;0;EN;;7;7;7;N;;;;; // 007A;LATIN SMALL LETTER Z;Ll;0;L;;;;;N;;;005A;;005A -// See http://www.unicode.org/Public/5.1.0/ucd/UCD.html for full explanation +// See http://www.unicode.org/reports/tr44/ for a full explanation // The fields: const ( FCodePoint = iota @@ -81,10 +81,10 @@ const ( FGeneralCategory FCanonicalCombiningClass FBidiClass - FDecompositionType - FDecompositionMapping + FDecompositionTypeAndMapping FNumericType - FNumericValue + FNumericDigit // If a decimal digit. + FNumericValue // Includes non-decimal, e.g. U+2155=1/5 FBidiMirrored FUnicode1Name FISOComment @@ -97,21 +97,21 @@ const ( ) var fieldName = []string{ - "CodePoint", - "Name", - "GeneralCategory", - "CanonicalCombiningClass", - "BidiClass", - "DecompositionType", - "DecompositionMapping", - "NumericType", - "NumericValue", - "BidiMirrored", - "Unicode1Name", - "ISOComment", - "SimpleUppercaseMapping", - "SimpleLowercaseMapping", - "SimpleTitlecaseMapping", + FCodePoint: "CodePoint", + FName: "Name", + FGeneralCategory: "GeneralCategory", + FCanonicalCombiningClass: "CanonicalCombiningClass", + FBidiClass: "BidiClass", + FDecompositionTypeAndMapping: "DecompositionTypeAndMapping", + FNumericType: "NumericType", + FNumericDigit: "NumericDigit", + FNumericValue: "NumericValue", + FBidiMirrored: "BidiMirrored", + FUnicode1Name: "Unicode1Name", + FISOComment: "ISOComment", + FSimpleUppercaseMapping: "SimpleUppercaseMapping", + FSimpleLowercaseMapping: "SimpleLowercaseMapping", + FSimpleTitlecaseMapping: "SimpleTitlecaseMapping", } // This contains only the properties we're interested in. @@ -156,7 +156,7 @@ const ( ) func parseCategory(line string) (state State) { - field := strings.Split(line, ";", -1) + field := strings.Split(line, ";") if len(field) != NumField { logger.Fatalf("%5s: %d fields (expected %d)\n", line, len(field), NumField) } @@ -253,7 +253,7 @@ func all(scripts map[string][]Script) []string { // Extract the version number from the URL func version() string { // Break on slashes and look for the first numeric field - fields := strings.Split(*url, "/", -1) + fields := strings.Split(*url, "/") for _, f := range fields { if len(f) > 0 && '0' <= f[0] && f[0] <= '9' { return f @@ -336,7 +336,7 @@ func loadCasefold() { if line[0] == '#' { continue } - field := strings.Split(line, "; ", -1) + field := strings.Split(line, "; ") if len(field) != 4 { logger.Fatalf("CaseFolding.txt %.5s...: %d fields (expected %d)\n", line, len(field), 4) } @@ -372,7 +372,7 @@ func printCategories() { return } // Find out which categories to dump - list := strings.Split(*tablelist, ",", -1) + list := strings.Split(*tablelist, ",") if *tablelist == "all" { list = allCategories() } @@ -588,7 +588,7 @@ func parseScript(line string, scripts map[string][]Script) { if len(line) == 0 { return } - field := strings.Split(line, ";", -1) + field := strings.Split(line, ";") if len(field) != 2 { logger.Fatalf("%s: %d fields (expected 2)\n", line, len(field)) } @@ -685,7 +685,7 @@ func printScriptOrProperty(doProps bool) { resp.Body.Close() // Find out which scripts to dump - list := strings.Split(flaglist, ",", -1) + list := strings.Split(flaglist, ",") if flaglist == "all" { list = all(table) } @@ -1042,7 +1042,7 @@ func printCasefold() { if orb == nil { continue } - sort.SortInts(orb) + sort.Ints(orb) c := orb[len(orb)-1] for _, d := range orb { chars[c].caseOrbit = d |
