diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2022-06-25 16:22:24 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2022-06-25 16:22:24 +0000 |
commit | dc6717650dbd5a3dfee53fdf246ffd5ae50d9574 (patch) | |
tree | 3a564e18e49ea3a290287bd5290ebce6a2bea374 /app | |
parent | cc1e8cbb081d6ee83ff9ab30d7329ebd27af6a67 (diff) |
Update bitmap to version 1.1.0
Bug fixes + code reorganisation
Diffstat (limited to 'app')
32 files changed, 703 insertions, 111 deletions
diff --git a/app/bitmap/BitEdit.c b/app/bitmap/BitEdit.c index 64c2e56e8..a9ec29fa8 100644 --- a/app/bitmap/BitEdit.c +++ b/app/bitmap/BitEdit.c @@ -226,7 +226,7 @@ static Boolean image_visible = False; static Pixmap check_mark; static Dialog input_dialog, error_dialog, qsave_dialog; static Time btime; -static String filename = NULL, base_name = NULL, format; +static char *filename = NULL, *base_name = NULL, *format; static char message[80]; diff --git a/app/bitmap/Bitmap.c b/app/bitmap/Bitmap.c index 8fbead9ad..d074058e1 100644 --- a/app/bitmap/Bitmap.c +++ b/app/bitmap/Bitmap.c @@ -648,7 +648,7 @@ BWPutImage(BitmapWidget w, Display *display, Drawable drawable, GC gc, } #endif -static String +static char * StripFilename(_Xconst _XtString filename) { const char *begin = strrchr(filename, '/'); @@ -688,7 +688,7 @@ XmuWriteBitmapDataToFile(_Xconst _XtString filename, file = fopen(filename, "w+"); if (file) { - String new_basename; + char *new_basename; if (!basename || !strcmp(basename, "") || !strcmp(basename, "-")) basename = new_basename = StripFilename(filename); @@ -963,12 +963,14 @@ BWParseSize(String size, Dimension *width, Dimension *height) status = XParseGeometry(size, &x, &y, &w, &h); - if (status & (WidthValue | HeightValue)) { + if (status & WidthValue) { *width = (Dimension) w; - *height = (Dimension) h; - return True; + if (status & HeightValue) { + *height = (Dimension) h; + return True; + } } - else return False; + return False; } @@ -1227,8 +1229,8 @@ BWWriteFile(Widget w, _Xconst _XtString filename, _Xconst _XtString basename) return status; } -String -BWGetFilename(Widget w, String *str) +_XtString +BWGetFilename(Widget w, _XtString *str) { BitmapWidget BW = (BitmapWidget) w; @@ -1237,11 +1239,11 @@ BWGetFilename(Widget w, String *str) return *str; } -String -BWGetFilepath(Widget w, String *str) +_XtString +BWGetFilepath(Widget w, _XtString *str) { BitmapWidget BW = (BitmapWidget) w; - String end; + _XtString end; *str = XtNewString(BW->bitmap.filename); assert(*str); @@ -1257,8 +1259,8 @@ BWGetFilepath(Widget w, String *str) } -String -BWGetBasename(Widget w, String *str) +_XtString +BWGetBasename(Widget w, _XtString *str) { BitmapWidget BW = (BitmapWidget) w; @@ -1389,7 +1391,7 @@ BWZoomIn(Widget w, BW->bitmap.mark.to_x = NotSet; BW->bitmap.mark.to_y = NotSet; BW->bitmap.zooming = True; - BW->bitmap.grid = True; /* potencially true, could use a resource here */ + BW->bitmap.grid = True; /* potentially true, could use a resource here */ FixHotSpot(BW); diff --git a/app/bitmap/Bitmap.h b/app/bitmap/Bitmap.h index 611f0e0ea..c0ee8e804 100644 --- a/app/bitmap/Bitmap.h +++ b/app/bitmap/Bitmap.h @@ -227,8 +227,8 @@ extern Boolean BWQueryChanged ( Widget w ); extern int BWReadFile ( Widget w, _Xconst _XtString filename, _Xconst _XtString basename ); extern int BWWriteFile ( Widget w, _Xconst _XtString filename, _Xconst _XtString basename ); extern String BWUnparseStatus ( Widget w ); -extern String BWGetFilename ( Widget w, String *str ); -extern String BWGetBasename ( Widget w, String *str ); +extern _XtString BWGetFilename ( Widget w, _XtString *str ); +extern _XtString BWGetBasename ( Widget w, _XtString *str ); extern void BWChangeBasename ( Widget w, _Xconst _XtString str ); extern void BWRemoveAllRequests ( Widget w ); extern void BWClearHotSpot ( Widget w ); @@ -250,7 +250,7 @@ extern void BWSwitchStippled ( Widget w ); extern void BWRedrawMark ( Widget w ); extern Boolean BWQueryAxes ( Widget w ); extern void BWHighlightAxes ( Widget w ); -extern String BWGetFilepath ( Widget w, String *str ); +extern _XtString BWGetFilepath ( Widget w, _XtString *str ); extern void BWZoomOut ( Widget w ); extern void BWZoomMarked ( Widget w ); extern void BWRescale ( Widget w, Dimension width, Dimension height ); diff --git a/app/bitmap/BitmapP.h b/app/bitmap/BitmapP.h index 08e4c65bf..2ab711e97 100644 --- a/app/bitmap/BitmapP.h +++ b/app/bitmap/BitmapP.h @@ -119,7 +119,8 @@ typedef struct { Dimension margin, squareW, squareH, width, height; XPoint hot; int button_function[5]; - String filename, basename; + _XtString filename; + _XtString basename; /* private state */ String size; Position horizOffset, vertOffset; diff --git a/app/bitmap/ChangeLog b/app/bitmap/ChangeLog index d01883759..070ef890b 100644 --- a/app/bitmap/ChangeLog +++ b/app/bitmap/ChangeLog @@ -1,3 +1,130 @@ +commit b3e36bd9e5c72f4d8045b13ec066826545560361 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Apr 30 13:22:09 2022 -0700 + + bitmap 1.1.0 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 13ac2639c3c88bb6c7ecaae541941203e6344ad0 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Apr 9 16:26:14 2022 -0700 + + gitlab CI: stop requiring Signed-off-by in commits + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit b8090d0f5bee66ceb12cee2b63425efd74ad4610 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Apr 9 16:11:45 2022 -0700 + + atobm: close memory leaks + + 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> + +commit c6b48ffeb65182bf5989df299c6a7fcccb3cb09a +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Apr 9 15:56:57 2022 -0700 + + atobm: accept single character lines + + 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> + +commit fa7241ac10bf9b47c3d20d557fdca0aa0a468484 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Apr 9 15:42:10 2022 -0700 + + test: add round-trip-test for atobm & bmtoa + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 7c4196d3218d1afa73c930577beeb579c1e87a38 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Apr 9 12:44:34 2022 -0700 + + Move bitmaps into a new bitmaps directory + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 7886e0b78ba317e02d8496fb83432ee9274f7887 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Dec 3 14:35:15 2021 -0800 + + Build xz tarballs instead of bzip2 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 14181d27e8ceb6c25051d63698fb34cf28911a5e +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Dec 3 14:35:06 2021 -0800 + + gitlab CI: add a basic build test + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit e0adae1b8e19f9bedc4cb1a3798736812cb490a6 +Author: Jeremy Mates <jeremy.mates@gmail.com> +Date: Fri May 14 11:34:42 2021 -0400 + + bitmap: Fix a crash with underspecified dimensions + + 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` + +commit f0b589b685cc3d9f684d9423250f798a8f93142f +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Jul 23 10:20:54 2020 -0700 + + Fix spelling/wording issues + + Found by using: + codespell --builtin clear,rare,usage,informal,code,names + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 3a2473affe1e15d6e8d252db7ec5e22fd1683978 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Jun 1 19:27:15 2019 -0700 + + Use _CONST_X_STRING to make libXt declare String as const char * + + Clears 169 out of 240 -Wdiscarded-qualifiers warnings from gcc 7.3 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + commit 6dcc9c8064baeb2f9d853309123cd9736809a4fd Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sun Feb 10 13:01:27 2019 -0800 @@ -944,7 +1071,7 @@ Date: Tue Oct 4 23:15:11 2005 +0000 Add bitmap.icon to EXTRA_DIST commit c3f282e1aa6176896089ea79be84b7250888a65c -Author: Kristian Høgsberg <krh@redhat.com> +Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Sep 29 18:22:01 2005 +0000 Add Bitmap-nocase app default file to APPDEFAULTFILES. @@ -997,13 +1124,13 @@ Date: Sat Jul 16 21:59:14 2005 +0000 against tempfile race conditions in many places) commit cc48a5df41c59071eab0f58818366e10cb1ff4ac -Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Fri Jul 15 16:52:07 2005 +0000 Add dependency on xbitmaps commit c6129c090ad25cd2f8b191f503ac6e8cd452a31d -Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Jul 6 15:47:38 2005 +0000 Build system for bitmap diff --git a/app/bitmap/Dialog.c b/app/bitmap/Dialog.c index e2e3ac24b..bf00b0569 100644 --- a/app/bitmap/Dialog.c +++ b/app/bitmap/Dialog.c @@ -127,7 +127,7 @@ CreateDialog(Widget top_widget, String name, unsigned long options) } void -PopdownDialog(Dialog popup, String *answer) +PopdownDialog(Dialog popup, _XtString *answer) { if (answer) *answer = XawDialogGetValueString(popup->dialog_widget); @@ -137,7 +137,7 @@ PopdownDialog(Dialog popup, String *answer) unsigned long PopupDialog(Dialog popup, String message, String suggestion, - String *answer, XtGrabKind grab) + _XtString *answer, XtGrabKind grab) { Position popup_x, popup_y, top_x, top_y; Dimension popup_width, popup_height, top_width, top_height, border_width; diff --git a/app/bitmap/Dialog.h b/app/bitmap/Dialog.h index d5727ff48..529918ca2 100644 --- a/app/bitmap/Dialog.h +++ b/app/bitmap/Dialog.h @@ -51,5 +51,5 @@ typedef struct { } DialogButton; extern Dialog CreateDialog(Widget, String, unsigned long); -extern unsigned long PopupDialog(Dialog, String, String, String *, XtGrabKind); -extern void PopdownDialog(Dialog, String *); +extern unsigned long PopupDialog(Dialog, String, String, _XtString *, XtGrabKind); +extern void PopdownDialog(Dialog, _XtString *); diff --git a/app/bitmap/Makefile.am b/app/bitmap/Makefile.am index def4d8ba4..f6f411fdb 100644 --- a/app/bitmap/Makefile.am +++ b/app/bitmap/Makefile.am @@ -22,6 +22,8 @@ SUBDIRS=man bin_PROGRAMS = bitmap bmtoa atobm +AM_CPPFLAGS = -D_CONST_X_STRING + bitmap_CFLAGS = $(CWARNFLAGS) $(BITMAP_CFLAGS) bitmap_LDADD = $(BITMAP_LIBS) $(MATH_LIBS) bitmap_SOURCES = \ @@ -49,19 +51,19 @@ EXTRA_DIST = autogen.sh README.md bitmapdir = $(includedir)/X11/bitmaps dist_bitmap_DATA = \ - Dashes \ - Down \ - Excl \ - FlipHoriz \ - FlipVert \ - Fold \ - Left \ - Right \ - RotateLeft \ - RotateRight \ - Stipple \ - Term \ - Up + bitmaps/Dashes \ + bitmaps/Down \ + bitmaps/Excl \ + bitmaps/FlipHoriz \ + bitmaps/FlipVert \ + bitmaps/Fold \ + bitmaps/Left \ + bitmaps/Right \ + bitmaps/RotateLeft \ + bitmaps/RotateRight \ + bitmaps/Stipple \ + bitmaps/Term \ + bitmaps/Up # App default files (*.ad) DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults @@ -72,6 +74,8 @@ dist_appdefault_DATA = \ app-defaults/Bitmap-nocase \ app-defaults/Bitmap +TESTS = test/round-trip-test + MAINTAINERCLEANFILES = ChangeLog INSTALL .PHONY: ChangeLog INSTALL diff --git a/app/bitmap/Makefile.in b/app/bitmap/Makefile.in index 423747f9a..fa3bbcb5c 100644 --- a/app/bitmap/Makefile.in +++ b/app/bitmap/Makefile.in @@ -77,8 +77,9 @@ subdir = . DIST_COMMON = $(am__configure_deps) $(dist_appdefault_DATA) \ $(dist_bitmap_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL \ - compile config.guess config.sub depcomp install-sh missing + $(top_srcdir)/configure $(top_srcdir)/test/round-trip-test.in \ + AUTHORS COPYING ChangeLog INSTALL compile config.guess \ + config.sub depcomp install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -87,7 +88,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = test/round-trip-test CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" \ "$(DESTDIR)$(bitmapdir)" @@ -193,6 +194,10 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ ETAGS = etags CTAGS = ctags CSCOPE = cscope +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = $(am__tty_colors_dummy) DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) @@ -229,9 +234,9 @@ am__relativize = \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz GZIP_ENV = --best -DIST_TARGETS = dist-bzip2 dist-gzip +DIST_TARGETS = dist-xz dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -357,6 +362,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -366,6 +372,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = man +AM_CPPFLAGS = -D_CONST_X_STRING bitmap_CFLAGS = $(CWARNFLAGS) $(BITMAP_CFLAGS) bitmap_LDADD = $(BITMAP_LIBS) $(MATH_LIBS) bitmap_SOURCES = \ @@ -390,19 +397,19 @@ atobm_SOURCES = atobm.c EXTRA_DIST = autogen.sh README.md bitmapdir = $(includedir)/X11/bitmaps dist_bitmap_DATA = \ - Dashes \ - Down \ - Excl \ - FlipHoriz \ - FlipVert \ - Fold \ - Left \ - Right \ - RotateLeft \ - RotateRight \ - Stipple \ - Term \ - Up + bitmaps/Dashes \ + bitmaps/Down \ + bitmaps/Excl \ + bitmaps/FlipHoriz \ + bitmaps/FlipVert \ + bitmaps/Fold \ + bitmaps/Left \ + bitmaps/Right \ + bitmaps/RotateLeft \ + bitmaps/RotateRight \ + bitmaps/Stipple \ + bitmaps/Term \ + bitmaps/Up # App default files (*.ad) @@ -412,6 +419,7 @@ dist_appdefault_DATA = \ app-defaults/Bitmap-nocase \ app-defaults/Bitmap +TESTS = test/round-trip-test MAINTAINERCLEANFILES = ChangeLog INSTALL all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -467,6 +475,8 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) distclean-hdr: -rm -f config.h stamp-h1 +test/round-trip-test: $(top_builddir)/config.status $(top_srcdir)/test/round-trip-test.in + cd $(top_builddir) && $(SHELL) ./config.status $@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ @@ -851,6 +861,99 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + fi; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ + test "$$failed" -eq 0; \ + else :; fi + distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @@ -921,6 +1024,7 @@ distdir: $(DISTFILES) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) + dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) @@ -928,7 +1032,6 @@ dist-bzip2: distdir dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) - dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) @@ -1035,6 +1138,7 @@ distcleancheck: distclean $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-recursive all-am: Makefile $(PROGRAMS) $(DATA) config.h installdirs: installdirs-recursive @@ -1146,13 +1250,13 @@ ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-dist_appdefaultDATA \ uninstall-dist_bitmapDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \ cscopelist-recursive ctags-recursive install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-binPROGRAMS \ - clean-cscope clean-generic cscope cscopelist \ + all all-am am--refresh check check-TESTS check-am clean \ + clean-binPROGRAMS clean-cscope clean-generic cscope cscopelist \ cscopelist-recursive ctags ctags-recursive dist dist-all \ dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-compile \ diff --git a/app/bitmap/README.md b/app/bitmap/README.md index 22003c14d..9b5386926 100644 --- a/app/bitmap/README.md +++ b/app/bitmap/README.md @@ -5,7 +5,7 @@ Xorg mailing list: https://lists.x.org/mailman/listinfo/xorg -The master development code repository can be found at: +The primary development code repository can be found at: https://gitlab.freedesktop.org/xorg/app/bitmap diff --git a/app/bitmap/ReqMach.c b/app/bitmap/ReqMach.c index 4ba1a768e..1a27f0219 100644 --- a/app/bitmap/ReqMach.c +++ b/app/bitmap/ReqMach.c @@ -100,7 +100,7 @@ BWAddRequest(Widget w, BWRequest name, Boolean trap, /* * Engages the request designated by the current parameter. - * Returnes TRUE if the request has an engage function and FALSE otherwise. + * Returns TRUE if the request has an engage function and FALSE otherwise. */ static Boolean Engage(BitmapWidget BW, Cardinal current) @@ -127,7 +127,7 @@ Engage(BitmapWidget BW, Cardinal current) Boolean BWRemoveRequest(); */ /* - * Scans down the request stack removing all requests untill it finds + * Scans down the request stack removing all requests until it finds * one to be trapped. */ static void @@ -152,7 +152,7 @@ TrappingLoop(BitmapWidget BW) } /* * Terimantes the current request and continues with next request if con = TRUE - * Returnes TRUE if there is any number of requests left on the stack. + * Returns TRUE if there is any number of requests left on the stack. */ Boolean BWTerminateRequest(Widget w, Boolean cont) diff --git a/app/bitmap/aclocal.m4 b/app/bitmap/aclocal.m4 index 5872b4bc3..165107998 100644 --- a/app/bitmap/aclocal.m4 +++ b/app/bitmap/aclocal.m4 @@ -19,9 +19,9 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -dnl serial 11 (pkg-config-0.29.1) -dnl +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 12 (pkg-config-0.29.2) + dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> dnl @@ -62,7 +62,7 @@ dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29.1]) +[m4_define([PKG_MACROS_VERSION], [0.29.2]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ @@ -163,7 +163,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no -AC_MSG_CHECKING([for $1]) +AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) @@ -173,11 +173,11 @@ and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else + else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs @@ -194,7 +194,7 @@ installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full diff --git a/app/bitmap/atobm.c b/app/bitmap/atobm.c index 44fdcdafb..7d25906b4 100644 --- a/app/bitmap/atobm.c +++ b/app/bitmap/atobm.c @@ -238,12 +238,12 @@ doit (FILE *fp, newline++; } - if (newline == cp + 1) continue; + if (newline == cp) continue; *newline = '\0'; len = strlen (cp); - if (width == 0) { + if (head == NULL) { width = len; padded = ((width & 7) != 0); bytes_per_scanline = (len + 7) / 8; @@ -257,7 +257,7 @@ doit (FILE *fp, fprintf (stderr, "%s: line %d is %d characters wide instead of %d\n", ProgramName, lineno, len, width); - return; + goto bail; } if (slist->used + 1 >= slist->allocated) { @@ -266,8 +266,7 @@ doit (FILE *fp, if (!slist) { fprintf (stderr, "%s: unable to allocate scan list\n", ProgramName); - free(old); - return; + goto bail; } } @@ -308,5 +307,11 @@ doit (FILE *fp, } } printf (" };\n"); + bail: + for (slist = head; slist != NULL; slist = head) { + head = slist->next; + free(slist->scanlines); + free(slist); + } return; } diff --git a/app/bitmap/bitmaps/Dashes b/app/bitmap/bitmaps/Dashes new file mode 100644 index 000000000..e81aa020d --- /dev/null +++ b/app/bitmap/bitmaps/Dashes @@ -0,0 +1,4 @@ +#define Dashes_width 2 +#define Dashes_height 2 +static char Dashes_bits[] = { + 0x01, 0x02}; diff --git a/app/bitmap/bitmaps/Down b/app/bitmap/bitmaps/Down new file mode 100644 index 000000000..9790e27e0 --- /dev/null +++ b/app/bitmap/bitmaps/Down @@ -0,0 +1,13 @@ +#define Down_width 30 +#define Down_height 30 +static char Down_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x18, 0x03, 0x00, + 0x00, 0xb8, 0x03, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x58, 0x03, 0x00, + 0x00, 0xb8, 0x03, 0x00, 0x00, 0x58, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00, + 0x00, 0x58, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00, 0x00, 0x58, 0x03, 0x00, + 0x00, 0xb8, 0x03, 0x00, 0x00, 0x58, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00, + 0x00, 0x58, 0x03, 0x00, 0xf0, 0xb8, 0xe3, 0x01, 0xf0, 0x59, 0xf3, 0x01, + 0xb0, 0xbb, 0xbb, 0x01, 0x70, 0x5f, 0xdf, 0x01, 0xe0, 0xbe, 0xef, 0x00, + 0xc0, 0x5d, 0x77, 0x00, 0x80, 0xab, 0x3a, 0x00, 0x00, 0x57, 0x1d, 0x00, + 0x00, 0xae, 0x0e, 0x00, 0x00, 0x5c, 0x07, 0x00, 0x00, 0xb8, 0x03, 0x00, + 0x00, 0xf0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00}; diff --git a/app/bitmap/bitmaps/Excl b/app/bitmap/bitmaps/Excl new file mode 100644 index 000000000..b17238941 --- /dev/null +++ b/app/bitmap/bitmaps/Excl @@ -0,0 +1,17 @@ +#define Excl_width 40 +#define Excl_height 32 +static char Excl_bits[] = { + 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, + 0x7e, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x00, + 0x00, 0x00, 0x80, 0xc3, 0x01, 0x00, 0x00, 0xc0, 0x99, 0x03, 0x00, 0x00, + 0xc0, 0x34, 0x03, 0x00, 0x00, 0xe0, 0x6a, 0x07, 0x00, 0x00, 0x70, 0x76, + 0x0e, 0x00, 0x00, 0x70, 0x6a, 0x0e, 0x00, 0x00, 0x38, 0x76, 0x1c, 0x00, + 0x00, 0x18, 0x6a, 0x18, 0x00, 0x00, 0x1c, 0x76, 0x38, 0x00, 0x00, 0x0e, + 0x6a, 0x70, 0x00, 0x00, 0x06, 0x76, 0x60, 0x00, 0x00, 0x07, 0x6a, 0xe0, + 0x00, 0x80, 0x03, 0x76, 0xc0, 0x01, 0x80, 0x03, 0x6a, 0xc0, 0x01, 0xc0, + 0x01, 0x76, 0x80, 0x03, 0xc0, 0x00, 0x6a, 0x00, 0x03, 0xe0, 0x00, 0x34, + 0x00, 0x07, 0x70, 0x00, 0x18, 0x00, 0x0e, 0x70, 0x00, 0x00, 0x00, 0x0e, + 0x38, 0x00, 0x3c, 0x00, 0x1c, 0x1c, 0x00, 0x76, 0x00, 0x38, 0x1c, 0x00, + 0x6a, 0x00, 0x38, 0x0e, 0x00, 0x76, 0x00, 0x70, 0x0e, 0x00, 0x3c, 0x00, + 0x70, 0x1e, 0x00, 0x00, 0x00, 0x78, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0xfc, + 0xff, 0xff, 0xff, 0x3f}; diff --git a/app/bitmap/bitmaps/FlipHoriz b/app/bitmap/bitmaps/FlipHoriz new file mode 100644 index 000000000..a72da3d82 --- /dev/null +++ b/app/bitmap/bitmaps/FlipHoriz @@ -0,0 +1,13 @@ +#define FlipHoriz_width 30 +#define FlipHoriz_height 30 +static char FlipHoriz_bits[] = { + 0x00, 0x80, 0x07, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x80, 0x1d, 0x00, + 0x00, 0x80, 0x3b, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0xee, 0x00, + 0x00, 0x00, 0xdc, 0x01, 0xc0, 0xff, 0xbf, 0x03, 0xe0, 0xff, 0x5f, 0x07, + 0xb0, 0xaa, 0xaa, 0x0e, 0x58, 0x55, 0x55, 0x1d, 0xac, 0xaa, 0xaa, 0x0e, + 0xfe, 0xff, 0x5f, 0x07, 0xff, 0xff, 0xbf, 0x03, 0x6b, 0x00, 0xdc, 0x01, + 0x77, 0x00, 0xee, 0x00, 0x6b, 0x00, 0x77, 0x00, 0x77, 0x80, 0x3b, 0x00, + 0x6b, 0x80, 0x1d, 0x00, 0x77, 0x80, 0x0f, 0x00, 0x6b, 0x80, 0x07, 0x00, + 0xff, 0x1f, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0xac, 0x06, 0x00, 0x00, + 0x58, 0x03, 0x00, 0x00, 0xb0, 0x06, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, + 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/app/bitmap/bitmaps/FlipVert b/app/bitmap/bitmaps/FlipVert new file mode 100644 index 000000000..f5df65b28 --- /dev/null +++ b/app/bitmap/bitmaps/FlipVert @@ -0,0 +1,13 @@ +#define FlipVert_width 30 +#define FlipVert_height 30 +static char FlipVert_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, + 0x00, 0x1f, 0x00, 0x00, 0x80, 0x3b, 0x00, 0x00, 0xc0, 0x75, 0x00, 0x00, + 0xe0, 0xea, 0x00, 0x00, 0x70, 0xd5, 0x01, 0x00, 0xb8, 0xaa, 0x03, 0x00, + 0xdc, 0x75, 0x07, 0x00, 0xee, 0xfb, 0x0e, 0x00, 0xf7, 0xf5, 0x1d, 0x00, + 0xbb, 0xbb, 0x1b, 0x00, 0x9f, 0x35, 0x1f, 0x00, 0x8f, 0x3b, 0x1e, 0x00, + 0x80, 0x35, 0x00, 0x00, 0x80, 0x3b, 0x00, 0x00, 0x80, 0x35, 0x20, 0x08, + 0x80, 0x3b, 0x60, 0x0c, 0x80, 0x35, 0xe0, 0x0e, 0x80, 0x3b, 0xe0, 0x0f, + 0x80, 0x35, 0x60, 0x0d, 0x80, 0x3b, 0xe0, 0x0e, 0x80, 0xf5, 0x7f, 0x0d, + 0x00, 0xfb, 0xff, 0x06, 0x00, 0xb6, 0x6a, 0x03, 0x00, 0x7c, 0xf5, 0x01, + 0x00, 0xb8, 0xea, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00}; diff --git a/app/bitmap/bitmaps/Fold b/app/bitmap/bitmaps/Fold new file mode 100644 index 000000000..ea59a19c0 --- /dev/null +++ b/app/bitmap/bitmaps/Fold @@ -0,0 +1,13 @@ +#define Fold_width 30 +#define Fold_height 30 +static char Fold_bits[] = { + 0xff, 0x3f, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, 0x57, 0xf5, 0xab, 0x3a, + 0xab, 0xff, 0x7f, 0x35, 0xd7, 0x3f, 0xff, 0x3a, 0xab, 0x03, 0x70, 0x35, + 0x57, 0x07, 0xb8, 0x3a, 0xbb, 0x0e, 0x5c, 0x37, 0x7f, 0x1d, 0xae, 0x3f, + 0xfb, 0x3a, 0xd7, 0x37, 0xdf, 0xf5, 0xeb, 0x3e, 0x9b, 0xeb, 0x75, 0x36, + 0x1f, 0xd7, 0x3a, 0x3e, 0x1f, 0xae, 0x1d, 0x3e, 0x0e, 0xfc, 0x0e, 0x1c, + 0x0e, 0xdc, 0x0f, 0x1c, 0x1f, 0x6e, 0x1d, 0x3e, 0x1f, 0xd7, 0x3a, 0x3e, + 0x9b, 0xeb, 0x75, 0x36, 0xdf, 0xf5, 0xeb, 0x3e, 0xfb, 0x3a, 0xd7, 0x37, + 0x7f, 0x1d, 0xae, 0x3f, 0xbb, 0x0e, 0x5c, 0x37, 0x57, 0x07, 0xb8, 0x3a, + 0xab, 0x03, 0x70, 0x35, 0xd7, 0x3f, 0xff, 0x3a, 0xab, 0xff, 0x7f, 0x35, + 0x57, 0xf5, 0xab, 0x3a, 0xff, 0xff, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f}; diff --git a/app/bitmap/bitmaps/Left b/app/bitmap/bitmaps/Left new file mode 100644 index 000000000..5c7f14190 --- /dev/null +++ b/app/bitmap/bitmaps/Left @@ -0,0 +1,13 @@ +#define Left_width 30 +#define Left_height 30 +static char Left_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, + 0x00, 0x37, 0x00, 0x00, 0x80, 0x3b, 0x00, 0x00, 0xc0, 0x1d, 0x00, 0x00, + 0xe0, 0x0e, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0xb8, 0xff, 0xff, 0x1f, + 0x5c, 0xff, 0xff, 0x0f, 0xae, 0xaa, 0xaa, 0x06, 0x57, 0x55, 0x55, 0x03, + 0xae, 0xaa, 0xaa, 0x06, 0x5c, 0xff, 0xff, 0x0f, 0xb8, 0xff, 0xff, 0x1f, + 0x70, 0x07, 0x00, 0x00, 0xe0, 0x0e, 0x00, 0x00, 0xc0, 0x1d, 0x00, 0x00, + 0x80, 0x3b, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, + 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/app/bitmap/bitmaps/Right b/app/bitmap/bitmaps/Right new file mode 100644 index 000000000..d751a5f2d --- /dev/null +++ b/app/bitmap/bitmaps/Right @@ -0,0 +1,13 @@ +#define Right_width 30 +#define Right_height 30 +static char Right_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, + 0x00, 0x80, 0x0f, 0x00, 0x00, 0x80, 0x1d, 0x00, 0x00, 0x80, 0x3b, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0xee, 0x00, 0x00, 0x00, 0xdc, 0x01, + 0xff, 0xff, 0xbf, 0x03, 0xfe, 0xff, 0x5f, 0x07, 0xac, 0xaa, 0xaa, 0x0e, + 0x58, 0x55, 0x55, 0x1d, 0xac, 0xaa, 0xaa, 0x0e, 0xfe, 0xff, 0x5f, 0x07, + 0xff, 0xff, 0xbf, 0x03, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00, 0xee, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x80, 0x3b, 0x00, 0x00, 0x80, 0x1d, 0x00, + 0x00, 0x80, 0x0f, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/app/bitmap/bitmaps/RotateLeft b/app/bitmap/bitmaps/RotateLeft new file mode 100644 index 000000000..c4d4b1440 --- /dev/null +++ b/app/bitmap/bitmaps/RotateLeft @@ -0,0 +1,13 @@ +#define RotateLeft_width 30 +#define RotateLeft_height 30 +static char RotateLeft_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, + 0x00, 0x6e, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x80, 0x3b, 0x00, 0x00, + 0xc0, 0x1d, 0x00, 0x00, 0xe0, 0x0e, 0x00, 0x00, 0x70, 0xff, 0x0f, 0x00, + 0xb8, 0xfe, 0x1f, 0x00, 0x5c, 0x55, 0x35, 0x00, 0xae, 0xaa, 0x6a, 0x00, + 0x5c, 0x55, 0xd5, 0x00, 0xb8, 0xfe, 0xff, 0x01, 0x70, 0xff, 0xff, 0x03, + 0xe0, 0x0e, 0x58, 0x03, 0xc0, 0x1d, 0xb8, 0x03, 0x80, 0x3b, 0x58, 0x03, + 0x00, 0x77, 0xb8, 0x03, 0x00, 0x6e, 0x58, 0x03, 0x00, 0x7c, 0xb8, 0x03, + 0x00, 0x78, 0x58, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00, 0x00, 0x58, 0x03, + 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00, 0x00, 0x18, 0x03, + 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/app/bitmap/bitmaps/RotateRight b/app/bitmap/bitmaps/RotateRight new file mode 100644 index 000000000..d54f3c78c --- /dev/null +++ b/app/bitmap/bitmaps/RotateRight @@ -0,0 +1,13 @@ +#define RotateRight_width 30 +#define RotateRight_height 30 +static char RotateRight_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x80, 0x0f, 0x00, + 0x00, 0x80, 0x1d, 0x00, 0x00, 0x80, 0x3b, 0x00, 0x00, 0x00, 0x77, 0x00, + 0x00, 0x00, 0xee, 0x00, 0x00, 0x00, 0xdc, 0x01, 0x00, 0xfc, 0xbf, 0x03, + 0x00, 0xfe, 0x5f, 0x07, 0x00, 0xab, 0xaa, 0x0e, 0x80, 0x55, 0x55, 0x1d, + 0xc0, 0xaa, 0xaa, 0x0e, 0xe0, 0xff, 0x5f, 0x07, 0xf0, 0xff, 0xbf, 0x03, + 0xb0, 0x06, 0xdc, 0x01, 0x70, 0x07, 0xee, 0x00, 0xb0, 0x06, 0x77, 0x00, + 0x70, 0x87, 0x3b, 0x00, 0xb0, 0x86, 0x1d, 0x00, 0x70, 0x87, 0x0f, 0x00, + 0xb0, 0x86, 0x07, 0x00, 0x70, 0x07, 0x00, 0x00, 0xb0, 0x06, 0x00, 0x00, + 0xf0, 0x07, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, + 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/app/bitmap/bitmaps/Stipple b/app/bitmap/bitmaps/Stipple new file mode 100644 index 000000000..d412e655c --- /dev/null +++ b/app/bitmap/bitmaps/Stipple @@ -0,0 +1,4 @@ +#define Stipple_width 2 +#define Stipple_height 2 +static char Stipple_bits[] = { + 0x01, 0x00}; diff --git a/app/bitmap/bitmaps/Term b/app/bitmap/bitmaps/Term new file mode 100644 index 000000000..19ec39979 --- /dev/null +++ b/app/bitmap/bitmaps/Term @@ -0,0 +1,14 @@ +#define Term_width 32 +#define Term_height 32 +static char Term_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x20, + 0xe4, 0xff, 0xff, 0x27, 0x14, 0x00, 0x00, 0x28, 0x14, 0x80, 0x01, 0x28, + 0x14, 0x80, 0x01, 0x28, 0x14, 0x80, 0x01, 0x28, 0x14, 0x80, 0x01, 0x28, + 0x14, 0x80, 0x01, 0x28, 0x14, 0x80, 0x01, 0x28, 0x14, 0x80, 0x00, 0x28, + 0x14, 0x80, 0x00, 0x28, 0x14, 0x80, 0x00, 0x28, 0x14, 0x80, 0x00, 0x28, + 0x14, 0x00, 0x00, 0x28, 0x14, 0x80, 0x00, 0x28, 0x14, 0x00, 0x00, 0x28, + 0xe4, 0xff, 0xff, 0x27, 0x04, 0x00, 0x00, 0x20, 0xf8, 0xff, 0xff, 0x1f, + 0xfe, 0xff, 0xff, 0x7f, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, + 0x02, 0x00, 0xc0, 0x5f, 0x02, 0x00, 0x00, 0x40, 0xfa, 0xff, 0xff, 0x5f, + 0xae, 0xaa, 0xaa, 0x6a, 0x56, 0x55, 0x55, 0x55, 0xab, 0xaa, 0xaa, 0xea, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00}; diff --git a/app/bitmap/bitmaps/Up b/app/bitmap/bitmaps/Up new file mode 100644 index 000000000..423103f98 --- /dev/null +++ b/app/bitmap/bitmaps/Up @@ -0,0 +1,13 @@ +#define Up_width 30 +#define Up_height 30 +static char Up_bits[] = { + 0x00, 0x40, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, + 0x00, 0xb8, 0x03, 0x00, 0x00, 0x5c, 0x07, 0x00, 0x00, 0xae, 0x0e, 0x00, + 0x00, 0x57, 0x1d, 0x00, 0x80, 0xab, 0x3a, 0x00, 0xc0, 0x5d, 0x77, 0x00, + 0xe0, 0xbe, 0xef, 0x00, 0x70, 0x5f, 0xdf, 0x01, 0xb0, 0xbb, 0xbb, 0x01, + 0xf0, 0x59, 0xf3, 0x01, 0xf0, 0xb8, 0xe3, 0x01, 0x00, 0x58, 0x03, 0x00, + 0x00, 0xb8, 0x03, 0x00, 0x00, 0x58, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00, + 0x00, 0x58, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00, 0x00, 0x58, 0x03, 0x00, + 0x00, 0xb8, 0x03, 0x00, 0x00, 0x58, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00, + 0x00, 0x58, 0x03, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00, + 0x00, 0x18, 0x03, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/app/bitmap/configure b/app/bitmap/configure index 880085f32..a89be3d17 100644 --- a/app/bitmap/configure +++ b/app/bitmap/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for bitmap 1.0.9. +# Generated by GNU Autoconf 2.69 for bitmap 1.1.0. # # Report bugs to <https://gitlab.freedesktop.org/xorg/app/bitmap/issues>. # @@ -581,8 +581,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='bitmap' PACKAGE_TARNAME='bitmap' -PACKAGE_VERSION='1.0.9' -PACKAGE_STRING='bitmap 1.0.9' +PACKAGE_VERSION='1.1.0' +PACKAGE_STRING='bitmap 1.1.0' PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/app/bitmap/issues' PACKAGE_URL='' @@ -737,6 +737,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -824,6 +825,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1076,6 +1078,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1213,7 +1224,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1326,7 +1337,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures bitmap 1.0.9 to adapt to many kinds of systems. +\`configure' configures bitmap 1.1.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1366,6 +1377,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1396,7 +1408,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bitmap 1.0.9:";; + short | recursive ) echo "Configuration of bitmap 1.1.0:";; esac cat <<\_ACEOF @@ -1521,7 +1533,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -bitmap configure 1.0.9 +bitmap configure 1.1.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1845,7 +1857,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bitmap $as_me 1.0.9, which was +It was created by bitmap $as_me 1.1.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2674,7 +2686,7 @@ fi # Define the identity of the package. PACKAGE='bitmap' - VERSION='1.0.9' + VERSION='1.1.0' cat >>confdefs.h <<_ACEOF @@ -10770,8 +10782,8 @@ LIBS="$save_LIBS" # Obtain compiler/linker options from dependencies pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BMTOA" >&5 -$as_echo_n "checking for BMTOA... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x11 xmu xproto >= 7.0.17" >&5 +$as_echo_n "checking for x11 xmu xproto >= 7.0.17... " >&6; } if test -n "$BMTOA_CFLAGS"; then pkg_cv_BMTOA_CFLAGS="$BMTOA_CFLAGS" @@ -10811,7 +10823,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -10838,7 +10850,7 @@ Alternatively, you may set the environment variables BMTOA_CFLAGS and BMTOA_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -10861,8 +10873,8 @@ $as_echo "yes" >&6; } fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATOBM" >&5 -$as_echo_n "checking for ATOBM... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xproto >= 7.0.25" >&5 +$as_echo_n "checking for xproto >= 7.0.25... " >&6; } if test -n "$ATOBM_CFLAGS"; then pkg_cv_ATOBM_CFLAGS="$ATOBM_CFLAGS" @@ -10902,7 +10914,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -10929,7 +10941,7 @@ Alternatively, you may set the environment variables ATOBM_CFLAGS and ATOBM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -10952,8 +10964,8 @@ $as_echo "yes" >&6; } fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BITMAP" >&5 -$as_echo_n "checking for BITMAP... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xbitmaps xaw7 xmu" >&5 +$as_echo_n "checking for xbitmaps xaw7 xmu... " >&6; } if test -n "$BITMAP_CFLAGS"; then pkg_cv_BITMAP_CFLAGS="$BITMAP_CFLAGS" @@ -10993,7 +11005,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -11020,7 +11032,7 @@ Alternatively, you may set the environment variables BITMAP_CFLAGS and BITMAP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -11044,8 +11056,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for APPDEFS" >&5 -$as_echo_n "checking for APPDEFS... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xt" >&5 +$as_echo_n "checking for xt... " >&6; } if test -n "$APPDEFS_CFLAGS"; then pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" @@ -11085,7 +11097,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -11112,7 +11124,7 @@ Alternatively, you may set the environment variables APPDEFS_CFLAGS and APPDEFS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -11146,6 +11158,8 @@ fi ac_config_files="$ac_config_files Makefile man/Makefile" +ac_config_files="$ac_config_files test/round-trip-test" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -11680,7 +11694,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bitmap $as_me 1.0.9, which was +This file was extended by bitmap $as_me 1.1.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11746,7 +11760,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -bitmap config.status 1.0.9 +bitmap config.status 1.1.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -11879,6 +11893,7 @@ do "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; + "test/round-trip-test") CONFIG_FILES="$CONFIG_FILES test/round-trip-test" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -12567,6 +12582,7 @@ $as_echo X"$file" | done } ;; + "test/round-trip-test":F) chmod +x test/round-trip-test ;; esac done # for ac_tag diff --git a/app/bitmap/configure.ac b/app/bitmap/configure.ac index 2770deb37..9f84e2294 100644 --- a/app/bitmap/configure.ac +++ b/app/bitmap/configure.ac @@ -23,13 +23,13 @@ dnl Process this file with autoconf to create configure. # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([bitmap], [1.0.9], +AC_INIT([bitmap], [1.1.0], [https://gitlab.freedesktop.org/xorg/app/bitmap/issues], [bitmap]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) # Initialize Automake -AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_INIT_AUTOMAKE([foreign dist-xz]) # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS m4_ifndef([XORG_MACROS_VERSION], @@ -68,4 +68,5 @@ AC_SUBST(appdefaultdir) AC_CONFIG_FILES([Makefile man/Makefile]) +AC_CONFIG_FILES([test/round-trip-test], [chmod +x test/round-trip-test]) AC_OUTPUT diff --git a/app/bitmap/man/Makefile.in b/app/bitmap/man/Makefile.in index d6d58ed67..4346b0a3a 100644 --- a/app/bitmap/man/Makefile.in +++ b/app/bitmap/man/Makefile.in @@ -253,6 +253,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/app/bitmap/man/bitmap.man b/app/bitmap/man/bitmap.man index 31f94d775..924b8b3e5 100644 --- a/app/bitmap/man/bitmap.man +++ b/app/bitmap/man/bitmap.man @@ -176,7 +176,7 @@ To edit a bitmap image simply click on one of the buttons with drawing commands (\fBPoint, Curve, Line, Rectangle,\fP etc.) and move the pointer into the bitmap grid window. Press one of the buttons on your mouse and the appropriate action will take place. You can either set, -clear or invert the gird squares. Setting a grid square corresponds +clear or invert the grid squares. Setting a grid square corresponds to setting a bit in the bitmap image to 1. Clearing a grid square corresponds to setting a bit in the bitmap image to 0. Inverting a grid square corresponds to changing a bit in the bitmap image from 0 to @@ -323,7 +323,7 @@ is slow or\fI bitmap\fP receives very few mouse motion events, it might behave quite strangely. .TP 4 .B Line -This command will change the gird squares in a line between two squares. +This command will change the grid squares in a line between two squares. Once you press a mouse button in the grid window,\fI bitmap\fP will highlight the line from the square where the mouse button was initially pressed to the square where the mouse pointer is located. By releasing the @@ -331,7 +331,7 @@ mouse button you will cause the change to take effect, and the highlighted line will disappear. .TP 4 .B Rectangle -This command will change the gird squares in a rectangle between two squares. +This command will change the grid squares in a rectangle between two squares. Once you press a mouse button in the grid window,\fI bitmap\fP will highlight the rectangle from the square where the mouse button was initially pressed to the square where the mouse pointer is located. By releasing the @@ -343,7 +343,7 @@ This command is identical to\fB Rectangle\fP, except at the end the rectangle will be filled rather than outlined. .TP 4 .B Circle -This command will change the gird squares in a circle between two squares. +This command will change the grid squares in a circle between two squares. Once you press a mouse button in the grid window,\fI bitmap\fP will highlight the circle from the square where the mouse button was initially pressed to the square where the mouse pointer is located. By releasing the diff --git a/app/bitmap/test-driver b/app/bitmap/test-driver new file mode 100644 index 000000000..8e575b017 --- /dev/null +++ b/app/bitmap/test-driver @@ -0,0 +1,148 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2013-07-13.22; # UTC + +# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <<END +Usage: + test-driver --test-name=NAME --log-file=PATH --trs-file=PATH + [--expect-failure={yes|no}] [--color-tests={yes|no}] + [--enable-hard-errors={yes|no}] [--] + TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] +The '--test-name', '--log-file' and '--trs-file' options are mandatory. +END +} + +test_name= # Used for reporting. +log_file= # Where to save the output of the test script. +trs_file= # Where to save the metadata of the test run. +expect_failure=no +color_tests=no +enable_hard_errors=yes +while test $# -gt 0; do + case $1 in + --help) print_usage; exit $?;; + --version) echo "test-driver $scriptversion"; exit $?;; + --test-name) test_name=$2; shift;; + --log-file) log_file=$2; shift;; + --trs-file) trs_file=$2; shift;; + --color-tests) color_tests=$2; shift;; + --expect-failure) expect_failure=$2; shift;; + --enable-hard-errors) enable_hard_errors=$2; shift;; + --) shift; break;; + -*) usage_error "invalid option: '$1'";; + *) break;; + esac + shift +done + +missing_opts= +test x"$test_name" = x && missing_opts="$missing_opts --test-name" +test x"$log_file" = x && missing_opts="$missing_opts --log-file" +test x"$trs_file" = x && missing_opts="$missing_opts --trs-file" +if test x"$missing_opts" != x; then + usage_error "the following mandatory options are missing:$missing_opts" +fi + +if test $# -eq 0; then + usage_error "missing argument" +fi + +if test $color_tests = yes; then + # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'. + red='[0;31m' # Red. + grn='[0;32m' # Green. + lgn='[1;32m' # Light green. + blu='[1;34m' # Blue. + mgn='[0;35m' # Magenta. + std='[m' # No color. +else + red= grn= lgn= blu= mgn= std= +fi + +do_exit='rm -f $log_file $trs_file; (exit $st); exit $st' +trap "st=129; $do_exit" 1 +trap "st=130; $do_exit" 2 +trap "st=141; $do_exit" 13 +trap "st=143; $do_exit" 15 + +# Test script is run here. +"$@" >$log_file 2>&1 +estatus=$? + +if test $enable_hard_errors = no && test $estatus -eq 99; then + tweaked_estatus=1 +else + tweaked_estatus=$estatus +fi + +case $tweaked_estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>$log_file + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/app/bitmap/test/round-trip-test.in b/app/bitmap/test/round-trip-test.in new file mode 100644 index 000000000..788ac2eb2 --- /dev/null +++ b/app/bitmap/test/round-trip-test.in @@ -0,0 +1,27 @@ +#! /bin/sh + +prefix="@prefix@" +builddir="@builddir@" +BITMAP_SRC="${srcdir}/bitmaps" +BITMAP_INC="@includedir@/X11/bitmaps" + +error_count=0 +for bm in ${BITMAP_SRC}/* ${BITMAP_INC}/* ; do + if [ -f ${bm} ] ; then + echo ${bm} + bmbase="$(basename ${bm})" + ${builddir}/bmtoa "${bm}" > bma.out + error_count=$(( error_count + $? )) + ${builddir}/atobm -name "${bmbase}" bma.out > abm.out + error_count=$(( error_count + $? )) + ${builddir}/bmtoa abm.out > bma.out.2 + error_count=$(( error_count + $? )) + cmp bma.out bma.out.2 + if [[ $? != 0 ]] ; then + exit 1 + fi + rm abm.out bma.out bma.out.2 + fi +done + +exit $error_count |