From 3b64458b9387db2cf6a270dcdd4ed6e5e245375a Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Mon, 6 Jan 1997 10:26:28 +0000 Subject: Contool will capture and display system console messages with timestamps. It is a replacement for the standard X console. 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. You can instruct contool to filter and ignore certain common console messages or act upon them. Submitted by: Nick Sayer (w/changes by me) Closes PR: ports/2152 --- sysutils/contool/Makefile | 29 ++++++++++ sysutils/contool/distinfo | 1 + sysutils/contool/files/patch-01 | 20 +++++++ sysutils/contool/files/patch-02 | 28 +++++++++ sysutils/contool/files/patch-03 | 20 +++++++ sysutils/contool/files/patch-04 | 10 ++++ sysutils/contool/files/patch-05 | 35 ++++++++++++ sysutils/contool/files/patch-06 | 122 ++++++++++++++++++++++++++++++++++++++++ sysutils/contool/pkg-comment | 1 + sysutils/contool/pkg-descr | 13 +++++ sysutils/contool/pkg-message | 27 +++++++++ sysutils/contool/pkg-plist | 3 + 12 files changed, 309 insertions(+) create mode 100644 sysutils/contool/Makefile create mode 100644 sysutils/contool/distinfo create mode 100644 sysutils/contool/files/patch-01 create mode 100644 sysutils/contool/files/patch-02 create mode 100644 sysutils/contool/files/patch-03 create mode 100644 sysutils/contool/files/patch-04 create mode 100644 sysutils/contool/files/patch-05 create mode 100644 sysutils/contool/files/patch-06 create mode 100644 sysutils/contool/pkg-comment create mode 100644 sysutils/contool/pkg-descr create mode 100644 sysutils/contool/pkg-message create mode 100644 sysutils/contool/pkg-plist (limited to 'sysutils') diff --git a/sysutils/contool/Makefile b/sysutils/contool/Makefile new file mode 100644 index 000000000000..d467b8cda1c5 --- /dev/null +++ b/sysutils/contool/Makefile @@ -0,0 +1,29 @@ +# New ports collection makefile for: contool +# Version required: 1.25 +# Date created: 2 Dec 1996 +# Whom: nsayer@quack.kfu.com +# +# $Id: Makefile,v 1.2 1997/01/06 00:27:09 obrien Exp $ +# + +DISTNAME= contool-3.3a +CATEGORIES= sysutils +MASTER_SITES= http://melmac.corp.harris.com/files/ +EXTRACT_SUFX= .tar.Z + +MAINTAINER= nsayer@quack.kfu.com + +LIB_DEPENDS= xview\\.3\\.:${PORTSDIR}/x11/xview-lib + +NO_CDROM= "source code cannot be sold, nor can you incorporate the source code into a product which is subsequently sold" +NO_WRKSUBDIR= yes +USE_IMAKE= yes + + +pre-install: + @${MKDIR} ${PREFIX}/share/help + +post-install: + @${CAT} ${PKGDIR}/MESSAGE + +.include diff --git a/sysutils/contool/distinfo b/sysutils/contool/distinfo new file mode 100644 index 000000000000..6aeca8e67b8e --- /dev/null +++ b/sysutils/contool/distinfo @@ -0,0 +1 @@ +MD5 (contool-3.3a.tar.Z) = 2edc23eefa1c5f2dab3d1cc755f9a81a diff --git a/sysutils/contool/files/patch-01 b/sysutils/contool/files/patch-01 new file mode 100644 index 000000000000..8d61fad4a8e0 --- /dev/null +++ b/sysutils/contool/files/patch-01 @@ -0,0 +1,20 @@ +--- Imakefile.orig Thu Feb 24 09:55:24 1994 ++++ Imakefile Sun Jan 5 13:58:56 1997 +@@ -1,14 +1,14 @@ + # Mailer you use. Solaris 2.x users, change this to /usr/bin/mailx +-MAILER = /usr/ucb/mail ++MAILER = /usr/bin/mail + + # Where you installed Open Windows +-OPENWINHOME = /usr/openwin ++OPENWINHOME = ${PREFIX} + + # Paths to be searched for icons + ICON_PATH = .:./icons:/usr/local/images:$(OPENWINHOME)/include/images:$(INCDIR)/bitmaps + + # Where to install the help file +-HELPDIR = /usr/local/lib/help ++HELPDIR = $(OPENWINHOME)/share/help + + # Where your XView libraries are installed. If running under + # SunOS 4.x, use the first version. If using Solaris 2.x with diff --git a/sysutils/contool/files/patch-02 b/sysutils/contool/files/patch-02 new file mode 100644 index 000000000000..284753d0a871 --- /dev/null +++ b/sysutils/contool/files/patch-02 @@ -0,0 +1,28 @@ +--- contool.c.orig Thu Feb 24 09:55:30 1994 ++++ contool.c Sun Jan 5 13:48:41 1997 +@@ -284,6 +284,9 @@ + EXPORT acquire_console() + + { int console; ++#if (defined(BSD) && (BSD >= 199306)) ++ int i; ++#endif + + #ifdef SVR4 + if (slave > 0) { +@@ -293,8 +296,15 @@ + abend("%s: could not attach to /dev/console: %s", program, sys_errlist[errno]); + } + #else ++#if (defined(BSD) && (BSD >= 199306)) ++ i=1; ++#endif + if (slave > 0) ++#if (defined(BSD) && (BSD >= 199306)) ++ if (ioctl(slave, TIOCCONS, &i) == -1) ++#else + if (ioctl(slave, TIOCCONS, NULL) == -1) ++#endif + abend("%s: could not attach to /dev/console: %s", program, sys_errlist[errno]); + #endif + } diff --git a/sysutils/contool/files/patch-03 b/sysutils/contool/files/patch-03 new file mode 100644 index 000000000000..17bfd8e025d1 --- /dev/null +++ b/sysutils/contool/files/patch-03 @@ -0,0 +1,20 @@ +--- manifest.h.orig Thu Feb 24 09:55:52 1994 ++++ manifest.h Sun Jan 5 13:52:40 1997 +@@ -23,6 +23,9 @@ + /* */ + /************************************************************************/ + ++/* for BSD definition */ ++#include ++ + #define TRUE 1 + #define FALSE 0 + +@@ -38,5 +41,7 @@ + #define cond_free(x) {if (x) free(x);} + + PUBLIC int errno; ++#if !(defined(BSD) && (BSD >= 199103)) + PUBLIC char *sys_errlist[]; ++#endif + diff --git a/sysutils/contool/files/patch-04 b/sysutils/contool/files/patch-04 new file mode 100644 index 000000000000..ad578fc716d5 --- /dev/null +++ b/sysutils/contool/files/patch-04 @@ -0,0 +1,10 @@ +--- expand.c.orig Thu Feb 24 09:55:35 1994 ++++ expand.c Sun Jan 5 12:25:09 1997 +@@ -17,6 +17,7 @@ + /* without prior permission from Harris Corporation. */ + /************************************************************************/ + ++#include + #include + #include + #include diff --git a/sysutils/contool/files/patch-05 b/sysutils/contool/files/patch-05 new file mode 100644 index 000000000000..8fb073db8cd0 --- /dev/null +++ b/sysutils/contool/files/patch-05 @@ -0,0 +1,35 @@ +--- filters.c.orig Thu Feb 24 09:55:37 1994 ++++ filters.c Sun Jan 5 13:51:25 1997 +@@ -25,12 +25,17 @@ + + #include + #include ++#include + + #include + #include + #include + #include + ++#if (defined(BSD) && (BSD >= 199306)) ++#include ++#endif ++ + #include "manifest.h" + #include "contool.h" + #include "contool_ui.h" +@@ -122,8 +127,14 @@ + + { + cond_free(f->start); ++#if (defined(BSD) && (BSD >= 199306)) ++ regfree(f->start_re); ++#endif + cond_free(f->start_re); + cond_free(f->stop); ++#if (defined(BSD) && (BSD >= 199306)) ++ regfree(f->stop_re); ++#endif + cond_free(f->stop_re); + cond_free(f->command); + cond_free(f->comment); diff --git a/sysutils/contool/files/patch-06 b/sysutils/contool/files/patch-06 new file mode 100644 index 000000000000..262f63b473da --- /dev/null +++ b/sysutils/contool/files/patch-06 @@ -0,0 +1,122 @@ +--- regexp.c.orig Thu Feb 24 09:55:47 1994 ++++ regexp.c Sun Jan 5 12:25:10 1997 +@@ -17,22 +17,14 @@ + /* without prior permission from Harris Corporation. */ + /************************************************************************/ + ++#include + #include + #include + + #include "manifest.h" + #include "contool.h" + +-PRIVATE regexp_error(); +- +-#define INIT register char *expbuf = ep, *sp = instring; +-#define GETC() (*sp++) +-#define PEEKC() (*sp) +-#define UNGETC(c) (--sp) +-#define RETURN(p) {memcpy(sp = (char *) malloc(p - expbuf), expbuf, p - expbuf); return(sp);} +-#define ERROR(val) {regexp_error(val, instring); return(NULL);} +- +-#include ++#include + + PRIVATE char error_message[512]; + +@@ -49,37 +41,10 @@ + p = str + strlen(str) - 1; + if (p >= str && *p == '\n') + *p = '\0'; +- circf = circ; +- result = step(str, exp); ++ result = regexec((regex_t*)exp, str, 0, NULL, 0); + if (p >= str && *p == '\0') + *p = '\n'; +- return(result); +-} +- +-/************************************************************************/ +-PRIVATE regexp_error(val, string) +- +-int val; +-char *string; +- +-{ char *msg; +- +- switch (val) { +- case 11 : msg = "range endpoint too large"; +- case 16 : msg = "bad number"; +- case 25 : msg = "\"\\digit\" out of range"; +- case 36 : msg = "illegal or missing delimiter"; +- case 41 : msg = "no remembered search string"; +- case 42 : msg = "\\(\\) imbalance"; +- case 43 : msg = "too many \\("; +- case 44 : msg = "more than 2 numbers given in \\{\\}"; +- case 45 : msg = "} expected after \\"; +- case 46 : msg = "first number exceeds second in \\{\\}"; +- case 49 : msg = "[] imbalance"; +- case 50 : msg = "regular expression overflow"; +- default : msg = "regular expression error"; +- } +- sprintf(error_message, "%s in %s", msg, string); ++ return(!result); + } + + /************************************************************************/ +@@ -109,34 +74,40 @@ + char *start; + char *stop; + +-{ char rbuf[1024], *sre, *ere; +- int sc, ec; ++{ + +- sre = ere = NULL; ++ int errcod; ++ regex_t *sre, *ere; ++ ++ sre = (regex_t*) malloc(sizeof(regex_t)); ++ ere = (regex_t*) malloc(sizeof(regex_t)); + if (start) { +- if ((sre = compile(fix_control_chars(start), rbuf, rbuf+1024, '\0')) == NULL) ++ if (errcod = regcomp(sre, fix_control_chars(start), REG_NOSUB)) { ++ regerror(errcod, sre, error_message, 512); ++ strcat(error_message, " in "); ++ strcat(error_message,fix_control_chars(start)); + return(error_message); +- sc = circf; ++ } + } + if (stop) { +- if ((ere = compile(fix_control_chars(stop), rbuf, rbuf+1024, '\0')) == NULL) { +- cond_free(sre); ++ if (errcod = regcomp(ere, fix_control_chars(stop), REG_NOSUB)) { ++ regerror(errcod, ere, error_message, 512); ++ strcat(error_message," in "); ++ strcat(error_message,fix_control_chars(stop)); + return(error_message); + } +- ec = circf; + } + if (filter) { + filter->start = start; + filter->stop = stop; +- filter->start_re = sre; +- filter->stop_re = ere; +- filter->start_circf = sc; +- filter->stop_circf = ec; ++ filter->start_re = (char *) sre; ++ filter->stop_re = (char *) ere; + } + else { ++ regfree(sre); ++ regfree(ere); + cond_free(sre); +- if (ere) +- cond_free(ere); ++ cond_free(ere); + } + return(NULL); + } diff --git a/sysutils/contool/pkg-comment b/sysutils/contool/pkg-comment new file mode 100644 index 000000000000..a61d94e2a71f --- /dev/null +++ b/sysutils/contool/pkg-comment @@ -0,0 +1 @@ +Console tool for openlook diff --git a/sysutils/contool/pkg-descr b/sysutils/contool/pkg-descr new file mode 100644 index 000000000000..e62c6147ce99 --- /dev/null +++ b/sysutils/contool/pkg-descr @@ -0,0 +1,13 @@ +Contool will capture and display system console messages with timestamps. + +It is a replacement for the standard X console. 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. + +You can instruct contool to filter and ignore certain common console +messages, or act upon them. 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. + +(port maintained by nsayer@quack.kfu.com) diff --git a/sysutils/contool/pkg-message b/sysutils/contool/pkg-message new file mode 100644 index 000000000000..33fa5df844bb --- /dev/null +++ b/sysutils/contool/pkg-message @@ -0,0 +1,27 @@ +from the About box: + Contool 3.3a + Copyright 1988 - 1994 + Chuck Musciano and Harris Corporation + + All Rights Reserved + +Contool has been released for private, not-for-profit use, and the copyright +on the source code is retained by myself and Harris Corporation, my employer. +This means that you can give the source code to anyone but you cannot sell +any part of the source code, nor can you incorporate any part of the source +code into a product which is subsequently sold. + +from the README +--------------- +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. + diff --git a/sysutils/contool/pkg-plist b/sysutils/contool/pkg-plist new file mode 100644 index 000000000000..7e0cb92a1240 --- /dev/null +++ b/sysutils/contool/pkg-plist @@ -0,0 +1,3 @@ +bin/contool +share/help/contool.info +man/man1/contool.1.gz -- cgit v1.2.3