summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-02-03xprop 1.2.7HEADxprop-1.2.7masterAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-12-07Fix C23 build by renaming variable 'true'Alan Coopersmith1-3/+3
Reported by gcc 13.2 with -std=gnu2x: xprop.c: In function ‘Handle_Question_Mark’: xprop.c:1291:10: error: expected identifier or ‘(’ before ‘true’ 1291 | long true; | ^~~~ xprop.c:1293:49: error: lvalue required as unary ‘&’ operand 1293 | dformat = Scan_Exp(dformat, thunks, format, &true); | ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-03xprop 1.2.6xprop-1.2.6Alan Coopersmith1-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-14Variable scope reductions as suggested by cppcheckAlan Coopersmith1-39/+33
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-14Resolve many gcc -Wsign-compare warningsAlan Coopersmith1-12/+12
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-14Rename "dpy" function arguments to "display" to avoid shadowing globalAlan Coopersmith2-23/+23
Clears many gcc -Wshadow warnings Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-14Declare help() and print_help() as staticAlan Coopersmith1-2/+2
Resolves gcc -Wmissing-prototypes warnings Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-14Mark help(), usage(), and grammar() with _X_NORETURN _X_COLDAlan Coopersmith1-3/+5
Resolves gcc -Wsuggest-attribute=noreturn warning Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-08gitlab 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-11-28Fix spelling/wording issuesAlan Coopersmith3-6/+6
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-11-19xprop 1.2.5xprop-1.2.5Keith Packard2-4/+15
Signed-off-by: Keith Packard <keithp@keithp.com>
2020-11-17Check return value from ioctl(TIOCGWINSZ)Keith Packard1-3/+1
Make sure the function succeeded before looking at the return value. Signed-off-by: Keith Packard <keithp@keithp.com>
2020-11-17Correct icon buffer width computation for truecolor terminalsKeith Packard1-3/+3
Fix the test when computing size necessary for true color output to use 'is_truecolor_term' instead of 'is_utf8_locale'. A non-utf8 locale with a true color terminal would have under-allocated the buffer. Also, check for truecolor first to match the output code. This doesn't fix the fact that this code over-allocates by a factor of two in this case, but that at least won't cause memory corruption. Signed-off-by: Keith Packard <keithp@keithp.com>
2020-11-17Free string list returned from XmbTextPropertyToTextListKeith Packard1-2/+4
Make sure we clean up after this call by using the XFreeStringList function. Signed-off-by: Keith Packard <keithp@keithp.com>
2020-11-17Make output with unknown width terminal the same as old codeKeith Packard1-1/+1
Auto-detecting the terminal width and eliding icons that are too wide is a nice new feature, but we shouldn't change the behaviour when that width is not detectable (e.g., when output to a file). Change the default terminal width from 80 to 144 + 8 to get back to the previous output format. Signed-off-by: Keith Packard <keithp@keithp.com>
2020-11-01Fix formatting of back-to-back not shown icons.Pierre-Loup A. Griffais1-1/+1
Otherwise looks like this: Icon (48 x 48): (not shown) Icon (64 x 64): (not shown) Icon (128 x 128): (not shown)
2020-11-01Support true color output for icons if the terminal advertises it.Pierre-Loup A. Griffais1-2/+29
2020-11-01Fix aspect ratio for icon display by using two characters per icon pixel.Pierre-Loup A. Griffais1-4/+6
2020-11-01Break down memory allocation logic and fix overallocating for UTF8.Pierre-Loup A. Griffais1-1/+10
We need up to 3 bytes per character in UTF8 mode, not 4.
2020-11-01Don't display icons if they would line-wrap.Pierre-Loup A. Griffais1-1/+13
Assuming we can query the terminal width.
2020-04-11Add missing `-help` functionJason Nader1-4/+20
`-help` is mentioned in the manpages, but actually running `xprop -help` results in xprop exiting with status 1 as it doesn't recognise the option. This has been the source of major confusion here: https://github.com/franciscolourenco/done/issues/77#issuecomment-612404448 Signed-off-by: Jason Nader <jason.nader@protonmail.com>
2019-03-09xprop 1.2.4xprop-1.2.4Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-03-03Fix -Wsign-compare warning in dsimple.cAlan Coopersmith1-1/+1
dsimple.c:322:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=0; i<nchildren; i++) { ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-02-09Fix typo in xprop.manpmav991-1/+1
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/+20
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-05-05Add missing braces around else clause in Read_Quoted()Alan Coopersmith1-1/+2
Found by gcc 7.3: xprop.c: In function ‘Read_Quoted’: xprop.c:163:8: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation] } else ^~~~ xprop.c:164:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’ ptr++[0] = c; length--; ^~~~~~ Introduced in initial commit to X Consortium RCS in 1987: https://cgit.freedesktop.org/~alanc/xc-historical/commit/xc/programs/xprop/xprop.c?id=18ea83d7457743936e99a574b50e208f7697f096 Actual effect is minimal - for every \-escaped newline in the DFORMAT portion of a xprop formats file, xprop subtracted one byte too many from the count of bytes still available in the buffer, which could lead it to return an error of "Bad format file format: dformat too long." when there was still room left. Since the original buffer size was 10,000 bytes, and the current size is 500,000 bytes, it's unlikely anyone ever hit this in real usage. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-03-09xprop 1.2.3xprop-1.2.3Alan 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-28Free the data returned by Format_Icons()Eirik Byrkjeflot Anonsen1-1/+5
Signed-off-by: Eirik Byrkjeflot Anonsen <eirik@eirikba.org>
2015-09-28Free the data returned by XGetWindowProperty()Eirik Byrkjeflot Anonsen1-2/+8
Signed-off-by: Eirik Byrkjeflot Anonsen <eirik@eirikba.org>
2015-09-22Free the data returned by XListProperties()Eirik Byrkjeflot Anonsen1-0/+1
Signed-off-by: Eirik Byrkjeflot Anonsen <eirik@eirikba.org>
2015-09-22Free the thunks used by Show_PropEirik Byrkjeflot Anonsen1-9/+1
Signed-off-by: Eirik Byrkjeflot Anonsen <eirik@eirikba.org>
2014-06-03Add -version option to print program versionAlan Coopersmith2-1/+11
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-03Print which option was in error along with usage messageAlan Coopersmith4-19/+28
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-08-08xprop 1.2.2xprop-1.2.2Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-19Mark usage() as noreturn, as suggested by gcc -Wmissing-noreturnAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-19Fix const conversion warnings from gccAlan Coopersmith3-18/+19
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-22Add unicode argument to Format_Len_String to reduce code duplicationAlan Coopersmith1-19/+6
Allows us to get rid of a second copy of the code that differed only in the unicode argument passed on to Format_String. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-22Replace strlen/malloc/memcpy set with strdupAlan Coopersmith1-4/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-20Mark FatalError() as taking printf-style argumentsAlan Coopersmith1-1/+1
Silences -Wformat-nonliteral warnings about passing through unknown format arguments to vfprintf. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-20config: 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-02-21Enable setting property of type UTF8_STRING.lolilolicon1-0/+7
Fix "bad format character: u" error for format '8u', e.g.: xprop -root -f _NET_WM_NAME 8u -set _NET_WM_NAME LG3D Signed-off-by: James Cloos <cloos@jhcloos.com>
2011-06-29Expand description in README a littleAlan Coopersmith1-1/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>