summaryrefslogtreecommitdiff
path: root/compat.c
Commit message (Collapse)AuthorAgeFilesLines
* Mark more pointers as constAlan Coopersmith2023-01-031-24/+23
| | | | | | Some suggested by cppcheck, others by manual code inspection Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Replace malloc()+bzero() pairs with calloc() callsAlan Coopersmith2022-12-111-2/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove unnecessary casts from bzero() callsAlan Coopersmith2022-12-111-5/+3
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove unnecessary checks for NULL pointers before calling free()Alan Coopersmith2022-12-111-6/+3
| | | | | | Not needed in C89 and later Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Replace uFree() with direct free() callsAlan Coopersmith2022-12-111-3/+3
| | | | | | | All these wrappers did was mess with types and add a test for NULL pointers that isn't needed in C89 and later. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Replace uAlloc() and uTypedAlloc() with direct malloc() callsAlan Coopersmith2022-12-111-1/+1
| | | | | | All these wrappers did was mess with types. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Variable scope reductionsAlan Coopersmith2022-12-111-18/+15
| | | | | | Some found by cppcheck, some found by manual code inspection Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove register keyword from variable declarationsAlan Coopersmith2022-12-101-3/+3
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* suppress four more warnings when 'warningLevel' is zeroBenno Schulenberg2022-07-111-1/+1
| | | | | | | | This addresses issue #20 some more. Reported-by: Vincent Lefevre Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
* Replace WARN[1-9], ERROR[1-9], etc. with their unnumbered versionPeter Hutterer2021-01-211-12/+12
| | | | | | | | | | | | Those macros date back to when varargs weren't a thing but they've been #defined to the same value for 17 years now. Patch generated with: for action in WARN INFO ERROR ACTION FATAL WSGO; do sed -i "s/${action}[1-9]/${action}/g" `git ls-files` done Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Remove trailing whitespacesPeter Hutterer2021-01-211-10/+10
| | | | | | Let's clean this up so I don't have to fight vim and git in removing them. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Fix many const char * warnings from gccAlan Coopersmith2013-11-011-1/+1
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
* compat: don't warn about redefinition when nothing is defined yetPeter Hutterer2013-08-291-1/+1
| | | | | | | info->groupCompat[i] is bzero'd on init, define is 0. Don't warn when that is the case, otherwise any "group 2 = ..." statement will cause an error. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* include resets group compatibility modifiers #43091Andreas Wettstein2011-12-061-2/+4
| | | | | | | | | This change makes sure that include does not overwrite previous compatibility modifier settings when the included files does not explicitly specify them. Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
* Interp: Allow explicit Any/NoSymbol mappingsDaniel Stone2011-06-211-2/+2
| | | | | | | | | | | | | | | | | | | | | Brown paper bag in full effect. The previous fix, while crushing the previous problem where an unknown keysym for an interp def would lead to every key matching it, also ignored explicit Any+AnyOfOrNone(All) mappings. Such as the one xkeyboard-config relied on for Control to actually update the modifier state. Fix this by allowing mappings explicitly declared as Any/NoSymbol, while ignoring only those with failed keysym lookups. Unfortunately, due to the structure of the parser, it's a deeply inelegant fix. Verified with a quick check of all layouts (albeit using default variants only) in xkeyboard-config that this results in no changes to the output at all, compared to xkbcomp 1.1.1. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Interp: Ignore NoSymbol definitionsDaniel Stone2011-06-211-0/+7
| | | | | | | | | | | | | | | | | | | | | A NoSymbol syminterp leads to a Any+AnyOfOrAll(None) definition, which is never what anyone would actually ever want in a sym interp. The failure mode here was: interpret XF86SomeKeysymYouDontHaveYet { action=Something() } leading to: interpret Any+AnyOfOrAll(None) { action=Something() } leading to every single non-action key triggering your shiny new action that was only supposed to come from a new keysym. At least you could VT switch or zap, I guess. Later, more invasive, revisions will bring a more useful error message. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Interp: Don't make modifier lookup failure fatalDaniel Stone2011-06-211-1/+1
| | | | | | | If we can't look up a modifier in a SymInterp declaration, don't make that fatal enough to kill the entire file, just ignore it and move on. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Correct make distcheck and most gcc and sparse warnings.Paulo Cesar Pereira de Andrade2009-01-211-0/+1
| | | | | | | | | | | | | | | | | | | | Remaining warnings are due to macros that check address or vectors on the stack and auto generated yacc code. Compiled with default flags and also as: % make CFLAGS=-DENTRY_TRACKING_ON -DDEBUG_ON -DASSERTIONS_ON to ensure the "simplification" of code like: foo.c: <hash>define DEBUG_VAR foo_VAR <hash>include "foo.h" ... foo.h: <hash>ifdef DEBUG_VAR_NOT_LOCAL extern <hash>endif int DEBUG_VAR; ... did not change the author's "intended" logic.
* sprintf -> snprintf conversionsAlan Coopersmith2008-09-051-2/+3
|
* Indent fixes.Peter Hutterer2008-08-121-607/+707
| | | | indent -cbi 0 -nprs -nut -npcs -i4 -bli 0 *.c *.h
* Remove RCS tags.Peter Hutterer2008-08-121-2/+0
|
* Bug #7645: Fix a conditional that always evaluates to FALSE.Adam Jackson2008-02-291-2/+1
| | | | Since it's if (0 || foo), simplify to if (foo).
* compat: avoid use of uninitialised variable (bug #8846)Etsushi Kato2006-11-081-1/+1
| | | | | si.interp.match may be unused, so just clobber it, which means we don't end up with stuff like LevelOneOnlyMask wandering in.
* Bug #4851: Fix up have-no-file test.Daniel Stone2006-04-031-1/+1
|
* Merging XORG-CURRENT into trunkXORG-6_7_99_904XORG-6_7_99_903XORG-6_7_99_902XORG-6_7_99_901XORG-6_7_99_2XORG-6_7_99_1XACE-SELINUX-MERGECOMPOSITEWRAPEgbert Eich2004-04-231-1/+1
|
* Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich2004-03-141-1/+1
|
* Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0STSF-CURRENTEgbert Eich2004-03-031-1/+1
|
* readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich2004-02-261-1/+1
|
* Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich2004-02-261-1/+1
|
* XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1Kaleb Keithley2003-11-141-134/+2
|
* R6.6 is the Xorg base-lineXORG-MAINKaleb Keithley2003-11-141-0/+913