home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sources / misc / 4077 < prev    next >
Encoding:
Text File  |  1992-11-12  |  53.2 KB  |  1,397 lines

  1. Newsgroups: comp.sources.misc
  2. Path: sparky!kent
  3. From: lijewski@rosserv.gsfc.nasa.gov (Mike Lijewski)
  4. Subject:  v33i073:  problem1.1 - A Problem Database Manager, Part02/07
  5. Message-ID: <1992Nov12.195409.28785@sparky.imd.sterling.com>
  6. Followup-To: comp.sources.d
  7. X-Md4-Signature: ca932524a907d3fd59b69c2bc8181fe2
  8. Sender: kent@sparky.imd.sterling.com (Kent Landfield)
  9. Reply-To: lijewski@rosserv.gsfc.nasa.gov
  10. Organization: Sterling Software
  11. References: <csm-v33i072=problem1.1.135039@sparky.IMD.Sterling.COM>
  12. Date: Thu, 12 Nov 1992 19:54:09 GMT
  13. Approved: kent@sparky.imd.sterling.com
  14. Lines: 1381
  15.  
  16. Submitted-by: lijewski@rosserv.gsfc.nasa.gov (Mike Lijewski)
  17. Posting-number: Volume 33, Issue 73
  18. Archive-name: problem1.1/part02
  19. Environment: UNIX, C++, GDBM, Termcap
  20. Supersedes: problem: Volume 33, Issue 2-9
  21.  
  22. #! /bin/sh
  23. # This is a shell archive.  Remove anything before this line, then unpack
  24. # it by saving it into a file and typing "sh file".  To overwrite existing
  25. # files, type "sh file -c".  You can also feed this as standard input via
  26. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  27. # will see the following message at the end:
  28. #        "End of archive 2 (of 7)."
  29. # Contents:  Makefile README THANKS gdbm.h-proto problem.1 problem.lpr
  30. # Wrapped by lijewski@xtesoc2 on Wed Nov 11 16:20:05 1992
  31. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  32. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  33.   echo shar: Will not clobber existing file \"'Makefile'\"
  34. else
  35. echo shar: Extracting \"'Makefile'\" \(6518 characters\)
  36. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  37. X#
  38. X# Makefile for `problem'
  39. X#
  40. X# Makefile Makefile 1.34   Delta'd: 15:20:39 11/1/92   Mike Lijewski, CNSF
  41. X#
  42. X
  43. X# Your C++ compiler goes here.
  44. XCC = g++
  45. X
  46. X#
  47. X# Flags for CFLAGS:
  48. X#
  49. X#
  50. X# Add -DSIGINTERRUPT if you both have it and NEED it to ensure that signals
  51. X# interrupt slow system calls.  This is primarily for 4.3 BSD-based systems.
  52. X# Otherwise, your system most certaily does the right thing already.
  53. X#
  54. X# Add -DOLDDELETE if your compiler can't handle the 'delete []' form
  55. X# of the delete operator for deleting arrays of objects allocated
  56. X# via new.  If you don't know whether you compiler can handle it or
  57. X# not, just don't define it and see what happens.  If your compiler
  58. X# doesn't choke, it'll do the right thing.
  59. X#
  60. X# You must indicate where the GDBM header file 'gdbm.h' is to be found
  61. X# using a flag of the form: -I/usr/local/include.
  62. X#
  63. X# If you have the BSD 4.3 signal mechanism, in particular, sigblock(2) and
  64. X# sigsetmask(2), add -DBSDSIGS.  Else if you have POSIX signals, in
  65. X# particular sigprocmask(2), add -DPOSIXSIGS.  Otherwise I'll use
  66. X# the usually ANSI C signal mechanism when I need to block SIGTSTP and
  67. X# SIGWINCH.  This can lead to some lost signals in very rare
  68. X# circumstances, but what can you do with a braindead signal mechanism.
  69. X#
  70. X# The default locking is done using the POSIX "lockf".  If you don't
  71. X# have "lockf" but have the BSD "flock", add -DFLOCK.  If you don't
  72. X# have either, scream bloody murder to your vendor; you really need
  73. X# one or the other.
  74. X#
  75. X# By default, we assume that you have version of mail that accepts the
  76. X# "-s" flag to indicate a subject line.  If your mailer doesn't
  77. X# recognize the "-s" flag, add -DNOSUBJECT.
  78. X#
  79. X# If you don't have the pager "less" or just don't want to force its use as
  80. X# the pager, add -DNOLESS.  We'll then use the pager in the PAGER
  81. X# environment variable, or "more" by default.  Use "less" if you have it.
  82. X#
  83. X# If you're running on ESIX, add -DESIX
  84. X#
  85. X# Add -O if you trust your optimizer.
  86. X#
  87. XCFLAGS = -O -I/home/xtelab/lijewski/include -DBSDSIGS -DSIGINTERRUPT
  88. X
  89. X#
  90. X# Those flags needed to compile in the type of terminal
  91. X# control you have:
  92. X#
  93. X#   Use -DTERMIOS if you have <termios.h>, the POSIX terminal control.
  94. X#   Use -DTERMIO if you have <termio.h>, the SYSV terminal control.
  95. X#   Otherwise, we assume you have <sgtty.h>, the BSD terminal control.
  96. X#
  97. X# If you choose to use -DTERMIOS and have problems, try -DTERMIO.  On
  98. X# at least two systems I've tried, the vendor hasn't had all the
  99. X# include files set up correctly to include <unistd.h> together with 
  100. X# <osfcn.h>, among others.
  101. X#
  102. X# On RS/6000s, AIX/370 and recent Suns, -DTERMIO works well.
  103. X#
  104. XTERMFLAGS = -DTERMIO
  105. X
  106. X#
  107. X# You must indicate where the GDBM library 'libgdbm.a' is to be found
  108. X# using a flag of the form: -L/usr/local/lib.
  109. X#
  110. X# On ESIX you might also need -lgen and -lbsd
  111. X#
  112. XLDFLAGS = -L/home/xtelab/lijewski/lib
  113. X
  114. X#
  115. X# The needed libraries.  You need Termcap(3) and GDBM
  116. X#
  117. XLIBS = -lgdbm -ltermcap
  118. X
  119. X#
  120. X# Directory is which the databases, AREA file (this is the file, with
  121. X# one area per line, listing the valid problem areas), SEQUENCE file
  122. X# (this is the file used to keep the unique problem #), and
  123. X# MAILLIST.* files (which contains the names of interested parties)
  124. X# will be stored.
  125. X#
  126. XHOMEBASE = /home/xtelab/lijewski/src/c++/problem
  127. X
  128. X#
  129. X# MAILPROG -- a version of mail.  If you didn't specify -DNOSUBJEC
  130. X# above, then this should be a mailer which accepts  the "-s" flag to
  131. X# indicate indicate a "Subject:" line.  This must be a full pathname.
  132. X#
  133. XMAILPROG = /usr/ucb/mail
  134. X
  135. X#
  136. X# MAXFILESIZE is the largest size file you'll allow for logs, appends
  137. X# and closes.  If the file is larger than that only the first
  138. X# MAXFILESIZE bytes are stored in the database.
  139. X#
  140. XMAXFILESIZE = 16000
  141. X
  142. X##############################################################################
  143. X# nothing should need to be changed below here.
  144. X##############################################################################
  145. X
  146. XSHELL     = /bin/sh
  147. XMAKESHELL = /bin/sh
  148. X
  149. XHDR   = classes.h display.h help.h lister.h keys.h problem.h regexp.h \
  150. X        version.h utilities.h
  151. XMISC1 = AREAS.template ChangeLog INSTALL MANIFEST
  152. XMISC2 = Makefile README THANKS gdbm.h-proto problem.1 problem.lpr
  153. XMISC  = $(MISC1) $(MISC2)
  154. XOBJ   = classes.o display.o lister.o problem.o regexp.o utilities.o
  155. XSRC   = classes.C display.C lister.C problem1.C problem2.C regexp.C utilities.C
  156. X
  157. Xproblem: $(OBJ) SEQUENCE AREAS
  158. X    $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
  159. X
  160. Xdisplay.o: display.C display.h
  161. X    $(CC) $(CFLAGS) $(TERMFLAGS) -c display.C
  162. X
  163. Xproblem.o: problem.C
  164. X    $(CC) -c $(CFLAGS) -DHOMEBASE=\"$(HOMEBASE)\"                 \
  165. X              -DMAILPROG=\"$(MAILPROG)\" -DMAXFILESIZE=$(MAXFILESIZE) \
  166. X              problem.C
  167. X
  168. X#
  169. X# problem.C is built from .C and command2.C the first time
  170. X# it is needed.  This is so that the shar files don't get too big.
  171. X#
  172. Xproblem.C: problem1.C problem2.C
  173. X    cat problem1.C problem2.C > problem.C
  174. X
  175. XSEQUENCE:
  176. X    @if [ ! -f "$(HOMEBASE)/SEQUENCE" ]; then           \
  177. X            echo "making $(HOMEBASE)/SEQUENCE ...";         \
  178. X            echo "problems will be numbered starting at 1"; \
  179. X            echo -n "0" > $(HOMEBASE)/SEQUENCE;             \
  180. X        chmod 644 $(HOMEBASE)/SEQUENCE;                 \
  181. X        else                                                \
  182. X            true;                                           \
  183. X        fi
  184. X
  185. XAREAS:
  186. X    @if [ ! -f "$(HOMEBASE)/AREAS" ]; then                   \
  187. X            echo "Creating $(HOMEBASE)/AREAS ...";               \
  188. X            cp AREAS.template $(HOMEBASE)/AREAS;                 \
  189. X            chmod 644 $(HOMEBASE)/AREAS;                         \
  190. X        fi
  191. X
  192. Xclean:
  193. X    -rm -f core *.o *..c problem
  194. X
  195. Xrealclean:
  196. X    -rm -f core *.o *..c problem *~ problem.C
  197. X
  198. X#
  199. X# This depends on Rich Salz' cshar program.
  200. X#
  201. Xshar: $(SRC) $(HDR) $(MISC)
  202. X    cshar -n1 -e7 -o problem-01 $(HDR) $(MISC1)
  203. X    cshar -n2 -e7 -o problem-02 $(MISC2)
  204. X    cshar -n3 -e7 -o problem-03 display.C regexp.C
  205. X    cshar -n4 -e7 -o problem-04 classes.C lister.C
  206. X    cshar -n5 -e7 -o problem-05 problem1.C
  207. X    cshar -n6 -e7 -o problem-06 problem2.C
  208. X    cshar -n7 -e7 -o problem-07 utilities.C
  209. X
  210. Xtar:
  211. X    tar cf problem.tar $(SRC) $(HDR) $(MISC)
  212. X    compress -f problem.tar
  213. X
  214. Xclasses.o   : classes.h problem.h utilities.h
  215. Xdisplay.o   : display.h utilities.h
  216. Xlister.o    : classes.h display.h help.h keys.h lister.h \
  217. X              problem.h utilities.h version.h
  218. Xproblem.o   : classes.h display.h lister.h problem.h utilities.h
  219. Xutilities.o : classes.h display.h lister.h problem.h utilities.h
  220. X
  221. X.SUFFIXES: .C .o
  222. X
  223. X.C.o:
  224. X    $(CC) $(CFLAGS) -c $*.C
  225. END_OF_FILE
  226. if test 6518 -ne `wc -c <'Makefile'`; then
  227.     echo shar: \"'Makefile'\" unpacked with wrong size!
  228. fi
  229. # end of 'Makefile'
  230. fi
  231. if test -f 'README' -a "${1}" != "-c" ; then 
  232.   echo shar: Will not clobber existing file \"'README'\"
  233. else
  234. echo shar: Extracting \"'README'\" \(8921 characters\)
  235. sed "s/^X//" >'README' <<'END_OF_FILE'
  236. X
  237. XProblem - A "problem" database manager
  238. X
  239. XProblem is a database manager for bug reports and such, meant to be
  240. Xused in a UNIX environment.  It is written in C++; uses the GNU
  241. XDatabase Management Library (GDBM) for low-level database operations;
  242. Xand the termcap(3) library for screen comtrol.  An X Windows interface
  243. Xis being developed.  The basic idea is to provide a central front-end
  244. Xfor managing the various databases of bugs and miscreant behaviour
  245. Xthat a large UNIX site might be interested in tracking, and
  246. Xfacilitating the sharing of this information amongst all interested
  247. Xparties.
  248. X
  249. XOn startup, a list of problem areas is displayed:
  250. X
  251. XThe 4 Areas:
  252. X
  253. X  1 apf
  254. X  2 aix370
  255. X  3 aixws
  256. X  4 dbx
  257. X
  258. XThis is called the area window.  Upon entering a number corresponding
  259. Xto the area of interest, the following screen is displayed:
  260. X
  261. XCommands
  262. X
  263. X  l  -- log new problem
  264. X  a  -- append to a problem
  265. X  c  -- close a problem
  266. X  e  -- examine a problem
  267. X  v  -- view problem summaries
  268. X  s  -- subscribe to this problem area
  269. X  u  -- unsubscribe from this problem area
  270. X  k  -- keyword search over problem headers
  271. X  K  -- keyword search over problem headers and data
  272. X  M  -- modify keyword field
  273. X  d  -- delete a problem from the database
  274. X  r  -- reorganize the database
  275. X  R  -- reopen a closed problem
  276. X  q  -- quit
  277. X
  278. XHere you are expected to type a single letter symbolizing the
  279. Xcommand of interest.
  280. X
  281. X  l  -- log new problem
  282. X
  283. XChoosing `l', you'll immediately see a screen of the form:
  284. X
  285. XArea      networking
  286. XLogger    mjlx
  287. XReporter
  288. XLogged    Mon Jun 29 08:56:27 1992
  289. XUpdated   Mon Jun 29 08:56:27 1992
  290. XKeywords
  291. XSummary
  292. XStatus    open
  293. XSite
  294. XSeverity
  295. XProblem #
  296. X
  297. XThis is known as the problem header.  Here, Reporter is the user name
  298. Xor real name of the person who reported the problem;  this needn't be
  299. Xthe same as Logger.  Severity, which runs from 4 (the lowest) to 1
  300. X(the highest) is meant to be some indication of the severity of the
  301. Xproblem.  The remaining fields have their obvious meaning.
  302. X
  303. XIn the above, "problem" has filled in the fields that it can and will
  304. Xprompt for the others.  It will fill in the Problem # field, if and
  305. Xwhen the problem is really logged, with a positive number unique
  306. Xacross all problem areas.  There is no limit to the amount of text
  307. Xthat can be stored in each field.  After filling out this header,
  308. X"problem" will invoke the editor in the user's EDITOR environment
  309. Xvariable (or "vi" if not defined), from which the user is expected to
  310. Xenter the text of the problem.  When you exit from your editor, you'll
  311. Xbe prompted as to whether or not you really want to log the problem.
  312. XTyping `y' logs the problem while typing `n' takes you back to the
  313. Xcommand window.
  314. X
  315. X  a  -- append to a problem
  316. X
  317. XHere you'll be prompted for the problem # of an existing problem.  If
  318. Xa problem of that number actually exists, you'll immediately be
  319. Xbrought up into your editor to enter the text of your append.  When you
  320. Xexit from your editor, you'll be prompted as to whether or not you
  321. Xreally wish to make this append.
  322. X
  323. X  c  -- close a problem
  324. X
  325. XHere you'll be prompted for the problem # of an existing problem.  If
  326. Xa problem of that number actually exists, you'll immediately be
  327. Xbrought up into your editor to enter the text of your close.  Closing
  328. Xa problem changes the Status field of the problem entry from "open" to
  329. X"closed"; it is not removed from the database.  It is meant to be an
  330. Xindication that the problem has been solved.  Only the original logger
  331. Xof the problem, or the "problem" administrator can close a problem.
  332. X
  333. X  e  -- examine a problem
  334. X
  335. XYou will be prompted for the problem # of an existing problem.  If
  336. Xthat problem exists you'll be placed into the pager "less" with a copy
  337. Xof the complete problem header and data of that problem.  This way you
  338. Xcan then page through the problem and do any thing else you might do
  339. Xfrom a pager such as saving a copy of the problem or only a portion of
  340. Xit to another file.
  341. X
  342. X  v  -- view problem summaries
  343. X
  344. XTyping `v' a list consisting of selected parts of each problem header
  345. Xis displayed on the screen, one per line:
  346. X
  347. X77 open 1 Jun 28 16:37:09 1992 calloc prototyped wrong
  348. X73 open 2 Jun 26 06:16:03 1992 Fortran code gets seg fault
  349. X18 closed May 30 12:51:34 1992 <stdarg.h> is broken
  350. X53 open 3 May  6 13:45:23 1992 optimization slows down c!
  351. X16 open 3 Apr 26 09:54:49 1992 why don't we have a Pascal compiler?
  352. X
  353. XThis is called a view window.  The fields displayed are: Problem #,
  354. XStatus, Severity, if Status is "open", Updated and Summary.  The lines
  355. Xare sorted: "open" before "closed"; severity order 1 to 4; and then in
  356. Xmost recently updated to least recently updated order.  It the text of
  357. Xa line is longer than the screen width the line is truncated and a `!'
  358. Xis place in the final position in the line.  The cursor is initially
  359. Xplaced in the first column of the first line.  The problem list can be
  360. Xperused using the screen and cursor motion commands of vi and emacs.
  361. X
  362. XThe line the cursor is on is called the current line.  If the current
  363. Xline is longer than the screen width it will be shifted left so that
  364. Xthe final screenwidth characters are visible.  In this way, by moving
  365. Xthe cursor on and off of a line, it is possible to read the complete
  366. Xline, provided that the length of the line is not more than twice the
  367. Xwidth of your screen.  Most of the commands in the command window are
  368. Xaccessible from here and apply to the problem in the current line.
  369. XFor example, typing `a' will append to the problem in the current
  370. Xline.
  371. X
  372. XTyping `H' or `?' from any of the three main windows in "problem" will
  373. Xdisplay a screen of help commands called the help screen.  The help
  374. Xscreen from within the view window is:
  375. X
  376. X CURSOR MOVEMENT COMMANDS:
  377. X
  378. X    ?  H               Display this help.
  379. X    q                  quit.
  380. X    j  n  ^N  SPC  CR  Forward  one line.
  381. X    DOWN_ARROW_KEY             "        .
  382. X    k  p  ^P  ^Y       Backward one line.
  383. X    UP_ARROW_KEY               "        .
  384. X    ^F  ^V             Forward  one window.
  385. X    b  ^B  ESC-V       Backward one window.
  386. X    ^D                 Forward  one half-window.
  387. X    ^U                 Backward one half-window.
  388. X    <                  Go to first line of listing.
  389. X    >                  Go to last line of listing.
  390. X
  391. X COMMANDS WHICH OPERATE ON THE CURRENT PROBLEM:
  392. X
  393. X    a                  Append to current problem.
  394. X    c                  Close current problem.
  395. X    d                  Delete current problem.
  396. X    e m v              Examine, View, or "more" current problem.
  397. X    m                  Modify keyword field.
  398. X    r                  Reorganize the database.
  399. X    R                  Reopen a closed problem.
  400. X    s                  Save problem listing to a file - prompts for filename.
  401. X
  402. X MISCELLANEOUS COMMANDS:
  403. X
  404. X    !                  starts up a shell.
  405. X    ! cmd              executes a shell command - prompts for command.
  406. X    !!                 reexecutes previous shell command.
  407. X    ^L                 Repaint screen.
  408. X    CR                 Signifies end-of-response when in a prompt.
  409. X    V                  Print out version string.
  410. X
  411. X  s  -- subscribe to this problem area
  412. X
  413. XYou will be added to a list of interested parties for this area.  Each
  414. Xtime a change is made to the database for this area, every person on
  415. Xthe mailing list receives mail indicating the change that was made.
  416. XIn this way, it is easy to keep track of problems without having to
  417. Xregular read all the problems to see if anything new has happened.
  418. X
  419. X  u  -- unsubscribe from this problem area
  420. X
  421. XYou will be removed from the interested parties mailing list for this
  422. Xarea.
  423. X
  424. X  k  -- keyword search over problem headers
  425. X
  426. XYou will be prompted for a regular expression which will then be used
  427. Xto search over the problem headers.  If there are any matches, the
  428. Xsummary lines of each of the problems which matched will be displayed
  429. Xin a view window.  For example, if you wished to peruse only open
  430. Xproblems, you could search for "open" whereupon you would be put in a
  431. Xview window consisting of only the open problems in this area.
  432. X
  433. X  K  -- keyword search over problem headers and data
  434. X
  435. XThis is similar the the `k' command except that the regular expression
  436. Xsearch is over the complete problem header and data for each problem.
  437. X
  438. X  M  -- modify keyword field
  439. X
  440. XThis command is useful if you want to modify the keyword field.
  441. X
  442. X  d  -- delete a problem from the database
  443. X
  444. XThis command allows the database administrator to delete problems from
  445. Xthe database for this area.  The problem data is irretrievably removed
  446. Xfrom the database.
  447. X
  448. X  r  -- reorganize the database
  449. X
  450. XThis is an administrative command which can be used after many appends and
  451. Xdeletions have been made in the database to shrink it down and make
  452. Xaccessing it more efficient.  It corresponds directly to the GDBM
  453. Xreorganize command.
  454. X
  455. X  R  -- reopen a closed problem
  456. X
  457. XA closed problem can be reopened with this command.
  458. X
  459. X  q  -- quit
  460. X
  461. XThis quits from the command window and returns you to the area window.
  462. END_OF_FILE
  463. if test 8921 -ne `wc -c <'README'`; then
  464.     echo shar: \"'README'\" unpacked with wrong size!
  465. fi
  466. # end of 'README'
  467. fi
  468. if test -f 'THANKS' -a "${1}" != "-c" ; then 
  469.   echo shar: Will not clobber existing file \"'THANKS'\"
  470. else
  471. echo shar: Extracting \"'THANKS'\" \(279 characters\)
  472. sed "s/^X//" >'THANKS' <<'END_OF_FILE'
  473. XI would like to thank all those people who have helped make "problem"
  474. Xa more useful utility. The list of people I'd like to thank has gotten too
  475. Xlong for me to keep track of.  Besides, not having a list means that I
  476. Xcan't inadvertantly forget someone.  Anyway, thanks everyone.
  477. X
  478. END_OF_FILE
  479. if test 279 -ne `wc -c <'THANKS'`; then
  480.     echo shar: \"'THANKS'\" unpacked with wrong size!
  481. fi
  482. # end of 'THANKS'
  483. fi
  484. if test -f 'gdbm.h-proto' -a "${1}" != "-c" ; then 
  485.   echo shar: Will not clobber existing file \"'gdbm.h-proto'\"
  486. else
  487. echo shar: Extracting \"'gdbm.h-proto'\" \(3227 characters\)
  488. sed "s/^X//" >'gdbm.h-proto' <<'END_OF_FILE'
  489. X/* gdbm.h  -  The include file for dbm users.  */
  490. X
  491. X/*  This file is part of GDBM, the GNU data base manager, by Philip A. Nelson.
  492. X    Copyright (C) 1990, 1991  Free Software Foundation, Inc.
  493. X
  494. X    GDBM is free software; you can redistribute it and/or modify
  495. X    it under the terms of the GNU General Public License as published by
  496. X    the Free Software Foundation; either version 1, or (at your option)
  497. X    any later version.
  498. X
  499. X    GDBM is distributed in the hope that it will be useful,
  500. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  501. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  502. X    GNU General Public License for more details.
  503. X
  504. X    You should have received a copy of the GNU General Public License
  505. X    along with GDBM; see the file COPYING.  If not, write to
  506. X    the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  507. X
  508. X    You may contact the author by:
  509. X       e-mail:  phil@cs.wwu.edu
  510. X      us-mail:  Philip A. Nelson
  511. X                Computer Science Department
  512. X                Western Washington University
  513. X                Bellingham, WA 98226
  514. X        phone:  (206) 676-3035
  515. X       
  516. X*************************************************************************/
  517. X
  518. X#ifndef __GDBM_H
  519. X#define __GDBM_H
  520. X
  521. X/* Parameters to gdbm_open for READERS, WRITERS, and WRITERS who
  522. X   can create the database. */
  523. X#define  GDBM_READER  0        /* A reader. */
  524. X#define  GDBM_WRITER  1        /* A writer. */
  525. X#define  GDBM_WRCREAT 2        /* A writer.  Create the db if needed. */
  526. X#define  GDBM_NEWDB   3        /* A writer.  Always create a new db. */
  527. X
  528. X/* Parameters to gdbm_store for simple insertion or replacement in the
  529. X   case that the key is already in the database. */
  530. X#define  GDBM_INSERT  0        /* Never replace old data with new. */
  531. X#define  GDBM_REPLACE 1        /* Always replace old data with new. */
  532. X
  533. X
  534. X/* The data and key structure.  This structure is defined for compatibility. */
  535. Xtypedef struct {
  536. X    char *dptr;
  537. X    int   dsize;
  538. X} datum;
  539. X
  540. X/* The file information header. This is good enough for most applications. */
  541. Xtypedef struct {int dummy[10];} *GDBM_FILE;
  542. X
  543. X#if __STDC__ == 1 || __cplusplus
  544. X#define proto(x)  x
  545. X#else
  546. X#define proto(x) ()
  547. X#endif
  548. X
  549. X/* These are the routines! */
  550. Xextern GDBM_FILE gdbm_open proto((const char *, int, int, int, void (*)()));
  551. Xextern void     gdbm_close proto((GDBM_FILE));
  552. Xextern datum     gdbm_fetch proto((GDBM_FILE, datum));
  553. Xextern int     gdbm_store proto((GDBM_FILE, datum, datum, int));
  554. Xextern int     gdbm_delete proto((GDBM_FILE, datum));
  555. Xextern datum     gdbm_firstkey proto((GDBM_FILE));
  556. Xextern datum     gdbm_nextkey proto((GDBM_FILE, datum));
  557. Xextern int     gdbm_reorganize proto((GDBM_FILE));
  558. X
  559. X#undef proto
  560. X
  561. X/* gdbm sends back the following error codes in the variable gdbm_errno. */
  562. Xtypedef enum {    GDBM_NO_ERROR,
  563. X        GDBM_MALLOC_ERROR,
  564. X        GDBM_BLOCK_SIZE_ERROR,
  565. X        GDBM_FILE_OPEN_ERROR,
  566. X        GDBM_FILE_WRITE_ERROR,
  567. X        GDBM_FILE_SEEK_ERROR,
  568. X        GDBM_FILE_READ_ERROR,
  569. X        GDBM_BAD_MAGIC_NUMBER,
  570. X        GDBM_EMPTY_DATABASE,
  571. X        GDBM_CANT_BE_READER,
  572. X            GDBM_CANT_BE_WRITER,
  573. X        GDBM_READER_CANT_DELETE,
  574. X        GDBM_READER_CANT_STORE,
  575. X        GDBM_READER_CANT_REORGANIZE,
  576. X        GDBM_UNKNOWN_UPDATE,
  577. X        GDBM_ITEM_NOT_FOUND,
  578. X        GDBM_REORGANIZE_FAILED,
  579. X        GDBM_CANNOT_REPLACE,
  580. X        GDBM_ILLEGAL_DATA}
  581. X    gdbm_error;
  582. X
  583. X#endif /*__GDBM_H*/
  584. END_OF_FILE
  585. if test 3227 -ne `wc -c <'gdbm.h-proto'`; then
  586.     echo shar: \"'gdbm.h-proto'\" unpacked with wrong size!
  587. fi
  588. # end of 'gdbm.h-proto'
  589. fi
  590. if test -f 'problem.1' -a "${1}" != "-c" ; then 
  591.   echo shar: Will not clobber existing file \"'problem.1'\"
  592. else
  593. echo shar: Extracting \"'problem.1'\" \(13887 characters\)
  594. sed "s/^X//" >'problem.1' <<'END_OF_FILE'
  595. X.\"
  596. X.\" problem.1 1.7   Delta'd: 15:20:51 11/1/92   Mike Lijewski, CNSF 
  597. X.\"
  598. X.TH PROBLEM 1
  599. X.SH NAME
  600. Xproblem \- a problem database manager
  601. X.SH SYNOPSIS
  602. X.B "problem [-v] [-d] [area1 area2 ...]"
  603. X.br
  604. X.SH DESCRIPTION
  605. X.I Problem
  606. Xis a database manager for problems and bug reports.  It was inspired
  607. Xby PROBLEM, the problem database manager under IBM VM/CMS that was
  608. Xwritten by Andy 
  609. XHanushevsky at Cornell University.  It is intended to provide a
  610. Xcommon interface to a collection of databases describing problems and/or
  611. Xbugs which a UNIX site might be interested in tracking, and to
  612. Xfacilitate the sharing of this information amongst all interested
  613. Xparties.
  614. X
  615. X.SH COMMANDS
  616. XIn the following descriptions, ^X means control-X.
  617. XESC stands for the ESCAPE key; for example ESC-v means the
  618. Xtwo character sequence "ESCAPE", then "v".  TAB stands for the tab
  619. Xkey. UP_ARROW stands for the up arrow key and DOWN_ARROW stands for
  620. Xthe down arrow key, if your keyboard supports arrow keys.
  621. X
  622. XTyping
  623. X.I problem,
  624. Xa list of problem areas, called the area window, is displayed.  This
  625. Xlist is set up by the
  626. X.I problem
  627. Xadministrator at your site.  It consists of the areas into which
  628. Xproblems and bug reports can be logged. A sample area window:
  629. X.nf
  630. X
  631. X  1 apf        - for AIX Parallel Fortran problems under AIX/370
  632. X  2 aix370     - general AIX/370 problems
  633. X  3 aixws      - any workstation related problem
  634. X  4 dbx        - any dbx-related problem
  635. X  5 AFS or NFS - any AFS or NFS related problem
  636. X
  637. X.fi
  638. XThe areas are numbered from 1
  639. Xto N, where N is the total number of areas defined at your site.  If N
  640. Xis less than ten, you simply need to press the key corresponding to
  641. Xthat number to
  642. Xindicate your interest in that area.  Otherwise, you must type in the
  643. Xnumber followed by a carriage return.  If there are more areas than
  644. Xlines on your screen,
  645. X.I problem
  646. Xwill display as many as will fit on the screen by forcing the areas to
  647. Xfit in a series of twenty-five character wide columns.  If they still
  648. Xdon't all fit on the screen, typing `H' or `?' will scroll through all
  649. Xthe areas.
  650. X
  651. XOnce you've selected an area, a list of available commands, called
  652. Xthe command window, is displayed:
  653. X.nf
  654. X
  655. X  l  -- log new problem
  656. X  a  -- append to a problem
  657. X  c  -- close a problem
  658. X  d  -- delete a problem from the database
  659. X  e  -- examine a problem
  660. X  q  -- quit
  661. X  r  -- reorganize the database
  662. X  s  -- subscribe to this problem area
  663. X  u  -- unsubscribe from this problem area
  664. X  v  -- view problem summaries
  665. X  k  -- keyword search over problem headers
  666. X  K  -- keyword search over problem headers and data
  667. X  M  -- modify keyword field
  668. X  R  -- reopen a closed problem
  669. X  P  -- change priority (severity) of problem
  670. X  T  -- transfer problem to another area
  671. X
  672. X.fi
  673. X
  674. XHere you are expected to type a single letter symbolizing the
  675. Xcommand of interest.  Typing `H' or `?' will scroll through the list
  676. Xof available commands.
  677. X
  678. X.IP  "l  -- log new problem"
  679. X
  680. XTyping `l', you'll immediately see a screen of the form:
  681. X.nf
  682. X
  683. XArea      networking
  684. XLogger    mjlx
  685. XReporter
  686. XLogged    Mon Jun 29 08:56:27 1992
  687. XUpdated   Mon Jun 29 08:56:27 1992
  688. XKeywords
  689. XSummary
  690. XStatus    open
  691. XSite
  692. XSeverity
  693. XProblem #
  694. X
  695. X.fi
  696. XThis is known as the problem header.  Here,
  697. X.I Reporter
  698. Xis intended to represent the user name
  699. Xor real name of the person who reported the problem, which needn't be
  700. Xthe same as
  701. X.I Logger.
  702. XOf course you can fill in any of the fields as you see fit.  
  703. X.I Severity
  704. X, which runs from 4 (the lowest) to 1
  705. X(the highest) is meant to be some indication of the severity of the
  706. Xproblem.  The remaining fields have their more or less obvious meaning.
  707. X
  708. XIn the above problem header,
  709. X.I problem
  710. Xhas filled in the fields that it can and will
  711. Xprompt for the others.  It will fill in the
  712. X.I "Problem #"
  713. Xfield, if and
  714. Xwhen the problem is really logged, with a positive number unique
  715. Xacross all problem areas.  There is no limit to the amount of text
  716. Xthat can be stored in each field.
  717. XAfter filling out this header,
  718. X.I problem
  719. Xwill invoke the editor in your EDITOR environment
  720. Xvariable (or "vi" if not defined), from which you are expected to
  721. Xenter the text of the problem.  When you exit from your editor, you'll
  722. Xbe prompted as to whether or not you really want to log the problem.
  723. XTyping `y' logs the problem and returns you to the command window,
  724. Xwhile typing `n' simply takes you back to the command window.
  725. X
  726. X.IP  "a  -- append to a problem
  727. X
  728. XHere you'll be prompted for the problem # of an existing problem.  If
  729. Xa problem of that number actually exists, you'll immediately be
  730. Xbrought up into your editor to enter the text of your append.  When you
  731. Xexit from your editor, you'll be prompted as to whether or not you
  732. Xreally wish to make this append.  The
  733. X.I Updated
  734. Xfield of the problem header will be updated to reflect the time of
  735. Xthe append.
  736. X
  737. X.IP  "c  -- close a problem"
  738. X
  739. XHere you'll be prompted for the problem # of an existing problem.  If
  740. Xa problem of that number actually exists, you'll immediately be
  741. Xbrought up into your editor to enter the text of your close.  Closing
  742. Xa problem changes the
  743. X.I Status
  744. Xfield of the problem entry from "open" to
  745. X"closed"; it is not removed from the database.  It is meant to be an
  746. Xindication that the problem has been solved.  Only the original logger
  747. Xof the problem, or the
  748. X.I problem
  749. Xadministrator can close a problem.
  750. XThe
  751. X.I Updated
  752. Xfield of the problem header will be updated to reflect the time of
  753. Xthe close.
  754. X
  755. X.IP  "e  -- examine a problem"
  756. X
  757. XYou will be prompted for the problem # of an existing problem.  If
  758. Xthat problem exists you'll be placed into the pager "less" with a copy
  759. Xof the complete problem header and data of that problem.  This way you
  760. Xcan then page through the problem and do any thing else you might do
  761. Xfrom a pager such as saving a copy of the problem or only a portion of
  762. Xit to another file.
  763. X
  764. X.IP  "v  -- view problem summaries"
  765. X
  766. XHere a list consisting of selected parts of each problem header
  767. Xis displayed on the screen, one per line, called the view window.
  768. XThe fields displayed are:
  769. X.I Problem #,
  770. X.I Status,
  771. X.I Severity (if the problem is open),
  772. X.I Updated,
  773. Xand
  774. X.I Summary.
  775. XThe lines are sorted: "open" before "closed"; severity 1 to severity
  776. X4; and then in most
  777. Xrecently updated to least recently updated order.  It the text of a
  778. Xline is longer than the screen width the line is truncated and a `!'
  779. Xis place in the final position in the line.  The cursor is initially
  780. Xplaced in the first column of the first line.
  781. X
  782. XThe line the cursor is on is called the current line.  The line the
  783. Xcursor is on can be changed using the cursor motion and scrolling
  784. Xcommands of vi and emacs, though the cursor will always remain in
  785. Xfirst column of whatever line it is on.  If the current line is longer
  786. Xthan the screen width it will be shifted left so that the final
  787. Xscreenwidth characters are visible.  In this way, by moving the cursor
  788. Xon and off of a line, it is possible to read the complete line,
  789. Xprovided that the length of the line is not more than twice the width
  790. Xof your screen.  Most of the commands in the command window are
  791. Xaccessible from within the view window and apply to the problem in the
  792. Xcurrent line.  For example, typing `a' will append to the problem in
  793. Xthe current line.
  794. X
  795. XTyping `H' or `?' will scroll through a list of all the valid
  796. Xkeypresses from within the view window:
  797. X
  798. X.nf
  799. X CURSOR MOVEMENT COMMANDS:
  800. X
  801. X    ?  H               Display this help.
  802. X    q                  quit.
  803. X    j  n  ^N  SPC  CR  Forward  one line.
  804. X    DOWN_ARROW_KEY             "        .
  805. X    k  p  ^P  ^Y       Backward one line.
  806. X    UP_ARROW_KEY               "        .
  807. X    ^F  ^V             Forward  one window.
  808. X    b  ^B  ESC-V       Backward one window.
  809. X    ^D                 Forward  one half-window.
  810. X    ^U                 Backward one half-window.
  811. X    <                  Go to first line of listing.
  812. X    >                  Go to last line of listing.
  813. X
  814. X COMMANDS WHICH OPERATE ON THE CURRENT PROBLEM:
  815. X
  816. X    a                  Append to current problem.
  817. X    c                  Close current problem.
  818. X    d                  Delete current problem.
  819. X    e m v              Examine, View, or "more" current problem.
  820. X    M                  Modify keyword field.
  821. X    r                  Reorganize the database.
  822. X    P                  Change the priority (severity) of problem.
  823. X    R                  Reopen a closed problem.
  824. X    S                  Save problem listing to a file.
  825. X    T                  Transfer problem to another area.
  826. X
  827. X MISCELLANEOUS COMMANDS:
  828. X
  829. X    !                  starts up a shell.
  830. X    ! cmd              executes a shell command
  831. X    !!                 reexecutes previous shell command.
  832. X    ^L                 Repaint screen.
  833. X    CR                 End-of-response when in a prompt.
  834. X    V                  Print out version string.
  835. X.fi
  836. X
  837. X.IP  "s  -- subscribe to this problem area"
  838. X
  839. XYou will be added to a list of interested parties for this area.  Each
  840. Xtime a change is made to the database for this area, every person on
  841. Xthe mailing list receives mail indicating the change that was made.
  842. XIn this way, it is easy to keep track of problems without having to
  843. Xregularly read all the areas to see if anything new has happened.
  844. X
  845. X.IP  "u  -- unsubscribe from this problem area"
  846. X
  847. XYou will be removed from the interested parties mailing list for this
  848. Xarea.
  849. X
  850. X.IP  "k  -- keyword search over problem headers"
  851. X
  852. XYou will be prompted for a regular expression which will then be used
  853. Xto search over the problem headers.  If there are any matches, the
  854. Xsummary lines of each of the problems which matched will be displayed
  855. Xin a view window.  For example, if you wished to peruse only open
  856. Xproblems, you could search for "open" whereupon you would be put in a
  857. Xview window consisting of only the open problems in the area.
  858. X
  859. X.IP  "K  -- keyword search over problem headers and data"
  860. X
  861. XThis is similar the the `k' command except that the regular expression
  862. Xsearch is over the complete problem header and data for each problem.
  863. X
  864. X.IP  "M  -- modify keyword field"
  865. X
  866. XThis command is useful if you want to modify the keyword field.  At
  867. Xthe authors site, being an IBM stronghold, we place the number of each APAR
  868. X(Authorized Problem Analysis Report) which supposedly fixes a problem,
  869. Xin the keyword field.  This cannot be done when the problem is logged
  870. Xsince the APAR number(s) aren't known at that time.
  871. XYou must be the original logger of the problem or the
  872. Xproblem administrator to do modify the keywords of a problem.
  873. X
  874. X.IP  "d  -- delete a problem from the database"
  875. X
  876. XThis command allows the database administrator to delete problems from
  877. Xthe database for this area.  The problem data is irretrievably removed
  878. Xfrom the database.
  879. X
  880. X.IP  "r  -- reorganize the database"
  881. X
  882. XThis is an administrative command which can be used after many appends and
  883. Xdeletions have been made in the database to shrink it down and make
  884. Xaccessing it more efficient.  It directly corresponds to the GDBM
  885. Xreorganize command.
  886. X
  887. X.IP  "P  -- modify priority (severity) of problem"
  888. X
  889. XThis command is useful if you want to modify the priority (severity) of
  890. Xa problem.  Given that the original logger of the problem initially
  891. Xchooses the severity, the problem administrator may choose to
  892. Xlater change the priority of the problem to reflect the priority
  893. Xfrom the point of view of the person responsible for fixing the problem.
  894. XYou must be the original logger of the problem or the
  895. Xproblem administrator to change the priority of a problem.
  896. X
  897. X.IP  "T  -- transfer problem to another area"
  898. X
  899. XThis command is useful if you want to move a problem from the current
  900. Xarea to another area.
  901. XYou'll be prompted for the area in which to transfer the problem.
  902. XYou must be the original logger of the problem or the
  903. Xproblem administrator to transfer a problem.
  904. X
  905. X.IP  "R  -- reopen a closed problem"
  906. X
  907. XA closed problem can be reopened with this command.  The
  908. X.I Status
  909. Xfield is changed from "closed" back to "open".
  910. X
  911. X.IP  "q  -- quit"
  912. X
  913. XThis quits from the command window and returns you to the area window.
  914. X
  915. X.SH OPTIONS
  916. XCommand line options are described below.
  917. X.PP
  918. X.IP "-d dirname"
  919. XInstructs
  920. X.I problem
  921. Xto use the next argument as the name of the directory in which all the
  922. Xproblem databases and mailing list files are stored.  The author uses
  923. Xit primarily as a debugging tool.  However, it allows different groups
  924. Xat a single site to set up their own databases, instead of forcing
  925. Xa single person to centrally administer all the problem areas
  926. Xat the site.
  927. X.IP "-v       "
  928. XPrints out the version string and exits.
  929. X
  930. X.I Problem
  931. Xcan also be invoked with one or more problem areas as arguments.  It
  932. Xwill then immediately startup in the command window for that area.
  933. XTyping `q' will then move on to the next problem area, or the area
  934. Xwindow if no more areas have been specified.  If any of the arguments
  935. Xare not valid problem areas, you will also be placed in the area
  936. Xwindow when
  937. X.I problem
  938. Xtries to process that area.
  939. X
  940. X.SH "ENVIRONMENT VARIABLES"
  941. X.IP COLUMNS
  942. XThis value, if nonzero, overrides the number of columns as read
  943. Xfrom termcap(3).  Hence by setting
  944. X.B COLUMNS
  945. Xit is easy to use a
  946. Xdifferent number of columns than termcap(3) expects for a given
  947. Xterminal type.
  948. X.IP "EDITOR  "
  949. XThe name of the editor (used by the `e' and `f' commands).
  950. X.IP "HOME   "
  951. XThe user's home directory.
  952. X.IP "LINES   "
  953. XThis value, if nonzero, overrides the number of lines as read
  954. Xfrom termcap(3).  Hence by setting
  955. X.B LINES
  956. Xit is easy to use a
  957. Xdifferent number of lines than termcap(3) expects for a given
  958. Xterminal type.
  959. X.IP "PAGER  "
  960. XThe pager used when viewing a problem.  This is only used if problem
  961. Xis built to not automatically use the pager "less".  If not built to
  962. Xautomaticaly use "less" and PAGER isn't defined, "more" is used.
  963. X.IP "SHELL   "
  964. XThe shell used to execute the `!' command, as well as to expand filenames.
  965. X.IP "TERM   "
  966. XThe type of terminal on which
  967. X.I problem
  968. Xis being run.
  969. X
  970. X.br
  971. X.SH AUTHORS
  972. XWritten by Mike Lijewski while at the Cornell National Supercomputer
  973. XFacility.
  974. END_OF_FILE
  975. if test 13887 -ne `wc -c <'problem.1'`; then
  976.     echo shar: \"'problem.1'\" unpacked with wrong size!
  977. fi
  978. # end of 'problem.1'
  979. fi
  980. if test -f 'problem.lpr' -a "${1}" != "-c" ; then 
  981.   echo shar: Will not clobber existing file \"'problem.lpr'\"
  982. else
  983. echo shar: Extracting \"'problem.lpr'\" \(16472 characters\)
  984. sed "s/^X//" >'problem.lpr' <<'END_OF_FILE'
  985. X
  986. XPROBLEM(1)               USER COMMANDS                 PROBLEM(1)
  987. X
  988. XNAME
  989. X     problem - a problem database manager
  990. X
  991. XSYNOPSIS
  992. X     problem [-v] [-d] [area1 area2 ...]
  993. X
  994. XDESCRIPTION
  995. X     Problem is a database manager for problems and bug  reports.
  996. X     It  was  inspired  by  PROBLEM, the problem database manager
  997. X     under IBM VM/CMS that was written  by  Andy  Hanushevsky  at
  998. X     Cornell  University.   It  is  intended  to provide a common
  999. X     interface to a collection of databases  describing  problems
  1000. X     and/or  bugs which a UNIX site might be interested in track-
  1001. X     ing, and to  facilitate  the  sharing  of  this  information
  1002. X     amongst all interested parties.
  1003. X
  1004. X
  1005. XCOMMANDS
  1006. X     In the following  descriptions,  ^X  means  control-X.   ESC
  1007. X     stands  for  the ESCAPE key; for example ESC-v means the two
  1008. X     character sequence "ESCAPE", then "v".  TAB stands  for  the
  1009. X     tab key. UP_ARROW stands for the up arrow key and DOWN_ARROW
  1010. X     stands for the down arrow key,  if  your  keyboard  supports
  1011. X     arrow keys.
  1012. X
  1013. X     Typing problem, a list of problem  areas,  called  the  area
  1014. X     window,  is  displayed.   This list is set up by the problem
  1015. X     administrator at your site.  It consists of the  areas  into
  1016. X     which  problems and bug reports can be logged. A sample area
  1017. X     window:
  1018. X
  1019. X       1 apf        - for AIX Parallel Fortran problems under AIX/370
  1020. X       2 aix370     - general AIX/370 problems
  1021. X       3 aixws      - any workstation related problem
  1022. X       4 dbx        - any dbx-related problem
  1023. X       5 AFS or NFS - any AFS or NFS related problem
  1024. X
  1025. X     The areas are numbered from 1 to N, where  N  is  the  total
  1026. X     number  of  areas  defined  at your site.  If N is less than
  1027. X     ten, you simply need to press the key corresponding to  that
  1028. X     number  to  indicate your interest in that area.  Otherwise,
  1029. X     you must type in the number followed by a  carriage  return.
  1030. X     If  there  are more areas than lines on your screen, problem
  1031. X     will display as many as will fit on the  screen  by  forcing
  1032. X     the  areas  to fit in a series of twenty-five character wide
  1033. X     columns.  If they still don't all fit on the screen,  typing
  1034. X     `H' or `?' will scroll through all the areas.
  1035. X
  1036. X     Once you've selected an area, a list of available  commands,
  1037. X     called the command window, is displayed:
  1038. X
  1039. X       l  -- log new problem
  1040. X       a  -- append to a problem
  1041. X       c  -- close a problem
  1042. X       d  -- delete a problem from the database
  1043. X       e  -- examine a problem
  1044. X       q  -- quit
  1045. X       r  -- reorganize the database
  1046. X       s  -- subscribe to this problem area
  1047. X       u  -- unsubscribe from this problem area
  1048. X       v  -- view problem summaries
  1049. X       k  -- keyword search over problem headers
  1050. X       K  -- keyword search over problem headers and data
  1051. X       M  -- modify keyword field
  1052. X       R  -- reopen a closed problem
  1053. X       P  -- change priority (severity) of problem
  1054. X       T  -- transfer problem to another area
  1055. X
  1056. X
  1057. X     Here you are expected to type a  single  letter  symbolizing
  1058. X     the  command  of  interest.   Typing  `H' or `?' will scroll
  1059. X     through the list of available commands.
  1060. X
  1061. X
  1062. X     l  -- log new problem
  1063. X
  1064. X          Typing `l', you'll immediately  see  a  screen  of  the
  1065. X          form:
  1066. X
  1067. X          Area      networking
  1068. X          Logger    mjlx
  1069. X          Reporter
  1070. X          Logged    Mon Jun 29 08:56:27 1992
  1071. X          Updated   Mon Jun 29 08:56:27 1992
  1072. X          Keywords
  1073. X          Summary
  1074. X          Status    open
  1075. X          Site
  1076. X          Severity
  1077. X          Problem #
  1078. X
  1079. X          This is known as the problem header.  Here, Reporter is
  1080. X          intended to represent the user name or real name of the
  1081. X          person who reported the problem, which needn't  be  the
  1082. X          same  as  Logger.  Of course you can fill in any of the
  1083. X          fields as you see fit. Severity ,  which  runs  from  4
  1084. X          (the  lowest)  to  1  (the highest) is meant to be some
  1085. X          indication of the severity of the problem.  The remain-
  1086. X          ing fields have their more or less obvious meaning.
  1087. X
  1088. X          In the above problem header, problem has filled in  the
  1089. X          fields  that it can and will prompt for the others.  It
  1090. X          will fill in the Problem # field, if and when the prob-
  1091. X          lem  is  really  logged,  with a positive number unique
  1092. X          across all problem areas.  There is  no  limit  to  the
  1093. X          amount of text that can be stored in each field.  After
  1094. X          filling out this header, problem will invoke the editor
  1095. X          in  your  EDITOR  environment  variable (or "vi" if not
  1096. X          defined), from which you are expected to enter the text
  1097. X          of the problem.  When you exit from your editor, you'll
  1098. X          be prompted as to whether or not you really want to log
  1099. X          the  problem.   Typing `y' logs the problem and returns
  1100. X          you to the command  window,  while  typing  `n'  simply
  1101. X          takes you back to the command window.
  1102. X
  1103. X
  1104. X     a  -- append to a problem
  1105. X
  1106. X          Here you'll be prompted for the problem # of an  exist-
  1107. X          ing  problem.   If  a  problem  of that number actually
  1108. X          exists, you'll immediately be brought up into your edi-
  1109. X          tor  to  enter  the text of your append.  When you exit
  1110. X          from your editor, you'll be prompted as to  whether  or
  1111. X          not  you  really wish to make this append.  The Updated
  1112. X          field of the problem header will be updated to  reflect
  1113. X          the time of the append.
  1114. X
  1115. X
  1116. X     c  -- close a problem
  1117. X
  1118. X          Here you'll be prompted for the problem # of an  exist-
  1119. X          ing  problem.   If  a  problem  of that number actually
  1120. X          exists, you'll immediately be brought up into your edi-
  1121. X          tor to enter the text of your close.  Closing a problem
  1122. X          changes the Status field  of  the  problem  entry  from
  1123. X          "open"  to  "closed";  it is not removed from the data-
  1124. X          base.  It is meant to be an indication that the problem
  1125. X          has been solved.  Only the original logger of the prob-
  1126. X          lem, or the problem administrator can close a  problem.
  1127. X          The Updated field of the problem header will be updated
  1128. X          to reflect the time of the close.
  1129. X
  1130. X
  1131. X     e  -- examine a problem
  1132. X
  1133. X          You will be prompted for the problem # of  an  existing
  1134. X          problem.   If that problem exists you'll be placed into
  1135. X          the pager "less" with a copy of  the  complete  problem
  1136. X          header and data of that problem.  This way you can then
  1137. X          page through the problem and  do  any  thing  else  you
  1138. X          might  do  from  a  pager  such as saving a copy of the
  1139. X          problem or only a portion of it to another file.
  1140. X
  1141. X
  1142. X     v  -- view problem summaries
  1143. X
  1144. X          Here a list consisting of selected parts of each  prob-
  1145. X          lem  header  is  displayed on the screen, one per line,
  1146. X          called the view  window.   The  fields  displayed  are:
  1147. X          Problem  #,  Status, Severity (if the problem is open),
  1148. X          Updated, and Summary.  The  lines  are  sorted:  "open"
  1149. X          before  "closed"; severity 1 to severity 4; and then in
  1150. X          most recently updated to least recently updated  order.
  1151. X          It  the  text of a line is longer than the screen width
  1152. X          the line is truncated and a `!' is place in  the  final
  1153. X          position  in  the line.  The cursor is initially placed
  1154. X          in the first column of the first line.
  1155. X
  1156. X          The line the cursor is on is called the  current  line.
  1157. X          The line the cursor is on can be changed using the cur-
  1158. X          sor motion and scrolling  commands  of  vi  and  emacs,
  1159. X          though the cursor will always remain in first column of
  1160. X          whatever line it is on.  If the current line is  longer
  1161. X          than  the  screen width it will be shifted left so that
  1162. X          the final screenwidth characters are visible.  In  this
  1163. X          way,  by  moving the cursor on and off of a line, it is
  1164. X          possible to read the complete line, provided  that  the
  1165. X          length  of the line is not more than twice the width of
  1166. X          your screen.  Most of the commands in the command  win-
  1167. X          dow  are  accessible  from  within  the view window and
  1168. X          apply to the problem in the current line.  For example,
  1169. X          typing  `a'  will  append to the problem in the current
  1170. X          line.
  1171. X
  1172. X          Typing `H' or `?' will scroll through a list of all the
  1173. X          valid keypresses from within the view window:
  1174. X
  1175. X           CURSOR MOVEMENT COMMANDS:
  1176. X
  1177. X              ?  H               Display this help.
  1178. X              q                  quit.
  1179. X              j  n  ^N  SPC  CR  Forward  one line.
  1180. X              DOWN_ARROW_KEY             "        .
  1181. X              k  p  ^P  ^Y       Backward one line.
  1182. X              UP_ARROW_KEY               "        .
  1183. X              ^F  ^V             Forward  one window.
  1184. X              b  ^B  ESC-V       Backward one window.
  1185. X              ^D                 Forward  one half-window.
  1186. X              ^U                 Backward one half-window.
  1187. X              <                  Go to first line of listing.
  1188. X              >                  Go to last line of listing.
  1189. X
  1190. X           COMMANDS WHICH OPERATE ON THE CURRENT PROBLEM:
  1191. X
  1192. X              a                  Append to current problem.
  1193. X              c                  Close current problem.
  1194. X              d                  Delete current problem.
  1195. X              e m v              Examine, View, or "more" current problem.
  1196. X              M                  Modify keyword field.
  1197. X              r                  Reorganize the database.
  1198. X              P                  Change the priority (severity) of problem.
  1199. X              R                  Reopen a closed problem.
  1200. X              S                  Save problem listing to a file.
  1201. X              T                  Transfer problem to another area.
  1202. X
  1203. X           MISCELLANEOUS COMMANDS:
  1204. X
  1205. X              !                  starts up a shell.
  1206. X              ! cmd              executes a shell command
  1207. X              !!                 reexecutes previous shell command.
  1208. X              ^L                 Repaint screen.
  1209. X              CR                 End-of-response when in a prompt.
  1210. X              V                  Print out version string.
  1211. X
  1212. X
  1213. X     s  -- subscribe to this problem area
  1214. X
  1215. X          You will be added to a list of interested  parties  for
  1216. X          this  area.  Each time a change is made to the database
  1217. X          for  this  area,  every  person  on  the  mailing  list
  1218. X          receives  mail indicating the change that was made.  In
  1219. X          this way, it is easy to keep track of problems  without
  1220. X          having  to  regularly read all the areas to see if any-
  1221. X          thing new has happened.
  1222. X
  1223. X
  1224. X     u  -- unsubscribe from this problem area
  1225. X
  1226. X          You will be removed from the interested parties mailing
  1227. X          list for this area.
  1228. X
  1229. X
  1230. X     k  -- keyword search over problem headers
  1231. X
  1232. X          You will be prompted for  a  regular  expression  which
  1233. X          will  then  be used to search over the problem headers.
  1234. X          If there are any matches, the summary lines of each  of
  1235. X          the  problems which matched will be displayed in a view
  1236. X          window.  For example, if you wished to peruse only open
  1237. X          problems,  you  could  search  for "open" whereupon you
  1238. X          would be put in a view window consisting  of  only  the
  1239. X          open problems in the area.
  1240. X
  1241. X
  1242. X     K  -- keyword search over problem headers and data
  1243. X
  1244. X          This is similar the the `k'  command  except  that  the
  1245. X          regular  expression search is over the complete problem
  1246. X          header and data for each problem.
  1247. X
  1248. X     M  -- modify keyword field
  1249. X
  1250. X          This command is useful if you want to modify  the  key-
  1251. X          word  field.  At the authors site, being an IBM strong-
  1252. X          hold, we place the  number  of  each  APAR  (Authorized
  1253. X          Problem Analysis Report) which supposedly fixes a prob-
  1254. X          lem, in the keyword field.  This cannot  be  done  when
  1255. X          the  problem  is logged since the APAR number(s) aren't
  1256. X          known at that time.  You must be the original logger of
  1257. X          the  problem  or the problem administrator to do modify
  1258. X          the keywords of a problem.
  1259. X
  1260. X
  1261. X     d  -- delete a problem from the database
  1262. X
  1263. X          This  command  allows  the  database  administrator  to
  1264. X          delete  problems  from the database for this area.  The
  1265. X          problem data is irretrievably removed  from  the  data-
  1266. X          base.
  1267. X
  1268. X
  1269. X     r  -- reorganize the database
  1270. X
  1271. X          This is an administrative command  which  can  be  used
  1272. X          after  many appends and deletions have been made in the
  1273. X          database to shrink it down and make accessing  it  more
  1274. X          efficient.   It  directly corresponds to the GDBM reor-
  1275. X          ganize command.
  1276. X
  1277. X
  1278. X     P  -- modify priority (severity) of problem
  1279. X
  1280. X          This command is useful if you want to modify the prior-
  1281. X          ity  (severity)  of a problem.  Given that the original
  1282. X          logger of the problem initially chooses  the  severity,
  1283. X          the  problem  administrator  may choose to later change
  1284. X          the priority of the problem  to  reflect  the  priority
  1285. X          from  the  point  of view of the person responsible for
  1286. X          fixing the problem.  You must be the original logger of
  1287. X          the  problem or the problem administrator to change the
  1288. X          priority of a problem.
  1289. X
  1290. X
  1291. X     T  -- transfer problem to another area
  1292. X
  1293. X          This command is useful if you want to  move  a  problem
  1294. X          from  the  current  area  to  another  area.  You'll be
  1295. X          prompted for the area in which to transfer the problem.
  1296. X          You  must  be the original logger of the problem or the
  1297. X          problem administrator to transfer a problem.
  1298. X
  1299. X     R  -- reopen a closed problem
  1300. X
  1301. X          A closed problem can be  reopened  with  this  command.
  1302. X          The  Status  field  is  changed  from  "closed" back to
  1303. X          "open".
  1304. X
  1305. X
  1306. X     q  -- quit
  1307. X
  1308. X          This quits from the command window and returns  you  to
  1309. X          the area window.
  1310. X
  1311. X
  1312. XOPTIONS
  1313. X     Command line options are described below.
  1314. X
  1315. X     -d dirname
  1316. X          Instructs problem to use the next argument as the  name
  1317. X          of the directory in which all the problem databases and
  1318. X          mailing list files are stored.  The author uses it pri-
  1319. X          marily  as  a  debugging tool.  However, it allows dif-
  1320. X          ferent groups at a single site  to  set  up  their  own
  1321. X          databases,  instead  of forcing a single person to cen-
  1322. X          trally administer all the problem areas at the site.
  1323. X
  1324. X     -v   Prints out the version string and exits.
  1325. X
  1326. X          Problem can also be invoked with one  or  more  problem
  1327. X          areas  as  arguments.  It will then immediately startup
  1328. X          in the command window for that area.  Typing  `q'  will
  1329. X          then move on to the next problem area, or the area win-
  1330. X          dow if no more areas have been specified.   If  any  of
  1331. X          the  arguments  are  not  valid problem areas, you will
  1332. X          also be placed in the area window when problem tries to
  1333. X          process that area.
  1334. X
  1335. X
  1336. XENVIRONMENT VARIABLES
  1337. X     COLUMNS
  1338. X          This value, if nonzero, overrides the number of columns
  1339. X          as  read  from termcap(3).  Hence by setting COLUMNS it
  1340. X          is easy to use  a  different  number  of  columns  than
  1341. X          termcap(3) expects for a given terminal type.
  1342. X
  1343. X     EDITOR
  1344. X          The name of the editor (used by the `e'  and  `f'  com-
  1345. X          mands).
  1346. X
  1347. X     HOME The user's home directory.
  1348. X
  1349. X     LINES
  1350. X          This value, if nonzero, overrides the number  of  lines
  1351. X          as  read from termcap(3).  Hence by setting LINES it is
  1352. X          easy to use a different number of lines than termcap(3)
  1353. X          expects for a given terminal type.
  1354. X
  1355. X     PAGER
  1356. X          The pager used when viewing a problem.   This  is  only
  1357. X          used  if  problem is built to not automatically use the
  1358. X          pager "less".  If not built to automaticaly use  "less"
  1359. X          and PAGER isn't defined, "more" is used.
  1360. X
  1361. X     SHELL
  1362. X          The shell used to execute the `!' command, as  well  as
  1363. X          to expand filenames.
  1364. X
  1365. X     TERM The type of terminal on which problem is being run.
  1366. X
  1367. X
  1368. XAUTHORS
  1369. X     Written by Mike  Lijewski  while  at  the  Cornell  National
  1370. X     Supercomputer Facility.
  1371. X
  1372. END_OF_FILE
  1373. if test 16472 -ne `wc -c <'problem.lpr'`; then
  1374.     echo shar: \"'problem.lpr'\" unpacked with wrong size!
  1375. fi
  1376. # end of 'problem.lpr'
  1377. fi
  1378. echo shar: End of archive 2 \(of 7\).
  1379. cp /dev/null ark2isdone
  1380. MISSING=""
  1381. for I in 1 2 3 4 5 6 7 ; do
  1382.     if test ! -f ark${I}isdone ; then
  1383.     MISSING="${MISSING} ${I}"
  1384.     fi
  1385. done
  1386. if test "${MISSING}" = "" ; then
  1387.     echo You have unpacked all 7 archives.
  1388.     rm -f ark[1-9]isdone
  1389. else
  1390.     echo You still need to unpack the following archives:
  1391.     echo "        " ${MISSING}
  1392. fi
  1393. ##  End of shell archive.
  1394. exit 0
  1395.  
  1396. exit 0 # Just in case...
  1397.