From: Ian R. <id...@us...> - 2003-05-15 16:25:59
|
Felix K=FChling wrote: > I have the libGL part working now. I also wrote a small xdriinfo progra= m > as described in the design doc. Now I'm working on some Python code tha= t > uses xdriinfo for getting dri configuration information. While writing = a > parser for the dri configuration information in Python (using Python's > expat bindings) I came across two issues: That's great news! > 1. There should one element around all <section>...</section> elements > in order to make the whole thing a well formed XML document. Right. Have you picked something yet? <graphicsconfig> perhaps? > 2. Negative numbers in ranges are a bit ugly. E.g.: >=20 > <option name=3D"foo" type=3D"float" default=3D"-1" valid=3D"-1.5--0.= 5"/> >=20 > There is no ambiguity with 2. It just makes the parser a bit more > complicated (at least in Python) and it is a bit hard to read. You had > suggested to use ".." instead of "-" before. But then you'd have to be > careful not to confuse this with decimal points. What about using ":" > instead? >=20 > <option name=3D"foo" type=3D"float" default=3D"-1" valid=3D"-1.5:-0.= 5"/> >=20 > or with multiple ranges: >=20 > <option name=3D"foo" type=3D"float" default=3D"-1" valid=3D"-1.5:-0.= 5,0.5:1.5"/> Using ':' would be a good choices. Another option would be to use ','=20 and use ';' to separate multiple ranges. > One more thing, I'd like to rename driConfigOptions to > __driConfigOptions. This matches the naming convention of > __driCreateScreen which is also obtained using dlsym in libGL. Using the __ seems to be the standard way to "obfucate" our internal=20 symbols that have to be exported. |