projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78f72d7
)
util: Allow '#' comments in u_format.csv.
author
José Fonseca
<jfonseca@vmware.com>
Wed, 24 Feb 2010 13:47:42 +0000
(13:47 +0000)
committer
José Fonseca
<jfonseca@vmware.com>
Wed, 24 Feb 2010 15:45:28 +0000
(15:45 +0000)
src/gallium/auxiliary/util/u_format_parse.py
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_format_parse.py
b/src/gallium/auxiliary/util/u_format_parse.py
index 5d49fc7652b82e774d982b1dff4e474604454422..37336029d8903424853f7ae1b3f1daf27244433c 100755
(executable)
--- a/
src/gallium/auxiliary/util/u_format_parse.py
+++ b/
src/gallium/auxiliary/util/u_format_parse.py
@@
-137,7
+137,15
@@
def parse(filename):
stream = open(filename)
formats = []
for line in stream:
- line = line.rstrip()
+ try:
+ comment = line.index('#')
+ except ValueError:
+ pass
+ else:
+ line = line[:comment]
+ line = line.strip()
+ if not line:
+ continue
fields = [field.strip() for field in line.split(',')]
name = fields[0]
layout = fields[1]