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

  1. Newsgroups: comp.sources.unix
  2. From: ram@acri.fr (Raphael Manfredi)
  3. Subject: v26i226: kit - the ultimate mailing kit, Patch23
  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 226
  9. Archive-Name: kit/pch23
  10.  
  11. [The latest patch for kit version 2.0 is #28.]
  12.  
  13. System: kit version 2.0
  14. Patch #: 23
  15. Priority: CRITICAL
  16. Subject: take care of '-n' on BSD systems (meaningful to echo)
  17. Date: Fri Jan 22 12:11:04 PST 1993
  18. From: Raphael Manfredi <ram@eiffel.com>
  19.  
  20. Description:
  21.     Take care of '-n' on BSD systems (meaningful to echo). Mailkit was
  22.     unable to work properly on systems like SUN-OS, when the '-n' is
  23.     interpreted by various "echo" calls as a directive to suppress the
  24.     final new-line. The unwanted side effect being that this '-n' is
  25.     removed from the output stream...
  26.  
  27. Repeat-By:
  28.  
  29.     When using 'kit -m someone file', mailkit would try to send the kit
  30.     to a '-c' user...
  31.  
  32. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your kit source
  33.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  34.     If you don't have the patch program, apply the following by hand,
  35.     or get patch (version 2.0, latest patchlevel).
  36.  
  37.     After patching:
  38.         Configure -d
  39.         make
  40.         make install
  41.  
  42.     If patch indicates that patchlevel is the wrong version, you may need
  43.     to apply one or more previous patches, or the patch may already
  44.     have been applied.  See the patchlevel.h file to find out what has or
  45.     has not been applied.  In any event, don't continue with the patch.
  46.  
  47.     If you are missing previous patches they can be obtained from me:
  48.  
  49.         Raphael Manfredi <ram@eiffel.com>
  50.  
  51.     If you send a mail message of the following form it will greatly speed
  52.     processing:
  53.  
  54.         Subject: Command
  55.         @SH mailpatch PATH kit 2.0 LIST
  56.                ^ note the c
  57.  
  58.     where PATH is a return path FROM ME TO YOU either in Internet notation,
  59.     or in bang notation from some well-known host, and LIST is the number
  60.     of one or more patches you need, separated by spaces, commas, and/or
  61.     hyphens.  Saying 35- says everything from 35 to the end.
  62.  
  63.     To get some more detailed instructions, send me the following mail:
  64.  
  65.         Subject: Command
  66.         @SH mailhelp PATH
  67.  
  68.  
  69. Index: patchlevel.h
  70. Prereq: 22
  71. 2c2
  72. < #define PATCHLEVEL 22
  73. ---
  74. > #define PATCHLEVEL 23
  75.  
  76. Index: kit/getopt.SH
  77. Prereq: 2.0.1.1
  78. *** kit/getopt.SH.old    Fri Jan 22 12:11:02 1993
  79. --- kit/getopt.SH    Fri Jan 22 12:11:02 1993
  80. ***************
  81. *** 29,37 ****
  82.   # any optional '--' split up, for instance '-lfoo' becomes '-l foo' if l: is
  83.   # given in optstr, and '-lf' becomes '-l -f' if only lf is given as optstr.
  84.   
  85. ! # $Id: getopt.SH,v 2.0.1.1 93/01/11 18:04:27 ram Exp $
  86.   #
  87.   # $Log:    getopt.SH,v $
  88.   # Revision 2.0.1.1  93/01/11  18:04:27  ram
  89.   # patch22: created
  90.   # 
  91. --- 29,40 ----
  92.   # any optional '--' split up, for instance '-lfoo' becomes '-l foo' if l: is
  93.   # given in optstr, and '-lf' becomes '-l -f' if only lf is given as optstr.
  94.   
  95. ! # $Id: getopt.SH,v 2.0.1.2 93/01/22 12:10:59 ram Exp $
  96.   #
  97.   # $Log:    getopt.SH,v $
  98. + # Revision 2.0.1.2  93/01/22  12:10:59  ram
  99. + # patch23: take care of '-n' on BSD systems (meaningful to echo)
  100. + # 
  101.   # Revision 2.0.1.1  93/01/11  18:04:27  ram
  102.   # patch22: created
  103.   # 
  104. ***************
  105. *** 39,46 ****
  106.   # Options specification (getopt style)
  107.   optstr=$1; shift
  108.   
  109. ! # Process the command line options
  110. ! set X `for arg in "$@"; do echo $arg; done | awk '
  111.   BEGIN {
  112.       optstr = "'$optstr'";    # getopt-style specification
  113.   
  114. --- 42,50 ----
  115.   # Options specification (getopt style)
  116.   optstr=$1; shift
  117.   
  118. ! # Process the command line options. Add a leading 'x' to each argument, in case
  119. ! # one of them is a '-n' and we are on a BSD system...
  120. ! set X `for arg in "$@"; do echo x$arg; done | awk '
  121.   BEGIN {
  122.       optstr = "'$optstr'";    # getopt-style specification
  123.   
  124. ***************
  125. *** 57,63 ****
  126.   }
  127.   {
  128.       expect = 0;
  129. !     str = $0;
  130.       if (str == "--")
  131.           ended = 1;
  132.       if (ended || substr(str, 1, 1) != "-") {
  133. --- 61,68 ----
  134.   }
  135.   {
  136.       expect = 0;
  137. !     xstr = $0;
  138. !     str = substr(xstr, 2);
  139.       if (str == "--")
  140.           ended = 1;
  141.       if (ended || substr(str, 1, 1) != "-") {
  142. ***************
  143. *** 64,70 ****
  144.           printf("'"'%s'"'\n", str);
  145.           next;
  146.       }
  147. !     len = length($0);
  148.       for (i = 2; i <= len; i++) {
  149.           c = substr(str, i, 1);
  150.           if (!opt[c]) {
  151. --- 69,75 ----
  152.           printf("'"'%s'"'\n", str);
  153.           next;
  154.       }
  155. !     len = length(str);
  156.       for (i = 2; i <= len; i++) {
  157.           c = substr(str, i, 1);
  158.           if (!opt[c]) {
  159. ***************
  160. *** 86,93 ****
  161.           print "?";
  162.   }
  163.   '`
  164.   shift
  165. ! echo $@
  166.   !NO!SUBS!
  167.   chmod 755 getopt
  168.   $eunicefix getopt
  169. --- 91,99 ----
  170.           print "?";
  171.   }
  172.   '`
  173. + # Avoid 'echo $@' in case first option is -n on a BSD system...
  174.   shift
  175. ! echo " "$@
  176.   !NO!SUBS!
  177.   chmod 755 getopt
  178.   $eunicefix getopt
  179.  
  180. *** End of Patch 23 ***
  181.