Changeset 91494 in webkit
- Timestamp:
- Jul 21, 2011, 1:23:41 PM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r91486 r91494 1 2011-07-21 David Kilzer <ddkilzer@apple.com> 2 3 <http://webkit.org/b/64972> Clean up generated HTMLEntityTable.cpp output 4 5 Reviewed by Eric Seidel. 6 7 * html/parser/create-html-entity-table: 8 - Fix duplicate "EntityName" suffix on local variables (changes 9 fooSemicolonEntityNameEntityName to fooSemicolonEntityName) 10 for all 2138 symbols. 11 - Add newlines to make source file human-readable (as originally 12 intended). 13 - Add static (const) keywords to local variables that are never 14 referenced externally. 15 1 16 2011-07-21 Mark Pilgrim <pilgrim@chromium.org> 2 17 -
trunk/Source/WebCore/html/parser/create-html-entity-table
r79562 r91494 112 112 113 113 for entry in entries: 114 output_file.write(" const UChar %sEntityName[] = %s;" % (114 output_file.write("static const UChar %s[] = %s;\n" % ( 115 115 convert_entity_to_cpp_name(entry[ENTITY]), 116 116 convert_entity_to_uchar_array(entry[ENTITY]))) 117 117 118 118 output_file.write(""" 119 HTMLEntityTableEntry staticEntityTable[%s] = {""" % entity_count)119 static const HTMLEntityTableEntry staticEntityTable[%s] = {\n""" % entity_count) 120 120 121 121 index = {} … … 125 125 if not index.get(letter): 126 126 index[letter] = offset 127 output_file.write(' { %s EntityName, %s, %s },' % (127 output_file.write(' { %s, %s, %s },\n' % ( 128 128 convert_entity_to_cpp_name(entry[ENTITY]), 129 129 len(entry[ENTITY]), … … 132 132 133 133 output_file.write("""}; 134 134 135 """) 135 136 136 output_file.write(" const HTMLEntityTableEntry* uppercaseOffset[] = {")137 output_file.write("static const HTMLEntityTableEntry* uppercaseOffset[] = {\n") 137 138 for letter in string.ascii_uppercase: 138 output_file.write( offset_table_entry(index[letter]))139 output_file.write( offset_table_entry(index['a']))139 output_file.write("%s\n" % offset_table_entry(index[letter])) 140 output_file.write("%s\n" % offset_table_entry(index['a'])) 140 141 output_file.write("""}; 141 142 142 const HTMLEntityTableEntry* lowercaseOffset[] = {""")143 static const HTMLEntityTableEntry* lowercaseOffset[] = {\n""") 143 144 for letter in string.ascii_lowercase: 144 output_file.write( offset_table_entry(index[letter]))145 output_file.write( offset_table_entry(entity_count))145 output_file.write("%s\n" % offset_table_entry(index[letter])) 146 output_file.write("%s\n" % offset_table_entry(entity_count)) 146 147 output_file.write("""}; 147 148
Note:
See TracChangeset
for help on using the changeset viewer.