summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-05-05BSD MakefileobsdMatthieu Herrb
2024-04-22Assume target platforms have strncasecmp nowHEADmasterAlan Coopersmith
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 Coopersmith
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 Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-10xmodmap 1.0.11xmodmap-1.0.11Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-17PrintModifierMapping: stop leaking the map returned by XGetKeyboardMappingAlan Coopersmith
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 Coopersmith
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 Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-07gitlab CI: add a basic build testAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-03-16Fix warning about number of mouse buttonsKarl Fogel
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 Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-21Update configure.ac bug URL for gitlab migrationAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-16Update README for gitlab migrationAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-07-09man: remove reference to the XKeysymDBWolfgang Pfeiffer
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 Coopersmith
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 Konev
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-26autogen.sh: use quoted string variablesEmil Velikov
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 Hutterer
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 Green
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 Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-08-01Remove unneeded casts on malloc, realloc, and free callsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-08-01Avoid null pointer use if malloc() failsAlan Coopersmith
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 Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-05-31Add -version option to print program versionAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-05-31autogen.sh: Honor NOCONFIGURE=1Alan Coopersmith
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 Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-09-08xmodmap 1.0.8xmodmap-1.0.8Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-09-08Add missing copyright dates from xmodmap.man to COPYINGAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-09-06Allow printing -help & -grammar messages without a valid DISPLAYAlan Coopersmith
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 Aulery
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 TURNEY
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 Coopersmith
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 Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-04-17Add AC_USE_SYSTEM_EXTENSIONS to expose asprintf() in GNU libc headersAlan Coopersmith
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 Coopersmith
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 Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-11-16Replace chk_malloc + sprintf with asprintfAlan Coopersmith
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 Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-16Fix gcc -Wwrite-strings warningsAlan Coopersmith
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 Huddleston
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-11Include strings.h for strcasecmpJeremy Huddleston
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 Huddleston
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 Huddleston
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 Nadon
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-12config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERSGaetan Nadon
This silences an Autoconf warning
2010-10-06Purge cvs tags.Jesse Adkins
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
2010-09-24xmodmap 1.0.5xmodmap-1.0.5Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-24man page: Add setxkbmap & XStringToKeysym to the See Also listAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-24config: Remove unnecessary calls from configure.acAlan Coopersmith
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 Nadon
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>