home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume20 / perl / patch06 < prev    next >
Encoding:
Text File  |  1991-06-19  |  49.0 KB  |  1,860 lines

  1. Newsgroups: comp.sources.misc
  2. From: Larry Wall <lwall@netlabs.com>
  3. Subject:  v20i058:  perl - The perl programming language, Patch06
  4. Message-ID: <1991Jun20.030516.8666@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: a6c3cea25be779d55c54c0d166dbac48
  6. Date: Thu, 20 Jun 1991 03:05:16 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Larry Wall <lwall@netlabs.com>
  10. Posting-number: Volume 20, Issue 58
  11. Archive-name: perl/patch06
  12. Patch-To: perl: Volume 18, Issue 19-54
  13.  
  14. System: perl version 4.0
  15. Patch #: 6
  16. Priority: High
  17. Subject: patch #4, continued
  18.  
  19. Description:
  20.     See patch #4.
  21.  
  22. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your perl source
  23.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  24.     If you don't have the patch program, apply the following by hand,
  25.     or get patch (version 2.0, latest patchlevel).
  26.  
  27.     After patching:
  28.         *** DO NOTHING--INSTALL ALL PATCHES UP THROUGH #09 FIRST ***
  29.  
  30.     If patch indicates that patchlevel is the wrong version, you may need
  31.     to apply one or more previous patches, or the patch may already
  32.     have been applied.  See the patchlevel.h file to find out what has or
  33.     has not been applied.  In any event, don't continue with the patch.
  34.  
  35.     If you are missing previous patches they can be obtained from me:
  36.  
  37.     Larry Wall
  38.     lwall@netlabs.com
  39.  
  40.     If you send a mail message of the following form it will greatly speed
  41.     processing:
  42.  
  43.     Subject: Command
  44.     @SH mailpatch PATH perl 4.0 LIST
  45.            ^ note the c
  46.  
  47.     where PATH is a return path FROM ME TO YOU either in Internet notation,
  48.     or in bang notation from some well-known host, and LIST is the number
  49.     of one or more patches you need, separated by spaces, commas, and/or
  50.     hyphens.  Saying 35- says everything from 35 to the end.
  51.  
  52.  
  53. Index: patchlevel.h
  54. Prereq: 5
  55. 1c1
  56. < #define PATCHLEVEL 5
  57. ---
  58. > #define PATCHLEVEL 6
  59.  
  60. Index: msdos/dir.h
  61. Prereq: 4.0
  62. *** msdos/dir.h.old    Fri Jun  7 12:25:39 1991
  63. --- msdos/dir.h    Fri Jun  7 12:25:40 1991
  64. ***************
  65. *** 1,11 ****
  66. ! /* $Header: dir.h,v 4.0 91/03/20 01:34:20 lwall Locked $
  67.    *
  68.    *    (C) Copyright 1987, 1990 Diomidis Spinellis.
  69.    *
  70. !  *    You may distribute under the terms of the GNU General Public License
  71. !  *    as specified in the README file that comes with the perl 3.0 kit.
  72.    *
  73.    * $Log:    dir.h,v $
  74.    * Revision 4.0  91/03/20  01:34:20  lwall
  75.    * 4.0 baseline.
  76.    * 
  77. --- 1,14 ----
  78. ! /* $RCSfile: dir.h,v $$Revision: 4.0.1.1 $$Date: 91/06/07 11:22:10 $
  79.    *
  80.    *    (C) Copyright 1987, 1990 Diomidis Spinellis.
  81.    *
  82. !  *    You may distribute under the terms of either the GNU General Public
  83. !  *    License or the Artistic License, as specified in the README file.
  84.    *
  85.    * $Log:    dir.h,v $
  86. +  * Revision 4.0.1.1  91/06/07  11:22:10  lwall
  87. +  * patch4: new copyright notice
  88. +  * 
  89.    * Revision 4.0  91/03/20  01:34:20  lwall
  90.    * 4.0 baseline.
  91.    * 
  92.  
  93. Index: msdos/directory.c
  94. Prereq: 4.0
  95. *** msdos/directory.c.old    Fri Jun  7 12:25:42 1991
  96. --- msdos/directory.c    Fri Jun  7 12:25:42 1991
  97. ***************
  98. *** 1,11 ****
  99. ! /* $Header: directory.c,v 4.0 91/03/20 01:34:24 lwall Locked $
  100.    *
  101.    *    (C) Copyright 1987, 1988, 1990 Diomidis Spinellis.
  102.    *
  103. !  *    You may distribute under the terms of the GNU General Public License
  104. !  *    as specified in the README file that comes with the perl 3.0 kit.
  105.    *
  106.    * $Log:    directory.c,v $
  107.    * Revision 4.0  91/03/20  01:34:24  lwall
  108.    * 4.0 baseline.
  109.    * 
  110. --- 1,14 ----
  111. ! /* $RCSfile: directory.c,v $$Revision: 4.0.1.1 $$Date: 91/06/07 11:22:24 $
  112.    *
  113.    *    (C) Copyright 1987, 1988, 1990 Diomidis Spinellis.
  114.    *
  115. !  *    You may distribute under the terms of either the GNU General Public
  116. !  *    License or the Artistic License, as specified in the README file.
  117.    *
  118.    * $Log:    directory.c,v $
  119. +  * Revision 4.0.1.1  91/06/07  11:22:24  lwall
  120. +  * patch4: new copyright notice
  121. +  * 
  122.    * Revision 4.0  91/03/20  01:34:24  lwall
  123.    * 4.0 baseline.
  124.    * 
  125. ***************
  126. *** 44,50 ****
  127.   #define PATHLEN 65
  128.   
  129.   #ifndef lint
  130. ! static char rcsid[] = "$Header: directory.c,v 4.0 91/03/20 01:34:24 lwall Locked $";
  131.   #endif
  132.   
  133.   DIR *
  134. --- 47,53 ----
  135.   #define PATHLEN 65
  136.   
  137.   #ifndef lint
  138. ! static char rcsid[] = "$RCSfile: directory.c,v $$Revision: 4.0.1.1 $$Date: 91/06/07 11:22:24 $";
  139.   #endif
  140.   
  141.   DIR *
  142.  
  143. Index: doSH
  144. *** doSH.old    Fri Jun  7 12:23:19 1991
  145. --- doSH    Fri Jun  7 12:23:20 1991
  146. ***************
  147. *** 0 ****
  148. --- 1,36 ----
  149. + #!/bin/sh
  150. + : if this fails, just run all the .SH files by hand
  151. + . ./config.sh
  152. + echo " "
  153. + echo "Doing variable substitutions on .SH files..."
  154. + set x `awk '{print $1}' <MANIFEST | grep '\.SH'`
  155. + shift
  156. + case $# in
  157. + 0) set x *.SH; shift;;
  158. + esac
  159. + if test ! -f $1; then
  160. +     shift
  161. + fi
  162. + for file in $*; do
  163. +     set X
  164. +     shift
  165. +     chmod +x $file
  166. +     case "$file" in
  167. +     */*)
  168. +     dir=`expr X$file : 'X\(.*\)/'`
  169. +     file=`expr X$file : 'X.*/\(.*\)'`
  170. +     (cd $dir && . $file)
  171. +     ;;
  172. +     *)
  173. +     . $file
  174. +     ;;
  175. +     esac
  176. + done
  177. + if test -f config.h.SH; then
  178. +     if test ! -f config.h; then
  179. +     : oops, they left it out of MANIFEST, probably, so do it anyway.
  180. +     . config.h.SH
  181. +     fi
  182. + fi
  183.  
  184. Index: doarg.c
  185. *** doarg.c.old    Fri Jun  7 12:23:23 1991
  186. --- doarg.c    Fri Jun  7 12:23:24 1991
  187. ***************
  188. *** 1,11 ****
  189. ! /* $RCSfile: doarg.c,v $$Revision: 4.0.1.1 $$Date: 91/04/11 17:40:14 $
  190.    *
  191. !  *    Copyright (c) 1989, Larry Wall
  192.    *
  193. !  *    You may distribute under the terms of the GNU General Public License
  194. !  *    as specified in the README file that comes with the perl 3.0 kit.
  195.    *
  196.    * $Log:    doarg.c,v $
  197.    * Revision 4.0.1.1  91/04/11  17:40:14  lwall
  198.    * patch1: fixed undefined environ problem
  199.    * patch1: fixed debugger coredump on subroutines
  200. --- 1,21 ----
  201. ! /* $RCSfile: doarg.c,v $$Revision: 4.0.1.2 $$Date: 91/06/07 10:42:17 $
  202.    *
  203. !  *    Copyright (c) 1991, Larry Wall
  204.    *
  205. !  *    You may distribute under the terms of either the GNU General Public
  206. !  *    License or the Artistic License, as specified in the README file.
  207.    *
  208.    * $Log:    doarg.c,v $
  209. +  * Revision 4.0.1.2  91/06/07  10:42:17  lwall
  210. +  * patch4: new copyright notice
  211. +  * patch4: // wouldn't use previous pattern if it started with a null character
  212. +  * patch4: //o and s///o now optimize themselves fully at runtime
  213. +  * patch4: added global modifier for pattern matches
  214. +  * patch4: undef @array disabled "@array" interpolation
  215. +  * patch4: chop("") was returning "\0" rather than ""
  216. +  * patch4: vector logical operations &, | and ^ sometimes returned null string
  217. +  * patch4: syscall couldn't pass numbers with most significant bit set on sparcs
  218. +  * 
  219.    * Revision 4.0.1.1  91/04/11  17:40:14  lwall
  220.    * patch1: fixed undefined environ problem
  221.    * patch1: fixed debugger coredump on subroutines
  222. ***************
  223. *** 67,72 ****
  224. --- 77,88 ----
  225.       if (spat->spat_flags & SPAT_KEEP) {
  226.           arg_free(spat->spat_runtime);    /* it won't change, so */
  227.           spat->spat_runtime = Nullarg;    /* no point compiling again */
  228. +         scanconst(spat, m, dstr->str_cur);
  229. +         hoistmust(spat);
  230. +             if (curcmd->c_expr && (curcmd->c_flags & CF_OPTIMIZE) == CFT_EVAL) {
  231. +                 curcmd->c_flags &= ~CF_OPTIMIZE;
  232. +                 opt_arg(curcmd, 1, curcmd->c_type == C_EXPR);
  233. +             }
  234.       }
  235.       }
  236.   #ifdef DEBUGGING
  237. ***************
  238. *** 76,82 ****
  239.   #endif
  240.       safebase = ((!spat->spat_regexp || !spat->spat_regexp->nparens) &&
  241.         !sawampersand);
  242. !     if (!*spat->spat_regexp->precomp && lastspat)
  243.       spat = lastspat;
  244.       orig = m = s;
  245.       if (hint) {
  246. --- 92,98 ----
  247.   #endif
  248.       safebase = ((!spat->spat_regexp || !spat->spat_regexp->nparens) &&
  249.         !sawampersand);
  250. !     if (!spat->spat_regexp->prelen && lastspat)
  251.       spat = lastspat;
  252.       orig = m = s;
  253.       if (hint) {
  254. ***************
  255. *** 122,128 ****
  256.           spat->spat_short = Nullstr;    /* opt is being useless */
  257.       }
  258.       }
  259. !     once = ((rspat->spat_flags & SPAT_ONCE) != 0);
  260.       if (rspat->spat_flags & SPAT_CONST) {    /* known replacement string? */
  261.       if ((rspat->spat_repl[1].arg_type & A_MASK) == A_SINGLE)
  262.           dstr = rspat->spat_repl[1].arg_ptr.arg_str;
  263. --- 138,144 ----
  264.           spat->spat_short = Nullstr;    /* opt is being useless */
  265.       }
  266.       }
  267. !     once = !(rspat->spat_flags & SPAT_GLOBAL);
  268.       if (rspat->spat_flags & SPAT_CONST) {    /* known replacement string? */
  269.       if ((rspat->spat_repl[1].arg_type & A_MASK) == A_SINGLE)
  270.           dstr = rspat->spat_repl[1].arg_ptr.arg_str;
  271. ***************
  272. *** 1287,1293 ****
  273.       if (type == O_ARRAY || type == O_LARRAY) {
  274.       stab = arg[1].arg_ptr.arg_stab;
  275.       afree(stab_xarray(stab));
  276. !     stab_xarray(stab) = Null(ARRAY*);
  277.       }
  278.       else if (type == O_HASH || type == O_LHASH) {
  279.       stab = arg[1].arg_ptr.arg_stab;
  280. --- 1303,1309 ----
  281.       if (type == O_ARRAY || type == O_LARRAY) {
  282.       stab = arg[1].arg_ptr.arg_stab;
  283.       afree(stab_xarray(stab));
  284. !     stab_xarray(stab) = anew(stab);        /* so "@array" still works */
  285.       }
  286.       else if (type == O_HASH || type == O_LHASH) {
  287.       stab = arg[1].arg_ptr.arg_stab;
  288. ***************
  289. *** 1442,1455 ****
  290.       return;
  291.       }
  292.       tmps = str_get(str);
  293. !     if (!tmps)
  294. !     return;
  295. !     tmps += str->str_cur - (str->str_cur != 0);
  296. !     str_nset(astr,tmps,1);    /* remember last char */
  297. !     *tmps = '\0';                /* wipe it out */
  298. !     str->str_cur = tmps - str->str_ptr;
  299. !     str->str_nok = 0;
  300. !     STABSET(str);
  301.   }
  302.   
  303.   do_vop(optype,str,left,right)
  304. --- 1458,1473 ----
  305.       return;
  306.       }
  307.       tmps = str_get(str);
  308. !     if (tmps && str->str_cur) {
  309. !     tmps += str->str_cur - 1;
  310. !     str_nset(astr,tmps,1);    /* remember last char */
  311. !     *tmps = '\0';                /* wipe it out */
  312. !     str->str_cur = tmps - str->str_ptr;
  313. !     str->str_nok = 0;
  314. !     STABSET(str);
  315. !     }
  316. !     else
  317. !     str_nset(astr,"",0);
  318.   }
  319.   
  320.   do_vop(optype,str,left,right)
  321. ***************
  322. *** 1472,1477 ****
  323. --- 1490,1497 ----
  324.       (void)bzero(str->str_ptr + str->str_cur, len - str->str_cur);
  325.       str->str_cur = len;
  326.       }
  327. +     str->str_pok = 1;
  328. +     str->str_nok = 0;
  329.       s = str->str_ptr;
  330.       if (!s) {
  331.       str_nset(str,"",0);
  332. ***************
  333. *** 1506,1512 ****
  334.       register STR **st = stack->ary_array;
  335.       register int sp = arglast[1];
  336.       register int items = arglast[2] - sp;
  337. !     long arg[8];
  338.       register int i = 0;
  339.       int retval = -1;
  340.   
  341. --- 1526,1532 ----
  342.       register STR **st = stack->ary_array;
  343.       register int sp = arglast[1];
  344.       register int items = arglast[2] - sp;
  345. !     unsigned long arg[8];
  346.       register int i = 0;
  347.       int retval = -1;
  348.   
  349. ***************
  350. *** 1527,1536 ****
  351.        */
  352.       while (items--) {
  353.       if (st[++sp]->str_nok || !i)
  354. !         arg[i++] = (long)str_gnum(st[sp]);
  355.   #ifndef lint
  356.       else
  357. !         arg[i++] = (long)st[sp]->str_ptr;
  358.   #endif /* lint */
  359.       }
  360.       sp = arglast[1];
  361. --- 1547,1556 ----
  362.        */
  363.       while (items--) {
  364.       if (st[++sp]->str_nok || !i)
  365. !         arg[i++] = (unsigned long)str_gnum(st[sp]);
  366.   #ifndef lint
  367.       else
  368. !         arg[i++] = (unsigned long)st[sp]->str_ptr;
  369.   #endif /* lint */
  370.       }
  371.       sp = arglast[1];
  372.  
  373. Index: doio.c
  374. *** doio.c.old    Fri Jun  7 12:23:30 1991
  375. --- doio.c    Fri Jun  7 12:23:31 1991
  376. ***************
  377. *** 1,11 ****
  378. ! /* $RCSfile: doio.c,v $$Revision: 4.0.1.1 $$Date: 91/04/11 17:41:06 $
  379.    *
  380. !  *    Copyright (c) 1989, Larry Wall
  381.    *
  382. !  *    You may distribute under the terms of the GNU General Public License
  383. !  *    as specified in the README file that comes with the perl 3.0 kit.
  384.    *
  385.    * $Log:    doio.c,v $
  386.    * Revision 4.0.1.1  91/04/11  17:41:06  lwall
  387.    * patch1: hopefully straightened out some of the Xenix mess
  388.    * 
  389. --- 1,19 ----
  390. ! /* $RCSfile: doio.c,v $$Revision: 4.0.1.2 $$Date: 91/06/07 10:53:39 $
  391.    *
  392. !  *    Copyright (c) 1991, Larry Wall
  393.    *
  394. !  *    You may distribute under the terms of either the GNU General Public
  395. !  *    License or the Artistic License, as specified in the README file.
  396.    *
  397.    * $Log:    doio.c,v $
  398. +  * Revision 4.0.1.2  91/06/07  10:53:39  lwall
  399. +  * patch4: new copyright notice
  400. +  * patch4: system fd's are now treated specially
  401. +  * patch4: added $^F variable to specify maximum system fd, default 2
  402. +  * patch4: character special files now opened with bidirectional stdio buffers
  403. +  * patch4: taintchecks could improperly modify parent in vfork()
  404. +  * patch4: many, many itty-bitty portability fixes
  405. +  * 
  406.    * Revision 4.0.1.1  91/04/11  17:41:06  lwall
  407.    * patch1: hopefully straightened out some of the Xenix mess
  408.    * 
  409. ***************
  410. *** 75,80 ****
  411. --- 83,91 ----
  412.       int fd;
  413.       int writing = 0;
  414.       char mode[3];        /* stdio file mode ("r\0" or "r+\0") */
  415. +     FILE *saveifp = Nullfp;
  416. +     FILE *saveofp = Nullfp;
  417. +     char savetype = ' ';
  418.   
  419.       name = myname;
  420.       forkprocess = 1;        /* assume true if no fork */
  421. ***************
  422. *** 84,93 ****
  423.       stio = stab_io(stab) = stio_new();
  424.       else if (stio->ifp) {
  425.       fd = fileno(stio->ifp);
  426. !     if (stio->type == '|')
  427. !         result = mypclose(stio->ifp);
  428. !     else if (stio->type == '-')
  429.           result = 0;
  430.       else if (stio->ifp != stio->ofp) {
  431.           if (stio->ofp) {
  432.           result = fclose(stio->ofp);
  433. --- 95,110 ----
  434.       stio = stab_io(stab) = stio_new();
  435.       else if (stio->ifp) {
  436.       fd = fileno(stio->ifp);
  437. !     if (stio->type == '-')
  438.           result = 0;
  439. +     else if (fd <= maxsysfd) {
  440. +         saveifp = stio->ifp;
  441. +         saveofp = stio->ofp;
  442. +         savetype = stio->type;
  443. +         result = 0;
  444. +     }
  445. +     else if (stio->type == '|')
  446. +         result = mypclose(stio->ifp);
  447.       else if (stio->ifp != stio->ofp) {
  448.           if (stio->ofp) {
  449.           result = fclose(stio->ofp);
  450. ***************
  451. *** 98,104 ****
  452.       }
  453.       else
  454.           result = fclose(stio->ifp);
  455. !     if (result == EOF && fd > 2)
  456.           fprintf(stderr,"Warning: unable to close filehandle %s properly.\n",
  457.             stab_name(stab));
  458.       stio->ofp = stio->ifp = Nullfp;
  459. --- 115,121 ----
  460.       }
  461.       else
  462.           result = fclose(stio->ifp);
  463. !     if (result == EOF && fd > maxsysfd)
  464.           fprintf(stderr,"Warning: unable to close filehandle %s properly.\n",
  465.             stab_name(stab));
  466.       stio->ofp = stio->ifp = Nullfp;
  467. ***************
  468. *** 143,150 ****
  469.           fd = atoi(name);
  470.           else {
  471.           stab = stabent(name,FALSE);
  472. !         if (!stab || !stab_io(stab))
  473. !             return FALSE;
  474.           if (stab_io(stab) && stab_io(stab)->ifp) {
  475.               fd = fileno(stab_io(stab)->ifp);
  476.               if (stab_io(stab)->type == 's')
  477. --- 160,171 ----
  478.           fd = atoi(name);
  479.           else {
  480.           stab = stabent(name,FALSE);
  481. !         if (!stab || !stab_io(stab)) {
  482. ! #ifdef EINVAL
  483. !             errno = EINVAL;
  484. ! #endif
  485. !             goto say_false;
  486. !         }
  487.           if (stab_io(stab) && stab_io(stab)->ifp) {
  488.               fd = fileno(stab_io(stab)->ifp);
  489.               if (stab_io(stab)->type == 's')
  490. ***************
  491. *** 209,222 ****
  492.       }
  493.       Safefree(myname);
  494.       if (!fp)
  495. !     return FALSE;
  496.       if (stio->type &&
  497.         stio->type != '|' && stio->type != '-') {
  498.       if (fstat(fileno(fp),&statbuf) < 0) {
  499.           (void)fclose(fp);
  500. !         return FALSE;
  501.       }
  502. !     if (S_ISSOCK(statbuf.st_mode))
  503.           stio->type = 's';    /* in case a socket was passed in to us */
  504.   #ifdef S_IFMT
  505.       else if (!(statbuf.st_mode & S_IFMT))
  506. --- 230,243 ----
  507.       }
  508.       Safefree(myname);
  509.       if (!fp)
  510. !     goto say_false;
  511.       if (stio->type &&
  512.         stio->type != '|' && stio->type != '-') {
  513.       if (fstat(fileno(fp),&statbuf) < 0) {
  514.           (void)fclose(fp);
  515. !         goto say_false;
  516.       }
  517. !     if (S_ISSOCK(statbuf.st_mode) || (S_ISCHR(statbuf.st_mode) && writing))
  518.           stio->type = 's';    /* in case a socket was passed in to us */
  519.   #ifdef S_IFMT
  520.       else if (!(statbuf.st_mode & S_IFMT))
  521. ***************
  522. *** 225,232 ****
  523.       }
  524.   #if defined(HAS_FCNTL) && defined(F_SETFD)
  525.       fd = fileno(fp);
  526. !     fcntl(fd,F_SETFD,fd >= 3);
  527.   #endif
  528.       stio->ifp = fp;
  529.       if (writing) {
  530.       if (stio->type != 's')
  531. --- 246,268 ----
  532.       }
  533.   #if defined(HAS_FCNTL) && defined(F_SETFD)
  534.       fd = fileno(fp);
  535. !     fcntl(fd,F_SETFD,fd > maxsysfd);
  536.   #endif
  537. +     if (saveifp) {        /* must use old fp? */
  538. +     fd = fileno(saveifp);
  539. +     if (saveofp) {
  540. +         fflush(saveofp);        /* emulate fclose() */
  541. +         if (saveofp != saveifp) {    /* was a socket? */
  542. +         fclose(saveofp);
  543. +         Safefree(saveofp);
  544. +         }
  545. +     }
  546. +     if (fd != fileno(fp)) {
  547. +         dup2(fileno(fp), fd);
  548. +         fclose(fp);
  549. +     }
  550. +     fp = saveifp;
  551. +     }
  552.       stio->ifp = fp;
  553.       if (writing) {
  554.       if (stio->type != 's')
  555. ***************
  556. *** 235,243 ****
  557. --- 271,286 ----
  558.           if (!(stio->ofp = fdopen(fileno(fp),"w"))) {
  559.           fclose(fp);
  560.           stio->ifp = Nullfp;
  561. +         goto say_false;
  562.           }
  563.       }
  564.       return TRUE;
  565. + say_false:
  566. +     stio->ifp = saveifp;
  567. +     stio->ofp = saveofp;
  568. +     stio->type = savetype;
  569. +     return FALSE;
  570.   }
  571.   
  572.   FILE *
  573. ***************
  574. *** 1173,1183 ****
  575.       register char *s;
  576.       char flags[10];
  577.   
  578. - #ifdef TAINT
  579. -     taintenv();
  580. -     taintproper("Insecure dependency in exec");
  581. - #endif
  582.       /* save an extra exec if possible */
  583.   
  584.   #ifdef CSH
  585. --- 1216,1221 ----
  586. ***************
  587. *** 1400,1406 ****
  588.       else if (nstio->ifp)
  589.       do_close(nstab,FALSE);
  590.   
  591. !     fd = accept(fileno(gstio->ifp),buf,&len);
  592.       if (fd < 0)
  593.       goto badexit;
  594.       nstio->ifp = fdopen(fd, "r");
  595. --- 1438,1444 ----
  596.       else if (nstio->ifp)
  597.       do_close(nstab,FALSE);
  598.   
  599. !     fd = accept(fileno(gstio->ifp),(struct sockaddr *)buf,&len);
  600.       if (fd < 0)
  601.       goto badexit;
  602.       nstio->ifp = fdopen(fd, "r");
  603. ***************
  604. *** 2142,2148 ****
  605. --- 2180,2188 ----
  606.   #ifndef telldir
  607.       long telldir();
  608.   #endif
  609. + #ifndef apollo
  610.       struct DIRENT *readdir();
  611. + #endif
  612.       register struct DIRENT *dp;
  613.   
  614.       if (!stab)
  615. ***************
  616. *** 2149,2159 ****
  617.       goto nope;
  618.       if (!(stio = stab_io(stab)))
  619.       stio = stab_io(stab) = stio_new();
  620. !     if (!stio->dirp && optype != O_OPENDIR)
  621.       goto nope;
  622.       st[sp] = &str_yes;
  623.       switch (optype) {
  624. !     case O_OPENDIR:
  625.       if (stio->dirp)
  626.           closedir(stio->dirp);
  627.       if (!(stio->dirp = opendir(str_get(st[sp+1]))))
  628. --- 2189,2199 ----
  629.       goto nope;
  630.       if (!(stio = stab_io(stab)))
  631.       stio = stab_io(stab) = stio_new();
  632. !     if (!stio->dirp && optype != O_OPEN_DIR)
  633.       goto nope;
  634.       st[sp] = &str_yes;
  635.       switch (optype) {
  636. !     case O_OPEN_DIR:
  637.       if (stio->dirp)
  638.           closedir(stio->dirp);
  639.       if (!(stio->dirp = opendir(str_get(st[sp+1]))))
  640. ***************
  641. *** 2522,2532 ****
  642.           if (semctl(id, 0, IPC_STAT, &semds) == -1)
  643.           return -1;
  644.           getinfo = (cmd == GETALL);
  645. ! #ifdef _POSIX_SOURCE
  646. !         infosize = semds.sem_nsems * sizeof(ushort_t);
  647. ! #else
  648. !         infosize = semds.sem_nsems * sizeof(ushort);
  649. ! #endif
  650.       }
  651.       break;
  652.   #endif
  653. --- 2562,2570 ----
  654.           if (semctl(id, 0, IPC_STAT, &semds) == -1)
  655.           return -1;
  656.           getinfo = (cmd == GETALL);
  657. !         infosize = semds.sem_nsems * sizeof(short);
  658. !         /* "short" is technically wrong but much more portable
  659. !            than guessing about u_?short(_t)? */
  660.       }
  661.       break;
  662.   #endif
  663. ***************
  664. *** 2665,2671 ****
  665.       return -1;
  666.       }
  667.       errno = 0;
  668. !     return semop(id, opbuf, opsize/sizeof(struct sembuf));
  669.   #else
  670.       fatal("semop not implemented");
  671.   #endif
  672. --- 2703,2709 ----
  673.       return -1;
  674.       }
  675.       errno = 0;
  676. !     return semop(id, (struct sembuf *)opbuf, opsize/sizeof(struct sembuf));
  677.   #else
  678.       fatal("semop not implemented");
  679.   #endif
  680. ***************
  681. *** 2683,2689 ****
  682. --- 2721,2729 ----
  683.       char *mbuf, *shm;
  684.       int id, mpos, msize;
  685.       struct shmid_ds shmds;
  686. + #ifndef VOIDSHMAT
  687.       extern char *shmat();
  688. + #endif
  689.   
  690.       id = (int)str_gnum(st[++sp]);
  691.       mstr = st[++sp];
  692. ***************
  693. *** 2696,2702 ****
  694.       errno = EFAULT;        /* can't do as caller requested */
  695.       return -1;
  696.       }
  697. !     shm = shmat(id, (char *)NULL, (optype == O_SHMREAD) ? SHM_RDONLY : 0);
  698.       if (shm == (char *)-1)    /* I hate System V IPC, I really do */
  699.       return -1;
  700.       mbuf = str_get(mstr);
  701. --- 2736,2742 ----
  702.       errno = EFAULT;        /* can't do as caller requested */
  703.       return -1;
  704.       }
  705. !     shm = (char*)shmat(id, (char*)NULL, (optype == O_SHMREAD) ? SHM_RDONLY : 0);
  706.       if (shm == (char *)-1)    /* I hate System V IPC, I really do */
  707.       return -1;
  708.       mbuf = str_get(mstr);
  709.  
  710. Index: dolist.c
  711. Prereq: 4.0
  712. *** dolist.c.old    Fri Jun  7 12:23:36 1991
  713. --- dolist.c    Fri Jun  7 12:23:37 1991
  714. ***************
  715. *** 1,11 ****
  716. ! /* $Header: dolist.c,v 4.0 91/03/20 01:08:03 lwall Locked $
  717.    *
  718. !  *    Copyright (c) 1989, Larry Wall
  719.    *
  720. !  *    You may distribute under the terms of the GNU General Public License
  721. !  *    as specified in the README file that comes with the perl 3.0 kit.
  722.    *
  723.    * $Log:    dolist.c,v $
  724.    * Revision 4.0  91/03/20  01:08:03  lwall
  725.    * 4.0 baseline.
  726.    * 
  727. --- 1,19 ----
  728. ! /* $RCSfile: dolist.c,v $$Revision: 4.0.1.1 $$Date: 91/06/07 10:58:28 $
  729.    *
  730. !  *    Copyright (c) 1991, Larry Wall
  731.    *
  732. !  *    You may distribute under the terms of either the GNU General Public
  733. !  *    License or the Artistic License, as specified in the README file.
  734.    *
  735.    * $Log:    dolist.c,v $
  736. +  * Revision 4.0.1.1  91/06/07  10:58:28  lwall
  737. +  * patch4: new copyright notice
  738. +  * patch4: added global modifier for pattern matches
  739. +  * patch4: // wouldn't use previous pattern if it started with a null character
  740. +  * patch4: //o and s///o now optimize themselves fully at runtime
  741. +  * patch4: $` was busted inside s///
  742. +  * patch4: caller($arg) didn't work except under debugger
  743. +  * 
  744.    * Revision 4.0  91/03/20  01:08:03  lwall
  745.    * 4.0 baseline.
  746.    * 
  747. ***************
  748. *** 35,40 ****
  749. --- 43,50 ----
  750.       char *strend = s + st[sp]->str_cur;
  751.       STR *tmpstr;
  752.       char *myhint = hint;
  753. +     int global;
  754. +     int safebase;
  755.   
  756.       hint = Nullch;
  757.       if (!spat) {
  758. ***************
  759. *** 45,50 ****
  760. --- 55,62 ----
  761.       st[sp] = str;
  762.       return sp;
  763.       }
  764. +     global = spat->spat_flags & SPAT_GLOBAL;
  765. +     safebase = (gimme == G_ARRAY) || global;
  766.       if (!s)
  767.       fatal("panic: do_match");
  768.       if (spat->spat_flags & SPAT_USED) {
  769. ***************
  770. *** 76,94 ****
  771.       }
  772.       spat->spat_regexp = regcomp(t,t+tmpstr->str_cur,
  773.           spat->spat_flags & SPAT_FOLD);
  774. !     if (!*spat->spat_regexp->precomp && lastspat)
  775.           spat = lastspat;
  776.       if (spat->spat_flags & SPAT_KEEP) {
  777.           if (spat->spat_runtime)
  778.           arg_free(spat->spat_runtime);    /* it won't change, so */
  779.           spat->spat_runtime = Nullarg;    /* no point compiling again */
  780.       }
  781. !     if (!spat->spat_regexp->nparens)
  782.           gimme = G_SCALAR;            /* accidental array context? */
  783.       if (regexec(spat->spat_regexp, s, strend, s, 0,
  784.         srchstr->str_pok & SP_STUDIED ? srchstr : Nullstr,
  785. !       gimme == G_ARRAY)) {
  786. !         if (spat->spat_regexp->subbase)
  787.           curspat = spat;
  788.           lastspat = spat;
  789.           goto gotcha;
  790. --- 88,117 ----
  791.       }
  792.       spat->spat_regexp = regcomp(t,t+tmpstr->str_cur,
  793.           spat->spat_flags & SPAT_FOLD);
  794. !     if (!spat->spat_regexp->prelen && lastspat)
  795.           spat = lastspat;
  796.       if (spat->spat_flags & SPAT_KEEP) {
  797.           if (spat->spat_runtime)
  798.           arg_free(spat->spat_runtime);    /* it won't change, so */
  799.           spat->spat_runtime = Nullarg;    /* no point compiling again */
  800. +         scanconst(spat, t, tmpstr->str_cur);
  801. +         hoistmust(spat);
  802. +         if (curcmd->c_expr && (curcmd->c_flags & CF_OPTIMIZE) == CFT_EVAL) {
  803. +         curcmd->c_flags &= ~CF_OPTIMIZE;
  804. +         opt_arg(curcmd, 1, curcmd->c_type == C_EXPR);
  805. +         }
  806.       }
  807. !     if (global) {
  808. !         if (spat->spat_regexp->startp[0]) {
  809. !         s = spat->spat_regexp->endp[0];
  810. !         }
  811. !     }
  812. !     else if (!spat->spat_regexp->nparens)
  813.           gimme = G_SCALAR;            /* accidental array context? */
  814.       if (regexec(spat->spat_regexp, s, strend, s, 0,
  815.         srchstr->str_pok & SP_STUDIED ? srchstr : Nullstr,
  816. !       safebase)) {
  817. !         if (spat->spat_regexp->subbase || global)
  818.           curspat = spat;
  819.           lastspat = spat;
  820.           goto gotcha;
  821. ***************
  822. *** 114,122 ****
  823.           deb("2.SPAT %c%s%c\n",ch,spat->spat_regexp->precomp,ch);
  824.       }
  825.   #endif
  826. !     if (!*spat->spat_regexp->precomp && lastspat)
  827.           spat = lastspat;
  828.       t = s;
  829.       if (myhint) {
  830.           if (myhint < s || myhint > strend)
  831.           fatal("panic: hint in do_match");
  832. --- 137,148 ----
  833.           deb("2.SPAT %c%s%c\n",ch,spat->spat_regexp->precomp,ch);
  834.       }
  835.   #endif
  836. !     if (!spat->spat_regexp->prelen && lastspat)
  837.           spat = lastspat;
  838.       t = s;
  839. +     play_it_again:
  840. +     if (global && spat->spat_regexp->startp[0])
  841. +         s = spat->spat_regexp->endp[0];
  842.       if (myhint) {
  843.           if (myhint < s || myhint > strend)
  844.           fatal("panic: hint in do_match");
  845. ***************
  846. *** 163,174 ****
  847.           spat->spat_short = Nullstr;    /* opt is being useless */
  848.           }
  849.       }
  850. !     if (!spat->spat_regexp->nparens)
  851.           gimme = G_SCALAR;            /* accidental array context? */
  852.       if (regexec(spat->spat_regexp, s, strend, t, 0,
  853.         srchstr->str_pok & SP_STUDIED ? srchstr : Nullstr,
  854. !       gimme == G_ARRAY)) {
  855. !         if (spat->spat_regexp->subbase)
  856.           curspat = spat;
  857.           lastspat = spat;
  858.           if (spat->spat_flags & SPAT_ONCE)
  859. --- 189,200 ----
  860.           spat->spat_short = Nullstr;    /* opt is being useless */
  861.           }
  862.       }
  863. !     if (!spat->spat_regexp->nparens && !global)
  864.           gimme = G_SCALAR;            /* accidental array context? */
  865.       if (regexec(spat->spat_regexp, s, strend, t, 0,
  866.         srchstr->str_pok & SP_STUDIED ? srchstr : Nullstr,
  867. !       safebase)) {
  868. !         if (spat->spat_regexp->subbase || global)
  869.           curspat = spat;
  870.           lastspat = spat;
  871.           if (spat->spat_flags & SPAT_ONCE)
  872. ***************
  873. *** 191,202 ****
  874.       int iters, i, len;
  875.   
  876.       iters = spat->spat_regexp->nparens;
  877. !     if (sp + iters >= stack->ary_max) {
  878. !         astore(stack,sp + iters, Nullstr);
  879.           st = stack->ary_array;        /* possibly realloced */
  880.       }
  881.   
  882. !     for (i = 1; i <= iters; i++) {
  883.           st[++sp] = str_mortal(&str_no);
  884.           if (s = spat->spat_regexp->startp[i]) {
  885.           len = spat->spat_regexp->endp[i] - s;
  886. --- 217,232 ----
  887.       int iters, i, len;
  888.   
  889.       iters = spat->spat_regexp->nparens;
  890. !     if (global && !iters)
  891. !         i = 1;
  892. !     else
  893. !         i = 0;
  894. !     if (sp + iters + i >= stack->ary_max) {
  895. !         astore(stack,sp + iters + i, Nullstr);
  896.           st = stack->ary_array;        /* possibly realloced */
  897.       }
  898.   
  899. !     for (i = !i; i <= iters; i++) {
  900.           st[++sp] = str_mortal(&str_no);
  901.           if (s = spat->spat_regexp->startp[i]) {
  902.           len = spat->spat_regexp->endp[i] - s;
  903. ***************
  904. *** 204,209 ****
  905. --- 234,241 ----
  906.               str_nset(st[sp],s,len);
  907.           }
  908.       }
  909. +     if (global)
  910. +         goto play_it_again;
  911.       return sp;
  912.       }
  913.       else {
  914. ***************
  915. *** 218,223 ****
  916. --- 250,261 ----
  917.       lastspat = spat;
  918.       if (spat->spat_flags & SPAT_ONCE)
  919.       spat->spat_flags |= SPAT_USED;
  920. +     if (global) {
  921. +     spat->spat_regexp->startp[0] = s;
  922. +     spat->spat_regexp->endp[0] = s + spat->spat_short->str_cur;
  923. +     curspat = spat;
  924. +     goto gotcha;
  925. +     }
  926.       if (sawampersand) {
  927.       char *tmps;
  928.   
  929. ***************
  930. *** 224,229 ****
  931. --- 262,268 ----
  932.       if (spat->spat_regexp->subbase)
  933.           Safefree(spat->spat_regexp->subbase);
  934.       tmps = spat->spat_regexp->subbase = nsavestr(t,strend-t);
  935. +     spat->spat_regexp->subbeg = tmps;
  936.       spat->spat_regexp->subend = tmps + (strend-t);
  937.       tmps = spat->spat_regexp->startp[0] = tmps + (s - t);
  938.       spat->spat_regexp->endp[0] = tmps + spat->spat_short->str_cur;
  939. ***************
  940. *** 235,240 ****
  941. --- 274,280 ----
  942.       return sp;
  943.   
  944.   nope:
  945. +     spat->spat_regexp->startp[0] = Nullch;
  946.       ++spat->spat_short->str_u.str_useful;
  947.       if (gimme == G_ARRAY)
  948.       return sp;
  949. ***************
  950. *** 1592,1598 ****
  951. --- 1632,1641 ----
  952.         str_2mortal(str_nmake((double)csv->wantarray)) );
  953.       if (csv->hasargs) {
  954.       ARRAY *ary = csv->argarray;
  955. +     STAB *tmpstab;
  956.   
  957. +     if (!dbargs)
  958. +         dbargs = stab_xarray(aadd(stabent("DB'args", TRUE)));
  959.       if (dbargs->ary_max < ary->ary_fill)
  960.           astore(dbargs,ary->ary_fill,Nullstr);
  961.       Copy(ary->ary_array, dbargs->ary_array, ary->ary_fill+1, STR*);
  962.  
  963. Index: dump.c
  964. Prereq: 4.0
  965. *** dump.c.old    Fri Jun  7 12:23:41 1991
  966. --- dump.c    Fri Jun  7 12:23:42 1991
  967. ***************
  968. *** 1,11 ****
  969. ! /* $Header: dump.c,v 4.0 91/03/20 01:08:25 lwall Locked $
  970.    *
  971. !  *    Copyright (c) 1989, Larry Wall
  972.    *
  973. !  *    You may distribute under the terms of the GNU General Public License
  974. !  *    as specified in the README file that comes with the perl 3.0 kit.
  975.    *
  976.    * $Log:    dump.c,v $
  977.    * Revision 4.0  91/03/20  01:08:25  lwall
  978.    * 4.0 baseline.
  979.    * 
  980. --- 1,14 ----
  981. ! /* $RCSfile: dump.c,v $$Revision: 4.0.1.1 $$Date: 91/06/07 10:58:44 $
  982.    *
  983. !  *    Copyright (c) 1991, Larry Wall
  984.    *
  985. !  *    You may distribute under the terms of either the GNU General Public
  986. !  *    License or the Artistic License, as specified in the README file.
  987.    *
  988.    * $Log:    dump.c,v $
  989. +  * Revision 4.0.1.1  91/06/07  10:58:44  lwall
  990. +  * patch4: new copyright notice
  991. +  * 
  992.    * Revision 4.0  91/03/20  01:08:25  lwall
  993.    * 4.0 baseline.
  994.    * 
  995.  
  996. Index: eval.c
  997. *** eval.c.old    Fri Jun  7 12:23:50 1991
  998. --- eval.c    Fri Jun  7 12:23:52 1991
  999. ***************
  1000. *** 1,11 ****
  1001. ! /* $RCSfile: eval.c,v $$Revision: 4.0.1.1 $$Date: 91/04/11 17:43:48 $
  1002.    *
  1003. !  *    Copyright (c) 1989, Larry Wall
  1004.    *
  1005. !  *    You may distribute under the terms of the GNU General Public License
  1006. !  *    as specified in the README file that comes with the perl 3.0 kit.
  1007.    *
  1008.    * $Log:    eval.c,v $
  1009.    * Revision 4.0.1.1  91/04/11  17:43:48  lwall
  1010.    * patch1: fixed failed fork to return undef as documented
  1011.    * patch1: reduced maximum branch distance in eval.c
  1012. --- 1,20 ----
  1013. ! /* $RCSfile: eval.c,v $$Revision: 4.0.1.2 $$Date: 91/06/07 11:07:23 $
  1014.    *
  1015. !  *    Copyright (c) 1991, Larry Wall
  1016.    *
  1017. !  *    You may distribute under the terms of either the GNU General Public
  1018. !  *    License or the Artistic License, as specified in the README file.
  1019.    *
  1020.    * $Log:    eval.c,v $
  1021. +  * Revision 4.0.1.2  91/06/07  11:07:23  lwall
  1022. +  * patch4: new copyright notice
  1023. +  * patch4: length($`), length($&), length($') now optimized to avoid string copy
  1024. +  * patch4: assignment wasn't correctly de-tainting the assigned variable.
  1025. +  * patch4: default top-of-form format is now FILEHANDLE_TOP
  1026. +  * patch4: added $^P variable to control calling of perldb routines
  1027. +  * patch4: taintchecks could improperly modify parent in vfork()
  1028. +  * patch4: many, many itty-bitty portability fixes
  1029. +  * 
  1030.    * Revision 4.0.1.1  91/04/11  17:43:48  lwall
  1031.    * patch1: fixed failed fork to return undef as documented
  1032.    * patch1: reduced maximum branch distance in eval.c
  1033. ***************
  1034. *** 208,213 ****
  1035. --- 217,232 ----
  1036.           }
  1037.   #endif
  1038.           break;
  1039. +     case A_LENSTAB:
  1040. +         str_numset(str, (double)STAB_LEN(argptr.arg_stab));
  1041. +         st[++sp] = str;
  1042. + #ifdef DEBUGGING
  1043. +         if (debug & 8) {
  1044. +         (void)sprintf(buf,"LENSTAB $%s",stab_name(argptr.arg_stab));
  1045. +         tmps = buf;
  1046. +         }
  1047. + #endif
  1048. +         break;
  1049.       case A_LEXPR:
  1050.   #ifdef DEBUGGING
  1051.           if (debug & 8) {
  1052. ***************
  1053. *** 619,624 ****
  1054. --- 638,647 ----
  1055.       goto array_return;
  1056.       case O_SASSIGN:
  1057.         sassign:
  1058. + #ifdef TAINT
  1059. +     if (tainted && !st[2]->str_tainted)
  1060. +         tainted = 0;
  1061. + #endif
  1062.       STR_SSET(str, st[2]);
  1063.       STABSET(str);
  1064.       break;
  1065. ***************
  1066. *** 927,933 ****
  1067.           break;
  1068.       }
  1069.       format(&outrec,form,sp);
  1070. !     do_write(&outrec,stab_io(stab),sp);
  1071.       if (stab_io(stab)->flags & IOF_FLUSH)
  1072.           (void)fflush(fp);
  1073.       str_set(str, Yes);
  1074. --- 950,956 ----
  1075.           break;
  1076.       }
  1077.       format(&outrec,form,sp);
  1078. !     do_write(&outrec,stab,sp);
  1079.       if (stab_io(stab)->flags & IOF_FLUSH)
  1080.           (void)fflush(fp);
  1081.       str_set(str, Yes);
  1082. ***************
  1083. *** 1087,1093 ****
  1084.       else if (stab_hash(tmpstab)->tbl_dbm)
  1085.           str_magic(str, tmpstab, 'D', tmps, anum);
  1086.   #endif
  1087. !     else if (perldb && tmpstab == DBline)
  1088.           str_magic(str, tmpstab, 'L', tmps, anum);
  1089.       break;
  1090.       case O_LSLICE:
  1091. --- 1110,1116 ----
  1092.       else if (stab_hash(tmpstab)->tbl_dbm)
  1093.           str_magic(str, tmpstab, 'D', tmps, anum);
  1094.   #endif
  1095. !     else if (tmpstab == DBline)
  1096.           str_magic(str, tmpstab, 'L', tmps, anum);
  1097.       break;
  1098.       case O_LSLICE:
  1099. ***************
  1100. *** 1961,1966 ****
  1101. --- 1984,1994 ----
  1102.       else if (arglast[2] - arglast[1] != 1)
  1103.           value = (double)do_aexec(Nullstr,arglast);
  1104.       else {
  1105. + #ifdef TAINT
  1106. +         taintenv();
  1107. +         tainted |= st[2]->str_tainted;
  1108. +         taintproper("Insecure dependency in exec");
  1109. + #endif
  1110.           value = (double)do_exec(str_get(str_mortal(st[2])));
  1111.       }
  1112.       goto donumset;
  1113. ***************
  1114. *** 2260,2266 ****
  1115. --- 2288,2300 ----
  1116.           anum = 0;
  1117.       else
  1118.           anum = (int)str_gnum(st[1]);
  1119. + #ifdef _POSIX_SOURCE
  1120. +     if (anum != 0)
  1121. +         fatal("POSIX getpgrp can't take an argument");
  1122. +     value = (double)getpgrp();
  1123. + #else
  1124.       value = (double)getpgrp(anum);
  1125. + #endif
  1126.       goto donumset;
  1127.   #else
  1128.       fatal("The getpgrp() function is unimplemented on this machine");
  1129. ***************
  1130. *** 2852,2858 ****
  1131.       fatal("Unsupported function getlogin");
  1132.   #endif
  1133.       break;
  1134. !     case O_OPENDIR:
  1135.       case O_READDIR:
  1136.       case O_TELLDIR:
  1137.       case O_SEEKDIR:
  1138. --- 2886,2892 ----
  1139.       fatal("Unsupported function getlogin");
  1140.   #endif
  1141.       break;
  1142. !     case O_OPEN_DIR:
  1143.       case O_READDIR:
  1144.       case O_TELLDIR:
  1145.       case O_SEEKDIR:
  1146.  
  1147. Index: lib/find.pl
  1148. *** lib/find.pl.old    Fri Jun  7 12:25:10 1991
  1149. --- lib/find.pl    Fri Jun  7 12:25:11 1991
  1150. ***************
  1151. *** 0 ****
  1152. --- 1,105 ----
  1153. + # Usage:
  1154. + #    require "find.pl";
  1155. + #
  1156. + #    &find('/foo','/bar');
  1157. + #
  1158. + #    sub wanted { ... }
  1159. + #        where wanted does whatever you want.  $dir contains the
  1160. + #        current directory name, and $_ the current filename within
  1161. + #        that directory.  $name contains "$dir/$_".  You are cd'ed
  1162. + #        to $dir when the function is called.  The function may
  1163. + #        set $prune to prune the tree.
  1164. + #
  1165. + # This library is primarily for find2perl, which, when fed
  1166. + #
  1167. + #   find2perl / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune
  1168. + #
  1169. + # spits out something like this
  1170. + #
  1171. + #    sub wanted {
  1172. + #        /^\.nfs.*$/ &&
  1173. + #        (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
  1174. + #        int(-M _) > 7 &&
  1175. + #        unlink($_)
  1176. + #        ||
  1177. + #        ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) &&
  1178. + #        $dev < 0 &&
  1179. + #        ($prune = 1);
  1180. + #    }
  1181. + sub find {
  1182. +     chop($cwd = `pwd`);
  1183. +     foreach $topdir (@_) {
  1184. +     (($topdev,$topino,$topmode,$topnlink) = stat($topdir))
  1185. +       || (warn("Can't stat $topdir: $!\n"), next);
  1186. +     if (-d _) {
  1187. +         if (chdir($topdir)) {
  1188. +         ($dir,$_) = ($topdir,'.');
  1189. +         $name = $topdir;
  1190. +         &wanted;
  1191. +         $topdir =~ s,/$,, ;
  1192. +         &finddir($topdir,$topnlink);
  1193. +         }
  1194. +         else {
  1195. +         warn "Can't cd to $topdir: $!\n";
  1196. +         }
  1197. +     }
  1198. +     else {
  1199. +         unless (($dir,$_) = $topdir =~ m#^(.*/)(.*)$#) {
  1200. +         ($dir,$_) = ('.', $topdir);
  1201. +         }
  1202. +         chdir $dir && &wanted;
  1203. +     }
  1204. +     chdir $cwd;
  1205. +     }
  1206. + }
  1207. + sub finddir {
  1208. +     local($dir,$nlink) = @_;
  1209. +     local($dev,$ino,$mode,$subcount);
  1210. +     local($name);
  1211. +     # Get the list of files in the current directory.
  1212. +     opendir(DIR,'.') || warn "Can't open $dir: $!\n";
  1213. +     local(@filenames) = readdir(DIR);
  1214. +     closedir(DIR);
  1215. +     if ($nlink == 2) {        # This dir has no subdirectories.
  1216. +     for (@filenames) {
  1217. +         next if $_ eq '.';
  1218. +         next if $_ eq '..';
  1219. +         $name = "$dir/$_";
  1220. +         $nlink = 0;
  1221. +         &wanted;
  1222. +     }
  1223. +     }
  1224. +     else {                    # This dir has subdirectories.
  1225. +     $subcount = $nlink - 2;
  1226. +     for (@filenames) {
  1227. +         next if $_ eq '.';
  1228. +         next if $_ eq '..';
  1229. +         $nlink = $prune = 0;
  1230. +         $name = "$dir/$_";
  1231. +         &wanted;
  1232. +         if ($subcount > 0) {    # Seen all the subdirs?
  1233. +         # Get link count and check for directoriness.
  1234. +         ($dev,$ino,$mode,$nlink) = lstat($_) unless $nlink;
  1235. +         
  1236. +         if (-d _) {
  1237. +             # It really is a directory, so do it recursively.
  1238. +             if (!$prune && chdir $_) {
  1239. +             &finddir($name,$nlink);
  1240. +             chdir '..';
  1241. +             }
  1242. +             --$subcount;
  1243. +         }
  1244. +         }
  1245. +     }
  1246. +     }
  1247. + }
  1248. + 1;
  1249.  
  1250. Index: x2p/find2perl.SH
  1251. *** x2p/find2perl.SH.old    Fri Jun  7 12:27:57 1991
  1252. --- x2p/find2perl.SH    Fri Jun  7 12:27:58 1991
  1253. ***************
  1254. *** 128,138 ****
  1255.       elsif ($_ eq 'exec') {
  1256.       for (@cmd = (); @ARGV && $ARGV[0] ne ';'; push(@cmd,shift)) { }
  1257.       shift;
  1258. !     for (@cmd) { s/'/\\'/g; }
  1259. !     $" = "','";
  1260. !     $out .= &tab . "&exec(0, '@cmd')";
  1261. !     $" = ' ';
  1262. !     $initexec++;
  1263.       }
  1264.       elsif ($_ eq 'ok') {
  1265.       for (@cmd = (); @ARGV && $ARGV[0] ne ';'; push(@cmd,shift)) { }
  1266. --- 128,152 ----
  1267.       elsif ($_ eq 'exec') {
  1268.       for (@cmd = (); @ARGV && $ARGV[0] ne ';'; push(@cmd,shift)) { }
  1269.       shift;
  1270. !     $_ = "@cmd";
  1271. !     if (m#^(/bin/)?rm -f {}$#) {
  1272. !         if (!@ARGV) {
  1273. !         $out .= &tab . 'unlink($_)';
  1274. !         }
  1275. !         else {
  1276. !         $out .= &tab . '(unlink($_) || 1)';
  1277. !         }
  1278. !     }
  1279. !     elsif (m#^(/bin/)?rm {}$#) {
  1280. !         $out .= &tab . '(unlink($_) || warn "$name: $!\n")';
  1281. !     }
  1282. !     else {
  1283. !         for (@cmd) { s/'/\\'/g; }
  1284. !         $" = "','";
  1285. !         $out .= &tab . "&exec(0, '@cmd')";
  1286. !         $" = ' ';
  1287. !         $initexec++;
  1288. !     }
  1289.       }
  1290.       elsif ($_ eq 'ok') {
  1291.       for (@cmd = (); @ARGV && $ARGV[0] ne ';'; push(@cmd,shift)) { }
  1292. ***************
  1293. *** 202,210 ****
  1294.       }
  1295.       if (@ARGV) {
  1296.       if ($ARGV[0] eq '-o') {
  1297.           $statdone = 0 if $indent == 1 && $delayedstat;
  1298.           $saw_or++;
  1299. -         $out .= "\n" . &tab . "||\n";
  1300.           shift;
  1301.       }
  1302.       else {
  1303. --- 216,224 ----
  1304.       }
  1305.       if (@ARGV) {
  1306.       if ($ARGV[0] eq '-o') {
  1307. +         { local($statdone) = 1; $out .= "\n" . &tab . "||\n"; }
  1308.           $statdone = 0 if $indent == 1 && $delayedstat;
  1309.           $saw_or++;
  1310.           shift;
  1311.       }
  1312.       else {
  1313. ***************
  1314. *** 246,363 ****
  1315.   
  1316.   print $initfile, "\n" if $initfile;
  1317.   
  1318.   print <<"END";
  1319.   # Traverse desired filesystems
  1320.   
  1321. ! &dodirs($roots);
  1322.   $flushall
  1323.   exit;
  1324.   
  1325.   sub wanted {
  1326.   $out;
  1327. - }
  1328. - END
  1329. - print <<'END';
  1330. - sub dodirs {
  1331. -     chop($cwd = `pwd`);
  1332. -     foreach $topdir (@_) {
  1333. -     (($topdev,$topino,$topmode,$topnlink) = stat($topdir))
  1334. -       || (warn("Can't stat $topdir: $!\n"), next);
  1335. -     if (-d _) {
  1336. -         if (chdir($topdir)) {
  1337. - END
  1338. - if ($depth) {
  1339. -     print <<'END';
  1340. -         $topdir = '' if $topdir eq '/';
  1341. -         &dodir($topdir,$topnlink);
  1342. -         ($dir,$_) = ($topdir,'.');
  1343. -         $name = $topdir;
  1344. -         &wanted;
  1345. - END
  1346. - }
  1347. - else {
  1348. -     print <<'END';
  1349. -         ($dir,$_) = ($topdir,'.');
  1350. -         $name = $topdir;
  1351. -         &wanted;
  1352. -         $topdir = '' if $topdir eq '/';
  1353. -         &dodir($topdir,$topnlink);
  1354. - END
  1355. - }
  1356. - print <<'END';
  1357. -         }
  1358. -         else {
  1359. -         warn "Can't cd to $topdir: $!\n";
  1360. -         }
  1361. -     }
  1362. -     else {
  1363. -         unless (($dir,$_) = $topdir =~ m#^(.*/)(.*)$#) {
  1364. -         ($dir,$_) = ('.', $topdir);
  1365. -         }
  1366. -         chdir $dir && &wanted;
  1367. -     }
  1368. -     chdir $cwd;
  1369. -     }
  1370. - }
  1371. - sub dodir {
  1372. -     local($dir,$nlink) = @_;
  1373. -     local($dev,$ino,$mode,$subcount);
  1374. -     local($name);
  1375. -     # Get the list of files in the current directory.
  1376. -     opendir(DIR,'.') || warn "Can't open $dir: $!\n";
  1377. -     local(@filenames) = readdir(DIR);
  1378. -     closedir(DIR);
  1379. -     if ($nlink == 2) {        # This dir has no subdirectories.
  1380. -     for (@filenames) {
  1381. -         next if $_ eq '.';
  1382. -         next if $_ eq '..';
  1383. -         $name = "$dir/$_";
  1384. -         $nlink = 0;
  1385. -         &wanted;
  1386. -     }
  1387. -     }
  1388. -     else {                    # This dir has subdirectories.
  1389. -     $subcount = $nlink - 2;
  1390. -     for (@filenames) {
  1391. -         next if $_ eq '.';
  1392. -         next if $_ eq '..';
  1393. -         $nlink = $prune = 0;
  1394. -         $name = "$dir/$_";
  1395. - END
  1396. - print <<'END' unless $depth;
  1397. -         &wanted;
  1398. - END
  1399. - print <<'END';
  1400. -         if ($subcount > 0) {    # Seen all the subdirs?
  1401. -         # Get link count and check for directoriness.
  1402. -         ($dev,$ino,$mode,$nlink) = lstat($_) unless $nlink;
  1403. -         
  1404. -         if (-d _) {
  1405. -             # It really is a directory, so do it recursively.
  1406. -             if (!$prune && chdir $_) {
  1407. -             &dodir($name,$nlink);
  1408. -             chdir '..';
  1409. -             }
  1410. -             --$subcount;
  1411. -         }
  1412. -         }
  1413. - END
  1414. - print <<'END' if $depth;
  1415. -         &wanted;
  1416. - END
  1417. - print <<'END';
  1418. -     }
  1419. -     }
  1420.   }
  1421.   
  1422.   END
  1423. --- 260,277 ----
  1424.   
  1425.   print $initfile, "\n" if $initfile;
  1426.   
  1427. + $find = $depth ? "finddepth" : "find";
  1428.   print <<"END";
  1429. + require "$find.pl";
  1430.   # Traverse desired filesystems
  1431.   
  1432. ! &$find($roots);
  1433.   $flushall
  1434.   exit;
  1435.   
  1436.   sub wanted {
  1437.   $out;
  1438.   }
  1439.   
  1440.   END
  1441.  
  1442. Index: lib/finddepth.pl
  1443. *** lib/finddepth.pl.old    Fri Jun  7 12:25:13 1991
  1444. --- lib/finddepth.pl    Fri Jun  7 12:25:14 1991
  1445. ***************
  1446. *** 0 ****
  1447. --- 1,105 ----
  1448. + # Usage:
  1449. + #    require "finddepth.pl";
  1450. + #
  1451. + #    &finddepth('/foo','/bar');
  1452. + #
  1453. + #    sub wanted { ... }
  1454. + #        where wanted does whatever you want.  $dir contains the
  1455. + #        current directory name, and $_ the current filename within
  1456. + #        that directory.  $name contains "$dir/$_".  You are cd'ed
  1457. + #        to $dir when the function is called.  The function may
  1458. + #        set $prune to prune the tree.
  1459. + #
  1460. + # This library is primarily for find2perl, which, when fed
  1461. + #
  1462. + #   find2perl / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune
  1463. + #
  1464. + # spits out something like this
  1465. + #
  1466. + #    sub wanted {
  1467. + #        /^\.nfs.*$/ &&
  1468. + #        (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
  1469. + #        int(-M _) > 7 &&
  1470. + #        unlink($_)
  1471. + #        ||
  1472. + #        ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) &&
  1473. + #        $dev < 0 &&
  1474. + #        ($prune = 1);
  1475. + #    }
  1476. + sub finddepth {
  1477. +     chop($cwd = `pwd`);
  1478. +     foreach $topdir (@_) {
  1479. +     (($topdev,$topino,$topmode,$topnlink) = stat($topdir))
  1480. +       || (warn("Can't stat $topdir: $!\n"), next);
  1481. +     if (-d _) {
  1482. +         if (chdir($topdir)) {
  1483. +         $topdir =~ s,/$,, ;
  1484. +         &finddepthdir($topdir,$topnlink);
  1485. +         ($dir,$_) = ($topdir,'.');
  1486. +         $name = $topdir;
  1487. +         &wanted;
  1488. +         }
  1489. +         else {
  1490. +         warn "Can't cd to $topdir: $!\n";
  1491. +         }
  1492. +     }
  1493. +     else {
  1494. +         unless (($dir,$_) = $topdir =~ m#^(.*/)(.*)$#) {
  1495. +         ($dir,$_) = ('.', $topdir);
  1496. +         }
  1497. +         chdir $dir && &wanted;
  1498. +     }
  1499. +     chdir $cwd;
  1500. +     }
  1501. + }
  1502. + sub finddepthdir {
  1503. +     local($dir,$nlink) = @_;
  1504. +     local($dev,$ino,$mode,$subcount);
  1505. +     local($name);
  1506. +     # Get the list of files in the current directory.
  1507. +     opendir(DIR,'.') || warn "Can't open $dir: $!\n";
  1508. +     local(@filenames) = readdir(DIR);
  1509. +     closedir(DIR);
  1510. +     if ($nlink == 2) {        # This dir has no subdirectories.
  1511. +     for (@filenames) {
  1512. +         next if $_ eq '.';
  1513. +         next if $_ eq '..';
  1514. +         $name = "$dir/$_";
  1515. +         $nlink = 0;
  1516. +         &wanted;
  1517. +     }
  1518. +     }
  1519. +     else {                    # This dir has subdirectories.
  1520. +     $subcount = $nlink - 2;
  1521. +     for (@filenames) {
  1522. +         next if $_ eq '.';
  1523. +         next if $_ eq '..';
  1524. +         $nlink = $prune = 0;
  1525. +         $name = "$dir/$_";
  1526. +         if ($subcount > 0) {    # Seen all the subdirs?
  1527. +         # Get link count and check for directoriness.
  1528. +         ($dev,$ino,$mode,$nlink) = lstat($_) unless $nlink;
  1529. +         
  1530. +         if (-d _) {
  1531. +             # It really is a directory, so do it recursively.
  1532. +             if (!$prune && chdir $_) {
  1533. +             &finddepthdir($name,$nlink);
  1534. +             chdir '..';
  1535. +             }
  1536. +             --$subcount;
  1537. +         }
  1538. +         }
  1539. +         &wanted;
  1540. +     }
  1541. +     }
  1542. + }
  1543. + 1;
  1544.  
  1545. Index: form.c
  1546. Prereq: 4.0
  1547. *** form.c.old    Fri Jun  7 12:23:57 1991
  1548. --- form.c    Fri Jun  7 12:23:58 1991
  1549. ***************
  1550. *** 1,11 ****
  1551. ! /* $Header: form.c,v 4.0 91/03/20 01:19:23 lwall Locked $
  1552.    *
  1553. !  *    Copyright (c) 1989, Larry Wall
  1554.    *
  1555. !  *    You may distribute under the terms of the GNU General Public License
  1556. !  *    as specified in the README file that comes with the perl 3.0 kit.
  1557.    *
  1558.    * $Log:    form.c,v $
  1559.    * Revision 4.0  91/03/20  01:19:23  lwall
  1560.    * 4.0 baseline.
  1561.    * 
  1562. --- 1,15 ----
  1563. ! /* $RCSfile: form.c,v $$Revision: 4.0.1.1 $$Date: 91/06/07 11:07:59 $
  1564.    *
  1565. !  *    Copyright (c) 1991, Larry Wall
  1566.    *
  1567. !  *    You may distribute under the terms of either the GNU General Public
  1568. !  *    License or the Artistic License, as specified in the README file.
  1569.    *
  1570.    * $Log:    form.c,v $
  1571. +  * Revision 4.0.1.1  91/06/07  11:07:59  lwall
  1572. +  * patch4: new copyright notice
  1573. +  * patch4: default top-of-form format is now FILEHANDLE_TOP
  1574. +  * 
  1575.    * Revision 4.0  91/03/20  01:19:23  lwall
  1576.    * 4.0 baseline.
  1577.    * 
  1578. ***************
  1579. *** 325,335 ****
  1580.       return count;
  1581.   }
  1582.   
  1583. ! do_write(orec,stio,sp)
  1584.   struct outrec *orec;
  1585. ! register STIO *stio;
  1586.   int sp;
  1587.   {
  1588.       FILE *ofp = stio->ofp;
  1589.   
  1590.   #ifdef DEBUGGING
  1591. --- 329,340 ----
  1592.       return count;
  1593.   }
  1594.   
  1595. ! do_write(orec,stab,sp)
  1596.   struct outrec *orec;
  1597. ! STAB *stab;
  1598.   int sp;
  1599.   {
  1600. +     register STIO *stio = stab_io(stab);
  1601.       FILE *ofp = stio->ofp;
  1602.   
  1603.   #ifdef DEBUGGING
  1604. ***************
  1605. *** 340,348 ****
  1606.       if (stio->lines_left < orec->o_lines) {
  1607.       if (!stio->top_stab) {
  1608.           STAB *topstab;
  1609.   
  1610. !         if (!stio->top_name)
  1611. !         stio->top_name = savestr("top");
  1612.           topstab = stabent(stio->top_name,FALSE);
  1613.           if (!topstab || !stab_form(topstab)) {
  1614.           stio->lines_left = 100000000;
  1615. --- 345,362 ----
  1616.       if (stio->lines_left < orec->o_lines) {
  1617.       if (!stio->top_stab) {
  1618.           STAB *topstab;
  1619. +         char tmpbuf[256];
  1620.   
  1621. !         if (!stio->top_name) {
  1622. !         if (!stio->fmt_name)
  1623. !             stio->fmt_name = savestr(stab_name(stab));
  1624. !         sprintf(tmpbuf, "%s_TOP", stio->fmt_name);
  1625. !         topstab = stabent(tmpbuf,FALSE);
  1626. !         if (topstab && stab_form(topstab))
  1627. !             stio->top_name = savestr(tmpbuf);
  1628. !         else
  1629. !             stio->top_name = savestr("top");
  1630. !         }
  1631.           topstab = stabent(stio->top_name,FALSE);
  1632.           if (!topstab || !stab_form(topstab)) {
  1633.           stio->lines_left = 100000000;
  1634.  
  1635. Index: form.h
  1636. Prereq: 4.0
  1637. *** form.h.old    Fri Jun  7 12:24:01 1991
  1638. --- form.h    Fri Jun  7 12:24:01 1991
  1639. ***************
  1640. *** 1,11 ****
  1641. ! /* $Header: form.h,v 4.0 91/03/20 01:19:37 lwall Locked $
  1642.    *
  1643. !  *    Copyright (c) 1989, Larry Wall
  1644.    *
  1645. !  *    You may distribute under the terms of the GNU General Public License
  1646. !  *    as specified in the README file that comes with the perl 3.0 kit.
  1647.    *
  1648.    * $Log:    form.h,v $
  1649.    * Revision 4.0  91/03/20  01:19:37  lwall
  1650.    * 4.0 baseline.
  1651.    * 
  1652. --- 1,14 ----
  1653. ! /* $RCSfile: form.h,v $$Revision: 4.0.1.1 $$Date: 91/06/07 11:08:20 $
  1654.    *
  1655. !  *    Copyright (c) 1991, Larry Wall
  1656.    *
  1657. !  *    You may distribute under the terms of either the GNU General Public
  1658. !  *    License or the Artistic License, as specified in the README file.
  1659.    *
  1660.    * $Log:    form.h,v $
  1661. +  * Revision 4.0.1.1  91/06/07  11:08:20  lwall
  1662. +  * patch4: new copyright notice
  1663. +  * 
  1664.    * Revision 4.0  91/03/20  01:19:37  lwall
  1665.    * 4.0 baseline.
  1666.    * 
  1667.  
  1668. Index: h2pl/getioctlsizes
  1669. *** h2pl/getioctlsizes.old    Fri Jun  7 12:24:03 1991
  1670. --- h2pl/getioctlsizes    Fri Jun  7 12:24:04 1991
  1671. ***************
  1672. *** 3,9 ****
  1673.   open (IOCTLS,'/usr/include/sys/ioctl.h') || die "ioctl open failed";
  1674.   
  1675.   while (<IOCTLS>) {
  1676. !     if (/^\s*#\s*define\s+\w+\s+_IO(R|W|WR)\(\w+,\s*\w+,\s*([^)]+)/) {
  1677.       $need{$2}++;
  1678.       } 
  1679.   }
  1680. --- 3,9 ----
  1681.   open (IOCTLS,'/usr/include/sys/ioctl.h') || die "ioctl open failed";
  1682.   
  1683.   while (<IOCTLS>) {
  1684. !     if (/^\s*#\s*define\s+\w+\s+_IO(R|W|WR)\('?\w+'?,\s*\w+,\s*([^)]+)/) {
  1685.       $need{$2}++;
  1686.       } 
  1687.   }
  1688.  
  1689. Index: t/op/groups.t
  1690. *** t/op/groups.t.old    Fri Jun  7 12:27:06 1991
  1691. --- t/op/groups.t    Fri Jun  7 12:27:06 1991
  1692. ***************
  1693. *** 9,18 ****
  1694.   
  1695.   for (split(' ', $()) {
  1696.       next if $seen{$_}++;
  1697. !     push(@gr, (getgrgid($_))[0]); 
  1698.   } 
  1699.   $gr1 = join(' ',sort @gr);
  1700. ! $gr2 = join(' ', sort split(' ',`groups`));
  1701.   #print "gr1 is <$gr1>\n";
  1702.   #print "gr2 is <$gr2>\n";
  1703.   print +($gr1 eq $gr2) ? "ok 1\n" : "not ok 1\n";
  1704. --- 9,24 ----
  1705.   
  1706.   for (split(' ', $()) {
  1707.       next if $seen{$_}++;
  1708. !     ($group) = getgrgid($_);
  1709. !     if (defined $group) {
  1710. !     push(@gr, $group);
  1711. !     }
  1712. !     else {
  1713. !     push(@gr, $_);
  1714. !     }
  1715.   } 
  1716.   $gr1 = join(' ',sort @gr);
  1717. ! $gr2 = join(' ', sort split(' ',`/usr/ucb/groups`));
  1718.   #print "gr1 is <$gr1>\n";
  1719.   #print "gr2 is <$gr2>\n";
  1720.   print +($gr1 eq $gr2) ? "ok 1\n" : "not ok 1\n";
  1721.  
  1722. Index: handy.h
  1723. Prereq: 4.0
  1724. *** handy.h.old    Fri Jun  7 12:24:09 1991
  1725. --- handy.h    Fri Jun  7 12:24:09 1991
  1726. ***************
  1727. *** 1,11 ****
  1728. ! /* $Header: handy.h,v 4.0 91/03/20 01:22:15 lwall Locked $
  1729.    *
  1730. !  *    Copyright (c) 1989, Larry Wall
  1731.    *
  1732. !  *    You may distribute under the terms of the GNU General Public License
  1733. !  *    as specified in the README file that comes with the perl 3.0 kit.
  1734.    *
  1735.    * $Log:    handy.h,v $
  1736.    * Revision 4.0  91/03/20  01:22:15  lwall
  1737.    * 4.0 baseline.
  1738.    * 
  1739. --- 1,14 ----
  1740. ! /* $RCSfile: handy.h,v $$Revision: 4.0.1.1 $$Date: 91/06/07 11:09:56 $
  1741.    *
  1742. !  *    Copyright (c) 1991, Larry Wall
  1743.    *
  1744. !  *    You may distribute under the terms of either the GNU General Public
  1745. !  *    License or the Artistic License, as specified in the README file.
  1746.    *
  1747.    * $Log:    handy.h,v $
  1748. +  * Revision 4.0.1.1  91/06/07  11:09:56  lwall
  1749. +  * patch4: new copyright notice
  1750. +  * 
  1751.    * Revision 4.0  91/03/20  01:22:15  lwall
  1752.    * 4.0 baseline.
  1753.    * 
  1754.  
  1755. Index: x2p/handy.h
  1756. *** x2p/handy.h.old    Fri Jun  7 12:28:01 1991
  1757. --- x2p/handy.h    Fri Jun  7 12:28:02 1991
  1758. ***************
  1759. *** 1,11 ****
  1760. ! /* $RCSfile: handy.h,v $$Revision: 4.0.1.1 $$Date: 91/04/12 09:29:08 $
  1761.    *
  1762. !  *    Copyright (c) 1989, Larry Wall
  1763.    *
  1764. !  *    You may distribute under the terms of the GNU General Public License
  1765. !  *    as specified in the README file that comes with the perl 3.0 kit.
  1766.    *
  1767.    * $Log:    handy.h,v $
  1768.    * Revision 4.0.1.1  91/04/12  09:29:08  lwall
  1769.    * patch1: random cleanup in cpp namespace
  1770.    * 
  1771. --- 1,14 ----
  1772. ! /* $RCSfile: handy.h,v $$Revision: 4.0.1.2 $$Date: 91/06/07 12:15:43 $
  1773.    *
  1774. !  *    Copyright (c) 1991, Larry Wall
  1775.    *
  1776. !  *    You may distribute under the terms of either the GNU General Public
  1777. !  *    License or the Artistic License, as specified in the README file.
  1778.    *
  1779.    * $Log:    handy.h,v $
  1780. +  * Revision 4.0.1.2  91/06/07  12:15:43  lwall
  1781. +  * patch4: new copyright notice
  1782. +  * 
  1783.    * Revision 4.0.1.1  91/04/12  09:29:08  lwall
  1784.    * patch1: random cleanup in cpp namespace
  1785.    * 
  1786.  
  1787. Index: hash.c
  1788. Prereq: 4.0
  1789. *** hash.c.old    Fri Jun  7 12:24:12 1991
  1790. --- hash.c    Fri Jun  7 12:24:12 1991
  1791. ***************
  1792. *** 1,11 ****
  1793. ! /* $Header: hash.c,v 4.0 91/03/20 01:22:26 lwall Locked $
  1794.    *
  1795. !  *    Copyright (c) 1989, Larry Wall
  1796.    *
  1797. !  *    You may distribute under the terms of the GNU General Public License
  1798. !  *    as specified in the README file that comes with the perl 3.0 kit.
  1799.    *
  1800.    * $Log:    hash.c,v $
  1801.    * Revision 4.0  91/03/20  01:22:26  lwall
  1802.    * 4.0 baseline.
  1803.    * 
  1804. --- 1,14 ----
  1805. ! /* $RCSfile: hash.c,v $$Revision: 4.0.1.1 $$Date: 91/06/07 11:10:11 $
  1806.    *
  1807. !  *    Copyright (c) 1991, Larry Wall
  1808.    *
  1809. !  *    You may distribute under the terms of either the GNU General Public
  1810. !  *    License or the Artistic License, as specified in the README file.
  1811.    *
  1812.    * $Log:    hash.c,v $
  1813. +  * Revision 4.0.1.1  91/06/07  11:10:11  lwall
  1814. +  * patch4: new copyright notice
  1815. +  * 
  1816.    * Revision 4.0  91/03/20  01:22:26  lwall
  1817.    * 4.0 baseline.
  1818.    * 
  1819.  
  1820. *** End of Patch 6 ***
  1821. exit 0 # Just in case...
  1822. -- 
  1823. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1824. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1825. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1826. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1827.