home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-10-18 | 49.2 KB | 1,311 lines |
- Newsgroups: comp.sources.misc
- From: lijewski@rosserv.gsfc.nasa.gov (Mike Lijewski)
- Subject: v33i004: problem - A Problem Database Manager, Part02/07
- Message-ID: <1992Oct19.165819.4059@sparky.imd.sterling.com>
- X-Md4-Signature: 8f22d173927c8049309c5173f559ef62
- Date: Mon, 19 Oct 1992 16:58:19 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: lijewski@rosserv.gsfc.nasa.gov (Mike Lijewski)
- Posting-number: Volume 33, Issue 4
- Archive-name: problem/part02
- Environment: UNIX, GDBM, C++, termcap
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 2 (of 7)."
- # Contents: Makefile README THANKS gdbm.h-proto problem.1 problem.lpr
- # Wrapped by lijewski@xtesoc2 on Mon Oct 19 11:04:58 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile'\"
- else
- echo shar: Extracting \"'Makefile'\" \(5781 characters\)
- sed "s/^X//" >'Makefile' <<'END_OF_FILE'
- X#
- X# Makefile for `problem'
- X#
- X# Makefile Makefile 1.32 Delta'd: 15:10:07 10/9/92 Mike Lijewski, CNSF
- X#
- X
- X# Your C++ compiler goes here.
- XCC = g++
- X
- X#
- X# Add -DSIGINTERRUPT if you both have it and NEED it to ensure that signals
- X# interrupt slow system calls. This is primarily for 4.3 BSD-based systems.
- X# Otherwise, your system most certaily does the right thing already.
- X#
- X# Add -DOLDDELETE if your compiler can't handle the 'delete []' form
- X# of the delete operator for deleting arrays of objects allocated
- X# via new. If you don't know whether you compiler can handle it or
- X# not, just don't define it and see what happens. If your compiler
- X# doesn't choke, it'll do the right thing.
- X#
- X# You must indicate where the GDBM header file 'gdbm.h' is to be found
- X# using a flag of the form: -I/usr/local/include.
- X#
- X# If you have the BSD 4.3 signal mechanism, in particular, sigblock(2) and
- X# sigsetmask(2), add -DBSDSIGNALS. Else if you have POSIX signals, in
- X# particular sigprocmask(2), add -DPOSIXSIGNALS. Otherwise I'll use
- X# the usually ANSI C signal mechanism when I need to block SIGTSTP and
- X# SIGWINCH. This can lead to some lost signals in very rare
- X# circumstances, but what can you do with a braindead signal mechanism.
- X#
- X# The default locking is done using the POSIX "lockf". If you don't
- X# have "lockf" but have the BSD "flock", add -DFLOCK.
- X#
- X# If you're running on ESIX, add -DESIX
- X#
- XCFLAGS = -I/home/xtelab/lijewski/include -DBSDSIGNALS -DSIGINTERRUPT -g
- X
- X#
- X# Those flags needed to compile in the type of terminal
- X# control you have. Use -DTERMIOS if you have <termios.h>, the POSIX
- X# terminal control. Use -DTERMIO if you have <termio.h>, the SYSV
- X# terminal control. Otherwise, the default assumes you have <sgtty.h>,
- X# the BSD terminal control.
- X#
- X# If you choose to use -DTERMIOS and have problems, try -DTERMIO. On
- X# at least two systems I've tried, the vendor hasn't had all the
- X# include files set up correctly to include <unistd.h> together with
- X# <osfcn.h>, among others.
- X#
- X# On RS/6000s, AIX/370 and recent Suns, -DTERMIO works well.
- X#
- XTERMFLAGS = -DTERMIO
- X
- X#
- X# You must indicate where the GDBM library 'libgdbm.a' is to be found
- X# using a flag of the form: -L/usr/local/lib.
- X#
- X# On ESIX you might also need -lgen and -lbsd
- X#
- XLDFLAGS = -L/home/xtelab/lijewski/lib
- X
- X#
- X# The needed libraries. You need Termcap(3) and GDBM
- X#
- XLIBS = -lgdbm -ltermcap
- X
- X#
- X# Directory is which the databases, AREA file (this is the file, with
- X# one area per line, listing the valid problem areas), SEQUENCE file
- X# (this is the file used to keep the unique problem #), and
- X# MAILLIST.* files (which contains the names of interested parties)
- X# will be stored.
- X#
- XHOMEBASE = /home/xtelab/lijewski/src/c++/problem
- X
- X# MAILPROG a version of mail
- XMAILPROG = /usr/ucb/mail
- X
- X# MAXFILESIZE is the largest size file you'll allow for logs, appends
- X# and closes. If the file is larger than that only the first
- X# MAXFILESIZE bytes are stored in the database.
- XMAXFILESIZE = 16000
- X
- X##############################################################################
- X# nothing should need to be changed below here.
- X##############################################################################
- X
- XSHELL = /bin/sh
- XMAKESHELL = /bin/sh
- X
- XHDR = classes.h display.h help.h lister.h keys.h problem.h regexp.h \
- X version.h utilities.h
- XMISC1 = AREAS.template ChangeLog INSTALL MANIFEST
- XMISC2 = Makefile README THANKS gdbm.h-proto problem.1 problem.lpr
- XMISC = $(MISC1) $(MISC2)
- XOBJ = classes.o display.o lister.o problem.o regexp.o utilities.o
- XSRC = classes.C display.C lister.C problem1.C problem2.C regexp.C utilities.C
- X
- Xproblem: $(OBJ) SEQUENCE AREAS
- X $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
- X
- Xdisplay.o: display.C display.h
- X $(CC) $(CFLAGS) $(TERMFLAGS) -c display.C
- X
- Xproblem.o: problem.C
- X $(CC) -c $(CFLAGS) -DHOMEBASE=\"$(HOMEBASE)\" \
- X -DMAILPROG=\"$(MAILPROG)\" -DMAXFILESIZE=$(MAXFILESIZE) \
- X problem.C
- X
- X#
- X# problem.C is built from .C and command2.C the first time
- X# it is needed. This is so that the shar files don't get too big.
- X#
- Xproblem.C: problem1.C problem2.C
- X cat problem1.C problem2.C > problem.C
- X
- XSEQUENCE:
- X @if [ ! -f "$(HOMEBASE)/SEQUENCE" ]; then \
- X echo "making $(HOMEBASE)/SEQUENCE ..."; \
- X echo "problems will be numbered starting at 1"; \
- X echo -n "0" > $(HOMEBASE)/SEQUENCE; \
- X chmod 644 $(HOMEBASE)/SEQUENCE; \
- X else \
- X true; \
- X fi
- X
- XAREAS:
- X @if [ ! -f "$(HOMEBASE)/AREAS" ]; then \
- X echo "Creating $(HOMEBASE)/AREAS ..."; \
- X cp AREAS.template $(HOMEBASE)/AREAS; \
- X chmod 644 $(HOMEBASE)/AREAS; \
- X fi
- X
- Xclean:
- X -rm -f core *.o *..c problem
- X
- Xrealclean:
- X -rm -f core *.o *..c problem *~ problem.C
- X
- X#
- X# This depends on Rich Salz' cshar program.
- X#
- Xshar: $(SRC) $(HDR) $(MISC)
- X cshar -n1 -e7 -o problem-01 $(HDR) $(MISC1)
- X cshar -n2 -e7 -o problem-02 $(MISC2)
- X cshar -n3 -e7 -o problem-03 display.C regexp.C
- X cshar -n4 -e7 -o problem-04 classes.C lister.C
- X cshar -n5 -e7 -o problem-05 problem1.C
- X cshar -n6 -e7 -o problem-06 problem2.C
- X cshar -n7 -e7 -o problem-07 utilities.C
- X
- Xtar:
- X tar cf problem.tar $(SRC) $(HDR) $(MISC)
- X compress -f problem.tar
- X
- Xclasses.o : classes.h problem.h utilities.h
- Xdisplay.o : display.h utilities.h
- Xlister.o : classes.h display.h help.h keys.h lister.h \
- X problem.h utilities.h version.h
- Xproblem.o : classes.h display.h lister.h problem.h utilities.h
- Xutilities.o : classes.h display.h lister.h problem.h utilities.h
- X
- X.SUFFIXES: .C .o
- X
- X.C.o:
- X $(CC) $(CFLAGS) -c $*.C
- END_OF_FILE
- if test 5781 -ne `wc -c <'Makefile'`; then
- echo shar: \"'Makefile'\" unpacked with wrong size!
- fi
- # end of 'Makefile'
- fi
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(8921 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- X
- XProblem - A "problem" database manager
- X
- XProblem is a database manager for bug reports and such, meant to be
- Xused in a UNIX environment. It is written in C++; uses the GNU
- XDatabase Management Library (GDBM) for low-level database operations;
- Xand the termcap(3) library for screen comtrol. An X Windows interface
- Xis being developed. The basic idea is to provide a central front-end
- Xfor managing the various databases of bugs and miscreant behaviour
- Xthat a large UNIX site might be interested in tracking, and
- Xfacilitating the sharing of this information amongst all interested
- Xparties.
- X
- XOn startup, a list of problem areas is displayed:
- X
- XThe 4 Areas:
- X
- X 1 apf
- X 2 aix370
- X 3 aixws
- X 4 dbx
- X
- XThis is called the area window. Upon entering a number corresponding
- Xto the area of interest, the following screen is displayed:
- X
- XCommands
- X
- X l -- log new problem
- X a -- append to a problem
- X c -- close a problem
- X e -- examine a problem
- X v -- view problem summaries
- X s -- subscribe to this problem area
- X u -- unsubscribe from this problem area
- X k -- keyword search over problem headers
- X K -- keyword search over problem headers and data
- X M -- modify keyword field
- X d -- delete a problem from the database
- X r -- reorganize the database
- X R -- reopen a closed problem
- X q -- quit
- X
- XHere you are expected to type a single letter symbolizing the
- Xcommand of interest.
- X
- X l -- log new problem
- X
- XChoosing `l', you'll immediately see a screen of the form:
- X
- XArea networking
- XLogger mjlx
- XReporter
- XLogged Mon Jun 29 08:56:27 1992
- XUpdated Mon Jun 29 08:56:27 1992
- XKeywords
- XSummary
- XStatus open
- XSite
- XSeverity
- XProblem #
- X
- XThis is known as the problem header. Here, Reporter is the user name
- Xor real name of the person who reported the problem; this needn't be
- Xthe same as Logger. Severity, which runs from 4 (the lowest) to 1
- X(the highest) is meant to be some indication of the severity of the
- Xproblem. The remaining fields have their obvious meaning.
- X
- XIn the above, "problem" has filled in the fields that it can and will
- Xprompt for the others. It will fill in the Problem # field, if and
- Xwhen the problem is really logged, with a positive number unique
- Xacross all problem areas. There is no limit to the amount of text
- Xthat can be stored in each field. After filling out this header,
- X"problem" will invoke the editor in the user's EDITOR environment
- Xvariable (or "vi" if not defined), from which the user is expected to
- Xenter the text of the problem. When you exit from your editor, you'll
- Xbe prompted as to whether or not you really want to log the problem.
- XTyping `y' logs the problem while typing `n' takes you back to the
- Xcommand window.
- X
- X a -- append to a problem
- X
- XHere you'll be prompted for the problem # of an existing problem. If
- Xa problem of that number actually exists, you'll immediately be
- Xbrought up into your editor to enter the text of your append. When you
- Xexit from your editor, you'll be prompted as to whether or not you
- Xreally wish to make this append.
- X
- X c -- close a problem
- X
- XHere you'll be prompted for the problem # of an existing problem. If
- Xa problem of that number actually exists, you'll immediately be
- Xbrought up into your editor to enter the text of your close. Closing
- Xa problem changes the Status field of the problem entry from "open" to
- X"closed"; it is not removed from the database. It is meant to be an
- Xindication that the problem has been solved. Only the original logger
- Xof the problem, or the "problem" administrator can close a problem.
- X
- X e -- examine a problem
- X
- XYou will be prompted for the problem # of an existing problem. If
- Xthat problem exists you'll be placed into the pager "less" with a copy
- Xof the complete problem header and data of that problem. This way you
- Xcan then page through the problem and do any thing else you might do
- Xfrom a pager such as saving a copy of the problem or only a portion of
- Xit to another file.
- X
- X v -- view problem summaries
- X
- XTyping `v' a list consisting of selected parts of each problem header
- Xis displayed on the screen, one per line:
- X
- X77 open 1 Jun 28 16:37:09 1992 calloc prototyped wrong
- X73 open 2 Jun 26 06:16:03 1992 Fortran code gets seg fault
- X18 closed May 30 12:51:34 1992 <stdarg.h> is broken
- X53 open 3 May 6 13:45:23 1992 optimization slows down c!
- X16 open 3 Apr 26 09:54:49 1992 why don't we have a Pascal compiler?
- X
- XThis is called a view window. The fields displayed are: Problem #,
- XStatus, Severity, if Status is "open", Updated and Summary. The lines
- Xare sorted: "open" before "closed"; severity order 1 to 4; and then in
- Xmost recently updated to least recently updated order. It the text of
- Xa line is longer than the screen width the line is truncated and a `!'
- Xis place in the final position in the line. The cursor is initially
- Xplaced in the first column of the first line. The problem list can be
- Xperused using the screen and cursor motion commands of vi and emacs.
- X
- XThe line the cursor is on is called the current line. If the current
- Xline is longer than the screen width it will be shifted left so that
- Xthe final screenwidth characters are visible. In this way, by moving
- Xthe cursor on and off of a line, it is possible to read the complete
- Xline, provided that the length of the line is not more than twice the
- Xwidth of your screen. Most of the commands in the command window are
- Xaccessible from here and apply to the problem in the current line.
- XFor example, typing `a' will append to the problem in the current
- Xline.
- X
- XTyping `H' or `?' from any of the three main windows in "problem" will
- Xdisplay a screen of help commands called the help screen. The help
- Xscreen from within the view window is:
- X
- X CURSOR MOVEMENT COMMANDS:
- X
- X ? H Display this help.
- X q quit.
- X j n ^N SPC CR Forward one line.
- X DOWN_ARROW_KEY " .
- X k p ^P ^Y Backward one line.
- X UP_ARROW_KEY " .
- X ^F ^V Forward one window.
- X b ^B ESC-V Backward one window.
- X ^D Forward one half-window.
- X ^U Backward one half-window.
- X < Go to first line of listing.
- X > Go to last line of listing.
- X
- X COMMANDS WHICH OPERATE ON THE CURRENT PROBLEM:
- X
- X a Append to current problem.
- X c Close current problem.
- X d Delete current problem.
- X e m v Examine, View, or "more" current problem.
- X m Modify keyword field.
- X r Reorganize the database.
- X R Reopen a closed problem.
- X s Save problem listing to a file - prompts for filename.
- X
- X MISCELLANEOUS COMMANDS:
- X
- X ! starts up a shell.
- X ! cmd executes a shell command - prompts for command.
- X !! reexecutes previous shell command.
- X ^L Repaint screen.
- X CR Signifies end-of-response when in a prompt.
- X V Print out version string.
- X
- X s -- subscribe to this problem area
- X
- XYou will be added to a list of interested parties for this area. Each
- Xtime a change is made to the database for this area, every person on
- Xthe mailing list receives mail indicating the change that was made.
- XIn this way, it is easy to keep track of problems without having to
- Xregular read all the problems to see if anything new has happened.
- X
- X u -- unsubscribe from this problem area
- X
- XYou will be removed from the interested parties mailing list for this
- Xarea.
- X
- X k -- keyword search over problem headers
- X
- XYou will be prompted for a regular expression which will then be used
- Xto search over the problem headers. If there are any matches, the
- Xsummary lines of each of the problems which matched will be displayed
- Xin a view window. For example, if you wished to peruse only open
- Xproblems, you could search for "open" whereupon you would be put in a
- Xview window consisting of only the open problems in this area.
- X
- X K -- keyword search over problem headers and data
- X
- XThis is similar the the `k' command except that the regular expression
- Xsearch is over the complete problem header and data for each problem.
- X
- X M -- modify keyword field
- X
- XThis command is useful if you want to modify the keyword field.
- X
- X d -- delete a problem from the database
- X
- XThis command allows the database administrator to delete problems from
- Xthe database for this area. The problem data is irretrievably removed
- Xfrom the database.
- X
- X r -- reorganize the database
- X
- XThis is an administrative command which can be used after many appends and
- Xdeletions have been made in the database to shrink it down and make
- Xaccessing it more efficient. It corresponds directly to the GDBM
- Xreorganize command.
- X
- X R -- reopen a closed problem
- X
- XA closed problem can be reopened with this command.
- X
- X q -- quit
- X
- XThis quits from the command window and returns you to the area window.
- END_OF_FILE
- if test 8921 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- # end of 'README'
- fi
- if test -f 'THANKS' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'THANKS'\"
- else
- echo shar: Extracting \"'THANKS'\" \(429 characters\)
- sed "s/^X//" >'THANKS' <<'END_OF_FILE'
- XI would like to thank the following people who have tracked down and
- Xfixed bugs; suggested improvements; provided new function; or
- Xotherwise helped make "problem" truly useful.
- X
- Xrdr@newton.mda.ca (Randolph Roesler)
- Xrob@pact.nl (Rob Kurver)
- Xterry@ocfmail.ocf.llnl.gov (Terril Heidelberg)
- Xiain%anl433.uucp@Germany.EU.net (Iain Lea)
- Xgunterma@iti.informatik.th-darmstadt.de (Klaus Guntermann)
- XGilles.Goullet@mc2.fr (Gilles Goullet)
- X
- END_OF_FILE
- if test 429 -ne `wc -c <'THANKS'`; then
- echo shar: \"'THANKS'\" unpacked with wrong size!
- fi
- # end of 'THANKS'
- fi
- if test -f 'gdbm.h-proto' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gdbm.h-proto'\"
- else
- echo shar: Extracting \"'gdbm.h-proto'\" \(3227 characters\)
- sed "s/^X//" >'gdbm.h-proto' <<'END_OF_FILE'
- X/* gdbm.h - The include file for dbm users. */
- X
- X/* This file is part of GDBM, the GNU data base manager, by Philip A. Nelson.
- X Copyright (C) 1990, 1991 Free Software Foundation, Inc.
- X
- X GDBM is free software; you can redistribute it and/or modify
- X it under the terms of the GNU General Public License as published by
- X the Free Software Foundation; either version 1, or (at your option)
- X any later version.
- X
- X GDBM is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X GNU General Public License for more details.
- X
- X You should have received a copy of the GNU General Public License
- X along with GDBM; see the file COPYING. If not, write to
- X the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- X You may contact the author by:
- X e-mail: phil@cs.wwu.edu
- X us-mail: Philip A. Nelson
- X Computer Science Department
- X Western Washington University
- X Bellingham, WA 98226
- X phone: (206) 676-3035
- X
- X*************************************************************************/
- X
- X#ifndef __GDBM_H
- X#define __GDBM_H
- X
- X/* Parameters to gdbm_open for READERS, WRITERS, and WRITERS who
- X can create the database. */
- X#define GDBM_READER 0 /* A reader. */
- X#define GDBM_WRITER 1 /* A writer. */
- X#define GDBM_WRCREAT 2 /* A writer. Create the db if needed. */
- X#define GDBM_NEWDB 3 /* A writer. Always create a new db. */
- X
- X/* Parameters to gdbm_store for simple insertion or replacement in the
- X case that the key is already in the database. */
- X#define GDBM_INSERT 0 /* Never replace old data with new. */
- X#define GDBM_REPLACE 1 /* Always replace old data with new. */
- X
- X
- X/* The data and key structure. This structure is defined for compatibility. */
- Xtypedef struct {
- X char *dptr;
- X int dsize;
- X} datum;
- X
- X/* The file information header. This is good enough for most applications. */
- Xtypedef struct {int dummy[10];} *GDBM_FILE;
- X
- X#if __STDC__ == 1 || __cplusplus
- X#define proto(x) x
- X#else
- X#define proto(x) ()
- X#endif
- X
- X/* These are the routines! */
- Xextern GDBM_FILE gdbm_open proto((const char *, int, int, int, void (*)()));
- Xextern void gdbm_close proto((GDBM_FILE));
- Xextern datum gdbm_fetch proto((GDBM_FILE, datum));
- Xextern int gdbm_store proto((GDBM_FILE, datum, datum, int));
- Xextern int gdbm_delete proto((GDBM_FILE, datum));
- Xextern datum gdbm_firstkey proto((GDBM_FILE));
- Xextern datum gdbm_nextkey proto((GDBM_FILE, datum));
- Xextern int gdbm_reorganize proto((GDBM_FILE));
- X
- X#undef proto
- X
- X/* gdbm sends back the following error codes in the variable gdbm_errno. */
- Xtypedef enum { GDBM_NO_ERROR,
- X GDBM_MALLOC_ERROR,
- X GDBM_BLOCK_SIZE_ERROR,
- X GDBM_FILE_OPEN_ERROR,
- X GDBM_FILE_WRITE_ERROR,
- X GDBM_FILE_SEEK_ERROR,
- X GDBM_FILE_READ_ERROR,
- X GDBM_BAD_MAGIC_NUMBER,
- X GDBM_EMPTY_DATABASE,
- X GDBM_CANT_BE_READER,
- X GDBM_CANT_BE_WRITER,
- X GDBM_READER_CANT_DELETE,
- X GDBM_READER_CANT_STORE,
- X GDBM_READER_CANT_REORGANIZE,
- X GDBM_UNKNOWN_UPDATE,
- X GDBM_ITEM_NOT_FOUND,
- X GDBM_REORGANIZE_FAILED,
- X GDBM_CANNOT_REPLACE,
- X GDBM_ILLEGAL_DATA}
- X gdbm_error;
- X
- X#endif /*__GDBM_H*/
- END_OF_FILE
- if test 3227 -ne `wc -c <'gdbm.h-proto'`; then
- echo shar: \"'gdbm.h-proto'\" unpacked with wrong size!
- fi
- # end of 'gdbm.h-proto'
- fi
- if test -f 'problem.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'problem.1'\"
- else
- echo shar: Extracting \"'problem.1'\" \(12443 characters\)
- sed "s/^X//" >'problem.1' <<'END_OF_FILE'
- X.\"
- X.\" problem.1 1.5 Delta'd: 15:19:43 10/11/92 Mike Lijewski, CNSF
- X.\"
- X.TH PROBLEM 1
- X.SH NAME
- Xproblem \- a problem database manager
- X.SH SYNOPSIS
- X.B "problem [-v] [-d] [area1 area2 ...]"
- X.br
- X.SH DESCRIPTION
- X.I Problem
- Xis a database manager for problems and bug reports. It is inspired
- Xfrom PROBLEM, the problem database manager under IBM VM/CMS that was
- Xwritten by Andy
- XHanushevsky at Cornell University. It is intended to provide a
- Xcommon interface to a collection of databases describing problems and/or
- Xbugs which a UNIX site might be interested in tracking, and to
- Xfacilitate the sharing of this information amongst all interested
- Xparties.
- X
- X.SH COMMANDS
- XIn the following descriptions, ^X means control-X.
- XESC stands for the ESCAPE key; for example ESC-v means the
- Xtwo character sequence "ESCAPE", then "v". TAB stands for the tab
- Xkey. UP_ARROW stands for the up arrow key and DOWN_ARROW stands for
- Xthe down arrow key, if your keyboard supports arrow keys.
- X
- XTyping
- X.I problem,
- Xa list of problem areas, called the area window, is displayed. This
- Xlist is set up by the
- X.I problem
- Xadministrator at your site. It consists of the areas into which
- Xproblems and bug reports can be logged. A sample area window:
- X.nf
- X
- X 1 apf - for AIX Parallel Fortran problems under AIX/370
- X 2 aix370 - general AIX/370 problems
- X 3 aixws - any workstation related problem
- X 4 dbx - any dbx-related problem
- X 5 AFS or NFS - any AFS or NFS related problem
- X
- X.fi
- XThe areas are numbered from 1
- Xto N, where N is the total number of areas defined at your site. If N
- Xis less than ten, you simply need to press the key corresponding to
- Xthat number to
- Xindicate your interest in that area. Otherwise, you must type in the
- Xnumber followed by a carriage return. If there are more areas than
- Xlines on your screen,
- X.I problem
- Xwill display as many as will fit on the screen by forcing the areas to
- Xfit in a series of twenty-five character wide columns. If they still
- Xdon't all fit on the screen, typing `H' or `?' will scroll through all
- Xthe areas.
- X
- XOnce you've selected an area, a list of available commands, called
- Xthe command window, is displayed:
- X.nf
- X
- X l -- log new problem
- X a -- append to a problem
- X c -- close a problem
- X e -- examine a problem
- X v -- view problem summaries
- X s -- subscribe to this problem area
- X u -- unsubscribe from this problem area
- X k -- keyword search over problem headers
- X K -- keyword search over problem headers and data
- X m -- modify keyword field
- X d -- delete a problem from the database
- X r -- reorganize the database
- X R -- reopen a closed problem
- X q -- quit
- X
- X.fi
- X
- XHere you are expected to type a single letter symbolizing the
- Xcommand of interest. Typing `H' or `?' will scroll through the list
- Xof available commands.
- X
- X.IP "l -- log new problem"
- X
- XTyping `l', you'll immediately see a screen of the form:
- X.nf
- X
- XArea networking
- XLogger mjlx
- XReporter
- XLogged Mon Jun 29 08:56:27 1992
- XUpdated Mon Jun 29 08:56:27 1992
- XKeywords
- XSummary
- XStatus open
- XSite
- XSeverity
- XProblem #
- X
- X.fi
- XThis is known as the problem header. Here,
- X.I Reporter
- Xis intended to represent the user name
- Xor real name of the person who reported the problem, which needn't be
- Xthe same as
- X.I Logger.
- XOf course you can fill in any of the fields as you see fit.
- X.I Severity
- X, which runs from 4 (the lowest) to 1
- X(the highest) is meant to be some indication of the severity of the
- Xproblem. The remaining fields have their more or less obvious meaning.
- X
- XIn the above problem header,
- X.I problem
- Xhas filled in the fields that it can and will
- Xprompt for the others. It will fill in the
- X.I "Problem #"
- Xfield, if and
- Xwhen the problem is really logged, with a positive number unique
- Xacross all problem areas. There is no limit to the amount of text
- Xthat can be stored in each field.
- XAfter filling out this header,
- X.I problem
- Xwill invoke the editor in your EDITOR environment
- Xvariable (or "vi" if not defined), from which you are expected to
- Xenter the text of the problem. When you exit from your editor, you'll
- Xbe prompted as to whether or not you really want to log the problem.
- XTyping `y' logs the problem and returns you to the command window,
- Xwhile typing `n' simply takes you back to the command window.
- X
- X.IP "a -- append to a problem
- X
- XHere you'll be prompted for the problem # of an existing problem. If
- Xa problem of that number actually exists, you'll immediately be
- Xbrought up into your editor to enter the text of your append. When you
- Xexit from your editor, you'll be prompted as to whether or not you
- Xreally wish to make this append. The
- X.I Updated
- Xfield of the problem header will be updated to reflect the time of
- Xthe append.
- X
- X.IP "c -- close a problem"
- X
- XHere you'll be prompted for the problem # of an existing problem. If
- Xa problem of that number actually exists, you'll immediately be
- Xbrought up into your editor to enter the text of your close. Closing
- Xa problem changes the
- X.I Status
- Xfield of the problem entry from "open" to
- X"closed"; it is not removed from the database. It is meant to be an
- Xindication that the problem has been solved. Only the original logger
- Xof the problem, or the
- X.I problem
- Xadministrator can close a problem.
- XThe
- X.I Updated
- Xfield of the problem header will be updated to reflect the time of
- Xthe close.
- X
- X.IP "e -- examine a problem"
- X
- XYou will be prompted for the problem # of an existing problem. If
- Xthat problem exists you'll be placed into the pager "less" with a copy
- Xof the complete problem header and data of that problem. This way you
- Xcan then page through the problem and do any thing else you might do
- Xfrom a pager such as saving a copy of the problem or only a portion of
- Xit to another file.
- X
- X.IP "v -- view problem summaries"
- X
- XHere a list consisting of selected parts of each problem header
- Xis displayed on the screen, one per line, called the view window.
- XThe fields displayed are:
- X.I Problem #,
- X.I Status,
- X.I Severity (if the problem is open),
- X.I Updated,
- Xand
- X.I Summary.
- XThe lines are sorted: "open" before "closed"; severity 1 to severity
- X4; and then in most
- Xrecently updated to least recently updated order. It the text of a
- Xline is longer than the screen width the line is truncated and a `!'
- Xis place in the final position in the line. The cursor is initially
- Xplaced in the first column of the first line.
- X
- XThe line the cursor is on is called the current line.
- XThe cursor can be positioned using the cursor motion and scrolling
- Xcommands of vi and emacs. If the current
- Xline is longer than the screen width it will be shifted left so that
- Xthe final screenwidth characters are visible. In this way, by moving
- Xthe cursor on and off of a line, it is possible to read the complete
- Xline, provided that the length of the line is not more than twice the
- Xwidth of your screen. Most of the commands in the command window are
- Xaccessible from within the view window and apply to the problem in the
- Xcurrent line.
- XFor example, typing `a' will append to the problem in the current
- Xline.
- X
- XTyping `H' or `?' will scroll through a list of all the valid
- Xkeypresses from within the view window:
- X
- X.nf
- X CURSOR MOVEMENT COMMANDS:
- X
- X ? H Display this help.
- X q quit.
- X j n ^N SPC CR Forward one line.
- X DOWN_ARROW_KEY " .
- X k p ^P ^Y Backward one line.
- X UP_ARROW_KEY " .
- X ^F ^V Forward one window.
- X b ^B ESC-V Backward one window.
- X ^D Forward one half-window.
- X ^U Backward one half-window.
- X < Go to first line of listing.
- X > Go to last line of listing.
- X
- X COMMANDS WHICH OPERATE ON THE CURRENT PROBLEM:
- X
- X a Append to current problem.
- X c Close current problem.
- X d Delete current problem.
- X e m v Examine, View, or "more" current problem.
- X M Modify keyword field.
- X r Reorganize the database.
- X R Reopen a closed problem.
- X S Save problem listing to a file
- X
- X MISCELLANEOUS COMMANDS:
- X
- X ! starts up a shell.
- X ! cmd executes a shell command
- X !! reexecutes previous shell command.
- X ^L Repaint screen.
- X CR End-of-response when in a prompt.
- X V Print out version string.
- X.fi
- X
- X.IP "s -- subscribe to this problem area"
- X
- XYou will be added to a list of interested parties for this area. Each
- Xtime a change is made to the database for this area, every person on
- Xthe mailing list receives mail indicating the change that was made.
- XIn this way, it is easy to keep track of problems without having to
- Xregularly read all the areas to see if anything new has happened.
- X
- X.IP "u -- unsubscribe from this problem area"
- X
- XYou will be removed from the interested parties mailing list for this
- Xarea.
- X
- X.IP "k -- keyword search over problem headers"
- X
- XYou will be prompted for a regular expression which will then be used
- Xto search over the problem headers. If there are any matches, the
- Xsummary lines of each of the problems which matched will be displayed
- Xin a view window. For example, if you wished to peruse only open
- Xproblems, you could search for "open" whereupon you would be put in a
- Xview window consisting of only the open problems in the area.
- X
- X.IP "K -- keyword search over problem headers and data"
- X
- XThis is similar the the `k' command except that the regular expression
- Xsearch is over the complete problem header and data for each problem.
- X
- X.IP "M -- modify keyword field"
- X
- XThis command is useful if you want to modify the keyword field. At
- Xthe authors site, being an IBM stronghold, we place the number of each APAR
- X(Authorized Problem Analysis Report) which supposedly fixes a problem,
- Xin the keyword field. This cannot be done when the problem is logged
- Xsince the APAR number(s) aren't known at that time.
- X
- X.IP "d -- delete a problem from the database"
- X
- XThis command allows the database administrator to delete problems from
- Xthe database for this area. The problem data is irretrievably removed
- Xfrom the database.
- X
- X.IP "r -- reorganize the database"
- X
- XThis is an administrative command which can be used after many appends and
- Xdeletions have been made in the database to shrink it down and make
- Xaccessing it more efficient. It directly corresponds to the GDBM
- Xreorganize command.
- X
- X.IP "R -- reopen a closed problem"
- X
- XA closed problem can be reopened with this command. The
- X.I Status
- Xfield is changed from "closed" back to "open".
- X
- X.IP "q -- quit"
- X
- XThis quits from the command window and returns you to the area window.
- X
- X.SH OPTIONS
- XCommand line options are described below.
- X.PP
- X.IP "-d dirname"
- XInstructs
- X.I problem
- Xto use the next argument as the name of the directory in which all the
- Xproblem databases and mailing list files are stored. The author uses
- Xit primarily as a debugging tool. However, it allows different groups
- Xat a single site to set up their own databases, instead of forcing
- Xa single person to centrally administer all the problem areas
- Xat the site.
- X.IP "-v "
- XPrints out the version string and exits.
- X
- X.I Problem
- Xcan also be invoked with one or more problem areas as arguments. It
- Xwill then immediately startup in the command window for that area.
- XTyping `q' will then move on to the next problem area, or the area
- Xwindow if no more areas have been specified. If any of the arguments
- Xare not valid problem areas, you will also be placed in the area
- Xwindow when
- X.I problem
- Xtries to process that area.
- X
- X.SH "ENVIRONMENT VARIABLES"
- X.IP COLUMNS
- XThis value, if nonzero, overrides the number of columns as read
- Xfrom termcap(3). Hence by setting
- X.B COLUMNS
- Xit is easy to use a
- Xdifferent number of columns than termcap(3) expects for a given
- Xterminal type.
- X.IP "EDITOR "
- XThe name of the editor (used by the `e' and `f' commands).
- X.IP "HOME "
- XThe user's home directory.
- X.IP "LINES "
- XThis value, if nonzero, overrides the number of lines as read
- Xfrom termcap(3). Hence by setting
- X.B LINES
- Xit is easy to use a
- Xdifferent number of lines than termcap(3) expects for a given
- Xterminal type.
- X.IP "SHELL "
- XThe shell used to execute the `!' command, as well as to expand filenames.
- X.IP "TERM "
- XThe type of terminal on which
- X.I problem
- Xis being run.
- X
- X.br
- X.SH AUTHORS
- XWritten by Mike Lijewski while at the Cornell National Supercomputer
- XFacility.
- END_OF_FILE
- if test 12443 -ne `wc -c <'problem.1'`; then
- echo shar: \"'problem.1'\" unpacked with wrong size!
- fi
- # end of 'problem.1'
- fi
- if test -f 'problem.lpr' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'problem.lpr'\"
- else
- echo shar: Extracting \"'problem.lpr'\" \(14748 characters\)
- sed "s/^X//" >'problem.lpr' <<'END_OF_FILE'
- X
- XPROBLEM(1) USER COMMANDS PROBLEM(1)
- X
- XNAME
- X problem - a problem database manager
- X
- XSYNOPSIS
- X problem [-v] [-d] [area1 area2 ...]
- X
- XDESCRIPTION
- X Problem is a database manager for problems and bug reports.
- X It is inspired from PROBLEM, the problem database manager
- X under IBM VM/CMS that was written by Andy Hanushevsky at
- X Cornell University. It is intended to provide a common
- X interface to a collection of databases describing problems
- X and/or bugs which a UNIX site might be interested in track-
- X ing, and to facilitate the sharing of this information
- X amongst all interested parties.
- X
- X
- XCOMMANDS
- X In the following descriptions, ^X means control-X. ESC
- X stands for the ESCAPE key; for example ESC-v means the two
- X character sequence "ESCAPE", then "v". TAB stands for the
- X tab key. UP_ARROW stands for the up arrow key and DOWN_ARROW
- X stands for the down arrow key, if your keyboard supports
- X arrow keys.
- X
- X Typing problem, a list of problem areas, called the area
- X window, is displayed. This list is set up by the problem
- X administrator at your site. It consists of the areas into
- X which problems and bug reports can be logged. A sample area
- X window:
- X
- X 1 apf - for AIX Parallel Fortran problems under AIX/370
- X 2 aix370 - general AIX/370 problems
- X 3 aixws - any workstation related problem
- X 4 dbx - any dbx-related problem
- X 5 AFS or NFS - any AFS or NFS related problem
- X
- X The areas are numbered from 1 to N, where N is the total
- X number of areas defined at your site. If N is less than
- X ten, you simply need to press the key corresponding to that
- X number to indicate your interest in that area. Otherwise,
- X you must type in the number followed by a carriage return.
- X If there are more areas than lines on your screen, problem
- X will display as many as will fit on the screen by forcing
- X the areas to fit in a series of twenty-five character wide
- X columns. If they still don't all fit on the screen, typing
- X `H' or `?' will scroll through all the areas.
- X
- X Once you've selected an area, a list of available commands,
- X called the command window, is displayed:
- X
- X l -- log new problem
- X a -- append to a problem
- X c -- close a problem
- X e -- examine a problem
- X v -- view problem summaries
- X s -- subscribe to this problem area
- X u -- unsubscribe from this problem area
- X k -- keyword search over problem headers
- X K -- keyword search over problem headers and data
- X M -- modify keyword field
- X d -- delete a problem from the database
- X r -- reorganize the database
- X R -- reopen a closed problem
- X q -- quit
- X
- X
- X Here you are expected to type a single letter symbolizing
- X the command of interest. Typing `H' or `?' will scroll
- X through the list of available commands.
- X
- X
- X l -- log new problem
- X
- X Typing `l', you'll immediately see a screen of the
- X form:
- X
- X Area networking
- X Logger mjlx
- X Reporter
- X Logged Mon Jun 29 08:56:27 1992
- X Updated Mon Jun 29 08:56:27 1992
- X Keywords
- X Summary
- X Status open
- X Site
- X Severity
- X Problem #
- X
- X This is known as the problem header. Here, Reporter is
- X intended to represent the user name or real name of the
- X person who reported the problem, which needn't be the
- X same as Logger. Of course you can fill in any of the
- X fields as you see fit. Severity , which runs from 4
- X (the lowest) to 1 (the highest) is meant to be some
- X indication of the severity of the problem. The remain-
- X ing fields have their more or less obvious meaning.
- X
- X In the above problem header, problem has filled in the
- X fields that it can and will prompt for the others. It
- X will fill in the Problem # field, if and when the prob-
- X lem is really logged, with a positive number unique
- X across all problem areas. There is no limit to the
- X amount of text that can be stored in each field. After
- X filling out this header, problem will invoke the editor
- X in your EDITOR environment variable (or "vi" if not
- X defined), from which you are expected to enter the text
- X of the problem. When you exit from your editor, you'll
- X be prompted as to whether or not you really want to log
- X the problem. Typing `y' logs the problem and returns
- X you to the command window, while typing `n' simply
- X takes you back to the command window.
- X
- X
- X a -- append to a problem
- X
- X Here you'll be prompted for the problem # of an exist-
- X ing problem. If a problem of that number actually
- X exists, you'll immediately be brought up into your edi-
- X tor to enter the text of your append. When you exit
- X from your editor, you'll be prompted as to whether or
- X not you really wish to make this append. The Updated
- X field of the problem header will be updated to reflect
- X the time of the append.
- X
- X
- X c -- close a problem
- X
- X Here you'll be prompted for the problem # of an exist-
- X ing problem. If a problem of that number actually
- X exists, you'll immediately be brought up into your edi-
- X tor to enter the text of your close. Closing a problem
- X changes the Status field of the problem entry from
- X "open" to "closed"; it is not removed from the data-
- X base. It is meant to be an indication that the problem
- X has been solved. Only the original logger of the prob-
- X lem, or the problem administrator can close a problem.
- X The Updated field of the problem header will be updated
- X to reflect the time of the close.
- X
- X
- X e -- examine a problem
- X
- X You will be prompted for the problem # of an existing
- X problem. If that problem exists you'll be placed into
- X the pager "less" with a copy of the complete problem
- X header and data of that problem. This way you can then
- X page through the problem and do any thing else you
- X might do from a pager such as saving a copy of the
- X problem or only a portion of it to another file.
- X
- X
- X v -- view problem summaries
- X
- X Here a list consisting of selected parts of each prob-
- X lem header is displayed on the screen, one per line,
- X called the view window. The fields displayed are:
- X Problem #, Status, Severity (if the problem is open),
- X Updated, and Summary. The lines are sorted: "open"
- X before "closed"; severity 1 to severity 4; and then in
- X most recently updated to least recently updated order.
- X It the text of a line is longer than the screen width
- X the line is truncated and a `!' is place in the final
- X position in the line. The cursor is initially placed
- X in the first column of the first line.
- X
- X The line the cursor is on is called the current line.
- X The cursor can be positioned using the cursor motion
- X and scrolling commands of vi and emacs. If the current
- X line is longer than the screen width it will be shifted
- X left so that the final screenwidth characters are visi-
- X ble. In this way, by moving the cursor on and off of a
- X line, it is possible to read the complete line, pro-
- X vided that the length of the line is not more than
- X twice the width of your screen. Most of the commands
- X in the command window are accessible from within the
- X view window and apply to the problem in the current
- X line. For example, typing `a' will append to the prob-
- X lem in the current line.
- X
- X Typing `H' or `?' will scroll through a list of all the
- X valid keypresses from within the view window:
- X
- X CURSOR MOVEMENT COMMANDS:
- X
- X ? H Display this help.
- X q quit.
- X j n ^N SPC CR Forward one line.
- X DOWN_ARROW_KEY " .
- X k p ^P ^Y Backward one line.
- X UP_ARROW_KEY " .
- X ^F ^V Forward one window.
- X b ^B ESC-V Backward one window.
- X ^D Forward one half-window.
- X ^U Backward one half-window.
- X < Go to first line of listing.
- X > Go to last line of listing.
- X
- X COMMANDS WHICH OPERATE ON THE CURRENT PROBLEM:
- X
- X a Append to current problem.
- X c Close current problem.
- X d Delete current problem.
- X e m v Examine, View, or "more" current problem.
- X M Modify keyword field.
- X r Reorganize the database.
- X R Reopen a closed problem.
- X S Save problem listing to a file
- X
- X MISCELLANEOUS COMMANDS:
- X
- X ! starts up a shell.
- X ! cmd executes a shell command
- X !! reexecutes previous shell command.
- X ^L Repaint screen.
- X CR End-of-response when in a prompt.
- X V Print out version string.
- X
- X
- X s -- subscribe to this problem area
- X
- X You will be added to a list of interested parties for
- X this area. Each time a change is made to the database
- X for this area, every person on the mailing list
- X receives mail indicating the change that was made. In
- X this way, it is easy to keep track of problems without
- X having to regularly read all the areas to see if any-
- X thing new has happened.
- X
- X
- X u -- unsubscribe from this problem area
- X
- X You will be removed from the interested parties mailing
- X list for this area.
- X
- X
- X k -- keyword search over problem headers
- X
- X You will be prompted for a regular expression which
- X will then be used to search over the problem headers.
- X If there are any matches, the summary lines of each of
- X the problems which matched will be displayed in a view
- X window. For example, if you wished to peruse only open
- X problems, you could search for "open" whereupon you
- X would be put in a view window consisting of only the
- X open problems in the area.
- X
- X
- X K -- keyword search over problem headers and data
- X
- X This is similar the the `k' command except that the
- X regular expression search is over the complete problem
- X header and data for each problem.
- X
- X
- X M -- modify keyword field
- X
- X This command is useful if you want to modify the key-
- X word field. At the authors site, being an IBM strong-
- X hold, we place the number of each APAR (Authorized
- X Problem Analysis Report) which supposedly fixes a
- X problem, in the keyword field. This cannot be done
- X when the problem is logged since the APAR number(s)
- X aren't known at that time.
- X
- X
- X d -- delete a problem from the database
- X
- X This command allows the database administrator to
- X delete problems from the database for this area. The
- X problem data is irretrievably removed from the data-
- X base.
- X
- X
- X r -- reorganize the database
- X
- X This is an administrative command which can be used
- X after many appends and deletions have been made in the
- X database to shrink it down and make accessing it more
- X efficient. It directly corresponds to the GDBM reor-
- X ganize command.
- X
- X
- X R -- reopen a closed problem
- X
- X A closed problem can be reopened with this command.
- X The Status field is changed from "closed" back to
- X "open".
- X
- X
- X q -- quit
- X
- X This quits from the command window and returns you to
- X the area window.
- X
- X
- XOPTIONS
- X Command line options are described below.
- X
- X -d dirname
- X Instructs problem to use the next argument as the name
- X of the directory in which all the problem databases and
- X mailing list files are stored. The author uses it pri-
- X marily as a debugging tool. However, it allows dif-
- X ferent groups at a single site to set up their own
- X databases, instead of forcing a single person to cen-
- X trally administer all the problem areas at the site.
- X
- X -v Prints out the version string and exits.
- X
- X Problem can also be invoked with one or more problem
- X areas as arguments. It will then immediately startup
- X in the command window for that area. Typing `q' will
- X then move on to the next problem area, or the area win-
- X dow if no more areas have been specified. If any of
- X the arguments are not valid problem areas, you will
- X also be placed in the area window when problem tries to
- X process that area.
- X
- X
- XENVIRONMENT VARIABLES
- X COLUMNS
- X This value, if nonzero, overrides the number of columns
- X as read from termcap(3). Hence by setting COLUMNS it
- X is easy to use a different number of columns than
- X termcap(3) expects for a given terminal type.
- X
- X EDITOR
- X The name of the editor (used by the `e' and `f' com-
- X mands).
- X
- X HOME The user's home directory.
- X
- X LINES
- X This value, if nonzero, overrides the number of lines
- X as read from termcap(3). Hence by setting LINES it is
- X easy to use a different number of lines than termcap(3)
- X expects for a given terminal type.
- X
- X SHELL
- X The shell used to execute the `!' command, as well as
- X to expand filenames.
- X
- X TERM The type of terminal on which problem is being run.
- X
- X
- XAUTHORS
- X Written by Mike Lijewski while at the Cornell National
- X Supercomputer Facility.
- X
- END_OF_FILE
- if test 14748 -ne `wc -c <'problem.lpr'`; then
- echo shar: \"'problem.lpr'\" unpacked with wrong size!
- fi
- # end of 'problem.lpr'
- fi
- echo shar: End of archive 2 \(of 7\).
- cp /dev/null ark2isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 7 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
- exit 0 # Just in case...
-