home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl501m.zip / patches / patch.1m < prev   
Text File  |  1995-06-22  |  85KB  |  3,160 lines

  1. # This is my patch  patch.1m for perl5.001.  See description below.
  2. #    Andy Dougherty        doughera@lafcol.lafayette.edu
  3. #
  4.  
  5. # Please execute the following command before applying this patch.
  6. # (You can feed this patch to 'sh' to do so.)
  7.  
  8. # embed_h.sh is replaced by a new perl script embed.pl with identical
  9. # functionality.
  10. rm -f embed_h.sh
  11.  
  12. exit 0
  13.  
  14. This is my patch  patch.1m  for perl5.001.
  15.  
  16. To apply, change to your perl directory, run the command above, then
  17. apply with
  18.     patch -p1 -N  < thispatch.
  19.  
  20. Highlights of this patch include:
  21.  
  22. 1.  Fixes for $sitelib, $d_stdio_ptr_lval, and $d_stdio_cnt_lval 
  23.     when config.sh is re-used.
  24.  
  25. 2.  Move embed.h, keywords.h, and opcode.h dependencies to
  26.     a special  regen_headers target that is ordinarily not used.
  27.     This is now analogous to the run_byacc target.  As a cosmetic
  28.     side-effect, I transliterated embed_h.sh into embed.pl so that
  29.     it can run on non-unix systems as well.
  30.  
  31. 3.  Tests for gdbm_{sync,exists,setopt} in GDBM_File (needed for
  32.     Slackware 2.1).
  33.  
  34. For good measure, I've also thrown in the following patches I pulled
  35. off the list, mostly unmodified from the originals.
  36.     
  37. 1.  Larry's "unofficial official" fix for the subroutine array context
  38.     problem.
  39.  
  40. 2.  Tim's __DATA__ patch.  (I kept forgetting about this one.)
  41.  
  42. 3.  Malcom's  USE_OP_MASK patch to pave the way for his Safe extension.
  43.  
  44. 4.  Spider's suggested renaming of regexec to pregexec and regcomp to
  45.     pregcomp to avoid conflicts with POSIX symbols on Digital Unix.
  46.     (I only added a brief explanatory comment to the relevant .c
  47.     files.)
  48.  
  49. 5.  Spider's installperl patch to avoid installing *.orig and and the 
  50.     .exists files.  (I changed this a little to include patch's ~
  51.     suffix, which is used on systems with short file names (in some
  52.     versions of patch)).
  53.  
  54. 6.  Raphael's "safe_unlink" patch to installperl, in case a copy
  55.     of perl is currently runniung.
  56.  
  57. 7.  xsubpp 1.9.
  58.  
  59. 8.  Tim's  lib.pm module (with patched corrected spelling of 2nd :-).
  60.  
  61. 9.  Tim's Exporter module version patches.
  62.  
  63. 10.  Tim's MakeMaker patches for make test when LINKTYPE=static.
  64.  
  65. 11.  Randal's pod2html patches.
  66.  
  67. 12.  Spider's "picky compiler" patches for x2p/util.[ch]
  68.  
  69. 13.  Paul's updated source filtering patches.
  70.  
  71. Patch and enjoy.  I hope nothing breaks :-).
  72.  
  73.     Andy Dougherty        doughera@lafcol.lafayette.edu
  74.     Dept. of Physics
  75.     Lafayette College, Easton PA 18042
  76.  
  77. Index: Configure
  78. Prereq:  3.0.1.7 
  79. *** perl5.001l/Configure    Tue Jun  6 15:06:54 1995
  80. --- perl5.001m/Configure    Thu Jun 22 11:03:49 1995
  81. ***************
  82. *** 20,26 ****
  83.   
  84.   # $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $
  85.   #
  86. ! # Generated on Tue Jun  6 12:25:20 EDT 1995 [metaconfig 3.0 PL55]
  87.   
  88.   cat >/tmp/c1$$ <<EOF
  89.   ARGGGHHHH!!!!!
  90. --- 20,26 ----
  91.   
  92.   # $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $
  93.   #
  94. ! # Generated on Thu Jun 22 10:38:35 EDT 1995 [metaconfig 3.0 PL55]
  95.   
  96.   cat >/tmp/c1$$ <<EOF
  97.   ARGGGHHHH!!!!!
  98. ***************
  99. *** 5478,5484 ****
  100.       fi
  101.       echo "and it returns ($shmattype)." >&4
  102.       : see if a prototype for shmat is available
  103. !     $cppstdin $cppflags $cppminus < $usrinc/sys/shm.h > shmat.c 2>/dev/null
  104.       if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
  105.           val="$define"
  106.       else
  107. --- 5478,5485 ----
  108.       fi
  109.       echo "and it returns ($shmattype)." >&4
  110.       : see if a prototype for shmat is available
  111. !     xxx=`./findhdr sys/shm.h`
  112. !     $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
  113.       if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
  114.           val="$define"
  115.       else
  116. ***************
  117. *** 5523,5529 ****
  118.   If you don't want to use such an additional directory, answer 'none'.
  119.   
  120.   EOM
  121. ! dflt=none
  122.   fn=d~+n
  123.   rp='Local directory for additional library files?'
  124.   . ./getfile
  125. --- 5524,5533 ----
  126.   If you don't want to use such an additional directory, answer 'none'.
  127.   
  128.   EOM
  129. ! case "$sitelib" in
  130. ! '') dflt=none ;;
  131. ! *) dflt="$sitelib" ;;
  132. ! esac
  133.   fn=d~+n
  134.   rp='Local directory for additional library files?'
  135.   . ./getfile
  136. ***************
  137. *** 5533,5559 ****
  138.   sitelib="$ans"
  139.   sitelibexp="$ansexp"
  140.   if $afs; then
  141. !     $cat <<EOM
  142.   
  143.   Since you are running AFS, I need to distinguish the directory in which
  144.   private files reside from the directory in which they are installed (and from
  145.   which they are presumably copied to the former directory by occult means).
  146.   
  147.   EOM
  148. !     case "$installsitelib" in
  149. !     '') dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;;
  150. !     *) dflt="$installsitelib";;
  151.       esac
  152. -     fn=de~
  153. -     rp='Where will additional local files be installed?'
  154. -     . ./getfile
  155. -     installsitelib="$ans"
  156.   else
  157.       installsitelib="$sitelibexp"
  158.   fi
  159.   
  160.   case "$sitelibexp" in
  161. ! ''|' ') d_sitelib=undef ;;
  162.   *) d_sitelib=define ;;
  163.   esac
  164.   
  165. --- 5537,5568 ----
  166.   sitelib="$ans"
  167.   sitelibexp="$ansexp"
  168.   if $afs; then
  169. !     case "$sitelib" in
  170. !     '') installsitelib="$sitelibexp"
  171. !         ;;
  172. !     *)    $cat <<EOM
  173.   
  174.   Since you are running AFS, I need to distinguish the directory in which
  175.   private files reside from the directory in which they are installed (and from
  176.   which they are presumably copied to the former directory by occult means).
  177.   
  178.   EOM
  179. !         case "$installsitelib" in
  180. !         '') dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;;
  181. !         *) dflt="$installsitelib";;
  182. !         esac
  183. !         fn=de~
  184. !         rp='Where will additional local files be installed?'
  185. !         . ./getfile
  186. !         installsitelib="$ans"
  187. !         ;;
  188.       esac
  189.   else
  190.       installsitelib="$sitelibexp"
  191.   fi
  192.   
  193.   case "$sitelibexp" in
  194. ! '') d_sitelib=undef ;;
  195.   *) d_sitelib=define ;;
  196.   esac
  197.   
  198. ***************
  199. *** 5708,5715 ****
  200.   
  201.   : Can _ptr be used as an lvalue.  Only makes sense if we
  202.   : have a known stdio implementation.
  203. ! case "$d_stdstdio" in
  204. ! $define) val=$ptr_lval ;;
  205.   *) val=$undef ;;
  206.   esac
  207.   set d_stdio_ptr_lval
  208. --- 5717,5724 ----
  209.   
  210.   : Can _ptr be used as an lvalue.  Only makes sense if we
  211.   : have a known stdio implementation.
  212. ! case "$d_stdstdio$ptr_lval" in
  213. ! $define$define) val=$define ;;
  214.   *) val=$undef ;;
  215.   esac
  216.   set d_stdio_ptr_lval
  217. ***************
  218. *** 5718,5725 ****
  219.   
  220.   : Can _cnt be used as an lvalue.  Only makes sense if we
  221.   : have a known stdio implementation.
  222. ! case "$d_stdstdio" in
  223. ! $define) val=$cnt_lval ;;
  224.   *) val=$undef ;;
  225.   esac
  226.   set d_stdio_cnt_lval
  227. --- 5727,5734 ----
  228.   
  229.   : Can _cnt be used as an lvalue.  Only makes sense if we
  230.   : have a known stdio implementation.
  231. ! case "$d_stdstdio$cnt_lval" in
  232. ! $define$define) val=$define ;;
  233.   *) val=$undef ;;
  234.   esac
  235.   set d_stdio_cnt_lval
  236. Index: MANIFEST
  237. *** perl5.001l/MANIFEST    Tue Jun  6 15:06:55 1995
  238. --- perl5.001m/MANIFEST    Wed Jun 21 16:09:44 1995
  239. ***************
  240. *** 79,85 ****
  241.   emacs/perldb.pl        Emacs debugging
  242.   emacs/tedstuff        Some optional patches
  243.   embed.h            Maps symbols to safer names
  244. ! embed_h.sh        Produces embed.h
  245.   ext/DB_File/DB_File.pm        Berkeley DB extension Perl module
  246.   ext/DB_File/DB_File.xs        Berkeley DB extension external subroutines
  247.   ext/DB_File/DB_File_BS        Berkeley DB extension mkbootstrap fodder
  248. --- 79,85 ----
  249.   emacs/perldb.pl        Emacs debugging
  250.   emacs/tedstuff        Some optional patches
  251.   embed.h            Maps symbols to safer names
  252. ! embed.pl        Produces embed.h
  253.   ext/DB_File/DB_File.pm        Berkeley DB extension Perl module
  254.   ext/DB_File/DB_File.xs        Berkeley DB extension external subroutines
  255.   ext/DB_File/DB_File_BS        Berkeley DB extension mkbootstrap fodder
  256. ***************
  257. *** 307,312 ****
  258. --- 307,313 ----
  259.   lib/importenv.pl    Perl routine to get environment into variables
  260.   lib/integer.pm        For "use integer"
  261.   lib/less.pm        For "use less"
  262. + lib/lib.pm        For "use lib"
  263.   lib/look.pl        A "look" equivalent
  264.   lib/newgetopt.pl    A perl library supporting long option parsing
  265.   lib/open2.pl        Open a two-ended pipe
  266. Index: Makefile.SH
  267. *** perl5.001l/Makefile.SH    Tue Jun  6 15:05:25 1995
  268. --- perl5.001m/Makefile.SH    Wed Jun 21 16:43:11 1995
  269. ***************
  270. *** 185,191 ****
  271. --- 185,193 ----
  272.   #    @echo " "; echo "    Making docs"; cd pod; $(MAKE) all;
  273.   
  274.   # Phony target to force checking subdirectories.
  275. + # Apparently some makes require an action for the FORCE target.
  276.   FORCE:
  277. +     @true
  278.   
  279.   # The $& notation tells Sequent machines that it can do a parallel make,
  280.   # and is harmless otherwise.
  281. ***************
  282. *** 252,274 ****
  283.       $(CCCMD) -DIAMSUID sperl.c
  284.       $(RMS) sperl.c
  285.   
  286. - # The following three header files are generated automatically
  287. - # The correct versions should be already supplied with the perl kit,
  288. - # in case you don't have perl or 'sh' available.
  289. - # The - is to ignore error return codes in case you have the source
  290. - # installed read-only or you don't have perl yet.
  291. - keywords.h: keywords.pl
  292. -     @echo "Don't worry if this fails."
  293. -     - perl keywords.pl
  294. - opcode.h: opcode.pl
  295. -     @echo "Don't worry if this fails."
  296. -     - perl opcode.pl
  297. - embed.h: embed_h.sh global.sym interp.sym
  298. -     @echo "Don't worry if this fails."
  299. -     - sh embed_h.sh
  300.   # We have to call our ./makedir because Ultrix 4.3 make can't handle the line
  301.   #    test -d lib/auto || mkdir lib/auto
  302.   #
  303. --- 254,259 ----
  304. ***************
  305. *** 321,326 ****
  306. --- 306,324 ----
  307.   perly.h: perly.y
  308.       -@touch perly.h
  309.   
  310. + # The following three header files are generated automatically
  311. + #    keywords.h:    keywords.pl
  312. + #    opcode.h:    opcode.pl
  313. + #    embed.h:      embed.pl global.sym interp.sym
  314. + # The correct versions should be already supplied with the perl kit,
  315. + # in case you don't have perl available.
  316. + # To force them to run, type
  317. + #    make regen_headers
  318. + regen_headers:    FORCE
  319. +     perl keywords.pl
  320. +     perl opcode.pl
  321. +     perl embed.pl
  322. +  
  323.   # Extensions:
  324.   # Names added to $(dynamic_ext) or $(static_ext) will automatically
  325.   # get built.  There should ordinarily be no need to change any of
  326. Index: embed.h
  327. *** perl5.001l/embed.h    Tue Jun  6 15:05:29 1995
  328. --- perl5.001m/embed.h    Thu Jun 22 10:28:09 1995
  329. ***************
  330. *** 357,362 ****
  331. --- 357,363 ----
  332.   #define doeval        Perl_doeval
  333.   #define dofindlabel    Perl_dofindlabel
  334.   #define dopoptoeval    Perl_dopoptoeval
  335. + #define dowantarray    Perl_dowantarray
  336.   #define dump_all    Perl_dump_all
  337.   #define dump_eval    Perl_dump_eval
  338.   #define dump_gv        Perl_dump_gv
  339. ***************
  340. *** 861,870 ****
  341.   #define q        Perl_q
  342.   #define ref        Perl_ref
  343.   #define refkids        Perl_refkids
  344. ! #define regcomp        Perl_regcomp
  345.   #define regdump        Perl_regdump
  346. ! #define regexec        Perl_regexec
  347. ! #define regfree        Perl_regfree
  348.   #define regnext        Perl_regnext
  349.   #define regprop        Perl_regprop
  350.   #define repeatcpy    Perl_repeatcpy
  351. --- 862,871 ----
  352.   #define q        Perl_q
  353.   #define ref        Perl_ref
  354.   #define refkids        Perl_refkids
  355. ! #define pregcomp    Perl_pregcomp
  356.   #define regdump        Perl_regdump
  357. ! #define pregexec    Perl_pregexec
  358. ! #define pregfree    Perl_pregfree
  359.   #define regnext        Perl_regnext
  360.   #define regprop        Perl_regprop
  361.   #define repeatcpy    Perl_repeatcpy
  362. ***************
  363. *** 1088,1093 ****
  364. --- 1089,1095 ----
  365.   #define ofslen        (curinterp->Iofslen)
  366.   #define oldlastpm    (curinterp->Ioldlastpm)
  367.   #define oldname        (curinterp->Ioldname)
  368. + #define op_mask        (curinterp->Iop_mask)
  369.   #define origargc    (curinterp->Iorigargc)
  370.   #define origargv    (curinterp->Iorigargv)
  371.   #define origfilename    (curinterp->Iorigfilename)
  372. ***************
  373. *** 1244,1249 ****
  374. --- 1246,1252 ----
  375.   #define Iofslen        ofslen
  376.   #define Ioldlastpm    oldlastpm
  377.   #define Ioldname    oldname
  378. + #define Iop_mask    op_mask
  379.   #define Iorigargc    origargc
  380.   #define Iorigargv    origargv
  381.   #define Iorigfilename    origfilename
  382. Index: embed.pl
  383. *** /dev/null    Thu Jun 22 13:39:36 1995
  384. --- perl5.001m/embed.pl    Wed Jun 21 16:03:52 1995
  385. ***************
  386. *** 0 ****
  387. --- 1,67 ----
  388. + #!/usr/bin/perl
  389. + open(EM, ">embed.h") || die "Can't create embed.h: $!\n";
  390. + print EM <<'END';
  391. + /* This file is derived from global.sym and interp.sym */
  392. + /* (Doing namespace management portably in C is really gross.) */
  393. + #ifdef EMBED
  394. + /* globals we need to hide from the world */
  395. + END
  396. + open(GL, "<global.sym") || die "Can't open global.sym: $!\n";
  397. + while(<GL>) {
  398. +     s/[ \t]*#.*//;        # Delete comments.
  399. +     next unless /\S/;
  400. +     s/(.*)/#define $1\t\tPerl_$1/;
  401. +     s/(................\t)\t/$1/;
  402. +     print EM $_;
  403. + }
  404. + close(GL) || warn "Can't close global.sym: $!\n";
  405. + print EM <<'END';
  406. + #endif /* EMBED */
  407. + /* Put interpreter specific symbols into a struct? */
  408. + #ifdef MULTIPLICITY
  409. + END
  410. + open(INT, "<interp.sym") || die "Can't open interp.sym: $!\n";
  411. + while (<INT>) {
  412. +     s/[ \t]*#.*//;        # Delete comments.
  413. +     next unless /\S/;
  414. +     s/(.*)/#define $1\t\t(curinterp->I$1)/;
  415. +     s/(................\t)\t/$1/;
  416. +     print EM $_;
  417. + }
  418. + close(INT) || warn "Can't close interp.sym: $!\n";
  419. + print EM <<'END';
  420. + #else    /* not multiple, so translate interpreter symbols the other way... */
  421. + END
  422. + open(INT, "<interp.sym") || die "Can't open interp.sym: $!\n";
  423. + while (<INT>) {
  424. +     s/[ \t]*#.*//;        # Delete comments.
  425. +     next unless /\S/;
  426. +     s/(.*)/#define I$1\t\t$1/;
  427. +     s/(................\t)\t/$1/;
  428. +     print EM $_;
  429. + }
  430. + close(INT) || warn "Can't close interp.sym: $!\n";
  431. + print EM <<'END';
  432. + #endif /* MULTIPLICITY */
  433. + END
  434. Index: ext/GDBM_File/GDBM_File.xs
  435. *** perl5.001l/ext/GDBM_File/GDBM_File.xs    Tue Jun  6 15:05:10 1995
  436. --- perl5.001m/ext/GDBM_File/GDBM_File.xs    Thu Jun 22 09:54:54 1995
  437. ***************
  438. *** 29,34 ****
  439. --- 29,44 ----
  440.       return -1;
  441.   }
  442.   
  443. + /* Versions of gdbm prior to 1.7x might not have the gdbm_sync,
  444. +    gdbm_exists, and gdbm_setopt functions.  Apparently Slackware
  445. +    (Linux) 2.1 contains gdbm-1.5 (which dates back to 1991).
  446. + */
  447. + #ifndef GDBM_FAST
  448. + #define gdbm_exists(db,key) not_here("gdbm_exists")
  449. + #define gdbm_sync(db) (void) not_here("gdbm_sync")
  450. + #define gdbm_setopt(db,optflag,optval,optlen) not_here("gdbm_setopt")
  451. + #endif
  452.   static double
  453.   constant(name, arg)
  454.   char *name;
  455. Index: global.sym
  456. *** perl5.001l/global.sym    Tue Jun  6 15:05:30 1995
  457. --- perl5.001m/global.sym    Thu Jun 22 10:22:37 1995
  458. ***************
  459. *** 357,362 ****
  460. --- 357,363 ----
  461.   doeval
  462.   dofindlabel
  463.   dopoptoeval
  464. + dowantarray
  465.   dump_all
  466.   dump_eval
  467.   dump_gv
  468. Index: hints/freebsd.sh
  469. *** perl5.001l/hints/freebsd.sh    Tue Jun  6 15:06:18 1995
  470. --- perl5.001m/hints/freebsd.sh    Tue Jun 20 10:18:34 1995
  471. ***************
  472. *** 14,22 ****
  473.   # Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
  474.   # Date: Fri, 12 May 1995 14:30:38 +0200 (MET DST)
  475.   #
  476. - # FreeBSD has the dynamic loading dl*() functions in /usr/lib/crt0.o,
  477. - # so Configure doesn't find them (unless you abandon the nm scan).
  478. - #
  479.   # The two flags "-fpic -DPIC" are used to indicate a
  480.   # will-be-shared object.  Configure will guess the -fpic, (and the
  481.   # -DPIC is not used by perl proper) but the full define is included to 
  482. --- 14,19 ----
  483. ***************
  484. *** 31,39 ****
  485.   0.*|1.0*)
  486.       usedl="$undef"
  487.       ;;
  488. ! 1.1*)    d_dlopen="$define"
  489. !     cccdlflags='-DPIC -fpic'
  490. !     lddlflags="-Bshareable $lddlflags"
  491.       malloctype='void *'
  492.       groupstype='int'
  493.       d_setregid='undef'
  494. --- 28,34 ----
  495.   0.*|1.0*)
  496.       usedl="$undef"
  497.       ;;
  498. ! 1.1*)
  499.       malloctype='void *'
  500.       groupstype='int'
  501.       d_setregid='undef'
  502. ***************
  503. *** 41,50 ****
  504.       d_setrgid='undef'
  505.       d_setruid='undef'
  506.       ;;
  507. ! 2.0-RELEASE*)
  508. !     d_dlopen="$define"
  509. !     cccdlflags='-DPIC -fpic'
  510. !     lddlflags="-Bshareable $lddlflags"
  511.       d_setregid='undef'
  512.       d_setreuid='undef'
  513.       d_setrgid='undef'
  514. --- 36,42 ----
  515.       d_setrgid='undef'
  516.       d_setruid='undef'
  517.       ;;
  518. ! 2.0-release*)
  519.       d_setregid='undef'
  520.       d_setreuid='undef'
  521.       d_setrgid='undef'
  522. ***************
  523. *** 55,71 ****
  524.   # It does not covert all 2.1-current versions as the output of uname
  525.   # changed a few times.
  526.   #
  527. ! 2.0.5*|2.0-BUILD|2.1*)
  528. !     d_dlopen="$define"
  529. !     cccdlflags='-DPIC -fpic'
  530.       lddlflags="-Bshareable $lddlflags"
  531. !     # Are these defines necessary?  Doesn't Configure find them
  532. !     # correctly?
  533. !     d_setregid='define'
  534. !     d_setreuid='define'
  535. !     d_setrgid='define'
  536. !     d_setruid='define'
  537.   esac
  538.   # Avoid telldir prototype conflict in pp_sys.c  (FreeBSD uses const DIR *)
  539.   # Configure should test for this.  Volunteers?
  540.   pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'
  541. --- 47,72 ----
  542.   # It does not covert all 2.1-current versions as the output of uname
  543.   # changed a few times.
  544.   #
  545. ! 2.0.5*|2.0-built*|2.1*)
  546. !      usevfork='true'
  547. !      d_dosuid='define'
  548. !     ;;
  549. ! #
  550. ! # Guesses at what will be needed after 2.1
  551. ! *)    usevfork='true'
  552. !      d_dosuid='define'
  553. !     ;;
  554. ! esac
  555. ! # Dynamic Loading flags have not changed much, so they are separated
  556. ! # out here to avoid duplicating them everywhere.
  557. ! case "$osvers" in
  558. ! 0.*|1.0*) ;;
  559. ! *)    cccdlflags='-DPIC -fpic'
  560.       lddlflags="-Bshareable $lddlflags"
  561. !     ;;
  562.   esac
  563.   # Avoid telldir prototype conflict in pp_sys.c  (FreeBSD uses const DIR *)
  564.   # Configure should test for this.  Volunteers?
  565.   pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'
  566. Index: installman
  567. *** perl5.001l/installman    Tue Jun  6 15:05:35 1995
  568. --- perl5.001m/installman    Thu Jun 22 13:43:21 1995
  569. ***************
  570. *** 64,71 ****
  571.   
  572.       # We insist on using the current version of pod2man in case there
  573.       # are enhancements or changes from previous installed versions.
  574. !     $pod2man = "../pod/pod2man";
  575. !     -x  $pod2man    || die "Executable $pod2man not found.\n";
  576.   
  577.       &makedir($mandir);
  578.       # Make a list of all the .pm and .pod files in the directory.  We will
  579. --- 64,79 ----
  580.   
  581.       # We insist on using the current version of pod2man in case there
  582.       # are enhancements or changes from previous installed versions.
  583. !     # The error message doesn't include the '..' because the user
  584. !     # won't be aware that we've chdir to $poddir.
  585. !     -x  "../pod/pod2man" || die "Executable pod/pod2man not found.\n";
  586. !     # We want to be sure to use the current perl.  We can't rely on
  587. !     # the installed perl because it might not be actually installed
  588. !     # yet. (The user may have set the $install* Configure variables 
  589. !     # to point to some temporary home, from which the executable gets
  590. !     # installed by occult means.)
  591. !     $pod2man = "../perl -I ../lib ../pod/pod2man";
  592.   
  593.       &makedir($mandir);
  594.       # Make a list of all the .pm and .pod files in the directory.  We will
  595. Index: installperl
  596. *** perl5.001l/installperl    Tue Jun  6 15:05:36 1995
  597. --- perl5.001m/installperl    Wed Jun 21 15:09:27 1995
  598. ***************
  599. *** 69,78 ****
  600.   
  601.   # First we install the version-numbered executables.
  602.   
  603. ! &unlink("$installbin/perl$ver");
  604.   &cmd("cp perl $installbin/perl$ver");
  605.   
  606. ! &unlink("$installbin/sperl$ver");
  607.   if ($d_dosuid) {
  608.       &cmd("cp suidperl $installbin/sperl$ver");
  609.       &chmod(04711, "$installbin/sperl$ver");
  610. --- 69,78 ----
  611.   
  612.   # First we install the version-numbered executables.
  613.   
  614. ! &safe_unlink("$installbin/perl$ver");
  615.   &cmd("cp perl $installbin/perl$ver");
  616.   
  617. ! &safe_unlink("$installbin/sperl$ver");
  618.   if ($d_dosuid) {
  619.       &cmd("cp suidperl $installbin/sperl$ver");
  620.       &chmod(04711, "$installbin/sperl$ver");
  621. ***************
  622. *** 83,95 ****
  623.   # Make links to ordinary names if installbin directory isn't current directory.
  624.   
  625.   if (! &samepath($installbin, '.')) {
  626. !     &unlink("$installbin/perl", "$installbin/suidperl");
  627.       &link("$installbin/perl$ver", "$installbin/perl");
  628.       &link("$installbin/sperl$ver", "$installbin/suidperl") if $d_dosuid;
  629.   }
  630.   
  631.   if (! &samepath($installbin, 'x2p')) {
  632. !     &unlink("$installbin/a2p");
  633.       &cmd("cp x2p/a2p $installbin/a2p");
  634.       &chmod(0755, "$installbin/a2p");
  635.   }
  636. --- 83,95 ----
  637.   # Make links to ordinary names if installbin directory isn't current directory.
  638.   
  639.   if (! &samepath($installbin, '.')) {
  640. !     &safe_unlink("$installbin/perl", "$installbin/suidperl");
  641.       &link("$installbin/perl$ver", "$installbin/perl");
  642.       &link("$installbin/sperl$ver", "$installbin/suidperl") if $d_dosuid;
  643.   }
  644.   
  645.   if (! &samepath($installbin, 'x2p')) {
  646. !     &safe_unlink("$installbin/a2p");
  647.       &cmd("cp x2p/a2p $installbin/a2p");
  648.       &chmod(0755, "$installbin/a2p");
  649.   }
  650. ***************
  651. *** 248,253 ****
  652. --- 248,269 ----
  653.       }
  654.   }
  655.   
  656. + sub safe_unlink {
  657. +     local(@names) = @_;
  658. +     foreach $name (@names) {
  659. +     next unless -e $name;
  660. +     print STDERR "  unlink $name\n";
  661. +     next if $nonono;
  662. +     next if unlink($name);
  663. +     warn "Couldn't unlink $name: $!\n";
  664. +     if ($! =~ /busy/i) {
  665. +         print STDERR "  mv $name $name.old\n";
  666. +         &rename($name, "$name.old") || warn "Couldn't rename $name: $!\n";
  667. +     }
  668. +     }
  669. + }
  670.   sub cmd {
  671.       local($cmd) = @_;
  672.       print STDERR "  $cmd\n";
  673. ***************
  674. *** 257,262 ****
  675. --- 273,291 ----
  676.       }
  677.   }
  678.   
  679. + sub rename {
  680. +     local($from,$to) = @_;
  681. +     unless (unlink($to)) {
  682. +     my($i);
  683. +     for ($i = 1; $i < 50; $i++) {
  684. +         last if rename($to, "$to.$i");
  685. +     }
  686. +     return 0 if $i >= 50;    # Give up!
  687. +     }
  688. +     link($from,$to) || return 0;
  689. +     unlink($from);
  690. + }
  691.   sub link {
  692.       local($from,$to) = @_;
  693.   
  694. ***************
  695. *** 304,309 ****
  696. --- 333,342 ----
  697.       $dir =~ s#^\.(?![^/])/?##;
  698.   
  699.       my $name = $_;
  700. +     
  701. +     # ignore patch backups and the .exists files.
  702. +     return if $name =~ m{\.orig$|~$|^\.exists};
  703.       $name = "$dir/$name" if $dir ne '';
  704.   
  705.       my $installlib = $installprivlib;
  706. Index: interp.sym
  707. *** perl5.001l/interp.sym    Mon Feb 20 19:05:41 1995
  708. --- perl5.001m/interp.sym    Tue Jun 20 10:09:03 1995
  709. ***************
  710. *** 96,101 ****
  711. --- 96,102 ----
  712.   ofslen
  713.   oldlastpm
  714.   oldname
  715. + op_mask
  716.   origargc
  717.   origargv
  718.   origfilename
  719. Index: keywords.h
  720. *** perl5.001l/keywords.h    Tue Oct 18 12:20:23 1994
  721. --- perl5.001m/keywords.h    Thu Jun 22 10:23:03 1995
  722. ***************
  723. *** 1,241 ****
  724.   #define KEY_NULL        0
  725.   #define KEY___LINE__        1
  726.   #define KEY___FILE__        2
  727. ! #define KEY___END__        3
  728. ! #define KEY_AUTOLOAD        4
  729. ! #define KEY_BEGIN        5
  730. ! #define KEY_CORE        6
  731. ! #define KEY_DESTROY        7
  732. ! #define KEY_END            8
  733. ! #define KEY_EQ            9
  734. ! #define KEY_GE            10
  735. ! #define KEY_GT            11
  736. ! #define KEY_LE            12
  737. ! #define KEY_LT            13
  738. ! #define KEY_NE            14
  739. ! #define KEY_abs            15
  740. ! #define KEY_accept        16
  741. ! #define KEY_alarm        17
  742. ! #define KEY_and            18
  743. ! #define KEY_atan2        19
  744. ! #define KEY_bind        20
  745. ! #define KEY_binmode        21
  746. ! #define KEY_bless        22
  747. ! #define KEY_caller        23
  748. ! #define KEY_chdir        24
  749. ! #define KEY_chmod        25
  750. ! #define KEY_chomp        26
  751. ! #define KEY_chop        27
  752. ! #define KEY_chown        28
  753. ! #define KEY_chr            29
  754. ! #define KEY_chroot        30
  755. ! #define KEY_close        31
  756. ! #define KEY_closedir        32
  757. ! #define KEY_cmp            33
  758. ! #define KEY_connect        34
  759. ! #define KEY_continue        35
  760. ! #define KEY_cos            36
  761. ! #define KEY_crypt        37
  762. ! #define KEY_dbmclose        38
  763. ! #define KEY_dbmopen        39
  764. ! #define KEY_defined        40
  765. ! #define KEY_delete        41
  766. ! #define KEY_die            42
  767. ! #define KEY_do            43
  768. ! #define KEY_dump        44
  769. ! #define KEY_each        45
  770. ! #define KEY_else        46
  771. ! #define KEY_elsif        47
  772. ! #define KEY_endgrent        48
  773. ! #define KEY_endhostent        49
  774. ! #define KEY_endnetent        50
  775. ! #define KEY_endprotoent        51
  776. ! #define KEY_endpwent        52
  777. ! #define KEY_endservent        53
  778. ! #define KEY_eof            54
  779. ! #define KEY_eq            55
  780. ! #define KEY_eval        56
  781. ! #define KEY_exec        57
  782. ! #define KEY_exists        58
  783. ! #define KEY_exit        59
  784. ! #define KEY_exp            60
  785. ! #define KEY_fcntl        61
  786. ! #define KEY_fileno        62
  787. ! #define KEY_flock        63
  788. ! #define KEY_for            64
  789. ! #define KEY_foreach        65
  790. ! #define KEY_fork        66
  791. ! #define KEY_format        67
  792. ! #define KEY_formline        68
  793. ! #define KEY_ge            69
  794. ! #define KEY_getc        70
  795. ! #define KEY_getgrent        71
  796. ! #define KEY_getgrgid        72
  797. ! #define KEY_getgrnam        73
  798. ! #define KEY_gethostbyaddr    74
  799. ! #define KEY_gethostbyname    75
  800. ! #define KEY_gethostent        76
  801. ! #define KEY_getlogin        77
  802. ! #define KEY_getnetbyaddr    78
  803. ! #define KEY_getnetbyname    79
  804. ! #define KEY_getnetent        80
  805. ! #define KEY_getpeername        81
  806. ! #define KEY_getpgrp        82
  807. ! #define KEY_getppid        83
  808. ! #define KEY_getpriority        84
  809. ! #define KEY_getprotobyname    85
  810. ! #define KEY_getprotobynumber    86
  811. ! #define KEY_getprotoent        87
  812. ! #define KEY_getpwent        88
  813. ! #define KEY_getpwnam        89
  814. ! #define KEY_getpwuid        90
  815. ! #define KEY_getservbyname    91
  816. ! #define KEY_getservbyport    92
  817. ! #define KEY_getservent        93
  818. ! #define KEY_getsockname        94
  819. ! #define KEY_getsockopt        95
  820. ! #define KEY_glob        96
  821. ! #define KEY_gmtime        97
  822. ! #define KEY_goto        98
  823. ! #define KEY_grep        99
  824. ! #define KEY_gt            100
  825. ! #define KEY_hex            101
  826. ! #define KEY_if            102
  827. ! #define KEY_index        103
  828. ! #define KEY_int            104
  829. ! #define KEY_ioctl        105
  830. ! #define KEY_join        106
  831. ! #define KEY_keys        107
  832. ! #define KEY_kill        108
  833. ! #define KEY_last        109
  834. ! #define KEY_lc            110
  835. ! #define KEY_lcfirst        111
  836. ! #define KEY_le            112
  837. ! #define KEY_length        113
  838. ! #define KEY_link        114
  839. ! #define KEY_listen        115
  840. ! #define KEY_local        116
  841. ! #define KEY_localtime        117
  842. ! #define KEY_log            118
  843. ! #define KEY_lstat        119
  844. ! #define KEY_lt            120
  845. ! #define KEY_m            121
  846. ! #define KEY_map            122
  847. ! #define KEY_mkdir        123
  848. ! #define KEY_msgctl        124
  849. ! #define KEY_msgget        125
  850. ! #define KEY_msgrcv        126
  851. ! #define KEY_msgsnd        127
  852. ! #define KEY_my            128
  853. ! #define KEY_ne            129
  854. ! #define KEY_next        130
  855. ! #define KEY_no            131
  856. ! #define KEY_not            132
  857. ! #define KEY_oct            133
  858. ! #define KEY_open        134
  859. ! #define KEY_opendir        135
  860. ! #define KEY_or            136
  861. ! #define KEY_ord            137
  862. ! #define KEY_pack        138
  863. ! #define KEY_package        139
  864. ! #define KEY_pipe        140
  865. ! #define KEY_pop            141
  866. ! #define KEY_pos            142
  867. ! #define KEY_print        143
  868. ! #define KEY_printf        144
  869. ! #define KEY_push        145
  870. ! #define KEY_q            146
  871. ! #define KEY_qq            147
  872. ! #define KEY_quotemeta        148
  873. ! #define KEY_qw            149
  874. ! #define KEY_qx            150
  875. ! #define KEY_rand        151
  876. ! #define KEY_read        152
  877. ! #define KEY_readdir        153
  878. ! #define KEY_readline        154
  879. ! #define KEY_readlink        155
  880. ! #define KEY_readpipe        156
  881. ! #define KEY_recv        157
  882. ! #define KEY_redo        158
  883. ! #define KEY_ref            159
  884. ! #define KEY_rename        160
  885. ! #define KEY_require        161
  886. ! #define KEY_reset        162
  887. ! #define KEY_return        163
  888. ! #define KEY_reverse        164
  889. ! #define KEY_rewinddir        165
  890. ! #define KEY_rindex        166
  891. ! #define KEY_rmdir        167
  892. ! #define KEY_s            168
  893. ! #define KEY_scalar        169
  894. ! #define KEY_seek        170
  895. ! #define KEY_seekdir        171
  896. ! #define KEY_select        172
  897. ! #define KEY_semctl        173
  898. ! #define KEY_semget        174
  899. ! #define KEY_semop        175
  900. ! #define KEY_send        176
  901. ! #define KEY_setgrent        177
  902. ! #define KEY_sethostent        178
  903. ! #define KEY_setnetent        179
  904. ! #define KEY_setpgrp        180
  905. ! #define KEY_setpriority        181
  906. ! #define KEY_setprotoent        182
  907. ! #define KEY_setpwent        183
  908. ! #define KEY_setservent        184
  909. ! #define KEY_setsockopt        185
  910. ! #define KEY_shift        186
  911. ! #define KEY_shmctl        187
  912. ! #define KEY_shmget        188
  913. ! #define KEY_shmread        189
  914. ! #define KEY_shmwrite        190
  915. ! #define KEY_shutdown        191
  916. ! #define KEY_sin            192
  917. ! #define KEY_sleep        193
  918. ! #define KEY_socket        194
  919. ! #define KEY_socketpair        195
  920. ! #define KEY_sort        196
  921. ! #define KEY_splice        197
  922. ! #define KEY_split        198
  923. ! #define KEY_sprintf        199
  924. ! #define KEY_sqrt        200
  925. ! #define KEY_srand        201
  926. ! #define KEY_stat        202
  927. ! #define KEY_study        203
  928. ! #define KEY_sub            204
  929. ! #define KEY_substr        205
  930. ! #define KEY_symlink        206
  931. ! #define KEY_syscall        207
  932. ! #define KEY_sysread        208
  933. ! #define KEY_system        209
  934. ! #define KEY_syswrite        210
  935. ! #define KEY_tell        211
  936. ! #define KEY_telldir        212
  937. ! #define KEY_tie            213
  938. ! #define KEY_time        214
  939. ! #define KEY_times        215
  940. ! #define KEY_tr            216
  941. ! #define KEY_truncate        217
  942. ! #define KEY_uc            218
  943. ! #define KEY_ucfirst        219
  944. ! #define KEY_umask        220
  945. ! #define KEY_undef        221
  946. ! #define KEY_unless        222
  947. ! #define KEY_unlink        223
  948. ! #define KEY_unpack        224
  949. ! #define KEY_unshift        225
  950. ! #define KEY_untie        226
  951. ! #define KEY_until        227
  952. ! #define KEY_use            228
  953. ! #define KEY_utime        229
  954. ! #define KEY_values        230
  955. ! #define KEY_vec            231
  956. ! #define KEY_wait        232
  957. ! #define KEY_waitpid        233
  958. ! #define KEY_wantarray        234
  959. ! #define KEY_warn        235
  960. ! #define KEY_while        236
  961. ! #define KEY_write        237
  962. ! #define KEY_x            238
  963. ! #define KEY_xor            239
  964. ! #define KEY_y            240
  965. --- 1,242 ----
  966.   #define KEY_NULL        0
  967.   #define KEY___LINE__        1
  968.   #define KEY___FILE__        2
  969. ! #define KEY___DATA__        3
  970. ! #define KEY___END__        4
  971. ! #define KEY_AUTOLOAD        5
  972. ! #define KEY_BEGIN        6
  973. ! #define KEY_CORE        7
  974. ! #define KEY_DESTROY        8
  975. ! #define KEY_END            9
  976. ! #define KEY_EQ            10
  977. ! #define KEY_GE            11
  978. ! #define KEY_GT            12
  979. ! #define KEY_LE            13
  980. ! #define KEY_LT            14
  981. ! #define KEY_NE            15
  982. ! #define KEY_abs            16
  983. ! #define KEY_accept        17
  984. ! #define KEY_alarm        18
  985. ! #define KEY_and            19
  986. ! #define KEY_atan2        20
  987. ! #define KEY_bind        21
  988. ! #define KEY_binmode        22
  989. ! #define KEY_bless        23
  990. ! #define KEY_caller        24
  991. ! #define KEY_chdir        25
  992. ! #define KEY_chmod        26
  993. ! #define KEY_chomp        27
  994. ! #define KEY_chop        28
  995. ! #define KEY_chown        29
  996. ! #define KEY_chr            30
  997. ! #define KEY_chroot        31
  998. ! #define KEY_close        32
  999. ! #define KEY_closedir        33
  1000. ! #define KEY_cmp            34
  1001. ! #define KEY_connect        35
  1002. ! #define KEY_continue        36
  1003. ! #define KEY_cos            37
  1004. ! #define KEY_crypt        38
  1005. ! #define KEY_dbmclose        39
  1006. ! #define KEY_dbmopen        40
  1007. ! #define KEY_defined        41
  1008. ! #define KEY_delete        42
  1009. ! #define KEY_die            43
  1010. ! #define KEY_do            44
  1011. ! #define KEY_dump        45
  1012. ! #define KEY_each        46
  1013. ! #define KEY_else        47
  1014. ! #define KEY_elsif        48
  1015. ! #define KEY_endgrent        49
  1016. ! #define KEY_endhostent        50
  1017. ! #define KEY_endnetent        51
  1018. ! #define KEY_endprotoent        52
  1019. ! #define KEY_endpwent        53
  1020. ! #define KEY_endservent        54
  1021. ! #define KEY_eof            55
  1022. ! #define KEY_eq            56
  1023. ! #define KEY_eval        57
  1024. ! #define KEY_exec        58
  1025. ! #define KEY_exists        59
  1026. ! #define KEY_exit        60
  1027. ! #define KEY_exp            61
  1028. ! #define KEY_fcntl        62
  1029. ! #define KEY_fileno        63
  1030. ! #define KEY_flock        64
  1031. ! #define KEY_for            65
  1032. ! #define KEY_foreach        66
  1033. ! #define KEY_fork        67
  1034. ! #define KEY_format        68
  1035. ! #define KEY_formline        69
  1036. ! #define KEY_ge            70
  1037. ! #define KEY_getc        71
  1038. ! #define KEY_getgrent        72
  1039. ! #define KEY_getgrgid        73
  1040. ! #define KEY_getgrnam        74
  1041. ! #define KEY_gethostbyaddr    75
  1042. ! #define KEY_gethostbyname    76
  1043. ! #define KEY_gethostent        77
  1044. ! #define KEY_getlogin        78
  1045. ! #define KEY_getnetbyaddr    79
  1046. ! #define KEY_getnetbyname    80
  1047. ! #define KEY_getnetent        81
  1048. ! #define KEY_getpeername        82
  1049. ! #define KEY_getpgrp        83
  1050. ! #define KEY_getppid        84
  1051. ! #define KEY_getpriority        85
  1052. ! #define KEY_getprotobyname    86
  1053. ! #define KEY_getprotobynumber    87
  1054. ! #define KEY_getprotoent        88
  1055. ! #define KEY_getpwent        89
  1056. ! #define KEY_getpwnam        90
  1057. ! #define KEY_getpwuid        91
  1058. ! #define KEY_getservbyname    92
  1059. ! #define KEY_getservbyport    93
  1060. ! #define KEY_getservent        94
  1061. ! #define KEY_getsockname        95
  1062. ! #define KEY_getsockopt        96
  1063. ! #define KEY_glob        97
  1064. ! #define KEY_gmtime        98
  1065. ! #define KEY_goto        99
  1066. ! #define KEY_grep        100
  1067. ! #define KEY_gt            101
  1068. ! #define KEY_hex            102
  1069. ! #define KEY_if            103
  1070. ! #define KEY_index        104
  1071. ! #define KEY_int            105
  1072. ! #define KEY_ioctl        106
  1073. ! #define KEY_join        107
  1074. ! #define KEY_keys        108
  1075. ! #define KEY_kill        109
  1076. ! #define KEY_last        110
  1077. ! #define KEY_lc            111
  1078. ! #define KEY_lcfirst        112
  1079. ! #define KEY_le            113
  1080. ! #define KEY_length        114
  1081. ! #define KEY_link        115
  1082. ! #define KEY_listen        116
  1083. ! #define KEY_local        117
  1084. ! #define KEY_localtime        118
  1085. ! #define KEY_log            119
  1086. ! #define KEY_lstat        120
  1087. ! #define KEY_lt            121
  1088. ! #define KEY_m            122
  1089. ! #define KEY_map            123
  1090. ! #define KEY_mkdir        124
  1091. ! #define KEY_msgctl        125
  1092. ! #define KEY_msgget        126
  1093. ! #define KEY_msgrcv        127
  1094. ! #define KEY_msgsnd        128
  1095. ! #define KEY_my            129
  1096. ! #define KEY_ne            130
  1097. ! #define KEY_next        131
  1098. ! #define KEY_no            132
  1099. ! #define KEY_not            133
  1100. ! #define KEY_oct            134
  1101. ! #define KEY_open        135
  1102. ! #define KEY_opendir        136
  1103. ! #define KEY_or            137
  1104. ! #define KEY_ord            138
  1105. ! #define KEY_pack        139
  1106. ! #define KEY_package        140
  1107. ! #define KEY_pipe        141
  1108. ! #define KEY_pop            142
  1109. ! #define KEY_pos            143
  1110. ! #define KEY_print        144
  1111. ! #define KEY_printf        145
  1112. ! #define KEY_push        146
  1113. ! #define KEY_q            147
  1114. ! #define KEY_qq            148
  1115. ! #define KEY_quotemeta        149
  1116. ! #define KEY_qw            150
  1117. ! #define KEY_qx            151
  1118. ! #define KEY_rand        152
  1119. ! #define KEY_read        153
  1120. ! #define KEY_readdir        154
  1121. ! #define KEY_readline        155
  1122. ! #define KEY_readlink        156
  1123. ! #define KEY_readpipe        157
  1124. ! #define KEY_recv        158
  1125. ! #define KEY_redo        159
  1126. ! #define KEY_ref            160
  1127. ! #define KEY_rename        161
  1128. ! #define KEY_require        162
  1129. ! #define KEY_reset        163
  1130. ! #define KEY_return        164
  1131. ! #define KEY_reverse        165
  1132. ! #define KEY_rewinddir        166
  1133. ! #define KEY_rindex        167
  1134. ! #define KEY_rmdir        168
  1135. ! #define KEY_s            169
  1136. ! #define KEY_scalar        170
  1137. ! #define KEY_seek        171
  1138. ! #define KEY_seekdir        172
  1139. ! #define KEY_select        173
  1140. ! #define KEY_semctl        174
  1141. ! #define KEY_semget        175
  1142. ! #define KEY_semop        176
  1143. ! #define KEY_send        177
  1144. ! #define KEY_setgrent        178
  1145. ! #define KEY_sethostent        179
  1146. ! #define KEY_setnetent        180
  1147. ! #define KEY_setpgrp        181
  1148. ! #define KEY_setpriority        182
  1149. ! #define KEY_setprotoent        183
  1150. ! #define KEY_setpwent        184
  1151. ! #define KEY_setservent        185
  1152. ! #define KEY_setsockopt        186
  1153. ! #define KEY_shift        187
  1154. ! #define KEY_shmctl        188
  1155. ! #define KEY_shmget        189
  1156. ! #define KEY_shmread        190
  1157. ! #define KEY_shmwrite        191
  1158. ! #define KEY_shutdown        192
  1159. ! #define KEY_sin            193
  1160. ! #define KEY_sleep        194
  1161. ! #define KEY_socket        195
  1162. ! #define KEY_socketpair        196
  1163. ! #define KEY_sort        197
  1164. ! #define KEY_splice        198
  1165. ! #define KEY_split        199
  1166. ! #define KEY_sprintf        200
  1167. ! #define KEY_sqrt        201
  1168. ! #define KEY_srand        202
  1169. ! #define KEY_stat        203
  1170. ! #define KEY_study        204
  1171. ! #define KEY_sub            205
  1172. ! #define KEY_substr        206
  1173. ! #define KEY_symlink        207
  1174. ! #define KEY_syscall        208
  1175. ! #define KEY_sysread        209
  1176. ! #define KEY_system        210
  1177. ! #define KEY_syswrite        211
  1178. ! #define KEY_tell        212
  1179. ! #define KEY_telldir        213
  1180. ! #define KEY_tie            214
  1181. ! #define KEY_time        215
  1182. ! #define KEY_times        216
  1183. ! #define KEY_tr            217
  1184. ! #define KEY_truncate        218
  1185. ! #define KEY_uc            219
  1186. ! #define KEY_ucfirst        220
  1187. ! #define KEY_umask        221
  1188. ! #define KEY_undef        222
  1189. ! #define KEY_unless        223
  1190. ! #define KEY_unlink        224
  1191. ! #define KEY_unpack        225
  1192. ! #define KEY_unshift        226
  1193. ! #define KEY_untie        227
  1194. ! #define KEY_until        228
  1195. ! #define KEY_use            229
  1196. ! #define KEY_utime        230
  1197. ! #define KEY_values        231
  1198. ! #define KEY_vec            232
  1199. ! #define KEY_wait        233
  1200. ! #define KEY_waitpid        234
  1201. ! #define KEY_wantarray        235
  1202. ! #define KEY_warn        236
  1203. ! #define KEY_while        237
  1204. ! #define KEY_write        238
  1205. ! #define KEY_x            239
  1206. ! #define KEY_xor            240
  1207. ! #define KEY_y            241
  1208. Index: keywords.pl
  1209. *** perl5.001l/keywords.pl    Tue Oct 18 12:20:27 1994
  1210. --- perl5.001m/keywords.pl    Wed Jun 21 12:10:15 1995
  1211. ***************
  1212. *** 26,31 ****
  1213. --- 26,32 ----
  1214.   NULL
  1215.   __LINE__
  1216.   __FILE__
  1217. + __DATA__
  1218.   __END__
  1219.   AUTOLOAD
  1220.   BEGIN
  1221. Index: lib/Exporter.pm
  1222. *** perl5.001l/lib/Exporter.pm    Tue Jun  6 15:04:47 1995
  1223. --- perl5.001m/lib/Exporter.pm    Wed Jun 21 12:07:41 1995
  1224. ***************
  1225. *** 36,41 ****
  1226. --- 36,51 ----
  1227.   You can set C<$Exporter::Verbose=1;> to see how the specifications are
  1228.   being processed and what is actually being imported into modules.
  1229.   
  1230. + =head2 Module Version Checking
  1231. + The Exporter module will convert an attempt to import a number from a
  1232. + module into a call to $module_name->require_version($value). This can
  1233. + be used to validate that the version of the module being used is
  1234. + greater than or equal to the required version.
  1235. + The Exporter module supplies a default require_version method which
  1236. + checks the value of $VERSION in the exporting module.
  1237.   =cut
  1238.   
  1239.   require 5.001;
  1240. ***************
  1241. *** 111,117 ****
  1242.   
  1243.       foreach $sym (@imports) {
  1244.           if (!$exports{$sym}) {
  1245. !         if ($sym !~ s/^&// || !$exports{$sym}) {
  1246.               warn qq["$sym" is not exported by the $pkg module ],
  1247.                   "at $callfile line $callline\n";
  1248.               $oops++;
  1249. --- 121,135 ----
  1250.   
  1251.       foreach $sym (@imports) {
  1252.           if (!$exports{$sym}) {
  1253. !         if ($sym =~ m/^\d/) {
  1254. !             $pkg->require_version($sym);
  1255. !             # If the version number was the only thing specified
  1256. !             # then we should act as if nothing was specified:
  1257. !             if (@imports == 1) {
  1258. !             @imports = @exports;
  1259. !             last;
  1260. !             }
  1261. !         } elsif ($sym !~ s/^&// || !$exports{$sym}) {
  1262.               warn qq["$sym" is not exported by the $pkg module ],
  1263.                   "at $callfile line $callline\n";
  1264.               $oops++;
  1265. ***************
  1266. *** 150,155 ****
  1267. --- 168,182 ----
  1268.       *tags = \%{"${pkg}::EXPORT_TAGS"};
  1269.       push(@{"${pkg}::EXPORT"},
  1270.       map {$tags{$_} ? @{$tags{$_}} : $_} @_ ? @_ : keys %tags);
  1271. + }
  1272. + sub require_version {
  1273. +     my($self, $wanted) = @_;
  1274. +     my $pkg = ref $self || $self;
  1275. +     my $version = ${"${pkg}::VERSION"} || "(undef)";
  1276. +     Carp::croak("$pkg $wanted required--this is only version $version")
  1277. +         if $version < $wanted;
  1278. +     $version;
  1279.   }
  1280.   
  1281.   1;
  1282. Index: lib/ExtUtils/MakeMaker.pm
  1283. Prereq:  1.21 
  1284. *** perl5.001l/lib/ExtUtils/MakeMaker.pm    Tue Jun  6 15:06:44 1995
  1285. --- perl5.001m/lib/ExtUtils/MakeMaker.pm    Wed Jun 21 12:09:55 1995
  1286. ***************
  1287. *** 1,6 ****
  1288.   package ExtUtils::MakeMaker;
  1289.   
  1290. ! $Version = 4.15; # Last edited $Date: 1995/06/06 14:04:00 $ by Andreas Koenig
  1291.   
  1292.   $Version_OK = 4.13;    # Makefiles older than $Version_OK will die
  1293.               # (Will be checked from MakeMaker version 4.13 onwards)
  1294. --- 1,6 ----
  1295.   package ExtUtils::MakeMaker;
  1296.   
  1297. ! $Version = 4.16; # Last edited $Date: 1995/06/18 16:04:00 $ by Tim Bunce
  1298.   
  1299.   $Version_OK = 4.13;    # Makefiles older than $Version_OK will die
  1300.               # (Will be checked from MakeMaker version 4.13 onwards)
  1301. ***************
  1302. *** 263,275 ****
  1303.       'clean'        => {},
  1304.       'realclean'        => {},
  1305.       'dist'        => {},
  1306. -     'test'        => {},
  1307.       'install'        => {},
  1308.       'force'        => {},
  1309.       'perldepend'    => {},
  1310.       'makefile'        => {},
  1311. !     'postamble'        => {},
  1312. !     'staticmake'    => {},
  1313.   );
  1314.   %MM_Sections = @MM_Sections_spec; # looses section ordering
  1315.   @MM_Sections = grep(!ref, @MM_Sections_spec); # keeps order
  1316. --- 263,275 ----
  1317.       'clean'        => {},
  1318.       'realclean'        => {},
  1319.       'dist'        => {},
  1320.       'install'        => {},
  1321.       'force'        => {},
  1322.       'perldepend'    => {},
  1323.       'makefile'        => {},
  1324. !     'staticmake'    => {},    # Sadly this defines more macros
  1325. !     'test'        => {},
  1326. !     'postamble'        => {},    # should always be last
  1327.   );
  1328.   %MM_Sections = @MM_Sections_spec; # looses section ordering
  1329.   @MM_Sections = grep(!ref, @MM_Sections_spec); # keeps order
  1330. ***************
  1331. *** 765,771 ****
  1332.           $xs{$name} = $c;
  1333.           $c{$c} = 1;
  1334.       } elsif ($name =~ /\.c$/){
  1335. !         $c{$name} = 1;
  1336.       } elsif ($name =~ /\.h$/){
  1337.           $h{$name} = 1;
  1338.       } elsif ($name =~ /\.(p[ml]|pod)$/){
  1339. --- 765,772 ----
  1340.           $xs{$name} = $c;
  1341.           $c{$c} = 1;
  1342.       } elsif ($name =~ /\.c$/){
  1343. !         $c{$name} = 1
  1344. !         unless $name =~ m/perlmain\.c/; # See MAP_TARGET
  1345.       } elsif ($name =~ /\.h$/){
  1346.           $h{$name} = 1;
  1347.       } elsif ($name =~ /\.(p[ml]|pod)$/){
  1348. ***************
  1349. *** 1842,1862 ****
  1350.       my(@m);
  1351.       push(@m,"
  1352.   TEST_VERBOSE=0
  1353.   
  1354. ! test :: all
  1355.   ");
  1356. -     push(@m, <<"END") if $tests;
  1357. -     \$(FULLPERL) -I\$(INST_ARCHLIB) -I\$(INST_LIB) -I\$(PERL_ARCHLIB) -I\$(PERL_LIB) -e 'use Test::Harness qw(&runtests \$\$verbose); \$\$verbose=\$(TEST_VERBOSE); runtests \@ARGV;' $tests
  1358. - END
  1359. -     push(@m, <<'END') if -f "test.pl";
  1360. -     $(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) test.pl
  1361. - END
  1362.       push(@m, map("\tcd $_ && test -f $att{MAKEFILE} && \$(MAKE) test \$(PASTHRU2)\n",
  1363.            @{$att{DIR}}));
  1364. !     push(@m, "\t\@echo 'No tests defined for \$(NAME) extension.'\n") unless @m > 1;
  1365.       join("", @m);
  1366.   }
  1367.   
  1368.   
  1369.   sub install {
  1370.       my($self, %attribs) = @_;
  1371. --- 1843,1882 ----
  1372.       my(@m);
  1373.       push(@m,"
  1374.   TEST_VERBOSE=0
  1375. + TEST_TYPE=test_$att{LINKTYPE}
  1376.   
  1377. ! test :: \$(TEST_TYPE)
  1378.   ");
  1379.       push(@m, map("\tcd $_ && test -f $att{MAKEFILE} && \$(MAKE) test \$(PASTHRU2)\n",
  1380.            @{$att{DIR}}));
  1381. !     push(@m, "\t\@echo 'No tests defined for \$(NAME) extension.'\n")
  1382. !     unless $tests or -f "test.pl" or @{$att{DIR}};
  1383. !     push(@m, "\n");
  1384. !     push(@m, "test_dynamic :: all\n");
  1385. !     push(@m, $self->test_via_harness('$(FULLPERL)', $tests)) if $tests;
  1386. !     push(@m, $self->test_via_script('$(FULLPERL)', 'test.pl')) if -f "test.pl";
  1387. !     push(@m, "\n");
  1388. !     push(@m, "test_static :: all \$(MAP_TARGET)\n");
  1389. !     push(@m, $self->test_via_harness('./$(MAP_TARGET)', $tests)) if $tests;
  1390. !     push(@m, $self->test_via_script('./$(MAP_TARGET)', 'test.pl')) if -f "test.pl";
  1391. !     push(@m, "\n");
  1392.       join("", @m);
  1393.   }
  1394.   
  1395. + sub test_via_harness {
  1396. +     my($self, $perl, $tests) = @_;
  1397. +     "\t$perl".q! -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -e 'use Test::Harness qw(&runtests $$verbose); $$verbose=$(TEST_VERBOSE); runtests @ARGV;' !."$tests\n";
  1398. + }
  1399. + sub test_via_script {
  1400. +     my($self, $perl, $script) = @_;
  1401. +     "\t$perl".' -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) test.pl
  1402. + ';
  1403. + }
  1404.   
  1405.   sub install {
  1406.       my($self, %attribs) = @_;
  1407. ***************
  1408. *** 2129,2138 ****
  1409.   pure_inst_perl: \$(MAP_TARGET)
  1410.       $att{CP} \$(MAP_TARGET) \$(INSTALLBIN)/\$(MAP_TARGET)
  1411.   
  1412. ! realclean :: map_clean
  1413.   
  1414.   map_clean :
  1415. !     $att{RM_F} $tmp/perlmain.o $tmp/perlmain.c $makefilename extralibs.ld
  1416.   };
  1417.   
  1418.       join '', @m;
  1419. --- 2149,2158 ----
  1420.   pure_inst_perl: \$(MAP_TARGET)
  1421.       $att{CP} \$(MAP_TARGET) \$(INSTALLBIN)/\$(MAP_TARGET)
  1422.   
  1423. ! clean :: map_clean
  1424.   
  1425.   map_clean :
  1426. !     $att{RM_F} $tmp/perlmain.o $tmp/perlmain.c \$(MAP_TARGET) extralibs.ld
  1427.   };
  1428.   
  1429.       join '', @m;
  1430. ***************
  1431. *** 2760,2765 ****
  1432. --- 2780,2804 ----
  1433.   =head v4.15 June 6, 1995, by Andreas Koenig
  1434.   
  1435.   Add -I$(PERL_ARCHLIB) -I$(PERL_LIB) to calls to xsubpp.
  1436. + =head v4.16 June 18, 1995, by Tim Bunce
  1437. + Split test: target into test_static: and test_dynamic: with automatic
  1438. + selection based on LINKTYPE. The test_static: target automatically
  1439. + builds a local ./perl binary containing the extension and executes the
  1440. + tests using that binary. This fixes problems that users were having
  1441. + dealing with building and testing static extensions. It also simplifies
  1442. + the process down to the standard: make + make test.
  1443. + MakeMaker no longer incorrectly considers a perlmain.c file to be part
  1444. + of an extensions source files. The map_clean target is now invoked by
  1445. + clean not realclean and now deletes MAP_TARGET but does not delete
  1446. + Makefile (since that's done properly elsewhere).
  1447. + Since the staticmake section defines macros that the test target now
  1448. + needs the test section is written into the makefile after the
  1449. + staticmake section.  The postamble section has been made last again, as
  1450. + it should be.
  1451.   
  1452.   =head1 TODO
  1453.   
  1454. Index: lib/ExtUtils/xsubpp
  1455. *** perl5.001l/lib/ExtUtils/xsubpp    Tue Jun  6 15:06:22 1995
  1456. --- perl5.001m/lib/ExtUtils/xsubpp    Thu Jun 22 10:25:32 1995
  1457. ***************
  1458. *** 6,12 ****
  1459.   
  1460.   =head1 SYNOPSIS
  1461.   
  1462. ! B<xsubpp> [B<-C++>] [B<-except>] [B<-typemap typemap>] file.xs
  1463.   
  1464.   =head1 DESCRIPTION
  1465.   
  1466. --- 6,12 ----
  1467.   
  1468.   =head1 SYNOPSIS
  1469.   
  1470. ! B<xsubpp> [B<-C++>] [B<-except>] [B<-typemap typemap>]... file.xs
  1471.   
  1472.   =head1 DESCRIPTION
  1473.   
  1474. ***************
  1475. *** 156,176 ****
  1476.   to identify the exact line in the C<.xs> file where the fault occurs.
  1477.   This can be achieved in the majority of cases.
  1478.   
  1479.   =head1 SEE ALSO
  1480.   
  1481. ! perl(1)
  1482.   
  1483.   =cut
  1484.   
  1485. - use FileHandle ;
  1486.   # Global Constants
  1487. ! $XSUBPP_version = "1.7" ;
  1488.   
  1489.   $usage = "Usage: xsubpp [-C++] [-except] [-typemap typemap] file.xs\n";
  1490.   
  1491. ! SWITCH: while ($ARGV[0] =~ s/^-//) {
  1492.       $flag = shift @ARGV;
  1493.       $spat = shift,    next SWITCH    if $flag eq 's';
  1494.       $cplusplus = 1,    next SWITCH    if $flag eq 'C++';
  1495.       $except = 1,    next SWITCH    if $flag eq 'except';
  1496. --- 156,215 ----
  1497.   to identify the exact line in the C<.xs> file where the fault occurs.
  1498.   This can be achieved in the majority of cases.
  1499.   
  1500. + =head2 1.8 
  1501. + Changes by Hallvard B Furuseth <h.b.furuseth@usit.uio.no>, 6 June 1995.
  1502. + Accept backslash-newline as in C.  Allow preprocessor directives
  1503. + anywhere.  Ignore whitespace in front of comments and on blank lines.
  1504. + =head2 1.9 
  1505. + Changes by Paul Marquess <pmarquess@bfsec.bt.co.uk>, 21 June 1995.
  1506. + =over 5
  1507. + =item 1.
  1508. + Changed duplicate function error to a warning.
  1509. + =item 2.
  1510. + Changed the comment placed at the top of the C<.c> file to be more like
  1511. + the comment used by MakeMaker.
  1512. + =item 3.
  1513. + When parsing the type for an XSUB parameter I<xsubpp> can now accept
  1514. + definitions like this:
  1515. +     char *fred
  1516. + i.e. the '*' is recognised as part of the type, rather than the first
  1517. + character of the variable.
  1518. + =item 4.
  1519. + Fixed a problem with command line parsing - I<xsubpp> was not properly
  1520. + detecting the case where there was no filename present on the command
  1521. + line.
  1522. + =back
  1523.   =head1 SEE ALSO
  1524.   
  1525. ! perl(1), perlapi(1)
  1526.   
  1527.   =cut
  1528.   
  1529.   # Global Constants
  1530. ! $XSUBPP_version = "1.9" ;
  1531.   
  1532.   $usage = "Usage: xsubpp [-C++] [-except] [-typemap typemap] file.xs\n";
  1533.   
  1534. ! SWITCH: while ($ARGV[0] =~ /^-/) {
  1535.       $flag = shift @ARGV;
  1536. +     $flag =~ s/^-// ;
  1537.       $spat = shift,    next SWITCH    if $flag eq 's';
  1538.       $cplusplus = 1,    next SWITCH    if $flag eq 'C++';
  1539.       $except = 1,    next SWITCH    if $flag eq 'except';
  1540. ***************
  1541. *** 178,184 ****
  1542.       die $usage;
  1543.   }
  1544.   @ARGV == 1 or die $usage;
  1545. ! chop($pwd = `pwd`);
  1546.   # Check for error message from VMS
  1547.   if ($pwd =~ /unrecognized command verb/) { $Is_VMS = 1; $pwd = $ENV{DEFAULT} }
  1548.   ($dir, $filename) = $ARGV[0] =~ m#(.*)/(.*)#
  1549. --- 217,223 ----
  1550.       die $usage;
  1551.   }
  1552.   @ARGV == 1 or die $usage;
  1553. ! chomp($pwd = `pwd`);
  1554.   # Check for error message from VMS
  1555.   if ($pwd =~ /unrecognized command verb/) { $Is_VMS = 1; $pwd = $ENV{DEFAULT} }
  1556.   ($dir, $filename) = $ARGV[0] =~ m#(.*)/(.*)#
  1557. ***************
  1558. *** 197,202 ****
  1559. --- 236,242 ----
  1560.   
  1561.       # rationalise any '*' by joining them into bunches and removing whitespace
  1562.       s#\s*(\*+)\s*#$1#g;
  1563. +     s#(\*+)# $1 #g ;
  1564.   
  1565.       # change multiple whitespace into a single space
  1566.       s/\s+/ /g ;
  1567. ***************
  1568. *** 221,236 ****
  1569.       unless -T $typemap ;
  1570.       open(TYPEMAP, $typemap) 
  1571.       or warn ("Warning: could not open typemap file '$typemap': $!\n"), next;
  1572. !     $mode = Typemap;
  1573.       $junk = "" ;
  1574.       $current = \$junk;
  1575.       while (<TYPEMAP>) {
  1576. !     next if /^#/;
  1577. !     if (/^INPUT\s*$/) { $mode = Input, next }
  1578. !     if (/^OUTPUT\s*$/) { $mode = Output, next }
  1579. !     if (/^TYPEMAP\s*$/) { $mode = Typemap, next }
  1580. !     if ($mode eq Typemap) {
  1581. !         chop;
  1582.           my $line = $_ ;
  1583.               TrimWhitespace($_) ;
  1584.           # skip blank lines and comment lines
  1585. --- 261,276 ----
  1586.       unless -T $typemap ;
  1587.       open(TYPEMAP, $typemap) 
  1588.       or warn ("Warning: could not open typemap file '$typemap': $!\n"), next;
  1589. !     $mode = 'Typemap';
  1590.       $junk = "" ;
  1591.       $current = \$junk;
  1592.       while (<TYPEMAP>) {
  1593. !     next if /^\s*#/;
  1594. !     if (/^INPUT\s*$/)   { $mode = 'Input';   next; }
  1595. !     if (/^OUTPUT\s*$/)  { $mode = 'Output';  next; }
  1596. !     if (/^TYPEMAP\s*$/) { $mode = 'Typemap'; next; }
  1597. !     if ($mode eq 'Typemap') {
  1598. !         chomp;
  1599.           my $line = $_ ;
  1600.               TrimWhitespace($_) ;
  1601.           # skip blank lines and comment lines
  1602. ***************
  1603. *** 242,248 ****
  1604.               TrimWhitespace($kind) ;
  1605.           $type_kind{TidyType("@words")} = $kind ;
  1606.       }
  1607. !     elsif ($mode eq Input) {
  1608.           if (/^\s/) {
  1609.           $$current .= $_;
  1610.           }
  1611. --- 282,288 ----
  1612.               TrimWhitespace($kind) ;
  1613.           $type_kind{TidyType("@words")} = $kind ;
  1614.       }
  1615. !     elsif ($mode eq 'Input') {
  1616.           if (/^\s/) {
  1617.           $$current .= $_;
  1618.           }
  1619. ***************
  1620. *** 271,277 ****
  1621.   }
  1622.   
  1623.   sub Q {
  1624. !     local $text = shift;
  1625.       $text =~ tr/#//d;
  1626.       $text =~ s/\[\[/{/g;
  1627.       $text =~ s/\]\]/}/g;
  1628. --- 311,317 ----
  1629.   }
  1630.   
  1631.   sub Q {
  1632. !     my($text) = @_;
  1633.       $text =~ tr/#//d;
  1634.       $text =~ s/\[\[/{/g;
  1635.       $text =~ s/\]\]/}/g;
  1636. ***************
  1637. *** 281,357 ****
  1638.   open(F, $filename) or die "cannot open $filename: $!\n";
  1639.   
  1640.   # Identify the version of xsubpp used
  1641. - $TimeStamp = localtime ;
  1642.   print <<EOM ;
  1643. ! /* 
  1644. !  * This file was generated automatically by xsubpp version $XSUBPP_version
  1645. !  * from $filename on $TimeStamp
  1646.    *
  1647.    */
  1648. !  
  1649.   EOM
  1650.    
  1651.   
  1652.   while (<F>) {
  1653. !     last if ($Module, $foo, $Package, $foo1, $Prefix) =
  1654. !     /^MODULE\s*=\s*([\w:]+)(\s+PACKAGE\s*=\s*([\w:]+))?(\s+PREFIX\s*=\s*(\S+))?\s*$/;
  1655.       print $_;
  1656.   }
  1657. ! exit 0 if $_ eq "";
  1658. ! $lastline = $_;
  1659.   
  1660.   sub fetch_para {
  1661.       # parse paragraph
  1662.       @line = ();
  1663.       @line_no = () ;
  1664. !     if ($lastline ne "") {
  1665. !     if ($lastline =~
  1666. !     /^MODULE\s*=\s*([\w:]+)(\s+PACKAGE\s*=\s*([\w:]+))?(\s+PREFIX\s*=\s*(\S+))?\s*$/) {
  1667. !         $Module = $1;
  1668. !         $foo = $2;
  1669. !         $Package = $3;
  1670. !         $foo1 = $4;
  1671. !         $Prefix = $5;
  1672. !         ($Module_cname = $Module) =~ s/\W/_/g;
  1673. !         ($Packid = $Package) =~ s/:/_/g;
  1674. !         $Packprefix = $Package;
  1675. !         $Packprefix .= "::" if defined $Packprefix && $Packprefix ne "";
  1676. !         while (<F>) {
  1677. !         chop;
  1678. !         next if /^#/ &&
  1679. !             !/^#[ \t]*(if|ifdef|ifndef|else|elif|endif|define|undef)\b/;
  1680. !         last if /^\S/;
  1681. !         }
  1682. !         push(@line, $_), push(@line_no, input_line_number F) if $_ ne "";
  1683. !     }
  1684. !     else {
  1685. !         push(@line, $lastline);
  1686. !             push(@line_no, $lastline_no) ;
  1687. !     }
  1688.       $lastline = "";
  1689. -     while (<F>) {
  1690. -         next if /^#/ &&
  1691. -         !/^#[ \t]*(if|ifdef|ifndef|else|elif|endif|define|undef)\b/;
  1692. -         chop;
  1693. -         if (/^\S/ && @line && $line[-1] eq "") {
  1694. -         $lastline = $_;
  1695. -                 $lastline_no = input_line_number F ;
  1696. -         last;
  1697. -         }
  1698. -         else {
  1699. -         push(@line, $_);
  1700. -                 push(@line_no, input_line_number F) ;
  1701. -         }
  1702. -     }
  1703. -     pop(@line), pop(@line_no) while @line && $line[-1] =~ /^\s*$/;
  1704.       }
  1705. !     $PPCODE = grep(/PPCODE:/, @line);
  1706. !     scalar @line;
  1707.   }
  1708.   
  1709.   PARAGRAPH:
  1710.   while (&fetch_para) {
  1711.       # initialize info arrays
  1712.       undef(%args_match);
  1713.       undef(%var_types);
  1714.       undef(%var_addr);
  1715. --- 321,405 ----
  1716.   open(F, $filename) or die "cannot open $filename: $!\n";
  1717.   
  1718.   # Identify the version of xsubpp used
  1719.   print <<EOM ;
  1720. ! /*
  1721. !  * This file was generated automatically by xsubpp version $XSUBPP_version from the 
  1722. !  * contents of $filename. Don't edit this file, edit $filename instead.
  1723. !  *
  1724. !  *    ANY CHANGES MADE HERE WILL BE LOST! 
  1725.    *
  1726.    */
  1727.   EOM
  1728.    
  1729.   
  1730.   while (<F>) {
  1731. !     last if ($Module, $Package, $Prefix) =
  1732. !     /^MODULE\s*=\s*([\w:]+)(?:\s+PACKAGE\s*=\s*([\w:]+))?(?:\s+PREFIX\s*=\s*(\S+))?\s*$/;
  1733.       print $_;
  1734.   }
  1735. ! &Exit unless defined $_;
  1736. ! my $lastline    = $_;
  1737. ! my $lastline_no = $.;
  1738.   
  1739. + # Read next xsub into @line from ($lastline, <F>).
  1740.   sub fetch_para {
  1741.       # parse paragraph
  1742.       @line = ();
  1743.       @line_no = () ;
  1744. !     return 0 unless defined $lastline;
  1745. !     if ($lastline =~
  1746. !     /^MODULE\s*=\s*([\w:]+)(?:\s+PACKAGE\s*=\s*([\w:]+))?(?:\s+PREFIX\s*=\s*(\S+))?\s*$/) {
  1747. !     $Module = $1;
  1748. !     $Package = $2;
  1749. !     $Prefix = $3;
  1750. !     ($Module_cname = $Module) =~ s/\W/_/g;
  1751. !     ($Packid = $Package) =~ s/:/_/g;
  1752. !     $Packprefix = $Package;
  1753. !     $Packprefix .= "::" if defined $Packprefix && $Packprefix ne "";
  1754.       $lastline = "";
  1755.       }
  1756. !     for(;;) {
  1757. !     if ($lastline !~ /^\s*#/ ||
  1758. !         $lastline =~ /^#[ \t]*((if|ifn?def|else|elif|endif|define|undef|pragma)\b|include\s*["<].*[>"])/) {
  1759. !         last if $lastline =~ /^\S/ && @line && $line[-1] eq "";
  1760. !         push(@line, $lastline);
  1761. !         push(@line_no, $lastline_no) ;
  1762. !     }
  1763. !     # Read next line and continuation lines
  1764. !     last unless defined($lastline = <F>);
  1765. !     $lastline_no = $.;
  1766. !     my $tmp_line;
  1767. !     $lastline .= $tmp_line
  1768. !         while ($lastline =~ /\\\n$/ && defined($tmp_line = <F>));
  1769. !         
  1770. !     # chomp $lastline;
  1771. !     $lastline =~ s/^\s+$//;
  1772. !     }
  1773. !     pop(@line), pop(@line_no) while @line && $line[-1] eq "";
  1774. !     $PPCODE = grep(/^\s*PPCODE\s*:/, @line);
  1775. !     1;
  1776.   }
  1777.   
  1778.   PARAGRAPH:
  1779.   while (&fetch_para) {
  1780. +     # Print initial preprocessor statements and blank lines
  1781. +     print shift(@line), "\n"
  1782. +     while @line && $line[0] !~ /^[^\#]/;
  1783. +     next PARAGRAPH unless @line;
  1784. +     death ("Code is not inside a function")
  1785. +     if $line[0] =~ /^\s/;
  1786.       # initialize info arrays
  1787. +     # my(%args_match,%var_types,%var_addr);
  1788. +     # my($class,$static,$elipsis,$wantRETVAL,%arg_list);
  1789.       undef(%args_match);
  1790.       undef(%var_types);
  1791.       undef(%var_addr);
  1792. ***************
  1793. *** 363,371 ****
  1794.       undef(%arg_list) ;
  1795.   
  1796.       # extract return type, function name and arguments
  1797. !     $ret_type = TidyType(shift(@line));
  1798.   
  1799. !     if ($ret_type =~ /^BOOT:/) {
  1800.           push (@BootCode, @line, "", "") ;
  1801.           next PARAGRAPH ;
  1802.       }
  1803. --- 411,419 ----
  1804.       undef(%arg_list) ;
  1805.   
  1806.       # extract return type, function name and arguments
  1807. !     my($ret_type) = TidyType(shift(@line));
  1808.   
  1809. !     if ($ret_type =~ /^BOOT\s*:/) {
  1810.           push (@BootCode, @line, "", "") ;
  1811.           next PARAGRAPH ;
  1812.       }
  1813. ***************
  1814. *** 391,397 ****
  1815.       ($pname = $func_name) =~ s/^($Prefix)?/$Packprefix/;
  1816.   
  1817.       # Check for duplicate function definition
  1818. !     blurt("Error: ignoring duplicate function definition '$func_name'"), next PARAGRAPH
  1819.       if defined $Func_name{"${Packid}_$func_name"} ;
  1820.       $Func_name{"${Packid}_$func_name"} ++ ;
  1821.   
  1822. --- 439,445 ----
  1823.       ($pname = $func_name) =~ s/^($Prefix)?/$Packprefix/;
  1824.   
  1825.       # Check for duplicate function definition
  1826. !     Warn("Warning: duplicate function definition '$func_name' detected")
  1827.       if defined $Func_name{"${Packid}_$func_name"} ;
  1828.       $Func_name{"${Packid}_$func_name"} ++ ;
  1829.   
  1830. ***************
  1831. *** 534,539 ****
  1832. --- 582,596 ----
  1833.                   blurt("Error: invalid argument declaration '$line'"), next
  1834.                       unless @words >= 2 ;
  1835.                   my $var_name = pop @words ;
  1836. +         # move any *'s from the variable name to the type
  1837. +         push(@words, $1)
  1838. +             if $var_name =~ s/^(\*+)// ;
  1839. +         # check that removing the *'s hasn't eaten the whole variable
  1840. +         blurt("Error: invalid argument declaration '$line'"), next
  1841. +             if $var_name eq '' ;
  1842.           my $var_type = "@words" ;
  1843.   
  1844.           # catch many errors similar to: SV<tab>* name
  1845. ***************
  1846. *** 593,599 ****
  1847.               $args_match{"RETVAL"} = 0;
  1848.               $var_types{"RETVAL"} = $ret_type;
  1849.           }
  1850. !         if (/^\s*PPCODE:/) {
  1851.               print $deferred;
  1852.               while (@line) {
  1853.                   $_ = shift(@line);
  1854. --- 650,656 ----
  1855.               $args_match{"RETVAL"} = 0;
  1856.               $var_types{"RETVAL"} = $ret_type;
  1857.           }
  1858. !         if (/^\s*PPCODE\s*:/) {
  1859.               print $deferred;
  1860.               while (@line) {
  1861.                   $_ = shift(@line);
  1862. ***************
  1863. *** 602,608 ****
  1864.                   print "$_\n";
  1865.               }
  1866.               print "\tPUTBACK;\n\treturn;\n";
  1867. !         } elsif (/^\s*CODE:/) {
  1868.               print $deferred;
  1869.               while (@line) {
  1870.                   $_ = shift(@line);
  1871. --- 659,665 ----
  1872.                   print "$_\n";
  1873.               }
  1874.               print "\tPUTBACK;\n\treturn;\n";
  1875. !         } elsif (/^\s*CODE\s*:/) {
  1876.               print $deferred;
  1877.               while (@line) {
  1878.                   $_ = shift(@line);
  1879. ***************
  1880. *** 618,623 ****
  1881. --- 675,681 ----
  1882.               print "\n\t";
  1883.               if ($ret_type ne "void") {
  1884.                   print "RETVAL = ";
  1885. +                 $wantRETVAL = 1;
  1886.               }
  1887.               if (defined($static)) {
  1888.                   if ($func_name =~ /^new/) {
  1889. ***************
  1890. *** 629,639 ****
  1891.               } elsif (defined($class)) {
  1892.                   print "THIS->";
  1893.               }
  1894. !             if (defined($spat) && $func_name =~ /^($spat)(.*)$/) {
  1895. !                 $func_name = $2;
  1896. !             }
  1897.               print "$func_name($func_args);\n";
  1898. -                 $wantRETVAL = 1 unless $ret_type eq "void";
  1899.           }
  1900.       }
  1901.   
  1902. --- 687,695 ----
  1903.               } elsif (defined($class)) {
  1904.                   print "THIS->";
  1905.               }
  1906. !             $func_name =~ s/^($spat)//
  1907. !                 if defined($spat);
  1908.               print "$func_name($func_args);\n";
  1909.           }
  1910.       }
  1911.   
  1912. ***************
  1913. *** 644,650 ****
  1914.           my %outargs ;
  1915.           while (@line) {
  1916.               $_ = shift(@line);
  1917. !             last if /^\s*CLEANUP|CASE\s*:/;
  1918.               TrimWhitespace($_) ;
  1919.               next if /^$/ ;
  1920.               my ($outarg, $outcode) = /^(\S+)\s*(.*)/ ;
  1921. --- 700,706 ----
  1922.           my %outargs ;
  1923.           while (@line) {
  1924.               $_ = shift(@line);
  1925. !             last if /^\s*(CLEANUP|CASE)\s*:/;
  1926.               TrimWhitespace($_) ;
  1927.               next if /^$/ ;
  1928.               my ($outarg, $outcode) = /^(\S+)\s*(.*)/ ;
  1929. ***************
  1930. *** 746,754 ****
  1931.       print "    /* End of Initialisation Section */\n\n" ;
  1932.   }
  1933.   
  1934. ! print "    ST(0) = &sv_yes;\n";
  1935. ! print "    XSRETURN(1);\n";
  1936. ! print "}\n";
  1937.   
  1938.   sub output_init {
  1939.       local($type, $num, $init) = @_;
  1940. --- 802,815 ----
  1941.       print "    /* End of Initialisation Section */\n\n" ;
  1942.   }
  1943.   
  1944. ! print Q<<"EOF";;
  1945. ! #    ST(0) = &sv_yes;
  1946. ! #    XSRETURN(1);
  1947. ! #]]
  1948. ! EOF
  1949. ! &Exit;
  1950.   
  1951.   sub output_init {
  1952.       local($type, $num, $init) = @_;
  1953. ***************
  1954. *** 874,880 ****
  1955.   }
  1956.   
  1957.   sub map_type {
  1958. !     local($type) = @_;
  1959.   
  1960.       $type =~ s/:/_/g;
  1961.       if ($type =~ /^array\(([^,]*),(.*)\)/) {
  1962. --- 935,941 ----
  1963.   }
  1964.   
  1965.   sub map_type {
  1966. !     my($type) = @_;
  1967.   
  1968.       $type =~ s/:/_/g;
  1969.       if ($type =~ /^array\(([^,]*),(.*)\)/) {
  1970. ***************
  1971. *** 884,890 ****
  1972.       }
  1973.   }
  1974.   
  1975.   # If this is VMS, the exit status has meaning to the shell, so we
  1976.   # use a predictable value (SS$_Abort) rather than an arbitrary
  1977.   # number.
  1978. ! exit ($Is_VMS ? 44 : $errors) ;
  1979. --- 945,954 ----
  1980.       }
  1981.   }
  1982.   
  1983. + sub Exit {
  1984.   # If this is VMS, the exit status has meaning to the shell, so we
  1985.   # use a predictable value (SS$_Abort) rather than an arbitrary
  1986.   # number.
  1987. !     exit ($Is_VMS ? 44 : $errors) ;
  1988. ! }
  1989. Index: lib/lib.pm
  1990. *** /dev/null    Thu Jun 22 13:39:36 1995
  1991. --- perl5.001m/lib/lib.pm    Wed Jun 21 12:13:12 1995
  1992. ***************
  1993. *** 0 ****
  1994. --- 1,103 ----
  1995. + package lib;
  1996. + @ORIG_INC = ();        # (avoid typo warning)
  1997. + @ORIG_INC = @INC;    # take a handy copy of 'original' value
  1998. + sub import {
  1999. +     shift;
  2000. +     unshift(@INC, @_);
  2001. + }
  2002. + sub unimport {
  2003. +     shift;
  2004. +     my $mode = shift if $_[0] =~ m/^:[A-Z]+/;
  2005. +     my %names;
  2006. +     foreach(@_) { ++$names{$_} };
  2007. +     if ($mode and $mode eq ':ALL') {
  2008. +     # Remove ALL instances of each named directory.
  2009. +     @INC = grep { !exists $names{$_} } @INC;
  2010. +     } else {
  2011. +     # Remove INITIAL instance(s) of each named directory.
  2012. +     @INC = grep { --$names{$_} < 0   } @INC;
  2013. +     }
  2014. + }
  2015. + __END__
  2016. + =head1 NAME
  2017. + lib - manipulate @INC at compile time
  2018. + =head1 SYNOPSIS
  2019. +     use lib LIST;
  2020. +     no lib LIST;
  2021. + =head1 DESCRIPTION
  2022. + This is a small simple module which simplifies the manipulation of @INC
  2023. + at compile time.
  2024. + It is typically used to add extra directories to perl's search path so
  2025. + that later C<use> or C<require> statements will find modules which are
  2026. + not located on perl's default search path.
  2027. + =head2 ADDING DIRECTORIES TO @INC
  2028. + The parameters to C<use lib> are added to the start of the perl search
  2029. + path. Saying
  2030. +     use lib LIST;
  2031. + is the same as saying
  2032. +     BEGIN { unshift(@INC, LIST) }
  2033. + =head2 DELETING DIRECTORIES FROM @INC
  2034. + You should normally only add directories to @INC.  If you need to
  2035. + delete directories from @INC take care to only delete those which you
  2036. + added yourself or which you are certain are not needed by other modules
  2037. + in your script.  Other modules may have added directories which they
  2038. + need for correct operation.
  2039. + By default the C<no lib> statement deletes the I<first> instance of
  2040. + each named directory from @INC.  To delete multiple instances of the
  2041. + same name from @INC you can specify the name multiple times.
  2042. + To delete I<all> instances of I<all> the specified names from @INC you can
  2043. + specify ':ALL' as the first parameter of C<no lib>. For example:
  2044. +     no lib qw(:ALL .);
  2045. + =head2 RESTORING ORIGINAL @INC
  2046. + When the lib module is first loaded it records the current value of @INC
  2047. + in an array C<@lib::ORIG_INC>. To restore @INC to that value you
  2048. + can say either
  2049. +     @INC = @lib::ORIG_INC;
  2050. + or
  2051. +     no  lib @INC;
  2052. +     use lib @lib::ORIG_INC;
  2053. + =head1 SEE ALSO
  2054. + AddINC - optional module which deals with paths relative to the source file.
  2055. + =head1 AUTHOR
  2056. + Tim Bunce, 2nd June 1995.
  2057. + =cut
  2058. Index: op.c
  2059. *** perl5.001l/op.c    Tue Jun  6 15:07:00 1995
  2060. --- perl5.001m/op.c    Thu Jun 22 10:28:08 1995
  2061. ***************
  2062. *** 18,23 ****
  2063. --- 18,35 ----
  2064.   #include "EXTERN.h"
  2065.   #include "perl.h"
  2066.   
  2067. + #ifdef USE_OP_MASK
  2068. + /*
  2069. +  * In the following definition, the ", (OP *) op" is just to make the compiler
  2070. +  * think the expression is of the right type: croak actually does a longjmp.
  2071. +  */
  2072. + #define CHECKOP(type,op) ((op_mask && op_mask[type]) ? \
  2073. +     (croak("%s trapped by operation mask", op_name[type]), (OP *) op) \
  2074. +     : (*check[type])((OP *) op))
  2075. + #else
  2076. + #define CHECKOP(type,op) (*check[type])(op)
  2077. + #endif /* USE_OP_MASK */
  2078.   static I32 list_assignment _((OP *op));
  2079.   static OP *bad_type _((I32 n, char *t, OP *op, OP *kid));
  2080.   static OP *modkids _((OP *op, I32 type));
  2081. ***************
  2082. *** 410,416 ****
  2083.       /* FALL THROUGH */
  2084.       case OP_PUSHRE:
  2085.       case OP_MATCH:
  2086. !     regfree(cPMOP->op_pmregexp);
  2087.       SvREFCNT_dec(cPMOP->op_pmshort);
  2088.       break;
  2089.       default:
  2090. --- 422,428 ----
  2091.       /* FALL THROUGH */
  2092.       case OP_PUSHRE:
  2093.       case OP_MATCH:
  2094. !     pregfree(cPMOP->op_pmregexp);
  2095.       SvREFCNT_dec(cPMOP->op_pmshort);
  2096.       break;
  2097.       default:
  2098. ***************
  2099. *** 1441,1447 ****
  2100.       op->op_ppaddr = ppaddr[type];
  2101.       op->op_flags |= flags;
  2102.   
  2103. !     op = (*check[type])(op);
  2104.       if (op->op_type != type)
  2105.       return op;
  2106.   
  2107. --- 1453,1459 ----
  2108.       op->op_ppaddr = ppaddr[type];
  2109.       op->op_flags |= flags;
  2110.   
  2111. !     op = CHECKOP(type, op);
  2112.       if (op->op_type != type)
  2113.       return op;
  2114.   
  2115. ***************
  2116. *** 1617,1623 ****
  2117.       scalar(op);
  2118.       if (opargs[type] & OA_TARGET)
  2119.       op->op_targ = pad_alloc(type, SVs_PADTMP);
  2120. !     return (*check[type])(op);
  2121.   }
  2122.   
  2123.   OP *
  2124. --- 1629,1635 ----
  2125.       scalar(op);
  2126.       if (opargs[type] & OA_TARGET)
  2127.       op->op_targ = pad_alloc(type, SVs_PADTMP);
  2128. !     return CHECKOP(type, op);
  2129.   }
  2130.   
  2131.   OP *
  2132. ***************
  2133. *** 1640,1646 ****
  2134.       unop->op_flags = flags | OPf_KIDS;
  2135.       unop->op_private = 1;
  2136.   
  2137. !     unop = (UNOP*)(*check[type])((OP*)unop);
  2138.       if (unop->op_next)
  2139.       return (OP*)unop;
  2140.   
  2141. --- 1652,1658 ----
  2142.       unop->op_flags = flags | OPf_KIDS;
  2143.       unop->op_private = 1;
  2144.   
  2145. !     unop = (UNOP*) CHECKOP(type, unop);
  2146.       if (unop->op_next)
  2147.       return (OP*)unop;
  2148.   
  2149. ***************
  2150. *** 1673,1679 ****
  2151.       first->op_sibling = last;
  2152.       }
  2153.   
  2154. !     binop = (BINOP*)(*check[type])((OP*)binop);
  2155.       if (binop->op_next)
  2156.       return (OP*)binop;
  2157.   
  2158. --- 1685,1691 ----
  2159.       first->op_sibling = last;
  2160.       }
  2161.   
  2162. !     binop = (BINOP*)CHECKOP(type, binop);
  2163.       if (binop->op_next)
  2164.       return (OP*)binop;
  2165.   
  2166. ***************
  2167. *** 1794,1800 ****
  2168.           p = SvPV(pat, plen);
  2169.           pm->op_pmflags |= PMf_SKIPWHITE;
  2170.       }
  2171. !     pm->op_pmregexp = regcomp(p, p + plen, pm);
  2172.       if (strEQ("\\s+", pm->op_pmregexp->precomp)) 
  2173.           pm->op_pmflags |= PMf_WHITE;
  2174.       hoistmust(pm);
  2175. --- 1806,1812 ----
  2176.           p = SvPV(pat, plen);
  2177.           pm->op_pmflags |= PMf_SKIPWHITE;
  2178.       }
  2179. !     pm->op_pmregexp = pregcomp(p, p + plen, pm);
  2180.       if (strEQ("\\s+", pm->op_pmregexp->precomp)) 
  2181.           pm->op_pmflags |= PMf_WHITE;
  2182.       hoistmust(pm);
  2183. ***************
  2184. *** 1905,1911 ****
  2185.       scalar((OP*)svop);
  2186.       if (opargs[type] & OA_TARGET)
  2187.       svop->op_targ = pad_alloc(type, SVs_PADTMP);
  2188. !     return (*check[type])((OP*)svop);
  2189.   }
  2190.   
  2191.   OP *
  2192. --- 1917,1923 ----
  2193.       scalar((OP*)svop);
  2194.       if (opargs[type] & OA_TARGET)
  2195.       svop->op_targ = pad_alloc(type, SVs_PADTMP);
  2196. !     return CHECKOP(type, svop);
  2197.   }
  2198.   
  2199.   OP *
  2200. ***************
  2201. *** 1925,1931 ****
  2202.       scalar((OP*)gvop);
  2203.       if (opargs[type] & OA_TARGET)
  2204.       gvop->op_targ = pad_alloc(type, SVs_PADTMP);
  2205. !     return (*check[type])((OP*)gvop);
  2206.   }
  2207.   
  2208.   OP *
  2209. --- 1937,1943 ----
  2210.       scalar((OP*)gvop);
  2211.       if (opargs[type] & OA_TARGET)
  2212.       gvop->op_targ = pad_alloc(type, SVs_PADTMP);
  2213. !     return CHECKOP(type, gvop);
  2214.   }
  2215.   
  2216.   OP *
  2217. ***************
  2218. *** 1945,1951 ****
  2219.       scalar((OP*)pvop);
  2220.       if (opargs[type] & OA_TARGET)
  2221.       pvop->op_targ = pad_alloc(type, SVs_PADTMP);
  2222. !     return (*check[type])((OP*)pvop);
  2223.   }
  2224.   
  2225.   OP *
  2226. --- 1957,1963 ----
  2227.       scalar((OP*)pvop);
  2228.       if (opargs[type] & OA_TARGET)
  2229.       pvop->op_targ = pad_alloc(type, SVs_PADTMP);
  2230. !     return CHECKOP(type, pvop);
  2231.   }
  2232.   
  2233.   OP *
  2234. ***************
  2235. *** 1967,1973 ****
  2236.       scalar((OP*)cvop);
  2237.       if (opargs[type] & OA_TARGET)
  2238.       cvop->op_targ = pad_alloc(type, SVs_PADTMP);
  2239. !     return (*check[type])((OP*)cvop);
  2240.   }
  2241.   
  2242.   void
  2243. --- 1979,1985 ----
  2244.       scalar((OP*)cvop);
  2245.       if (opargs[type] & OA_TARGET)
  2246.       cvop->op_targ = pad_alloc(type, SVs_PADTMP);
  2247. !     return CHECKOP(type, cvop);
  2248.   }
  2249.   
  2250.   void
  2251. Index: op.h
  2252. *** perl5.001l/op.h    Sat Jan 14 01:52:56 1995
  2253. --- perl5.001m/op.h    Thu Jun 22 10:22:39 1995
  2254. ***************
  2255. *** 41,47 ****
  2256.       U8        op_flags;        \
  2257.       U8        op_private;
  2258.   
  2259. ! #define GIMME (op->op_flags & OPf_KNOW ? op->op_flags & OPf_LIST : cxstack[cxstack_ix].blk_gimme & G_ARRAY)
  2260.   
  2261.   /* Public flags */
  2262.   #define OPf_LIST    1    /* Do operator in list context. */
  2263. --- 41,47 ----
  2264.       U8        op_flags;        \
  2265.       U8        op_private;
  2266.   
  2267. ! #define GIMME (op->op_flags & OPf_KNOW ? op->op_flags & OPf_LIST : dowantarray())
  2268.   
  2269.   /* Public flags */
  2270.   #define OPf_LIST    1    /* Do operator in list context. */
  2271. Index: perl.c
  2272. *** perl5.001l/perl.c    Tue Jun  6 15:07:01 1995
  2273. --- perl5.001m/perl.c    Wed Jun  7 11:58:26 1995
  2274. ***************
  2275. *** 996,1002 ****
  2276.       return s;
  2277.       case 'v':
  2278.       printf("\nThis is perl, version %s\n\n",patchlevel);
  2279. !     fputs("\tUnofficial patchlevel 1l.\n",stdout);
  2280.       fputs("\nCopyright 1987-1994, Larry Wall\n",stdout);
  2281.   #ifdef MSDOS
  2282.       fputs("MS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis\n",
  2283. --- 996,1002 ----
  2284.       return s;
  2285.       case 'v':
  2286.       printf("\nThis is perl, version %s\n\n",patchlevel);
  2287. !     fputs("\tUnofficial patchlevel 1m.\n",stdout);
  2288.       fputs("\nCopyright 1987-1994, Larry Wall\n",stdout);
  2289.   #ifdef MSDOS
  2290.       fputs("MS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis\n",
  2291. Index: perl.h
  2292. *** perl5.001l/perl.h    Tue Jun  6 15:05:40 1995
  2293. --- perl5.001m/perl.h    Tue Jun 20 10:09:03 1995
  2294. ***************
  2295. *** 1294,1299 ****
  2296. --- 1294,1300 ----
  2297.   IEXT U8        Ilocalizing;    /* are we processing a local() list? */
  2298.   IEXT bool    Itainted;    /* using variables controlled by $< */
  2299.   IEXT bool    Itainting;    /* doing taint checks */
  2300. + IEXT char *    Iop_mask IINIT(NULL);    /* masked operations for safe evals */
  2301.   
  2302.   /* trace state */
  2303.   IEXT I32    Idlevel;
  2304. Index: perldoc.SH
  2305. *** perl5.001l/perldoc.SH    Tue Jun  6 15:06:27 1995
  2306. --- perl5.001m/perldoc.SH    Tue Jun 20 14:44:21 1995
  2307. ***************
  2308. *** 97,103 ****
  2309.       die <<EOF;
  2310.   Usage: $0 [-h] PageName|ModuleName
  2311.   
  2312. ! We suggest you use C<perldoc perldoc> to get aquainted 
  2313.   with the system.
  2314.   EOF
  2315.   }
  2316. --- 97,103 ----
  2317.       die <<EOF;
  2318.   Usage: $0 [-h] PageName|ModuleName
  2319.   
  2320. ! We suggest you use "perldoc perldoc" to get aquainted 
  2321.   with the system.
  2322.   EOF
  2323.   }
  2324. Index: pod/perl.pod
  2325. *** perl5.001l/pod/perl.pod    Tue Jun  6 15:05:41 1995
  2326. --- perl5.001m/pod/perl.pod    Thu Jun 22 10:36:03 1995
  2327. ***************
  2328. *** 31,36 ****
  2329. --- 31,38 ----
  2330.       perlguts    Perl internal functions for those doing extensions 
  2331.       perlcall    Perl calling conventions from C
  2332.       perlovl    Perl overloading semantics
  2333. +     perlembed    Perl how to embed perl in your C or C++ app
  2334. +     perlpod    Perl plain old documentation
  2335.       perlbook    Perl book information
  2336.   
  2337.   (If you're intending to read these straight through for the first time,
  2338. Index: pod/pod2html.SH
  2339. *** perl5.001l/pod/pod2html.SH    Tue Jun  6 15:06:28 1995
  2340. --- perl5.001m/pod/pod2html.SH    Wed Jun 21 12:17:28 1995
  2341. ***************
  2342. *** 92,98 ****
  2343.           <!-- \$Log\$ -->
  2344.           <HTML>
  2345.   HTML__EOQ
  2346. !         <TITLE> \U$pod\E </TITLE>
  2347.   HTML__EOQQ
  2348.       }
  2349.   
  2350. --- 92,98 ----
  2351.           <!-- \$Log\$ -->
  2352.           <HTML>
  2353.   HTML__EOQ
  2354. !         <TITLE>\U$pod\E</TITLE>
  2355.   HTML__EOQQ
  2356.       }
  2357.   
  2358. ***************
  2359. *** 341,351 ****
  2360.       } 
  2361.       }
  2362.       if ($char =~ /[IF]/) {
  2363. !     return "<EM> $bigkey </EM>";
  2364.       } elsif($char =~ /C/) {
  2365. !     return "<CODE> $bigkey </CODE>";
  2366.       } else {
  2367. !     return "<STRONG> $bigkey </STRONG>";
  2368.       }
  2369.   } 
  2370.   
  2371. --- 341,351 ----
  2372.       } 
  2373.       }
  2374.       if ($char =~ /[IF]/) {
  2375. !     return "<EM>$bigkey</EM>";
  2376.       } elsif($char =~ /C/) {
  2377. !     return "<CODE>$bigkey</CODE>";
  2378.       } else {
  2379. !     return "<STRONG>$bigkey</STRONG>";
  2380.       }
  2381.   } 
  2382.   
  2383. ***************
  2384. *** 380,397 ****
  2385.       $item =~ s/\(\)$//;
  2386.       if (!$item) {
  2387.           if (!defined $section && defined $Podnames{$page}) {
  2388. !         return "\n$type$page.html\">\nthe <EM> $page </EM> manpage<\/A>\n";
  2389.       } else {
  2390.           (warn "Bizarre entry $page/$item") if $Debug;
  2391. !         return "the <EM> $_[0] </EM>  manpage\n";
  2392.       } 
  2393.       } 
  2394.   
  2395.       if ($item =~ s/"(.*)"/$1/ || ($item =~ /[^\w\/\-]/ && $item !~ /^\$.$/)) {
  2396. !     $text = "<EM> $item </EM>";
  2397.       $ref = "Headers";
  2398.       } else {
  2399. !     $text = "<EM> $item </EM>";
  2400.       $ref = "Items";
  2401.       } 
  2402.       for $podname ($pod, @inclusions){
  2403. --- 380,397 ----
  2404.       $item =~ s/\(\)$//;
  2405.       if (!$item) {
  2406.           if (!defined $section && defined $Podnames{$page}) {
  2407. !         return "\n$type$page.html\">\nthe <EM>$page</EM> manpage<\/A>\n";
  2408.       } else {
  2409.           (warn "Bizarre entry $page/$item") if $Debug;
  2410. !         return "the <EM>$_[0]</EM>  manpage\n";
  2411.       } 
  2412.       } 
  2413.   
  2414.       if ($item =~ s/"(.*)"/$1/ || ($item =~ /[^\w\/\-]/ && $item !~ /^\$.$/)) {
  2415. !     $text = "<EM>$item</EM>";
  2416.       $ref = "Headers";
  2417.       } else {
  2418. !     $text = "<EM>$item</EM>";
  2419.       $ref = "Items";
  2420.       } 
  2421.       for $podname ($pod, @inclusions){
  2422. ***************
  2423. *** 429,435 ****
  2424.       }
  2425.       }
  2426.       Debug( "vars", "bummer, $var not a var");
  2427. !     return "<STRONG> $var </STRONG>";
  2428.   } 
  2429.   
  2430.   sub gensym {
  2431. --- 429,435 ----
  2432.       }
  2433.       }
  2434.       Debug( "vars", "bummer, $var not a var");
  2435. !     return "<STRONG>$var</STRONG>";
  2436.   } 
  2437.   
  2438.   sub gensym {
  2439. Index: pp.c
  2440. *** perl5.001l/pp.c    Tue Jun  6 15:03:18 1995
  2441. --- perl5.001m/pp.c    Thu Jun 22 10:28:02 1995
  2442. ***************
  2443. *** 3391,3397 ****
  2444.       else {
  2445.       maxiters += (strend - s) * rx->nparens;
  2446.       while (s < strend && --limit &&
  2447. !         regexec(rx, s, strend, orig, 1, Nullsv, TRUE) ) {
  2448.           if (rx->subbase
  2449.             && rx->subbase != orig) {
  2450.           m = s;
  2451. --- 3391,3397 ----
  2452.       else {
  2453.       maxiters += (strend - s) * rx->nparens;
  2454.       while (s < strend && --limit &&
  2455. !         pregexec(rx, s, strend, orig, 1, Nullsv, TRUE) ) {
  2456.           if (rx->subbase
  2457.             && rx->subbase != orig) {
  2458.           m = s;
  2459. Index: pp_ctl.c
  2460. *** perl5.001l/pp_ctl.c    Tue Jun  6 15:07:02 1995
  2461. --- perl5.001m/pp_ctl.c    Thu Jun 22 10:28:07 1995
  2462. ***************
  2463. *** 68,78 ****
  2464.       t = SvPV(tmpstr, len);
  2465.   
  2466.       if (pm->op_pmregexp) {
  2467. !     regfree(pm->op_pmregexp);
  2468.       pm->op_pmregexp = Null(REGEXP*);    /* crucial if regcomp aborts */
  2469.       }
  2470.   
  2471. !     pm->op_pmregexp = regcomp(t, t + len, pm);
  2472.   
  2473.       if (!pm->op_pmregexp->prelen && curpm)
  2474.       pm = curpm;
  2475. --- 68,78 ----
  2476.       t = SvPV(tmpstr, len);
  2477.   
  2478.       if (pm->op_pmregexp) {
  2479. !     pregfree(pm->op_pmregexp);
  2480.       pm->op_pmregexp = Null(REGEXP*);    /* crucial if regcomp aborts */
  2481.       }
  2482.   
  2483. !     pm->op_pmregexp = pregcomp(t, t + len, pm);
  2484.   
  2485.       if (!pm->op_pmregexp->prelen && curpm)
  2486.       pm = curpm;
  2487. ***************
  2488. *** 108,114 ****
  2489.       rx->subbase = cx->sb_subbase;
  2490.   
  2491.       /* Are we done */
  2492. !     if (cx->sb_once || !regexec(rx, s, cx->sb_strend, orig,
  2493.                   s == m, Nullsv, cx->sb_safebase))
  2494.       {
  2495.           SV *targ = cx->sb_targ;
  2496. --- 108,114 ----
  2497.       rx->subbase = cx->sb_subbase;
  2498.   
  2499.       /* Are we done */
  2500. !     if (cx->sb_once || !pregexec(rx, s, cx->sb_strend, orig,
  2501.                   s == m, Nullsv, cx->sb_safebase))
  2502.       {
  2503.           SV *targ = cx->sb_targ;
  2504. ***************
  2505. *** 780,785 ****
  2506. --- 780,800 ----
  2507.       return i;
  2508.   }
  2509.   
  2510. + I32
  2511. + dowantarray()
  2512. + {
  2513. +     I32 cxix;
  2514. +     cxix = dopoptosub(cxstack_ix);
  2515. +     if (cxix < 0)
  2516. +     return G_SCALAR;
  2517. +     if (cxstack[cxix].blk_gimme == G_ARRAY)
  2518. +     return G_ARRAY;
  2519. +     else
  2520. +     return G_SCALAR;
  2521. + }
  2522.   static I32
  2523.   dopoptosub(startingblock)
  2524.   I32 startingblock;
  2525. ***************
  2526. *** 2045,2050 ****
  2527. --- 2060,2070 ----
  2528.       ENTER;
  2529.       SAVETMPS;
  2530.       lex_start(sv_2mortal(newSVpv("",0)));
  2531. +     if (rsfp_filters){
  2532. +      save_aptr(&rsfp_filters);
  2533. +     rsfp_filters = NULL;
  2534. +     }
  2535.       rsfp = tryrsfp;
  2536.       name = savepv(name);
  2537.       SAVEFREEPV(name);
  2538. Index: pp_hot.c
  2539. *** perl5.001l/pp_hot.c    Tue Jun  6 15:07:03 1995
  2540. --- perl5.001m/pp_hot.c    Thu Jun 22 10:28:06 1995
  2541. ***************
  2542. *** 752,758 ****
  2543.           pm->op_pmshort = Nullsv;    /* opt is being useless */
  2544.       }
  2545.       }
  2546. !     if (regexec(rx, s, strend, truebase, minmatch,
  2547.         SvSCREAM(TARG) ? TARG : Nullsv,
  2548.         safebase)) {
  2549.       curpm = pm;
  2550. --- 752,758 ----
  2551.           pm->op_pmshort = Nullsv;    /* opt is being useless */
  2552.       }
  2553.       }
  2554. !     if (pregexec(rx, s, strend, truebase, minmatch,
  2555.         SvSCREAM(TARG) ? TARG : Nullsv,
  2556.         safebase)) {
  2557.       curpm = pm;
  2558. ***************
  2559. *** 1311,1317 ****
  2560.       c = SvPV(dstr, clen);
  2561.       if (clen <= rx->minlen) {
  2562.                       /* can do inplace substitution */
  2563. !         if (regexec(rx, s, strend, orig, 0,
  2564.             SvSCREAM(TARG) ? TARG : Nullsv, safebase)) {
  2565.           if (force_on_match) {
  2566.               force_on_match = 0;
  2567. --- 1311,1317 ----
  2568.       c = SvPV(dstr, clen);
  2569.       if (clen <= rx->minlen) {
  2570.                       /* can do inplace substitution */
  2571. !         if (pregexec(rx, s, strend, orig, 0,
  2572.             SvSCREAM(TARG) ? TARG : Nullsv, safebase)) {
  2573.           if (force_on_match) {
  2574.               force_on_match = 0;
  2575. ***************
  2576. *** 1392,1398 ****
  2577.               d += clen;
  2578.               }
  2579.               s = rx->endp[0];
  2580. !         } while (regexec(rx, s, strend, orig, s == m,
  2581.               Nullsv, TRUE));    /* (don't match same null twice) */
  2582.           if (s != d) {
  2583.               i = strend - s;
  2584. --- 1392,1398 ----
  2585.               d += clen;
  2586.               }
  2587.               s = rx->endp[0];
  2588. !         } while (pregexec(rx, s, strend, orig, s == m,
  2589.               Nullsv, TRUE));    /* (don't match same null twice) */
  2590.           if (s != d) {
  2591.               i = strend - s;
  2592. ***************
  2593. *** 1410,1416 ****
  2594.       }
  2595.       else
  2596.       c = Nullch;
  2597. !     if (regexec(rx, s, strend, orig, 0,
  2598.         SvSCREAM(TARG) ? TARG : Nullsv, safebase)) {
  2599.       long_way:
  2600.       if (force_on_match) {
  2601. --- 1410,1416 ----
  2602.       }
  2603.       else
  2604.       c = Nullch;
  2605. !     if (pregexec(rx, s, strend, orig, 0,
  2606.         SvSCREAM(TARG) ? TARG : Nullsv, safebase)) {
  2607.       long_way:
  2608.       if (force_on_match) {
  2609. ***************
  2610. *** 1443,1449 ****
  2611.           sv_catpvn(dstr, c, clen);
  2612.           if (once)
  2613.           break;
  2614. !     } while (regexec(rx, s, strend, orig, s == m, Nullsv,
  2615.           safebase));
  2616.       sv_catpvn(dstr, s, strend - s);
  2617.   
  2618. --- 1443,1449 ----
  2619.           sv_catpvn(dstr, c, clen);
  2620.           if (once)
  2621.           break;
  2622. !     } while (pregexec(rx, s, strend, orig, s == m, Nullsv,
  2623.           safebase));
  2624.       sv_catpvn(dstr, s, strend - s);
  2625.   
  2626. Index: proto.h
  2627. *** perl5.001l/proto.h    Tue Jun  6 15:05:47 1995
  2628. --- perl5.001m/proto.h    Thu Jun 22 10:28:05 1995
  2629. ***************
  2630. *** 95,100 ****
  2631. --- 95,101 ----
  2632.   I32    do_trans _((SV* sv, OP* arg));
  2633.   void    do_vecset _((SV* sv));
  2634.   void    do_vop _((I32 optype, SV* sv, SV* left, SV* right));
  2635. + I32    dowantarray _((void));
  2636.   void    dump_all _((void));
  2637.   void    dump_eval _((void));
  2638.   #ifdef DUMP_FDS  /* See util.c */
  2639. ***************
  2640. *** 323,334 ****
  2641.   OP*    prepend_elem _((I32 optype, OP* head, OP* tail));
  2642.   void    push_return _((OP* op));
  2643.   void    push_scope _((void));
  2644. ! regexp*    regcomp _((char* exp, char* xend, PMOP* pm));
  2645.   OP*    ref _((OP* op, I32 type));
  2646.   OP*    refkids _((OP* op, I32 type));
  2647.   void    regdump _((regexp* r));
  2648. ! I32    regexec _((regexp* prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, I32 safebase));
  2649. ! void    regfree _((struct regexp* r));
  2650.   char*    regnext _((char* p));
  2651.   char*    regprop _((char* op));
  2652.   void    repeatcpy _((char* to, char* from, I32 len, I32 count));
  2653. --- 324,335 ----
  2654.   OP*    prepend_elem _((I32 optype, OP* head, OP* tail));
  2655.   void    push_return _((OP* op));
  2656.   void    push_scope _((void));
  2657. ! regexp*    pregcomp _((char* exp, char* xend, PMOP* pm));
  2658.   OP*    ref _((OP* op, I32 type));
  2659.   OP*    refkids _((OP* op, I32 type));
  2660.   void    regdump _((regexp* r));
  2661. ! I32    pregexec _((regexp* prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, I32 safebase));
  2662. ! void    pregfree _((struct regexp* r));
  2663.   char*    regnext _((char* p));
  2664.   char*    regprop _((char* op));
  2665.   void    repeatcpy _((char* to, char* from, I32 len, I32 count));
  2666. Index: regcomp.c
  2667. *** perl5.001l/regcomp.c    Wed Jan 25 20:08:43 1995
  2668. --- perl5.001m/regcomp.c    Thu Jun 22 10:31:19 1995
  2669. ***************
  2670. *** 14,22 ****
  2671.    * blame Henry for some of the lack of readability.
  2672.    */
  2673.   
  2674.   /*SUPPRESS 112*/
  2675.   /*
  2676. !  * regcomp and regexec -- regsub and regerror are not used in perl
  2677.    *
  2678.    *    Copyright (c) 1986 by University of Toronto.
  2679.    *    Written by Henry Spencer.  Not derived from licensed software.
  2680. --- 14,27 ----
  2681.    * blame Henry for some of the lack of readability.
  2682.    */
  2683.   
  2684. + /* The names of the functions have been changed from regcomp and
  2685. +  * regexec to  pregcomp and pregexec in order to avoid conflicts
  2686. +  * with the POSIX routines of the same names.
  2687. + */
  2688.   /*SUPPRESS 112*/
  2689.   /*
  2690. !  * pregcomp and pregexec -- regsub and regerror are not used in perl
  2691.    *
  2692.    *    Copyright (c) 1986 by University of Toronto.
  2693.    *    Written by Henry Spencer.  Not derived from licensed software.
  2694. ***************
  2695. *** 88,94 ****
  2696.   #define TRYAGAIN    0x8    /* Weeded out a declaration. */
  2697.   
  2698.   /*
  2699. !  * Forward declarations for regcomp()'s friends.
  2700.    */
  2701.   
  2702.   static char *reg _((I32, I32 *));
  2703. --- 93,99 ----
  2704.   #define TRYAGAIN    0x8    /* Weeded out a declaration. */
  2705.   
  2706.   /*
  2707. !  * Forward declarations for pregcomp()'s friends.
  2708.    */
  2709.   
  2710.   static char *reg _((I32, I32 *));
  2711. ***************
  2712. *** 107,113 ****
  2713.   static char* nextchar _((void));
  2714.   
  2715.   /*
  2716. !  - regcomp - compile a regular expression into internal code
  2717.    *
  2718.    * We can't allocate space until we know how big the compiled form will be,
  2719.    * but we can't compile it (and thus know how big it is) until we've got a
  2720. --- 112,118 ----
  2721.   static char* nextchar _((void));
  2722.   
  2723.   /*
  2724. !  - pregcomp - compile a regular expression into internal code
  2725.    *
  2726.    * We can't allocate space until we know how big the compiled form will be,
  2727.    * but we can't compile it (and thus know how big it is) until we've got a
  2728. ***************
  2729. *** 122,128 ****
  2730.    * of the structure of the compiled regexp.  [I'll say.]
  2731.    */
  2732.   regexp *
  2733. ! regcomp(exp,xend,pm)
  2734.   char* exp;
  2735.   char* xend;
  2736.   PMOP* pm;
  2737. --- 127,133 ----
  2738.    * of the structure of the compiled regexp.  [I'll say.]
  2739.    */
  2740.   regexp *
  2741. ! pregcomp(exp,xend,pm)
  2742.   char* exp;
  2743.   char* xend;
  2744.   PMOP* pm;
  2745. ***************
  2746. *** 1608,1614 ****
  2747.   #endif /* DEBUGGING */
  2748.   
  2749.   void
  2750. ! regfree(r)
  2751.   struct regexp *r;
  2752.   {
  2753.       if (!r)
  2754. --- 1613,1619 ----
  2755.   #endif /* DEBUGGING */
  2756.   
  2757.   void
  2758. ! pregfree(r)
  2759.   struct regexp *r;
  2760.   {
  2761.       if (!r)
  2762. Index: regcomp.h
  2763. *** perl5.001l/regcomp.h    Tue Oct 18 12:22:47 1994
  2764. --- perl5.001m/regcomp.h    Thu Jun 22 10:28:03 1995
  2765. ***************
  2766. *** 16,25 ****
  2767.    * Regstart and reganch permit very fast decisions on suitable starting points
  2768.    * for a match, cutting down the work a lot.  Regmust permits fast rejection
  2769.    * of lines that cannot possibly match.  The regmust tests are costly enough
  2770. !  * that regcomp() supplies a regmust only if the r.e. contains something
  2771.    * potentially expensive (at present, the only such thing detected is * or +
  2772.    * at the start of the r.e., which can involve a lot of backup).  Regmlen is
  2773. !  * supplied because the test in regexec() needs it and regcomp() is computing
  2774.    * it anyway.
  2775.    * [regmust is now supplied always.  The tests that use regmust have a
  2776.    * heuristic that disables the test if it usually matches.]
  2777. --- 16,25 ----
  2778.    * Regstart and reganch permit very fast decisions on suitable starting points
  2779.    * for a match, cutting down the work a lot.  Regmust permits fast rejection
  2780.    * of lines that cannot possibly match.  The regmust tests are costly enough
  2781. !  * that pregcomp() supplies a regmust only if the r.e. contains something
  2782.    * potentially expensive (at present, the only such thing detected is * or +
  2783.    * at the start of the r.e., which can involve a lot of backup).  Regmlen is
  2784. !  * supplied because the test in pregexec() needs it and pregcomp() is computing
  2785.    * it anyway.
  2786.    * [regmust is now supplied always.  The tests that use regmust have a
  2787.    * heuristic that disables the test if it usually matches.]
  2788. Index: regexec.c
  2789. *** perl5.001l/regexec.c    Sat Feb 11 19:19:56 1995
  2790. --- perl5.001m/regexec.c    Thu Jun 22 10:31:16 1995
  2791. ***************
  2792. *** 14,22 ****
  2793.    * blame Henry for some of the lack of readability.
  2794.    */
  2795.   
  2796.   /*SUPPRESS 112*/
  2797.   /*
  2798. !  * regcomp and regexec -- regsub and regerror are not used in perl
  2799.    *
  2800.    *    Copyright (c) 1986 by University of Toronto.
  2801.    *    Written by Henry Spencer.  Not derived from licensed software.
  2802. --- 14,27 ----
  2803.    * blame Henry for some of the lack of readability.
  2804.    */
  2805.   
  2806. + /* The names of the functions have been changed from regcomp and
  2807. +  * regexec to  pregcomp and pregexec in order to avoid conflicts
  2808. +  * with the POSIX routines of the same names.
  2809. + */
  2810.   /*SUPPRESS 112*/
  2811.   /*
  2812. !  * pregcomp and pregexec -- regsub and regerror are not used in perl
  2813.    *
  2814.    *    Copyright (c) 1986 by University of Toronto.
  2815.    *    Written by Henry Spencer.  Not derived from licensed software.
  2816. ***************
  2817. *** 132,138 ****
  2818.   #define regcpblow(cp) leave_scope(cp)
  2819.   
  2820.   /*
  2821. !  * regexec and friends
  2822.    */
  2823.   
  2824.   /*
  2825. --- 137,143 ----
  2826.   #define regcpblow(cp) leave_scope(cp)
  2827.   
  2828.   /*
  2829. !  * pregexec and friends
  2830.    */
  2831.   
  2832.   /*
  2833. ***************
  2834. *** 144,153 ****
  2835.   static I32 regtry _((regexp *prog, char *startpos));
  2836.   
  2837.   /*
  2838. !  - regexec - match a regexp against a string
  2839.    */
  2840.   I32
  2841. ! regexec(prog, stringarg, strend, strbeg, minend, screamer, safebase)
  2842.   register regexp *prog;
  2843.   char *stringarg;
  2844.   register char *strend;    /* pointer to null at end of string */
  2845. --- 149,158 ----
  2846.   static I32 regtry _((regexp *prog, char *startpos));
  2847.   
  2848.   /*
  2849. !  - pregexec - match a regexp against a string
  2850.    */
  2851.   I32
  2852. ! pregexec(prog, stringarg, strend, strbeg, minend, screamer, safebase)
  2853.   register regexp *prog;
  2854.   char *stringarg;
  2855.   register char *strend;    /* pointer to null at end of string */
  2856. Index: toke.c
  2857. *** perl5.001l/toke.c    Tue Jun  6 15:06:31 1995
  2858. --- perl5.001m/toke.c    Wed Jun 21 12:10:18 1995
  2859. ***************
  2860. *** 1018,1024 ****
  2861.       IoDIRP(datasv) = (DIR*)funcp; /* stash funcp into spare field */
  2862.       if (filter_debug)
  2863.       warn("filter_add func %lx (%s)", funcp, SvPV(datasv,na));
  2864. !     av_push(rsfp_filters, datasv);
  2865.       return(datasv);
  2866.   }
  2867.    
  2868. --- 1018,1025 ----
  2869.       IoDIRP(datasv) = (DIR*)funcp; /* stash funcp into spare field */
  2870.       if (filter_debug)
  2871.       warn("filter_add func %lx (%s)", funcp, SvPV(datasv,na));
  2872. !     av_unshift(rsfp_filters, 1);
  2873. !     av_store(rsfp_filters, 0, datasv) ;
  2874.       return(datasv);
  2875.   }
  2876.    
  2877. ***************
  2878. *** 1033,1040 ****
  2879.       if (!rsfp_filters || AvFILL(rsfp_filters)<0)
  2880.       return;
  2881.       /* if filter is on top of stack (usual case) just pop it off */
  2882. !     if (IoDIRP(FILTER_DATA(AvFILL(rsfp_filters))) == (void*)funcp){
  2883. !     sv_free(av_pop(rsfp_filters));
  2884.           return;
  2885.       }
  2886.       /* we need to search for the correct entry and clear it    */
  2887. --- 1034,1043 ----
  2888.       if (!rsfp_filters || AvFILL(rsfp_filters)<0)
  2889.       return;
  2890.       /* if filter is on top of stack (usual case) just pop it off */
  2891. !     if (IoDIRP(FILTER_DATA(0)) == (void*)funcp){
  2892. !     /* sv_free(av_pop(rsfp_filters)); */
  2893. !     sv_free(av_shift(rsfp_filters));
  2894.           return;
  2895.       }
  2896.       /* we need to search for the correct entry and clear it    */
  2897. ***************
  2898. *** 1051,1062 ****
  2899.   {
  2900.       filter_t funcp;
  2901.       SV *datasv = NULL;
  2902.       if (!rsfp_filters)
  2903.       return -1;
  2904.       if (idx > AvFILL(rsfp_filters)){       /* Any more filters?    */
  2905.       /* Provide a default input filter to make life easy.    */
  2906.       /* Note that we append to the line. This is handy.    */
  2907. -     /* We ignore maxlen here                */
  2908.       if (filter_debug)
  2909.           warn("filter_read %d: from rsfp\n", idx);
  2910.       if (maxlen) { 
  2911. --- 1054,1065 ----
  2912.   {
  2913.       filter_t funcp;
  2914.       SV *datasv = NULL;
  2915.       if (!rsfp_filters)
  2916.       return -1;
  2917.       if (idx > AvFILL(rsfp_filters)){       /* Any more filters?    */
  2918.       /* Provide a default input filter to make life easy.    */
  2919.       /* Note that we append to the line. This is handy.    */
  2920.       if (filter_debug)
  2921.           warn("filter_read %d: from rsfp\n", idx);
  2922.       if (maxlen) { 
  2923. ***************
  2924. *** 2417,2428 ****
  2925.           TERM(THING);
  2926.       }
  2927.   
  2928.       case KEY___END__: {
  2929.           GV *gv;
  2930.   
  2931.           /*SUPPRESS 560*/
  2932. !         if (!in_eval) {
  2933. !         gv = gv_fetchpv("main::DATA",TRUE, SVt_PVIO);
  2934.           SvMULTI_on(gv);
  2935.           if (!GvIO(gv))
  2936.               GvIOp(gv) = newIO();
  2937. --- 2420,2437 ----
  2938.           TERM(THING);
  2939.       }
  2940.   
  2941. +     case KEY___DATA__:
  2942.       case KEY___END__: {
  2943.           GV *gv;
  2944.   
  2945.           /*SUPPRESS 560*/
  2946. !         if (!in_eval || tokenbuf[2] == 'D') {
  2947. !         char dname[256];
  2948. !         char *pname = "main";
  2949. !         if (tokenbuf[2] == 'D')
  2950. !             pname = HvNAME(curstash ? curstash : defstash);
  2951. !         sprintf(dname,"%s::DATA", pname);
  2952. !         gv = gv_fetchpv(dname,TRUE, SVt_PVIO);
  2953.           SvMULTI_on(gv);
  2954.           if (!GvIO(gv))
  2955.               GvIOp(gv) = newIO();
  2956. ***************
  2957. *** 3308,3313 ****
  2958. --- 3317,3323 ----
  2959.       if (d[1] == '_') {
  2960.           if (strEQ(d,"__LINE__"))        return -KEY___LINE__;
  2961.           if (strEQ(d,"__FILE__"))        return -KEY___FILE__;
  2962. +         if (strEQ(d,"__DATA__"))        return KEY___DATA__;
  2963.           if (strEQ(d,"__END__"))        return KEY___END__;
  2964.       }
  2965.       break;
  2966. Index: x2p/util.c
  2967. *** perl5.001l/x2p/util.c    Wed Feb 22 14:37:22 1995
  2968. --- perl5.001m/x2p/util.c    Wed Jun 21 12:16:17 1995
  2969. ***************
  2970. *** 190,196 ****
  2971.   }
  2972.   
  2973.   /*VARARGS1*/
  2974. ! int
  2975.   croak(pat,a1,a2,a3,a4)
  2976.   char *pat;
  2977.   int a1,a2,a3,a4;
  2978. --- 190,196 ----
  2979.   }
  2980.   
  2981.   /*VARARGS1*/
  2982. ! void
  2983.   croak(pat,a1,a2,a3,a4)
  2984.   char *pat;
  2985.   int a1,a2,a3,a4;
  2986. ***************
  2987. *** 200,206 ****
  2988.   }
  2989.   
  2990.   /*VARARGS1*/
  2991. ! int
  2992.   fatal(pat,a1,a2,a3,a4)
  2993.   char *pat;
  2994.   int a1,a2,a3,a4;
  2995. --- 200,206 ----
  2996.   }
  2997.   
  2998.   /*VARARGS1*/
  2999. ! void
  3000.   fatal(pat,a1,a2,a3,a4)
  3001.   char *pat;
  3002.   int a1,a2,a3,a4;
  3003. Index: x2p/util.h
  3004. *** perl5.001l/x2p/util.h    Wed Feb 22 14:37:24 1995
  3005. --- perl5.001m/x2p/util.h    Wed Jun 21 12:16:16 1995
  3006. ***************
  3007. *** 24,33 ****
  3008.   
  3009.   char * cpy2 _(( char *to, char *from, int delim ));
  3010.   char * cpytill _(( char *to, char *from, int delim ));
  3011. ! int croak _(( char *pat, int a1, int a2, int a3, int a4 ));
  3012.   void growstr _(( char **strptr, int *curlen, int newlen ));
  3013.   char * instr _(( char *big, char *little ));
  3014. ! int Myfatal ();
  3015.   char * safecpy _(( char *to, char *from, int len ));
  3016.   char * savestr _(( char *str ));
  3017.   void warn ();
  3018. --- 24,33 ----
  3019.   
  3020.   char * cpy2 _(( char *to, char *from, int delim ));
  3021.   char * cpytill _(( char *to, char *from, int delim ));
  3022. ! void croak _(( char *pat, int a1, int a2, int a3, int a4 ));
  3023.   void growstr _(( char **strptr, int *curlen, int newlen ));
  3024.   char * instr _(( char *big, char *little ));
  3025. ! void Myfatal ();
  3026.   char * safecpy _(( char *to, char *from, int len ));
  3027.   char * savestr _(( char *str ));
  3028.   void warn ();
  3029.  
  3030.  
  3031. End of patch.
  3032.  
  3033.