CVS log for xc/programs/Xserver/hw/xfree86/parser/xf86Optrec.h |
|
Help |
Request diff between arbitrary revisions
Summary: Changed parser to read and restore comments. Basically it will save all global comments and when rewriting the file, write then at the top of the file. Example: -- # comment Section .. -- is correctly written, but -- # comment 1 Section ... # comment 2 -- is written back as: -- # comment 1 # comment 2 Section ... -- the same happens to comments inside a section. Comments for "Option", "Load" (Section Modules), "LoadDriver" (Section Modules), and "Buffers" (Section DRI) will be appended to the end of the line. Notes: o When the token COMMENT is returned, val.str is not a newly allocated string, so it should be used as an argument to xf86addComment. o Comments generated by xf86addComment are guaranteed to start with '#', with optional leading ' ' or '\t', and also guaranteed to end with an '\n'. o xf86parseOption and xf86printOptionList are helper functions, to avoid too much duplicated code, and also correctly handle comments for options. Wishlist: o It could also be written in a new way, to save from where a global comment came, so that it can be restored "before" printing the associated "Section". The same may be done inside "Section"s. o It may be also be changed to store comments like: Identifier "ident" # some comment but that would require a comment field for every structure field. o It may even be changed to add blank lines as comments, but would need the previous wishlists implemented.
|
Powered by ViewCVS 0.9.2 |