diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | BitEdit.c | 44 | ||||
-rw-r--r-- | Bitmap.c | 2 | ||||
-rw-r--r-- | BitmapP.h | 2 | ||||
-rw-r--r-- | CutPaste.c | 1 | ||||
-rw-r--r-- | Handlers.c | 1 | ||||
-rw-r--r-- | Makefile.am | 23 | ||||
-rw-r--r-- | ReqMach.c | 1 | ||||
-rw-r--r-- | atobm.c | 2 | ||||
-rw-r--r-- | bmtoa.c | 2 | ||||
-rw-r--r-- | configure.ac | 21 |
11 files changed, 52 insertions, 51 deletions
@@ -25,3 +25,7 @@ install-sh missing stamp-h1 *~ +*.o +ChangeLog +bitmap-*.tar.* +tags @@ -682,7 +682,7 @@ break; /* ARGSUSED */ -void SwitchImage() +void SwitchImage(void) { if (image_visible) { XtPopdown(image_shell); @@ -709,32 +709,32 @@ void SwitchImage() } } -void SwitchGrid() +void SwitchGrid(void) { BWSwitchGrid(bitmap_widget); } -void SwitchDashed() +void SwitchDashed(void) { BWSwitchDashed(bitmap_widget); } -void SwitchAxes() +void SwitchAxes(void) { BWSwitchAxes(bitmap_widget); } -void SwitchStippled() +void SwitchStippled(void) { BWSwitchStippled(bitmap_widget); } -void SwitchProportional() +void SwitchProportional(void) { BWSwitchProportional(bitmap_widget); } -void SwitchZoom() +void SwitchZoom(void) { if (BWQueryZooming(bitmap_widget)) { BWZoomOut(bitmap_widget); @@ -752,7 +752,7 @@ void SwitchZoom() } } -void DoCut() +void DoCut(void) { BWStore(bitmap_widget); BWStoreToBuffer(bitmap_widget); @@ -762,19 +762,19 @@ void DoCut() BWSetChanged(bitmap_widget); } -void DoCopy() +void DoCopy(void) { BWStore(bitmap_widget); BWUnmark(bitmap_widget); } -void DoPaste() +void DoPaste(void) { BWRequestSelection(bitmap_widget, btime, TRUE); BWEngageRequest(bitmap_widget, RestoreRequest, False, Plain); } -void DoNew() +void DoNew(void) { BWGetFilename(bitmap_widget, &filename); if (PopupDialog(input_dialog, "New file:", @@ -791,7 +791,7 @@ void DoNew() } } -void DoLoad() +void DoLoad(void) { if (BWQueryChanged(bitmap_widget)) { BWGetFilename(bitmap_widget, &filename); @@ -830,7 +830,7 @@ void DoLoad() } } -void DoInsert() +void DoInsert(void) { BWGetFilepath(bitmap_widget, &filename); RetryInsert: @@ -848,7 +848,7 @@ void DoInsert() } } -void DoSave() +void DoSave(void) { BWGetFilename(bitmap_widget, &filename); if (!strcmp(filename, "")) @@ -864,7 +864,7 @@ void DoSave() } } -void DoSaveAs() +void DoSaveAs(void) { BWGetFilename(bitmap_widget, &filename); RetrySave: @@ -883,7 +883,7 @@ void DoSaveAs() } } -void DoResize() +void DoResize(void) { Dimension width, height; format = ""; @@ -905,7 +905,7 @@ void DoResize() } } -void DoRescale() +void DoRescale(void) { Dimension width, height; @@ -928,7 +928,7 @@ void DoRescale() } } -void DoFilename() +void DoFilename(void) { BWGetFilename(bitmap_widget, &filename); if (PopupDialog(input_dialog, "Change filename:", @@ -938,7 +938,7 @@ void DoFilename() } } -void DoBasename() +void DoBasename(void) { BWGetBasename(bitmap_widget, &base_name); if (PopupDialog(input_dialog, "Change basename:", @@ -948,11 +948,7 @@ void DoBasename() } } -void DoQuit(w, event, params, num_params) /* ARGSUSED */ - Widget w; - XEvent *event; - String *params; - Cardinal *num_params; +void DoQuit(Widget w, XEvent *event, String *params, Cardinal *num_params) { if (BWQueryChanged(bitmap_widget)) { BWGetFilename(bitmap_widget, &filename); @@ -229,7 +229,7 @@ static char translations2[] = set-changed()\n\ "; -Atom targets[] = { +static Atom targets[] = { XA_BITMAP, XA_PIXMAP }; @@ -208,4 +208,6 @@ XImage *ConvertToBitmapImage(BitmapWidget BW, XImage *image); XImage *ScaleBitmapImage(BitmapWidget BW, XImage *src, double scale_x, double scale_y); +extern Boolean DEBUG; + #endif /* _BitmapP_h */ @@ -44,7 +44,6 @@ from The Open Group. #define max(x, y) (((x) > (y)) ? (x) : (y)) -extern Boolean DEBUG; /***************************************************************************** * Cut and Paste * @@ -44,7 +44,6 @@ from The Open Group. #include "Requests.h" -extern Boolean DEBUG; /***************************************************************************** * Handlers * diff --git a/Makefile.am b/Makefile.am index 662d539..e3514e1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -59,34 +59,25 @@ appman_PRE = \ bitmap.man -# app default files - # App default files (*.ad) +DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults + appdefaultdir = @appdefaultdir@ -APPDEFAULTFILES = \ +dist_appdefault_DATA = \ app-defaults/Bitmap-color \ app-defaults/Bitmap-nocase \ app-defaults/Bitmap -SUFFIXES = .ad - -.ad: - [ -d app-defaults ] || mkdir app-defaults - cp $< $@ - -appdefault_DATA = $(APPDEFAULTFILES) - -EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) bitmap.icon ChangeLog autogen.sh -CLEANFILES = $(APPDEFAULTFILES) +EXTRA_DIST = bitmap.icon ChangeLog autogen.sh MAINTAINERCLEANFILES=ChangeLog .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + $(CHANGELOG_CMD) dist-hook: ChangeLog @@ -119,7 +110,7 @@ appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) \ BUILT_SOURCES = shadows.DONE EXTRA_DIST += $(appman_PRE) -CLEANFILES += $(appman_DATA) $(BUILT_SOURCES) +CLEANFILES = $(appman_DATA) $(BUILT_SOURCES) SED = sed @@ -140,7 +131,7 @@ MAN_SUBSTS = \ -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' -SUFFIXES += .$(APP_MAN_SUFFIX) .man +SUFFIXES = .$(APP_MAN_SUFFIX) .man .man.$(APP_MAN_SUFFIX): sed $(MAN_SUBSTS) < $< > $@ @@ -41,7 +41,6 @@ from The Open Group. #include <stdio.h> #include <math.h> -extern Boolean DEBUG; /*****************************************************************************\ * Request Machine: stacks up and handles requests from application calls. * @@ -38,7 +38,7 @@ from The Open Group. #include <X11/Xos.h> #include <stdlib.h> -char *ProgramName; +static char *ProgramName; static void doit(FILE *fp, char *filename, char *chars, int xhot, int yhot, char *name); @@ -51,7 +51,7 @@ from The Open Group. extern char *mktemp(); #endif -char *ProgramName; +static char *ProgramName; static void print_scanline (unsigned int width, unsigned int height, unsigned char *data, char *chars); diff --git a/configure.ac b/configure.ac index 0ccad46..7aca66d 100644 --- a/configure.ac +++ b/configure.ac @@ -26,22 +26,30 @@ AC_INIT(bitmap,[1.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) + AM_CONFIG_HEADER(config.h) AC_PROG_CC AM_PROG_CC_C_O AC_PROG_INSTALL +XORG_CWARNFLAGS + AC_CHECK_FUNC([mkstemp], - AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the `mkstemp' function.])) + AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the "mkstemp" function.])) # bmtoa checks for packages PKG_CHECK_MODULES(BMTOA, x11 xmu) +BMTOA_CFLAGS="$CWARNFLAGS $BMTOA_CFLAGS" AC_SUBST(BMTOA_CFLAGS) AC_SUBST(BMTOA_LIBS) # atobm checks for packages PKG_CHECK_MODULES(ATOBM, x11) +ATOBM_CFLAGS="$CWARNFLAGS $ATOBM_CFLAGS" AC_SUBST(ATOBM_CFLAGS) AC_SUBST(ATOBM_LIBS) @@ -49,19 +57,22 @@ AC_SUBST(ATOBM_LIBS) PKG_CHECK_MODULES(BITMAP, xaw7) PKG_CHECK_MODULES(XBITMAPS, xbitmaps) -BITMAP_CFLAGS="$BITMAP_CFLAGS $XBITMAPS_CFLAGS" +BITMAP_CFLAGS="$CWARNFLAGS $BITMAP_CFLAGS $XBITMAPS_CFLAGS" BITMAP_LIBS="$BITMAP_LIBS $XBITMAPS_LIBS" AC_SUBST(BITMAP_CFLAGS) AC_SUBST(BITMAP_LIBS) - - PKG_CHECK_MODULES(APPDEFS, xt) -appdefaultdir=$(pkg-config --variable=appdefaultdir xt) +xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt) +AC_ARG_WITH(appdefaultdir, + AC_HELP_STRING([--with-appdefaultdir=<pathname>], + [specify directory for app-defaults files (default is autodetected)]), + [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"]) AC_SUBST(appdefaultdir) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile]) |