Modernized/simplified syntax
Monotone-Parent: b458e410b31539173b547c1c563f0b7ce41f6252 Monotone-Revision: 896076b20bdf94cbc408070acc36cdf121794929 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-05-14T20:25:12 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
214030da9a
commit
cf1e0e3bc4
|
@ -199,7 +199,7 @@ def FindHFile(filename):
|
||||||
return found
|
return found
|
||||||
|
|
||||||
def ProcessHeaders(names, hdict):
|
def ProcessHeaders(names, hdict):
|
||||||
for filename in hdict.keys():
|
for filename in hdict:
|
||||||
header_filename = FindHFile(filename)
|
header_filename = FindHFile(filename)
|
||||||
header_file = open(header_filename, "r")
|
header_file = open(header_filename, "r")
|
||||||
lines = header_file.readlines()
|
lines = header_file.readlines()
|
||||||
|
@ -243,12 +243,10 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
prop_types = {}
|
prop_types = {}
|
||||||
# sanitization: only take unicode version of text properties
|
# sanitization: only take unicode version of text properties
|
||||||
all_keys = names.keys()
|
for name, prop_tag in names.iteritems():
|
||||||
for name in all_keys:
|
|
||||||
prop_tag = names[name]
|
|
||||||
prop_id = prop_tag >> 16
|
prop_id = prop_tag >> 16
|
||||||
prop_type = prop_tag & 0xffff
|
prop_type = prop_tag & 0xffff
|
||||||
if not prop_types.has_key(prop_id):
|
if not prop_id in prop_types:
|
||||||
prop_types[prop_id] = []
|
prop_types[prop_id] = []
|
||||||
prop_types[prop_id].append(prop_type)
|
prop_types[prop_id].append(prop_type)
|
||||||
if (prop_type & 0xfff) == 0x001e:
|
if (prop_type & 0xfff) == 0x001e:
|
||||||
|
@ -256,19 +254,15 @@ if __name__ == "__main__":
|
||||||
names[name] = prop_tag
|
names[name] = prop_tag
|
||||||
|
|
||||||
#sanitization: report multiple types for the same keynames
|
#sanitization: report multiple types for the same keynames
|
||||||
all_keys = prop_types.keys()
|
for prop_id, xtypes in prop_types.iteritems():
|
||||||
for prop_id in all_keys:
|
|
||||||
xtypes = prop_types[prop_id]
|
|
||||||
cnt = len(xtypes)
|
cnt = len(xtypes)
|
||||||
if cnt > 1:
|
if cnt > 1:
|
||||||
print "%d types available for prop id 0x%.4x: %s" % (cnt, prop_id, ", ".join(["%.4x" % x for x in xtypes]))
|
print "%d types available for prop id 0x%.4x: %s" % (cnt, prop_id, ", ".join(["%.4x" % x for x in xtypes]))
|
||||||
|
|
||||||
supported_properties = []
|
supported_properties = []
|
||||||
all_keys = names.keys()
|
|
||||||
current_getter_idx = 0
|
current_getter_idx = 0
|
||||||
highest_prop_idx = 0
|
highest_prop_idx = 0
|
||||||
for name in all_keys:
|
for name, prop_tag in names.iteritems():
|
||||||
prop_tag = names[name]
|
|
||||||
supported_properties.append(" 0x%.8x" % prop_tag);
|
supported_properties.append(" 0x%.8x" % prop_tag);
|
||||||
prop_idx = (prop_tag & 0xffff0000) >> 16
|
prop_idx = (prop_tag & 0xffff0000) >> 16
|
||||||
getters_idx[prop_idx] = " 0x%.4x" % current_getter_idx
|
getters_idx[prop_idx] = " 0x%.4x" % current_getter_idx
|
||||||
|
|
Loading…
Reference in a new issue