summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-06-03xrdb 1.2.2HEADxrdb-1.2.2masterAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-16configure: raise minimum autoconf requirement to 2.70Alan Coopersmith1-1/+1
Needed for builds on NetBSD to work correctly, since it depends on AC_USE_SYSTEM_EXTENSIONS defining _OPENBSD_SOURCE to expose the prototype for reallocarray() in the system headers. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-13Fallback asprintf: don't truncate output that has a \0 in stringAlan Coopersmith1-13/+12
Unlikely to be hit in xrdb, but may affect other uses if this code gets copied to other programs. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-13Rename variable 'dup' to avoid shadowing dup() functionAlan Coopersmith1-6/+6
As recommended by cppcheck Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-13Use C99 struct initializationAlan Coopersmith1-11/+14
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-13Variable scope reduction as recommended by cppcheckAlan Coopersmith1-52/+51
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-13gitlab CI: stop requiring Signed-off-by in commitsAlan Coopersmith1-2/+2
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>
2021-08-09xrdb 1.2.1xrdb-1.2.1Matthieu Herrb1-1/+1
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2021-06-26fix assignment discards ‘const’ qualifierWalter Harms1-1/+1
xrdb.c: In function ‘main’: xrdb.c:1071:52: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] cmd_defines[num_cmd_defines++] = "-undef"; Signed-off-by: Walter Harms <wharms@bfs.de>
2021-06-26XFree() can handle NULL argWalter Harms1-1/+1
Signed-off-by: Walter Harms <wharms@bfs.de>
2021-06-26Add actual querying capabilitiesWalter Harms2-1/+28
The world is littered with broken grep commands because `xrdb -query` can only dump the database and doesn't implement this simple search feature. This patch adds a new `-get` option to search and print the content of a single property by name. Signed-off-by: Michele Guerini Rocco <rnhm...@inventati.org> Reviewed-by: Walter Harms <wharms@bfs.de> Signed-off-by: Walter Harms <wharms@bfs.de>
2020-06-07Fix out of boundary read.Tobias Stoeckmann1-0/+2
If a binary file which starts with 0x00 is edited, xrdb performs an off-by-one read outside of its buffer. The fix is simple: Do not try to append an empty string to buffer, which would be a no-op anyway. Proof of Concept (compile with -fsanitize=address): $ dd if=/dev/zero bs=1 count=1 of=poc.txt $ xrdb -edit poc.txt Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2019-02-19xrdb 1.2.0xrdb-1.2.0Alan 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 Coopersmith3-26/+19
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-03-24Add -E flag to show cpp command line & processed input fileAlan Coopersmith2-0/+22
https://bugs.freedesktop.org/show_bug.cgi?id=98300 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-03-09xrdb 1.1.1xrdb-1.1.1Alan Coopersmith1-1/+1
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-09-05Use reallocarray() for array allocations & resizingAlan Coopersmith2-7/+34
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
2015-04-24Fix "editting" typo in commentAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-04-24Reformat code to X.Org standard coding styleAlan Coopersmith1-734/+800
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-11-08Use SEEK_* names instead of raw numbers for fseek whence argumentAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-03Print which option was in error along with usage messageAlan Coopersmith2-11/+16
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-03unifdef -U__UNIXOS2__Alan Coopersmith1-19/+0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-03Stop casting free() arguments to (char *)Alan Coopersmith1-3/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-03Clean up sign/size conversion warnings from clangAlan Coopersmith1-27/+27
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-03Remove unused macro RESOURCE_PROPERTY_NAMEAlan Coopersmith1-1/+0
Flagged by clang: xrdb.c:92:9: warning: macro is not used [-Wunused-macros] ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-03configure: add more m4 quoting to quiet autoconf complaintsAlan Coopersmith1-4/+4
Gets rid of these warnings: configure.ac:54: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from... ../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from... configure.ac:54: the top level configure.ac:61: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from... ../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from... configure.ac:61: the top level Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-03autogen.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-06-03configure: Drop AM_MAINTAINER_MODEAlan Coopersmith2-2/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-09-08xrdb 1.1.0xrdb-1.1.0Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-22Add -version flag to print package version string from autoconfAlan Coopersmith2-0/+9
Also adds missing entry for -help flag to usage message. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-By: Matt Dew <marcoz@osource.org>
2013-07-20Only add -P flag if using cpp as our preprocessorAlan Coopersmith1-7/+18
Restores ability to use m4 (broken in xrdb-1.0.8 by commit 117021570515f) Fixes https://bugs.freedesktop.org/show_bug.cgi?id=34546 Reviewed-by: <wharms@bfs.de> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-19predefined cpp macros can produce unexpected results (bug 3413)Matthieu Herrb2-1/+15
GNU cpp is predefining a number of symbols, depending on the host and target architecture. This can produce some unexpected results: for example, the expansion of CLIENTHOST if the host name is i386.my.domain. The attached patch creates a new -undef option to xrdb that is passed to cpp. Acked-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-06Rename args to several functions to not shadow global variablesAlan Coopersmith1-20/+20
Renamed "buffer" to "b" and "dpy" to "display" to match common patterns in other functions in xrdb.c Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-06Mark fatal() & Syntax() with printf & noreturn attributesAlan Coopersmith2-3/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-06Strip trailing whitespaceAlan Coopersmith3-39/+39
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-06Remove unnecessary casts from malloc & realloc callsAlan Coopersmith1-11/+10
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-06Fix many const pointer warningsAlan Coopersmith1-25/+23
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-06Ensure we don't read out of ClassName array bounds for unknown visual typeAlan Coopersmith1-6/+22
Should never happen, but has been reported as happening at least once: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488535 Instead prints warning messages to stderr to help diagnose where the bad visual information is coming from. (Tested by temporarily commenting out names in the ClassName array.) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-06-30Clarify .Xresources vs. .Xdefaults in man pageAlan Coopersmith1-1/+5
Reported by John Feuerstein at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649187 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-04Allow the CPP macro to contain preprocessors with command line options (v2)Egbert Eich1-2/+10
The preprocessor used for xrdb may require a command line option to produce the desired output. For the GNU cpp this could be 'traditional-cpp' which may not be valid for other preprocessors. Therefore support the specification of preprocessors along with required command line arguments when using the '--with-cpp' configure option. Example: ./configure --with-cpp="/usr/bin/cpp --traditional-cpp, /usr/lib/cpp". v2: Followed a suggestion by Julien Cristau <jcristau@debian.org> to allocate memory for the dup string dynamically instead of using a static buffer. Signed-off-by: Egbert Eich <eich@freedesktop.org>
2013-01-04Usage: In usage message print preprocessor that's actually chosen.Egbert Eich1-1/+1
The CPP macro may contain a list of preprocessors to chose from. In the usage message describing the -cpp command line option print the preprocessor that would actually be chosen. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-11-05Fix build with WIN32 defined, but PATHETICCPP not definedJon TURNEY1-1/+1
(Note that PATHETICCPP seems to be never defined now, see [1]) [1] http://lists.x.org/archives/xorg-devel/2010-October/013860.html Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
2011-06-16Tokenize #define names in the PATHETICCPP case tooAlan Coopersmith1-1/+1
Fixes generation of the EXT_<extension-name> #defines, since cpp treats a #define EXT_MIT-SHM as a token "EXT_MIT" with a value of "-SHM". Without this fix, an xrdb built with PATHETICCPP prints warnings of: macro EXT_XC redefines previous macro at "", line 27 macro EXT_XVideo redefines previous macro at "", line 33 macro EXT_MIT redefines previous macro at "", line 35 macro EXT_MIT redefines previous macro at "", line 37 due to extension #defines such as EXT_MIT-SCREEN-SAVER & EXT_MIT-SHM conflicting with each other. Now matches the non-PATHETICCPP handling of #define names. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-05Bump to 1.0.9xrdb-1.0.9Matthias Hopf1-1/+1