home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume33 / gaps / part01 < prev    next >
Encoding:
Text File  |  1992-10-18  |  49.8 KB  |  1,531 lines

  1. Newsgroups: comp.sources.misc
  2. From: nyh@gauss.technion.ac.il (Nadav Har'El)
  3. Subject:  v33i001:  gaps - The Get and Put System, Part01/01
  4. Message-ID: <1992Oct18.201716.28512@sparky.imd.sterling.com>
  5. X-Md4-Signature: 55939e4bafcd447bf90031015b7f1228
  6. Date: Sun, 18 Oct 1992 20:17:16 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: nyh@gauss.technion.ac.il (Nadav Har'El)
  10. Posting-number: Volume 33, Issue 1
  11. Archive-name: gaps/part01
  12. Environment: UNIX
  13. Supersedes: gaps: Volume 32, Issue 88
  14.  
  15. GAPS - The Get and Put System - is a set of shell scripts for managing 
  16. versions of programs, similar to the idea of RCS or SCCS. But, as opposed 
  17. to those two, the usage of GAPS is very simple and straightforward. The 
  18. shell scripts can be easily ported between unix systems without recompiling, 
  19. and are easy to change if you want to. 
  20.  
  21. For those unfamiliar with the concept of a version history, a complete 
  22. manual gaps.1 is included in this package, which also explains the usage 
  23. of the programs included in this package.
  24.  
  25. In addition to the basic shell script to put a new version in the history,
  26. GAPS includes shell scripts to list versions, Check difference between
  27. versions, change version information, and more.
  28.  
  29. GAPS supports for each version a name (such as 4.23, 11R5, or any kind of
  30. format you choose) which is NOT updated automatically - when putting a new
  31. version in the history file you are told of the last version name, and
  32. asked to choose a new version name. This makes keeping track of version names
  33. much easier then with SCCS, with its cumbersome 'p.' files. It also includes
  34. the ability to write a summary of changes when putting a new version in the
  35. history file, and to change that summary later with the chver program
  36. included.
  37. --------
  38. #! /bin/sh
  39. # This is a shell archive.  Remove anything before this line, then feed it
  40. # into a shell via "sh file" or similar.  To overwrite existing files,
  41. # type "sh file -c".
  42. # Contents:  README VERSION WHATSNEW chver gaps.1 get lastver
  43. #   mkdistrib.UU put unput vcat vdiff ver vls
  44. # Wrapped by kent@sparky on Sun Oct 18 15:07:44 1992
  45. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  46. echo If this archive is complete, you will see the following message:
  47. echo '          "shar: End of archive 1 (of 1)."'
  48. if test -f 'README' -a "${1}" != "-c" ; then 
  49.   echo shar: Will not clobber existing file \"'README'\"
  50. else
  51.   echo shar: Extracting \"'README'\" \(4172 characters\)
  52.   sed "s/^X//" >'README' <<'END_OF_FILE'
  53. X                    GAPS Release 5.02 (Revision 58) Readme
  54. X                    --------------------------------------
  55. X
  56. XGAPS - The Get and Put System - is a set of shell scripts for managing versions
  57. Xof programs, similar to the idea of RCS or SCCS. But, as opposed to those two,
  58. Xthe usage of GAPS is very simple and straightforward. The shell scripts can
  59. Xbe easily ported between unix systems without recompiling, and are easy to
  60. Xchange if you want to. For those unfamiliar with the concept of a version
  61. Xhistory, a complete manual gaps.1 is included in this package, which also
  62. Xexplains the usage of the programs included in this package.
  63. XIn addition to the basic shell scripts to put a new version in the history,
  64. Xand to restore an older version from the history, GAPS includes shell scripts
  65. Xto list versions, Check difference between versions, change version
  66. Xinformation, and more.
  67. XGAPS supports for each version a name (such as 4.23, 11R5, or any kind of
  68. Xformat you choose) which is NOT updated automatically - when putting a new
  69. Xversion in the history file you are told of the last version name, and
  70. Xasked to choose a new version name. This makes keeping track of version names
  71. Xmuch easier then with SCCS, with its cumbersome 'p.' files. It also includes
  72. Xthe ability to write a summary of changes when putting a new version in the
  73. Xhistory file, and to change that summary later with the chver program
  74. Xincluded.
  75. XGAPS, with its utility mkdistrib, also allows you to easily take a messy
  76. Xdirectory in which you design the source of some project, and make out
  77. Xof it a well organized distribution directory, which contain the distribution
  78. Xversions of the sources.
  79. XFor more information, read the manual gaps.1 (which should be formatted by
  80. Xtroff -man).
  81. X
  82. XTo install GAPS, simply copy chver, get, lastver, put, unput, vcat, vdiff,
  83. Xmkdistrib, ver and vls to your favorite bin directory, and gaps.1 to a manual
  84. Xdirectory, and keep VERSION if you want to remember what version of GAPS
  85. Xyou have.
  86. XNote that since GAPS' get and SCCS' get have the same name, so if you want to
  87. Xuse GAPS then either put GAPS in the path before SCCS, or rename GAPS' get.
  88. X
  89. XFiles included in this package
  90. X------------------------------
  91. X
  92. XREADME       - This file
  93. XVERSION      - version information about all the programs included here
  94. XWHATSNEW     - description of what has changed in GAPS since previous releases
  95. Xchver        - Shell script to change version information
  96. Xgaps.1       - GAPS manual
  97. Xget          - Get a version from a history file to the working file
  98. Xlastver      - Return the name of the last version saved in the history file
  99. Xput          - Put a new version of the working file into the history file
  100. Xunput        - Undo a put
  101. Xvcat         - Get a version from a history file to standard output 
  102. Xvdiff        - Check differences between 2 version
  103. Xver          - this is used by other shell scripts, and should be not be used
  104. X           by the user
  105. Xvls          - List versions in a history file
  106. Xmkdistrib    - A utility for making distribution versions easier.
  107. X
  108. XGetting GAPS
  109. X------------
  110. X
  111. XIf you read this readme, you probably have already acquired GAPS. However,
  112. Xif you want to get the newest version of GAPS, the official annonymous ftp site
  113. Xis gauss.technion.ac.il (132.68.112.60): go to the directory /gaps, and
  114. Xmget gaps*.shar.Z
  115. XFor more information about our local site and programs available on it do
  116. X'telnet gauss.technion.ac.il 4096'.
  117. X
  118. X
  119. XIf you have any questions, comments, wishes for future releases, bug reports,
  120. Xor anything else about GAPS, send them to nyh@gauss.technion.ac.il.
  121. XPlease include in your message the content of your VERSION file, so I will
  122. Xknow exactly which version you have (if you don't have the VERSION file,
  123. Xat least include the release number, which can be found on the second line
  124. Xof any of the GAPS shell scripts, or in the GAPS manual).
  125. X
  126. X
  127. X---
  128. XNadav Har'El                         | ######  ########     # | <-- Sorry if
  129. XEmail: nyh@gauss.technion.ac.il      |      #       #       # |    you can't
  130. XDepartment of Mathematics, Technion  |      #       #       # |    read Hebrew.
  131. XIsrael Institute of Technology       | ########     #  ###### |    Nadav. ;)
  132. END_OF_FILE
  133.   if test 4172 -ne `wc -c <'README'`; then
  134.     echo shar: \"'README'\" unpacked with wrong size!
  135.   fi
  136.   # end of 'README'
  137. fi
  138. if test -f 'VERSION' -a "${1}" != "-c" ; then 
  139.   echo shar: Will not clobber existing file \"'VERSION'\"
  140. else
  141.   echo shar: Extracting \"'VERSION'\" \(551 characters\)
  142.   sed "s/^X//" >'VERSION' <<'END_OF_FILE'
  143. XGAPS Release 5.02 (Revision 58)
  144. XSun Sep 27 16:23:44 IDT 1992
  145. X
  146. XSource files:
  147. X-------------
  148. Xget 5.2     (Sat Sep 19 17:57:14 IDT 1992)
  149. Xlastver 5.0     (Mon Sep  7 23:40:10 IDT 1992)
  150. Xput 5.4     (Sat Sep 26 22:29:50 IDT 1992)
  151. Xunput 5.2     (Sat Sep 26 22:30:20 IDT 1992)
  152. Xvcat 5.1     (Mon Sep 14 21:40:22 IDT 1992)
  153. Xvdiff 5.0     (Mon Sep  7 23:41:40 IDT 1992)
  154. Xver 5.0     (Mon Sep  7 23:42:04 IDT 1992)
  155. Xvls 5.0     (Mon Sep  7 23:42:21 IDT 1992)
  156. Xchver 5.3     (Sat Sep 26 22:30:04 IDT 1992)
  157. Xgaps.1 5.10     (Sun Sep 27 16:15:02 IDT 1992)
  158. Xmkdistrib 5.4     (Sun Sep 27 16:04:51 IDT 1992)
  159. END_OF_FILE
  160.   if test 551 -ne `wc -c <'VERSION'`; then
  161.     echo shar: \"'VERSION'\" unpacked with wrong size!
  162.   fi
  163.   # end of 'VERSION'
  164. fi
  165. if test -f 'WHATSNEW' -a "${1}" != "-c" ; then 
  166.   echo shar: Will not clobber existing file \"'WHATSNEW'\"
  167. else
  168.   echo shar: Extracting \"'WHATSNEW'\" \(1586 characters\)
  169.   sed "s/^X//" >'WHATSNEW' <<'END_OF_FILE'
  170. XUsing this file
  171. X---------------
  172. XThis file describes the changes made in GAPS in various releases. To see
  173. Xwhat's new in GAPS since the release xyz you have, look for section for
  174. Xthe new features of your xyz version, skip it, and read the next sections
  175. Xuntil the end of file.
  176. XNote that on every release the manual is updated, so if you have missed
  177. Xmany releases, you would probably prefer to reread the manual.
  178. X
  179. XNew features is release 4 of GAPS
  180. X---------------------------------
  181. X* first public release of GAPS
  182. X
  183. XNew features in release 5 of GAPS
  184. X---------------------------------
  185. Xnew in release 5: (Revision 36)
  186. X* mkdistrib utility added, which makes the task of creating distribution
  187. X  versions much easier. see gaps.1
  188. X* put now does not let you put files which contain a line which is only '.'.
  189. X  this is to prevent problems which accur from such files (because of ed).
  190. X
  191. Xnew in release 5.01: (Revision 45)
  192. X* some compatability fixes
  193. X* add MD (module date) and PD (project date) to mkdistrib's %?% processing, and
  194. X  added module date to VERSION.
  195. X* in put, typing a ^ at the end of the summary lets you type another line of
  196. X  summary.
  197. X* fixed text of errors messages in some of the utilities
  198. X
  199. Xnew in release 5.02: (Revision 58)
  200. X* improve interrupt handling in unput, put, chver and get
  201. X* add lock file check to put, chver, and unput to prevent to of them working
  202. X  in the same time.
  203. X* various changes in the manual, such as adding a bug and caveat to the list,
  204. X  explaining new features and rephrasing old ones.
  205. X* new OLDREVISIONS variable accepted by mkdistrib in the distribution file.
  206. END_OF_FILE
  207.   if test 1586 -ne `wc -c <'WHATSNEW'`; then
  208.     echo shar: \"'WHATSNEW'\" unpacked with wrong size!
  209.   fi
  210.   # end of 'WHATSNEW'
  211. fi
  212. if test -f 'chver' -a "${1}" != "-c" ; then 
  213.   echo shar: Will not clobber existing file \"'chver'\"
  214. else
  215.   echo shar: Extracting \"'chver'\" \(3818 characters\)
  216.   sed "s/^X//" >'chver' <<'END_OF_FILE'
  217. X#!/bin/sh
  218. X# GAPS release 5.02 (revision 58)
  219. X# get and put system - by Nadav Har'El
  220. X# chver 5.3: change version name, and other info
  221. X
  222. XVERSION=0    # current version
  223. XUSAGE="Usage: $0 [-<number version> or -v<named version>] file"
  224. XINPUT=
  225. X
  226. Xwhile test "$1" != ""
  227. Xdo
  228. X    case $1 in
  229. X    -[0-9]|-[0-9][0-9]|-[0-9][0-9][0-9])
  230. X        VERSION=$1;;         # 1-999 versions
  231. X    -v*)    VERSION=$1;;
  232. X    -*)    echo "chver: unknown argument $1"
  233. X        echo "$USAGE" 2>&1; exit 1;;
  234. X    *)    INPUT=$1
  235. X        case $INPUT in
  236. X        *.H)    ;;
  237. X        *)    INPUT=$INPUT.H ;;
  238. X        esac ;;
  239. X    esac
  240. X    shift
  241. Xdone
  242. Xcase $INPUT in
  243. X"")    echo $USAGE 1>&2; exit 1;;
  244. Xesac
  245. X
  246. Xtest -r $INPUT -a -f $INPUT || { echo "chver: can't open $INPUT" 1>&2; exit 1; }
  247. XINPUTB=`basename $INPUT .H`
  248. Xif test -f $INPUTB.!
  249. Xthen
  250. X    set `cat $INPUTB.!`
  251. X    echo "a $1 is running on history file $INPUT on process $2."
  252. X    echo "if this is not true, please remove lock file \"$INPUTB.!\""
  253. X    exit 2;
  254. Xfi
  255. Xecho "chver $$" >$INPUTB.!
  256. Xtrap 'rm -f /tmp/chver.[a-g]$$ '$INPUTB.!'; exit 1' 1 2 3 15
  257. X
  258. Xcase $VERSION in
  259. X-v*)    VERSION=`ver "\`expr \"$VERSION\" : '^-v\(.*\)'\`" $INPUT` || exit 1;;
  260. Xesac
  261. X
  262. Xawk < $INPUT '
  263. X    /^@@\^/    {
  264. X        count++
  265. X        if((count-1)== - '$VERSION')
  266. X            print $0 > "'/tmp/chver.c$$'"
  267. X        else if (count > - '$VERSION')
  268. X            print $0 > "'/tmp/chver.b$$'"
  269. X        else print $0 > "'/tmp/chver.a$$'"
  270. X    }
  271. X    !/^@@\^/ {
  272. X        if(count > - '$VERSION')
  273. X            print $0 > "'/tmp/chver.b$$'"
  274. X        else
  275. X            print $0 > "'/tmp/chver.a$$'"
  276. X    }
  277. X'
  278. X
  279. Xif test ! -f /tmp/chver.c$$
  280. Xthen
  281. X    echo "Chver: no such version $VERSION." 1>&2
  282. X    exit 1
  283. Xfi
  284. X
  285. X#a:    first part to be copied to ouput
  286. X#c:    line edited
  287. X#b:    last part copied to output
  288. X#----------------------------------------
  289. X#d:    version name
  290. X#e:    owner
  291. X#f:    date
  292. X#g:    summary (^ changed to newlines)
  293. X
  294. Xawk -F\^ </tmp/chver.c$$ '
  295. X    {    print $2 > "'/tmp/chver.d$$'"
  296. X        print $3 > "'/tmp/chver.e$$'"
  297. X        print $4 > "'/tmp/chver.f$$'"
  298. X        for(i=5; i<=NF; i++)
  299. X            print $i > "'/tmp/chver.g$$'"
  300. X    }
  301. X'
  302. Xecho "Editing version $VERSION in history file $INPUT."
  303. Xecho "Current version name: `cat /tmp/chver.d$$`"
  304. Xwhile :
  305. Xdo
  306. X    echo -n "Do you want to change the version name (y/n)? "
  307. X    read reply
  308. X    case $reply in
  309. X    y*|Y*)    
  310. X        while :
  311. X        do
  312. X            echo -n 'Version: '
  313. X            read Version
  314. X            case $Version in
  315. X            "")    echo "Chver: NULL version not allowed." 1>&2;;
  316. X            *\^*)    echo "Chver: '^' character not allowed in version." 1>&2;;
  317. X            *)    break;;
  318. X            esac
  319. X        done
  320. X        echo "$Version" > /tmp/chver.d$$
  321. X        break;;
  322. X    n*|N*)    break;;
  323. X    *)    echo "Please enter Yes or No."
  324. X    esac
  325. Xdone
  326. Xecho "Current owner name: `cat /tmp/chver.e$$`"
  327. Xwhile :
  328. Xdo
  329. X    echo -n "Do you want to change the owner name (y/n)? "
  330. X    read reply
  331. X    case $reply in
  332. X    y*|Y*)    
  333. X        while :
  334. X        do
  335. X            echo -n 'Owner: '
  336. X            read Owner
  337. X            case $Owner in
  338. X            *\^*)    echo "Chver: '^' character not allowed in owner." 1>&2;;
  339. X            *)    break;;
  340. X            esac
  341. X        done
  342. X        echo "$Owner" > /tmp/chver.e$$
  343. X        break;;
  344. X    n*|N*)    break;;
  345. X    *)    echo "Please enter Yes or No."
  346. X    esac
  347. Xdone
  348. Xecho "Current summary is:"
  349. Xcat /tmp/chver.g$$
  350. Xwhile :
  351. Xdo
  352. X    echo -n "Do you want to change the summary (y/n)? "
  353. X    read reply
  354. X    case $reply in
  355. X    y*|Y*)    
  356. X        while :
  357. X        do
  358. X            vi /tmp/chver.g$$
  359. X# note: I don't check here is the user removed or did other nasty things to the
  360. X# temporary file. maybe someday I will fix that.
  361. X            if fgrep \^@@\^ /tmp/chver.g$$ >/dev/null
  362. X            then
  363. X                echo "Chver: The string ^@@^ must not appear in the summary."
  364. X                echo "Press enter to edit again."
  365. X                read reply
  366. X                continue
  367. X            fi
  368. X            break
  369. X        done
  370. X        break;;
  371. X    n*|N*)    break;;
  372. X    *)    echo "Please enter Yes or No."
  373. X    esac
  374. Xdone
  375. X
  376. Xtrap '' 1 2 3 15
  377. Xchmod u+w $INPUT
  378. Xcat /tmp/chver.a$$ > $INPUT
  379. Xawk '{printf "@@^%s^",$0}' </tmp/chver.d$$ >>$INPUT
  380. Xawk '{printf "%s^",$0}' </tmp/chver.e$$ >>$INPUT
  381. Xawk '{printf "%s",$0}' </tmp/chver.f$$ >>$INPUT
  382. Xawk '{printf "^%s",$0}' </tmp/chver.g$$ >>$INPUT
  383. Xecho >>$INPUT
  384. Xcat /tmp/chver.b$$ 2>/dev/null >>$INPUT
  385. Xchmod -w $INPUT
  386. Xecho Version $VERSION change complete.
  387. Xrm -f /tmp/chver.[a-g]$$ $INPUTB.!
  388. END_OF_FILE
  389.   if test 3818 -ne `wc -c <'chver'`; then
  390.     echo shar: \"'chver'\" unpacked with wrong size!
  391.   fi
  392.   # end of 'chver'
  393. fi
  394. if test -f 'gaps.1' -a "${1}" != "-c" ; then 
  395.   echo shar: Will not clobber existing file \"'gaps.1'\"
  396. else
  397.   echo shar: Extracting \"'gaps.1'\" \(18468 characters\)
  398.   sed "s/^X//" >'gaps.1' <<'END_OF_FILE'
  399. X.\" GAPS release 5.02 (revision 58)
  400. X.\" get and put system - by Nadav Har'El
  401. X.\" gaps.1 5.10: GAPS manual.
  402. X.\"
  403. X.TH "GAPS" 1 "release 5.02" "NYH"
  404. X.SH NAME
  405. XGAPS \- Get and put system release 5.02 by Nadav Har'El
  406. X
  407. X.SH SYNOPSIS
  408. X.B chver
  409. X[
  410. X.I version
  411. X]
  412. X.I file
  413. X.br
  414. X.B get
  415. X[
  416. X.I version
  417. X]
  418. X[
  419. X.B -o
  420. X.I outfile
  421. X]
  422. X.I file
  423. X.br
  424. X.B lastver
  425. X.I file
  426. X.br
  427. X.B put
  428. X.I file
  429. X.br
  430. X.B unput
  431. X.I file
  432. X.br
  433. X.B vcat
  434. X[
  435. X.I version
  436. X]
  437. X.I file
  438. X.br
  439. X.B vdiff
  440. X[
  441. X.I version1
  442. X.I version2
  443. X]
  444. X.I file
  445. X.br
  446. X.B vls
  447. X[
  448. X-a
  449. X|
  450. X.I version
  451. X] file
  452. X\&...
  453. X.br
  454. X.B mkdistrib
  455. X.I project_name
  456. X.SH DESCRIPTION
  457. X.\" .TP - indent, and the next line is a subject
  458. X.\" .P - stop TP, new paragraph
  459. X.\" .I - italic
  460. X.\" blank line - new paragraph (no indent)
  461. X.I GAPS
  462. Xis a package for saving a history of the changes to a source code 
  463. Xof a program, or some other ascii file, similar to 
  464. X.I SCCS
  465. Xor
  466. X.IR RCS .
  467. XGAPS allows you to
  468. X.I put
  469. Xa new version, therefore saving the changes from the last version,
  470. X.I get
  471. Xan older version from the history file, and much more. The revision
  472. Xhistory is saved in file.H, where file is the name of the source code
  473. Xor ascii file you are working on.
  474. X
  475. XThe history file has the following structure:
  476. XThe current (last put) version is copied to the beginning of the history
  477. Xfile, and after that follows a list of changes to make the current version
  478. Xinto older versions. Notice that here the current version doesn't necessarily
  479. Xmean the version in the source code file itself, but rather the the version
  480. Xlast put into the history file.
  481. X
  482. XGAPS programs which require a 
  483. X.I version
  484. Xaccept two kinds of version specifications: The first way to specify a
  485. Xversion is by a
  486. X.I number
  487. Xversion. If -0 is used as a 
  488. X.IR version ,
  489. Xit will mean the version last put
  490. Xinto the history file. -1 will mean the previous version, and so on.
  491. XThe second way, which is probably a lot more convenient is using a
  492. X.I named
  493. Xversion. When you use put to put a new version, put tells you the name
  494. Xof the previous version (unless the history file doesn't exist yet)
  495. Xand lets you choose a name for the new version. Typical names are
  496. X1, 1.0, 2.3.4, or such version numbers. Note, that while the
  497. Xversion name may contain spaces, it is recommended
  498. Xto use version names without spaces (although GAPS handles version
  499. Xnames with spaces just as well). When you want to get version 2.3
  500. Xfrom a file, for example, use
  501. X.B get
  502. X-v2.3 file. To see what versions are already saved in the history file,
  503. Xuse the
  504. X.B vls
  505. Xcommand to list the versions saved in the history file. Note that
  506. Xin all the GAPS commands, the file may be specified either by the
  507. Xthe source code's name or the history file (ending with .H) name.
  508. X.B Vls
  509. Xwill list the version history of all the files specified on the command
  510. Xline.
  511. X.BR Vls 's
  512. Xdefault is to list all the versions in the history. If a version (either
  513. X.I number
  514. Xor
  515. X.I named
  516. Xversion) is specified somewhere on the command line, then
  517. X.B vls
  518. Xwill only list versions newer and including the specified version for each
  519. Xof the files after that version option. The special option -a tells
  520. X.B vls
  521. Xto list all the versions in the next history files.
  522. XSome example uses of
  523. X.B vls
  524. Xare:
  525. X
  526. X    vls *.H
  527. X
  528. XTo list all the versions in all history files in the current directory, and
  529. X
  530. X    vls -v8.0 *.H
  531. X
  532. XTo list all versions newer and including version 8.0 for each history file
  533. Xin the current directory, and
  534. X
  535. X    vls file1 -3 file2 file3 -v2.3 file4 -a file5 file6
  536. X
  537. Xto list all versions in file1.H, file2.5 and file6.H, list all versions
  538. Xnewer and including named version 2.3 in file4.H, and to list the newest 4
  539. Xversions
  540. X(all versions newer and including numeric version -3) in file2.H and file3.H.
  541. X
  542. XEvery version in the history file also has a summary, describing
  543. Xthe changes made in that version. When you
  544. X.B put
  545. Xa file, after being asked for the version name, you are asked you for
  546. Xthe version's summary. The summary may be null by simply pressing
  547. X.I ENTER
  548. Xon the prompt, or set to the wanted summary by entering it in.
  549. XNotice that the summary should be a single line. If you want to
  550. Xenter a multiple line summary, use the ^ character wherever you want the
  551. Xline break. For example, if you enter the summary:
  552. X
  553. X    this summary^spans multiple^lines.
  554. X
  555. XThen vls will report the following summary:
  556. X
  557. X    Summary: this summary
  558. X.br
  559. X             spans multiple
  560. X.br
  561. X             lines.
  562. X.br
  563. X
  564. XIf the last character of the summary is the ^ character, then you are asked
  565. Xto enter another line, which would be added to the summary on a new line.
  566. XFor example, if you enter the summary:
  567. X
  568. X    this summary^  [press ENTER]
  569. X.br
  570. X    spans multiple^  [press ENTER]
  571. X.br
  572. X    lines.
  573. X
  574. Xyou will get the same summary as in the previous example.
  575. X
  576. XEach version also has an owner and a creation date.
  577. X.B Put
  578. Xgets the owner
  579. Xname from the variable LOGNAME, and if it is null or does not exist
  580. Xthen it calls logname and getuid in that order to find the user's login
  581. Xid. The login name must not contain the ^ character, and if it does,
  582. Xthe '?' login name is used instead. Also, the version name must not include
  583. Xthe ^ character.
  584. X
  585. XAll the information about a version, except the creation date can be
  586. Xchanged with the 
  587. X.B chver
  588. Xprogram. It asks you if you want to change the
  589. Xversion name, summary, or owner name, and if you do, it reads new
  590. Xinformation in the version name or owner name case, and lets you to edit with
  591. Xthe
  592. X.I vi
  593. Xeditor the old summary in the summary case.
  594. X
  595. XThe 
  596. X.B get
  597. Xprogram is used to get a version from the history file, and put
  598. Xit in the source code file. The version is specified like before - either
  599. X.RI - n
  600. Xwhere
  601. X.I n
  602. Xis a number, or
  603. X.RI -v name
  604. Xwhere
  605. X.I name
  606. Xis a name of a version.
  607. XAnother option to
  608. X.BR get ,
  609. Xwhich is sometimes needed, is the -o option. This option should be followed
  610. Xby a file name, and specifies the name of the output file, instead of
  611. Xthe file with the same name as the history file, but the .H removed from
  612. Xthe end (the working source file).
  613. XA similar program,
  614. X.BR vcat,
  615. Xis used to look at a version from an history file, but not to write it on
  616. Xa file. The version specified to
  617. X.BR vcat ,
  618. Xalong with the version forms previously described:
  619. X.RI - n
  620. Xand
  621. X.RI -v name ,
  622. Xcan be -c which tells
  623. X.B vcat
  624. Xto simply cat the version you are now working
  625. Xon, i.e. the version which is now in the source code file. This is not
  626. Xvery useful with vcat, but is very useful for
  627. X.BR vdiff .
  628. X.B vdiff
  629. Xis a program to find the difference between two versions in a history file.
  630. XIt uses
  631. X.B vcat
  632. Xso the -c version can be used. Some useful examples of using
  633. X.BR vdiff :
  634. X
  635. X    vdiff -0 -c file
  636. X
  637. Xtells you the changes you have made to the source code file since the last
  638. Xput, and
  639. X
  640. X    vdiff -v1.0 -v2.0 file
  641. X
  642. Xshows you the difference between version 1.0 and 2.0 of the file.
  643. XBecause the first example is so useful, doing simply 'vdiff file', is the
  644. Xsame as 'vdiff -0 -c file'.
  645. X
  646. XAnother useful program provided by GAPS is
  647. X.BR unput ,
  648. Xwhich is used to unput the last (maybe accidentally) put version.
  649. X.B unput
  650. Xcan only remove the last version, and cannot remove it if it is the only
  651. Xversion in the history file. The main use of
  652. X.B unput
  653. Xis after you accidentally use
  654. X.BR put ,
  655. Xand wish you haven't done the put.
  656. X
  657. XAnother program supplied by GAPS is
  658. X.BR lastver ,
  659. Xwhich is used to find the name of the last version in a history file.
  660. X
  661. XAnother, completely different program supplied by GAPS is
  662. X.BR mkdistrib ,
  663. Xwhich is used to organize distributions.
  664. X.BR mkdistrib
  665. Xis a bit more complicated then the other programs, and it
  666. Xis not necessary to use it in order to use GAPS, but using it can be
  667. Xa great help in some or most situations.  Let's say you are writing a project
  668. Xwhich involves writing some source files in some arbitrary language, which
  669. Xare, of course, manged with GAPS' get and put and other utilities. It
  670. Xmay also contain files like README which do not have a history, and, of course,
  671. Xthere are some test programs. Now,
  672. X.B mkdistrib
  673. Xcan help you easily pick out
  674. Xthe latest versions (in the files with history's case, the latest version saved
  675. Xto the history, not the version currently in the working file) of the important
  676. Xfiles you want to distribute, and copy
  677. Xthen into a distribution directory, and create a VERSION file which shows
  678. Xsome information about the project, which I'll explain later.
  679. X.B Mkdistrib
  680. Xalso does some
  681. Xfiltering on the files copied to the distribution directories, which lets you
  682. Xnot distribute parts of a file (for example, a makefile might contain information
  683. Xon how to compile test programs which you don't want to include in the
  684. Xdistribution), and change specific strings into the current version number,
  685. Xand other information about the projects. Keep reading for more details.
  686. X.br
  687. XThe first thing to do if you want to use
  688. X.B mkdistrib
  689. Xis to create a distribution file. A distribution file is a file in the current
  690. Xdirectory, whose name is .distrib-projectname, where projectname can be any
  691. Xname, and will be used later as an argument to
  692. X.BR mkdistrib .
  693. XThe distribution file contains commands which tell
  694. X.B mkdistrib
  695. Xwhat files should be distributed, and more information.
  696. XThe distribution file is really read in by the shell, so you should take care
  697. Xin what you put in it. The useful commands to put in it are assignments of
  698. Xthe following variables:
  699. X.br
  700. X.BR NAME : 
  701. XAssign to it the name of your project. For example, in GAPS' distribution
  702. Xfile, NAME is, of course, "GAPS".
  703. X.br
  704. X.BR RELEASE :
  705. XThis should be the release number of your project. You can assign anything
  706. Xyou want to it, but the most common thing to do is increment the RELEASE
  707. Xeach time the project is distributed (i.e. the distribution directory
  708. Xcreated with mkdistrib is sent to a person or put on a FTP site).
  709. X.br
  710. X.BR SOURCESH :
  711. XThis should be set to the list of sources which have a corresponding history
  712. Xfiles, and are to be distributed. Note that if there are no such sources,
  713. Xthen you are allowed not set this variable at all.
  714. X.br
  715. X.BR SOURCES :
  716. XThis is the list of sources which don't have a corresponding history file,
  717. Xand are to be distributed. Setting this variable is also optional.
  718. X.br
  719. X.BR DISTRIBVERSION :
  720. X.B Mkdistrib
  721. Xcreates a VERSION file, which contains the name of the project,
  722. Xits release number (both got from the distribution file), the project revision
  723. Xnumber (the revision number is the total number of versions saved in the
  724. Xhistories corresponding to the files in SOURCESH), the current date, and the
  725. Xnamed version of each of the sources in SOURCESH.
  726. XBy default, VERSION is copied to the distribution directory. Setting DISTRIBVERSION
  727. Xto anything but 'yes', will tell
  728. X.B mkdistrib
  729. Xnot to copy it.
  730. X.br
  731. X.BR DIR :
  732. XThis option defines the distribution directory. The distribution directory is
  733. Xthe directory in which
  734. X.B mkdistrib
  735. Xputs the files that are to be distributed. The default is Distrib-projectname,
  736. Xwhere projectname is the option which is given to
  737. X.BR mkdistrib ,
  738. Xand is the same as the suffix of the distribution file
  739. X\&.distrib-projectname. The DIR variable may be set to override this default.
  740. X.br
  741. X.BR OLDREVISIONS:
  742. XIf this option is set, then mkdistrib increments the revision number it finds
  743. Xfrom the history file by the value given to OLDREVISIONS. This option is
  744. Xmainly used when a old history file that grew to large is moved from the
  745. Xdeveloping directory to a backup disk, and you still want to keep the old
  746. Xrevision count. To do that, before you remove the old history file do
  747. Xa vls to it, and look at the number of the oldest version (which looks like
  748. X"(-N)", where N is the number of the last version), which is the last version
  749. Xin the vls list, and put this number in the OLDREVISIONS variable
  750. Xof the distribution file, or increment it by that value if that variable was
  751. Xalready set.
  752. X
  753. XSince the distribution file is really a shell script, the advanced user
  754. Xcan use the more advance features of the shell, such as prompt the user
  755. Xfor the release number, or maintain a release number counter in a file, or
  756. Xso on.
  757. X
  758. XAs an example, the following is the distribution file for GAPS, which I used
  759. Xwhile developing release 4 of GAPS.
  760. X\&.distrib-gaps:
  761. X
  762. X.br
  763. X.in +3m
  764. X.nf
  765. X# GAPS source code distribution
  766. X
  767. XNAME="GAPS"
  768. XRELEASE=4
  769. XSOURCESH="get lastver put unput vcat vdiff ver vls chver gaps.1"
  770. XSOURCES="README"
  771. XDIR=Distrib
  772. X.in -3m
  773. X.fi
  774. X.sp
  775. XNow, each time I want to release the current version of gaps, I run mkdistrib
  776. X\&gaps, and I get the ready to distribute version in the directory Distrib.
  777. X
  778. X.B Mkdistrib
  779. Xdoes not only copy the most recent version of each of the sources to the
  780. Xdistribution directory, but also does some processing which increases the
  781. Xusefulness of
  782. X.BR mkdistrib .
  783. XThe first thing it does is to remove unwanted pieces from the distributed
  784. Xversions of the files. For example, let's say you are writing a project
  785. Xand for testing it you are using test programs. Now, it's easy to exclude
  786. Xthose programs from the distribution, by not including them on the SOURCESH
  787. Xor SOURCES variables. However, your makefile probably contains information
  788. Xabout how to compile those test programs as well, and this also has to be
  789. Xremoved from the distributed version. Using
  790. X.B mkdistrib
  791. Xit is easy - when it sees a line with %\&dont%distribute% somewhere in it
  792. Xit does not copy this line, as well as the lines that follow, until a
  793. Xline with %stop%\&dont%distribute% is found. Since those commands are not
  794. Xrequired to be on a line of their own, it is simple to put them inside
  795. Xcomments so that the non-distributed version (the version you work with)
  796. Xwill have no problem running. Another use of those commands is to cause
  797. Xsections of code which have not been completed yet not to be included in
  798. Xthe distributed version, while retaining them in your own version.
  799. X
  800. XAnother benefit
  801. X.B mkdistrib
  802. Xoffers is the ability to change fixed strings in the source files to
  803. Xversion information in the distributed file.
  804. X.B Mkdistrib
  805. Xrecognizes the following strings, and changes them to what
  806. XI shall now describe (A description followed by (H.O.) means that that
  807. Xstring will only be changed when processing a file which has a history):
  808. X
  809. X.ft I
  810. Xstring    description of what the string changes into
  811. X.ft P
  812. X.br
  813. X.B %\&M%
  814. X    Module (file) name
  815. X.br
  816. X.B %\&P%
  817. X    Project name (from the distribution file)
  818. X.br
  819. X.B %\&I%
  820. X    Module version (H.O.)
  821. X.br
  822. X.B %\&V%
  823. X    Project release (from the distribution file)
  824. X.br
  825. X.B %\&F%
  826. X    Corresponding history file name (H.O.)
  827. X.br
  828. X.B %\&Z%
  829. X    The string @(#), which can be found by what(1)
  830. X.br
  831. X.B %\&R%
  832. X    Revision number of project
  833. X.br
  834. X.B %\&W%
  835. X    Same as: %\&Z%%\&M%<tab>%\&I%
  836. X.br
  837. X.B %\&MI%
  838. X    Same as: Module:<tab><tab>%\&M% version %\&I%
  839. X.br
  840. X.B %\&PI%
  841. X    Same as: Project:<tab>%\&P% release %\&V% (revision %\&R%)
  842. X.br
  843. X.B %\&PD%
  844. X    Project date (current date)
  845. X.br
  846. X.B %\&MD%
  847. X    Module date (date of last put) (H.O.)
  848. X.br
  849. X
  850. XNote: In this manual, version, release and revision are
  851. X.I not
  852. Xsynonyms.
  853. XThe first is used to signify a state of one file, which is saved with
  854. Xput in the file's history, and the latters are
  855. Xused with distribution and projects in mind: A release is the act of taking the
  856. Xdistribution directory created by
  857. X.B mkdistrib
  858. Xand sending it to other
  859. Xpeople, thus the release number has to do with the number of release
  860. Xdone to this project. A revision is the act of making one change in
  861. Xone file of the source, thus the revision number is the total number
  862. Xof versions in all history files of this project. This number's only
  863. Xuse is to compare it to the revision number of a previous release,
  864. Xto guess who much has changed.
  865. X
  866. XOnce more, note that using
  867. X.B mkdistrib
  868. Xis optional, and serves a different
  869. Xpurpose than other utilities supplied by GAPS: All other utilities give
  870. Xyou a completely general way to keep track of versions of your files, which
  871. Xyou can name or organize as you want.
  872. X.B Mkdistrib
  873. Xallows you to take separate history files and organize a distribution in
  874. Xa specific format, which you may or may not like. For most purposes
  875. X.B mkdistrib
  876. Xis very good
  877. X.RB ( mkdistrib
  878. Xwas used to organize GAPS's distribution), but if you want to create a different
  879. Xtype of distributions, feel free to create it by hand, or create a new
  880. X.BR mkdistrib -type
  881. Xprogram to do it automatically (one might even create a Makefile with such
  882. Xcapabilities), while still using the other GAPS utilities.
  883. X
  884. X
  885. XThe
  886. X.B GAPS
  887. Xprograms are written entirely as shell scripts, using awk, ed, diff,
  888. Xand other useful UNIX utilities. Therefore, they easily run on most
  889. XUNIX computers.
  890. X.SH "SEE ALSO"
  891. X
  892. Xsccs, rcs, what(1)
  893. X
  894. XUNIX utilities used by GAPS:
  895. X.br
  896. Xawk(1), cat(1), ed(1), diff(1), sed(1), expr(1), vi(1), sh(1), cp(1),
  897. Xchmod(1), rm(1), test(1), echo(1), grep(1), fgrep(1), logname(1) or
  898. Xgetuid(1), date(1), ls(1), mkdir(1)
  899. X.SH BUGS
  900. XSummaries which are too long for grep to handle really make GAPS go mad.
  901. X.br
  902. XOn a system where there is a limit on file name length (such as the 14
  903. Xcharacter limit found in system V computers), you cannot keep a history of
  904. Xa file whose name's length is one less then the limit or the limit itself
  905. X(i.e. on a computer with a 14 character limit, you can only keep a history
  906. Xof files with name lengths of 12 or less). Trying to
  907. X.B put
  908. Xa file with a longer name cannot hurt, but it simply won't work: if the length
  909. Xis the limit then
  910. X.B put
  911. Xexits with a bogus lock file error (when it trys to add a .! to the end of
  912. Xthe file to get the lock file name, it gets the same file, which of course
  913. Xexists), and if the length is one less then the limit, it will look like
  914. Xput works, but after it finishes, no history file will exist (in fact, it
  915. Xwas removed by put since it and the lock file are the same file because of
  916. Xthe limit on file name length).
  917. X.SH CAVEATS
  918. XOnly the owner of the history file file may use the writing utilities supplied by GAPS
  919. X-
  920. X.BR put ,
  921. X.BR chver ,
  922. Xand
  923. X.BR unput
  924. Xon that history file. There is no support yet for group or public write access
  925. Xto history files.
  926. X.br
  927. XFor technical reasons, GAPS supports up to 999 versions in one history file.
  928. XPutting more then that will make you unable to get the very old versions. If
  929. Xanyone really needs more versions in one history file, I can easily change
  930. Xthe limit, but I don't think there is such a need.
  931. X
  932. X
  933. XIf you have any questions, comments, wishes for future releases, bug reports,
  934. Xor anything else about GAPS, send them to
  935. X.br
  936. X    nyh@gauss.technion.ac.il
  937. X.br
  938. XPlease include in your message the content of your VERSION file, so I will
  939. Xknow exactly which version you have, or in the case you don't have the
  940. XVERSION file, at least include the GAPS release number, which can be found
  941. Xin this manual.
  942. X.SH COPYRIGHT
  943. XCopyright (C) 1991-1992 by Nadav Har'El,
  944. X.br
  945. XE-mail: nyh@gauss.technion.ac.il
  946. X.br
  947. XAll Rights Reserved
  948. END_OF_FILE
  949.   if test 18468 -ne `wc -c <'gaps.1'`; then
  950.     echo shar: \"'gaps.1'\" unpacked with wrong size!
  951.   fi
  952.   # end of 'gaps.1'
  953. fi
  954. if test -f 'get' -a "${1}" != "-c" ; then 
  955.   echo shar: Will not clobber existing file \"'get'\"
  956. else
  957.   echo shar: Extracting \"'get'\" \(1569 characters\)
  958.   sed "s/^X//" >'get' <<'END_OF_FILE'
  959. X#!/bin/sh
  960. X# GAPS release 5.02 (revision 58)
  961. X# get and put system - by Nadav Har'El
  962. X# get 5.2: extract file from history
  963. X
  964. XVERSION=0
  965. XINPUT=
  966. XOUTPUT=
  967. XFILEFLG=
  968. XUSAGE="Usage: get [-<number version> or -v<named version>] [-o outfile] file"
  969. X
  970. Xwhile test "$1" != ""
  971. Xdo
  972. X    case "$1" in
  973. X    -o)     OUTPUT=$2; shift ;;
  974. X    -[0-9]|-[0-9][0-9]|-[0-9][0-9][0-9])    VERSION=$1 ;; # 1-999 versions
  975. X    -v*)    VERSION=$1;;
  976. X    -*)     echo "get: unknown argument $1" 1>&2
  977. X        echo "$USAGE" 1>&2
  978. X        exit 1 ;;
  979. X    *.H)    case "$FILEFLG" in
  980. X        y)    echo "$USAGE" 1>&2
  981. X            exit 1;;
  982. X        esac
  983. X        FILEFLG=y
  984. X        case "$OUTPUT" in
  985. X        "")    OUTPUT=`expr "$1" : '\(.*\)\.H'`
  986. X        esac
  987. X        INPUT=$1;;
  988. X    *)    case "$FILEFLG" in
  989. X        y)    echo "$USAGE" 1>&2
  990. X            exit 1;;
  991. X        esac
  992. X        FILEFLG=y
  993. X        case "$OUTPUT" in
  994. X        "")    OUTPUT=$1
  995. X        esac
  996. X        INPUT=$1.H
  997. X    esac
  998. X    shift
  999. Xdone
  1000. Xcase $FILEFLG in
  1001. X"")    echo "$USAGE" 1>&2
  1002. X    exit 1;;
  1003. Xesac
  1004. Xtest -r $INPUT -a -f $INPUT ||
  1005. X    { echo "Get: Cannot open $INPUT for input" 1>&2; exit 1; }
  1006. Xtest -w $OUTPUT -a ! -d $OUTPUT -o ! -f $OUTPUT -a ! -d $OUTPUT -a \
  1007. X    ! -c $OUTPUT -a ! -b $OUTPUT ||
  1008. X    { echo "Get: Cannot open $OUTPUT for writing" 1>&2; exit 1; }
  1009. Xcase $VERSION in
  1010. X-v*)    VERSION=`ver "\`expr \"$VERSION\" : '^-v\(.*\)'\`" $INPUT` || exit 1;;
  1011. Xesac
  1012. Xtrap 'rm -f /tmp/get.[ab]$$;exit 1' 1 2 3 15
  1013. X# split into current version and editing command
  1014. Xsed <$INPUT '/^@@\^/q' >/tmp/get.a$$
  1015. Xsed <$INPUT -n '/^@@\^/,$w /tmp/get.b'$$
  1016. Xtrap '' 1 2 3 15
  1017. X# preform the edits
  1018. Xawk </tmp/get.b$$ '
  1019. X    /^@@\^/ { count++ }
  1020. X    !/^@@\^/ && count > 0 && count <= - '$VERSION'
  1021. X    END { print "$d"; print "w", "'$OUTPUT'" }
  1022. X' | ed - /tmp/get.a$$
  1023. Xrm -f /tmp/get.[ab]$$
  1024. END_OF_FILE
  1025.   if test 1569 -ne `wc -c <'get'`; then
  1026.     echo shar: \"'get'\" unpacked with wrong size!
  1027.   fi
  1028.   # end of 'get'
  1029. fi
  1030. if test -f 'lastver' -a "${1}" != "-c" ; then 
  1031.   echo shar: Will not clobber existing file \"'lastver'\"
  1032. else
  1033.   echo shar: Extracting \"'lastver'\" \(305 characters\)
  1034.   sed "s/^X//" >'lastver' <<'END_OF_FILE'
  1035. X#!/bin/sh
  1036. X# GAPS release 5.02 (revision 58)
  1037. X# get and put system - by Nadav Har'El
  1038. X# lastver 5.0: find the name of the last version in history
  1039. Xcase $# in
  1040. X1)     case $1 in 
  1041. X    *.H)    HIST=$1;;
  1042. X    *)    HIST=$1.H
  1043. X    esac
  1044. X    awk -F\^ '/^@@\^/ {print $2; exit}' <$HIST;;
  1045. X*)     echo 'Usage: lastver file' 1>&2; exit 1 ;;
  1046. Xesac 
  1047. END_OF_FILE
  1048.   if test 305 -ne `wc -c <'lastver'`; then
  1049.     echo shar: \"'lastver'\" unpacked with wrong size!
  1050.   fi
  1051.   # end of 'lastver'
  1052. fi
  1053. if test -f 'mkdistrib.UU' -a "${1}" != "-c" ; then 
  1054.   echo shar: Will not clobber existing file \"'mkdistrib.UU'\"
  1055. else
  1056.   echo shar: Extracting \"'mkdistrib.UU'\" \(4392 characters\)
  1057.   sed "s/^X//" >'mkdistrib.UU' <<'END_OF_FILE'
  1058. Xbegin 644 mkdistrib
  1059. XM(R$O8FEN+W-H"B,@1T%04R!R96QE87-E(#4N,#(@*')E=FES:6]N(#4X*0HC
  1060. XM(&=E="!A;F0@<'5T('-Y<W1E;2 M(&)Y($YA9&%V($AA<B=%; HC(&UK9&ES
  1061. XM=')I8B U+C0Z($$@=71I;&ET>2!F;W(@;6%K96EN9R!D:7-T<FEB=71I;VX@
  1062. XM=F5R<VEO;G,@96%S:65R+@H*8V%S92 D(R!I;@HQ*0E$25-44DE"/2YD:7-T
  1063. XM<FEB+20Q.SL**BD)96-H;R B57-A9V4Z("0P('!R;VIE8W1?;F%M92(*"6EF
  1064. XM(&QS("UA("YD:7-T<FEB+2H@/B]D978O;G5L;" R/B8Q"@ET:&5N"@D)96-H
  1065. XM;R B079A:6QA8FQE('!R;VIE8W0@;F%M97,Z("@N9&ES=')I8BTJ('!R;VIE
  1066. XM8W0@9&ES=')I8G5T:6]N(&9I;&5S*2(*"0EF;W(@:2!I;B N9&ES=')I8BTJ
  1067. XM"@D)9&\*"0D)97AP<B B)&DB(#H@(EPN9&ES=')I8BU<*"XJ7"DB"@D)9&]N
  1068. XM90H)96QS90H)"65C:&\@(BA.;R!P<F]J96-T(&1I<W1R:6)U=&EO;B!F:6QE
  1069. XM<R!A=F%I;&%B;&4@:6X@=&AI<R!D:7)E8W1O<GDI(@H)9FD*"65X:70@,3L[
  1070. XM"F5S86,*"B,@8VAE8VL@:&]W('1O(&1O(&$@96-H;R!W:71H(&]U="!N97<@
  1071. XM;&EN92!O;B!T:&ES('-Y<W1E;2X*(R H86QT:&]U9V@@+6X@=V]R:W,@;VX@
  1072. XM86QL('-Y<W1E;7,L(&]N('-O;64@:70@8V%U<V5S('1H92!S=')I;F<@=&\@
  1073. XM8F4@9F]L;&]W960*(R!B>2!A('-P86-E*0IC87-E(&!E8VAO(")<8R)@(&EN
  1074. XM"B(B*0E%0CT@(" @(#L@144](EQC(CL["BHI"45"/2(M;B B.R!%13T@(" @
  1075. XM.SL*97-A8PI"/2(((@H*(R!D969A=6QT(&]P=&EO;B H8V%N(&)E(&]V97)I
  1076. XM9&1E;B!B>2!T:&4@9&ES=')I8G5T:6]N(&9I;&4I"@I$25-44DE"5D524TE/
  1077. XM3CUY97,*1$E2/41I<W1R:6(M)#$*3D%-13T[4D5,14%313T[4T]54D-%4ST[
  1078. XM4T]54D-%4T@].T],1%)%5DE324].4STP"@HC(')E860@9&ES=')I8G5T:6]N
  1079. XM(&]P=&EO;B!F:6QE"FEF('1E<W0@+7(@)$1)4U1224(*=&AE;@H):68@+B D
  1080. XM1$E35%))0@H)=&AE;@H)"3H*"65L<V4*"0EE8VAO(%-Y;G1A>"!E<G)O<B!I
  1081. XM;B D1$E35%))0BX*"0EE>&ET(#(*"69I"F5L<V4*"65C:&\@0V%N;F]T(&]P
  1082. XM96X@)$1)4U1224(N"@EE>&ET(#,*9FD*"F5C:&\@)$5"(E-E='1I;F<@=7 Z
  1083. XM("(D144*"B,@<V5T('5P(&1I<W1R:6)U=&EO;B!D:7)E8W1O<GD*:68@=&5S
  1084. XM=" M9" D1$E2"G1H96X*"3H*96QS90H):68@;6MD:7(@)$1)4@H)=&AE;@H)
  1085. XM"3H*"65L<V4*"0EE8VAO(%-O<G)Y+"!B=70@)$1)4B!I<R!A(&9I;&4L('1H
  1086. XM=7,@8V%N;F]T(&)E('5S960@87,@=&AE(&1I<W1R:6)U=&EO;B!D:7)E8W1O
  1087. XM<GDN"@D)97AI=" T"@EF:0IF:0H*2%-/55)#15,]"2,@4T]54D-%4T@L('=I
  1088. XM=&@@+D@@871A8VAE9"!T;R!T:&5M"@HC(R,@<V5T('5P(&9O<B!T:&4@;FEC
  1089. XM92!P<F]G<F5S<R!R97!O<G0@=VAI8V@@=VEL;"!C;VUE(&QA=&5R+B *0E,]
  1090. XM"0DC(&)A8VL@<W!A8V4@<W1R:6YG"D)30CT)"2,@8F%C:R!S<&%C92!A;F0@
  1091. XM8VQE87(@<W1R:6YG"D1/5#T)"2,@9&]T('-T<FEN9PIF;W(@:2!I;B D4T]5
  1092. XM4D-%4T@*9&\*"4A33U520T53/2(D2%-/55)#15,@)&DN2"(*"4)3/2(D0E,D
  1093. XM0B(*"4)30CTB)$)30B1"("1"(@H)1$]4/2(D1$]4+B(*9&]N90IF;W(@:2!I
  1094. XM;B D4T]54D-%4PID;PH)0E,](B1"4R1"(@H)0E-"/2(D0E-")$(@)$(B"@E$
  1095. XM3U0](B1$3U0N(@ID;VYE"@HC(R,C($=E="!P<F]J96-T(&EN9F]R;6%T:6]N
  1096. XM("AR979I<VEO;B!A;F0@9&%T92D*4D56/2)@8V%T("1(4T]54D-%4R!\(&=R
  1097. XM97 @)UY 0%Q>)R!\('=C("UL8"(*"F9O<B!I(&EN("133U520T532 ID;PH)
  1098. XM4D56/2(D4D56("T@,2(*9&]N90I2158]8&5X<'(@)%)%5B K("1/3$12159)
  1099. XM4TE/3E-@"@I$051%/2)@9&%T96 B"F-A=" \/$5.1" ^5D524TE/3B *)$Y!
  1100. XM344@4F5L96%S92 D4D5,14%312 H4F5V:7-I;VX@)%)%5BD*)$1!5$4*"E-O
  1101. XM=7)C92!F:6QE<SH*+2TM+2TM+2TM+2TM+0I%3D0*"F5C:&\@(B @(" @(" @
  1102. XM1&]N92XB"@HC(R,C($=E="!F:6QE(&EN9F]R;6%T:6]N("AP<F]C97-S(&5A
  1103. XM8V@@9FEL92D*96-H;R D14(B4')O8V5S<VEN9R!S;W5R8V5S.B B)$5%"@IE
  1104. XM8VAO("1%0B(D1$]4)$)3(B1%10IF;W(@:2!I;B D4T]54D-%4T@*9&\*"5,]
  1105. XM8&%W:R M1EQ>("<O7D! 7%XO('MP<FEN=&8H(G8])7,@;60]7"(E<UPB7&XB
  1106. XM+"0R+"0T*3L@97AI='TG(#PD:2Y(8 H)979A;" B)%,B"@EE8VAO("1I("(D
  1107. XM=B(@(@DH)&UD*2(@/CY615)324]."@EE8VAO("1%0B)O)$(B)$5%"@H)=F-A
  1108. XM=" D:2!\(&%W:R G"@E"14=)3@D)"0E[(&9L86<],2!]"@DO)7-T;W E7&1O
  1109. XM;G0E9&ES=')I8G5T924O"7L@9FQA9STQ.R!N97AT('T*"2\E7&1O;G0E9&ES
  1110. XM=')I8G5T924O"0E[(&9L86<],#L@;F5X="!]"@D)"0D)>R!I9BAF;&%G*2!P
  1111. XM<FEN="!]"@DG('P@<V5D("(*"7,O)5Q-)2\D:2]G"@ES+R5<4"4O)$Y!344O
  1112. XM9PH)<R\E7$DE+R1V+V<*"7,O)5Q6)2\D4D5,14%312]G"@ES+R5<1B4O)&DN
  1113. XM2"]G"@ES+R5<6B4O0"@C*2]G"@ES+R5<5R4O0"@C*21I"21V+V<*"7,O)5Q-
  1114. XM224O0"@C*4UO9'5L93H)"21I('9E<G-I;VX@)'8O9PH)<R\E7%!))2] *",I
  1115. XM4')O:F5C=#H))$Y!344@<F5L96%S92 D4D5,14%312 H<F5V:7-I;VX@)%)%
  1116. XM5BDO9PH)<R\E7%(E+R12158O9PH)<R\E7%!$)2\D1$%412]G"@ES+R5<340E
  1117. XM+R1M9"]G"@DB(#X@)$1)4B\D:0H*"65C:&\@)$5"(D\B)$5%"F1O;F4*"F-A
  1118. XM<V4@)$1)4U1224)615)324].(&EN"GEE<RD)8W @5D524TE/3B D1$E2(#L[
  1119. XM"F5S86,*"B,@8V]P>2!33U520T53"F9O<B!I(&EN("133U520T53"F1O"@EA
  1120. XM=VL@)PH)0D5'24X)"0D)>R!F;&%G/3$@?0H)+R5S=&]P)5QD;VYT)61I<W1R
  1121. XM:6)U=&4E+PE[(&9L86<],3L@;F5X="!]"@DO)5QD;VYT)61I<W1R:6)U=&4E
  1122. XM+PD)>R!F;&%G/3 [(&YE>'0@?0H)"0D)"7L@:68H9FQA9RD@<')I;G0@?0H)
  1123. XM)R \("1I('P@<V5D("(*"7,O)5Q-)2\D:2]G"@ES+R5<4"4O)$Y!344O9PH)
  1124. XM<R\E7%8E+R1214Q%05-%+V<*"7,O)5Q:)2] *",I+V<*"7,O)5Q7)2] *",I
  1125. XM)&D))'8O9PH)<R\E7$U))2] *",I36]D=6QE.@D))&D@=F5R<VEO;B D=B]G
  1126. XM"@ES+R5<4$DE+T H(RE0<F]J96-T.@DD3D%-12!R96QE87-E("1214Q%05-%
  1127. XM("AR979I<VEO;B D4D56*2]G"@ES+R5<4B4O)%)%5B]G"@ES+R5<4$0E+R1$
  1128. XM051%+V<*"2(@/B D1$E2+R1I"@H)96-H;R D14(B3R(D144*9&]N90H*96-H
  1129. X0;R B)'M"4T)]1&]N92XB"B1I
  1130. Xend
  1131. END_OF_FILE
  1132.   if test 4392 -ne `wc -c <'mkdistrib.UU'`; then
  1133.     echo shar: \"'mkdistrib.UU'\" unpacked with wrong size!
  1134.   else
  1135.     echo shar: Uudecoding \"'mkdistrib'\" \(3166 characters\)
  1136.     cat mkdistrib.UU | uudecode
  1137.     if test -f mkdistrib ; then 
  1138.       if test 3166 -ne `wc -c <'mkdistrib'`; then
  1139.         echo shar: \"'mkdistrib'\" uudecoded with wrong size!
  1140.       else
  1141.         rm mkdistrib.UU
  1142.       fi
  1143.     else
  1144.       echo shar: \"'mkdistrib'\" uudecode failed completely!
  1145.     fi
  1146.   fi
  1147.   # end of 'mkdistrib.UU'
  1148. fi
  1149. if test -f 'put' -a "${1}" != "-c" ; then 
  1150.   echo shar: Will not clobber existing file \"'put'\"
  1151. else
  1152.   echo shar: Extracting \"'put'\" \(2245 characters\)
  1153.   sed "s/^X//" >'put' <<'END_OF_FILE'
  1154. X#!/bin/sh
  1155. X# GAPS release 5.02 (revision 58)
  1156. X# get and put system - by Nadav Har'El
  1157. X# put 5.4: install file into history
  1158. Xtrap 'exit 1' 1 2 3 15
  1159. Xcase $# in
  1160. X1)     case $1 in 
  1161. X    *.H)    HIST=$1
  1162. X        set "`expr $HIST : '\(.*\)\.H'`";;
  1163. X    *)    HIST=$1.H
  1164. X    esac
  1165. X    if test -f $HIST
  1166. X    then
  1167. X        chmod u+w $HIST
  1168. X        trap 'chmod -w $HIST; exit 1' 1 2 3 15
  1169. X    fi ;;
  1170. X*)     echo 'Usage: put file' 1>&2; exit 1 ;;
  1171. Xesac 
  1172. Xif test ! -r $1 -o ! -f $1
  1173. Xthen
  1174. X    echo "Put: can't open $1 for input" 1>&2
  1175. X    exit 1
  1176. Xfi
  1177. Xif egrep "^@@\^|^\.$" $1 >/dev/null
  1178. Xthen
  1179. X    echo "file contains '@@^' in begining of line, or a line with only a single '.'." 1>&2
  1180. X    echo "can't save it." 1>&2
  1181. X    exit 1
  1182. Xfi
  1183. X
  1184. XINPUTB=$1
  1185. Xif test -f $INPUTB.!
  1186. Xthen
  1187. X    set `cat $INPUTB.!`
  1188. X    echo "a $1 is running on history file $INPUT on process $2."
  1189. X    echo "if this is not true, please remove lock file \"$INPUTB.!\""
  1190. X    exit 2;
  1191. Xfi
  1192. Xecho "put $$" >$INPUTB.!
  1193. X
  1194. Xtrap 'rm -f /tmp/put.[ab]$$ '$INPUTB.!';chmod -w $HIST 2>/dev/null; exit 1' 1 2 3 15
  1195. Xif test -r $HIST
  1196. Xthen
  1197. X    echo "Last version of $HIST is \
  1198. X`awk -F\^ '/^@@\^/ {print $2; exit}' <$HIST`"
  1199. Xfi
  1200. X
  1201. Xwhile :
  1202. Xdo
  1203. X    echo -n 'Version: '
  1204. X    read Version
  1205. X    case $Version in
  1206. X    "")    echo "Put: NULL version not allowed." 1>&2;;
  1207. X    *\^*)    echo "Put: '^' character not allowed in version." 1>&2;;
  1208. X    *)    break;;
  1209. X    esac
  1210. Xdone
  1211. X
  1212. XSummary=
  1213. Xwhile :
  1214. Xdo
  1215. X    case "$Summary" in
  1216. X    "") echo -n 'Summary: ';;
  1217. X    *)  echo -n '         ';;
  1218. X    esac
  1219. X    read Summary_add
  1220. X    Summary="$Summary$Summary_add"
  1221. X    case $Summary in
  1222. X    *\^@@\^*)
  1223. X        echo "Put: The string ^@@^ must not appear in the Summary" 1>&2;;
  1224. X    *\^)
  1225. X        continue;;
  1226. X    *)
  1227. X        break;;
  1228. X    esac
  1229. Xdone
  1230. Xcase $LOGNAME in
  1231. X"")    LOGNAME=`logname 2>/dev/null || getuid 2>/dev/null`
  1232. X    case $LOGNAME in
  1233. X    *\^*)    LOGNAME='?';;
  1234. X    esac;;
  1235. X*\^*)    LOGNAME='?';;
  1236. Xesac
  1237. X
  1238. Xif get -o /tmp/put.a$$ $1                # previous versions
  1239. Xthen                            # merge pieces
  1240. X    cp $1 /tmp/put.b$$                # current version
  1241. X    chmod +w /tmp/put.b$$
  1242. X    echo "@@^$Version^$LOGNAME^`date`^$Summary" >> /tmp/put.b$$
  1243. X    diff -e $1 /tmp/put.a$$ >> /tmp/put.b$$        # latest diffs
  1244. X    sed -n '/^@@\^/,$p' <$HIST >>/tmp/put.b$$    # old diffs
  1245. X    trap '' 1 2 3 15
  1246. X    cp /tmp/put.b$$ $HIST                # put it back
  1247. Xelse                            # make a new one
  1248. X    echo "put: creating $HIST"
  1249. X    cp $1 $HIST
  1250. X    chmod =rw $HIST
  1251. X    echo "@@^$Version^$LOGNAME^`date`^$Summary" >> $HIST
  1252. Xfi
  1253. Xrm -f /tmp/put.*$$ $INPUTB.!
  1254. Xchmod -w $HIST
  1255. END_OF_FILE
  1256.   if test 2245 -ne `wc -c <'put'`; then
  1257.     echo shar: \"'put'\" unpacked with wrong size!
  1258.   fi
  1259.   # end of 'put'
  1260. fi
  1261. if test -f 'unput' -a "${1}" != "-c" ; then 
  1262.   echo shar: Will not clobber existing file \"'unput'\"
  1263. else
  1264.   echo shar: Extracting \"'unput'\" \(1308 characters\)
  1265.   sed "s/^X//" >'unput' <<'END_OF_FILE'
  1266. X#!/bin/sh
  1267. X# GAPS release 5.02 (revision 58)
  1268. X# get and put system - by Nadav Har'El
  1269. X# unput 5.2: unput the last version from history
  1270. Xtrap 'exit 1' 1 2 3 15
  1271. Xcase $# in
  1272. X1)     case $1 in 
  1273. X    *.H)    HIST=$1;;
  1274. X    *)    HIST=$1.H
  1275. X    esac
  1276. X    if test -f $HIST
  1277. X    then
  1278. X        chmod u+w $HIST
  1279. X        trap 'chmod -w $HIST; exit 1' 1 2 3 15
  1280. X    fi ;;
  1281. X*)     echo 'Usage: unput file' 1>&2; exit 1 ;;
  1282. Xesac 
  1283. Xif test ! -r $HIST -o ! -f $HIST
  1284. Xthen
  1285. X    echo "unput: can't open history file $HIST" 1>&2
  1286. X    exit 1
  1287. Xfi
  1288. Xif test `grep "^@@\^" $HIST 2>/dev/null | wc -l` -le 1
  1289. Xthen
  1290. X    echo "$HIST has only one version or not an history file." 1>&2
  1291. X    echo "Unput failed." 1>&2
  1292. X    exit 1
  1293. Xfi
  1294. XINPUTB=`basename $HIST .H`
  1295. Xif test -f $INPUTB.!
  1296. Xthen
  1297. X    set `cat $INPUTB.!`
  1298. X    echo "a $1 is running on history file $INPUT on process $2."
  1299. X    echo "if this is not true, please remove lock file \"$INPUTB.!\""
  1300. X    exit 2;
  1301. Xfi
  1302. Xecho "unput $$" >$INPUTB.!
  1303. X
  1304. Xtrap 'rm -f /tmp/unput.[abc]$$ '$INPUTB.!';chmod -w $HIST 2>/dev/null; exit 1' 1 2 3 15
  1305. Xget -1 -o /tmp/unput.a$$ $HIST             # get previous version
  1306. Xawk -F\^ <$HIST >/tmp/unput.b$$ '        # find all diffs but last
  1307. X    /^@@\^/ { count++
  1308. X         if(count==1)print "removed version", $2 >"/tmp/unput.c'$$'" }
  1309. X    count >= 2
  1310. X'
  1311. Xtrap '' 1 2 3 15                    # ignore signals
  1312. Xcat /tmp/unput.[ab]$$ >$HIST
  1313. Xcat /tmp/unput.c$$ 1>&2
  1314. Xrm -f /tmp/unput.[abc]$$ $INPUTB.!
  1315. Xchmod -w $HIST
  1316. END_OF_FILE
  1317.   if test 1308 -ne `wc -c <'unput'`; then
  1318.     echo shar: \"'unput'\" unpacked with wrong size!
  1319.   fi
  1320.   # end of 'unput'
  1321. fi
  1322. if test -f 'vcat' -a "${1}" != "-c" ; then 
  1323.   echo shar: Will not clobber existing file \"'vcat'\"
  1324. else
  1325.   echo shar: Extracting \"'vcat'\" \(1518 characters\)
  1326.   sed "s/^X//" >'vcat' <<'END_OF_FILE'
  1327. X#!/bin/sh
  1328. X# GAPS release 5.02 (revision 58)
  1329. X# get and put system - by Nadav Har'El
  1330. X# vcat 5.1: look at one version
  1331. X
  1332. XVERSION=0    # current version
  1333. XUSAGE="Usage: $0 [-<number version> or -v<named version> or -c] file"
  1334. XINPUT=
  1335. X
  1336. Xwhile test "$1" != ""
  1337. Xdo
  1338. X    case $1 in
  1339. X    -[0-9]|-[0-9][0-9]|-[0-9][0-9][0-9])
  1340. X        VERSION=$1;;         # 1-999 versions
  1341. X    -v*)    VERSION=$1;;
  1342. X    # print current version of file (the version that
  1343. X    # will be saved when calling put). useful for doing
  1344. X    # vdiff -c -0 file which prints the difference between
  1345. X    # file itself and the last saved version of file.
  1346. X    -c)    VERSION=$1;;
  1347. X    -*)    echo "vcat: unknown argument $1"
  1348. X        echo $USAGE 1>&2; exit 1;;
  1349. X    *)    INPUT=$1
  1350. X        case $INPUT in
  1351. X        *.H)    ;;
  1352. X        *)    INPUT=$INPUT.H ;;
  1353. X        esac ;;
  1354. X    esac
  1355. X    shift
  1356. Xdone
  1357. Xcase $INPUT in
  1358. X"")    echo $USAGE 1>&2; exit 1;;
  1359. Xesac
  1360. X
  1361. Xtest -r $INPUT -a -f $INPUT || { echo "vcat: can't open $INPUT" 1>&2; exit 1; }
  1362. X
  1363. Xcase $VERSION in
  1364. X-c)    cat  `expr $INPUT : '\(.*\).H'`
  1365. X    exit 0;;
  1366. X-v*)    VERSION=`ver "\`expr \"$VERSION\" : '^-v\(.*\)'\`" $INPUT` || exit 1;;
  1367. Xesac
  1368. X
  1369. Xtrap 'rm -f /tmp/vcat.[abc]$$;exit 0' 1 2 3 15
  1370. X# split into current version and editing command
  1371. X#    the following doesn't work
  1372. X#    sed <$INPUT -n '1,/^@@\^/w /tmp/vcat.a'$$'
  1373. X#    /^@@\^/,$w /tmp/vcat.b'$$
  1374. Xsed <$INPUT '/^@@\^/q' >/tmp/vcat.a$$
  1375. Xsed <$INPUT -n '/^@@\^/,$w /tmp/vcat.b'$$
  1376. X# preform the edits
  1377. Xawk </tmp/vcat.b$$ '
  1378. X    /^@@\^/ { count++ }
  1379. X    !/^@@\^/ && count > 0 && count <= - '$VERSION'
  1380. X    END { print "$d"; print "w", "/tmp/vcat.c'$$'" }
  1381. X' | ed - /tmp/vcat.a$$
  1382. Xcat /tmp/vcat.c$$
  1383. Xrm -f /tmp/vcat.[abc]$$
  1384. END_OF_FILE
  1385.   if test 1518 -ne `wc -c <'vcat'`; then
  1386.     echo shar: \"'vcat'\" unpacked with wrong size!
  1387.   fi
  1388.   # end of 'vcat'
  1389. fi
  1390. if test -f 'vdiff' -a "${1}" != "-c" ; then 
  1391.   echo shar: Will not clobber existing file \"'vdiff'\"
  1392. else
  1393.   echo shar: Extracting \"'vdiff'\" \(577 characters\)
  1394.   sed "s/^X//" >'vdiff' <<'END_OF_FILE'
  1395. X#!/bin/sh
  1396. X# GAPS release 5.02 (revision 58)
  1397. X# get and put system - by Nadav Har'El
  1398. X# vdiff 5.0: compare two versions in history
  1399. Xtrap 'rm -f /tmp/vcat[12].$$; exit 1' 1 2 3 15
  1400. Xcase $# in
  1401. X3)    case $3 in
  1402. X    *.H)    file=$3;;
  1403. X    *)    file=$3.H;;
  1404. X    esac;;
  1405. X1)    case $1 in
  1406. X    *.H)    file=$1;;
  1407. X    *)    file=$1.H;;
  1408. X    esac
  1409. X    set -- -0 -c;;
  1410. X*)    echo "Usage: vdiff version1 version2 file" 1>&2
  1411. X    rm -f /tmp/vcat[12].$$
  1412. X    exit 1;;
  1413. Xesac
  1414. Xvcat $1 $file >/tmp/vcat1.$$ || { rm -f /tmp/vcat[12].$$;exit 1; }
  1415. Xvcat $2 $file >/tmp/vcat2.$$ || { rm -f /tmp/vcat[12].$$;exit 1; }
  1416. Xdiff /tmp/vcat[12].$$
  1417. Xrm -f /tmp/vcat[12].$$
  1418. END_OF_FILE
  1419.   if test 577 -ne `wc -c <'vdiff'`; then
  1420.     echo shar: \"'vdiff'\" unpacked with wrong size!
  1421.   fi
  1422.   # end of 'vdiff'
  1423. fi
  1424. if test -f 'ver' -a "${1}" != "-c" ; then 
  1425.   echo shar: Will not clobber existing file \"'ver'\"
  1426. else
  1427.   echo shar: Extracting \"'ver'\" \(433 characters\)
  1428.   sed "s/^X//" >'ver' <<'END_OF_FILE'
  1429. X#!/bin/sh
  1430. X# GAPS release 5.02 (revision 58)
  1431. X# get and put system - by Nadav Har'El
  1432. X# ver 5.0: used in gaps programs for -v<named version> option
  1433. Xcase $2 in
  1434. X*.H)    file=$2;;
  1435. X*)    file=$2.H;;
  1436. Xesac
  1437. Xif test ! -r $file
  1438. Xthen
  1439. X    echo "Can't open $file" 1>&2
  1440. X    exit 1
  1441. Xfi
  1442. Xi=`grep "^@@\^" $file 2>/dev/null |
  1443. Xawk '{print NR-1 "^" $0}' | fgrep "^@@^$1^" | awk -F\^ '{print $1}'`
  1444. Xcase $i in
  1445. X"")    echo "No Version $1" 1>&2
  1446. X    exit 1;;
  1447. X*)    echo -"$i";;
  1448. Xesac
  1449. END_OF_FILE
  1450.   if test 433 -ne `wc -c <'ver'`; then
  1451.     echo shar: \"'ver'\" unpacked with wrong size!
  1452.   fi
  1453.   # end of 'ver'
  1454. fi
  1455. if test -f 'vls' -a "${1}" != "-c" ; then 
  1456.   echo shar: Will not clobber existing file \"'vls'\"
  1457. else
  1458.   echo shar: Extracting \"'vls'\" \(1005 characters\)
  1459.   sed "s/^X//" >'vls' <<'END_OF_FILE'
  1460. X#!/bin/sh
  1461. X# GAPS release 5.02 (revision 58)
  1462. X# get and put system - by Nadav Har'El
  1463. X# vls 5.0: list versions in history
  1464. X
  1465. XVERSION=-    # the version to stop on (- if to show all versions)
  1466. XXVERSION=
  1467. X
  1468. Xfor i
  1469. Xdo
  1470. X    case $i in
  1471. X    -[0-9]|-[0-9][0-9]|-[0-9][0-9][0-9])
  1472. X        XVERSION=; VERSION=$i; continue;;     # 1-999 versions
  1473. X    -a)    XVERSION=; VERSION=-; continue;;
  1474. X    -v*)    XVERSION=$i; continue;;
  1475. X    *.H)    ;;
  1476. X    *)    i=$i.H;;
  1477. X    esac
  1478. X    if test -r $i
  1479. X    then
  1480. X        # for each file we recalculate the numeric version from the
  1481. X        # named version
  1482. X        case $XVERSION in
  1483. X        -v*)    VERSION=`ver "\`expr \"$XVERSION\" : '^-v\(.*\)'\`" $i` || continue;;
  1484. X        esac
  1485. X
  1486. X        echo
  1487. X        echo "    $i:"
  1488. X        echo
  1489. X        if test x$VERSION = x-
  1490. X        then
  1491. X            grep "^@@\^" $i
  1492. X        else
  1493. X            grep "^@@\^" $i | awk "{ print; if(NR>(-($VERSION))) exit }"
  1494. X        fi |
  1495. X        awk -F\^ '
  1496. X        { printf "(-%d) Version: %s, Owner: %s, ",NR-1,$2,$3
  1497. X          printf "Date: %s",$4
  1498. X          printf "\nSummary: %s", $5
  1499. X          for(i=6;i<=NF;i++)
  1500. X            printf "\n         %s",$i
  1501. X          print "\n"
  1502. X        }'
  1503. X    else
  1504. X        echo "can't open $i" 1>&2
  1505. X    fi
  1506. Xdone
  1507. END_OF_FILE
  1508.   if test 1005 -ne `wc -c <'vls'`; then
  1509.     echo shar: \"'vls'\" unpacked with wrong size!
  1510.   fi
  1511.   # end of 'vls'
  1512. fi
  1513. echo shar: End of archive 1 \(of 1\).
  1514. cp /dev/null ark1isdone
  1515. MISSING=""
  1516. for I in 1 ; do
  1517.     if test ! -f ark${I}isdone ; then
  1518.     MISSING="${MISSING} ${I}"
  1519.     fi
  1520. done
  1521. if test "${MISSING}" = "" ; then
  1522.     echo You have the archive.
  1523.     rm -f ark[1-9]isdone
  1524. else
  1525.     echo You still must unpack the following archives:
  1526.     echo "        " ${MISSING}
  1527. fi
  1528. exit 0
  1529. exit 0 # Just in case...
  1530.