home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1992-03-04 | 45.2 KB | 1,215 lines
Newsgroups: comp.sources.x Path: uunet!think.com!mips!msi!dcmartin From: Chuck Musciano <chuck@trantor.harris-atd.com> Subject: v16i105: contool 3.2A (Final Release), Part06/07 Message-ID: <1992Mar5.214840.9715@msi.com> Originator: dcmartin@fascet Sender: dcmartin@msi.com (David C. Martin - Moderator) Organization: Molecular Simulations, Inc. References: <csx-16i100-contool-3.2a@uunet.UU.NET> Date: Thu, 5 Mar 1992 21:48:40 GMT Approved: dcmartin@msi.com Submitted-by: Chuck Musciano <chuck@trantor.harris-atd.com> Posting-number: Volume 16, Issue 105 Archive-name: contool-3.2a/part06 # this is Part.06 (part 6 of a multipart archive) # do not concatenate these parts, unpack them in order with /bin/sh # file contool_ui.h continued # if test ! -r _shar_seq_.tmp; then echo 'Please unpack part 1 first!' exit 1 fi (read Scheck if test "$Scheck" != 6; then echo Please unpack part "$Scheck" next! exit 1 else exit 0 fi ) < _shar_seq_.tmp || exit 1 if test ! -f _shar_wnt_.tmp; then echo 'x - still skipping contool_ui.h' else echo 'x - continuing file contool_ui.h' sed 's/^X//' << 'SHAR_EOF' >> 'contool_ui.h' && extern Xv_opaque contool_props_log_file_create(); extern Xv_opaque contool_props_log_style_create(); extern Xv_opaque contool_props_archive_style_create(); extern Xv_opaque contool_props_print_filter_create(); extern Xv_opaque contool_props_good_icon_create(); extern Xv_opaque contool_props_bad_icon_create(); extern Xv_opaque contool_props_flash_icon_create(); extern Xv_opaque contool_props_stamp_resolution_create(); extern Xv_opaque contool_props_message2_create(); extern Xv_opaque contool_props_max_message_create(); extern Xv_opaque contool_props_message3_create(); extern Xv_opaque contool_props_delete_amount_create(); extern Xv_opaque contool_props_message4_create(); extern Xv_opaque contool_props_props_apply_create(); extern Xv_opaque contool_props_props_reset_create(); X typedef struct { X Xv_opaque filters; X Xv_opaque filter_controls; X Xv_opaque filter_list; X Xv_opaque filter_insert; X Xv_opaque filter_edit; X Xv_opaque filter_update; X Xv_opaque filter_type; X Xv_opaque start; X Xv_opaque stop; X Xv_opaque filter_timeout; X Xv_opaque filter_timeout_units; X Xv_opaque comment; X Xv_opaque ignore; X Xv_opaque action; X Xv_opaque filter_beep_count; X Xv_opaque filter_beep_times; X Xv_opaque filter_command; X Xv_opaque filters_apply; X Xv_opaque filters_apply_and_save; X Xv_opaque filters_reset; } contool_filters_objects; X extern contool_filters_objects *contool_filters_objects_initialize(); X extern Xv_opaque contool_filters_filters_create(); extern Xv_opaque contool_filters_filter_controls_create(); extern Xv_opaque contool_filters_filter_list_create(); extern Xv_opaque contool_filters_filter_insert_create(); extern Xv_opaque contool_filters_filter_edit_create(); extern Xv_opaque contool_filters_filter_update_create(); extern Xv_opaque contool_filters_filter_type_create(); extern Xv_opaque contool_filters_start_create(); extern Xv_opaque contool_filters_stop_create(); extern Xv_opaque contool_filters_filter_timeout_create(); extern Xv_opaque contool_filters_filter_timeout_units_create(); extern Xv_opaque contool_filters_comment_create(); extern Xv_opaque contool_filters_ignore_create(); extern Xv_opaque contool_filters_action_create(); extern Xv_opaque contool_filters_filter_beep_count_create(); extern Xv_opaque contool_filters_filter_beep_times_create(); extern Xv_opaque contool_filters_filter_command_create(); extern Xv_opaque contool_filters_filters_apply_create(); extern Xv_opaque contool_filters_filters_apply_and_save_create(); extern Xv_opaque contool_filters_filters_reset_create(); X typedef struct { X Xv_opaque load; X Xv_opaque load_controls; X Xv_opaque load_type; X Xv_opaque load_file; X Xv_opaque accept_load; } contool_load_objects; X extern contool_load_objects *contool_load_objects_initialize(); X extern Xv_opaque contool_load_load_create(); extern Xv_opaque contool_load_load_controls_create(); extern Xv_opaque contool_load_load_type_create(); extern Xv_opaque contool_load_load_file_create(); extern Xv_opaque contool_load_accept_load_create(); X typedef struct { X Xv_opaque store; X Xv_opaque store_controls; X Xv_opaque store_type; X Xv_opaque store_file; X Xv_opaque accept_store; } contool_store_objects; X extern contool_store_objects *contool_store_objects_initialize(); X extern Xv_opaque contool_store_store_create(); extern Xv_opaque contool_store_store_controls_create(); extern Xv_opaque contool_store_store_type_create(); extern Xv_opaque contool_store_store_file_create(); extern Xv_opaque contool_store_accept_store_create(); X typedef struct { X Xv_opaque about; X Xv_opaque about_controls; X Xv_opaque message1; X Xv_opaque message5; X Xv_opaque message6; X Xv_opaque message7; X Xv_opaque message8; X Xv_opaque message9; X Xv_opaque message10; X Xv_opaque message11; X Xv_opaque message12; X Xv_opaque message13; X Xv_opaque message14; X Xv_opaque message16; X Xv_opaque message17; X Xv_opaque message18; X Xv_opaque message19; X Xv_opaque message20; X Xv_opaque send_mail; } contool_about_objects; X extern contool_about_objects *contool_about_objects_initialize(); X extern Xv_opaque contool_about_about_create(); extern Xv_opaque contool_about_about_controls_create(); extern Xv_opaque contool_about_message1_create(); extern Xv_opaque contool_about_message5_create(); extern Xv_opaque contool_about_message6_create(); extern Xv_opaque contool_about_message7_create(); extern Xv_opaque contool_about_message8_create(); extern Xv_opaque contool_about_message9_create(); extern Xv_opaque contool_about_message10_create(); extern Xv_opaque contool_about_message11_create(); extern Xv_opaque contool_about_message12_create(); extern Xv_opaque contool_about_message13_create(); extern Xv_opaque contool_about_message14_create(); extern Xv_opaque contool_about_message16_create(); extern Xv_opaque contool_about_message17_create(); extern Xv_opaque contool_about_message18_create(); extern Xv_opaque contool_about_message19_create(); extern Xv_opaque contool_about_message20_create(); extern Xv_opaque contool_about_send_mail_create(); X typedef struct { X Xv_opaque mail; X Xv_opaque mail_controls; X Xv_opaque message21; X Xv_opaque message22; X Xv_opaque address; X Xv_opaque fixed_address; X Xv_opaque other_address; X Xv_opaque message; X Xv_opaque mail_controls1; X Xv_opaque accept_send; } contool_mail_objects; X extern contool_mail_objects *contool_mail_objects_initialize(); X extern Xv_opaque contool_mail_mail_create(); extern Xv_opaque contool_mail_mail_controls_create(); extern Xv_opaque contool_mail_message21_create(); extern Xv_opaque contool_mail_message22_create(); extern Xv_opaque contool_mail_address_create(); extern Xv_opaque contool_mail_fixed_address_create(); extern Xv_opaque contool_mail_other_address_create(); extern Xv_opaque contool_mail_message_create(); extern Xv_opaque contool_mail_mail_controls1_create(); extern Xv_opaque contool_mail_accept_send_create(); X typedef struct { X Xv_opaque message_archive; X Xv_opaque archive_controls; X Xv_opaque clear; X Xv_opaque print; X Xv_opaque archive; } contool_message_archive_objects; X extern contool_message_archive_objects *contool_message_archive_objects_initialize(); X extern Xv_opaque contool_message_archive_message_archive_create(); extern Xv_opaque contool_message_archive_archive_controls_create(); extern Xv_opaque contool_message_archive_clear_create(); extern Xv_opaque contool_message_archive_print_create(); extern Xv_opaque contool_message_archive_archive_create(); #endif SHAR_EOF echo 'File contool_ui.h is complete' && chmod 0644 contool_ui.h || echo 'restore of contool_ui.h failed' Wc_c="`wc -c < 'contool_ui.h'`" test 8425 -eq "$Wc_c" || echo 'contool_ui.h: original size 8425, current size' "$Wc_c" rm -f _shar_wnt_.tmp fi # ============= manifest.h ============== if test -f 'manifest.h' -a X"$1" != X"-c"; then echo 'x - skipping manifest.h (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting manifest.h (Text)' sed 's/^X//' << 'SHAR_EOF' > 'manifest.h' && /************************************************************************/ /* 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 /************************************************************************/ /* */ /* manifest.h simple manifest constants */ /* */ /************************************************************************/ X #define TRUE 1 #define FALSE 0 X #define PRIVATE static #define PUBLIC extern #define EXPORT X #ifndef NULL #define NULL 0 #endif X #define strsave(x) (((x) == NULL)? NULL : (char *) strcpy((char *) malloc(strlen(x) + 1), x)) #define cond_free(x) ((x)? free(x) : 0) X PUBLIC int errno; PUBLIC char *sys_errlist[]; SHAR_EOF chmod 0644 manifest.h || echo 'restore of manifest.h failed' Wc_c="`wc -c < 'manifest.h'`" test 1647 -eq "$Wc_c" || echo 'manifest.h: original size 1647, current size' "$Wc_c" rm -f _shar_wnt_.tmp fi # ============= patchlevel.h ============== if test -f 'patchlevel.h' -a X"$1" != X"-c"; then echo 'x - skipping patchlevel.h (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting patchlevel.h (Text)' sed 's/^X//' << 'SHAR_EOF' > 'patchlevel.h' && /************************************************************************/ /* 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 /************************************************************************/ /* */ /* Patch Comments */ /* 0 Release of version 3.2a; see README for details */ /* comp.sources.x: Volume ?, Issue ? */ /* */ /************************************************************************/ SHAR_EOF chmod 0644 patchlevel.h || echo 'restore of patchlevel.h failed' Wc_c="`wc -c < 'patchlevel.h'`" test 1402 -eq "$Wc_c" || echo 'patchlevel.h: original size 1402, current size' "$Wc_c" rm -f _shar_wnt_.tmp fi # ============= parse.y ============== if test -f 'parse.y' -a X"$1" != X"-c"; then echo 'x - skipping parse.y (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting parse.y (Text)' sed 's/^X//' << 'SHAR_EOF' > 'parse.y' && /************************************************************************/ /* 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 %{ X #include <stdio.h> #include <ctype.h> X #include "manifest.h" #include "contool.h" X EXPORT Props *parsed_defaults; EXPORT Filter *parsed_filters; EXPORT int filter_version = 0; X EXPORT int parse_errors_occured; X PRIVATE char *get_last_token(); X PRIVATE Filter *curr; PRIVATE char *curr_file; PRIVATE int line_count = 1; PRIVATE char ungetc = -1; X %} X %start configuration X %union {char *cpval; X int ival; X Filter *fval; X Props *pval; X } X %token <cpval> STRING %token <ival> INTEGER X %token LBRACE RBRACE X %token ARCHIVE BEEP CHECK_ICON COMMAND COMMENT DEFAULTS DELETE DISPLAY FILTERS X FLASH FLASH_ICON GOOD_ICON IGNORE LOG LOG_BEFORE_FILTERING LOG_FILE X MATCH NO NOFLASH NOOPEN NOSTAMP OPEN PRINT QUIET SAVE STAMP TIMEOUT X TIMESTAMP TO VERSION YES X %type <ival> beep flash log old_flash old_open old_stamp open stamp yes_no %type <cpval> command old_end_string string %type <fval> filter filter_list old_filter old_filter_list old_ignore old_quiet old_save X %% X configuration : empty X | old_style X | new_style X ; X old_style : old_filter_list X { parsed_defaults = NULL; X parsed_filters = $1; X } X ; X old_filter_list : old_filter X { $$ = $1; } X | old_filter_list old_filter X { Filter *f; X X for (f = $1; f->next; f = f->next) X ; X f->next = $2; X $$ = $1; X } X ; X old_filter : old_save X | old_ignore X | old_quiet X ; X old_save : SAVE beep old_flash old_open old_stamp STRING old_end_string X { Filter *f; X char *msg; X X f = (Filter *) malloc(sizeof(Filter)); X f->save = TRUE; X f->beep = $2; X f->flash = $3; X f->open = $4; X f->stamp = $5; X f->timeout = 0; X f->log = TRUE; X f->start = $6; X f->stop = $7; X f->start_re = NULL; X f->stop_re = NULL; X f->command = NULL; X f->comment = NULL; X f->next = NULL; X if (msg = compile_exp(f, f->start, f->stop)) X yyerror(msg); X $$ = f; X } X ; X old_ignore : IGNORE STRING old_end_string X { Filter *f; X char *msg; X X f = (Filter *) malloc(sizeof(Filter)); X f->save = FALSE; X f->beep = 0; X f->flash = FALSE; X f->open = FALSE; X f->stamp = FALSE; X f->timeout = 0; X f->log = TRUE; X f->start = $2; X f->stop = $3; X f->start_re = NULL; X f->stop_re = NULL; X f->command = NULL; X f->comment = NULL; X f->next = NULL; X if (msg = compile_exp(f, f->start, f->stop)) X yyerror(msg); X $$ = f; X } X ; X old_quiet : QUIET STRING old_end_string X { Filter *f; X char *msg; X X f = (Filter *) malloc(sizeof(Filter)); X f->save = TRUE; X f->beep = 0; X f->flash = FALSE; X f->open = FALSE; X f->stamp = TRUE; X f->timeout = 0; X f->log = TRUE; X f->start = $2; X f->stop = $3; X f->start_re = NULL; X f->stop_re = NULL; X f->command = NULL; X f->comment = NULL; X f->next = NULL; X if (msg = compile_exp(f, f->start, f->stop)) X yyerror(msg); X $$ = f; X } X ; X old_flash : FLASH X { $$ = TRUE; } X | NOFLASH X { $$ = FALSE; } X ; X old_open : OPEN X { $$ = TRUE; } X | NOOPEN X { $$ = FALSE; } X ; X old_stamp : STAMP X { $$ = TRUE; } X | NOSTAMP X { $$ = FALSE; } X ; X old_end_string : empty X { $$ = NULL; } X | TO STRING X { $$ = $2; } X ; X new_style : version defaults X | version filters X | version defaults filters X ; X version : empty X { filter_version = 0; } X | VERSION INTEGER X { filter_version = $2; } X ; X defaults : DEFAULTS X { parsed_defaults = (Props *) malloc(sizeof(Props)); X *parsed_defaults = defaults; X } X LBRACE default_list RBRACE X ; X filters : FILTERS LBRACE filter_list RBRACE X { parsed_filters = $3; } X ; X default_list : empty X | default_list default X ; X default : beep X { parsed_defaults->beep = $1; } X | command X { parsed_defaults->command = $1; } X | flash X { parsed_defaults->flash = $1; } X | log X { parsed_defaults->log = $1; } X | open X { parsed_defaults->open = $1; } X | stamp X { parsed_defaults->stamp = $1; } X | ARCHIVE INTEGER X { parsed_defaults->archive_style = $2; } X | CHECK_ICON string X { parsed_defaults->bad_icon = $2; } X | DELETE INTEGER X { parsed_defaults->delete_amount = $2; } X | DISPLAY INTEGER X { parsed_defaults->max_size = $2; } X | FLASH_ICON string X { parsed_defaults->flash_icon = $2; } X | GOOD_ICON string X { parsed_defaults->good_icon = $2; } X | LOG_BEFORE_FILTERING yes_no X { parsed_defaults->log_after = !$2; } X | LOG_FILE string X { parsed_defaults->log_file = $2; } X | PRINT STRING X { parsed_defaults->print_filter = $2; } X | TIMESTAMP INTEGER X { parsed_defaults->stamp_resolution = $2; } X ; X filter_list : empty X { $$ = NULL; } X | filter_list filter X { Filter *f; X X if ($1 == NULL) X $$ = $2; X else { X for (f = $1; f->next; f = f->next) X ; X f->next = $2; X $$ = $1; X } X } X ; X filter : LBRACE X { curr = (Filter *) malloc(sizeof(Filter)); X bzero(curr, sizeof(Filter)); X if (filter_version < 310) X curr->log = TRUE; X } X filter_attr_list RBRACE X { char *msg; X X if (curr->start == NULL) X yyerror("no filter pattern specified"); X if (msg = compile_exp(curr, curr->start, curr->stop)) X yyerror(msg); X $$ = curr; X } X ; X filter_attr_list: empty X | filter_attr_list filter_attr X ; X filter_attr : beep X { curr->beep = $1; } X | command X { curr->command = $1; } X | flash X { curr->flash = $1; } X | log X { curr->log = $1; } X | open X { curr->open = $1; } X | stamp X { curr->stamp = $1; } X | COMMENT string X { curr->comment = $2; } X | IGNORE yes_no X { curr->save = !$2; } X | MATCH string X { curr->start = $2; } X | TIMEOUT INTEGER X { curr->timeout = $2; } X | TO string X { curr->stop = $2; } X ; X beep : BEEP INTEGER X { $$ = $2; } X ; X command : COMMAND string X { $$ = $2; } X ; flash : FLASH yes_no X { $$ = $2; } X ; X log : LOG yes_no X { $$ = $2; } X ; X open : OPEN yes_no X { $$ = $2; } X ; X stamp : STAMP yes_no X { $$ = $2; } X ; X yes_no : YES X { $$ = TRUE; } X | NO X { $$ = FALSE; } X ; X string : STRING X { $$ = (*$1 == '\0')? NULL : $1; } X ; X empty : ; X %% X /************************************************************************/ PRIVATE yyerror(s1, s2, s3, s4, s5, s6, s7) X char *s1, *s2, *s3, *s4, *s5, *s6, *s7; X { char buf1[1024], buf2[1024]; X 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) { X strcat(buf1, " at or near "); X strcat(buf1, get_last_token()); X } X error(buf1); X yyclearin; X parse_errors_occured++; } X #include "lex.c" SHAR_EOF chmod 0644 parse.y || echo 'restore of parse.y failed' Wc_c="`wc -c < 'parse.y'`" test 8184 -eq "$Wc_c" || echo 'parse.y: original size 8184, current size' "$Wc_c" rm -f _shar_wnt_.tmp fi # ============= contool.man ============== if test -f 'contool.man' -a X"$1" != X"-c"; then echo 'x - skipping contool.man (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting contool.man (Text)' sed 's/^X//' << 'SHAR_EOF' > 'contool.man' && .TH CONTOOL 1 "31 July 1991" .SH NAME contool \- capture and display console output .SH SYNOPSIS contool [\fB\(hyc\fP \fIfile\fP] [\fB\(hyf\fP] [\fB\(hyi\fP \fIinput\fP] [\fB\(hyl\fP] [\f3\(hyL\fP \f2logfile\fP] [\f3\(hyn\fP] .SH DESCRIPTION .LP \f2Contool\fP captures and displays any messages sent to the system console. Each message is timestamped as it arrives. The messages are displayed in a scrolling text window, so the user can scroll through old messages. .LP When a message arrives, \f3contool\fP will beep and, if closed, begin blinking its icon until the user opens the tool. This behavior can be changed by modifying the default contool properties. .LP \f2Contool\fP must be run under either Open Windows or X Windows. It accepts the standard Open Windows command line options. .SH OPTIONS .IP "\fB\\(hyc\fP \fIfile\fP" specifies an alternate configuration file. \f2Contool\fP normally reads its configuration information from ~/.contool. .IP "\fB\\(hyf\fP" forces \f2contool\fP to fork itself into the background after acquiring the console. This option is most useful when starting \f2contool\fP from your ~/.xinitrc or ~/.openwin-init file, where multiple tools are started in the background. Even if \f2contool\fP is started first, other tools may begin running and produce error messages before \f2contool\fP can acquire the console. By using the \fB-f\fP option you can start \f2contool\fP in the foreground, preventing other tools from starting until \f2contool\fP has acquired the console. .IP "\fB\\(hyi\fP \fIinput\fP" specifies an alternate input source. \f2Contool\fP normally reads messages from the system console. If \fB-i\fP is used, \f2contool\fP will read messages from the specified \fIinput\fP. \fIInput\fP must be the pathname of a either a FIFO, or a character special device like /dev/tty. \fIInput\fP can also be given as \*(lq-\*(rq, indicating that contool should read messages from its standard input. .IP "\fB\\(hyl\fP" enables logging when \f2contool\fP starts. Initially, \f2contool\fP does not log messages to a file. This option allows logging to be started automatically. Logging behavior can be enabled and disabled via the \*(lqFile\*(rq menu (see below). .IP "\fB\\(hyL\fP \fIlogfile\fP" specifies an alternate log file. The value of \fIlogfile\fP overrides any log file stored in the configuration file. The \fB-l\fP and \fB-L\fP options used together allow multiple copies of contool to be started on a single machine, with each copy logging to a different file, without having to create and maintain multiple configuration files. .IP "\fB\\(hyn\fP" prevents \f2contool\fP from acquiring the console when it starts. This is most useful when testing a new version of contool, so that the test copy does not interfere with any previously running console tool. .SH USER INTERFACE .LP \f2Contool\fP presents the user with a control panel containing three buttons and a scrolling text window. Console messages appear in the text window; \f2contool\fP's behavior is managed with the \fBFile\fP, \fBView\fP, and \fBEdit\fP buttons. These buttons have several menu choices associated with them: .IP "\fBFile: Load Configuration...\fP" brings up the \fBLoad Configuration\fP dialog box. This dialog contains a non-exclusive setting, a text field, and a single \fBLoad\fP button. The setting has two entries: \*(lqTool Properties\*(rq and \*(lqFilter Definitions\*(rq. The user can choose which of these items to load from the configuration file. The default action is to load both properties and filters from the file. .IP "" The text field contains the path of the configuration file. By default, this is either ~/.contool, or the value of the \fB-c\fP option (above). This text field provides file name completion, like \f2csh\fP(1), by typing a space or carriage return. .IP "" After determining which components to be read from the file, and the name of the file, clicking on the \fBLoad\fP button will cause the desired elements to be read from the file. If filters are loaded, any existing filters are discarded. If \f2contool\fP was in the middle of filtering a multi-line message, that filtering action is terminated. .IP "" \f2Contool\fP can read files created by all previous versions of \f2contool\fP. Files written by \f2contool\fP cannot be read by any previous version. .IP "\fBFile: Save Configuration...\fP" is analogous to the \fBLoad Configuration\fP operation, bringing up a dialog box containing a non-exclusive setting, a text field, and a \fBSave\fP button. In the same manner as the \fBLoad Configuration\fP dialog, the user indiactes which items he desires to save, specifies the destination file, and clicks on the \fBSave\fP button to save the information. .IP "" \f2Contool\fP writes the data in a format incompatible with previous versions (release 3.0 or earlier) of the tool. .IP "\fBFile: Start Logging\fP" starts logging console messages to the log file specified by the tool properties, or the \fB-L\fP option (above). The tool properties also contains a switch which determines whether messages are written before or after filtering occurs. If before, all messages are logged. If after, a message is written to the log if it does not match a filter and the default action in the tool properties has \*(lqLog message\*(rq enabled; or if it matches a filter with both the \*(lqSave\*(rq and \*(lqLog message\*(rq attributes set. .IP "" The log file is written in such a manner that multiple invocations of \f2contool\fP can write to the same log file without conflict. New messages are always appended to the log file. Log files can be forcibly flushed with a SIGHUP; see SIGNALS, below. .IP "\fBFile: Stop Logging\fP" stops the logging process. .IP "\fBFile: Print\fP" uses the \*(lqPrint Filter\*(rq specified in the tool properties to print the contents of the console. Only messages saved in the console can be printed. .IP "\fBFile: About Contool...\fP" provides a brief history of \f2contool\fP, and allows users to send e-mail to the contool developer. .IP "\fBView: Archive...\fP" opens the message archive dialog box. This dialog box displays a scrolling window containing all messages archived from the main console display. See MESSAGE ARCHIVE, below. .IP "\fBView: Archive Messages\fP" moves all the messages in the console display to the message archive. This is a handy way to remove already viewed messages from the console without losing them for later review. By periodically moving messages to the archive, only the most recent messages will be visible in the main console display. Messages can be archived automatically as well; see TOOL PROPERTIES, below. .IP "\fBView: Become Console\fP" ensures that \f2contool\fP has the system console attribute. SunOS allows exactly one process in the system to own the console. If some other process takes control of the console, the user can reassign the console attribute to \f2contool\fP using this menu selection. .IP "\fBView: Clear Messages\fP" clears all messages from the console text display. .IP "\fBView: Reset Filter\fP" interrupts filtering of a multi-line filter. If the user incorrectly specifies the end pattern of a multi-line filter, \f2contool\fP may never stop processing the filter, causing all subsequent console messages to be incorrectly handled. This selection resets the effect of any multi-line filter that may be in effect. .IP "" When processing a multi-line filter, \f2contool\fP displays the starting filter pattern in the left window footer. If the left footer is blank, \f2contool\fP is not processing a multi-line filter. .IP "\fBEdit: Filters...\fP" brings up the \fBFilters\fP dialog box. See EDITING FILTERS, below. .IP "\fBEdit: Properties...\fP" brings up the \fBTool Properties\fP dialog box. See TOOL PROPERTIES, below. .SH EDITING FILTERS The \fBFilters\fP dialog presents a scrolling list of filters and a variety of devices used to modify the current filter set. The items in this dialog are: .IP "\fBFilters\fP" This scrolling list shows the starting pattern of each filter currently used by \f2contool\fP. The pattern text is preceded by a small glyph indicating whether the filter is a single-line or multi-line filter. .IP "" If exactly one item in the list is selected, the properties of that filter will be displayed in the dialog box. If no, or more than one, filter is selected, the remainder of the dialog box is grayed out. .IP "\fBInsert\fP" This button inserts a new blank filter into the scrolling list, allowing the user to add new filters to the filter set. A menu attached to the button allows the user to select the insert point: at the top of the list, before the current selection, after the current selection, or at the bottom of the list. The \*(lqbefore\*(rq and \*(lqafter\*(rq choices are only enabled if exactly one filter in the list is selected. The default position is the bottom of the list. .IP "\fBEdit\fP" This button edits the currently selected filters in the list. The menu attached to this button has four choices: \fBCut\fP, \fBCopy\fP, \fBPaste\fP, and \fBDelete\fP. .IP "" The \fBCut\fP operation removes the selected filters from the list and places them on the clipboard, where they can subsequently be pasted back into the list. .IP "" The \fBCopy\fP operation copies the selected filters to the clipboard. The filters are not removed from the list. The copied filters can subsequently be pasted back into the list. .IP "" The \fBPaste\fP operation copies filters from the clipboard into the list. This selection has a menu which specifies the paste position: at the top of the list, before the current selection, after the current selection, or at the bottom of the list. The \*(lqbefore\*(rq and \*(lqafter\*(rq choices are only enabled if exactly one filter in the list is selected. The default position is the bottom of the list. .IP "" The \fBDelete\fP operation removes the selected filters from the list without placing them on the clipboard. Once deleted, filters cannot be recovered with a paste operation. .IP "" The \fBCut\fP, \fBCopy\fP, and \fBDelete\fP selections are only presented if one or more filters in the list are selected. The \fBPaste\fP selection is only available after a \fBCut\fP or \fBCopy\fP operation. .IP "\fBUpdate\fP" This button updates the currently selected filter using the values presented in the remainder of the dialog box. This button is only accessible if exactly one filter in the list is selected. .IP "" \fBUpdate\fP is used to modify an existing filter. When just that filter is selected, its attributes are placed into the other dialog elements described below. After adjusting the filter attributes, the user clicks the \fBUpdate\fP button to apply the changes to the currently selected filter. .IP "" In a similar manner, \fBUpdate\fP is used to apply attributes to a new, blank filter placed in the list via the \fBInsert\fP button. .IP "\fBType\fP" The \fBType\fP toggle indicates whether a filter will match just a single line message, or will match a multiple line message. When \*(lqSingle line filter\*(rq is chosen, the \fBEnd pattern\fP item is disabled, and the user must specify the pattern which will match a single line of text written to the console. When \*(lqMulti-line filter\*(rq is selected, the \fBEnd pattern\fP item is enabled, and the user needs to specify both a starting and an ending pattern. All text following a line which matches the starting pattern, up to and including a line which matches the ending pattern, is considered to be part of the filtered message. .IP "\fBPattern\fP" This text field specifies the regular expression which matches the first (and, in the case of single line filters, the only) line of text in the filtered message. Any valid regular expression is permitted. Users that are trying to match some text exactly should be aware that regular expressions can match text anywhere in a line, and that the expression should be anchored to the start (or end) of the line by using the "^" (or "$") metacharacters. For more information on regular expressions, see \f2ed\fP(1). .IP "" As a special extension to regular expressions, \f2contool\fP recognizes a backslash (\*(lq\\\*(rq) followed by one or more octal digits as a single character in the expression. This allows non-printing characters, such as control characters, to be inserted in the text pattern. If a backslash is followed by any other character, it is placed in the pattern verbatim. Thus, to create an expression which matches a control-G followed by a backslash, the pattern \*(lq\\007\\\*(rq would suffice. .IP "\fBEnd pattern\fP" If the \fBType\fP is set to \*(lqMulti-line filter\*(rq, this field must contain the regular expression which matches the last line of the block of text handled by this filter. .IP "\fBTimeout\fP" If the \fBType\fP is set to \*(lqMulti-line filter\*(rq, this field sets a limit on how long \f2contool\fP will process the filter. This prevents filters with erroneous end patterns from absorbing all console output once they begin filtering. The default value, 0, indicates that no timeout is in effect. .IP "\fBComment\fP" This text field contains any comments regarding the filter the user wishes to record. Since some filters can be rather arcane, it is suggested that users comment their filters. .IP "\fBWhen matched\fP" This exclusive setting dictates the behavior of \f2contool\fP when a filter is matched. If \*(lqSave message\*(rq is chosen, the message is copied into the console display, and various actions can be taken. If \*(lqIgnore message\*(rq is selected, the filter text is discarded and no further actions are taken by \f2contool\fP. .IP "\fBWhen saved\fP" If \fBWhen matched\fP is set to \*(lqSave message\*(rq, this non-exclusive choice item will be enabled, allowing the user to specify what contool should do with this message. .IP "" The \*(lqBeep\*(rq choice causes the terminal bell to be sounded. If selected, the beep counter to the right of this item is enabled, allowing the user to choose anywhere from one brief beep up to 99 annoying beeps. .IP "" The \*(lqCommand\*(rq choice causes a single command to be executed. The text field to the right of this item must contain the command to be executed. \f2Contool\fP will write the text of the message to the standard input of the command. For example, using \*(lqmail -s 'Contool output' user\*(rq as the command would mail the message text to the \f2user\fP. .IP "" The \*(lqFlash icon\*(rq choice causes the \f2contool\fP icon to flash, alternating between the \*(lqCheck console\*(rq and \*(lqFlash\*(rq icons. .IP "" The \*(lqLog message\*(rq choice causes the message to be written to the message log, if logging is enabled and is performed after filtering. .IP "" The \*(lqOpen window\*(rq choice causes \f2contool\fP to open from its iconic state, and to move in front of any obscuring windows. .IP "" The \*(lqTimestamp\*(rq choice causes \f2contool\fP to write a timestamp to the console before copying the message into the console. The timestamp is written in conjunction with the timestamp resolution specified in the \fBTool Properties\fP dialog. .IP "\fBApply\fP" This button makes the filters contained in the scrolling list the current set of active filters. Until this button is clicked, all changes made to the filters are not used by \f2contool\fP. After clicking \fBAccept\fP, the changed filters become the current working set. .IP "" Note that even after clicking \fBAccept\fP, the configuration file is not updated. To make the changes permanent between invocations of \f2contool\fP, press the \fBApply and Save\fP button, or use the \fBSave Configuration\fP dialog to save the changed filters. .IP "\fBApply and Save\fP" This button makes the filters in the scrolling list the current set of active filters and writes those filters and the tool properties to the current configuration file. To write the filters to a different file, or to write just the filters without the tool properties, press the \fBApply\fP button and use the \fBSave Configuration\fP dialog instead. .IP "\fBReset\fP" This button discards any changes made to the current filter set, restoring the filter list to match the current filter set in use by \f2contool\fP. .SH TOOL PROPERTIES The \fBTool Properties\fP dialog allows the user to change the default behavior of \f2contool\fP. This includes various tool attributes, and the actions taken when a message arrives which does not match any filter. The various properties include: .IP "\fBDefault action\fP" This non-exclusive setting determines the actions taken by \f2contool\fP when a message arrives which does not match any filter. The various choices in this setting exactly correspond to the \fBWhen saved\fP setting the \fBFilters\fP dialog, above. .IP "\fBLog file\fP This text field contains the path of the file to which messages will be logged. This field must be filled in before logging is enabled. .IP "\fBLog messages\fP" If this exclusive setting is set to \*(lqbefore filtering\*(rq, all messages will be logged. If set to \*(lqafter filtering\*(rq, messages that match filters whose \*(lqWhen matched\*(rq behavior is set to \*(lqIgnore message\*(rq will not be logged. .IP "\fBArchive messages\fP" This exclusive setting determines how messages will be moved from the main console display to the message archive. If set to \*(lqManually\*(rq, messages will only be archived when the user selects \fBArchive Messages\fP from the \fBView\fP menu in the main \f2contool\fP window. If set to \*(lqWhen closing contool\*(rq, messages are copied to the archive whenever the \f2contool\fP window is closed. This mode assumes that you typically open \f2contool\fP, read all the messages, and close the window. Each time you open the window, you'll only see messages that have arrived since you last closed \f2contool\fP. .IP "" Archived messages can be viewed in the message archive, described below. .IP "\fBPrint filter\fP" This text field specifies the command to be used to print the console. The default is \*(lqlpr\*(rq. Local site dependencies may require a different command. .IP "\fB\\*(lqAll is well\\*(rq icon\fP" This text field contains the path of a file created with \f2iconedit\fP(1). The contained image will be used as \f2contool\fP's regular icon image. This image is displayed whenever no flashing is in effect. .IP "\fB\\*(lqCheck console\\*(rq icon\fP" This image is alternated with the \fB\*(lqFlash\*(rq icon\fP image whenever flashing is required. .IP "\fB\\*(lqFlash\\*(rq icon\fP" This image is alternated with the \fB\*(lqCheck console\*(rq icon\fP image whenever flashing is required. Ideally, all three icons should be the same size. .IP "\fBTimestamp resolution\fP" This numeric field specifies the minimum number of seconds to wait before writing a new timestamp to the console. Messages which require timestamping will only write a timestamp if this number of seconds have transpired since the last timestamp. .IP "\fBMaximum message text\fP" This numeric field determines the maximum size, in bytes, of messages that will be stored in the console. When writing a message to the console would exceed this limit, some number of bytes, as determined by the \fBOverflow delete amount\fP, below, will be removed from the front of the console. This feature prevents the console from becoming so large over time that it begins to swamp system resources. .IP "\fBOverflow delete amount\fP" When writing a message to the console would exceed the \fBMaximum message text\fP, above, text will be deleted from the beginning of the console to make room. This numeric field specifies how many bytes to remove to make room. \f2Contool\fP will attempt to remove whole messages within the constraints of the console size to preserve a readable console. .IP "\fBApply\fP" This button makes the values in the dialog box the current tool properties. Until this button is clicked, all changes made to the properties are not used by \f2contool\fP. After clicking \fBAccept\fP, the changed values become the current properties. .IP "" Note that even after clicking \fBAccept\fP, the configuration file is not updated. To make the changes permanent between invocations of \f2contool\fP, use the \fBSave Configuration\fP dialog to save the changed properties. .IP "\fBReset\fP" This button discards any changes in the dialog box made to the current properties, restoring the properties to match the current properties in use by \f2contool\fP. .SH MESSAGE ARCHIVE The \fBMessage Archive\fP dialog allows the user to view archived messages. The dialog presents a scrolling text window and two buttons. .IP "\fBClear\fP" The \fBClear\fP button removes all the messages from the archive. Normally, the archive works like the main \f2contool\fP display: it retains a certain amount of text, and deletes the oldest messages as new messages arrive in excess of that amount. The \fBClear\fP button circumvents this feature and explicitly clears the archive display. .IP "" The archive window will hold ten times the amount of text specified for the main console display, as determined by the \fBMaximum message text\fP value in the \fBTool Properties\fP dialog, described above. .IP "\fBPrint\fP The \fBPrint\fP button prints the contents of the archive, using the \*(lqPrint Filter\*(rq specified in the \fBTool Properties\fP dialog. .SH CONFIGURATION FILE FORMAT Previous versions of \f2contool\fP relied on the user editing the configuration file by hand. This version manages the file automatically, and it is not intended that the file be edited directly by users. See EDITING FILTERS, above, for information on modifying the behavior of \f2contool\fP. .SH SIGNALS \f2Contool\fP will respond to certain Unix signals. They are: .IP "\fBSIGHUP\fP" Upon receipt of SIGHUP, \f2contool\fP will close and reopen its log file, if logging is enabled. This guarantees that logged messages are flushed to disk. .IP "\fBSIGUSR1\fP" Upon receipt of SIGUSR1, \f2contool\fP will stop blinking its icon. This is a handy way to stop blinking without opening \f2contool\fP. .SH FILES .ta 2i ~/.contool configuration file .SH SEE ALSO cmdtool(1), ed(1), kill(1), mkfifo(2), signal(3) .SH AUTHOR .LP Chuck Musciano .br Advanced Technology Department .br Harris Corporation .br PO Box 37, MS 3A/1912 .br Melbourne, FL 32902 .br (407) 727-6131 .br ARPA: chuck@trantor.harris-atd.com .SH BUGS .LP \f2Contool\fP is a view-only tool, and there is no way to type commands on the console. .LP Window system bugs may cause unusual, but harmless, quirks in the behavior of \f2contool\fP. In particular, displaying a menu in a dialog box without actually selecting an item from that menu will cause the dialog box to close. SHAR_EOF chmod 0644 contool.man || echo 'restore of contool.man failed' Wc_c="`wc -c < 'contool.man'`" test 22873 -eq "$Wc_c" || echo 'contool.man: original size 22873, current size' "$Wc_c" rm -f _shar_wnt_.tmp fi # ============= contool.info ============== if test -f 'contool.info' -a X"$1" != X"-c"; then echo 'x - skipping contool.info (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting contool.info (Text)' sed 's/^X//' << 'SHAR_EOF' > 'contool.info' && # # contool.info - User interface object help text. # This file was generated by `gxv' from `contool.G'. # DO NOT EDIT BY HAND. # :contool_controls The contool control panel has buttons which let you load and store configuration data, adjust contool's configuration, and create and modify message filters. Point at the desired button and press the Help key for more information about that set of functions. # :file The File button provides various file-related services to contool users. The associated menu has five entries. X "Load Configuration" brings up the Load Configuration dialog. X "Store Configuration" brings up the Store Configuration dialog. X "Start Logging" starts logging messages to the log file specified in the Properties dialog. If logging is already in effect, this menu item is disabled. X "Stop Logging" stops logging. If logging is not in effect, this menu item is disabled. X "Print" prints the contents of the console use the print filter specified in the Properties dialog. X "About Contool" displays a brief history of contool, and allows users to send e-mail to contool's developer. X The default action is "Load Configuration". # :view The View button provides three contool support functions: X "Become Console" ensures that contool has the system console attribute. Only one process under SunOS can own the console. If some other process acquires this attribute, messages will no longer be routed to contool. This selection will give the console attribute back to contool. SHAR_EOF true || echo 'restore of contool.info failed' fi echo 'End of part 6' echo 'File contool.info is continued in part 7' echo 7 > _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