home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / unix / volume26 / kit / pch18 < prev    next >
Encoding:
Text File  |  1993-05-04  |  22.0 KB  |  739 lines

  1. Newsgroups: comp.sources.unix
  2. From: ram@acri.fr (Raphael Manfredi)
  3. Subject: v26i230: kit - the ultimate mailing kit, Patch18
  4. Sender: unix-sources-moderator@efficacy.home.vix.com
  5. Approved: WhoAmI@efficacy.home.vix.com
  6.  
  7. Submitted-By: ram@acri.fr (Raphael Manfredi)
  8. Posting-Number: Volume 26, Issue 230
  9. Archive-Name: kit/pch18
  10.  
  11. [The latest patch for kit version 2.0 is #28.]
  12.  
  13. System: kit version 2.0
  14. Patch #: 18
  15. Priority: LOW
  16. Subject: badtar now correctly reports links
  17. Subject: recipient file was wrongly reported as missing
  18. Subject: instruction message now saved in case of error
  19. Subject: mailkit attempts to retrieve saved instructions if any
  20. Subject: new -k option, added by Steve Tynor <fugue!tynor@gatech.edu>
  21. Subject: do not start unkiting until all parts are here (Jaap Vermulen)
  22. Subject: unkit can now deal with files holding multiple kit parts
  23. Subject: now return a meaningful exit status
  24. Subject: documents new -k option for unkit
  25. Subject: unkit can now deal with multiple kit parts in a single file
  26. Subject: (the previous feature was suggested by Bertrand Meyer)
  27. Date: Mon Aug 17 18:01:35 PDT 1992
  28. From: Raphael Manfredi <ram@eiffel.com>
  29.  
  30. Description:
  31.     Badtar now correctly reports links. That is, 'badtar -v' will
  32.     correctly report the link and the file it is linked to. Of course,
  33.     this has nothing to do with kit, but badtar is part of the package
  34.     and so it makes it way through the patch.
  35.  
  36.     The recipient file was wrongly reported as missing when -l option
  37.     was used in mailkit. I inadvertantly quoted "$recipient" and the
  38.     variable contains a trailing space character...
  39.  
  40.     The instruction message now saved in case of error, and mailkit
  41.     will attempt to retrieve it if re-issued on the same package later on.
  42.  
  43.     New -k option for unkit, added by Steve Tynor <fugue!tynor@gatech.edu>.
  44.  
  45.     Do not start unkiting until all parts are here (Jaap Vermulen). This
  46.     enables you to start unkiting the parts for a given package as soon
  47.     as they arrive. Unkit will stop after the unsharing step and will not
  48.     go further until all the parts are there.
  49.  
  50.     Unkit can now deal with files holding multiple kit parts. That is to
  51.     say, you may save all the kit files for a single package in one folder
  52.     and then run unkit on that folder. If you do mix kit parts between
  53.     packages, this will not work properly, but that's better than nothing.
  54.     This feature has been requested by Bertrand Meyer <bertrand@eiffel.com>.
  55.  
  56.     Unkit will now return a meaningful exit status.
  57.  
  58.     The manual page was updated to reflect those changes.
  59.  
  60.  
  61. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your kit source
  62.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  63.     If you don't have the patch program, apply the following by hand,
  64.     or get patch (version 2.0, latest patchlevel).
  65.  
  66.     After patching:
  67.         Configure -d    # To update version information in config.sh
  68.         make
  69.         make install
  70.  
  71.     If patch indicates that patchlevel is the wrong version, you may need
  72.     to apply one or more previous patches, or the patch may already
  73.     have been applied.  See the patchlevel.h file to find out what has or
  74.     has not been applied.  In any event, don't continue with the patch.
  75.  
  76.     If you are missing previous patches they can be obtained from me:
  77.  
  78.         Raphael Manfredi <ram@eiffel.com>
  79.  
  80.     If you send a mail message of the following form it will greatly speed
  81.     processing:
  82.  
  83.         Subject: Command
  84.         @SH mailpatch PATH kit 2.0 LIST
  85.                ^ note the c
  86.  
  87.     where PATH is a return path FROM ME TO YOU either in Internet notation,
  88.     or in bang notation from some well-known host, and LIST is the number
  89.     of one or more patches you need, separated by spaces, commas, and/or
  90.     hyphens.  Saying 35- says everything from 35 to the end.
  91.  
  92.     To get some more detailed instructions, send me the following mail:
  93.  
  94.         Subject: Command
  95.         @SH mailhelp PATH
  96.  
  97.  
  98. Index: patchlevel.h
  99. Prereq: 17
  100. 2c2
  101. < #define PATCHLEVEL 17
  102. ---
  103. > #define PATCHLEVEL 18
  104.  
  105. Index: kit/unkit.SH
  106. Prereq: 2.0.1.10
  107. *** kit/unkit.SH.old    Mon Aug 17 18:01:28 1992
  108. --- kit/unkit.SH    Mon Aug 17 18:01:29 1992
  109. ***************
  110. *** 19,27 ****
  111.   # @(#) (c) E. Mogenet April 1990
  112.   # @(#) (c) R. Manfredi, 1990 1991
  113.   
  114. ! # $Id: unkit.SH,v 2.0.1.10 92/04/20 17:39:08 ram Exp $
  115.   #
  116.   # $Log:    unkit.SH,v $
  117.   # Revision 2.0.1.10  92/04/20  17:39:08  ram
  118.   # patch15: added support for acknowledgment
  119.   # 
  120. --- 19,33 ----
  121.   # @(#) (c) E. Mogenet April 1990
  122.   # @(#) (c) R. Manfredi, 1990 1991
  123.   
  124. ! # $Id: unkit.SH,v 2.0.1.11 92/08/17 17:59:42 ram Exp $
  125.   #
  126.   # $Log:    unkit.SH,v $
  127. + # Revision 2.0.1.11  92/08/17  17:59:42  ram
  128. + # patch18: new -k option, added by Steve Tynor <fugue!tynor@gatech.edu>
  129. + # patch18: do not start unkiting until all parts are here (Jaap Vermulen)
  130. + # patch18: unkit can now deal with files holding multiple kit parts
  131. + # patch18: now return a meaningful exit status
  132. + # 
  133.   # Revision 2.0.1.10  92/04/20  17:39:08  ram
  134.   # patch15: added support for acknowledgment
  135.   # 
  136. ***************
  137. *** 98,113 ****
  138.   decoding=hexdecode            # Default decoding program
  139.   preserve=yes                # Preserve input files by default
  140.   usebtar=''                    # Do not use badtar
  141.   
  142.   # In case we are interrupted, remove all the temporary files
  143.   trap 'test -f zzz.minikit && rm -f `cat zzz.minikit` zzz.minikit; \
  144. !     rm -f z??.[hb][ea]*.??;  echo >&2 "Aborted."; exit 1' 1 2 3 15
  145.   
  146.   # Old Bourne shells do not have functions
  147.   usage='
  148. ! echo "Usage: unkit [-bhlprV] [file1 ... filen]";
  149.   echo " "" -b : force use of badtar ($badtar by default).";
  150.   echo " "" -h : give this help message.";
  151.   echo " "" -l : list the contents of a the kit files.";
  152.   echo " "" -p : preserve input files (default).";
  153.   echo " "" -r : remove input files if unshar succeeds.";
  154. --- 104,121 ----
  155.   decoding=hexdecode            # Default decoding program
  156.   preserve=yes                # Preserve input files by default
  157.   usebtar=''                    # Do not use badtar
  158. + key=''                        # Key for DES decoding
  159.   
  160.   # In case we are interrupted, remove all the temporary files
  161.   trap 'test -f zzz.minikit && rm -f `cat zzz.minikit` zzz.minikit; \
  162. !     rm -f z??.[hbtx][eamt]*;  echo >&2 "Aborted."; exit 1' 1 2 3 15
  163.   
  164.   # Old Bourne shells do not have functions
  165.   usage='
  166. ! echo "Usage: unkit [-bhlprV] [-k key] [file1 ... filen]";
  167.   echo " "" -b : force use of badtar ($badtar by default).";
  168.   echo " "" -h : give this help message.";
  169. + echo " "" -k : sets the key used for data decryption.";
  170.   echo " "" -l : list the contents of a the kit files.";
  171.   echo " "" -p : preserve input files (default).";
  172.   echo " "" -r : remove input files if unshar succeeds.";
  173. ***************
  174. *** 134,143 ****
  175.           shift;;
  176.       -b) usebtar='true'
  177.           shift;;
  178.       --) shift
  179.           break
  180.           ;;
  181. !     -*) echo "Unknown option $i"
  182.           eval $usage;;
  183.       *) break;;
  184.       esac
  185. --- 142,154 ----
  186.           shift;;
  187.       -b) usebtar='true'
  188.           shift;;
  189. +     -k) key="-k $2"
  190. +         shift
  191. +         shift;;
  192.       --) shift
  193.           break
  194.           ;;
  195. !     -*) echo "unknown option $1"
  196.           eval $usage;;
  197.       *) break;;
  198.       esac
  199. ***************
  200. *** 162,167 ****
  201. --- 173,237 ----
  202.   then
  203.       eval $unshar_cmd
  204.   else
  205. +     # More than one kit part can be held in the files given as argument.
  206. +     # Loop over each of the supplied arguments and extract parts based on
  207. +     # the leading #!/bin/sh put by the shell archiver.
  208. +     list=''
  209. +     count=0
  210. +     for file in $*; do
  211. +         num=`awk '
  212. +         BEGIN { a = 0; file = "zag.tmp" }
  213. +         /^#![     ]*\/bin\/sh/ {
  214. +             a++;
  215. +             file = sprintf("zag.tmp.%d", a);
  216. +             print > file;
  217. +             next;
  218. +         }
  219. +         { print >> file }
  220. +         END { printf("%d\n", a) }
  221. +         ' $file`
  222. +         name=''
  223. +         case "$num" in
  224. +         0)
  225. +             rm -f zag.tmp
  226. +             echo "unkit: warning: no kit part in $file (skipped)." >&2
  227. +             ;;
  228. +         1)
  229. +             rm -f zag.tmp.1
  230. +             echo "unkit: one kit part found in $file."
  231. +             name=$file
  232. +             ;;
  233. +         *)
  234. +             echo "unkit: $num kit parts found in $file." >&2
  235. +             # Each part is renamed into a zag.xtr.* file to free the name
  236. +             # space for the next file (each awk extracts into zag.tmp.*).
  237. +             for part in zag.tmp.*; do
  238. +                 count=`expr $count + 1`
  239. +                 new="zag.xtr.$count"
  240. +                 mv $part $new
  241. +                 name="$name $new"
  242. +             done
  243. +             ;;
  244. +         esac
  245. +         list="$list $name"
  246. +     done
  247. +     set X $list
  248. +     shift
  249. +     case $# in
  250. +     1) ;;
  251. +     *)
  252. +         case "$count" in
  253. +         0)
  254. +             echo "unkit: found a total of $# kit parts." >&2;;
  255. +         *)
  256. +             echo "unkit: found $# kit parts ($count parts extracted)." >&2;;
  257. +         esac
  258. +         ;;
  259. +     esac
  260. +     # Loop over each identified kir part and unshar it
  261.       for i
  262.       do
  263.           # The command expects "$a" to be the parameter
  264. ***************
  265. *** 168,177 ****
  266.           eval "a=$i; $unshar_cmd"    &&
  267.           (test $preserve = no && rm $i)
  268.       done
  269.   fi
  270.   
  271.   # Now check for file names to find how to decode
  272. ! if test -f z[ace][gbc].ba.aa
  273.   then
  274.       decoding=atob
  275.   else
  276. --- 238,250 ----
  277.           eval "a=$i; $unshar_cmd"    &&
  278.           (test $preserve = no && rm $i)
  279.       done
  280. +     # Clean up extracted parts (save disk space before tar extraction)
  281. +     rm -f zag.[tx][mt]*
  282.   fi
  283.   
  284.   # Now check for file names to find how to decode
  285. ! if test -f z[ace][gbc].ba.aa -a ! -f ark*isdone
  286.   then
  287.       decoding=atob
  288.   else
  289. ***************
  290. *** 180,189 ****
  291.   fi
  292.   if test -f zcb.*.aa
  293.   then
  294. !     decoding=$decoding" | des -d"
  295.   elif test -f zec.*.aa
  296.   then
  297. !     decoding=$decoding" | des -d -b"
  298.   fi
  299.   
  300.   # Maybe we need badtar...
  301. --- 253,262 ----
  302.   fi
  303.   if test -f zcb.*.aa
  304.   then
  305. !     decoding=$decoding" | des -d $key"
  306.   elif test -f zec.*.aa
  307.   then
  308. !     decoding=$decoding" | des -d -b $key"
  309.   fi
  310.   
  311.   # Maybe we need badtar...
  312. ***************
  313. *** 210,216 ****
  314.       sender=`cat zzz.ack`
  315.       subject=`cat zzz.subject`
  316.       echo "Sending acknowledgment to $sender..."
  317. -     # There has to be a space between the two '(' for ksh.
  318.       user=`(logname) 2>/dev/null || whoami`
  319.       host=`(uname -n) 2>/dev/null || hostname 2>/dev/null`
  320.       date=`date`
  321. --- 283,288 ----
  322. ***************
  323. *** 228,233 ****
  324. --- 300,316 ----
  325.   
  326.   test -f zzz.minikit && rm -f `cat zzz.minikit` zzz.minikit
  327.   rm -f z??.[hb][ea]*.??
  328. + # Emit error message if extraction was not successful
  329. + case "$status" in
  330. + 0) ;;
  331. + *)
  332. +     echo "unkit: restoring failed." >&2
  333. +     ;;
  334. + esac
  335. + # Give a meaningful exit status
  336. + exit $status
  337.   !NO!SUBS!
  338.   chmod 755 unkit
  339.   $eunicefix unkit
  340.  
  341. Index: kit/mailkit.SH
  342. Prereq: 2.0.1.8
  343. *** kit/mailkit.SH.old    Mon Aug 17 18:01:24 1992
  344. --- kit/mailkit.SH    Mon Aug 17 18:01:25 1992
  345. ***************
  346. *** 18,26 ****
  347.   # @(#) Mailer for kit files
  348.   # @(#) (c) R. Manfredi, 1990 1991
  349.   
  350. ! # $Id: mailkit.SH,v 2.0.1.8 92/05/02 14:17:01 ram Exp $
  351.   #
  352.   # $Log:    mailkit.SH,v $
  353.   # Revision 2.0.1.8  92/05/02  14:17:01  ram
  354.   # patch16: there can now be multiple occurences of -l
  355.   # patch16: -p is now the default option unless -c is used
  356. --- 18,31 ----
  357.   # @(#) Mailer for kit files
  358.   # @(#) (c) R. Manfredi, 1990 1991
  359.   
  360. ! # $Id: mailkit.SH,v 2.0.1.9 92/08/17 17:55:16 ram Exp $
  361.   #
  362.   # $Log:    mailkit.SH,v $
  363. + # Revision 2.0.1.9  92/08/17  17:55:16  ram
  364. + # patch18: recipient file was wrongly reported as missing
  365. + # patch18: instruction message now saved in case of error
  366. + # patch18: mailkit attempts to retrieve saved instructions if any
  367. + # 
  368.   # Revision 2.0.1.8  92/05/02  14:17:01  ram
  369.   # patch16: there can now be multiple occurences of -l
  370.   # patch16: -p is now the default option unless -c is used
  371. ***************
  372. *** 86,91 ****
  373. --- 91,97 ----
  374.   partname='Kit'            # Default part's name
  375.   range='1-'                # Default range (all parts)
  376.   unsent=''                # Parts which could not be sent
  377. + error=''                # True when error occurred
  378.   
  379.   # Old Bourne shells do not have functions
  380.   usage='
  381. ***************
  382. *** 174,180 ****
  383.   
  384.   # When a recipient file is provided, ignore the remaining of the command line
  385.   if test "$recipients"; then
  386. !     if test -r "$recipients"; then
  387.           # The format of the file is simple: a list of addresses, one per
  388.           # line. Shell-style comments are allowed and multiple addresses on a
  389.           # single line may be separated with spaces or commas.
  390. --- 180,186 ----
  391.   
  392.   # When a recipient file is provided, ignore the remaining of the command line
  393.   if test "$recipients"; then
  394. !     if test -r $recipients; then
  395.           # The format of the file is simple: a list of addresses, one per
  396.           # line. Shell-style comments are allowed and multiple addresses on a
  397.           # single line may be separated with spaces or commas.
  398. ***************
  399. *** 212,217 ****
  400. --- 218,229 ----
  401.   # Count how many files there are
  402.   set X $partname??
  403.   shift
  404. + # Remove instructions or number of parts will be off by 1
  405. + case $1 in
  406. + "${partname}00") shift;;
  407. + esac
  408.   nfiles=$#
  409.   
  410.   if test $edit = yes
  411. ***************
  412. *** 236,242 ****
  413.   EOM
  414.       # If there is a part #0, append it before calling the editor
  415.       if test -f ${partname}00; then
  416. !         echo "mailkit: using previously unsent instructions..." >&2
  417.           sleep 2
  418.           cat ${partname}00 >>$message
  419.       fi
  420. --- 248,254 ----
  421.   EOM
  422.       # If there is a part #0, append it before calling the editor
  423.       if test -f ${partname}00; then
  424. !         echo "mailkit: using previously kept instructions..." >&2
  425.           sleep 2
  426.           cat ${partname}00 >>$message
  427.       fi
  428. ***************
  429. *** 317,322 ****
  430. --- 329,335 ----
  431.               test "$preserve" = no && rm -f $part
  432.           else
  433.               echo "mailkit: could not send $part." >&2
  434. +             error='true'
  435.               if test "$preserve" = no; then
  436.                   unsent="$unsent $part"
  437.               fi
  438. ***************
  439. *** 324,329 ****
  440. --- 337,343 ----
  441.           rm -f $topmsg
  442.       else
  443.           echo "mailkit: could not open $part" >&2
  444. +         error='true'
  445.       fi
  446.   done
  447.   
  448. ***************
  449. *** 342,357 ****
  450.       cat >>$topmsg <$message
  451.       echo "Mailing instructions..."
  452.       if ${MAILER:-$mailer} $address < $topmsg; then
  453. !         rm -f $topmsg $message ${partname}00
  454.       else
  455.           echo "mailkit: could not send instructions." >&2
  456. !         cp $message ${partname}00
  457. !         if test "$preserve" = no; then
  458. !             unsent="$unsent ${partname}00"
  459. !         else
  460. !             echo "mailkit: instruction message saved as ${partname}00." >&2
  461. !         fi
  462. !         rm -f $topmsg $message
  463.       fi
  464.   fi
  465.   
  466. --- 356,375 ----
  467.       cat >>$topmsg <$message
  468.       echo "Mailing instructions..."
  469.       if ${MAILER:-$mailer} $address < $topmsg; then
  470. !         rm -f $topmsg
  471.       else
  472.           echo "mailkit: could not send instructions." >&2
  473. !         error='true'
  474. !         rm -f $topmsg
  475. !     fi
  476. ! fi
  477. ! # Save instructions as part #0 in case of error
  478. ! if test "$error" -a -f $message; then
  479. !     cp $message ${partname}00 &&
  480. !     echo "mailkit: instruction message saved as ${partname}00." >&2
  481. !     if test $preserve = no; then
  482. !         unsent="$unsent ${partname}00"
  483.       fi
  484.   fi
  485.   
  486. ***************
  487. *** 368,379 ****
  488.           rm -f $unsent
  489.       fi
  490.   else
  491. !     if test -f ${partname}00; then
  492.           echo "mailkit: removing instructions held in ${partname}00." >&2
  493.           rm -f ${partname}00
  494.       fi
  495.   fi
  496.   
  497.   !NO!SUBS!
  498.   chmod 755 mailkit
  499.   $eunicefix mailkit
  500. --- 386,398 ----
  501.           rm -f $unsent
  502.       fi
  503.   else
  504. !     if test -f ${partname}00 -a ! "$error"; then
  505.           echo "mailkit: removing instructions held in ${partname}00." >&2
  506.           rm -f ${partname}00
  507.       fi
  508.   fi
  509.   
  510. + rm -f $message
  511.   !NO!SUBS!
  512.   chmod 755 mailkit
  513.   $eunicefix mailkit
  514.  
  515. Index: badtar/badtar.c
  516. Prereq: 2.0.1.2
  517. *** badtar/badtar.c.old    Mon Aug 17 18:01:20 1992
  518. --- badtar/badtar.c    Mon Aug 17 18:01:21 1992
  519. ***************
  520. *** 1,9 ****
  521.   /*
  522.    * I got that from net.sources and extended it -- RAM
  523.    *
  524. !  * $Id: badtar.c,v 2.0.1.2 92/03/24 13:37:13 ram Exp $
  525.    *
  526.    * $Log:    badtar.c,v $
  527.    * Revision 2.0.1.2  92/03/24  13:37:13  ram
  528.    * patch14: fixed some loose declarations
  529.    * 
  530. --- 1,12 ----
  531.   /*
  532.    * I got that from net.sources and extended it -- RAM
  533.    *
  534. !  * $Id: badtar.c,v 2.0.1.3 92/08/17 17:53:34 ram Exp $
  535.    *
  536.    * $Log:    badtar.c,v $
  537. +  * Revision 2.0.1.3  92/08/17  17:53:34  ram
  538. +  * patch18: badtar now correctly reports links
  539. +  * 
  540.    * Revision 2.0.1.2  92/03/24  13:37:13  ram
  541.    * patch14: fixed some loose declarations
  542.    * 
  543. ***************
  544. *** 28,33 ****
  545. --- 31,49 ----
  546.   #define BLOCKF        20                    /* Blocking factor */
  547.   #define TAPEBLOCK     (BLOCKF * TBLOCK)    /* Blocksize */
  548.   
  549. + /* Values used in linkflag field */
  550. + #define REGTYPE        '0'                    /* Regular file */
  551. + #define AREGTYPE    '\0'                /* Regular file */
  552. + #define LNKTYPE        '1'                    /* Regular link */
  553. + #define SYMTYPE        '2'                    /* Linkflag for symbolic link */
  554. + #define CHRTYPE        '3'                    /* Character special file */
  555. + #define BLKTYPE        '4'                    /* Block special file */
  556. + #define DIRTYPE        '5'                    /* Directory */
  557. + #define FIFOTYPE    '6'                    /* Named pipe */
  558. + #define CONTTYPE    '7'                    /* Reserved */
  559. + #define islink(c)    ((c) == LNKTYPE || (c) == SYMTYPE)
  560.   int verbose = 0;                    /* Verbose output control */
  561.   int silent = 0;                        /* Silent output control */
  562.   char *default_tape = TAPEDEV;        /* Default device tape file */
  563. ***************
  564. *** 337,348 ****
  565.           if (check_sum(hp) == chksum && hp->dbuf.name[0] != '\0') {
  566.   
  567.               if (verbose) {
  568.                   /* Write some informations about the header we've got */
  569.                   fprintf(logf, "*** Header found.\n");
  570.                   fprintf(logf, "***   Name: %s\n", hp->dbuf.name);
  571.                   fprintf(logf, "***   Size: %d\n", size);
  572.                   fprintf(logf, "***   Mode: %s\n", hp->dbuf.mode);
  573. !                 fprintf(logf, "***   Link flag: %c\n", hp->dbuf.linkflag);
  574.               }
  575.   
  576.               /* we have a header */
  577. --- 353,388 ----
  578.           if (check_sum(hp) == chksum && hp->dbuf.name[0] != '\0') {
  579.   
  580.               if (verbose) {
  581. +                 char *type_flag;
  582.                   /* Write some informations about the header we've got */
  583.                   fprintf(logf, "*** Header found.\n");
  584.                   fprintf(logf, "***   Name: %s\n", hp->dbuf.name);
  585.                   fprintf(logf, "***   Size: %d\n", size);
  586.                   fprintf(logf, "***   Mode: %s\n", hp->dbuf.mode);
  587. !                 switch (hp->dbuf.linkflag) {
  588. !                 case AREGTYPE:
  589. !                 case REGTYPE:
  590. !                     type_flag = "regular file"; break;
  591. !                 case LNKTYPE:
  592. !                     type_flag = "hard link"; break;
  593. !                 case SYMTYPE:
  594. !                     type_flag = "symbolic link"; break;
  595. !                 case CHRTYPE:
  596. !                     type_flag = "character special file"; break;
  597. !                 case BLKTYPE:
  598. !                     type_flag = "block special file"; break;
  599. !                 case DIRTYPE:
  600. !                     type_flag = "directory"; break;
  601. !                 case FIFOTYPE:
  602. !                     type_flag = "named pipe (FIFO)"; break;
  603. !                 case CONTTYPE:
  604. !                     type_flag = "RESERVED"; break;
  605. !                 default:
  606. !                     type_flag = "UNKNOWN"; break;
  607. !                 }
  608. !                 fprintf(logf, "***   Link flag: %s\n", type_flag);
  609. !                 if (islink(hp->dbuf.linkflag))
  610. !                     fprintf(logf, "***   Link name: %s\n", hp->dbuf.linkname);
  611.               }
  612.   
  613.               /* we have a header */
  614. ***************
  615. *** 362,374 ****
  616.               }
  617.   
  618.               /* Remove the leading '/' to get non absolute path */
  619. !             if (relative && hp->dbuf.name[0] == '/') {
  620. !                 sprintf(hp->dbuf.name, "%s", hp->dbuf.name + 1);
  621. !                 sprintf(hp->dbuf.chksum, "%o", check_sum(hp));
  622.               }
  623.   
  624.               /* Compute number of blocks used by the file */
  625.               fblocks = (size%TBLOCK) ? size/TBLOCK + 1 : size/TBLOCK;
  626.               lprintf(logf,"%s (%d bytes)\n", hp->dbuf.name, size);
  627.               nblock++, write(1, hp, TBLOCK);        /* Write the header */
  628.               continue;
  629. --- 402,421 ----
  630.               }
  631.   
  632.               /* Remove the leading '/' to get non absolute path */
  633. !             if (relative) {
  634. !                 if (hp->dbuf.name[0] == '/') {
  635. !                     sprintf(hp->dbuf.name, "%s", hp->dbuf.name + 1);
  636. !                     sprintf(hp->dbuf.chksum, "%o", check_sum(hp));
  637. !                 }
  638. !                 if (islink(hp->dbuf.linkflag) && hp->dbuf.linkname[0] == '/') {
  639. !                     sprintf(hp->dbuf.linkname, "%s", hp->dbuf.linkname + 1);
  640. !                     sprintf(hp->dbuf.chksum, "%o", check_sum(hp));
  641. !                 }
  642.               }
  643.   
  644.               /* Compute number of blocks used by the file */
  645.               fblocks = (size%TBLOCK) ? size/TBLOCK + 1 : size/TBLOCK;
  646. +             fblocks = islink(hp->dbuf.linkflag) ? 0 : fblocks;
  647.               lprintf(logf,"%s (%d bytes)\n", hp->dbuf.name, size);
  648.               nblock++, write(1, hp, TBLOCK);        /* Write the header */
  649.               continue;
  650.  
  651. Index: man/kit.SH
  652. Prereq: 2.0.1.9
  653. *** man/kit.SH.old    Mon Aug 17 18:01:32 1992
  654. --- man/kit.SH    Mon Aug 17 18:01:33 1992
  655. ***************
  656. *** 18,26 ****
  657.   .TH KIT $manext ram
  658.   ''' @(#) Manual page for mailing kit -- (c) ram July 1990
  659.   '''
  660. ! ''' $Id: kit.SH,v 2.0.1.9 92/05/02 14:19:05 ram Exp $
  661.   '''
  662.   ''' $Log:    kit.SH,v $
  663.   ''' Revision 2.0.1.9  92/05/02  14:19:05  ram
  664.   ''' patch16: documents new -r option for mailkit and -S for kit
  665.   ''' patch16: mailkit now supports multiple -l options
  666. --- 18,31 ----
  667.   .TH KIT $manext ram
  668.   ''' @(#) Manual page for mailing kit -- (c) ram July 1990
  669.   '''
  670. ! ''' $Id: kit.SH,v 2.0.1.10 92/08/17 18:01:16 ram Exp $
  671.   '''
  672.   ''' $Log:    kit.SH,v $
  673. + ''' Revision 2.0.1.10  92/08/17  18:01:16  ram
  674. + ''' patch18: documents new -k option for unkit
  675. + ''' patch18: unkit can now deal with multiple kit parts in a single file
  676. + ''' patch18: (the previous feature was suggested by Bertrand Meyer)
  677. + ''' 
  678.   ''' Revision 2.0.1.9  92/05/02  14:19:05  ram
  679.   ''' patch16: documents new -r option for mailkit and -S for kit
  680.   ''' patch16: mailkit now supports multiple -l options
  681. ***************
  682. *** 76,82 ****
  683.   \fBmailkit\fR [ \fB\-EFVcefhp\fR ] [ \fB\-l\fI file\fR ]
  684.   [ \fB\-n\fI partname\fR ] \fItitle\fR [ \fIaddress(es)\fR ]
  685.   .sp
  686. ! \fBunkit\fR [ \fB\-bhlprV\fR ] [ \fIfiles\fR ]
  687.   .SH DESCRIPTION
  688.   \fIKit\fR is the ultimate mailing tool. It enables you to mail
  689.   data without any consideration of possible escape sequences or
  690. --- 81,87 ----
  691.   \fBmailkit\fR [ \fB\-EFVcefhp\fR ] [ \fB\-l\fI file\fR ]
  692.   [ \fB\-n\fI partname\fR ] \fItitle\fR [ \fIaddress(es)\fR ]
  693.   .sp
  694. ! \fBunkit\fR [ \fB\-bhlprV\fR ] [ \fB\-k\fI key\fR ] [ \fIfiles\fR ]
  695.   .SH DESCRIPTION
  696.   \fIKit\fR is the ultimate mailing tool. It enables you to mail
  697.   data without any consideration of possible escape sequences or
  698. ***************
  699. *** 203,208 ****
  700. --- 208,219 ----
  701.   If no file name is given to \fIunkit\fR, the standard input is processed.
  702.   This is useful to process messages directly from a mail user agent.
  703.   .PP
  704. + You may save more than one kit part into a file and give that file as an
  705. + argument to \fIunkit\fR, which will then identify and extract the embeded
  706. + parts to process them. The program lists on the standard error the files
  707. + as they are processed and tells you how many kit parts it found within each
  708. + file.
  709. + .PP
  710.   Sometimes, \fItar\fR does not work well accross NFS and will fail restoring
  711.   ownership on files, even with the \-\fBo\fR option. If you chose to install
  712.   \fIbadtar\fR at configuration time, you may use \-\fBb\fR to instruct
  713. ***************
  714. *** 215,220 ****
  715. --- 226,235 ----
  716.   ignored. You may also use \fIunkit\fR in place of \fIunshar\fR: it will
  717.   stop after having unpacked the shell archives if it does not detect any
  718.   kit file.
  719. + .PP
  720. + When unpacking crypted archives, the \fB\-k\fR option may be used to
  721. + specify the key to be used by DES. If you do not supply it, DES will
  722. + prompt you on the terminal.
  723.   .PP
  724.   For all of these commands, option \fB\-V\fR prints the version
  725.   number with the current patch level and exits, while \fB\-h\fR gives
  726.  
  727. *** End of Patch 18 ***
  728.