| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2010 Google Inc. All rights reserved. | 2 # Copyright (c) 2010 Google Inc. All rights reserved. |
| 3 # | 3 # |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 output_file.write("""}; | 194 output_file.write("""}; |
| 195 | 195 |
| 196 static const short lowercaseOffset[] = {\n""") | 196 static const short lowercaseOffset[] = {\n""") |
| 197 for letter in string.ascii_lowercase: | 197 for letter in string.ascii_lowercase: |
| 198 output_file.write("%d,\n" % index[letter]) | 198 output_file.write("%d,\n" % index[letter]) |
| 199 output_file.write("%d\n" % entity_count) | 199 output_file.write("%d\n" % entity_count) |
| 200 output_file.write("""}; | 200 output_file.write("""}; |
| 201 | 201 |
| 202 const LChar* HTMLEntityTable::entityString(const HTMLEntityTableEntry& entry) | 202 const LChar* HTMLEntityTable::entityString(const HTMLEntityTableEntry& entry) |
| 203 { | 203 { |
| 204 return staticEntityStringStorage + entry.entityOffset; | 204 return staticEntityStringStorage + entry.entity_offset; |
| 205 } | 205 } |
| 206 | 206 |
| 207 LChar HTMLEntityTableEntry::lastCharacter() const | 207 LChar HTMLEntityTableEntry::lastCharacter() const |
| 208 { | 208 { |
| 209 return HTMLEntityTable::entityString(*this)[length - 1]; | 209 return HTMLEntityTable::entityString(*this)[length - 1]; |
| 210 } | 210 } |
| 211 | 211 |
| 212 const HTMLEntityTableEntry* HTMLEntityTable::firstEntryStartingWith(UChar c) | 212 const HTMLEntityTableEntry* HTMLEntityTable::firstEntryStartingWith(UChar c) |
| 213 { | 213 { |
| 214 if (c >= 'A' && c <= 'Z') | 214 if (c >= 'A' && c <= 'Z') |
| (...skipping 17 matching lines...) Expand all Loading... |
| 232 return &staticEntityTable[0]; | 232 return &staticEntityTable[0]; |
| 233 } | 233 } |
| 234 | 234 |
| 235 const HTMLEntityTableEntry* HTMLEntityTable::lastEntry() | 235 const HTMLEntityTableEntry* HTMLEntityTable::lastEntry() |
| 236 { | 236 { |
| 237 return &staticEntityTable[%s - 1]; | 237 return &staticEntityTable[%s - 1]; |
| 238 } | 238 } |
| 239 | 239 |
| 240 } | 240 } |
| 241 """ % entity_count) | 241 """ % entity_count) |
| OLD | NEW |