home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.x
- Path: uunet!zaphod.mps.ohio-state.edu!mips!msi!dcmartin
- From: chuck@trantor.harris-atd.com (Chuck Musciano)
- Subject: v17i050: Contool 3.2a, Patch1, Part01/01 (REPOST)
- Message-ID: <1992Apr1.183344.15900@msi.com>
- Originator: dcmartin@fascet
- Sender: dcmartin@msi.com (David C. Martin - Moderator)
- Organization: Molecular Simulations, Inc.
- References: <csx-17i050-contool@uunet.UU.NET>
- Date: Wed, 1 Apr 1992 18:33:44 GMT
- Approved: dcmartin@msi.com
-
- [ The previous posting had some errors. My mistake. dcm ]
-
- Submitted-by: chuck@trantor.harris-atd.com (Chuck Musciano)
- Posting-number: Volume 17, Issue 50
- Archive-name: contool-3.2a/patch1
- Patch-To: contool-3.2a: Volume 16, Issue 106
-
- This patch moves contool from version 3.2a to version 3.2b. It
- creates Makefile.std to become compliant with the comp.sources.x
- posting standards, fixes a few bugs in the Makefile.std, corrects
- a minor imcompatibility with some compilers, and fixes a bug in
- the filter editing dialog.
-
- Chuck Musciano ARPA : chuck@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 (produced by shar 3.49)
- # To extract the files from this archive, save it to a file, remove
- # everything above the "!/bin/sh" line above, and type "sh file_name".
- #
- # made 03/24/1992 18:05 UTC by chuck@melmac
- # Source directory /export/home/chuck/projects/release/contool/3.2/patch01
- #
- # existing files will NOT be overwritten unless -c is specified
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 15920 -rw-rw-r-- patch
- #
- # ============= patch ==============
- if test -f 'patch' -a X"$1" != X"-c"; then
- echo 'x - skipping patch (File already exists)'
- else
- echo 'x - extracting patch (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'patch' &&
- *** Imakefile.orig Tue Mar 24 12:59:40 1992
- --- Imakefile Fri Mar 6 09:35:30 1992
- ***************
- *** 1,12 ****
- X # Mailer you use
- X MAILER = /usr/ucb/mail
- X
- - # Paths to be searched for icons
- - ICON_PATH = .:./icons:/usr/local/images:/usr/include/images
- -
- X # Where you installed Open Windows
- X OPENWINHOME = /usr/openwin
- X
- X # Where to install the help file
- X HELPDIR = /usr/local/lib/help
- X
- --- 1,12 ----
- X # Mailer you use
- X MAILER = /usr/ucb/mail
- X
- X # Where you installed Open Windows
- X OPENWINHOME = /usr/openwin
- X
- + # Paths to be searched for icons
- + ICON_PATH = .:./icons:/usr/local/images:/usr/include/images
- +
- X # Where to install the help file
- X HELPDIR = /usr/local/lib/help
- X
- ***************
- *** 17,23 ****
- X EXTRA_INCLUDES = -I$(OPENWINHOME)/include
- X
- X # Fix this if you don't want optimization
- ! CFLAGS = -O -DMAILER=\"$(MAILER)\" -DICON_PATH=\"$(ICON_PATH)\"
- X
- X SRCS = about.c archive.c busy.c contool.c contool_ui.c error.c expand.c filename_completion.c \
- X filters.c getopt.c load.c load_icon.c logging.c misc.c parse.y \
- --- 17,23 ----
- X EXTRA_INCLUDES = -I$(OPENWINHOME)/include
- X
- X # Fix this if you don't want optimization
- ! CDEBUGFLAGS = -O
- X
- X SRCS = about.c archive.c busy.c contool.c contool_ui.c error.c expand.c filename_completion.c \
- X filters.c getopt.c load.c load_icon.c logging.c misc.c parse.y \
- ***************
- *** 26,31 ****
- --- 26,33 ----
- X OBJS = about.o archive.o busy.o contool.o contool_ui.o error.o expand.o filename_completion.o \
- X filters.o getopt.o load.o load_icon.o logging.o misc.o parse.o \
- X pinned_menu_notify.o place_dialog.o props.o regexp.o send_mail.o store.o
- +
- + DEFINES = -DMAILER=\"$(MAILER)\" -DICON_PATH=\"$(ICON_PATH)\"
- X
- X LOCAL_LIBRARIES = -lxview -lolgx $(XLIB)
- X
- *** Makefile.std.orig Tue Mar 24 12:59:41 1992
- --- Makefile.std Tue Mar 24 12:57:28 1992
- ***************
- *** 0 ****
- --- 1,105 ----
- + # Where to put the executable
- + BIN = /usr/local/bin
- +
- + # Where to put the man page
- + MAN = /usr/man/manl
- + MANEXT = l
- +
- + # Mailer you use
- + MAILER = /usr/ucb/mail
- +
- + # Where you installed Open Windows
- + OPENWINHOME = /usr/openwin
- +
- + # Paths to be searched for icons
- + ICON_PATH = .:./icons:/usr/local/images:/usr/include/images
- +
- + # Where to install the help file
- + HELPDIR = /usr/local/lib/help
- +
- + # Where your XView libraries are installed
- + LDOPTIONS = -L$(OPENWINHOME)/lib
- +
- + # Where your XView include files are installed
- + EXTRA_INCLUDES = -I$(OPENWINHOME)/include
- +
- + # Fix this if you don't want optimization
- + CDEBUGFLAGS = -O
- +
- + CONTOOL = about.o archive.o busy.o contool.o contool_ui.o error.o expand.o filename_completion.o \
- + filters.o getopt.o load.o load_icon.o logging.o misc.o parse.o \
- + pinned_menu_notify.o place_dialog.o props.o regexp.o send_mail.o store.o
- +
- + DEFINES = -DMAILER=\"$(MAILER)\" -DICON_PATH=\"$(ICON_PATH)\"
- +
- + CFLAGS = $(CDEBUGFLAGS) $(DEFINES)
- +
- + LOCAL_LIBRARIES = -lxview -lolgx -lX
- +
- + .c.o:
- + cc $(CFLAGS) $(EXTRA_INCLUDES) -c $<
- +
- + .y.o:
- + yacc $<
- + cc $(CFLAGS) $(EXTRA_INCLUDES) -c -o $*.o y.tab.c
- + rm y.tab.c
- +
- + contool: $(CONTOOL)
- + cc $(CFLAGS) $(EXTRA_INCLUDES) -o contool $(CONTOOL) $(LDOPTIONS) $(LOCAL_LIBRARIES)
- +
- + install: contool $(MAN)/contool.$(MANEXT)
- + cp contool $(BIN)
- + chmod 755 $(BIN)/contool
- + cp contool.info $(HELPDIR)
- +
- + $(MAN)/contool.$(MANEXT): contool.man
- + cp -p contool.man $(MAN)/contool.$(MANEXT)
- +
- + clean:
- + rm -f *~ *.o contool core
- +
- + #dependencies
- +
- + about.o: contool_ui.h manifest.h
- +
- + archive.o: manifest.h contool.h contool_ui.h
- +
- + busy.o: manifest.h
- +
- + contool.o: manifest.h contool.h contool_ui.h icons/default_good.icon \
- + icons/default_bad.icon icons/default_flash.icon icons/mask.icon
- +
- + contool_ui.o: contool_ui.h
- +
- + error.o: manifest.h contool_ui.h
- +
- + expand.o: manifest.h
- +
- + filename_completion.o: manifest.h
- +
- + filters.o: manifest.h contool.h contool_ui.h images/single.icon \
- + images/range.icon images/empty.icon
- +
- + getopt.o: manifest.h
- +
- + load.o: manifest.h contool.h contool_ui.h
- +
- + load_icon.o: manifest.h
- +
- + logging.o: manifest.h contool.h contool_ui.h
- +
- + misc.o: manifest.h contool.h
- +
- + parse.o: manifest.h contool.h lex.c
- +
- + pinned_menu_notify.o: manifest.h
- +
- + place_dialog.o: manifest.h
- +
- + props.o: manifest.h contool.h contool_ui.h
- +
- + regexp.o: manifest.h contool.h
- +
- + send_mail.o: contool_ui.h manifest.h
- +
- + store.o: manifest.h contool.h contool_ui.h
- *** README.orig Tue Mar 24 12:59:41 1992
- --- README Tue Mar 24 12:36:55 1992
- ***************
- *** 16,22 ****
- X /* of Harris Corporation. */
- X /************************************************************************/
- X
- ! Contool Version 3.2a
- X
- X Contool will capture and display system console messages with timestamps.
- X It is a replacement for the standard Sun console, which is created with
- --- 16,22 ----
- X /* of Harris Corporation. */
- X /************************************************************************/
- X
- ! Contool Version 3.2b
- X
- X Contool will capture and display system console messages with timestamps.
- X It is a replacement for the standard Sun console, which is created with
- ***************
- *** 30,45 ****
- X ~/.contool; the included sample.filter is how my filters are set up. You
- X can modify this to suit yourself, and copy it to ~/.contool.
- X
- ! This version of contool will only work with Open Windows 2.0, from Sun,
- ! or the XView 2.0 libraries available via anonymous FTP from expo.lcs.mit.edu.
- ! In either case, obviously, you'll need to be running some version of X Windows.
- X
- X There are no plans to produce a SunView version of contool 3.0.
- X
- X Before building contool, you need to check several site dependencies
- ! in the Makefile or the Imakefile. These dependencies are:
- X
- ! In Makefile:
- X BIN Where the executable will go, normally
- X /usr/local/bin. (Makefile only)
- X
- --- 30,50 ----
- X ~/.contool; the included sample.filter is how my filters are set up. You
- X can modify this to suit yourself, and copy it to ~/.contool.
- X
- ! This version of contool will only work with Open Windows 3.0, from Sun,
- ! or the XView 3.0 libraries available on the X11R5 contrib tape or via
- ! anonymous FTP from export.lcs.mit.edu. Regardless, you'll need to be running
- ! some version of X Windows.
- X
- X There are no plans to produce a SunView version of contool 3.0.
- X
- + Contool is shipped with both an Imakefile and a regular makefile named
- + Makefile.std. You can use Makefile.std if you don't have or don't care to
- + use xmkmf with the Imakefile.
- +
- X Before building contool, you need to check several site dependencies
- ! in Makefile.std or Imakefile. The dependencies are:
- X
- ! In Makefile.std:
- X BIN Where the executable will go, normally
- X /usr/local/bin. (Makefile only)
- X
- ***************
- *** 51,65 ****
- X make MANDIR /usr/man/man1, in which case
- X MANEXT should be '1'. (Makefile only)
- X
- X MAILER The full path of your system mailer.
- X
- - ICON_PATH Path to search (at runtime) for other
- - icon files. This path will only be used
- - if the user does not have the ICON_PATH
- - environment variable defined. Should
- - consist of a various directories
- - separated by colons.
- -
- X OPENWINHOME Where you installed Open Windows.
- X Alternately, where you installed the
- X XView toolkit shipped with X11R4. Must
- --- 56,64 ----
- X make MANDIR /usr/man/man1, in which case
- X MANEXT should be '1'. (Makefile only)
- X
- + In Makefile.std and Imakefile:
- X MAILER The full path of your system mailer.
- X
- X OPENWINHOME Where you installed Open Windows.
- X Alternately, where you installed the
- X XView toolkit shipped with X11R4. Must
- ***************
- *** 67,72 ****
- --- 66,78 ----
- X named "include" that contains X and
- X XView include files.
- X
- + ICON_PATH Path to search (at runtime) for other
- + icon files. This path will only be used
- + if the user does not have the ICON_PATH
- + environment variable defined. Should
- + consist of a various directories
- + separated by colons.
- +
- X HELPDIR Where the context-sensitive help file
- X will be stored.
- X
- ***************
- *** 82,90 ****
- X you are using the X11 XView toolkit, you
- X may need to modify this value.
- X
- ! CFLAGS First option, -O, dictates optimization
- ! level. Change to suit your taste. Do
- ! not modify or delete the -D options.
- X
- X Once you have adjusted these values, run xmkmf if you are using the
- X Imakefile, and just type "make contool" or "make install".
- --- 88,96 ----
- X you are using the X11 XView toolkit, you
- X may need to modify this value.
- X
- ! CDEBUGFLAGS Change to suit your desired level of
- ! optimization. You might add other options
- ! that make your local compiler happy.
- X
- X Once you have adjusted these values, run xmkmf if you are using the
- X Imakefile, and just type "make contool" or "make install".
- ***************
- *** 237,239 ****
- --- 243,255 ----
- X (ccoprmm@prism.gatech.edu)
- X Fixed a variety of problems between the README,
- X Makefile, and Imakefile.
- +
- + 3.2b 24 Mar 92 Fixed small problems with cond_free() and
- + ungetc to avoid compiler complaints on
- + some systems.
- + Fixed a problem in the Imakefile for XView
- + include files, provided by David Bremner
- + (bremner@cs.sfu.ca).
- + Fixed a bug in filter editing, found by P G Griffiths
- + (P.G.Griffiths@daresbury.ac.uk)
- + Moved the regular Makefile to Makefile.std
- *** contool_ui.c.orig Tue Mar 24 12:59:46 1992
- --- contool_ui.c Tue Mar 24 12:59:39 1992
- ***************
- *** 355,361 ****
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_WIDTH, 575,
- X XV_HEIGHT, 246,
- ! XV_LABEL, "Contool 3.2a",
- X FRAME_SHOW_FOOTER, TRUE,
- X FRAME_SHOW_RESIZE_CORNER, TRUE,
- X NULL);
- --- 355,361 ----
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_WIDTH, 575,
- X XV_HEIGHT, 246,
- ! XV_LABEL, "Contool 3.2b",
- X FRAME_SHOW_FOOTER, TRUE,
- X FRAME_SHOW_RESIZE_CORNER, TRUE,
- X NULL);
- ***************
- *** 1987,1993 ****
- X XV_HELP_DATA, "contool:message1",
- X XV_X, 217,
- X XV_Y, 14,
- ! PANEL_LABEL_STRING, "Contool 3.2a",
- X PANEL_LABEL_BOLD, TRUE,
- X NULL);
- X return obj;
- --- 1987,1993 ----
- X XV_HELP_DATA, "contool:message1",
- X XV_X, 217,
- X XV_Y, 14,
- ! PANEL_LABEL_STRING, "Contool 3.2b",
- X PANEL_LABEL_BOLD, TRUE,
- X NULL);
- X return obj;
- *** filters.c.orig Tue Mar 24 12:59:49 1992
- --- filters.c Thu Mar 19 09:42:42 1992
- ***************
- *** 854,859 ****
- --- 854,860 ----
- X for (i = 0; i < total; i++)
- X if (xv_get(contool_filters->filter_list, PANEL_LIST_SELECTED, i))
- X xv_set(contool_filters->filter_list, PANEL_LIST_SELECT, i, FALSE, NULL);
- + update_controls();
- X for (f = edit_set, i = 0; f; f = f->next, i++)
- X if (is_empty(f->start) || (msg = compile_exp(f, f->start, f->stop))) {
- X xv_set(contool_filters->filter_list, PANEL_LIST_SELECT, i, TRUE, NULL);
- *** lex.c.orig Tue Mar 24 12:59:51 1992
- --- lex.c Mon Feb 24 13:58:01 1992
- ***************
- *** 79,85 ****
- X if (f = fopen(path, "r")) {
- X curr_file = strsave(path);
- X line_count = 1;
- ! ungetc = -1;
- X parse_errors_occured = 0;
- X return(TRUE);
- X }
- --- 79,85 ----
- X if (f = fopen(path, "r")) {
- X curr_file = strsave(path);
- X line_count = 1;
- ! lastc = -1;
- X parse_errors_occured = 0;
- X return(TRUE);
- X }
- ***************
- *** 93,100 ****
- X { register char c;
- X static int first = TRUE;
- X
- ! if (ungetc != -1)
- ! c = ungetc, ungetc = -1;
- X else {
- X c = getc(f);
- X if (c == '\n')
- --- 93,100 ----
- X { register char c;
- X static int first = TRUE;
- X
- ! if (lastc != -1)
- ! c = lastc, lastc = -1;
- X else {
- X c = getc(f);
- X if (c == '\n')
- ***************
- *** 136,142 ****
- X *p++ = c;
- X while (isalnum(c = getch()) || c == '_')
- X *p++ = c;
- ! ungetc = c;
- X *p = '\0';
- X for (p = buf; *p; p++)
- X if (isupper(*p))
- --- 136,142 ----
- X *p++ = c;
- X while (isalnum(c = getch()) || c == '_')
- X *p++ = c;
- ! lastc = c;
- X *p = '\0';
- X for (p = buf; *p; p++)
- X if (isupper(*p))
- ***************
- *** 154,160 ****
- X for (p = buf; TRUE; p++)
- X if ((*p = getch()) == c) {
- X if ((c1 = getch()) != c) {
- ! ungetc = c1;
- X break;
- X }
- X }
- --- 154,160 ----
- X for (p = buf; TRUE; p++)
- X if ((*p = getch()) == c) {
- X if ((c1 = getch()) != c) {
- ! lastc = c1;
- X break;
- X }
- X }
- ***************
- *** 174,180 ****
- X while (isdigit(c = getch()))
- X *p++ = c;
- X *p = '\0';
- ! ungetc = c;
- X yylval.ival = atoi(buf);
- X RETURN(INTEGER);
- X }
- --- 174,180 ----
- X while (isdigit(c = getch()))
- X *p++ = c;
- X *p = '\0';
- ! lastc = c;
- X yylval.ival = atoi(buf);
- X RETURN(INTEGER);
- X }
- ***************
- *** 200,206 ****
- X for (c1 = getch(), j = 1; punc[i + j].first == c; j++)
- X if (c1 == punc[i + j].next)
- X RETURN(punc[i + j].name);
- ! ungetc = c1;
- X RETURN(punc[i].name);
- X }
- X yyerror("Invalid character in source file: %c (0x%02x)", c, c);
- --- 200,206 ----
- X for (c1 = getch(), j = 1; punc[i + j].first == c; j++)
- X if (c1 == punc[i + j].next)
- X RETURN(punc[i + j].name);
- ! lastc = c1;
- X RETURN(punc[i].name);
- X }
- X yyerror("Invalid character in source file: %c (0x%02x)", c, c);
- *** manifest.h.orig Tue Mar 24 12:59:53 1992
- --- manifest.h Mon Feb 24 13:58:01 1992
- ***************
- *** 35,41 ****
- X #endif
- X
- X #define strsave(x) (((x) == NULL)? NULL : (char *) strcpy((char *) malloc(strlen(x) + 1), x))
- ! #define cond_free(x) ((x)? free(x) : 0)
- X
- X PUBLIC int errno;
- X PUBLIC char *sys_errlist[];
- --- 35,41 ----
- X #endif
- X
- X #define strsave(x) (((x) == NULL)? NULL : (char *) strcpy((char *) malloc(strlen(x) + 1), x))
- ! #define cond_free(x) {if (x) free(x);}
- X
- X PUBLIC int errno;
- X PUBLIC char *sys_errlist[];
- *** parse.y.orig Tue Mar 24 12:59:54 1992
- --- parse.y Mon Feb 24 13:58:01 1992
- ***************
- *** 36,42 ****
- X PRIVATE Filter *curr;
- X PRIVATE char *curr_file;
- X PRIVATE int line_count = 1;
- ! PRIVATE char ungetc = -1;
- X
- X %}
- X
- --- 36,42 ----
- X PRIVATE Filter *curr;
- X PRIVATE char *curr_file;
- X PRIVATE int line_count = 1;
- ! PRIVATE char lastc = -1;
- X
- X %}
- X
- ***************
- *** 356,362 ****
- X
- X { char buf1[1024], buf2[1024];
- X
- ! sprintf(buf1, "%s: line %d: ", curr_file, line_count - ((ungetc == '\n')? 1 : 0));
- X sprintf(buf2, s1, s2, s3, s4, s5, s6, s7);
- X strcat(buf1, buf2);
- X if (strcmp(s1, "syntax error") == 0) {
- --- 356,362 ----
- X
- X { char buf1[1024], buf2[1024];
- X
- ! sprintf(buf1, "%s: line %d: ", curr_file, line_count - ((lastc == '\n')? 1 : 0));
- X sprintf(buf2, s1, s2, s3, s4, s5, s6, s7);
- X strcat(buf1, buf2);
- X if (strcmp(s1, "syntax error") == 0) {
- *** patchlevel.h.orig Tue Mar 24 12:59:55 1992
- --- patchlevel.h Fri Mar 6 09:36:56 1992
- ***************
- *** 21,26 ****
- --- 21,29 ----
- X /* */
- X /* Patch Comments */
- X /* 0 Release of version 3.2a; see README for details */
- + /* comp.sources.x: Volume 16, Issue 100-106 */
- + /* */
- + /* 1 Bug fixes; see README for details */
- X /* comp.sources.x: Volume ?, Issue ? */
- X /* */
- X /************************************************************************/
- *** send_mail.c.orig Tue Mar 24 13:00:00 1992
- --- send_mail.c Tue Mar 24 12:36:56 1992
- ***************
- *** 33,39 ****
- X
- X #include "manifest.h"
- X
- ! #define VERSION "3.2a"
- X
- X PUBLIC contool_base_objects *contool_base;
- X
- --- 33,39 ----
- X
- X #include "manifest.h"
- X
- ! #define VERSION "3.2b"
- X
- X PUBLIC contool_base_objects *contool_base;
- X
- SHAR_EOF
- chmod 0664 patch ||
- echo 'restore of patch failed'
- Wc_c="`wc -c < 'patch'`"
- test 15920 -eq "$Wc_c" ||
- echo 'patch: original size 15920, current size' "$Wc_c"
- fi
- exit 0
-
- --
- --
- Molecular Simulations, Inc. mail: dcmartin@msi.com
- 796 N. Pastoria Avenue uucp: uunet!dcmartin
- Sunnyvale, California 94086 at&t: 408/522-9236
-