home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-03-04 | 46.2 KB | 1,480 lines |
- Newsgroups: comp.sources.x
- Path: uunet!think.com!mips!msi!dcmartin
- From: Chuck Musciano <chuck@trantor.harris-atd.com>
- Subject: v16i100: contool 3.2A (Final Release), Part01/07
- Message-ID: <csx-16i100-contool-3.2a@uunet.UU.NET>
- Originator: dcmartin@fascet
- Sender: dcmartin@msi.com (David C. Martin - Moderator)
- Organization: Molecular Simulations, Inc.
- Date: Thu, 5 Mar 1992 21:47:19 GMT
- Approved: dcmartin@msi.com
-
- Submitted-by: Chuck Musciano <chuck@trantor.harris-atd.com>
- Posting-number: Volume 16, Issue 100
- Archive-name: contool-3.2a/part01
-
- fixes those problems. If you had difficulty installing 3.2, replace your
- sources with 3.2a and things should go much more smoothly.
-
- Contool is an alternative to the console windows supplied with X and
- Sun's OpenWindows. It offers flexible console message filtering, including
- the ability to beep, flash the icon, log messages, and execute arbitrary
- commands upon receipt of a specific message.
-
- You'll need the XView 3.0 libraries to compile contool. These libraries
- come with OpenWindows 3.0, and are available on the X11R5 contrib tape, and
- via FTP from a number of sites around the world.
-
- As stated, this version, 3.2a, is intended to replace version 3.2. All
- subsequent patches will be made against this release, *not* against 3.2. My
- apologies for any difficulties caused by the erroneous first posting.
-
-
- 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
-
- ---- Cut Here and feed the following to sh ----
- #!/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/05/1992 14:41 UTC by chuck@melmac
- # Source directory /home/chuck/projects/release/contool/3.2
- #
- # existing files will NOT be overwritten unless -c is specified
- #
- # This is part 1 of a multipart archive
- # do not concatenate these parts, unpack them in order with /bin/sh
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 10152 -rw-r--r-- README
- # 1218 -rw-r--r-- Imakefile
- # 2303 -rw-r--r-- Makefile
- # 2556 -rw-r--r-- sample.filter
- # 2001 -rw-r--r-- about.c
- # 5379 -rw-r--r-- archive.c
- # 2165 -rw-r--r-- busy.c
- # 23859 -rw-r--r-- contool.c
- # 62728 -rw-rw-r-- contool_ui.c
- # 2036 -rw-r--r-- error.c
- # 3112 -rw-r--r-- expand.c
- # 2146 -rw-r--r-- filename_completion.c
- # 28125 -rw-r--r-- filters.c
- # 1926 -rw-r--r-- getopt.c
- # 6716 -rw-r--r-- lex.c
- # 3392 -rw-r--r-- load.c
- # 2201 -rw-r--r-- load_icon.c
- # 4060 -rw-r--r-- logging.c
- # 5391 -rw-r--r-- misc.c
- # 2118 -rw-r--r-- pinned_menu_notify.c
- # 2563 -rw-r--r-- place_dialog.c
- # 9038 -rw-r--r-- props.c
- # 3963 -rw-r--r-- regexp.c
- # 4316 -rw-r--r-- send_mail.c
- # 6340 -rw-r--r-- store.c
- # 2457 -rw-r--r-- contool.h
- # 8425 -rw-r--r-- contool_ui.h
- # 1647 -rw-r--r-- manifest.h
- # 1402 -rw-r--r-- patchlevel.h
- # 8184 -rw-r--r-- parse.y
- # 22873 -rw-r--r-- contool.man
- # 28621 -rw-r--r-- contool.info
- # 1997 -rw-r--r-- icons/default_bad.icon
- # 1997 -rw-r--r-- icons/default_flash.icon
- # 1997 -rw-r--r-- icons/default_good.icon
- # 1997 -rw-r--r-- icons/mask.icon
- # 193 -rw-r--r-- images/empty.icon
- # 193 -rw-r--r-- images/range.icon
- # 193 -rw-r--r-- images/single.icon
- #
- if test -r _shar_seq_.tmp; then
- echo 'Must unpack archives in sequence!'
- echo Please unpack part `cat _shar_seq_.tmp` next
- exit 1
- fi
- # ============= README ==============
- if test -f 'README' -a X"$1" != X"-c"; then
- echo 'x - skipping README (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting README (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'README' &&
- /************************************************************************/
- /* Copyright 1988-1992 by Chuck Musciano and Harris Corporation */
- /* */
- /* Permission to use, copy, modify, and distribute this software */
- /* and its documentation for any purpose and without fee is */
- /* hereby granted, provided that the above copyright notice */
- /* appear in all copies and that both that copyright notice and */
- /* this permission notice appear in supporting documentation, and */
- /* that the name of Chuck Musciano and Harris Corporation not be */
- /* used in advertising or publicity pertaining to distribution */
- /* of the software without specific, written prior permission. */
- /* Chuck Musciano and Harris Corporation make no representations */
- /* about the suitability of this software for any purpose. It is */
- /* provided "as is" without express or implied warranty. This */
- /* software may not be sold without the prior explicit permission */
- /* of Harris Corporation. */
- /************************************************************************/
- X
- X Contool Version 3.2a
- X
- X Contool will capture and display system console messages with timestamps.
- It is a replacement for the standard Sun console, which is created with
- "cmdtool -C". Contool will flash its icon and beep when messages are written
- to the icon, so you can keep it closed on your desktop until a message arrives.
- You can modify this beeping and flashing behavior; see the man page for more
- details.
- X
- X You can instruct contool to filter and ignore certain common console
- messages. The man page explains how to create a file of filters in
- ~/.contool; the included sample.filter is how my filters are set up. You
- can modify this to suit yourself, and copy it to ~/.contool.
- X
- 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
- X In Makefile:
- X BIN Where the executable will go, normally
- X /usr/local/bin. (Makefile only)
- X
- X MAN Where the man page will go, normally
- X /usr/man/manl. (Makefile only)
- X
- X MANEXT The man page extension, usually 'l',
- X for local man pages. You may want to
- 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
- X ICON_PATH Path to search (at runtime) for other
- X icon files. This path will only be used
- X if the user does not have the ICON_PATH
- X environment variable defined. Should
- X consist of a various directories
- X separated by colons.
- X
- X OPENWINHOME Where you installed Open Windows.
- X Alternately, where you installed the
- X XView toolkit shipped with X11R4. Must
- X be a directory with a child directory
- X named "include" that contains X and
- X XView include files.
- X
- X HELPDIR Where the context-sensitive help file
- X will be stored.
- X
- X LDOPTIONS Where ld can find your XView libraries.
- X If you compile with Open Windows, the
- X default value should be correct. If you
- X are using the X11 XView libraries, you
- X may need to modify this value.
- X
- X EXTRA_INCLUDES Where cpp can find your XView include
- X files. If you compile with Open Windows,
- X the default value should be correct. If
- X you are using the X11 XView toolkit, you
- X may need to modify this value.
- X
- X CFLAGS First option, -O, dictates optimization
- X level. Change to suit your taste. Do
- X not modify or delete the -D options.
- X
- Once you have adjusted these values, run xmkmf if you are using the
- Imakefile, and just type "make contool" or "make install".
- X
- X Contool honors window command line options, described in xview(1),
- so you can change the default window size, icon position, etc. We like
- to bring contool up closed, using "-Wi".
- X
- X Fun with sounds: if your machine can play sounds, you can use the
- "Execute command with message" feature to produce all sorts of audible
- signals when messages arrive. Ellery Chan here at Harris found a nifty
- use of sound: he plays the sound /usr/demo/SOUND/sounds/splat.au as the
- default action when a message arrives, and has the window open. When a
- message arrives, he gets a satisfying "splat!" sound and contool appears
- on his screen. If you are running on a SPARCstation (or otherwise have
- a copy of splat.au for your machine) give it a try.
- X
- X Comments, bugs, to me, please. I would be very interested in your
- impressions of contool and any suggestions you might have to make it better.
- By the way, there are a few convenient untility routines in misc.c you might
- find useful in other programs you are writing.
- X
- Chuck Musciano
- Advanced Technology Department
- Harris Corporation
- PO Box 37, MS 3A/1912
- Melbourne, FL 32902
- (407) 727-6131
- chuck@trantor.harris-atd.com
- X
- ******************************** KNOWN XVIEW BUG ********************************
- * *
- * It is a known bug in XView that if you bring up a dialog box with the *
- * pushpin out (the default) and display a menu without selecting an item from *
- * the menu, the dialog box will be closed. This can be demonstrated in contool *
- * by bringing up the edit filters window, and displaying the "edit" menu *
- * without selecting an action. *
- * *
- * This bug has been reported to Sun, but will not be fixed until version *
- * 3.0 of XView. *
- * *
- *********************************************************************************
- X
- *********************************************************************************
- * Change history *
- *********************************************************************************
- X
- X 1.0 20 Jun 88 Original release
- X 1.1 30 Jun 88 Added -p option to pop open when messages
- X arrive. Suggested by Doug Lind
- X (lind@perron.ms.washington.edu).
- X Added alternate icon sets for more attractive
- X appearance when messages arrive. Alternate
- X set two is from David Eckelcamp
- X (eckelcamp@mcc.com).
- X Cleaned up Makefile. Again, courtesy of
- X David Eckelcamp.
- X 2.0 23 Aug 88 Added automatic reload of filters when
- X filter file is modified. Suggested by
- X Craig Musicant (cmusican@stanford.prime.com).
- X Filter strings are now regular expressions.
- X Provided by jqj@hogg.cc.uoregon.edu.
- X Reworked frame menu, based upon diffs posted
- X to sun-source@titan.rice.edu.
- X Added protection from overflowing the text edit
- X window when too many messages arrive.
- X Filters can now be read from any file, not
- X just ~/.contool.
- X 2.1 10 Feb 89 Added logging capability, courtesy of
- X Gregory Bond (gnb@melba.bby.oz.au).
- X 2.2 19 Sep 89 Added filter editing.
- X Added icon pathname completion, courtesy of
- X Mike Arms (sandia!marms@unmvax.cs.unm.edu).
- X Added moving the blinking icon to the front,
- X courtesy of Peter Lennevi
- X (etxlevi@solsta.ericsson.se).
- X Changed icon loading to use ICON_PATH, and
- X supported ~ expansion, suggested by
- X Larry Virden (osu-cis!chemabs!lwv27).
- X Fixed multiple message alert handling,
- X as suggested by Ellery Chan
- X (ellery@trantor.harris-atd.com).
- X 3.0 6 Jun 90 Ported to XView toolkit, running under
- X Open Windows 2.0.
- X Reworked interface to be OPEN LOOK
- X compliant.
- X Added saving of default actions to
- X filter file.
- X Removed large number of command line
- X options in lieu of properties
- X dialog box.
- X Added ability to associate a command
- X to be executed when a message arrives.
- X Added explicit filter reset capability.
- X Added the ability to print the contents
- X of the console. Suggested by
- X Danielle Heinzer
- X (ESC1298%ESOC.BITNET@cunyvm.cuny.edu).
- X Reworked console overflow handling,
- X courtesy of Matt Cohen
- X (sysnmc@magic706.chron.com).
- X 3.0a 18 Oct 90 Allowed reading of 1.0 filter files.
- X Fixed handling of custom default icon
- X when blinking stops.
- X Tweaked Makefile slightly.
- X Fixed handling of dialog boxes under
- X window managers other than olwm.
- X Add Imakefile.
- X 3.0b 1 Nov 90 Fixed "tiny icon" bug.
- X Added "About contool..." dialog.
- X Source restructuring for maintainability.
- X 3.0c 15 Jan 91 Added -n option to prevent console
- X acquisition on startup.
- X Fixed bugs in send mail dialog.
- X Changed send mail "Cancel" to close window.
- X Updated help for "File" button.
- X Dialogs no longer come up clipped by the
- X bottom of the screen.
- X 3.1 24 May 91 Added syntax to support control characters
- X in filters.
- X Reworked handling of "Other:" mail address.
- X Added filter versions.
- X Missing end patterns are now flagged.
- X Contool now sets its class and name hints.
- X Sending SIGUSR1 (30) to contool stops blinking,
- X suggested by Frank Peters.
- X Sending SIGHUP (1) closes and reopens the log
- X file.
- X Added "Apply and Save" button to filter dialog.
- X Added individual message logging.
- X Finally fixed overflow handling.
- X Added multi-line filter timeout.
- X 3.1a 24 Jul 91 Added support for WIN_CMDLINE attribute,
- X from Tomas Stephanson
- X (Tomas.Stephanson@eua.ericsson.se)
- X Fixed handling of messages without trailing
- X newlines, suggested by Ellery Chan
- X (ellery@trantor.harris-atd.com)
- X Fixed typos in the man page
- X 3.2 16 Oct 91 Added -i option to allow reading messages
- X from other sources.
- X Fixed minor error in abend() code.
- X Fixed bug in masking alternative icons.
- X Added message archiving.
- X Added -f option to make contool fork after acquiring
- X the console.
- X
- X 3.2a 27 Feb 92 Fixed minor bug in passing multi-line filters
- X to a command thanks to Michael Mealling
- X (ccoprmm@prism.gatech.edu)
- X Fixed a variety of problems between the README,
- X Makefile, and Imakefile.
- SHAR_EOF
- chmod 0644 README ||
- echo 'restore of README failed'
- Wc_c="`wc -c < 'README'`"
- test 10152 -eq "$Wc_c" ||
- echo 'README: original size 10152, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= Imakefile ==============
- if test -f 'Imakefile' -a X"$1" != X"-c"; then
- echo 'x - skipping Imakefile (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting Imakefile (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'Imakefile' &&
- # Mailer you use
- 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
- OPENWINHOME = /usr/openwin
- X
- # Where to install the help file
- HELPDIR = /usr/local/lib/help
- X
- # Where your XView libraries are installed
- LDOPTIONS = -L$(OPENWINHOME)/lib
- X
- # Where your XView include files are installed
- EXTRA_INCLUDES = -I$(OPENWINHOME)/include
- X
- # Fix this if you don't want optimization
- CFLAGS = -O -DMAILER=\"$(MAILER)\" -DICON_PATH=\"$(ICON_PATH)\"
- 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 \
- X pinned_menu_notify.c place_dialog.c props.c regexp.c send_mail.c store.c
- 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
- X
- LOCAL_LIBRARIES = -lxview -lolgx $(XLIB)
- X
- ComplexProgramTarget(contool)
- X
- install:: install.man install.help
- X
- install.help:
- X $(INSTALL) -c $(INSTMANFLAGS) contool.info $(HELPDIR)/contool.info
- SHAR_EOF
- chmod 0644 Imakefile ||
- echo 'restore of Imakefile failed'
- Wc_c="`wc -c < 'Imakefile'`"
- test 1218 -eq "$Wc_c" ||
- echo 'Imakefile: original size 1218, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= Makefile ==============
- if test -f 'Makefile' -a X"$1" != X"-c"; then
- echo 'x - skipping Makefile (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting Makefile (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'Makefile' &&
- # Where to put the executable
- BIN = /usr/local/bin
- X
- # Where to put the man page
- MAN = /usr/man/manl
- MANEXT = l
- X
- # Mailer you use
- 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
- OPENWINHOME = /usr/openwin
- X
- # Where to install the help file
- HELPDIR = /usr/local/lib/help
- X
- # Where your XView libraries are installed
- LDOPTIONS = -L$(OPENWINHOME)/lib
- X
- # Where your XView include files are installed
- EXTRA_INCLUDES = -I$(OPENWINHOME)/include
- X
- # Fix this if you don't want optimization
- CFLAGS = -O -DMAILER=\"$(MAILER)\" -DICON_PATH=\"$(ICON_PATH)\"
- X
- CONTOOL = 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
- X
- LOCAL_LIBRARIES = -lxview -lolgx -lX
- X
- .c.o:
- X cc $(CFLAGS) $(EXTRA_INCLUDES) -c $<
- X
- .y.o:
- X yacc $<
- X cc $(CFLAGS) $(EXTRA_INCLUDES) -c -o $*.o y.tab.c
- X rm y.tab.c
- X
- contool: $(CONTOOL)
- X cc $(CFLAGS) $(EXTRA_INCLUDES) -o contool $(CONTOOL) $(LDOPTIONS) $(LOCAL_LIBRARIES)
- X
- install: contool $(MAN)/contool.$(MANEXT)
- X cp contool $(BIN)
- X chmod 755 $(BIN)/contool
- X cp contool.info $(HELPDIR)
- X
- $(MAN)/contool.$(MANEXT): contool.man
- X cp -p contool.man $(MAN)/contool.$(MANEXT)
- X
- clean:
- X rm -f *~ *.o contool core
- X
- #dependencies
- X
- about.o: contool_ui.h manifest.h
- X
- archive.o: manifest.h contool.h contool_ui.h
- X
- busy.o: manifest.h
- X
- contool.o: manifest.h contool.h contool_ui.h icons/default_good.icon \
- X icons/default_bad.icon icons/default_flash.icon icons/mask.icon
- X
- contool_ui.o: contool_ui.h
- X
- error.o: manifest.h contool_ui.h
- X
- expand.o: manifest.h
- X
- filename_completion.o: manifest.h
- X
- filters.o: manifest.h contool.h contool_ui.h images/single.icon \
- X images/range.icon images/empty.icon
- X
- getopt.o: manifest.h
- X
- load.o: manifest.h contool.h contool_ui.h
- X
- load_icon.o: manifest.h
- X
- logging.o: manifest.h contool.h contool_ui.h
- X
- misc.o: manifest.h contool.h
- X
- parse.o: manifest.h contool.h lex.c
- X
- pinned_menu_notify.o: manifest.h
- X
- place_dialog.o: manifest.h
- X
- props.o: manifest.h contool.h contool_ui.h
- X
- regexp.o: manifest.h contool.h
- X
- send_mail.o: contool_ui.h manifest.h
- X
- store.o: manifest.h contool.h contool_ui.h
- SHAR_EOF
- chmod 0644 Makefile ||
- echo 'restore of Makefile failed'
- Wc_c="`wc -c < 'Makefile'`"
- test 2303 -eq "$Wc_c" ||
- echo 'Makefile: original size 2303, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= sample.filter ==============
- if test -f 'sample.filter' -a X"$1" != X"-c"; then
- echo 'x - skipping sample.filter (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting sample.filter (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'sample.filter' &&
- version 320
- defaults {
- X beep 3
- X command ""
- X flash yes
- X log yes
- X open no
- X stamp yes
- X archive 0
- X good_icon ""
- X check_icon ""
- X flash_icon ""
- X print "lpr"
- X log_file ""
- X log_before_filtering no
- X timestamp 10
- X display 32768
- X delete 1024
- }
- filters {
- X {
- X match "su: chuck"
- X comment "Track myself becoming super user"
- X ignore no
- X beep 0
- X command ""
- X flash no
- X log yes
- X open no
- X stamp yes
- X }
- X {
- X match "su:"
- X comment "Get excited about anyone else becoming superuser"
- X ignore no
- X beep 4
- X command ""
- X flash no
- X log yes
- X open yes
- X stamp yes
- X }
- X {
- X match "Window data lock"
- X to "The offending process"
- X timeout 30
- X comment "Ignore spurious window system messages"
- X ignore yes
- X }
- X {
- X match "win ioctl number"
- X comment "Ignore spurious window system messages"
- X ignore no
- X beep 0
- X command ""
- X flash no
- X log yes
- X open no
- X stamp yes
- X }
- X {
- X match "A tty window"
- X to "Its child"
- X timeout 30
- X comment "Ignore spurious window system messages"
- X ignore no
- X beep 0
- X command ""
- X flash no
- X log yes
- X open no
- X stamp yes
- X }
- X {
- X match "Too large a window number"
- X comment "Ignore spurious window system messages"
- X ignore yes
- X }
- X {
- X match "NFS server"
- X comment "Track NFS server message"
- X ignore no
- X beep 0
- X command ""
- X flash no
- X log yes
- X open no
- X stamp yes
- X }
- X {
- X match "yp:"
- X comment "Track YP server problems"
- X ignore no
- X beep 0
- X command ""
- X flash no
- X log yes
- X open no
- X stamp yes
- X }
- X {
- X match "/usr/local/frame"
- X comment "Ignore various noisy Frame messages"
- X ignore yes
- X }
- X {
- X match "starting maker"
- X to "maker: Finished"
- X timeout 120
- X comment "Ignore various noisy Frame messages"
- X ignore yes
- X }
- X {
- X match "maker:"
- X comment "Ignore various noisy Frame messages"
- X ignore yes
- X }
- X {
- X match "fmprintdriver.ps: Using"
- X comment "Ignore various noisy Frame messages"
- X ignore yes
- X }
- }
- SHAR_EOF
- chmod 0644 sample.filter ||
- echo 'restore of sample.filter failed'
- Wc_c="`wc -c < 'sample.filter'`"
- test 2556 -eq "$Wc_c" ||
- echo 'sample.filter: original size 2556, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= about.c ==============
- if test -f 'about.c' -a X"$1" != X"-c"; then
- echo 'x - skipping about.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting about.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'about.c' &&
- /************************************************************************/
- /* Copyright 1987-1992 by Chuck Musciano and Harris Corporation */
- /* */
- /* Full ownership of this software, and all rights pertaining to */
- /* the for-profit distribution of this software, are retained by */
- /* Chuck Musciano and Harris Corporation. You are permitted to */
- /* use this software without fee. This software is provided "as */
- /* is" without express or implied warranty. You may redistribute */
- /* this software, provided that this copyright notice is retained, */
- /* and that the software is not distributed for profit. If you */
- /* wish to use this software in a profit-making venture, you must */
- /* first license this code and its underlying technology from */
- /* Harris Corporation. */
- /* */
- /* Bottom line: you can have this software, you can use it, you */
- /* can give it away. You just can't sell any or all parts of it */
- /* without prior permission from Harris Corporation. */
- /************************************************************************/
- X
- /************************************************************************/
- /* */
- /* about.c display a little information window */
- /* */
- /************************************************************************/
- X
- #include <stdio.h>
- #include <sys/param.h>
- #include <sys/types.h>
- #include <xview/xview.h>
- #include <xview/panel.h>
- #include "contool_ui.h"
- X
- #include "manifest.h"
- X
- PUBLIC contool_base_objects *contool_base;
- X
- PRIVATE contool_about_objects *dialog = NULL;
- X
- /************************************************************************/
- EXPORT Menu_item popup_about_contool(item, op)
- X
- Menu_item item;
- Menu_generate op;
- X
- {
- X if (op == MENU_NOTIFY) {
- X if (dialog == NULL) {
- X dialog = contool_about_objects_initialize(NULL, contool_base->base);
- X place_dialog(contool_base->base, dialog->about);
- X }
- X xv_set(dialog->about, XV_SHOW, TRUE, NULL);
- X }
- X return item;
- }
- SHAR_EOF
- chmod 0644 about.c ||
- echo 'restore of about.c failed'
- Wc_c="`wc -c < 'about.c'`"
- test 2001 -eq "$Wc_c" ||
- echo 'about.c: original size 2001, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= archive.c ==============
- if test -f 'archive.c' -a X"$1" != X"-c"; then
- echo 'x - skipping archive.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting archive.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'archive.c' &&
- /************************************************************************/
- /* Copyright 1987-1992 by Chuck Musciano and Harris Corporation */
- /* */
- /* Full ownership of this software, and all rights pertaining to */
- /* the for-profit distribution of this software, are retained by */
- /* Chuck Musciano and Harris Corporation. You are permitted to */
- /* use this software without fee. This software is provided "as */
- /* is" without express or implied warranty. You may redistribute */
- /* this software, provided that this copyright notice is retained, */
- /* and that the software is not distributed for profit. If you */
- /* wish to use this software in a profit-making venture, you must */
- /* first license this code and its underlying technology from */
- /* Harris Corporation. */
- /* */
- /* Bottom line: you can have this software, you can use it, you */
- /* can give it away. You just can't sell any or all parts of it */
- /* without prior permission from Harris Corporation. */
- /************************************************************************/
- X
- /************************************************************************/
- /* */
- /* archive.c contool message archive manager */
- /* */
- /************************************************************************/
- X
- #include <stdio.h>
- #include <sys/param.h>
- #include <sys/types.h>
- #include <xview/xview.h>
- #include <xview/panel.h>
- #include <xview/textsw.h>
- X
- #include "manifest.h"
- #include "contool.h"
- #include "contool_ui.h"
- X
- PUBLIC contool_base_objects *contool_base;
- X
- PRIVATE contool_message_archive_objects *dialog = NULL;
- X
- /************************************************************************/
- PRIVATE void stamp_archive(s)
- X
- char *s;
- X
- { int t;
- X char msg[128];
- X
- X t = time(0);
- X sprintf(msg, "%s %.25s", s, ctime(&t));
- X xv_set(dialog->message_archive, FRAME_LEFT_FOOTER, msg, NULL);
- }
- X
- /************************************************************************/
- EXPORT void reset_archive_size()
- X
- { int sw_len;
- X char *temp;
- X
- X if (dialog) {
- X sw_len = (int) xv_get(dialog->archive, TEXTSW_LENGTH);
- X temp = (char *) malloc((unsigned) sw_len);
- X xv_get(dialog->archive, TEXTSW_CONTENTS, 0, temp, sw_len);
- X xv_set(dialog->archive, TEXTSW_MEMORY_MAXIMUM, defaults.max_size * 11, NULL);
- X textsw_reset(dialog->archive, 0, 0);
- X if (sw_len > defaults.max_size * 10)
- X textsw_insert(dialog->archive, temp + sw_len - defaults.max_size * 10, defaults.max_size * 10);
- X else
- X textsw_insert(dialog->archive, temp, sw_len);
- X free(temp);
- X }
- }
- X
- /************************************************************************/
- EXPORT void create_archive()
- X
- {
- X if (dialog == NULL) {
- X dialog = contool_message_archive_objects_initialize(NULL, contool_base->base);
- X place_dialog(contool_base->base, dialog->message_archive);
- X reset_archive_size();
- X }
- }
- X
- /************************************************************************/
- EXPORT Menu_item popup_archive(item, op)
- X
- Menu_item item;
- Menu_generate op;
- X
- {
- X if (op == MENU_NOTIFY) {
- X create_archive();
- X xv_set(dialog->message_archive, XV_SHOW, TRUE, NULL);
- X }
- X return(item);
- }
- X
- /************************************************************************/
- EXPORT void clear_archive()
- X
- {
- X textsw_reset(dialog->archive, 0, 0);
- X stamp_archive("Archive cleared");
- }
- X
- /************************************************************************/
- EXPORT void print_archive()
- X
- { int size;
- X char *buf;
- X FILE *cmd;
- X
- X if (is_empty(defaults.print_filter))
- X error("You must specify a printer command in the Properties dialog");
- X else if ((cmd = popen(defaults.print_filter, "w")) == NULL)
- X error("Could not execute %s", defaults.print_filter);
- X else {
- X lets_get_busy(contool_base->base, TRUE, NULL);
- X size = (int) xv_get(dialog->archive, TEXTSW_LENGTH);
- X buf = (char *) malloc(size);
- X xv_get(dialog->archive, TEXTSW_CONTENTS, 0, buf, size);
- X if (fwrite(buf, 1, size, cmd) != size)
- X error("Could not write console contents to printer");
- X pclose(cmd);
- X free(buf);
- X lets_get_busy(contool_base->base, FALSE, NULL);
- X }
- }
- X
- /************************************************************************/
- EXPORT void archive_messages()
- X
- { int size, first, last, sw_len;
- X char *temp, *buf;
- X
- X create_archive();
- X size = (int) xv_get(contool_base->display, TEXTSW_LENGTH);
- X buf = (char *) malloc(size);
- X xv_get(contool_base->display, TEXTSW_CONTENTS, 0, buf, size);
- X while ((int) xv_get(dialog->archive, TEXTSW_LENGTH) + size > defaults.max_size * 10) {
- X sw_len = (int) xv_get(dialog->archive, TEXTSW_LENGTH);
- X first = 1;
- X last = TEXTSW_INFINITY;
- X if (textsw_find_bytes(dialog->archive, &first, &last, "\n<<<", 4, 0) == -1 || first == 0)
- X if (textsw_find_bytes(dialog->archive, &first, &last, "\n", 1, 0) == -1 || first == 0)
- X first = (defaults.delete_amount < sw_len)? defaults.delete_amount : sw_len;
- X temp = (char *) malloc((unsigned) sw_len);
- X xv_get(dialog->archive, TEXTSW_CONTENTS, 0, temp, sw_len);
- X textsw_reset(dialog->archive, 0, 0);
- X textsw_insert(dialog->archive, temp + first, sw_len - first);
- X free(temp);
- X }
- X xv_set(dialog->archive, TEXTSW_INSERTION_POINT, TEXTSW_INFINITY, NULL);
- X textsw_insert(dialog->archive, buf, size);
- X free(buf);
- X stamp_archive("Messages last archived");
- X textsw_reset(contool_base->display, 0, 0);
- }
- SHAR_EOF
- chmod 0644 archive.c ||
- echo 'restore of archive.c failed'
- Wc_c="`wc -c < 'archive.c'`"
- test 5379 -eq "$Wc_c" ||
- echo 'archive.c: original size 5379, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= busy.c ==============
- if test -f 'busy.c' -a X"$1" != X"-c"; then
- echo 'x - skipping busy.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting busy.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'busy.c' &&
- /************************************************************************/
- /* Copyright 1987-1992 by Chuck Musciano and Harris Corporation */
- /* */
- /* Full ownership of this software, and all rights pertaining to */
- /* the for-profit distribution of this software, are retained by */
- /* Chuck Musciano and Harris Corporation. You are permitted to */
- /* use this software without fee. This software is provided "as */
- /* is" without express or implied warranty. You may redistribute */
- /* this software, provided that this copyright notice is retained, */
- /* and that the software is not distributed for profit. If you */
- /* wish to use this software in a profit-making venture, you must */
- /* first license this code and its underlying technology from */
- /* Harris Corporation. */
- /* */
- /* Bottom line: you can have this software, you can use it, you */
- /* can give it away. You just can't sell any or all parts of it */
- /* without prior permission from Harris Corporation. */
- /************************************************************************/
- X
- /************************************************************************/
- /* */
- /* busy.c turn frame busy attribute on and off */
- /* */
- /************************************************************************/
- X
- #include <stdio.h>
- #include <xview/xview.h>
- #include <xview/panel.h>
- X
- #include "manifest.h"
- X
- /************************************************************************/
- PRIVATE set_busy(base, busy, skip)
- X
- Frame base;
- int busy;
- Frame skip;
- X
- { Frame subframe;
- X int i;
- X
- X for (i = 1; subframe = (Frame) xv_get(base, FRAME_NTH_SUBFRAME, i); i++)
- X if (subframe != skip)
- X if (xv_get(subframe, XV_SHOW))
- X xv_set(subframe, FRAME_BUSY, busy, NULL);
- X xv_set(base, FRAME_BUSY, busy, NULL);
- }
- X
- /************************************************************************/
- EXPORT lets_get_busy(base, busy, skip)
- X
- Frame base;
- int busy;
- Frame skip;
- X
- { static int depth = 0;
- X
- X if (busy) {
- X if (depth == 0)
- X set_busy(base, TRUE, skip);
- X depth++;
- X }
- X else if (depth > 0)
- X if (--depth == 0)
- X set_busy(base, FALSE, NULL);
- }
- SHAR_EOF
- chmod 0644 busy.c ||
- echo 'restore of busy.c failed'
- Wc_c="`wc -c < 'busy.c'`"
- test 2165 -eq "$Wc_c" ||
- echo 'busy.c: original size 2165, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= contool.c ==============
- if test -f 'contool.c' -a X"$1" != X"-c"; then
- echo 'x - skipping contool.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting contool.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'contool.c' &&
- /************************************************************************/
- /* Copyright 1987-1992 by Chuck Musciano and Harris Corporation */
- /* */
- /* Full ownership of this software, and all rights pertaining to */
- /* the for-profit distribution of this software, are retained by */
- /* Chuck Musciano and Harris Corporation. You are permitted to */
- /* use this software without fee. This software is provided "as */
- /* is" without express or implied warranty. You may redistribute */
- /* this software, provided that this copyright notice is retained, */
- /* and that the software is not distributed for profit. If you */
- /* wish to use this software in a profit-making venture, you must */
- /* first license this code and its underlying technology from */
- /* Harris Corporation. */
- /* */
- /* Bottom line: you can have this software, you can use it, you */
- /* can give it away. You just can't sell any or all parts of it */
- /* without prior permission from Harris Corporation. */
- /************************************************************************/
- X
- /************************************************************************/
- /* */
- /* contool.c main contool driver */
- /* */
- /************************************************************************/
- X
- #include <stdio.h>
- #include <fcntl.h>
- #include <strings.h>
- #include <sys/ioctl.h>
- #include <sys/file.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/param.h>
- X
- #include <X11/Xlib.h>
- #include <X11/Xutil.h>
- X
- #include <xview/xview.h>
- #include <xview/icon.h>
- #include <xview/panel.h>
- #include <xview/textsw.h>
- #include <xview/notify.h>
- X
- #include "manifest.h"
- #include "contool.h"
- #include "contool_ui.h"
- X
- #define update_value(old, new) ((old) = ((new) > (old))? (new) : (old))
- X
- #define INPUT_BUFFER_SIZE 4096
- X
- EXPORT Attr_attribute INSTANCE;
- X
- EXPORT contool_base_objects *contool_base;
- EXPORT char *filter_file;
- X
- PUBLIC Server_image load_icon();
- X
- PRIVATE Notify_value blink_proc();
- X
- PRIVATE short good_bits[] = {
- #include "icons/default_good.icon"
- X };
- PRIVATE short bad_bits[] = {
- #include "icons/default_bad.icon"
- X };
- PRIVATE short flash_bits[] = {
- #include "icons/default_flash.icon"
- X };
- PRIVATE short mask_bits[] = {
- #include "icons/mask.icon"
- X };
- X
- PRIVATE char *ct_usage = "usage: contool [-c <file>] [-f] [-i <file>] [-l] [-L <file>] [-n]\n";
- X
- PRIVATE Server_image default_good_icon, good = NULL;
- PRIVATE Server_image default_bad_icon, bad = NULL;
- PRIVATE Server_image default_flash_icon, flash = NULL;
- PRIVATE Server_image icon_mask;
- X
- PRIVATE int bad_is_up;
- PRIVATE int beep_count;
- PRIVATE int blinking = FALSE;
- PRIVATE FILE *command = NULL;
- PRIVATE Filter *curr_filter = NULL;
- PRIVATE int event_in_progress = FALSE;
- PRIVATE int explicit_filters = FALSE;
- PRIVATE int fork_into_background = FALSE;
- PRIVATE int masking_works;
- PRIVATE FILE *master = NULL;
- PRIVATE int no_console = FALSE;
- PRIVATE int old_time = 0;
- PRIVATE char *program;
- PRIVATE FILE *slave = NULL;
- PRIVATE int filter_timeout = 0;
- X
- PRIVATE struct itimerval timer = {{0, 500000}, {0, 500000}};
- X
- /************************************************************************/
- /* Manage piping console output to a command */
- /************************************************************************/
- X
- /************************************************************************/
- PRIVATE start_command(cmd)
- X
- char *cmd;
- X
- {
- X if (command)
- X pclose(command);
- X if ((command = popen(cmd, "w")) == NULL)
- X internal_error("could not execute \"%s\"", cmd);
- }
- X
- /************************************************************************/
- PRIVATE continue_command(buf)
- X
- char *buf;
- X
- {
- X if (command)
- X fputs(buf, command);
- }
- X
- /************************************************************************/
- PRIVATE end_command()
- X
- {
- X if (command)
- X pclose(command);
- }
- X
- /************************************************************************/
- /* Some basic console utility routines */
- /************************************************************************/
- X
- /************************************************************************/
- PRIVATE stop_blinking()
- X
- {
- X if (filter_timeout <= 0)
- X notify_set_itimer_func(contool_base->base, blink_proc, ITIMER_REAL, NULL, NULL);
- X change_icon(good, good == default_good_icon);
- X blinking = FALSE;
- }
- X
- /************************************************************************/
- EXPORT acquire_console()
- X
- {
- X if (slave)
- X if (ioctl(fileno(slave), TIOCCONS, NULL) == -1)
- X abend("%s: could not attach to /dev/console", program);
- }
- X
- /************************************************************************/
- EXPORT filters_changed()
- X
- {
- X curr_filter = NULL;
- X xv_set(contool_base->base, FRAME_LEFT_FOOTER, "", NULL);
- X end_command();
- X filter_timeout = 0;
- X if (!blinking && beep_count == 0)
- X notify_set_itimer_func(contool_base->base, blink_proc, ITIMER_REAL, NULL, NULL);
- }
- X
- /************************************************************************/
- EXPORT adjust_window_limit()
- X
- { int sw_len;
- X char *temp;
- X
- X sw_len = (int) xv_get(contool_base->display, TEXTSW_LENGTH);
- X temp = (char *) malloc((unsigned) sw_len);
- X xv_get(contool_base->display, TEXTSW_CONTENTS, 0, temp, sw_len);
- X xv_set(contool_base->display, TEXTSW_MEMORY_MAXIMUM, defaults.max_size + defaults.max_size / 10, NULL);
- X textsw_reset(contool_base->display, 0, 0);
- X if (sw_len > defaults.max_size)
- X textsw_insert(contool_base->display, temp + sw_len - defaults.max_size, defaults.max_size);
- X else
- X textsw_insert(contool_base->display, temp, sw_len);
- X free(temp);
- X reset_archive_size();
- }
- X
- /************************************************************************/
- /* Various small features */
- /************************************************************************/
- X
- /************************************************************************/
- EXPORT Menu_item print_messages(item, op)
- X
- Menu_item item;
- Menu_generate op;
- X
- { int size;
- X char *buf;
- X FILE *cmd;
- X
- X if (op == MENU_NOTIFY) {
- X if (is_empty(defaults.print_filter))
- X error("You must specify a printer command in the Properties dialog");
- X else if ((cmd = popen(defaults.print_filter, "w")) == NULL)
- X error("Could not execute %s", defaults.print_filter);
- X else {
- X lets_get_busy(contool_base->base, TRUE, NULL);
- X size = (int) xv_get(contool_base->display, TEXTSW_LENGTH);
- X buf = (char *) malloc(size);
- X xv_get(contool_base->display, TEXTSW_CONTENTS, 0, buf, size);
- X if (fwrite(buf, 1, size, cmd) != size)
- X error("Could not write console contents to printer");
- X pclose(cmd);
- X free(buf);
- X lets_get_busy(contool_base->base, FALSE, NULL);
- X }
- X }
- X return item;
- }
- X
- /************************************************************************/
- EXPORT Menu_item become_console(item, op)
- X
- Menu_item item;
- Menu_generate op;
- X
- {
- X if (op == MENU_NOTIFY)
- X acquire_console();
- X return item;
- }
- X
- /************************************************************************/
- EXPORT Menu_item clear_messages(item, op)
- X
- Menu_item item;
- Menu_generate op;
- X
- {
- X if (op == MENU_NOTIFY) {
- X textsw_reset(contool_base->display, 0, 0);
- X old_time = 0;
- X }
- X return item;
- }
- X
- /************************************************************************/
- EXPORT Menu_item reset_filter(item, op)
- X
- Menu_item item;
- Menu_generate op;
- X
- {
- X if (op == MENU_NOTIFY)
- X filters_changed();
- X return item;
- }
- X
- /************************************************************************/
- EXPORT Menu_item save_to_archive(item, op)
- X
- Menu_item item;
- Menu_generate op;
- X
- {
- X if (op == MENU_NOTIFY)
- X archive_messages();
- X return(item);
- }
- X
- /************************************************************************/
- PRIVATE change_icon(image, use_mask)
- X
- Server_image image;
- int use_mask;
- X
- { Icon icon;
- X
- X icon = (Icon) xv_get(contool_base->base, FRAME_ICON);
- X xv_set(icon,
- X ICON_IMAGE, image,
- X ICON_MASK_IMAGE, NULL,
- X XV_WIDTH, (int) xv_get(image, XV_WIDTH),
- X XV_HEIGHT, (int) xv_get(image, XV_HEIGHT),
- X NULL);
- X if (masking_works && use_mask)
- X xv_set(icon, ICON_MASK_IMAGE, icon_mask, NULL);
- X xv_set(contool_base->base, FRAME_ICON, icon, NULL);
- }
- X
- /************************************************************************/
- EXPORT update_icons()
- X
- { char msg[1024];
- X
- X if (good && good != default_good_icon)
- X xv_destroy(good);
- X if (bad && bad != default_bad_icon)
- X xv_destroy(bad);
- X if (flash && flash != default_flash_icon)
- X xv_destroy(flash);
- X
- X good = (defaults.good_icon == NULL)? default_good_icon : load_icon(defaults.good_icon, msg);
- X if (good == NULL) {
- X internal_error("Cannot load default \"All is well\" icon %s: %s", defaults.good_icon, msg);
- X good = default_good_icon;
- X }
- X bad = (defaults.bad_icon == NULL)? default_bad_icon : load_icon(defaults.bad_icon, msg);
- X if (bad == NULL) {
- X internal_error("Cannot load default \"Check console\" icon %s: %s", defaults.bad_icon, msg);
- X bad = default_bad_icon;
- X }
- X flash = (defaults.flash_icon == NULL)? default_flash_icon : load_icon(defaults.flash_icon, msg);
- X if (flash == NULL) {
- X internal_error("Cannot load default \"Flash\" icon %s: %s", defaults.flash_icon, msg);
- X flash = default_flash_icon;
- X }
- X
- X if (!blinking)
- X change_icon(good, good == default_good_icon);
- }
- X
- /************************************************************************/
- /* Now, filter handlers */
- /************************************************************************/
- X
- /************************************************************************/
- PRIVATE internal_message(a, b, c, d, e, f)
- X
- int a, b, c, d, e, f;
- X
- { char buf[1024];
- X
- X sprintf(buf, a, b, c, d, e, f);
- X time_stamp();
- X write_log(buf);
- X do_insertion(buf, strlen(buf));
- }
- X
- /************************************************************************/
- PRIVATE internal_error(a, b, c, d, e, f)
- X
- int a, b, c, d, e, f;
- X
- { char buf[1024];
- X
- X sprintf(buf, a, b, c, d, e, f);
- X time_stamp();
- X fprintf(stderr, "*** %s: %s\n", program, buf);
- }
- X
- /************************************************************************/
- PRIVATE load_filters()
- X
- { struct stat sb;
- X static int load_time = 0;
- X
- X if (access(filter_file, R_OK) == -1) {
- X if (explicit_filters && load_time == 0) {
- X internal_error("filter file %s cannot be accessed", filter_file);
- X load_time = 1;
- X }
- X }
- X else if (stat(filter_file, &sb) == 0 && sb.st_mtime > load_time)
- X if (lex_init(filter_file)) {
- X yyparse();
- X if (!parse_errors_occured) {
- X free_list(filters);
- X free(parsed_defaults);
- X filters = parsed_filters;
- X internal_message("*** filters loaded from %s\n", filter_file);
- X load_time = sb.st_mtime;
- X }
- X }
- X else {
- X internal_error("error accessing configuration file %s", filter_file);
- X load_time = 1;
- X }
- }
- X
- /************************************************************************/
- /* Various event handlers for the console frame */
- /************************************************************************/
- X
- /************************************************************************/
- PRIVATE Notify_value blink_proc(me, which)
- X
- int *me;
- int which;
- X
- {
- X if (event_in_progress)
- X return(NOTIFY_DONE);
- X if (beep_count > 0) {
- X window_bell(contool_base->base);
- X beep_count--;
- X }
- X if (blinking) {
- X if (bad_is_up)
- X change_icon(flash, flash == default_flash_icon);
- X else
- X change_icon(bad, bad == default_bad_icon);
- X bad_is_up = !bad_is_up;
- X }
- X if (filter_timeout > 0)
- X if (--filter_timeout <= 0)
- X filters_changed();
- X if (beep_count == 0 && !blinking && filter_timeout <= 0)
- X notify_set_itimer_func(contool_base->base, blink_proc, ITIMER_REAL, NULL, NULL);
- X return(NOTIFY_DONE);
- }
- X
- /************************************************************************/
- PRIVATE Notify_value close_proc(frame, event, arg, type)
- X
- Frame frame;
- Event *event;
- Notify_arg arg;
- Notify_event_type type;
- X
- {
- X event_in_progress = TRUE;
- X if (event_action(event) == ACTION_OPEN) {
- X if (blinking)
- X stop_blinking();
- X create_archive();
- X }
- X if (event_action(event) == ACTION_CLOSE && defaults.archive_style == ARCHIVE_ON_CLOSE)
- X archive_messages();
- X event_in_progress = FALSE;
- X return(notify_next_event_func(frame, event, arg, type));
- }
- X
- /************************************************************************/
- PRIVATE Notify_value destroy_proc(frame, status)
- X
- Frame frame;
- Destroy_status status;
- X
- {
- X if (status == DESTROY_CHECKING) {
- X textsw_reset(contool_base->display, 0, 0);
- X return(NOTIFY_DONE);
- X }
- X else
- X return(notify_next_destroy_func(frame, status));
- }
- X
- /************************************************************************/
- PRIVATE Notify_value signal_proc(frame, sig, when)
- X
- Frame frame;
- int sig;
- Notify_signal_mode when;
- X
- {
- X if (sig == SIGUSR1)
- X stop_blinking();
- X else if (sig == SIGHUP)
- X update_logging();
- X return(NOTIFY_DONE);
- }
- X
- /************************************************************************/
- /* Routines which handle capturing and displaying messages */
- /************************************************************************/
- SHAR_EOF
- true || echo 'restore of contool.c failed'
- fi
- echo 'End of part 1'
- echo 'File contool.c is continued in part 2'
- echo 2 > _shar_seq_.tmp
- exit 0
- --
- --
- Molecular Simulations, Inc. mail: dcmartin@msi.com
- 796 N. Pastoria Avenue uucp: uunet!dcmartin
- Sunnyvale, California 94086 at&t: 408/522-9236
-