Changeset 91494 in webkit


Ignore:
Timestamp:
Jul 21, 2011, 1:23:41 PM (14 years ago)
Author:
ddkilzer@apple.com
Message:

<http://webkit.org/b/64972> Clean up generated HTMLEntityTable.cpp output

Reviewed by Eric Seidel.

  • html/parser/create-html-entity-table:
  • Fix duplicate "EntityName" suffix on local variables (changes fooSemicolonEntityNameEntityName to fooSemicolonEntityName) for all 2138 symbols.
  • Add newlines to make source file human-readable (as originally intended).
  • Add static (const) keywords to local variables that are never referenced externally.
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r91486 r91494  
     12011-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
    1162011-07-21  Mark Pilgrim  <pilgrim@chromium.org>
    217
  • trunk/Source/WebCore/html/parser/create-html-entity-table

    r79562 r91494  
    112112
    113113for entry in entries:
    114     output_file.write("const UChar %sEntityName[] = %s;" % (
     114    output_file.write("static const UChar %s[] = %s;\n" % (
    115115        convert_entity_to_cpp_name(entry[ENTITY]),
    116116        convert_entity_to_uchar_array(entry[ENTITY])))
    117117
    118118output_file.write("""
    119 HTMLEntityTableEntry staticEntityTable[%s] = {""" % entity_count)
     119static const HTMLEntityTableEntry staticEntityTable[%s] = {\n""" % entity_count)
    120120
    121121index = {}
     
    125125    if not index.get(letter):
    126126        index[letter] = offset
    127     output_file.write('    { %sEntityName, %s, %s },' % (
     127    output_file.write('    { %s, %s, %s },\n' % (
    128128        convert_entity_to_cpp_name(entry[ENTITY]),
    129129        len(entry[ENTITY]),
     
    132132
    133133output_file.write("""};
     134
    134135""")
    135136
    136 output_file.write("const HTMLEntityTableEntry* uppercaseOffset[] = {")
     137output_file.write("static const HTMLEntityTableEntry* uppercaseOffset[] = {\n")
    137138for 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]))
     140output_file.write("%s\n" % offset_table_entry(index['a']))
    140141output_file.write("""};
    141142
    142 const HTMLEntityTableEntry* lowercaseOffset[] = {""")
     143static const HTMLEntityTableEntry* lowercaseOffset[] = {\n""")
    143144for 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]))
     146output_file.write("%s\n" % offset_table_entry(entity_count))
    146147output_file.write("""};
    147148
Note: See TracChangeset for help on using the changeset viewer.