summaryrefslogtreecommitdiff
path: root/listing.c
Commit message (Collapse)AuthorAgeFilesLines
* Mark more pointers as constAlan Coopersmith2023-01-031-4/+4
| | | | | | Some suggested by cppcheck, others by manual code inspection Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Only build debug infrastructure if DEBUG is definedAlan Coopersmith2023-01-031-0/+2
| | | | | | | It's only used when DEBUG is defined, so don't build it when we're not using it. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Mark more functions and variables staticAlan Coopersmith2023-01-031-1/+1
| | | | | | | Stop exporting things that aren't used outside the file that defines them. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove #ifdef sgi sectionsAlan Coopersmith2023-01-031-4/+0
| | | | | | | They just included an additional malloc.h header, but SGI Irix has been unsupported for a decade now. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Use asprintf() if the platform supports itAlan Coopersmith2023-01-031-2/+8
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Replace uFree() with direct free() callsAlan Coopersmith2022-12-111-2/+2
| | | | | | | 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 uTypedRealloc() with direct reallocarray() callsAlan Coopersmith2022-12-111-2/+2
| | | | | | | Falls back to realloc() if platform doesn't offer reallocarray(). Also removes uRealloc() since it had no other uses. 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-11/+8
| | | | | | 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-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Replace WARN[1-9], ERROR[1-9], etc. with their unnumbered versionPeter Hutterer2021-01-211-6/+6
| | | | | | | | | | | | 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-13/+13
| | | | | | 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>
* Define WIN32_LEAN_AND_MEAN when building on Win32Jon TURNEY2015-04-091-0/+1
| | | | | | | | | | | w32api/rpcnndr.h (included by windows.h) uses TypeString as the name of a structure member. xkbcomp.h defines it as a macro for a constant. Define WIN32_LEAN_AND_MEAN to avoid this clash. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: David Macek <david.macek.0@gmail.com>
* Initialize nMatch even if WIN32 is definedAlan Coopersmith2014-03-101-1/+1
| | | | | | | | | | Flagged by cppcheck 1.64: Checking app/xkbcomp/listing.c: WIN32... [app/xkbcomp/listing.c:335]: (error) Uninitialized variable: nMatch Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
* Convert remaining sprintf calls to snprintfAlan Coopersmith2013-11-011-4/+5
| | | | | | | | | Most were fixed length or length checked anyway, this just saves time doublechecking that. (A few could be replaced by asprintf, but we don't have a copy guaranteed to be reachable from this program yet.) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
* Include Xwindows.h rather than windows.hRyan Pavlik2012-11-051-1/+1
| | | | | | | | | | Include the specially wrapped windows.h in Xwindows.h, rather than including it directly to avoid compilation errors due to clashing definitions Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* Correct make distcheck and most gcc and sparse warnings.Paulo Cesar Pereira de Andrade2009-01-211-1/+2
| | | | | | | | | | | | | | | | | | | | 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.
* Remove X_NOT_POSIX #ifdefsAlan Coopersmith2008-09-051-27/+12
| | | | POSIX.1-1990 is well below the current minimum bar
* Indent fixes.Peter Hutterer2008-08-121-226/+276
| | | | indent -cbi 0 -nprs -nut -npcs -i4 -bli 0 *.c *.h
* Remove RCS tags.Peter Hutterer2008-08-121-3/+0
|
* Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 Addedsco_port_update-baseXORG-6_8_99_903XORG-6_8_99_902XORG-6_8_99_901XORG-6_8_99_900XORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_7XORG-6_8_99_6XORG-6_8_99_5XORG-6_8_99_4XORG-6_8_99_3XORG-6_8_99_2XORG-6_8_99_16XORG-6_8_99_15XORG-6_8_99_14XORG-6_8_99_13XORG-6_8_99_12XORG-6_8_99_11XORG-6_8_99_10XORG-6_8_99_1sco_port_updateAlexander Gottwald2004-11-151-5/+5
| | | | mingw (Win32) port
* 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-42/+4
|
* R6.6 is the Xorg base-lineXORG-MAINKaleb Keithley2003-11-141-0/+500