CVS log for xc/programs/Xserver/hw/xfree86/parser/Video.c |
|
Help |
Request diff between arbitrary revisions
63. Fix a case where X server audit messages do not get printed (David Dawes).
62. Initialise the allocator even earlier in the X server startup, and use
it for the logging functions (David Dawes).
61. Parser option handling cleanups/fixes:
- Ensure that option data is allocated by the parser, rather than
externally allocated or static.
- Free replaced option data.
- Make xf86ParseOption's handling of multiple options of the same
name consistent with all other cases (last occurrence is used).
- Fix a bug in the handling of the Keyboard section "xleds" keyword.
(David Dawes).
283. First phase of dynamic configuration (David Dawes, S. Lussos,
Michael Dawes, J. D. Darling, X-Oz Technologies).
802. Licence update. (except client-side libraries)
Add/update copyright and license notices.
Almost revert patch that added EOL_TOKEN, now everything is handled in scan.c. Thanks to David Dawes for suggesting a very simpler way to handle comments. The addition of EOL_TOKEN had it's merits, but it is better to have the libxf68config parser completely backwards compatible, and the previous patch showed some problems when reading XF86Config files generated by hand. It doesn't always generate an identical file when writting back some files generated by hand, but no comments/contents are lost, and, once the file is written one time with libxf86config, subsequent reads and writes will generate the same contents.
o Added a new EOL_TOKEN to the parser, that is generated every time a new
line is read from the config file, and most times just ignored, but is
useful for configurations that may wish to know if all options are in
the same line.
o This patch also doesn't allow '#' in identifiers, before the patch, the
parser could get confused with input like "EndSection# comment".
o Fix potencial problem in xf86cfg, when changing inplace an option value,
it was also freeing it's comment but not setting the comment field to
NULL.
This is the second version of a patch to fix a problem described by
Mike Harris:
--
For example, if the original file contains:
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:nocaps"
#Option "XkbOptions" ""
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
#Option "XkbVariant" ""
After reading in with libxf86config and writing back out, it
looks like:
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:nocaps"
#Option "XkbOptions" ""
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "us" #Option "XkbVariant" ""
The '#Option "XkbVariant" ""' part moved to the previous
line.
--
Note that comments aren't guaranteed to be restored to the exact
format before being read by libxf86config, particularly, if an
explanation should be done for a given section, the comment must
be inside the section, for example:
--
# comment
Section "InputDevice"
...
--
when saving the file with libxf86config, '# comment' will be placed
in the start of the file, while:
--
Section "InputDevice"
# comment
...
--
will be correctly restored.
178. Fix some more mi build warnings (David Dawes).
177. Fix some mi build warnings (#4716-4719,4721-4724, Adam Sulmicki).
176. Port for Linux/SuperH (Jornada680/690 and SEGA Dreamcast) (#4680, 4681,
ISHIKAWA Mutsumi).
175. Support for mouse wheel emulation (#A.506, Henry T. So).
These changes should make the parser behaviour identical do before my previous commit and still keep saving comments.
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.
monitor-cfg.c: fixed bug when parsing several sync ranges fields separated
by commas.
parser/Monitor.c: changed the parser to allow muliple sync ranges in the
same line, and separated by commas, as specified in the
XF86Config man page.
parser/*.{c,h}: added check for duplicated Identifier lines.
Thanks to Andrew Ritger for pointing the problem in sync ranges parsing and
to Andy Isaacson for pointing the problem of multiple Identifier lines.
DRI.c modified to print the dri_mode field, and to call xf86freeBuffersList
from xf86freeDRI.
Device.c modified to print the dev_screen field as a number instead of a string.
Screen.c modified to print the disp_weight, displ_black and disp_white fields.
The fields are being printed with the format 0x%04x, comments or
corrections on this are welcome.
Vendor.c modified to correct tabulations in subsection, to call
xf86freeVendorSubList from xf86freeVendorList and to test the
vs_name subfield, and free it if not NULL.
Video.c modified to correct tabulations for VideoPort subsection.
read.c modified to add a call to xf86freeVendorList and xf86freeDRI in
xf86freeConfig.
1000. Fix parser not dup'ing a string (#4272, Paulo Cesar Pereira de Andrade).
999. Improve direct fifo writes for the glint/permedia3 pixmapwrite hook
when using FIFO disconnect (#4271, Sven Luther).
998. Fix a sprite problem with the "xwin" server (#4269, Suhaib M. Siddiqi).
997. Fix a confusing local typedef for "wchar_t' in xc/lib/X11/lcUTF8.c
(#4268, Bruno Haible).
996. Allow ProjectVar to override "/var" when set (based on #4266,
Bruno Haible).
775. Pass depth/bpp correctly, scan all fb devices, misc fb fixes.
(#4179, Michel Danzer).
774. Add generic Vesa driver, fixes for xf86cfg plus changes to parser to
reflect xf86cfg changes (#4174,#4175, Paulo Cesar Pereira de Andrade).
rework the config file searching and allow "safe" relative paths to be specified by non-root users. Fix the XINPUT mouse map change
Enable the new input code (NewInput) by default in xfree86.cf. Add compatibilty support for interpreting "Pointer" sections as "InputDevice" sections in the reworked input device code.
#2520-2527
|
Powered by ViewCVS 0.9.2 |