summaryrefslogtreecommitdiff
path: root/xkb/xkbfmisc.c
AgeCommit message (Collapse)AuthorFilesLines
2012-03-21Introduce a consistent coding styleKeith Packard1-304/+320
This is strictly the application of the script 'x-indent-all.sh' from util/modular. Compared to the patch that Daniel posted in January, I've added a few indent flags: -bap -psl -T PrivatePtr -T pmWait -T _XFUNCPROTOBEGIN -T _XFUNCPROTOEND -T _X_EXPORT The typedefs were needed to make the output of sdksyms.sh match the previous output, otherwise, the code is formatted badly enough that sdksyms.sh generates incorrect output. The generated code was compared with the previous version and found to be essentially identical -- "assert" line numbers and BUILD_TIME were the only differences found. The comparison was done with this script: dir1=$1 dir2=$2 for dir in $dir1 $dir2; do (cd $dir && find . -name '*.o' | while read file; do dir=`dirname $file` base=`basename $file .o` dump=$dir/$base.dump objdump -d $file > $dump done) done find $dir1 -name '*.dump' | while read dump; do otherdump=`echo $dump | sed "s;$dir1;$dir2;"` diff -u $dump $otherdump done Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-11-23Mark XKB char * as const to clean up gcc -Wwrite-strings warningsAlan Coopersmith1-1/+1
Cleans up around 120 warnings from this set Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-06xkb: Fix case checks for Latin 4.Cyril Brulebois1-1/+2
That one was missing _XkbKSLower: XK_kra: U+0138 LATIN SMALL LETTER KRA Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-06-06xkb: Fix case checks for Latin 2.Cyril Brulebois1-1/+1
Those ones were getting _XkbKSLower for no reasons: XK_ogonek: U+02DB OGONEK XK_doubleacute: U+02DD DOUBLE ACUTE ACCENT Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-06-06xkb: Fix case checks for Latin 1.Cyril Brulebois1-1/+1
That one was missing _XkbKSLower: XK_ssharp: U+00DF LATIN SMALL LETTER SHARP S That one was getting _XkbKSLower for no reasons: XK_division: U+00F7 DIVISION SIGN For reference, XK_multiply was already excluded from the _XkbKSUpper check, it's no big surprise XK_division has to be excluded from the _XkbKSLower check. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-06-03xkb: Fix case checks for Latin 8.Cyril Brulebois1-15/+26
Spotted by -Wlogical-op: | CC xkbfmisc.lo | xkbfmisc.c: In function '_XkbKSCheckCase': | xkbfmisc.c:104:3: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op] | xkbfmisc.c:118:3: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op] A quick look at the keysymdef.h file (from xproto) suggests the implementor chose to use interval checks to determine the case, but since lines weren't sorted by codepoints, checks were quite wrong. Implement _XkbKSUpper/_XkbKSLower checks based on a grep for CAPITAL/SMALL (respectively) on the Latin 8 part of the said file. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-02-15Replace _XkbDupString with XstrdupAlan Coopersmith1-5/+5
The two functions have identical semantics, including safely returning NULL when NULL is passed in (which POSIX strdup does not guarantee). Some callers could probably be adjusted to call libc strdup directly, when we know the input is non-NULL. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-06-10Remove unnecessary parentheses around return values in functionsMikhail Gusarov1-1/+1
This patch was generated by the following Perl code: perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;' Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-02xkb: sed True -> TRUE and False -> FALSEPeter Hutterer1-19/+19
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-01-25xkb: remove XkbAtomGetString, replace with NameForAtom.Peter Hutterer1-5/+5
XKB really XKBdoes not XKBneed its own XKBdefines for XKBeverything. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-15xkb: Remove XKMformat.h include from xkbsrv.h into the files that need it.Peter Hutterer1-0/+1
xkbsrv.h is used by drivers, they don't need the XKM format and shouldn't require it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-03Constify atom name stringsAlan Coopersmith1-1/+1
Changes MakeAtom to take a const char * and NameForAtom to return them, since many callers pass pointers to constant strings stored in read-only ELF sections. Updates in-tree callers as necessary to clear const mismatch warnings introduced by this change. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22XKB: Simplify keymap writing a bitDaniel Stone1-20/+14
We don't need no temporary variable. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-01-22XKB: Remove support for setting combined keymapsDaniel Stone1-24/+1
We don't do full keymaps anymore. Deal. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-12Remove #define NEED_EVENTS and NEED_REPLIESPeter Hutterer1-1/+0
A grep on xorg/* revealed there's no consumer of this define. Quote Alan Coopersmith: "The consumer was in past versions of the headers now located in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h, all the event definitions were only available if NEED_EVENTS were defined, and all the reply definitions required NEED_REPLIES. Looks like Xproto.h dropped them by X11R6.3, which didn't have the #ifdef's anymore, so these are truly ancient now." Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade1-6/+6
Save in a few special cases, _X_EXPORT should not be used in C source files. Instead, it should be used in headers, and the proper C source include that header. Some special cases are symbols that need to be shared between modules, but not expected to be used by external drivers, and symbols that are accessible via LoaderSymbol/dlopen. This patch also adds conditionally some new sdk header files, depending on extensions enabled. These files were added to match pattern for other extensions/modules, that is, have the headers "deciding" symbol visibility in the sdk. These headers are: o Xext/panoramiXsrv.h, Xext/panoramiX.h o fbpict.h (unconditionally) o vidmodeproc.h o mioverlay.h (unconditionally, used only by xaa) o xfixes.h (unconditionally, symbols required by dri2) LoaderSymbol and similar functions now don't have different prototypes, in loaderProcs.h and xf86Module.h, so that both headers can be included, without the need of defining IN_LOADER. xf86NewInputDevice() device prototype readded to xf86Xinput.h, but not exported (and with a comment about it).
2008-11-29Export symbols defined in the sdk.Paulo Cesar Pereira de Andrade1-6/+6
This is the biggest "visibility" patch. Instead of doing a "export" symbol on demand, export everything in the sdk, so that if some module fails due to an unresolved symbol, it is because it is using a symbol not in the sdk. Most exported symbols shouldn't really be made visible, neither advertised in the sdk, as they are only used by a single shared object. Symbols in the sdk (or referenced in sdk macros), but not defined anywhere include: XkbBuildCoreState() XkbInitialMap XkbXIUnsupported XkbCheckActionVMods() XkbSendCompatNotify() XkbDDXFakePointerButton() XkbDDXApplyConfig() _XkbStrCaseCmp() _XkbErrMessages[] _XkbErrCode _XkbErrLocation _XkbErrData XkbAccessXDetailText() XkbNKNDetailMaskText() XkbLookupGroupAndLevel() XkbInitAtoms() XkbGetOrderedDrawables() XkbFreeOrderedDrawables() XkbConvertXkbComponents() XkbWriteXKBSemantics() XkbWriteXKBLayout() XkbWriteXKBKeymap() XkbWriteXKBFile() XkbWriteCFile() XkbWriteXKMFile() XkbWriteToServer() XkbMergeFile() XkmFindTOCEntry() XkmReadFileSection() XkmReadFileSectionName() InitExtInput() xf86CheckButton() xf86SwitchCoreDevice() RamDacSetGamma() RamDacRestoreDACValues() xf86Bpp xf86ConfigPix24 xf86MouseCflags[] xf86SupportedMouseTypes[] xf86NumMouseTypes xf86ChangeBusIndex() xf86EntityEnter() xf86EntityLeave() xf86WrapperInit() xf86RingBell() xf86findOptionBoolean() xf86debugListOptions() LoadSubModuleLocal() LoaderSymbolLocal() getInt10Rec() xf86CurrentScreen xf86ReallocatePciResources() xf86NewSerialNumber() xf86RandRSetInitialMode() fbCompositeSolidMask_nx1xn fbCompositeSolidMask_nx8888x0565C fbCompositeSolidMask_nx8888x8888C fbCompositeSolidMask_nx8x0565 fbCompositeSolidMask_nx8x0888 fbCompositeSolidMask_nx8x8888 fbCompositeSrc_0565x0565 fbCompositeSrc_8888x0565 fbCompositeSrc_8888x0888 fbCompositeSrc_8888x8888 fbCompositeSrcAdd_1000x1000 fbCompositeSrcAdd_8000x8000 fbCompositeSrcAdd_8888x8888 fbGeneration fbIn fbOver fbOver24 fbOverlayGeneration fbRasterizeEdges fbRestoreAreas fbSaveAreas composeFunctions VBEBuildVbeModeList() VBECalcVbeModeIndex() TIramdac3030CalculateMNPForClock() shadowBufPtr shadowFindBuf() miRRGetScreenInfo() RRSetScreenConfig() RRModePruneUnused() PixmanImageFromPicture() extern int miPointerGetMotionEvents() miClipPicture() miRasterizeTriangle() fbPush1toN() fbInitializeBackingStore() ddxBeforeReset() SetupSprite() InitSprite() DGADeliverEvent() SPECIAL CASES o defined as _X_INTERNAL xf86NewInputDevice() o defined as static fbGCPrivateKey fbOverlayScreenPrivateKey fbScreenPrivateKey fbWinPrivateKey o defined in libXfont.so, but declared in xorg/dixfont.h GetGlyphs() QueryGlyphExtents() QueryTextExtents() ParseGlyphCachingMode() InitGlyphCaching() SetGlyphCachingMode()
2008-03-04XKB: Fix initial map setting on startupDaniel Stone1-3/+21
Due to an unwitting sense inversion when eliminating XkbFileInfo, we were setting the complete wrong keymap on startup (non-XKB map if we had an XKB map available, or the XKB map if we didn't have any available). Invert the sense properly, and add two small bits that also went missing in that commit.
2008-02-17XKB: Ditch XkbFileInfoDaniel Stone1-91/+7
Sorry about the megacommit, but this touches on a lot of stuff. Get rid of XkbFileInfo, which was pretty seriously redundant, and move the only useful thing it had (defined) into XkbDescRec. defined will be removed pretty soon anyway. Is the compat map pointer non-NULL? Then you have a compat map, congratulations! Anyhow, I digress. All functions that took an XkbFileInfoPtr now take an XkbDescPtr, _except_ XkmReadFile, which returns an XkbDescPtr *, because people want to deal in XkbDescPtrs, not XkbDescRecs.
2008-02-17XKB: Remove usage of client-side typesDaniel Stone1-6/+5
Since we're no longer sharing with Xlib, don't pass Displays and XPointers everywhere.
2008-02-17XKB: Move headers into the server treeDaniel Stone1-2/+2
We need to start breaking the XKB API to enforce sanity, so drag whichever headers we need to do so into the server tree, as the client API is set in stone, being part of Xlib.
2007-03-20Static markup and dead code cull over xkb/.Adam Jackson1-108/+1
The former <X11/extensions/XKBsrv.h> has been pulled into the server now as include/xkbsrv.h, and the world updated to look for it in the new place, since it made no sense to define server API in an extension header. Any further work along this line will need to do similar things with XKBgeom.h and friends.
2006-07-28Revert xkb changes that broke XkbGetKeyboard()Kevin E Martin1-20/+417
2006-07-21Remove RCS tags. Fix Xprint makefile braindamage.Adam Jackson1-2/+0
2006-07-08Bug #7097: do case-insensitive comparison for some hotkeys.Tilman Sauerbeck1-16/+0
xkb's strcasecmp implementation has been moved to the dix so it's now safe to just use strcasecmp().
2006-03-31Simplify XkbWriteXKBKeymapForNames a bit, and remove debug spew.Daniel Stone1-26/+10
2006-03-27Prune XKB code to only what we need to run the server. Remove deadDaniel Stone1-425/+29
!XKB_IN_SERVER codepaths. Remove HAVE_CONFIG_H codepaths.
2006-03-27Fix remnants of previous busted _XkbStrCaseCmp commit.Daniel Stone1-0/+16
2006-03-25Bug #3819: Remove open-coding of strcasecmp.Daniel Stone1-28/+0
2005-07-03Fix more include paths; add dix-config.h to XKB code.Daniel Stone1-7/+6
2005-07-03Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.Daniel Stone1-0/+4
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings. Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all source files in the xserver/xorg tree, predicated on defines of HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to <X11/fonts/foo.h>.
2005-06-13Add xkbfile to symlink.sh, conditionally include "config.h" inSøren Sandmann Pedersen1-0/+3
xc/lib/xkbfile
2004-04-23Merging XORG-CURRENT into trunkEgbert Eich1-1/+1
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich1-1/+1
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0Egbert Eich1-1/+1
2004-02-26readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich1-1/+1
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich1-1/+1
2003-11-25XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16Kaleb Keithley1-92/+3
2003-11-14XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1Kaleb Keithley1-11/+67
2003-11-14R6.6 is the Xorg base-lineXORG-MAINKaleb Keithley1-0/+716