home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume20 / perl3.0 / patch1 < prev    next >
Encoding:
Internet Message Format  |  1989-11-01  |  51.0 KB

  1. Subject:  v20i108:  Perl, a language with features of C/sed/awk/shell/etc, Patch1
  2. Newsgroups: comp.sources.unix,comp.sources.bugs
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5. Followup-To: comp.sources.d
  6.  
  7. Submitted-by: Larry Wall <lwall@jpl-devvax.jpl.nasa.gov>
  8. Posting-number: Volume 20, Issue 108
  9. Archive-name: perl3.0/patch1
  10.  
  11. [  IMPORTANT!  PLEASE READ THIS NOTE:
  12.  
  13.     This is the first patch for PERL3.0.  There might be others.
  14.     If you are retrieving this from a comp.sources.unix archive
  15.     site, that site MIGHT NOT have all the latest patches:  patches
  16.     don't always get posted to c.s.u, for a variety of reasons.
  17.     (If you questions or problems with this, please mail to
  18.     rsalz@uunet.uu.net.)  This patch, as with all of Larry Wall's
  19.     patches, contains information on how to get all the later patches.
  20.     If you cannot subscribe to comp.sources.bugs, SAVE THIS and
  21.     use the instructions below to get the new patches.
  22.  
  23.     Thank you for your cooperation.  If you follow these guidelines,
  24.     you will reduce needless net and email bandwith, and make it easier
  25.     on the moderator, and the archive sites.  /r$  ]
  26.  
  27. System: perl version 3.0
  28. Patch #: 1
  29. Priority: MEDIUM-HIGH
  30. Subject: Configure now includes user's PATH
  31. Subject: Configure decides whether to include <netinet/in.h>
  32. Subject: Configure checks Sun shared library in preference to /lib/libc.a
  33. Subject: Fixed Configure typo of -fpcc-struct-return
  34. Subject: Configure figures out if BSD shadow passwords are installed
  35. Subject: Clarified prompts regarding gid and uid types
  36. Subject: Makefile.SH needed some more .h dependecies
  37. Subject: Documented that "make test" is needed before "cd t; TEST"
  38. Subject: reverse didn't work
  39. Subject: heuristically disabled optimization could cause core dump
  40. Subject: unless was broken when run under the debugger
  41. Subject: Configure vfork test was backwards
  42. Subject: numeric switch optimization was broken
  43. Subject: Configure now checks for BSD shadow passwords
  44. Subject: split in a subroutine wrongly freed referenced arguments
  45. Subject: glob didn't free a temporary string
  46. Subject: RCS expanded an unintended $Header in lib/perldb.pl
  47. Subject: some declarations were missing from malloc.c
  48. Subject: sparc machines had alignment problems in malloc.c
  49. Subject: vfork now conditionally defined based on VFORK
  50. Subject: DEC risc machines have a buggy memcmp
  51. Subject: perl.h now includes <netinet/in.h> if it exists
  52. Subject: documented the desirability of unnecessary parentheses
  53. Subject: grandfathered "format stdout"
  54. Subject: operator(); is now normally equivalent to operator;
  55. Subject: string ordering tests were wrong
  56. Subject: $/ now works even when STDSTDIO undefined
  57. Subject: rearranged some structures to align doubles better on Gould
  58. Subject: added regression tests for reverse
  59. Subject: disambiguated word after "sort" better
  60. Subject: declared bcopy if necessary
  61. Subject: in x2p/Makefile.SH, added dependency on ../config.sh
  62.  
  63. Description:
  64.     Configure had difficulties if the user's path had weird components.
  65.     Now Configure appends the user's path to its own.
  66.  
  67.     Some machines need <netinet/in.h> included in order to define
  68.     certain macros for packing or unpacking network order data.
  69.  
  70.     On Suns, the shared library is used by default.  If it doesn't
  71.     contain something contained in /lib/libc.a, then Configure was
  72.     getting things wrong (such as gethostent()).  Now Configure uses
  73.     the shared library if it's there in preference to libc.a.
  74.  
  75.     When gcc was selected as the compiler, the cc flags defaulted to
  76.     -fpcc_struct_return.  Unfortunately, the underlines should be hyphens.
  77.  
  78.     Configure figures out if BSD shadow passwords are installed and
  79.     the getpw* routines now return slightly different data in the
  80.     affected fields.
  81.  
  82.     Some of the prompts in Configure with regard to gid and uid types
  83.     were unclear as to their intended use.  They are now a little
  84.     clearer.
  85.  
  86.     Sometimes you could change a .h file and taintperl and suidperl
  87.     didn't get remade correctly because of missing dependencies
  88.     in the Makefile.
  89.  
  90.     The README file was misleading about the fact that you have to
  91.     say "make test" before you can "cd t; TEST"
  92.  
  93.     The reverse operator was busted in two different ways.  Should work
  94.     better now.  There are now regression tests for it.
  95.  
  96.     Some of the optimizations that perl does are disabled after period
  97.     of time if perl decides they aren't doing any good.  One of these
  98.     caused a string to be freed that was later referenced via another
  99.     pointer, causing core dumps.  The free turned out to be unnecessary,
  100.     so it was removed.
  101.  
  102.     The unless modifier was broken when run under the debugger, due to
  103.     the invert() routine in perl.y inverting the logic on the DB
  104.     subroutine call instead of the command the unless was modifying.
  105.  
  106.     Configure vfork test was backwards.  It now works like other defines.
  107.  
  108.     The numeric switch optimization was broken, and caused code to be
  109.     bypassed.  This has been fixed.
  110.  
  111.     A split in a subroutine that has no target splits into @_.
  112.     Unfortunately, this wrongly freed any referenced arguments passed
  113.     in through @_, causing confusing behavior later in the program.
  114.  
  115.     File globbing (<foo.*>) left one orphaned string each time it
  116.     called the shell to do the glob.
  117.  
  118.     RCS expanded an unintended $Header in lib/perldb.pl.  This has
  119.     been fixed simply by replacing the $ with a .
  120.  
  121.     Some forward declarations of static functions were missing from
  122.     malloc.c.
  123.  
  124.     There's a strut in malloc for mips machines to extend the overhead
  125.     union to the size of a double.  This was also enabled for sparc
  126.     machines.
  127.  
  128.     DEC risc machines are reported to have a buggy memcmp.  I've put
  129.     some conditional code into perl.h which I think will undef MEMCMP
  130.     appropriately.
  131.  
  132.     In perl.man.4, I documented the desirability of using parens even
  133.     where they aren't strictly necessary.
  134.  
  135.     I've grandfathered "format stdout" to be the same as "format STDOUT".
  136.  
  137.     Unary operators can be called with no argument.  The corresponding
  138.     function call form using empty parens () didn't work right, though
  139.     it did for certain functions in 2.0.  It now works in 3.0.
  140.  
  141.     The string ordering tests were wrong for pairs of strings in which
  142.     one string was a prefix of the other.  This affected lt, le, gt,
  143.     ge, and the sort operator when used with no subroutine.
  144.  
  145.     $/ didn't work with the stupid code used when STDSTDIO was undefined.
  146.     The stupid code has been replaced with smarter code that can do
  147.     it right.  Special thanks to Piet van Oostrum for the code.
  148.  
  149.     Goulds work better if the union in STR is at an 8 byte boundary.
  150.     The fields were rearranged somewhat to provide this.
  151.  
  152.     "sort keys %a" should now work right (though parens are still
  153.     desirable for readability).
  154.  
  155.     bcopy() needed a forward declaration on some machines.
  156.  
  157.     In x2p/Makefile.SH, added dependency on ../config.sh so that it
  158.     gets linked down from above if it got removed for some reason.
  159.  
  160. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your perl source
  161.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  162.     If you don't have the patch program, apply the following by hand,
  163.     or get patch (version 2.0, latest patchlevel).
  164.  
  165.     After patching:
  166.         Configure -d
  167.         make depend
  168.         make
  169.         make test
  170.         make install
  171.  
  172.     If patch indicates that patchlevel is the wrong version, you may need
  173.     to apply one or more previous patches, or the patch may already
  174.     have been applied.  See the patchlevel.h file to find out what has or
  175.     has not been applied.  In any event, don't continue with the patch.
  176.  
  177.     If you are missing previous patches (hah!) they can be obtained from me:
  178.  
  179.     Larry Wall
  180.     lwall@jpl-devvax.jpl.nasa.gov
  181.  
  182.     If you send a mail message of the following form it will greatly speed
  183.     processing:
  184.  
  185.     Subject: Command
  186.     @SH mailpatch PATH perl 3.0 LIST
  187.            ^ note the c
  188.  
  189.     where PATH is a return path FROM ME TO YOU either in Internet notation,
  190.     or in bang notation from some well-known host, and LIST is the number
  191.     of one or more patches you need, separated by spaces, commas, and/or
  192.     hyphens.  Saying 35- says everything from 35 to the end.
  193.  
  194.  
  195.     You can also get the patches via anonymous FTP from
  196.     jpl-devvax.jpl.nasa.gov (128.149.1.143).
  197.  
  198. Index: patchlevel.h
  199. Prereq: 0
  200. 1c1
  201. < #define PATCHLEVEL 0
  202. ---
  203. > #define PATCHLEVEL 1
  204.  
  205. Index: Configure
  206. Prereq: 3.0
  207. *** Configure.old    Thu Oct 26 23:29:20 1989
  208. --- Configure    Thu Oct 26 23:29:22 1989
  209. ***************
  210. *** 8,14 ****
  211.   # and edit it to reflect your system.  Some packages may include samples
  212.   # of config.h for certain machines, so you might look for one of those.)
  213.   #
  214. ! # $Header: Configure,v 3.0 89/10/18 15:04:55 lwall Locked $
  215.   #
  216.   # Yes, you may rip this off to use in other distribution packages.
  217.   # (Note: this Configure script was generated automatically.  Rather than
  218. --- 8,14 ----
  219.   # and edit it to reflect your system.  Some packages may include samples
  220.   # of config.h for certain machines, so you might look for one of those.)
  221.   #
  222. ! # $Header: Configure,v 3.0.1.1 89/10/26 22:58:02 lwall Locked $
  223.   #
  224.   # Yes, you may rip this off to use in other distribution packages.
  225.   # (Note: this Configure script was generated automatically.  Rather than
  226. ***************
  227. *** 15,21 ****
  228.   # working with this copy of Configure, you may wish to get metaconfig.)
  229.   
  230.   : sanity checks
  231. ! PATH='.:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin'
  232.   export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0; kill $$)
  233.   
  234.   if test ! -t 0; then
  235. --- 15,21 ----
  236.   # working with this copy of Configure, you may wish to get metaconfig.)
  237.   
  238.   : sanity checks
  239. ! PATH=".:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin:$PATH"
  240.   export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0; kill $$)
  241.   
  242.   if test ! -t 0; then
  243. ***************
  244. *** 157,162 ****
  245. --- 157,163 ----
  246.   d_dirnamlen=''
  247.   i_fcntl=''
  248.   i_grp=''
  249. + i_niin=''
  250.   i_pwd=''
  251.   d_pwquota=''
  252.   d_pwage=''
  253. ***************
  254. *** 424,430 ****
  255.   cpp
  256.   egrep
  257.   test
  258. - uname
  259.   "
  260.   for file in $loclist; do
  261.       xxx=`loc $file $file $pth`
  262. --- 425,430 ----
  263. ***************
  264. *** 513,533 ****
  265.   rmlist="$rmlist loc"
  266.   
  267.   : get list of predefined functions in a handy place
  268. - if $test -n "$uname"; then
  269. -     os=`$uname -s`
  270. - else
  271. -     os=unknown
  272. - fi
  273.   echo " "
  274. ! if test -f /lib/libc.a; then
  275.       echo "Your C library is in /lib/libc.a.  You're normal."
  276.       libc=/lib/libc.a
  277.   else
  278. !     if test "$os" = DomainOS ; then
  279. !     ans=`loc libc blurfl/dyick $libpth`
  280. !     else
  281. !     ans=`loc libc.a blurfl/dyick $libpth`
  282. !     fi
  283.       if test ! -f "$ans"; then
  284.       ans=`loc clib blurfl/dyick $libpth`
  285.       fi
  286. --- 513,529 ----
  287.   rmlist="$rmlist loc"
  288.   
  289.   : get list of predefined functions in a handy place
  290.   echo " "
  291. ! set /usr/lib/libc.so.[0-9]*
  292. ! eval set \$$#
  293. ! if test -f "$1"; then
  294. !     echo "Your shared C library is in $1."
  295. !     libc="$1"
  296. ! elif test -f /lib/libc.a; then
  297.       echo "Your C library is in /lib/libc.a.  You're normal."
  298.       libc=/lib/libc.a
  299.   else
  300. !     ans=`loc libc.a blurfl/dyick $libpth`
  301.       if test ! -f "$ans"; then
  302.       ans=`loc clib blurfl/dyick $libpth`
  303.       fi
  304. ***************
  305. *** 573,583 ****
  306.   if $contains '^printf$' libc.list >/dev/null 2>&1; then
  307.       echo "done"
  308.   else
  309. !     if test "$os" = DomainOS ; then
  310. !         $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' <libc.tmp >libc.list
  311. !     else
  312.       $sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' <libc.tmp >libc.list
  313. -     fi
  314.       $contains '^printf$' libc.list >/dev/null 2>&1 || \
  315.          $sed -n -e 's/^_//' \
  316.             -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p' <libc.tmp >libc.list
  317. --- 569,577 ----
  318.   if $contains '^printf$' libc.list >/dev/null 2>&1; then
  319.       echo "done"
  320.   else
  321. !     $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' <libc.tmp >libc.list
  322. !     $contains '^printf$' libc.list >/dev/null 2>&1 || \
  323.       $sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' <libc.tmp >libc.list
  324.       $contains '^printf$' libc.list >/dev/null 2>&1 || \
  325.          $sed -n -e 's/^_//' \
  326.             -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p' <libc.tmp >libc.list
  327. ***************
  328. *** 1102,1108 ****
  329.   
  330.   case "$ccflags" in
  331.   '') case "$cc" in
  332. !     gcc) dflt='-fpcc_struct_return';;
  333.       *) dflt='none';;
  334.       esac
  335.       ;;
  336. --- 1096,1102 ----
  337.   
  338.   case "$ccflags" in
  339.   '') case "$cc" in
  340. !     gcc) dflt='-fpcc-struct-return';;
  341.       *) dflt='none';;
  342.       esac
  343.       ;;
  344. ***************
  345. *** 1553,1559 ****
  346.       echo "dbm.h not found."
  347.   fi
  348.   
  349. ! : see if this is an pwd system
  350.   echo " "
  351.   if $test -r /usr/include/pwd.h ; then
  352.       i_pwd="$define"
  353. --- 1547,1553 ----
  354.       echo "dbm.h not found."
  355.   fi
  356.   
  357. ! : see if this is a pwd system
  358.   echo " "
  359.   if $test -r /usr/include/pwd.h ; then
  360.       i_pwd="$define"
  361. ***************
  362. *** 1568,1577 ****
  363. --- 1562,1589 ----
  364.       else
  365.       d_pwage="$undef"
  366.       fi
  367. +     if $contains 'pw_change' /usr/include/pwd.h >/dev/null 2>&1; then
  368. +     d_pwchange="$define"
  369. +     else
  370. +     d_pwchange="$undef"
  371. +     fi
  372. +     if $contains 'pw_class' /usr/include/pwd.h >/dev/null 2>&1; then
  373. +     d_pwclass="$define"
  374. +     else
  375. +     d_pwclass="$undef"
  376. +     fi
  377. +     if $contains 'pw_expire' /usr/include/pwd.h >/dev/null 2>&1; then
  378. +     d_pwexpire="$define"
  379. +     else
  380. +     d_pwexpire="$undef"
  381. +     fi
  382.   else
  383.       i_pwd="$undef"
  384.       d_pwquota="$undef"
  385.       d_pwage="$undef"
  386. +     d_pwchange="$undef"
  387. +     d_pwclass="$undef"
  388. +     d_pwexpire="$undef"
  389.       echo "No pwd.h found."
  390.   fi
  391.   
  392. ***************
  393. *** 1868,1874 ****
  394.   esac
  395.   cont=true
  396.   echo " "
  397. ! rp="What type are group ids on this system declared as? [$dflt]"
  398.   $echo $n "$rp $c"
  399.   . myread
  400.   gidtype="$ans"
  401. --- 1880,1886 ----
  402.   esac
  403.   cont=true
  404.   echo " "
  405. ! rp="What type are the group ids are returned by getgroups()? [$dflt]"
  406.   $echo $n "$rp $c"
  407.   . myread
  408.   gidtype="$ans"
  409. ***************
  410. *** 1893,1898 ****
  411. --- 1905,1920 ----
  412.       echo "No grp.h found."
  413.   fi
  414.   
  415. + : see if this is a netinet/in.h system
  416. + echo " "
  417. + if $test -r /usr/include/netinet/in.h ; then
  418. +     i_niin="$define"
  419. +     echo "netinet/in.h found."
  420. + else
  421. +     i_niin="$undef"
  422. +     echo "No netinet/in.h found."
  423. + fi
  424.   : see if this is a sys/dir.h system
  425.   echo " "
  426.   if $test -r /usr/include/sys/dir.h ; then
  427. ***************
  428. *** 2070,2076 ****
  429.   esac
  430.   cont=true
  431.   echo " "
  432. ! rp="What type are user ids on this system declared as? [$dflt]"
  433.   $echo $n "$rp $c"
  434.   . myread
  435.   uidtype="$ans"
  436. --- 2092,2098 ----
  437.   esac
  438.   cont=true
  439.   echo " "
  440. ! rp="What type are user ids returned by getuid(), etc.? [$dflt]"
  441.   $echo $n "$rp $c"
  442.   . myread
  443.   uidtype="$ans"
  444. ***************
  445. *** 2307,2312 ****
  446. --- 2329,2335 ----
  447.   d_dirnamlen='$d_dirnamlen'
  448.   i_fcntl='$i_fcntl'
  449.   i_grp='$i_grp'
  450. + i_niin='$i_niin'
  451.   i_pwd='$i_pwd'
  452.   d_pwquota='$d_pwquota'
  453.   d_pwage='$d_pwage'
  454.  
  455. Index: Makefile.SH
  456. Prereq: 3.0
  457. *** Makefile.SH.old    Thu Oct 26 23:29:29 1989
  458. --- Makefile.SH    Thu Oct 26 23:29:31 1989
  459. ***************
  460. *** 25,33 ****
  461.   
  462.   echo "Extracting Makefile (with variable substitutions)"
  463.   cat >Makefile <<!GROK!THIS!
  464. ! # $Header: Makefile.SH,v 3.0 89/10/18 15:06:43 lwall Locked $
  465.   #
  466.   # $Log:    Makefile.SH,v $
  467.   # Revision 3.0  89/10/18  15:06:43  lwall
  468.   # 3.0 baseline
  469.   # 
  470. --- 25,36 ----
  471.   
  472.   echo "Extracting Makefile (with variable substitutions)"
  473.   cat >Makefile <<!GROK!THIS!
  474. ! # $Header: Makefile.SH,v 3.0.1.1 89/10/26 23:00:38 lwall Locked $
  475.   #
  476.   # $Log:    Makefile.SH,v $
  477. + # Revision 3.0.1.1  89/10/26  23:00:38  lwall
  478. + # patch1: Makefile.SH needed some more .h dependecies
  479. + # 
  480.   # Revision 3.0  89/10/18  15:06:43  lwall
  481.   # 3.0 baseline
  482.   # 
  483. ***************
  484. *** 125,246 ****
  485.   
  486.   # Replicating all this junk is yucky, but I don't see a portable way to fix it.
  487.   
  488. ! tperl.o: perl.c perly.h perl.h EXTERN.h regexp.h util.h INTERN.h handy.h \
  489. !     config.h stab.h
  490.       /bin/rm -f tperl.c
  491.       $(SLN) perl.c tperl.c
  492.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tperl.c
  493.       /bin/rm -f tperl.c
  494.   
  495. ! tperly.o: perly.c
  496.       /bin/rm -f tperly.c
  497.       $(SLN) perly.c tperly.c
  498.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tperly.c
  499.       /bin/rm -f tperly.c
  500.   
  501. ! sperly.o: perly.c perl.h handy.h perly.h patchlevel.h
  502.       /bin/rm -f sperly.c
  503.       $(SLN) perly.c sperly.c
  504.       $(CC) -c -DTAINT -DIAMSUID $(CFLAGS) $(LARGE) sperly.c
  505.       /bin/rm -f sperly.c
  506.   
  507. ! tarray.o: array.c
  508.       /bin/rm -f tarray.c
  509.       $(SLN) array.c tarray.c
  510.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tarray.c
  511.       /bin/rm -f tarray.c
  512.   
  513. ! tcmd.o: cmd.c
  514.       /bin/rm -f tcmd.c
  515.       $(SLN) cmd.c tcmd.c
  516.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tcmd.c
  517.       /bin/rm -f tcmd.c
  518.   
  519. ! tcons.o: cons.c
  520.       /bin/rm -f tcons.c
  521.       $(SLN) cons.c tcons.c
  522.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tcons.c
  523.       /bin/rm -f tcons.c
  524.   
  525. ! tconsarg.o: consarg.c
  526.       /bin/rm -f tconsarg.c
  527.       $(SLN) consarg.c tconsarg.c
  528.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tconsarg.c
  529.       /bin/rm -f tconsarg.c
  530.   
  531. ! tdoarg.o: doarg.c
  532.       /bin/rm -f tdoarg.c
  533.       $(SLN) doarg.c tdoarg.c
  534.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tdoarg.c
  535.       /bin/rm -f tdoarg.c
  536.   
  537. ! tdoio.o: doio.c
  538.       /bin/rm -f tdoio.c
  539.       $(SLN) doio.c tdoio.c
  540.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tdoio.c
  541.       /bin/rm -f tdoio.c
  542.   
  543. ! tdolist.o: dolist.c
  544.       /bin/rm -f tdolist.c
  545.       $(SLN) dolist.c tdolist.c
  546.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tdolist.c
  547.       /bin/rm -f tdolist.c
  548.   
  549. ! tdump.o: dump.c
  550.       /bin/rm -f tdump.c
  551.       $(SLN) dump.c tdump.c
  552.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tdump.c
  553.       /bin/rm -f tdump.c
  554.   
  555. ! teval.o: eval.c
  556.       /bin/rm -f teval.c
  557.       $(SLN) eval.c teval.c
  558.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) teval.c
  559.       /bin/rm -f teval.c
  560.   
  561. ! tform.o: form.c
  562.       /bin/rm -f tform.c
  563.       $(SLN) form.c tform.c
  564.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tform.c
  565.       /bin/rm -f tform.c
  566.   
  567. ! thash.o: hash.c
  568.       /bin/rm -f thash.c
  569.       $(SLN) hash.c thash.c
  570.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) thash.c
  571.       /bin/rm -f thash.c
  572.   
  573. ! tregcomp.o: regcomp.c
  574.       /bin/rm -f tregcomp.c
  575.       $(SLN) regcomp.c tregcomp.c
  576.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tregcomp.c
  577.       /bin/rm -f tregcomp.c
  578.   
  579. ! tregexec.o: regexec.c
  580.       /bin/rm -f tregexec.c
  581.       $(SLN) regexec.c tregexec.c
  582.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tregexec.c
  583.       /bin/rm -f tregexec.c
  584.   
  585. ! tstab.o: stab.c
  586.       /bin/rm -f tstab.c
  587.       $(SLN) stab.c tstab.c
  588.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tstab.c
  589.       /bin/rm -f tstab.c
  590.   
  591. ! tstr.o: str.c
  592.       /bin/rm -f tstr.c
  593.       $(SLN) str.c tstr.c
  594.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tstr.c
  595.       /bin/rm -f tstr.c
  596.   
  597. ! ttoke.o: toke.c
  598.       /bin/rm -f ttoke.c
  599.       $(SLN) toke.c ttoke.c
  600.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) ttoke.c
  601.       /bin/rm -f ttoke.c
  602.   
  603. ! tutil.o: util.c
  604.       /bin/rm -f tutil.c
  605.       $(SLN) util.c tutil.c
  606.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tutil.c
  607. --- 128,248 ----
  608.   
  609.   # Replicating all this junk is yucky, but I don't see a portable way to fix it.
  610.   
  611. ! tperl.o: perl.c perly.h $(h)
  612.       /bin/rm -f tperl.c
  613.       $(SLN) perl.c tperl.c
  614.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tperl.c
  615.       /bin/rm -f tperl.c
  616.   
  617. ! tperly.o: perly.c perly.h $(h)
  618.       /bin/rm -f tperly.c
  619.       $(SLN) perly.c tperly.c
  620.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tperly.c
  621.       /bin/rm -f tperly.c
  622.   
  623. ! sperly.o: perly.c perly.h patchlevel.h $(h)
  624.       /bin/rm -f sperly.c
  625.       $(SLN) perly.c sperly.c
  626.       $(CC) -c -DTAINT -DIAMSUID $(CFLAGS) $(LARGE) sperly.c
  627.       /bin/rm -f sperly.c
  628.   
  629. ! tarray.o: array.c $(h)
  630.       /bin/rm -f tarray.c
  631.       $(SLN) array.c tarray.c
  632.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tarray.c
  633.       /bin/rm -f tarray.c
  634.   
  635. ! tcmd.o: cmd.c $(h)
  636.       /bin/rm -f tcmd.c
  637.       $(SLN) cmd.c tcmd.c
  638.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tcmd.c
  639.       /bin/rm -f tcmd.c
  640.   
  641. ! tcons.o: cons.c $(h)
  642.       /bin/rm -f tcons.c
  643.       $(SLN) cons.c tcons.c
  644.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tcons.c
  645.       /bin/rm -f tcons.c
  646.   
  647. ! tconsarg.o: consarg.c $(h)
  648.       /bin/rm -f tconsarg.c
  649.       $(SLN) consarg.c tconsarg.c
  650.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tconsarg.c
  651.       /bin/rm -f tconsarg.c
  652.   
  653. ! tdoarg.o: doarg.c $(h)
  654.       /bin/rm -f tdoarg.c
  655.       $(SLN) doarg.c tdoarg.c
  656.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tdoarg.c
  657.       /bin/rm -f tdoarg.c
  658.   
  659. ! tdoio.o: doio.c $(h)
  660.       /bin/rm -f tdoio.c
  661.       $(SLN) doio.c tdoio.c
  662.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tdoio.c
  663.       /bin/rm -f tdoio.c
  664.   
  665. ! tdolist.o: dolist.c $(h)
  666.       /bin/rm -f tdolist.c
  667.       $(SLN) dolist.c tdolist.c
  668.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tdolist.c
  669.       /bin/rm -f tdolist.c
  670.   
  671. ! tdump.o: dump.c $(h)
  672.       /bin/rm -f tdump.c
  673.       $(SLN) dump.c tdump.c
  674.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tdump.c
  675.       /bin/rm -f tdump.c
  676.   
  677. ! teval.o: eval.c $(h)
  678.       /bin/rm -f teval.c
  679.       $(SLN) eval.c teval.c
  680.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) teval.c
  681.       /bin/rm -f teval.c
  682.   
  683. ! tform.o: form.c $(h)
  684.       /bin/rm -f tform.c
  685.       $(SLN) form.c tform.c
  686.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tform.c
  687.       /bin/rm -f tform.c
  688.   
  689. ! thash.o: hash.c $(h)
  690.       /bin/rm -f thash.c
  691.       $(SLN) hash.c thash.c
  692.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) thash.c
  693.       /bin/rm -f thash.c
  694.   
  695. ! tregcomp.o: regcomp.c $(h)
  696.       /bin/rm -f tregcomp.c
  697.       $(SLN) regcomp.c tregcomp.c
  698.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tregcomp.c
  699.       /bin/rm -f tregcomp.c
  700.   
  701. ! tregexec.o: regexec.c $(h)
  702.       /bin/rm -f tregexec.c
  703.       $(SLN) regexec.c tregexec.c
  704.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tregexec.c
  705.       /bin/rm -f tregexec.c
  706.   
  707. ! tstab.o: stab.c $(h)
  708.       /bin/rm -f tstab.c
  709.       $(SLN) stab.c tstab.c
  710.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tstab.c
  711.       /bin/rm -f tstab.c
  712.   
  713. ! tstr.o: str.c $(h)
  714.       /bin/rm -f tstr.c
  715.       $(SLN) str.c tstr.c
  716.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tstr.c
  717.       /bin/rm -f tstr.c
  718.   
  719. ! ttoke.o: toke.c $(h)
  720.       /bin/rm -f ttoke.c
  721.       $(SLN) toke.c ttoke.c
  722.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) ttoke.c
  723.       /bin/rm -f ttoke.c
  724.   
  725. ! tutil.o: util.c $(h)
  726.       /bin/rm -f tutil.c
  727.       $(SLN) util.c tutil.c
  728.       $(CC) -c -DTAINT $(CFLAGS) $(LARGE) tutil.c
  729. ***************
  730. *** 252,259 ****
  731.       mv y.tab.c perl.c
  732.       mv y.tab.h perly.h
  733.   
  734. ! perl.o: perl.c perly.h perl.h EXTERN.h regexp.h util.h INTERN.h handy.h \
  735. !     config.h arg.h stab.h
  736.       $(CC) -c $(CFLAGS) $(LARGE) perl.c
  737.   
  738.   perl.man: perl.man.1 perl.man.2 perl.man.3 perl.man.4 patchlevel.h perl
  739. --- 254,260 ----
  740.       mv y.tab.c perl.c
  741.       mv y.tab.h perly.h
  742.   
  743. ! perl.o: perl.c perly.h $(h)
  744.       $(CC) -c $(CFLAGS) $(LARGE) perl.c
  745.   
  746.   perl.man: perl.man.1 perl.man.2 perl.man.3 perl.man.4 patchlevel.h perl
  747.  
  748. Index: x2p/Makefile.SH
  749. Prereq: 3.0
  750. *** x2p/Makefile.SH.old    Thu Oct 26 23:31:39 1989
  751. --- x2p/Makefile.SH    Thu Oct 26 23:31:40 1989
  752. ***************
  753. *** 18,26 ****
  754.   esac
  755.   echo "Extracting x2p/Makefile (with variable substitutions)"
  756.   cat >Makefile <<!GROK!THIS!
  757. ! # $Header: Makefile.SH,v 3.0 89/10/18 15:33:52 lwall Locked $
  758.   #
  759.   # $Log:    Makefile.SH,v $
  760.   # Revision 3.0  89/10/18  15:33:52  lwall
  761.   # 3.0 baseline
  762.   # 
  763. --- 18,29 ----
  764.   esac
  765.   echo "Extracting x2p/Makefile (with variable substitutions)"
  766.   cat >Makefile <<!GROK!THIS!
  767. ! # $Header: Makefile.SH,v 3.0.1.1 89/10/26 23:29:11 lwall Locked $
  768.   #
  769.   # $Log:    Makefile.SH,v $
  770. + # Revision 3.0.1.1  89/10/26  23:29:11  lwall
  771. + # patch1: in x2p/Makefile.SH, added dependency on ../config.sh
  772. + # 
  773.   # Revision 3.0  89/10/18  15:33:52  lwall
  774.   # 3.0 baseline
  775.   # 
  776. ***************
  777. *** 143,148 ****
  778. --- 146,155 ----
  779.   
  780.   shlist:
  781.       echo $(sh) | tr ' ' '\012' >.shlist
  782. + config.sh: ../config.sh
  783. +     rm -f config.sh
  784. +     ln ../config.sh .
  785.   
  786.   # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  787.   $(obj):
  788.  
  789. Index: README
  790. *** README.old    Thu Oct 26 23:29:35 1989
  791. --- README    Thu Oct 26 23:29:36 1989
  792. ***************
  793. *** 65,72 ****
  794.       This will run the regression tests on the perl you just made.
  795.       If it doesn't say "All tests successful" then something went wrong.
  796.       See the README in the t subdirectory.  Note that you can't run it
  797. !     in background if this disables opening of /dev/tty.  If in doubt, just
  798. !     cd to the t directory and run TEST by hand.
  799.   
  800.   6)  make install
  801.   
  802. --- 65,73 ----
  803.       This will run the regression tests on the perl you just made.
  804.       If it doesn't say "All tests successful" then something went wrong.
  805.       See the README in the t subdirectory.  Note that you can't run it
  806. !     in background if this disables opening of /dev/tty.  If "make test"
  807. !     bombs out, just cd to the t directory and run TEST by hand to see if
  808. !     it makes any difference.
  809.   
  810.   6)  make install
  811.   
  812.  
  813. Index: arg.h
  814. Prereq: 3.0
  815. *** arg.h.old    Thu Oct 26 23:29:41 1989
  816. --- arg.h    Thu Oct 26 23:29:43 1989
  817. ***************
  818. *** 1,4 ****
  819. ! /* $Header: arg.h,v 3.0 89/10/18 15:08:27 lwall Locked $
  820.    *
  821.    *    Copyright (c) 1989, Larry Wall
  822.    *
  823. --- 1,4 ----
  824. ! /* $Header: arg.h,v 3.0.1.1 89/10/26 23:02:35 lwall Locked $
  825.    *
  826.    *    Copyright (c) 1989, Larry Wall
  827.    *
  828. ***************
  829. *** 6,11 ****
  830. --- 6,14 ----
  831.    *    as specified in the README file that comes with the perl 3.0 kit.
  832.    *
  833.    * $Log:    arg.h,v $
  834. +  * Revision 3.0.1.1  89/10/26  23:02:35  lwall
  835. +  * patch1: reverse didn't work
  836. +  * 
  837.    * Revision 3.0  89/10/18  15:08:27  lwall
  838.    * 3.0 baseline
  839.    * 
  840. ***************
  841. *** 805,811 ****
  842.       A(3,3,0),    /* AASSIGN */
  843.       A(0,0,0),    /* SASSIGN */
  844.       A(0,0,0),    /* DUMP */
  845. !     A(0,0,0),    /* REVERSE */
  846.       A(1,0,0),    /* ADDROF */
  847.       A(1,1,1),    /* SOCKET */
  848.       A(1,1,0),    /* BIND */
  849. --- 808,814 ----
  850.       A(3,3,0),    /* AASSIGN */
  851.       A(0,0,0),    /* SASSIGN */
  852.       A(0,0,0),    /* DUMP */
  853. !     A(0,3,0),    /* REVERSE */
  854.       A(1,0,0),    /* ADDROF */
  855.       A(1,1,1),    /* SOCKET */
  856.       A(1,1,0),    /* BIND */
  857.  
  858. Index: cmd.c
  859. Prereq: 3.0
  860. *** cmd.c.old    Thu Oct 26 23:29:50 1989
  861. --- cmd.c    Thu Oct 26 23:29:52 1989
  862. ***************
  863. *** 1,4 ****
  864. ! /* $Header: cmd.c,v 3.0 89/10/18 15:09:02 lwall Locked $
  865.    *
  866.    *    Copyright (c) 1989, Larry Wall
  867.    *
  868. --- 1,4 ----
  869. ! /* $Header: cmd.c,v 3.0.1.1 89/10/26 23:04:21 lwall Locked $
  870.    *
  871.    *    Copyright (c) 1989, Larry Wall
  872.    *
  873. ***************
  874. *** 6,11 ****
  875. --- 6,14 ----
  876.    *    as specified in the README file that comes with the perl 3.0 kit.
  877.    *
  878.    * $Log:    cmd.c,v $
  879. +  * Revision 3.0.1.1  89/10/26  23:04:21  lwall
  880. +  * patch1: heuristically disabled optimization could cause core dump
  881. +  * 
  882.    * Revision 3.0  89/10/18  15:09:02  lwall
  883.    * 3.0 baseline
  884.    * 
  885. ***************
  886. *** 416,423 ****
  887.           }
  888.           }
  889.           if (--cmd->c_short->str_u.str_useful < 0) {
  890. -         str_free(cmd->c_short);
  891. -         cmd->c_short = Nullstr;
  892.           cmdflags &= ~CF_OPTIMIZE;
  893.           cmdflags |= CFT_EVAL;    /* never try this optimization again */
  894.           cmd->c_flags = cmdflags;
  895. --- 419,424 ----
  896.  
  897. Index: cmd.h
  898. Prereq: 3.0
  899. *** cmd.h.old    Thu Oct 26 23:29:55 1989
  900. --- cmd.h    Thu Oct 26 23:29:56 1989
  901. ***************
  902. *** 1,4 ****
  903. ! /* $Header: cmd.h,v 3.0 89/10/18 15:09:15 lwall Locked $
  904.    *
  905.    *    Copyright (c) 1989, Larry Wall
  906.    *
  907. --- 1,4 ----
  908. ! /* $Header: cmd.h,v 3.0.1.1 89/10/26 23:05:43 lwall Locked $
  909.    *
  910.    *    Copyright (c) 1989, Larry Wall
  911.    *
  912. ***************
  913. *** 6,11 ****
  914. --- 6,14 ----
  915.    *    as specified in the README file that comes with the perl 3.0 kit.
  916.    *
  917.    * $Log:    cmd.h,v $
  918. +  * Revision 3.0.1.1  89/10/26  23:05:43  lwall
  919. +  * patch1: unless was broken when run under the debugger
  920. +  * 
  921.    * Revision 3.0  89/10/18  15:09:15  lwall
  922.    * 3.0 baseline
  923.    * 
  924. ***************
  925. *** 53,58 ****
  926. --- 56,62 ----
  927.   #define CF_ONCE 010000    /* we've already pushed the label on the stack */
  928.   #define CF_FLIP 020000    /* on a match do flipflop */
  929.   #define CF_TERM 040000    /* value of this cmd might be returned */
  930. + #define CF_DBSUB 0100000 /* this is an inserted cmd for debugging */
  931.   
  932.   #define CFT_FALSE 0    /* c_expr is always false */
  933.   #define CFT_TRUE 1    /* c_expr is always true */
  934.  
  935. Index: config.h.SH
  936. *** config.h.SH.old    Thu Oct 26 23:29:59 1989
  937. --- config.h.SH    Thu Oct 26 23:30:01 1989
  938. ***************
  939. *** 385,395 ****
  940.    */
  941.   #$d_varargs    VARARGS        /**/
  942.   
  943. ! /* vfork:
  944. !  *    This symbol, if defined, remaps the vfork routine to fork if the
  945. !  *    vfork() routine isn't supported here.
  946.    */
  947. ! #$d_vfork    vfork fork    /**/
  948.   
  949.   /* VOIDSIG:
  950.    *    This symbol is defined if this system declares "void (*signal())()" in
  951. --- 385,394 ----
  952.    */
  953.   #$d_varargs    VARARGS        /**/
  954.   
  955. ! /* VFORK:
  956. !  *    This symbol, if defined, indicates that vfork() exists.
  957.    */
  958. ! #$d_vfork    VFORK    /**/
  959.   
  960.   /* VOIDSIG:
  961.    *    This symbol is defined if this system declares "void (*signal())()" in
  962. ***************
  963. *** 443,448 ****
  964. --- 442,453 ----
  965.    */
  966.   #$i_grp    I_GRP        /**/
  967.   
  968. + /* I_NETINET_IN:
  969. +  *    This symbol, if defined, indicates to the C program that it should
  970. +  *    include netinet/in.h.
  971. +  */
  972. + #$i_niin    I_NETINET_IN        /**/
  973.   /* I_PWD:
  974.    *    This symbol, if defined, indicates to the C program that it should
  975.    *    include pwd.h.
  976. ***************
  977. *** 455,463 ****
  978. --- 460,483 ----
  979.    *    This symbol, if defined, indicates to the C program that struct passwd
  980.    *    contains pw_age.
  981.    */
  982. + /* PWCHANGE:
  983. +  *    This symbol, if defined, indicates to the C program that struct passwd
  984. +  *    contains pw_change.
  985. +  */
  986. + /* PWCLASS:
  987. +  *    This symbol, if defined, indicates to the C program that struct passwd
  988. +  *    contains pw_class.
  989. +  */
  990. + /* PWEXPIRE:
  991. +  *    This symbol, if defined, indicates to the C program that struct passwd
  992. +  *    contains pw_expire.
  993. +  */
  994.   #$i_pwd    I_PWD        /**/
  995.   #$d_pwquota    PWQUOTA        /**/
  996.   #$d_pwage    PWAGE        /**/
  997. + #$d_pwage    PWCHANGE    /**/
  998. + #$d_pwage    PWCLASS        /**/
  999. + #$d_pwage    PWEXPIRE    /**/
  1000.   
  1001.   /* I_SYSDIR:
  1002.    *    This symbol, if defined, indicates to the C program that it should
  1003.  
  1004. Index: cons.c
  1005. Prereq: 3.0
  1006. *** cons.c.old    Thu Oct 26 23:30:06 1989
  1007. --- cons.c    Thu Oct 26 23:30:08 1989
  1008. ***************
  1009. *** 1,4 ****
  1010. ! /* $Header: cons.c,v 3.0 89/10/18 15:10:23 lwall Locked $
  1011.    *
  1012.    *    Copyright (c) 1989, Larry Wall
  1013.    *
  1014. --- 1,4 ----
  1015. ! /* $Header: cons.c,v 3.0.1.1 89/10/26 23:09:01 lwall Locked $
  1016.    *
  1017.    *    Copyright (c) 1989, Larry Wall
  1018.    *
  1019. ***************
  1020. *** 6,11 ****
  1021. --- 6,15 ----
  1022.    *    as specified in the README file that comes with the perl 3.0 kit.
  1023.    *
  1024.    * $Log:    cons.c,v $
  1025. +  * Revision 3.0.1.1  89/10/26  23:09:01  lwall
  1026. +  * patch1: numeric switch optimization was broken
  1027. +  * patch1: unless was broken when run under the debugger
  1028. +  * 
  1029.    * Revision 3.0  89/10/18  15:10:23  lwall
  1030.    * 3.0 baseline
  1031.    * 
  1032. ***************
  1033. *** 285,295 ****
  1034.   
  1035.       Newz(105,loc, max - min + 3, CMD*);
  1036.       loc++;
  1037.       while (count--) {
  1038.       i = (int)str_gnum(cur->c_short);
  1039.       i -= min;
  1040. -     max -= min;
  1041. -     max++;
  1042.       switch(cur->c_slen) {
  1043.       case O_LE:
  1044.           i++;
  1045. --- 289,299 ----
  1046.   
  1047.       Newz(105,loc, max - min + 3, CMD*);
  1048.       loc++;
  1049. +     max -= min;
  1050. +     max++;
  1051.       while (count--) {
  1052.       i = (int)str_gnum(cur->c_short);
  1053.       i -= min;
  1054.       switch(cur->c_slen) {
  1055.       case O_LE:
  1056.           i++;
  1057. ***************
  1058. *** 314,319 ****
  1059. --- 318,324 ----
  1060.       }
  1061.       loc--;
  1062.       min--;
  1063. +     max++;
  1064.       for (i = 0; i <= max; i++)
  1065.       if (!loc[i])
  1066.           loc[i] = cur;
  1067. ***************
  1068. *** 378,384 ****
  1069.       stab2arg(A_WORD,DBstab),
  1070.       make_list(arg),
  1071.       Nullarg);
  1072. !     cmd->c_flags |= CF_COND;
  1073.       cmd->c_line = head->c_line;
  1074.       cmd->c_label = head->c_label;
  1075.       cmd->c_file = filename;
  1076. --- 383,389 ----
  1077.       stab2arg(A_WORD,DBstab),
  1078.       make_list(arg),
  1079.       Nullarg);
  1080. !     cmd->c_flags |= CF_COND|CF_DBSUB;
  1081.       cmd->c_line = head->c_line;
  1082.       cmd->c_label = head->c_label;
  1083.       cmd->c_file = filename;
  1084. ***************
  1085. *** 797,808 ****
  1086.   
  1087.   CMD *
  1088.   invert(cmd)
  1089. ! register CMD *cmd;
  1090.   {
  1091. !     if (cmd->c_head)
  1092. !     cmd->c_head->c_flags ^= CF_INVERT;
  1093. !     else
  1094. !     cmd->c_flags ^= CF_INVERT;
  1095.       return cmd;
  1096.   }
  1097.   
  1098. --- 802,815 ----
  1099.   
  1100.   CMD *
  1101.   invert(cmd)
  1102. ! CMD *cmd;
  1103.   {
  1104. !     register CMD *targ = cmd;
  1105. !     if (targ->c_head)
  1106. !     targ = targ->c_head;
  1107. !     if (targ->c_flags & CF_DBSUB)
  1108. !     targ = targ->c_next;
  1109. !     targ->c_flags ^= CF_INVERT;
  1110.       return cmd;
  1111.   }
  1112.   
  1113.  
  1114. Index: doio.c
  1115. Prereq: 3.0
  1116. *** doio.c.old    Thu Oct 26 23:30:14 1989
  1117. --- doio.c    Thu Oct 26 23:30:16 1989
  1118. ***************
  1119. *** 1,4 ****
  1120. ! /* $Header: doio.c,v 3.0 89/10/18 15:10:54 lwall Locked $
  1121.    *
  1122.    *    Copyright (c) 1989, Larry Wall
  1123.    *
  1124. --- 1,4 ----
  1125. ! /* $Header: doio.c,v 3.0.1.1 89/10/26 23:10:05 lwall Locked $
  1126.    *
  1127.    *    Copyright (c) 1989, Larry Wall
  1128.    *
  1129. ***************
  1130. *** 6,11 ****
  1131. --- 6,14 ----
  1132.    *    as specified in the README file that comes with the perl 3.0 kit.
  1133.    *
  1134.    * $Log:    doio.c,v $
  1135. +  * Revision 3.0.1.1  89/10/26  23:10:05  lwall
  1136. +  * patch1: Configure now checks for BSD shadow passwords
  1137. +  * 
  1138.    * Revision 3.0  89/10/18  15:10:54  lwall
  1139.    * 3.0 baseline
  1140.    * 
  1141. ***************
  1142. *** 1580,1585 ****
  1143. --- 1583,1591 ----
  1144.       (void)astore(ary, ++sp, str = str_static(&str_no));
  1145.       str_numset(str, (double)pwent->pw_gid);
  1146.       (void)astore(ary, ++sp, str = str_static(&str_no));
  1147. + #ifdef PWCHANGE
  1148. +     str_numset(str, (double)pwent->pw_change);
  1149. + #else
  1150.   #ifdef PWQUOTA
  1151.       str_numset(str, (double)pwent->pw_quota);
  1152.   #else
  1153. ***************
  1154. *** 1587,1594 ****
  1155. --- 1593,1605 ----
  1156.       str_set(str, pwent->pw_age);
  1157.   #endif
  1158.   #endif
  1159. + #endif
  1160.       (void)astore(ary, ++sp, str = str_static(&str_no));
  1161. + #ifdef PWCLASS
  1162. +     str_set(str,pwent->pw_class);
  1163. + #else
  1164.       str_set(str, pwent->pw_comment);
  1165. + #endif
  1166.       (void)astore(ary, ++sp, str = str_static(&str_no));
  1167.       str_set(str, pwent->pw_gecos);
  1168.       (void)astore(ary, ++sp, str = str_static(&str_no));
  1169. ***************
  1170. *** 1595,1600 ****
  1171. --- 1606,1615 ----
  1172.       str_set(str, pwent->pw_dir);
  1173.       (void)astore(ary, ++sp, str = str_static(&str_no));
  1174.       str_set(str, pwent->pw_shell);
  1175. + #ifdef PWEXPIRE
  1176. +     (void)astore(ary, ++sp, str = str_static(&str_no));
  1177. +     str_numset(str, (double)pwent->pw_expire);
  1178. + #endif
  1179.       }
  1180.   
  1181.       return sp;
  1182.  
  1183. Index: dolist.c
  1184. Prereq: 3.0
  1185. *** dolist.c.old    Thu Oct 26 23:30:24 1989
  1186. --- dolist.c    Thu Oct 26 23:30:26 1989
  1187. ***************
  1188. *** 1,4 ****
  1189. ! /* $Header: dolist.c,v 3.0 89/10/18 15:11:02 lwall Locked $
  1190.    *
  1191.    *    Copyright (c) 1989, Larry Wall
  1192.    *
  1193. --- 1,4 ----
  1194. ! /* $Header: dolist.c,v 3.0.1.1 89/10/26 23:11:51 lwall Locked $
  1195.    *
  1196.    *    Copyright (c) 1989, Larry Wall
  1197.    *
  1198. ***************
  1199. *** 6,11 ****
  1200. --- 6,15 ----
  1201.    *    as specified in the README file that comes with the perl 3.0 kit.
  1202.    *
  1203.    * $Log:    dolist.c,v $
  1204. +  * Revision 3.0.1.1  89/10/26  23:11:51  lwall
  1205. +  * patch1: split in a subroutine wrongly freed referenced arguments
  1206. +  * patch1: reverse didn't work
  1207. +  * 
  1208.    * Revision 3.0  89/10/18  15:11:02  lwall
  1209.    * 3.0 baseline
  1210.    * 
  1211. ***************
  1212. *** 285,292 ****
  1213.   #endif
  1214.       ary = stab_xarray(spat->spat_repl[1].arg_ptr.arg_stab);
  1215.       if (ary && ((ary->ary_flags & ARF_REAL) || gimme != G_ARRAY)) {
  1216. -     ary->ary_flags |= ARF_REAL;
  1217.       realarray = 1;
  1218.       ary->ary_fill = -1;
  1219.       sp = -1;    /* temporarily switch stacks */
  1220.       }
  1221. --- 289,300 ----
  1222.   #endif
  1223.       ary = stab_xarray(spat->spat_repl[1].arg_ptr.arg_stab);
  1224.       if (ary && ((ary->ary_flags & ARF_REAL) || gimme != G_ARRAY)) {
  1225.       realarray = 1;
  1226. +     if (!(ary->ary_flags & ARF_REAL)) {
  1227. +         ary->ary_flags |= ARF_REAL;
  1228. +         for (i = ary->ary_fill; i >= 0; i--)
  1229. +         ary->ary_array[i] = Nullstr;    /* don't free mere refs */
  1230. +     }
  1231.       ary->ary_fill = -1;
  1232.       sp = -1;    /* temporarily switch stacks */
  1233.       }
  1234. ***************
  1235. *** 754,761 ****
  1236.       }
  1237.       while (i-- > 0) {
  1238.       *up++ = *down;
  1239. !     *down-- = *up;
  1240.       }
  1241.       return arglast[2] - 1;
  1242.   }
  1243.   
  1244. --- 762,772 ----
  1245.       }
  1246.       while (i-- > 0) {
  1247.       *up++ = *down;
  1248. !     if (i-- > 0)
  1249. !         *down-- = *up;
  1250.       }
  1251. +     i = arglast[2] - arglast[1];
  1252. +     Copy(down+1,up,i/2,STR*);
  1253.       return arglast[2] - 1;
  1254.   }
  1255.   
  1256.  
  1257. Index: evalargs.xc
  1258. Prereq: 3.0
  1259. *** evalargs.xc.old    Thu Oct 26 23:30:31 1989
  1260. --- evalargs.xc    Thu Oct 26 23:30:32 1989
  1261. ***************
  1262. *** 2,10 ****
  1263.    * kit sizes from getting too big.
  1264.    */
  1265.   
  1266. ! /* $Header: evalargs.xc,v 3.0 89/10/18 15:17:16 lwall Locked $
  1267.    *
  1268.    * $Log:    evalargs.xc,v $
  1269.    * Revision 3.0  89/10/18  15:17:16  lwall
  1270.    * 3.0 baseline
  1271.    * 
  1272. --- 2,13 ----
  1273.    * kit sizes from getting too big.
  1274.    */
  1275.   
  1276. ! /* $Header: evalargs.xc,v 3.0.1.1 89/10/26 23:12:55 lwall Locked $
  1277.    *
  1278.    * $Log:    evalargs.xc,v $
  1279. +  * Revision 3.0.1.1  89/10/26  23:12:55  lwall
  1280. +  * patch1: glob didn't free a temporary string
  1281. +  * 
  1282.    * Revision 3.0  89/10/18  15:17:16  lwall
  1283.    * 3.0 baseline
  1284.    * 
  1285. ***************
  1286. *** 275,280 ****
  1287. --- 278,284 ----
  1288.               }
  1289.               (void)do_open(last_in_stab,tmpstr->str_ptr);
  1290.               fp = stab_io(last_in_stab)->ifp;
  1291. +             str_free(tmpstr);
  1292.               }
  1293.           }
  1294.           }
  1295.  
  1296. Index: malloc.c
  1297. Prereq: 3.0
  1298. *** malloc.c.old    Thu Oct 26 23:30:42 1989
  1299. --- malloc.c    Thu Oct 26 23:30:43 1989
  1300. ***************
  1301. *** 1,6 ****
  1302. ! /* $Header: malloc.c,v 3.0 89/10/18 15:20:39 lwall Locked $
  1303.    *
  1304.    * $Log:    malloc.c,v $
  1305.    * Revision 3.0  89/10/18  15:20:39  lwall
  1306.    * 3.0 baseline
  1307.    * 
  1308. --- 1,10 ----
  1309. ! /* $Header: malloc.c,v 3.0.1.1 89/10/26 23:15:05 lwall Locked $
  1310.    *
  1311.    * $Log:    malloc.c,v $
  1312. +  * Revision 3.0.1.1  89/10/26  23:15:05  lwall
  1313. +  * patch1: some declarations were missing from malloc.c
  1314. +  * patch1: sparc machines had alignment problems in malloc.c
  1315. +  * 
  1316.    * Revision 3.0  89/10/18  15:20:39  lwall
  1317.    * 3.0 baseline
  1318.    * 
  1319. ***************
  1320. *** 27,32 ****
  1321. --- 31,38 ----
  1322.   #include "EXTERN.h"
  1323.   #include "perl.h"
  1324.   
  1325. + static findbucket(), morecore();
  1326.   /* I don't much care whether these are defined in sys/types.h--LAW */
  1327.   
  1328.   #define u_char unsigned char
  1329. ***************
  1330. *** 44,50 ****
  1331.    */
  1332.   union    overhead {
  1333.       union    overhead *ov_next;    /* when free */
  1334. ! #ifdef mips
  1335.       double  strut;            /* alignment problems */
  1336.   #endif
  1337.       struct {
  1338. --- 50,56 ----
  1339.    */
  1340.   union    overhead {
  1341.       union    overhead *ov_next;    /* when free */
  1342. ! #if defined (mips) || defined (sparc)
  1343.       double  strut;            /* alignment problems */
  1344.   #endif
  1345.       struct {
  1346.  
  1347. Index: t/op.sort
  1348. Prereq: 3.0
  1349. *** t/op.sort.old    Thu Oct 26 23:31:20 1989
  1350. --- t/op.sort    Thu Oct 26 23:31:21 1989
  1351. ***************
  1352. *** 1,8 ****
  1353.   #!./perl
  1354.   
  1355. ! # $Header: op.sort,v 3.0 89/10/18 15:31:19 lwall Locked $
  1356.   
  1357. ! print "1..3\n";
  1358.   
  1359.   sub reverse { $a lt $b ? 1 : $a gt $b ? -1 : 0; }
  1360.   
  1361. --- 1,8 ----
  1362.   #!./perl
  1363.   
  1364. ! # $Header: op.sort,v 3.0.1.1 89/10/26 23:25:37 lwall Locked $
  1365.   
  1366. ! print "1..8\n";
  1367.   
  1368.   sub reverse { $a lt $b ? 1 : $a gt $b ? -1 : 0; }
  1369.   
  1370. ***************
  1371. *** 17,19 ****
  1372. --- 17,39 ----
  1373.   
  1374.   $x = join('', sort @george, 'to', @harry);
  1375.   print ($x eq 'AbelAxedCainPunishedcatchaseddoggonetoxyz'?"ok 3\n":"not ok 3\n");
  1376. + @a = ();
  1377. + @b = reverse @a;
  1378. + print ("@b" eq "" ? "ok 4\n" : "not ok 4 (@b)\n");
  1379. + @a = (1);
  1380. + @b = reverse @a;
  1381. + print ("@b" eq "1" ? "ok 5\n" : "not ok 5 (@b)\n");
  1382. + @a = (1,2);
  1383. + @b = reverse @a;
  1384. + print ("@b" eq "2 1" ? "ok 6\n" : "not ok 6 (@b)\n");
  1385. + @a = (1,2,3);
  1386. + @b = reverse @a;
  1387. + print ("@b" eq "3 2 1" ? "ok 7\n" : "not ok 7 (@b)\n");
  1388. + @a = (1,2,3,4);
  1389. + @b = reverse @a;
  1390. + print ("@b" eq "4 3 2 1" ? "ok 8\n" : "not ok 8 (@b)\n");
  1391.  
  1392. Index: perl.h
  1393. Prereq: 3.0
  1394. *** perl.h.old    Thu Oct 26 23:30:47 1989
  1395. --- perl.h    Thu Oct 26 23:30:48 1989
  1396. ***************
  1397. *** 1,4 ****
  1398. ! /* $Header: perl.h,v 3.0 89/10/18 15:21:21 lwall Locked $
  1399.    *
  1400.    *    Copyright (c) 1989, Larry Wall
  1401.    *
  1402. --- 1,4 ----
  1403. ! /* $Header: perl.h,v 3.0.1.1 89/10/26 23:17:08 lwall Locked $
  1404.    *
  1405.    *    Copyright (c) 1989, Larry Wall
  1406.    *
  1407. ***************
  1408. *** 6,11 ****
  1409. --- 6,16 ----
  1410.    *    as specified in the README file that comes with the perl 3.0 kit.
  1411.    *
  1412.    * $Log:    perl.h,v $
  1413. +  * Revision 3.0.1.1  89/10/26  23:17:08  lwall
  1414. +  * patch1: vfork now conditionally defined based on VFORK
  1415. +  * patch1: DEC risc machines have a buggy memcmp
  1416. +  * patch1: perl.h now includes <netinet/in.h> if it exists
  1417. +  * 
  1418.    * Revision 3.0  89/10/18  15:21:21  lwall
  1419.    * 3.0 baseline
  1420.    * 
  1421. ***************
  1422. *** 24,29 ****
  1423. --- 29,42 ----
  1424.   #   endif
  1425.   #endif
  1426.   
  1427. + #ifndef VFORK
  1428. + #   define vfork fork
  1429. + #endif
  1430. + #if defined(MEMCMP) && defined(mips) && BYTEORDER == 01234
  1431. + #undef MEMCMP
  1432. + #endif
  1433.   #ifdef MEMCPY
  1434.   extern char *memcpy(), *memset();
  1435.   #define bcopy(s1,s2,l) memcpy(s2,s1,l)
  1436. ***************
  1437. *** 37,42 ****
  1438. --- 50,59 ----
  1439.   #include <ctype.h>
  1440.   #include <setjmp.h>
  1441.   #include <sys/param.h>    /* if this needs types.h we're still wrong */
  1442. + #ifdef I_NETINET_IN
  1443. + #include <netinet/in.h>
  1444. + #endif
  1445.   
  1446.   #ifndef _TYPES_        /* If types.h defines this it's easy. */
  1447.   #ifndef major        /* Does everyone's types.h define this? */
  1448.  
  1449. Index: perl.man.4
  1450. Prereq: 3.0
  1451. *** perl.man.4.old    Thu Oct 26 23:30:54 1989
  1452. --- perl.man.4    Thu Oct 26 23:30:56 1989
  1453. ***************
  1454. *** 1,7 ****
  1455.   ''' Beginning of part 4
  1456. ! ''' $Header: perl.man.4,v 3.0 89/10/18 15:21:55 lwall Locked $
  1457.   '''
  1458.   ''' $Log:    perl.man.4,v $
  1459.   ''' Revision 3.0  89/10/18  15:21:55  lwall
  1460.   ''' 3.0 baseline
  1461.   ''' 
  1462. --- 1,10 ----
  1463.   ''' Beginning of part 4
  1464. ! ''' $Header: perl.man.4,v 3.0.1.1 89/10/26 23:18:43 lwall Locked $
  1465.   '''
  1466.   ''' $Log:    perl.man.4,v $
  1467. + ''' Revision 3.0.1.1  89/10/26  23:18:43  lwall
  1468. + ''' patch1: documented the desirability of unnecessary parentheses
  1469. + ''' 
  1470.   ''' Revision 3.0  89/10/18  15:21:55  lwall
  1471.   ''' 3.0 baseline
  1472.   ''' 
  1473. ***************
  1474. *** 992,997 ****
  1475. --- 995,1012 ----
  1476.   The defaults are there for lazy systems programmers writing one-shot
  1477.   programs.
  1478.   If you want your program to be readable, consider supplying the argument.
  1479. + .Sp
  1480. + Along the same lines, just because you
  1481. + .I can
  1482. + omit parentheses in many places doesn't mean that you ought to:
  1483. + .nf
  1484. +     return print reverse sort num values array;
  1485. +     return print(reverse(sort num (values(%array))));
  1486. + .fi
  1487. + When in doubt, parenthesize.
  1488. + At the very least it will let some poor schmuck bounce on the % key in vi.
  1489.   .Ip 2. 4 4
  1490.   Don't go through silly contortions to exit a loop at the top or the
  1491.   bottom, when
  1492. ***************
  1493. *** 1017,1022 ****
  1494. --- 1032,1039 ----
  1495.   .Ip 6. 4 4
  1496.   For portability, when using features that may not be implemented on every
  1497.   machine, test the construct in an eval to see if it fails.
  1498. + If you know what version or patchlevel a particular feature was implemented,
  1499. + you can test $] to see if it will be there.
  1500.   .Ip 4. 4 4
  1501.   Choose mnemonic indentifiers.
  1502.   .Ip 5. 4 4
  1503.  
  1504. Index: perl.y
  1505. Prereq: 3.0
  1506. *** perl.y.old    Thu Oct 26 23:31:02 1989
  1507. --- perl.y    Thu Oct 26 23:31:03 1989
  1508. ***************
  1509. *** 1,4 ****
  1510. ! /* $Header: perl.y,v 3.0 89/10/18 15:22:04 lwall Locked $
  1511.    *
  1512.    *    Copyright (c) 1989, Larry Wall
  1513.    *
  1514. --- 1,4 ----
  1515. ! /* $Header: perl.y,v 3.0.1.1 89/10/26 23:20:41 lwall Locked $
  1516.    *
  1517.    *    Copyright (c) 1989, Larry Wall
  1518.    *
  1519. ***************
  1520. *** 6,11 ****
  1521. --- 6,15 ----
  1522.    *    as specified in the README file that comes with the perl 3.0 kit.
  1523.    *
  1524.    * $Log:    perl.y,v $
  1525. +  * Revision 3.0.1.1  89/10/26  23:20:41  lwall
  1526. +  * patch1: grandfathered "format stdout"
  1527. +  * patch1: operator(); is now normally equivalent to operator;
  1528. +  * 
  1529.    * Revision 3.0  89/10/18  15:22:04  lwall
  1530.    * 3.0 baseline
  1531.    * 
  1532. ***************
  1533. *** 276,282 ****
  1534.       ;
  1535.   
  1536.   format    :    FORMAT WORD '=' FORMLIST
  1537. !             { stab_form(stabent($2,TRUE)) = $4; Safefree($2);}
  1538.       |    FORMAT '=' FORMLIST
  1539.               { stab_form(stabent("STDOUT",TRUE)) = $3; }
  1540.       ;
  1541. --- 280,292 ----
  1542.       ;
  1543.   
  1544.   format    :    FORMAT WORD '=' FORMLIST
  1545. !             { if (strEQ($2,"stdout"))
  1546. !                 stab_form(stabent("STDOUT",TRUE)) = $4;
  1547. !               else if (strEQ($2,"stderr"))
  1548. !                 stab_form(stabent("STDERR",TRUE)) = $4;
  1549. !               else
  1550. !                 stab_form(stabent($2,TRUE)) = $4;
  1551. !               Safefree($2);}
  1552.       |    FORMAT '=' FORMLIST
  1553.               { stab_form(stabent("STDOUT",TRUE)) = $3; }
  1554.       ;
  1555. ***************
  1556. *** 632,637 ****
  1557. --- 642,651 ----
  1558.                   Nullarg, Nullarg)); }
  1559.       |    FUNC0
  1560.               { $$ = make_op($1, 0, Nullarg, Nullarg, Nullarg); }
  1561. +     |    FUNC1 '(' ')'
  1562. +             { $$ = make_op($1, 1, Nullarg, Nullarg, Nullarg);
  1563. +               if ($1 == O_EVAL || $1 == O_RESET)
  1564. +                 $$ = fixeval($$); }
  1565.       |    FUNC1 '(' expr ')'
  1566.               { $$ = make_op($1, 1, $3, Nullarg, Nullarg);
  1567.                 if ($1 == O_EVAL || $1 == O_RESET)
  1568.  
  1569. Index: lib/perldb.pl
  1570. Prereq: 3.0
  1571. *** lib/perldb.pl.old    Thu Oct 26 23:30:36 1989
  1572. --- lib/perldb.pl    Thu Oct 26 23:30:37 1989
  1573. ***************
  1574. *** 1,6 ****
  1575.   package DB;
  1576.   
  1577. ! $header = '$Header: perldb.pl,v 3.0 89/10/18 15:19:46 lwall Locked $';
  1578.   #
  1579.   # This file is automatically included if you do perl -d.
  1580.   # It's probably not useful to include this yourself.
  1581. --- 1,6 ----
  1582.   package DB;
  1583.   
  1584. ! $header = '$Header: perldb.pl,v 3.0.1.1 89/10/26 23:14:02 lwall Locked $';
  1585.   #
  1586.   # This file is automatically included if you do perl -d.
  1587.   # It's probably not useful to include this yourself.
  1588. ***************
  1589. *** 10,15 ****
  1590. --- 10,18 ----
  1591.   # have a breakpoint.  It also inserts a do 'perldb.pl' before the first line.
  1592.   #
  1593.   # $Log:    perldb.pl,v $
  1594. + # Revision 3.0.1.1  89/10/26  23:14:02  lwall
  1595. + # patch1: RCS expanded an unintended $Header in lib/perldb.pl
  1596. + # 
  1597.   # Revision 3.0  89/10/18  15:19:46  lwall
  1598.   # 3.0 baseline
  1599.   # 
  1600. ***************
  1601. *** 25,31 ****
  1602.   select(STDOUT);
  1603.   $| = 1;                # for real STDOUT
  1604.   
  1605. ! $header =~ s/\$Header: perldb.pl,v 3.0 89/10/18 15:19:46 lwall Locked $/$1$2/;
  1606.   print OUT "\nLoading DB from $header\n\n";
  1607.   
  1608.   sub DB {
  1609. --- 28,34 ----
  1610.   select(STDOUT);
  1611.   $| = 1;                # for real STDOUT
  1612.   
  1613. ! $header =~ s/.Header: ([^,]+),v(\s+\S+\s+\S+).*$/$1$2/;
  1614.   print OUT "\nLoading DB from $header\n\n";
  1615.   
  1616.   sub DB {
  1617.  
  1618. Index: str.c
  1619. Prereq: 3.0
  1620. *** str.c.old    Thu Oct 26 23:31:09 1989
  1621. --- str.c    Thu Oct 26 23:31:10 1989
  1622. ***************
  1623. *** 1,4 ****
  1624. ! /* $Header: str.c,v 3.0 89/10/18 15:23:38 lwall Locked $
  1625.    *
  1626.    *    Copyright (c) 1989, Larry Wall
  1627.    *
  1628. --- 1,4 ----
  1629. ! /* $Header: str.c,v 3.0.1.1 89/10/26 23:23:41 lwall Locked $
  1630.    *
  1631.    *    Copyright (c) 1989, Larry Wall
  1632.    *
  1633. ***************
  1634. *** 6,11 ****
  1635. --- 6,15 ----
  1636.    *    as specified in the README file that comes with the perl 3.0 kit.
  1637.    *
  1638.    * $Log:    str.c,v $
  1639. +  * Revision 3.0.1.1  89/10/26  23:23:41  lwall
  1640. +  * patch1: string ordering tests were wrong
  1641. +  * patch1: $/ now works even when STDSTDIO undefined
  1642. +  * 
  1643.    * Revision 3.0  89/10/18  15:23:38  lwall
  1644.    * 3.0 baseline
  1645.    * 
  1646. ***************
  1647. *** 604,610 ****
  1648.       if (retval = memcmp(str1->str_ptr, str2->str_ptr, str1->str_cur))
  1649.           return retval;
  1650.       else
  1651. !         return 1;
  1652.       }
  1653.       else if (retval = memcmp(str1->str_ptr, str2->str_ptr, str2->str_cur))
  1654.       return retval;
  1655. --- 608,614 ----
  1656.       if (retval = memcmp(str1->str_ptr, str2->str_ptr, str1->str_cur))
  1657.           return retval;
  1658.       else
  1659. !         return -1;
  1660.       }
  1661.       else if (retval = memcmp(str1->str_ptr, str2->str_ptr, str2->str_cur))
  1662.       return retval;
  1663. ***************
  1664. *** 611,617 ****
  1665.       else if (str1->str_cur == str2->str_cur)
  1666.       return 0;
  1667.       else
  1668. !     return -1;
  1669.   }
  1670.   
  1671.   char *
  1672. --- 615,621 ----
  1673.       else if (str1->str_cur == str2->str_cur)
  1674.       return 0;
  1675.       else
  1676. !     return 1;
  1677.   }
  1678.   
  1679.   char *
  1680. ***************
  1681. *** 620,627 ****
  1682.   register FILE *fp;
  1683.   int append;
  1684.   {
  1685. - #ifdef STDSTDIO        /* Here is some breathtakingly efficient cheating */
  1686.       register char *bp;        /* we're going to steal some values */
  1687.       register int cnt;        /*  from the stdio struct and put EVERYTHING */
  1688.       register STDCHAR *ptr;    /*   in the innermost loop into registers */
  1689. --- 624,629 ----
  1690. ***************
  1691. *** 636,641 ****
  1692. --- 638,645 ----
  1693.       newline = '\n';
  1694.       oldbp = Nullch;            /* remember last \n position (none) */
  1695.       }
  1696. + #ifdef STDSTDIO        /* Here is some breathtakingly efficient cheating */
  1697.       cnt = fp->_cnt;            /* get count into register */
  1698.       str->str_nok = 0;            /* invalidate number */
  1699.       str->str_pok = 1;            /* validate pointer */
  1700. ***************
  1701. *** 686,701 ****
  1702.   
  1703.   #else /* !STDSTDIO */    /* The big, slow, and stupid way */
  1704.   
  1705. !     static char buf[8192];
  1706.   
  1707. !     if (fgets(buf, sizeof buf, fp) != Nullch) {
  1708.       if (append)
  1709.           str_cat(str, buf);
  1710.       else
  1711.           str_set(str, buf);
  1712.       }
  1713. -     else
  1714. -     str_set(str, No);
  1715.   
  1716.   #endif /* STDSTDIO */
  1717.   
  1718. --- 690,717 ----
  1719.   
  1720.   #else /* !STDSTDIO */    /* The big, slow, and stupid way */
  1721.   
  1722. !     {
  1723. !     static char buf[8192];
  1724. !     char * bpe = buf + sizeof(buf) - 3;
  1725.   
  1726. ! screamer:
  1727. !     bp = buf;
  1728. ! filler:
  1729. !     while ((i = getc(fp)) != EOF && (*bp++ = i) != newline && bp < bpe);
  1730. !     if (i == newline && get_paragraph &&
  1731. !         (i = getc(fp)) != EOF && (*bp++ = i) != newline && bp < bpe)
  1732. !         goto filler;
  1733. !     *bp = '\0';
  1734.       if (append)
  1735.           str_cat(str, buf);
  1736.       else
  1737.           str_set(str, buf);
  1738. +     if (i != newline && i != EOF) {
  1739. +         append = -1;
  1740. +         goto screamer;
  1741. +     }
  1742.       }
  1743.   
  1744.   #endif /* STDSTDIO */
  1745.   
  1746.  
  1747. Index: str.h
  1748. Prereq: 3.0
  1749. *** str.h.old    Thu Oct 26 23:31:15 1989
  1750. --- str.h    Thu Oct 26 23:31:16 1989
  1751. ***************
  1752. *** 1,4 ****
  1753. ! /* $Header: str.h,v 3.0 89/10/18 15:23:49 lwall Locked $
  1754.    *
  1755.    *    Copyright (c) 1989, Larry Wall
  1756.    *
  1757. --- 1,4 ----
  1758. ! /* $Header: str.h,v 3.0.1.1 89/10/26 23:24:42 lwall Locked $
  1759.    *
  1760.    *    Copyright (c) 1989, Larry Wall
  1761.    *
  1762. ***************
  1763. *** 6,11 ****
  1764. --- 6,14 ----
  1765.    *    as specified in the README file that comes with the perl 3.0 kit.
  1766.    *
  1767.    * $Log:    str.h,v $
  1768. +  * Revision 3.0.1.1  89/10/26  23:24:42  lwall
  1769. +  * patch1: rearranged some structures to align doubles better on Gould
  1770. +  * 
  1771.    * Revision 3.0  89/10/18  15:23:49  lwall
  1772.    * 3.0 baseline
  1773.    * 
  1774. ***************
  1775. *** 13,18 ****
  1776. --- 16,22 ----
  1777.   
  1778.   struct string {
  1779.       char *    str_ptr;    /* pointer to malloced string */
  1780. +     int        str_len;    /* allocated size */
  1781.       union {
  1782.       double    str_nval;    /* numeric value, if any */
  1783.       STAB    *str_stab;    /* magic stab for magic "key" string */
  1784. ***************
  1785. *** 21,27 ****
  1786.       HASH    *str_hash;    /* string represents an assoc array (stab?) */
  1787.       ARRAY    *str_array;    /* string represents an array */
  1788.       } str_u;
  1789. -     int        str_len;    /* allocated size */
  1790.       int        str_cur;    /* length of str_ptr as a C string */
  1791.       STR *str_magic;        /* while free, link to next free str */
  1792.                   /* while in use, ptr to "key" for magic items */
  1793. --- 25,30 ----
  1794. ***************
  1795. *** 37,42 ****
  1796. --- 40,46 ----
  1797.   
  1798.   struct stab {    /* should be identical, except for str_ptr */
  1799.       STBP *    str_ptr;    /* pointer to malloced string */
  1800. +     int        str_len;    /* allocated size */
  1801.       union {
  1802.       double    str_nval;    /* numeric value, if any */
  1803.       STAB    *str_stab;    /* magic stab for magic "key" string */
  1804. ***************
  1805. *** 45,51 ****
  1806.       HASH    *str_hash;    /* string represents an assoc array (stab?) */
  1807.       ARRAY    *str_array;    /* string represents an array */
  1808.       } str_u;
  1809. -     int        str_len;    /* allocated size */
  1810.       int        str_cur;    /* length of str_ptr as a C string */
  1811.       STR *str_magic;        /* while free, link to next free str */
  1812.                   /* while in use, ptr to "key" for magic items */
  1813. --- 49,54 ----
  1814.  
  1815. Index: toke.c
  1816. Prereq: 3.0
  1817. *** toke.c.old    Thu Oct 26 23:31:26 1989
  1818. --- toke.c    Thu Oct 26 23:31:28 1989
  1819. ***************
  1820. *** 1,4 ****
  1821. ! /* $Header: toke.c,v 3.0 89/10/18 15:32:33 lwall Locked $
  1822.    *
  1823.    *    Copyright (c) 1989, Larry Wall
  1824.    *
  1825. --- 1,4 ----
  1826. ! /* $Header: toke.c,v 3.0.1.1 89/10/26 23:26:21 lwall Locked $
  1827.    *
  1828.    *    Copyright (c) 1989, Larry Wall
  1829.    *
  1830. ***************
  1831. *** 6,11 ****
  1832. --- 6,14 ----
  1833.    *    as specified in the README file that comes with the perl 3.0 kit.
  1834.    *
  1835.    * $Log:    toke.c,v $
  1836. +  * Revision 3.0.1.1  89/10/26  23:26:21  lwall
  1837. +  * patch1: disambiguated word after "sort" better
  1838. +  * 
  1839.    * Revision 3.0  89/10/18  15:32:33  lwall
  1840.    * 3.0 baseline
  1841.    * 
  1842. ***************
  1843. *** 865,871 ****
  1844.               fatal("sort is now a reserved word");
  1845.           if (isascii(*s) && (isalpha(*s) || *s == '_')) {
  1846.               for (d = s; isalpha(*d) || isdigit(*d) || *d == '_'; d++) ;
  1847. !             if (d >= bufend || isspace(*d))
  1848.               *(--s) = '\\';    /* force next ident to WORD */
  1849.           }
  1850.           LOP(O_SORT);
  1851. --- 868,882 ----
  1852.               fatal("sort is now a reserved word");
  1853.           if (isascii(*s) && (isalpha(*s) || *s == '_')) {
  1854.               for (d = s; isalpha(*d) || isdigit(*d) || *d == '_'; d++) ;
  1855. !             strncpy(tokenbuf,s,d-s);
  1856. !             if (strNE(tokenbuf,"keys") &&
  1857. !             strNE(tokenbuf,"values") &&
  1858. !             strNE(tokenbuf,"split") &&
  1859. !             strNE(tokenbuf,"grep") &&
  1860. !             strNE(tokenbuf,"readdir") &&
  1861. !             strNE(tokenbuf,"unpack") &&
  1862. !             strNE(tokenbuf,"do") &&
  1863. !             (d >= bufend || isspace(*d)) )
  1864.               *(--s) = '\\';    /* force next ident to WORD */
  1865.           }
  1866.           LOP(O_SORT);
  1867.  
  1868. Index: util.h
  1869. Prereq: 3.0
  1870. *** util.h.old    Thu Oct 26 23:31:34 1989
  1871. --- util.h    Thu Oct 26 23:31:35 1989
  1872. ***************
  1873. *** 1,4 ****
  1874. ! /* $Header: util.h,v 3.0 89/10/18 15:33:18 lwall Locked $
  1875.    *
  1876.    *    Copyright (c) 1989, Larry Wall
  1877.    *
  1878. --- 1,4 ----
  1879. ! /* $Header: util.h,v 3.0.1.1 89/10/26 23:28:25 lwall Locked $
  1880.    *
  1881.    *    Copyright (c) 1989, Larry Wall
  1882.    *
  1883. ***************
  1884. *** 6,11 ****
  1885. --- 6,14 ----
  1886.    *    as specified in the README file that comes with the perl 3.0 kit.
  1887.    *
  1888.    * $Log:    util.h,v $
  1889. +  * Revision 3.0.1.1  89/10/26  23:28:25  lwall
  1890. +  * patch1: declared bcopy if necessary
  1891. +  * 
  1892.    * Revision 3.0  89/10/18  15:33:18  lwall
  1893.    * 3.0 baseline
  1894.    * 
  1895. ***************
  1896. *** 30,32 ****
  1897. --- 33,40 ----
  1898.   char    *nsavestr();
  1899.   FILE    *mypopen();
  1900.   int    mypclose();
  1901. + #ifndef BCOPY
  1902. + #ifndef MEMCPY
  1903. + char    *bcopy();
  1904. + #endif
  1905. + #endif
  1906.  
  1907.