home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.unix
- From: ram@acri.fr (Raphael Manfredi)
- Subject: v26i225: kit - the ultimate mailing kit, Patch21
- 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 225
- Archive-Name: kit/pch21
-
- [The latest patch for kit version 2.0 is #28.]
-
- System: kit version 2.0
- Patch #: 21
- Priority: HIGH
- Subject: option parsing can now deal with embeded spaces in arguments
- Date: Tue Nov 3 10:13:00 PST 1992
- From: Raphael Manfredi <ram@eiffel.com>
-
- Description:
- Option parsing can now deal with embeded spaces in arguments.
-
- Repeat-By:
- kit -s 'some subject with spaces' dir
-
- 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
-
- 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: 20
- 2c2
- < #define PATCHLEVEL 20
- ---
- > #define PATCHLEVEL 21
-
- Index: kit/mailkit.SH
- Prereq: 2.0.1.10
- *** kit/mailkit.SH.old Tue Nov 3 10:12:53 1992
- --- kit/mailkit.SH Tue Nov 3 10:12:54 1992
- ***************
- *** 18,26 ****
- # @(#) Mailer for kit files
- # @(#) (c) R. Manfredi, 1990 1991
-
- ! # $Id: mailkit.SH,v 2.0.1.10 92/11/01 15:08:10 ram Exp $
- #
- # $Log: mailkit.SH,v $
- # Revision 2.0.1.10 92/11/01 15:08:10 ram
- # patch20: added getopt-style option parsing
- #
- --- 18,29 ----
- # @(#) Mailer for kit files
- # @(#) (c) R. Manfredi, 1990 1991
-
- ! # $Id: mailkit.SH,v 2.0.1.11 92/11/03 10:12:40 ram Exp $
- #
- # $Log: mailkit.SH,v $
- + # Revision 2.0.1.11 92/11/03 10:12:40 ram
- + # patch21: option parsing can now deal with embeded spaces in arguments
- + #
- # Revision 2.0.1.10 92/11/01 15:08:10 ram
- # patch20: added getopt-style option parsing
- #
- ***************
- *** 124,130 ****
- '
-
- # Process the command line options
- ! set X `for arg in $*; do echo $arg; done | awk '
- BEGIN {
- optstr = "EFVcefhpn:l:r:"; # getopt-style specification
-
- --- 127,133 ----
- '
-
- # Process the command line options
- ! set X `for arg in "$@"; do echo $arg; done | awk '
- BEGIN {
- optstr = "EFVcefhpn:l:r:"; # getopt-style specification
-
- ***************
- *** 143,149 ****
- expect = 0;
- str = $0;
- if (substr(str, 1, 1) != "-") {
- ! print str;
- next;
- }
- len = length($0);
- --- 146,152 ----
- expect = 0;
- str = $0;
- if (substr(str, 1, 1) != "-") {
- ! printf("'"'%s'"'\n", str);
- next;
- }
- len = length($0);
- ***************
- *** 150,162 ****
- for (i = 2; i <= len; i++) {
- c = substr(str, i, 1);
- if (!opt[c]) {
- ! print sprintf("-%s", substr(str, i));
- next;
- }
- ! print sprintf("-%s", c);
- if (arg[c]) {
- if (i < len)
- ! print substr(str, i + 1);
- else
- expect = 1;
- next;
- --- 153,165 ----
- for (i = 2; i <= len; i++) {
- c = substr(str, i, 1);
- if (!opt[c]) {
- ! printf("-%s\n", substr(str, i));
- next;
- }
- ! printf("-%s\n", c);
- if (arg[c]) {
- if (i < len)
- ! printf("'"'%s'"'\n", substr(str, i + 1));
- else
- expect = 1;
- next;
- ***************
- *** 168,173 ****
- --- 171,177 ----
- print "?";
- }
- '`
- + eval "set $*"
- shift
-
- # Argument parsing
-
- Index: kit/unkit.SH
- Prereq: 2.0.1.13
- *** kit/unkit.SH.old Tue Nov 3 10:12:58 1992
- --- kit/unkit.SH Tue Nov 3 10:12:59 1992
- ***************
- *** 19,27 ****
- # @(#) (c) E. Mogenet April 1990
- # @(#) (c) R. Manfredi, 1990 1991
-
- ! # $Id: unkit.SH,v 2.0.1.13 92/11/01 15:08:15 ram Exp $
- #
- # $Log: unkit.SH,v $
- # Revision 2.0.1.13 92/11/01 15:08:15 ram
- # patch20: added getopt-style option parsing
- #
- --- 19,30 ----
- # @(#) (c) E. Mogenet April 1990
- # @(#) (c) R. Manfredi, 1990 1991
-
- ! # $Id: unkit.SH,v 2.0.1.14 92/11/03 10:12:44 ram Exp $
- #
- # $Log: unkit.SH,v $
- + # Revision 2.0.1.14 92/11/03 10:12:44 ram
- + # patch21: option parsing can now deal with embeded spaces in arguments
- + #
- # Revision 2.0.1.13 92/11/01 15:08:15 ram
- # patch20: added getopt-style option parsing
- #
- ***************
- *** 132,138 ****
- '
-
- # Process the command line options
- ! set X `for arg in $*; do echo $arg; done | awk '
- BEGIN {
- optstr = "bhlprVk:"; # getopt-style specification
-
- --- 135,141 ----
- '
-
- # Process the command line options
- ! set X `for arg in "$@"; do echo $arg; done | awk '
- BEGIN {
- optstr = "bhlprVk:"; # getopt-style specification
-
- ***************
- *** 151,157 ****
- expect = 0;
- str = $0;
- if (substr(str, 1, 1) != "-") {
- ! print str;
- next;
- }
- len = length($0);
- --- 154,160 ----
- expect = 0;
- str = $0;
- if (substr(str, 1, 1) != "-") {
- ! printf("'"'%s'"'\n", str);
- next;
- }
- len = length($0);
- ***************
- *** 158,170 ****
- for (i = 2; i <= len; i++) {
- c = substr(str, i, 1);
- if (!opt[c]) {
- ! print sprintf("-%s", substr(str, i));
- next;
- }
- ! print sprintf("-%s", c);
- if (arg[c]) {
- if (i < len)
- ! print substr(str, i + 1);
- else
- expect = 1;
- next;
- --- 161,173 ----
- for (i = 2; i <= len; i++) {
- c = substr(str, i, 1);
- if (!opt[c]) {
- ! printf("-%s\n", substr(str, i));
- next;
- }
- ! printf("-%s\n", c);
- if (arg[c]) {
- if (i < len)
- ! printf("'"'%s'"'\n", substr(str, i + 1));
- else
- expect = 1;
- next;
- ***************
- *** 176,181 ****
- --- 179,185 ----
- print "?";
- }
- '`
- + eval "set $*"
- shift
-
- # Option parsing
-
- Index: kit/kit.SH
- Prereq: 2.0.1.11
- *** kit/kit.SH.old Tue Nov 3 10:12:48 1992
- --- kit/kit.SH Tue Nov 3 10:12:50 1992
- ***************
- *** 26,34 ****
- !GROK!THIS!
- $spitshell >>kit <<'!NO!SUBS!'
-
- ! # $Id: kit.SH,v 2.0.1.11 92/11/01 15:08:04 ram Exp $
- #
- # $Log: kit.SH,v $
- # Revision 2.0.1.11 92/11/01 15:08:04 ram
- # patch20: added getopt-style option parsing
- #
- --- 26,37 ----
- !GROK!THIS!
- $spitshell >>kit <<'!NO!SUBS!'
-
- ! # $Id: kit.SH,v 2.0.1.12 92/11/03 10:12:34 ram Exp $
- #
- # $Log: kit.SH,v $
- + # Revision 2.0.1.12 92/11/03 10:12:34 ram
- + # patch21: option parsing can now deal with embeded spaces in arguments
- + #
- # Revision 2.0.1.11 92/11/01 15:08:04 ram
- # patch20: added getopt-style option parsing
- #
- ***************
- *** 129,135 ****
- '
-
- # Process the command line options
- ! set X `for arg in $*; do echo $arg; done | awk '
- BEGIN {
- optstr = "BEFHMVXefhpxS:a:d:k:l:m:n:s:"; # getopt-style specification
-
- --- 132,138 ----
- '
-
- # Process the command line options
- ! set X `for arg in "$@"; do echo $arg; done | awk '
- BEGIN {
- optstr = "BEFHMVXefhpxS:a:d:k:l:m:n:s:"; # getopt-style specification
-
- ***************
- *** 148,154 ****
- expect = 0;
- str = $0;
- if (substr(str, 1, 1) != "-") {
- ! print str;
- next;
- }
- len = length($0);
- --- 151,157 ----
- expect = 0;
- str = $0;
- if (substr(str, 1, 1) != "-") {
- ! printf("'"'%s'"'\n", str);
- next;
- }
- len = length($0);
- ***************
- *** 155,167 ****
- for (i = 2; i <= len; i++) {
- c = substr(str, i, 1);
- if (!opt[c]) {
- ! print sprintf("-%s", substr(str, i));
- next;
- }
- ! print sprintf("-%s", c);
- if (arg[c]) {
- if (i < len)
- ! print substr(str, i + 1);
- else
- expect = 1;
- next;
- --- 158,170 ----
- for (i = 2; i <= len; i++) {
- c = substr(str, i, 1);
- if (!opt[c]) {
- ! printf("-%s\n", substr(str, i));
- next;
- }
- ! printf("-%s\n", c);
- if (arg[c]) {
- if (i < len)
- ! printf("'"'%s'"'\n", substr(str, i + 1));
- else
- expect = 1;
- next;
- ***************
- *** 173,178 ****
- --- 176,182 ----
- print "?";
- }
- '`
- + eval "set $*"
- shift
-
- while test $# -gt 0
-
- *** End of Patch 21 ***
-