summaryrefslogtreecommitdiffstats
path: root/sysutils/contool
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1997-01-06 10:26:28 +0000
committerobrien <obrien@FreeBSD.org>1997-01-06 10:26:28 +0000
commit6678f836cd1703d271dd39e8a56926a149ebd483 (patch)
tree770ac2c3c7b05b1b393f18fb500e7fbd8436d7a2 /sysutils/contool
parentbb8a3fa6700fe71a580ad09c8bf9729b5614c3f3 (diff)
downloadFreeBSD-ports-6678f836cd1703d271dd39e8a56926a149ebd483.zip
FreeBSD-ports-6678f836cd1703d271dd39e8a56926a149ebd483.tar.gz
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 <nsayer@@quack.kfu.com> (w/changes by me) Closes PR: ports/2152
Diffstat (limited to 'sysutils/contool')
-rw-r--r--sysutils/contool/Makefile29
-rw-r--r--sysutils/contool/distinfo1
-rw-r--r--sysutils/contool/files/patch-0120
-rw-r--r--sysutils/contool/files/patch-0228
-rw-r--r--sysutils/contool/files/patch-0320
-rw-r--r--sysutils/contool/files/patch-0410
-rw-r--r--sysutils/contool/files/patch-0535
-rw-r--r--sysutils/contool/files/patch-06122
-rw-r--r--sysutils/contool/pkg-comment1
-rw-r--r--sysutils/contool/pkg-descr13
-rw-r--r--sysutils/contool/pkg-message27
-rw-r--r--sysutils/contool/pkg-plist3
12 files changed, 309 insertions, 0 deletions
diff --git a/sysutils/contool/Makefile b/sysutils/contool/Makefile
new file mode 100644
index 0000000..d467b8c
--- /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 <bsd.port.mk>
diff --git a/sysutils/contool/distinfo b/sysutils/contool/distinfo
new file mode 100644
index 0000000..6aeca8e
--- /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 0000000..8d61fad
--- /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 0000000..284753d
--- /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 0000000..17bfd8e
--- /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 <sys/param.h>
++
+ #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 0000000..ad578fc
--- /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 <sys/types.h>
+ #include <dirent.h>
+ #include <pwd.h>
+ #include <stdlib.h>
diff --git a/sysutils/contool/files/patch-05 b/sysutils/contool/files/patch-05
new file mode 100644
index 0000000..8fb073d
--- /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 <stdio.h>
+ #include <string.h>
++#include <sys/param.h>
+
+ #include <xview/xview.h>
+ #include <xview/panel.h>
+ #include <xview/notice.h>
+ #include <xview/xv_xrect.h>
+
++#if (defined(BSD) && (BSD >= 199306))
++#include <regex.h>
++#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 0000000..262f63b
--- /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 <sys/types.h>
+ #include <stdio.h>
+ #include <string.h>
+
+ #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 <regexp.h>
++#include <regex.h>
+
+ 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 0000000..a61d94e
--- /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 0000000..e62c614
--- /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 0000000..33fa5df
--- /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
+ <chuck@trantor.harris-atd.com>
+ 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 0000000..7e0cb92
--- /dev/null
+++ b/sysutils/contool/pkg-plist
@@ -0,0 +1,3 @@
+bin/contool
+share/help/contool.info
+man/man1/contool.1.gz
OpenPOWER on IntegriCloud