home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume33 / problem1 / part02 < prev    next >
Encoding:
Text File  |  1992-11-12  |  53.0 KB  |  1,390 lines

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