summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-02-03bitmap 1.1.1HEADbitmap-1.1.1masterAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-25Remove "All rights reserved" from Oracle copyright noticesAlan Coopersmith1-1/+1
Oracle no longer includes this term in our copyright & license notices. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-05bitmap: Print which option was in error along with usage messageAlan Coopersmith1-5/+16
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-05atobm, bmtoa, bitmap: Add -help and -version optionsAlan Coopersmith4-9/+65
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-05Ensure all *.c files include config.h before any other headersAlan Coopersmith7-2/+27
Makes sure that any flags set in config.h that affect system headers are applied equally across all source files. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-19configure: Use AC_SYS_LARGEFILE to enable large file supportAlan Coopersmith1-0/+4
While X bitmap files should never be more than 2gb in size, they may be stored on filesystems with large inodes. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-30bitmap 1.1.0bitmap-1.1.0Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-09gitlab CI: stop requiring Signed-off-by in commitsAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-09atobm: close memory leaksAlan Coopersmith1-4/+9
Fix leaks reported by Oracle Parfait (though they don't last long, since the program exits immediately after leaking): Error: Memory leak Memory leak [memory-leak] (CWE 401): Memory leak of pointer pointer allocated with _new_scan_list(bytes_per_scanline) at line 260 of atobm.c in function 'doit'. calloc called at line 180 in function '_new_scan_list' Allocated value returned to caller at line 193 pointer allocated at line 250 in function 'doit' with _new_scan_list(bytes_per_scanline) pointer leaks when (i + 1) >= <unknown> at line 275 and buf[0] != 0 at line 225. Error: Memory leak Memory leak [memory-leak] (CWE 401): Memory leak of pointer pointer allocated with _new_scan_list(bytes_per_scanline) at line 316 of atobm.c in function 'doit'. calloc called at line 180 in function '_new_scan_list' Allocated value returned to caller at line 193 pointer allocated at line 250 in function 'doit' with _new_scan_list(bytes_per_scanline) pointer leaks when slist != NULL at line 252 and (i + 1) >= <unknown> at line 275 and (i + 1) >= <unknown> at line 303. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-09atobm: accept single character linesAlan Coopersmith1-1/+1
Fixes round-trip-test failure on hlines2 The previous behavior has been present since the initial checkin of the code to the X Consortium monolith, but no explanation was given for why a single-character line should be skipped. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-09test: add round-trip-test for atobm & bmtoaAlan Coopersmith3-0/+30
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-09Move bitmaps into a new bitmaps directoryAlan Coopersmith14-13/+13
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-03Build xz tarballs instead of bzip2Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-03gitlab CI: add a basic build testAlan Coopersmith1-0/+98
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-05-14bitmap: Fix a crash with underspecified dimensionsJeremy Mates1-4/+6
From the reporter on #xorg-devel: -!- thrig [thrig@unaffilaited/thrig] has joined #xorg-devel <thrig> where does the code for bitmap live? there's a crash (or who knows on some platforms) if you `bitmap -size 42`
2020-07-23Fix spelling/wording issuesAlan Coopersmith4-9/+9
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-06-01Use _CONST_X_STRING to make libXt declare String as const char *Alan Coopersmith7-18/+21
Clears 169 out of 240 -Wdiscarded-qualifiers warnings from gcc 7.3 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-02-10bitmap 1.0.9bitmap-1.0.9Alan 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>
2017-09-24same time ago the user Frederic Baldit complained (on xorg) thatWalter Harms1-1/+0
the ability to set single dots in the programm Bitmap depend on the state of num_lock. This is a long standing bug that affect all versions of bitmap. the problem was that the corresponding function was erroneously checking event->xbutton.state. Removing that check solved the problem for the user. Signed-off-by: wharms <wharms@bfs.de>
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-01-16bitmap 1.0.8bitmap-1.0.8Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-12-29Stop memory leak in XmuWriteBitmapDataToFile()Alan Coopersmith1-3/+8
StripFilename() allocates a new string for its result, so after we're done with it, free it instead of just losing the pointer to it. Fixes errors found by Oracle Parfait 1.5.1 bug checking tool: Error: Memory leak (CWE 401) Memory leak of pointer basename allocated with StripFilename(filename) at line 712 of Bitmap.c in function 'XmuWriteBitmapDataToFile'. basename allocated at line 691 with StripFilename(filename). basename leaks when i >= data_length at line 702. Error: Memory leak (CWE 401) Memory leak of pointer basename allocated with StripFilename(filename) at line 715 of Bitmap.c in function 'XmuWriteBitmapDataToFile'. basename allocated at line 691 with StripFilename(filename). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-12-29Stop memory leaks from XtNewString(StripFilename(filename))Alan Coopersmith1-2/+2
StripFilename() already allocates a new string for its result, we don't need to duplicate it and then lose the pointer to the first one. Fixes errors found by Oracle Parfait 1.5.1 bug checking tool: Error: Memory leak (CWE 401) Memory leak of pointer pointer allocated with StripFilename(filename) at line 1119 of Bitmap.c in function 'BWReadFile'. pointer allocated at line 1106 with StripFilename(filename). pointer leaks when StripFilename(filename) != NULL at line 1106. Error: Memory leak (CWE 401) Memory leak of pointer pointer allocated with StripFilename(filename) at line 1119 of Bitmap.c in function 'BWReadFile'. pointer allocated at line 1106 with StripFilename(filename). Error: Memory leak (CWE 401) Memory leak of pointer pointer allocated with StripFilename(filename) at line 1222 of Bitmap.c in function 'BWWriteFile'. pointer allocated at line 1202 with StripFilename(filename). pointer leaks when StripFilename(filename) != NULL at line 1202. Error: Memory leak (CWE 401) Memory leak of pointer pointer allocated with StripFilename(filename) at line 1222 of Bitmap.c in function 'BWWriteFile'. pointer allocated at line 1202 with StripFilename(filename). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-01autogen.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-01configure: Drop AM_MAINTAINER_MODEAlan Coopersmith2-2/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-01-01Use '& 7' instead '% 8' to silence clang analyzer warningJeremy Huddleston Sequoia1-1/+1
Graphics.c:569:10: warning: The result of the '<<' expression is undefined while (!QueryFlood(BW, x, y, value) && (x < x_right)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Graphics.c:470:7: note: expanded from macro 'QueryFlood' ((GetBit(BW->bitmap.image, x, y) !=\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Graphics.c:66:9: note: expanded from macro 'GetBit' (1 << ((x) % 8))) ? 1 : 0)) ~~^~~~~~~~~~~~ Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-01Demacro modernization of NewSList to plug a memory leak during error handlingJeremy Huddleston Sequoia1-28/+39
atobm.c:248:6: warning: Potential leak of memory pointed to by 'slist' NewSList (); ^~~~~~~~~~~ atobm.c:209:3: note: expanded from macro 'NewSList' fprintf (stderr, "%s: unable to allocate char array\n", \ ^~~~~~~ atobm.c:259:6: warning: Potential leak of memory pointed to by 'old' NewSList (); ^~~~~~~~~~~ atobm.c:209:3: note: expanded from macro 'NewSList' fprintf (stderr, "%s: unable to allocate char array\n", \ ^~~~~~~ atobm.c:259:6: warning: Potential leak of memory pointed to by 'slist' NewSList (); ^~~~~~~~~~~ atobm.c:209:3: note: expanded from macro 'NewSList' fprintf (stderr, "%s: unable to allocate char array\n", \ ^~~~~~~ 3 warnings generated. Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-01Silence -Wbad-function-castJeremy Huddleston Sequoia1-0/+6
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-01Avoid shadow declarationsJeremy Huddleston Sequoia1-6/+6
Bitmap.c:906:17: warning: declaration shadows a local variable [-Wshadow] unsigned char *image_data; ^ Bitmap.c:799:11: note: previous declaration is here char *image_data, *buffer_data; ^ Bitmap.c:907:8: warning: declaration shadows a local variable [-Wshadow] char *buffer_data; ^ Bitmap.c:799:24: note: previous declaration is here char *image_data, *buffer_data; ^ Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-01assert to avoid a NULL dereferenceJeremy Huddleston Sequoia1-0/+3
Bitmap.c:1246:8: warning: Dereference of null pointer **str = '\0'; ~~~~~~^~~~~~ 1 warning generated. Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-11-22Print which option was in error along with usage messageAlan Coopersmith3-9/+27
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2013-10-25config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILESGaetan Nadon1-1/+2
Fix Automake warning: AC_OUTPUT should be used without arguments. www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Files Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2013-06-06Use table markup in preference to various low-level constructions.Eric S. Raymond1-9/+12
2013-05-17bitmap 1.0.7bitmap-1.0.7Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-04-21Mark usage() functions as noreturn, as suggested by gccAlan Coopersmith3-4/+5
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-04-21Simplify & unify error path between mktemp & mkstemp versionsAlan Coopersmith1-13/+8
This also now catches errors when fopen() or fdopen() fail, before we try to fwrite() to a null FILE pointer. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-04-21Fix genererate typo in bmtoa error messagesAlan Coopersmith1-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-20Combine usage messages into a single stringAlan Coopersmith2-19/+10
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-09-22bitmap.man: Fix some typos.Bjarni Ingi Gislason1-4/+4
Remove stray backslash. (Added sometime between X11R4 and X11R5; 21+ years old.) Use two spaces between sentences, not one or two or three. Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is> Signed-off-by: James Cloos <cloos@jhcloos.com>
2012-05-29Fix pixmap leak in error paths of BWGetUnzoomedPixmapAlan Coopersmith1-2/+6
Found by Parfait 0.5.0.1 bug checking tool: Leaked X Resource pix at line 393 of Bitmap.c in function 'BWGetUnzoomedPixmap'. pix initialized at line 388 with XCreatePixmap(...). at line 414 of Bitmap.c in function 'BWGetUnzoomedPixmap'. pix initialized at line 409 with XCreatePixmap(...). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-08bitmap 1.0.6bitmap-1.0.6Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-12-20Use lrint() from math library if availableAlan Coopersmith3-2/+22
Moves -lm from being hardcoded in Makefile.am to being added via AC_SEARCH_LIBS in configure.ac setting it in $(MATH_LIBS) Using lrint() [returns long int] instead of rint() [returns double] clears a bunch of gcc warnings of the form: "cast from function call of type ‘double’ to non-matching type ‘short int’" Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-14Constify strings in atobmAlan Coopersmith1-9/+9
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-14Constify strings in bmtoaAlan Coopersmith1-8/+8
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-14Strip trailing whitespaceAlan Coopersmith16-923/+923
Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-14Constify filename string handlingAlan Coopersmith2-14/+16
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>