summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-02-03xditview 1.0.7HEADxditview-1.0.7masterAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-09Add -help and -version optionsAlan Coopersmith2-4/+26
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-09Print which argument was unknown before giving usage messageAlan Coopersmith1-1/+9
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-17Add .git-blame-ignore-revs to hide whitespace commits from git blameAlan Coopersmith1-0/+16
To use this in your local repo clone, you will need to either run `git blame --ignore-revs-file .git-blame-ignore-revs` or set it permanently with `git config blame.ignoreRevsFile .git-blame-ignore-revs` Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-15GetLine: resolve -Wmaybe-uninitialized warningAlan Coopersmith1-1/+1
lex.c: In function ‘GetLine’: lex.c:38:8: warning: ‘c’ may be used uninitialized [-Wmaybe-uninitialized] 38 | if (c == '\n') | ^ lex.c:29:16: note: ‘c’ was declared here 29 | int i = 0, c; | ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-15Add CWARNFLAGS to AM_CFLAGSAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-15Mark more char * as constAlan Coopersmith3-13/+13
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-15configure: Add --with-xft and --without-xft flags to control USE_XFTAlan Coopersmith11-7/+61
USE_XFT ifdefs have been in since the import from XFree86, but never enabled by the autoconf build, oops! Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-15Initialize more variables in their declarationsAlan Coopersmith6-69/+44
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-15More variable scope reductions as recommended by cppcheckAlan Coopersmith3-36/+54
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-14Add bounds check to getstr()Alan Coopersmith1-5/+10
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-14Replace strcpy() calls with strncpy() or memcpy()Alan Coopersmith4-14/+22
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-14lex.c: increment length counters when adding to bufferAlan Coopersmith1-2/+2
Simple test case: % python -c 'print("A"*60000)' > buf % xditview buf Reported-by: constantine110@protonmail.com Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-14Convert to X.Org standard code styleAlan Coopersmith12-2343/+2333
Mostly via util/modular/x-indent-all.sh, plus some manual cleanup Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-14Dvi.c: remove unused XtStrlen macroAlan Coopersmith1-2/+0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-20gitlab CI: stop requiring Signed-off-by in commitsAlan Coopersmith1-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-20configure: Use AC_SYS_LARGEFILE to enable large file supportAlan Coopersmith1-0/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-10-15xditview 1.0.6xditview-1.0.6Alan Coopersmith1-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-09-17Declare guesses constAlan Coopersmith1-1/+1
As suggested by cppcheck: parse.c:163:19: style: Variable 'guesses' can be declared with const [constVariable] static int guesses[] = { 1, 4, 100, 1000, 1 }; ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-09-17Avoid leak of new_file if we decide not to use itAlan Coopersmith1-0/+2
As warned by cppcheck: xditview.c:338:13: error: Resource leak: new_file [resourceLeak] return; ^ xditview.c:342:13: error: Resource leak: new_file [resourceLeak] return; ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-09-17Use standard strrchr() instead of ancient rindex()Alan Coopersmith1-2/+2
As suggested by cppcheck: xditview.c:359:32: style: Obsolescent function 'rindex' called. It is recommended to use 'strrchr' instead. [rindexCalled] if (name[0] != '/' && (n = rindex (name, '/'))) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-09-17Inline *Move & *Goto functionsAlan Coopersmith2-28/+25
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-09-17Delete HorizontalMove macro that shadows/duplicates HorizontalMove functionAlan Coopersmith1-2/+0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-09-17Fix -Wsign-compare warningsAlan Coopersmith1-2/+2
xditview.c: In function ‘main’: xditview.c:196:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < XtNumber (popupMenuEntries); i++) { ^ xditview.c:211:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < XtNumber (fileMenuEntries); i++) { ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-09-17Clear -Wmissing-field-initializers warningsAlan Coopersmith1-2/+4
DviChar.c:392:1: warning: missing initializer for field ‘buckets’ of ‘DviCharNameMap {aka struct _dviCharNameMap}’ [-Wmissing-field-initializers] }; ^ In file included from DviChar.c:9:0: DviChar.h:34:22: note: ‘buckets’ declared here DviCharNameHash *buckets[DVI_HASH_SIZE]; ^~~~~~~ DviChar.c:658:1: warning: missing initializer for field ‘buckets’ of ‘DviCharNameMap {aka struct _dviCharNameMap}’ [-Wmissing-field-initializers] }; ^ In file included from DviChar.c:9:0: DviChar.h:34:22: note: ‘buckets’ declared here DviCharNameHash *buckets[DVI_HASH_SIZE]; ^~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-09-17Use _CONST_X_STRING to make libXt declare String as const char *Alan Coopersmith1-0/+1
Clears 42 out of 66 -Wdiscarded-qualifiers warnings from gcc Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-09-17Variable scope reductions as recommended by cppcheckAlan Coopersmith6-69/+63
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-02man page: remove out-of-date COPYRIGHT sectionAlan Coopersmith1-4/+0
The information previously listed here didn't match what is present in the source code or the COPYING file, and the X(7) man page doesn't list any license information as this had claimed. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-04Build xz tarballs instead of bzip2Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-04gitlab CI: add a basic build testAlan Coopersmith1-0/+98
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-11-28Fix spelling/wording issuesAlan Coopersmith4-5/+5
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-03-03xditview 1.0.5xditview-1.0.5Alan 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/+18
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-05-05make sure filename is a regular file.Pat Kane1-0/+18
This is the second version of patch. It now uses fstat instead of stat as recommended in review comments from: Philipp Hagemeister <phihag@phihag.de>. Bug was reported by: Krzysztof Żelechowski <giecrilj@stegny.2a.pl> Signed-off-by: Pat Kane <pekane52@gmail.com> 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-04-16xditview 1.0.4xditview-1.0.4Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-11-08Use SEEK_* names instead of raw numbers for fseek whence argumentAlan Coopersmith2-3/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-10-25Remove CVS/RCS $Id tagsAlan Coopersmith15-38/+0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-10-25Combine usage message stringsAlan Coopersmith1-6/+6
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-10-25Remove #if 0 codeAlan Coopersmith4-95/+0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-10-25unifdef -UNOTDEF -UNOTUSEDAlan Coopersmith3-85/+0
2014-10-25Const cleanupAlan Coopersmith10-38/+40
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-02autogen.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-02configure: Drop AM_MAINTAINER_MODEAlan Coopersmith2-2/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-02config: Add missing AC_CONFIG_SRCDIRAlan Coopersmith1-3/+6
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>
2014-02-18Convert sprintf calls to snprintfAlan Coopersmith1-4/+4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-04-21Close file leak when fdopen() fails in OpenFile()Alan Coopersmith1-9/+9
Found by parfait 1.1 bug checking tool: Error: File Leak File Descriptor Leak: Leaked File Descriptor fd at line 457 of app/xditview/Dvi.c in function 'OpenFile'. fd initialized at line 449 with mkstemp Also reorganize & clean up the code a bit while we're here Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>