CVSROOT: /home/x-cvs
Module name: xc
Changes by: [EMAIL PROTECTED] 03/01/01 11:22:25
Log message:
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.
Modified files:
xc/programs/Xserver/hw/xfree86/parser/:
DRI.c Device.c Files.c Flags.c Input.c Keyboard.c
Layout.c Module.c Monitor.c Pointer.c Screen.c Vendor.c
Video.c read.c scan.c xf86tokens.h
xc/programs/Xserver/hw/xfree86/xf86cfg/:
keyboard-cfg.c
Revision Changes Path
1.13 +3 -1 xc/programs/Xserver/hw/xfree86/parser/DRI.c
1.25 +3 -1 xc/programs/Xserver/hw/xfree86/parser/Device.c
1.14 +3 -1 xc/programs/Xserver/hw/xfree86/parser/Files.c
1.21 +3 -1 xc/programs/Xserver/hw/xfree86/parser/Flags.c
1.12 +3 -1 xc/programs/Xserver/hw/xfree86/parser/Input.c
1.14 +3 -1 xc/programs/Xserver/hw/xfree86/parser/Keyboard.c
1.21 +5 -1 xc/programs/Xserver/hw/xfree86/parser/Layout.c
1.10 +4 -1 xc/programs/Xserver/hw/xfree86/parser/Module.c
1.26 +7 -1 xc/programs/Xserver/hw/xfree86/parser/Monitor.c
1.11 +3 -1 xc/programs/Xserver/hw/xfree86/parser/Pointer.c
1.23 +5 -1 xc/programs/Xserver/hw/xfree86/parser/Screen.c
1.15 +5 -1 xc/programs/Xserver/hw/xfree86/parser/Vendor.c
1.11 +5 -1 xc/programs/Xserver/hw/xfree86/parser/Video.c
1.22 +3 -1 xc/programs/Xserver/hw/xfree86/parser/read.c
1.23 +6 -2 xc/programs/Xserver/hw/xfree86/parser/scan.c
1.18 +2 -1 xc/programs/Xserver/hw/xfree86/parser/xf86tokens.h
1.22 +3 -1 xc/programs/Xserver/hw/xfree86/xf86cfg/keyboard-cfg.c
_______________________________________________
Cvs-commit mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/cvs-commit