home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.unix
- From: ram@eiffel.com (Raphael Manfredi)
- Subject: v26i011: kit - the ultimate mailing kit, Patch14
- Sender: unix-sources-moderator@pa.dec.com
- Approved: vixie@pa.dec.com
-
- Submitted-By: ram@eiffel.com (Raphael Manfredi)
- Posting-Number: Volume 26, Issue 11
- Archive-Name: kit/pch14
-
-
- [The latest patch for kit version 2.0 is #14.]
-
- System: kit version 2.0
- Patch #: 14
- Priority: MEDIUM
- Subject: addresses in README updated
- Subject: fixed some loose declarations
- Subject: fixed a typo in makeshar.SH
- Subject: determination of user name made more portable
- Subject: a missing quote led to a syntactically incorrect archive
- Date: Tue Mar 24 13:46:34 PST 1992
- From: Raphael Manfredi <ram@eiffel.com>
-
- Description:
- This patch has a low priority if you use 'cshar' for archive
- packing. Otherwise, there is a severe bug in rshar.SH which
- prevented it from actually working.
-
- Addresses in README updated (credits section).
-
- Fixed some loose declarations in badtar.c.
-
- Fixed a typo in makeshar.SH. In case an incorrect option
- was found, the error report was not accurrate.
-
- Determination of user name made more portable. If logname is
- not available (e.g. on BSD systems), whoami is used instead.
-
- A missing quote in rshar.SH led to a syntactically incorrect
- archive. The generated test for file length was not properly
- terminated by a 'fi'. This bug was reported by Gurvan Lullien
- <lullien@inf.enst.fr>.
-
- Fix: From rn, say "| patch -p -N -d DIR", where DIR is your kit source
- directory. Outside of rn, say "cd DIR; patch -p -N <thisarticle".
- If you don't have the patch program, apply the following by hand,
- or get patch (version 2.0, latest patchlevel).
-
- After patching:
- Configure -d
- make
- make install
-
- If patch indicates that patchlevel is the wrong version, you may need
- to apply one or more previous patches, or the patch may already
- have been applied. See the patchlevel.h file to find out what has or
- has not been applied. In any event, don't continue with the patch.
-
- If you are missing previous patches they can be obtained from me:
-
- Raphael Manfredi <ram@eiffel.com>
-
- If you send a mail message of the following form it will greatly speed
- processing:
-
- Subject: Command
- @SH mailpatch PATH kit 2.0 LIST
- ^ note the c
-
- where PATH is a return path FROM ME TO YOU either in Internet notation,
- or in bang notation from some well-known host, and LIST is the number
- of one or more patches you need, separated by spaces, commas, and/or
- hyphens. Saying 35- says everything from 35 to the end.
-
- To get some more detailed instructions, send me the following mail:
-
- Subject: Command
- @SH mailhelp PATH
-
-
- Index: patchlevel.h
- Prereq: 13
- 2c2
- < #define PATCHLEVEL 13
- ---
- > #define PATCHLEVEL 14
-
- Index: badtar/badtar.c
- Prereq: 2.0.1.1
- *** badtar/badtar.c.old Tue Mar 24 13:46:23 1992
- --- badtar/badtar.c Tue Mar 24 13:46:23 1992
- ***************
- *** 1,9 ****
- /*
- * I got that from net.sources and extended it -- RAM
- *
- ! * $Id: badtar.c,v 2.0.1.1 92/01/11 19:12:45 ram Exp $
- *
- * $Log: badtar.c,v $
- * Revision 2.0.1.1 92/01/11 19:12:45 ram
- * patch11: created
- *
- --- 1,12 ----
- /*
- * I got that from net.sources and extended it -- RAM
- *
- ! * $Id: badtar.c,v 2.0.1.2 92/03/24 13:37:13 ram Exp $
- *
- * $Log: badtar.c,v $
- + * Revision 2.0.1.2 92/03/24 13:37:13 ram
- + * patch14: fixed some loose declarations
- + *
- * Revision 2.0.1.1 92/01/11 19:12:45 ram
- * patch11: created
- *
- ***************
- *** 50,56 ****
- char pad[TBLOCK];
-
- /* Print usage */
- ! usage()
- {
- fprintf(stderr,
- "Usage: badtar [-hiorsvV] [-l logfile] [-f tape drive] [-u uid] [-g gid]\n");
- --- 53,59 ----
- char pad[TBLOCK];
-
- /* Print usage */
- ! void usage()
- {
- fprintf(stderr,
- "Usage: badtar [-hiorsvV] [-l logfile] [-f tape drive] [-u uid] [-g gid]\n");
- ***************
- *** 69,75 ****
- }
-
- /* Print version number */
- ! version()
- {
- fprintf(stderr, "badtar %.1f PL%d\n", VERSION, PATCHLEVEL);
- fprintf(stderr, "(version modified by Raphael Manfredi, as part of kit)\n");
- --- 72,78 ----
- }
-
- /* Print version number */
- ! void version()
- {
- fprintf(stderr, "badtar %.1f PL%d\n", VERSION, PATCHLEVEL);
- fprintf(stderr, "(version modified by Raphael Manfredi, as part of kit)\n");
- ***************
- *** 76,82 ****
- }
-
- /* check the check sum for the header block */
- ! check_sum(c)
- union hblock *c;
- {
- int i,j;
- --- 79,85 ----
- }
-
- /* check the check sum for the header block */
- ! int check_sum(c)
- union hblock *c;
- {
- int i,j;
- ***************
- *** 155,161 ****
- main(argc, argv)
- char **argv;
- {
- ! int i, size, chksum, fblocks, eot_block;
- int user = -1; /* UID to be forced */
- int group = -1; /* GID to be forced */
- union hblock *hp; /* To decipher headers */
- --- 158,166 ----
- main(argc, argv)
- char **argv;
- {
- ! int i, size, chksum;
- ! int fblocks = 0; /* Tape blocks used by file */
- ! int eot_block = 0; /* Number of EOT blocks found */
- int user = -1; /* UID to be forced */
- int group = -1; /* GID to be forced */
- union hblock *hp; /* To decipher headers */
-
- Index: shar/rshar.SH
- Prereq: 2.0.1.2
- *** shar/rshar.SH.old Tue Mar 24 13:46:29 1992
- --- shar/rshar.SH Tue Mar 24 13:46:30 1992
- ***************
- *** 17,25 ****
- $startsh
- # (c) Raphael Manfredi, December 25th 1991
-
- ! # $Id: rshar.SH,v 2.0.1.2 92/01/13 14:26:20 ram Exp $
- #
- # $Log: rshar.SH,v $
- # Revision 2.0.1.2 92/01/13 14:26:20 ram
- # patch13: fixed option parsing code
- # patch13: the archive extraction now returns meaningful exit code
- --- 17,29 ----
- $startsh
- # (c) Raphael Manfredi, December 25th 1991
-
- ! # $Id: rshar.SH,v 2.0.1.3 92/03/24 13:46:04 ram Exp $
- #
- # $Log: rshar.SH,v $
- + # Revision 2.0.1.3 92/03/24 13:46:04 ram
- + # patch14: determination of user name made more portable
- + # patch14: a missing quote led to a syntactically incorrect archive
- + #
- # Revision 2.0.1.2 92/01/13 14:26:20 ram
- # patch13: fixed option parsing code
- # patch13: the archive extraction now returns meaningful exit code
- ***************
- *** 66,77 ****
- esac
- done
-
- echo '#! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c"
- #
- ! # Wrapped by <'`logname`@`(uname -n || hostname) 2>/dev/null`'> on '`date`
- echo '#
- # This archive contains:'
- echo $@ | tr ' ' '\012' | sed -e 's/^/# /'
- --- 70,85 ----
- esac
- done
-
- + # Who and where am I? -- white space between '(' is needed in case ksh is used
- + user=`( (logname) || whoami) 2>/dev/null`
- + host=`( (uname -n) || hostname) 2>/dev/null`
- +
- echo '#! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c"
- #
- ! # Wrapped by <'$user@$host'> on '`date`
- echo '#
- # This archive contains:'
- echo $@ | tr ' ' '\012' | sed -e 's/^/# /'
- ***************
- *** 106,112 ****
- # verify length
- echo " if test $size -ne \`wc -c < '$i'\`; then"
- echo " echo \"shar: '$i' unpacked with wrong size!\""
- ! echo " exitcode=1
- echo " fi"
- echo " # end of '$i'"
- echo "fi"
- --- 114,120 ----
- # verify length
- echo " if test $size -ne \`wc -c < '$i'\`; then"
- echo " echo \"shar: '$i' unpacked with wrong size!\""
- ! echo " exitcode=1"
- echo " fi"
- echo " # end of '$i'"
- echo "fi"
-
- Index: README
- *** README.old Tue Mar 24 13:46:17 1992
- --- README Tue Mar 24 13:46:18 1992
- ***************
- *** 83,95 ****
- I would like to thank:
- Gary Casterline <casterln@are.berkeley.edu>
- Michael Fischer <fischer-michael@cs.yale.edu>
- ! Monty Solomon <monty@bu.edu>
- for their bug reports and comments.
-
- The criticism of Tim Kuehn <timk@wynnds.xenitec.on.ca> was also much
- appreciated.
-
- ! I am especially grateful to Jaap Vermeulen <jaap@sequent.com> for his
- ! critical bug reports and suggestions.
-
- Raphael Manfredi <ram@eiffel.com>
- --- 83,97 ----
- I would like to thank:
- Gary Casterline <casterln@are.berkeley.edu>
- Michael Fischer <fischer-michael@cs.yale.edu>
- ! Gurvan Lullien <lullien@inf.enst.fr>
- ! Monty Solomon <roscom!monty@think.com>
- for their bug reports and comments.
-
- The criticism of Tim Kuehn <timk@wynnds.xenitec.on.ca> was also much
- appreciated.
-
- ! I am especially grateful to Jaap Vermeulen <jaap@sequent.com> and to
- ! David Wright <dmw@prism1.com> for their critical bug reports and
- ! suggestions.
-
- Raphael Manfredi <ram@eiffel.com>
-
- Index: shar/makeshar.SH
- Prereq: 2.0.1.2
- *** shar/makeshar.SH.old Tue Mar 24 13:46:26 1992
- --- shar/makeshar.SH Tue Mar 24 13:46:27 1992
- ***************
- *** 17,25 ****
- $startsh
- # (c) Raphael Manfredi, December 25th 1991
-
- ! # $Id: makeshar.SH,v 2.0.1.2 92/01/13 14:22:25 ram Exp $
- #
- # $Log: makeshar.SH,v $
- # Revision 2.0.1.2 92/01/13 14:22:25 ram
- # patch13: fixed option parsing code
- # patch13: protected arguments given to rshar
- --- 17,28 ----
- $startsh
- # (c) Raphael Manfredi, December 25th 1991
-
- ! # $Id: makeshar.SH,v 2.0.1.3 92/03/24 13:37:34 ram Exp $
- #
- # $Log: makeshar.SH,v $
- + # Revision 2.0.1.3 92/03/24 13:37:34 ram
- + # patch14: fixed a typo
- + #
- # Revision 2.0.1.2 92/01/13 14:22:25 ram
- # patch13: fixed option parsing code
- # patch13: protected arguments given to rshar
- ***************
- *** 50,56 ****
- partname="$1"
- shift
- ;;
- ! -*) echo "unknown option $i"
- exit 1
- ;;
- --) shift
- --- 53,59 ----
- partname="$1"
- shift
- ;;
- ! -*) echo "unknown option $1"
- exit 1
- ;;
- --) shift
-
- *** End of Patch 14 ***
-