v13i038: catcher -- drag and drop manager, Patch2, Part01/01
Chuck Musciano
chuck at trantor.harris-atd.com
Sun May 26 07:49:24 AEST 1991
Submitted-by: Chuck Musciano <chuck at trantor.harris-atd.com>
Posting-number: Volume 13, Issue 38
Archive-name: catcher/patch2
Patch-To: catcher: Volume 11, Issue 6-10, 76 (1/29/91, 2/14/91)
This shar file contains patch 2 to catcher, bringing it to version
1.0b.
This patch fixes a few minor bugs, including a problem with text
field initialization, and enhances the Makefile somewhat. Full details
are in the README file.
You'll need catcher 1.0a to apply this patch.
Chuck Musciano ARPA : chuck at trantor.harris-atd.com
Harris Corporation Usenet: ...!uunet!x102a!trantor!chuck
PO Box 37, MS 3A/1912 AT&T : (407) 727-6131
Melbourne, FL 32902 FAX : (407) 729-3363
A good newspaper is never good enough,
but a lousy newspaper is a joy forever. -- Garrison Keillor
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell archive."
# Contents: patch
# Wrapped by chuck at pluto on Thu May 23 12:27:49 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'patch' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'patch'\"
else
echo shar: Extracting \"'patch'\" \(9101 characters\)
sed "s/^X//" >'patch' <<'END_OF_FILE'
X*** Makefile.orig Thu May 23 12:19:50 1991
X--- Makefile Thu May 23 12:19:33 1991
X***************
X*** 15,27 ****
X LDFLAGS = -L$(OPENWINHOME)/lib
X
X # Where your XView include files are installed
X! CPPFLAGS = -I$(OPENWINHOME)/include -DMAILER=\"$(MAILER)\"
X
X # Command to use to print the manual (must honor -P option to set printer)
X PRINT = lpr
X
X # PostScript printer to use
X! PRINTER = lw
X
X CATCHER = busy.o catcher.o execute.o load_icon.o misc.o option.o panel.o parse.o place_dialog.o process.o
X
X--- 15,27 ----
X LDFLAGS = -L$(OPENWINHOME)/lib
X
X # Where your XView include files are installed
X! CPPFLAGS = -I$(OPENWINHOME)/include
X
X # Command to use to print the manual (must honor -P option to set printer)
X PRINT = lpr
X
X # PostScript printer to use
X! PRINTER = $${PRINTER:-lw}
X
X CATCHER = busy.o catcher.o execute.o load_icon.o misc.o option.o panel.o parse.o place_dialog.o process.o
X
X*** Imakefile.orig Thu May 23 12:19:51 1991
X--- Imakefile Wed Jan 30 10:30:33 1991
X***************
X*** 5,17 ****
X PRINT = lpr
X
X # PostScript printer to use
X! PRINTER = lw
X
X LOCAL_LIBRARIES = -lxview -lolgx $(XLIB)
X
X LDOPTIONS = -L$(OPENWINHOME)/lib
X
X! CFLAGS = -O -I$(OPENWINHOME)/include
X
X SRCS = busy.c catcher.c execute.c load_icon.c misc.c option.c panel.c parse.y place_dialog.c process.c
X
X--- 5,21 ----
X PRINT = lpr
X
X # PostScript printer to use
X! PRINTER = $${PRINTER:-lw}
X
X+ ICON_PATH = "\".:./icons:$(LIBDIR)/images:/usr/include/images\""
X+
X LOCAL_LIBRARIES = -lxview -lolgx $(XLIB)
X
X LDOPTIONS = -L$(OPENWINHOME)/lib
X
X! INCLUDES = -I$(OPENWINHOME)/include
X!
X! DEFINES = -DICON_PATH=$(ICON_PATH)
X
X SRCS = busy.c catcher.c execute.c load_icon.c misc.c option.c panel.c parse.y place_dialog.c process.c
X
X*** README.orig Thu May 23 12:19:52 1991
X--- README Thu May 23 12:04:29 1991
X***************
X*** 17,23 ****
X /* without prior permission from Harris Corporation. */
X /************************************************************************/
X
X! Catcher Version 1.0
X
X Catcher is a tool that allows you to build windowed tools that can
X catch drag and drop files dragged from other windowed tools. Catcher
X--- 17,23 ----
X /* without prior permission from Harris Corporation. */
X /************************************************************************/
X
X! Catcher Version 1.0b
X
X Catcher is a tool that allows you to build windowed tools that can
X catch drag and drop files dragged from other windowed tools. Catcher
X***************
X*** 113,115 ****
X--- 113,121 ----
X Corrected bug in parser
X Corrected handling of suffix string
X Renamed ungetc to last_char in lex.c
X+
X+ 1.0b 23 May 91 Patch 2
X+ Enhanced Imakefile (thanks to Rainer Sinkwitz)
X+ Warp caret to parameter of selected choice
X+ (thanks to Rainer Sinkwitz)
X+ Fixed bug in text item init (J Q Johnson)
X*** catcher.c.orig Thu May 23 12:19:54 1991
X--- catcher.c Thu May 23 12:15:49 1991
X***************
X*** 178,183 ****
X--- 178,184 ----
X exit(1);
X
X base = (Frame) xv_create(NULL, FRAME,
X+ XV_HEIGHT, 900,
X FRAME_LABEL, config.label,
X FRAME_SHOW_RESIZE_CORNER, FALSE,
X FRAME_SHOW_FOOTER, config.message != NULL,
X***************
X*** 236,242 ****
X
X /* fix all the panel widths */
X for (w = 0, cmd = config.command; cmd; cmd = cmd->next) {
X! window_fit(cmd->panel);
X if (w < xv_get(cmd->panel, XV_WIDTH))
X w = (int) xv_get(cmd->panel, XV_WIDTH);
X }
X--- 237,243 ----
X
X /* fix all the panel widths */
X for (w = 0, cmd = config.command; cmd; cmd = cmd->next) {
X! window_fit_width(cmd->panel);
X if (w < xv_get(cmd->panel, XV_WIDTH))
X w = (int) xv_get(cmd->panel, XV_WIDTH);
X }
X*** load_icon.c.orig Thu May 23 12:19:58 1991
X--- load_icon.c Thu May 23 11:59:02 1991
X***************
X*** 29,35 ****
X #define ICON_PATH ".:./icons:/usr/local/images:/usr/include/images"
X #endif
X
X! PUBLIC char *getenv();
X
X /************************************************************************/
X EXPORT Server_image load_icon(path, message)
X--- 29,35 ----
X #define ICON_PATH ".:./icons:/usr/local/images:/usr/include/images"
X #endif
X
X! PUBLIC char *getenv(), *index();
X
X /************************************************************************/
X EXPORT Server_image load_icon(path, message)
X*** misc.c.orig Thu May 23 12:19:59 1991
X--- misc.c Fri May 17 09:15:00 1991
X***************
X*** 50,97 ****
X }
X
X /************************************************************************/
X- PRIVATE delarg(argc, argv)
X-
X- int *argc;
X- char **argv;
X-
X- { char *p;
X-
X- while (*argv = *(argv+1))
X- argv++;
X- (*argc)--;
X- }
X-
X- /************************************************************************/
X- EXPORT char getopt(argc, argv, opts, parm)
X-
X- int *argc;
X- char **argv;
X- char *opts;
X- char **parm;
X-
X- { char c, *p, *index();
X- int killed;
X-
X- *parm = NULL;
X- while (*argv && ((**argv != '-') || (*(*argv+1) == '\0')))
X- argv++;
X- if (*argv == NULL)
X- return(EOF);
X- c = *(*argv+1);
X- *++(*argv) = '-';
X- if (killed = (*(*argv+1) == '\0'))
X- delarg(argc, argv);
X- if ((p = index(opts, c)) == NULL)
X- c = '\0';
X- else if (*(p+1) == ':') {
X- *parm = killed ? *argv : *argv+1;
X- delarg(argc, argv);
X- }
X- return(c);
X- }
X-
X- /************************************************************************/
X EXPORT int is_empty(s)
X
X char *s;
X--- 50,55 ----
X*** option.c.orig Thu May 23 12:20:00 1991
X--- option.c Fri Mar 15 08:16:47 1991
X***************
X*** 31,36 ****
X--- 31,38 ----
X #include "manifest.h"
X #include "catcher.h"
X
X+ #define PREVIOUS_VALUE 280006631
X+
X /************************************************************************/
X PRIVATE choice_toggle(item, value, event)
X
X***************
X*** 40,54 ****
X
X { Option *opt;
X Choice *c;
X! int i;
X
X opt = (Option *) xv_get(item, PANEL_CLIENT_DATA);
X for (i = 0, c = opt->choice; c; i++, c = c->next)
X if (c->item)
X! if (opt->type == OPT_EXCLUSIVE)
X xv_set(c->item, PANEL_INACTIVE, value != i, NULL);
X! else
X xv_set(c->item, PANEL_INACTIVE, !(value & (1 << i)), NULL);
X }
X
X /************************************************************************/
X--- 42,69 ----
X
X { Option *opt;
X Choice *c;
X! int i, prev;
X
X opt = (Option *) xv_get(item, PANEL_CLIENT_DATA);
X+ if (opt->type == OPT_NONEXCLUSIVE) {
X+ prev = (int) xv_get(item, XV_KEY_DATA, PREVIOUS_VALUE);
X+ prev ^= value;
X+ if ((prev & value) == 0)
X+ prev = 0;
X+ xv_set(item, XV_KEY_DATA, PREVIOUS_VALUE, value, NULL);
X+ }
X for (i = 0, c = opt->choice; c; i++, c = c->next)
X if (c->item)
X! if (opt->type == OPT_EXCLUSIVE) {
X xv_set(c->item, PANEL_INACTIVE, value != i, NULL);
X! if (value == i)
X! xv_set(xv_get(c->item, XV_OWNER), PANEL_CARET_ITEM, c->item, NULL);
X! }
X! else {
X xv_set(c->item, PANEL_INACTIVE, !(value & (1 << i)), NULL);
X+ if ((1 << i) & prev)
X+ xv_set(xv_get(c->item, XV_OWNER), PANEL_CARET_ITEM, c->item, NULL);
X+ }
X }
X
X /************************************************************************/
X***************
X*** 118,123 ****
X--- 133,139 ----
X PANEL_LABEL_BOLD, TRUE,
X PANEL_VALUE_DISPLAY_LENGTH, opt->text.length,
X PANEL_VALUE_STORED_LENGTH, 10 * opt->text.length,
X+ PANEL_VALUE, opt->text.text_init? opt->text.text_init : "",
X XV_X, X_MARGIN,
X XV_Y, option_y,
X NULL);
X***************
X*** 129,134 ****
X--- 145,151 ----
X PANEL_MAX_VALUE, opt->text.high,
X PANEL_VALUE_DISPLAY_LENGTH, opt->text.length,
X PANEL_VALUE_STORED_LENGTH, 10 * opt->text.length,
X+ PANEL_VALUE, opt->text.int_init,
X XV_X, X_MARGIN,
X XV_Y, option_y,
X NULL);
X***************
X*** 145,150 ****
X--- 162,169 ----
X if (c->parameter)
X create_text(panel, opt->item, i, c);
X xv_set(opt->item, PANEL_VALUE, val, NULL);
X+ if (opt->type == OPT_NONEXCLUSIVE)
X+ xv_set(opt->item, XV_KEY_DATA, PREVIOUS_VALUE, val, NULL);
X choice_toggle(opt->item, val, NULL);
X }
X }
X*** patchlevel.h.orig Thu May 23 12:20:02 1991
X--- patchlevel.h Thu May 23 11:46:46 1991
X***************
X*** 24,29 ****
X /* comp.sources.x: Volume 11, Issues 6-10 */
X /* */
X /* 1 Bug fixes; see README for details */
X! /* comp.sources.x: Volume 11, Issue ? */
X /* */
X /************************************************************************/
X--- 24,31 ----
X /* comp.sources.x: Volume 11, Issues 6-10 */
X /* */
X /* 1 Bug fixes; see README for details */
X! /* comp.sources.x: Volume 11, Issue 76 */
X! /* */
X! /* 2 Bug fixes; see README for details */
X /* */
X /************************************************************************/
END_OF_FILE
if test 9101 -ne `wc -c <'patch'`; then
echo shar: \"'patch'\" unpacked with wrong size!
fi
# end of 'patch'
fi
echo shar: End of shell archive.
exit 0
--
Dan Heller
O'Reilly && Associates Z-Code Software Comp-sources-x:
Senior Writer President comp-sources-x at uunet.uu.net
argv at ora.com argv at zipcode.com
More information about the Comp.sources.x
mailing list