home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.unix
- From: ram@acri.fr (Raphael Manfredi)
- Subject: v26i226: kit - the ultimate mailing kit, Patch23
- Sender: unix-sources-moderator@efficacy.home.vix.com
- Approved: WhoAmI@efficacy.home.vix.com
-
- Submitted-By: ram@acri.fr (Raphael Manfredi)
- Posting-Number: Volume 26, Issue 226
- Archive-Name: kit/pch23
-
- [The latest patch for kit version 2.0 is #28.]
-
- System: kit version 2.0
- Patch #: 23
- Priority: CRITICAL
- Subject: take care of '-n' on BSD systems (meaningful to echo)
- Date: Fri Jan 22 12:11:04 PST 1993
- From: Raphael Manfredi <ram@eiffel.com>
-
- Description:
- Take care of '-n' on BSD systems (meaningful to echo). Mailkit was
- unable to work properly on systems like SUN-OS, when the '-n' is
- interpreted by various "echo" calls as a directive to suppress the
- final new-line. The unwanted side effect being that this '-n' is
- removed from the output stream...
-
- Repeat-By:
-
- When using 'kit -m someone file', mailkit would try to send the kit
- to a '-c' user...
-
- 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: 22
- 2c2
- < #define PATCHLEVEL 22
- ---
- > #define PATCHLEVEL 23
-
- Index: kit/getopt.SH
- Prereq: 2.0.1.1
- *** kit/getopt.SH.old Fri Jan 22 12:11:02 1993
- --- kit/getopt.SH Fri Jan 22 12:11:02 1993
- ***************
- *** 29,37 ****
- # any optional '--' split up, for instance '-lfoo' becomes '-l foo' if l: is
- # given in optstr, and '-lf' becomes '-l -f' if only lf is given as optstr.
-
- ! # $Id: getopt.SH,v 2.0.1.1 93/01/11 18:04:27 ram Exp $
- #
- # $Log: getopt.SH,v $
- # Revision 2.0.1.1 93/01/11 18:04:27 ram
- # patch22: created
- #
- --- 29,40 ----
- # any optional '--' split up, for instance '-lfoo' becomes '-l foo' if l: is
- # given in optstr, and '-lf' becomes '-l -f' if only lf is given as optstr.
-
- ! # $Id: getopt.SH,v 2.0.1.2 93/01/22 12:10:59 ram Exp $
- #
- # $Log: getopt.SH,v $
- + # Revision 2.0.1.2 93/01/22 12:10:59 ram
- + # patch23: take care of '-n' on BSD systems (meaningful to echo)
- + #
- # Revision 2.0.1.1 93/01/11 18:04:27 ram
- # patch22: created
- #
- ***************
- *** 39,46 ****
- # Options specification (getopt style)
- optstr=$1; shift
-
- ! # Process the command line options
- ! set X `for arg in "$@"; do echo $arg; done | awk '
- BEGIN {
- optstr = "'$optstr'"; # getopt-style specification
-
- --- 42,50 ----
- # Options specification (getopt style)
- optstr=$1; shift
-
- ! # Process the command line options. Add a leading 'x' to each argument, in case
- ! # one of them is a '-n' and we are on a BSD system...
- ! set X `for arg in "$@"; do echo x$arg; done | awk '
- BEGIN {
- optstr = "'$optstr'"; # getopt-style specification
-
- ***************
- *** 57,63 ****
- }
- {
- expect = 0;
- ! str = $0;
- if (str == "--")
- ended = 1;
- if (ended || substr(str, 1, 1) != "-") {
- --- 61,68 ----
- }
- {
- expect = 0;
- ! xstr = $0;
- ! str = substr(xstr, 2);
- if (str == "--")
- ended = 1;
- if (ended || substr(str, 1, 1) != "-") {
- ***************
- *** 64,70 ****
- printf("'"'%s'"'\n", str);
- next;
- }
- ! len = length($0);
- for (i = 2; i <= len; i++) {
- c = substr(str, i, 1);
- if (!opt[c]) {
- --- 69,75 ----
- printf("'"'%s'"'\n", str);
- next;
- }
- ! len = length(str);
- for (i = 2; i <= len; i++) {
- c = substr(str, i, 1);
- if (!opt[c]) {
- ***************
- *** 86,93 ****
- print "?";
- }
- '`
- shift
- ! echo $@
- !NO!SUBS!
- chmod 755 getopt
- $eunicefix getopt
- --- 91,99 ----
- print "?";
- }
- '`
- + # Avoid 'echo $@' in case first option is -n on a BSD system...
- shift
- ! echo " "$@
- !NO!SUBS!
- chmod 755 getopt
- $eunicefix getopt
-
- *** End of Patch 23 ***
-