summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-04-22Assume target platforms have strncasecmp nowHEADmasterAlan Coopersmith2-25/+1
It has been required since Unix98/SUSv2 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/app/xmodmap/-/merge_requests/6>
2023-02-25Remove "All rights reserved" from Oracle copyright noticesAlan Coopersmith4-4/+4
Oracle no longer includes this term in our copyright & license notices. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-09gitlab CI: stop requiring Signed-off-by in commitsAlan Coopersmith1-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-10xmodmap 1.0.11xmodmap-1.0.11Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-17PrintModifierMapping: stop leaking the map returned by XGetKeyboardMappingAlan Coopersmith1-10/+17
Resolves issue reported by Oracle Parfait static analyzer: Error: Memory leak Memory leak [memory-leak] (CWE 401): Memory leak of pointer pointer allocated with XGetKeyboardMapping(...) at line 251 of app/xmodmap/exec.c in function 'PrintModifierMapping'. pointer allocated at line 222 with XGetKeyboardMapping(...) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-17handle.c: avoid leaks when realloc() failsAlan Coopersmith1-5/+30
Resolves issues reported by Oracle Parfait static analyzer: Error: Memory leak Memory leak [memory-leak] (CWE 401): Memory leak of pointer kclist allocated with malloc((n * 1)) at line 698 of app/xmodmap/handle.c in function 'do_remove'. kclist allocated at line 662 with malloc((n * 1)) kclist leaks when num_kcs != 0 at line 676 and (j + 1) >= num_kcs at line 687 and (nc + num_kcs) > tot at line 691 and (num_kcs - 1) < 0 at line 701. Memory leak [memory-leak] (CWE 401): Memory leak of pointer kclist allocated with malloc((n * 1)) at line 711 of app/xmodmap/handle.c in function 'do_remove'. kclist allocated at line 662 with malloc((n * 1)) kclist leaks when (i + 1) >= n at line 672. Error: Memory leak Memory leak [memory-leak] (CWE 401): Memory leak of pointer kclist allocated with realloc(kclist, (tot * 1)) at line 711 of app/xmodmap/handle.c in function 'do_remove'. kclist allocated at line 693 with realloc(kclist, (tot * 1)) kclist leaks when (num_kcs - 1) < 0 at line 701 and (i + 1) >= n at line 672. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-07Build xz tarballs instead of bzip2Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-07gitlab CI: add a basic build testAlan Coopersmith1-0/+98
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-03-16Fix warning about number of mouse buttonsKarl Fogel1-2/+10
Change a warning to distinguish between too few buttons and too many. Before this change: $ xmodmap -e "pointer = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15" Warning: Only changing the first 15 of 10 buttons. $ After this change: $ xmodmap -e "pointer = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15" Warning: Not changing 5 extra buttons beyond 10. $ Fixes: https://gitlab.freedesktop.org/xorg/app/xmodmap/issues/2 Signed-off-by: Karl Fogel <kfogel@red-bean.com>
2019-02-19xmodmap 1.0.10xmodmap-1.0.10Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-21Update configure.ac bug URL for gitlab migrationAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-16Update README for gitlab migrationAlan Coopersmith2-12/+5
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-07-09man: remove reference to the XKeysymDBWolfgang Pfeiffer1-2/+1
The XKeysymDB was removed around 2010 - please see: https://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=eb023c0f8919e809b8b609e1467b14d20a290aa7 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-05Change fall through comment in xmodmap.c to match gcc's requirementsAlan Coopersmith1-1/+1
Needs to match one of the regexps shown under https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/Warning-Options.html#index-Wimplicit-fallthrough Silences warning from gcc 7.3.0: xmodmap.c: In function ‘main’: xmodmap.c:358:10: warning: this statement may fall through [-Wimplicit-fallthrough=] arg[1] = tolower (arg[1]); ~~~~~~~^~~~~~~~~~~~~~~~~~ xmodmap.c:360:8: note: here case 's': ^~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-01-26autogen: add default patch prefixMihail Konev1-0/+3
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-26autogen.sh: use quoted string variablesEmil Velikov1-4/+4
Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent fall-outs, when they contain space. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-26autogen.sh: use exec instead of waiting for configure to finishPeter Hutterer1-1/+1
Syncs the invocation of configure with the one from the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2015-07-20Properly hide config.h behind HAVE_CONFIG_H.Matthew Green1-0/+3
Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-04-17xmodmap 1.0.9xmodmap-1.0.9Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-08-01Remove unneeded casts on malloc, realloc, and free callsAlan Coopersmith2-17/+15
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-08-01Avoid null pointer use if malloc() failsAlan Coopersmith1-0/+3
Error: Null pointer dereference (CWE 476) Read from null pointer str at line 282 of handle.c in function 'parse_number'. Function copy_to_scratch may return constant 'NULL' at line 98, called at line 875 in function 'do_pointer'. Constant 'NULL' passed into function parse_number, argument str, from call at line 876. Null pointer introduced at line 98 in function 'copy_to_scratch'. [ This bug was found by the Parfait 1.4.0 bug checking tool. http://labs.oracle.com/pls/apex/f?p=labs:49:::::P49_PROJECT_ID:13 ] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-01Print which option was in error along with usage messageAlan Coopersmith2-12/+28
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-05-31Add -version option to print program versionAlan Coopersmith2-0/+11
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-05-31autogen.sh: Honor NOCONFIGURE=1Alan Coopersmith1-2/+3
See http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-05-31configure: Drop AM_MAINTAINER_MODEAlan Coopersmith2-2/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-09-08xmodmap 1.0.8xmodmap-1.0.8Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-09-08Add missing copyright dates from xmodmap.man to COPYINGAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-09-06Allow printing -help & -grammar messages without a valid DISPLAYAlan Coopersmith1-13/+26
If a user just wants to see syntax hints, don't require XOpenDisplay() to succeed when we're not going to use it. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-06-30error in manpage example about swapping Control_L/Caps_Lock keysStéphane Aulery1-1/+1
Reported by Luca Capello at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=641588 Signed-off-by: Luca Capello <luca@pca.it> Signed-off-by: Stéphane Aulery <lkppo@free.fr> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-11-05Include X11/Xwindows.h on WIN32Jon TURNEY1-0/+4
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
2012-04-27include config.h before stdio.h & other system headersAlan Coopersmith3-0/+12
Ensures definitions like _GNU_SOURCE are visible when needed. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-20xmodmap 1.0.7xmodmap-1.0.7Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-04-17Add AC_USE_SYSTEM_EXTENSIONS to expose asprintf() in GNU libc headersAlan Coopersmith1-0/+2
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=48696 Reported-by: Dominique Leuenberger Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2012-04-14config: Add missing AC_CONFIG_SRCDIRAlan Coopersmith1-2/+5
Regroup AC statements under the Autoconf initialization section. Regroup AM statements under the Automake initialization section. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-22xmodmap 1.0.6xmodmap-1.0.6Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-11-16Replace chk_malloc + sprintf with asprintfAlan Coopersmith3-17/+59
Includes local private copy of asprintf for OS'es without it in libc. Removes chk_malloc as no callers remain anymore. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-16Free copy of input line at end of process_line instead of leaking itAlan Coopersmith1-2/+6
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-16Fix gcc -Wwrite-strings warningsAlan Coopersmith6-15/+18
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-11Add missing _X_NORETURN to functions that need itJeremy Huddleston2-1/+4
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-11Include strings.h for strcasecmpJeremy Huddleston1-0/+4
Our minimum requirement for X11 is currently Unix98. Unix98 provides strcasecmp in <strings.h>. This commit fixes implicit declarations of this function on systems that closely adhere to the standard. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-07Improve error handling in copy_to_scratchJeremy Huddleston1-5/+10
handle.c:95:5: warning: Array access (from variable 'buf') results in a null pointer dereference buf[len] = '\0'; ^~~ Found-by: clang static analyzer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-07Dead code removalJeremy Huddleston1-1/+0
xmodmap.c:159:5: warning: Value stored to 'status' is never read status = 0; ^ ~ Found-by: clang static analyzer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-03-04man: replace hard coded section with __appmansuffix__Gaetan Nadon1-1/+1
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-12config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERSGaetan Nadon1-1/+1
This silences an Autoconf warning
2010-10-06Purge cvs tags.Jesse Adkins7-16/+0
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
2010-09-24xmodmap 1.0.5xmodmap-1.0.5Alan Coopersmith1-1/+4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-24man page: Add setxkbmap & XStringToKeysym to the See Also listAlan Coopersmith1-1/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-24config: Remove unnecessary calls from configure.acAlan Coopersmith1-6/+0
AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now PKG_CONFIG_MODULES handles AC_SUBST of the CFLAGS & LIBS variables Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-24config: update AC_PREREQ statement to 2.60Gaetan Nadon1-1/+1
Unrelated to the previous patches, the new value simply reflects the reality that the minimum level for autoconf to configure all x.org modules is 2.60 dated June 2006. ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-09-21Sun's copyrights now belong to OracleAlan Coopersmith2-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>