home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume25 / perl / patch11 next >
Encoding:
Text File  |  1991-11-13  |  48.5 KB  |  1,884 lines

  1. Newsgroups: comp.sources.misc
  2. From: lwall@netlabs.com (Larry Wall)
  3. Subject:  v25i060:  perl - The perl programming language, Patch11
  4. Message-ID: <csm-v25i060=perl.154042@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: d15254ef4059f32bd601455797d4e5b9
  6. Date: Wed, 13 Nov 1991 21:41:29 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: lwall@netlabs.com (Larry Wall)
  10. Posting-number: Volume 25, Issue 60
  11. Archive-name: perl/patch11
  12. Environment: UNIX, MS-DOS, OS2
  13. Patch-To: perl: Volume 18, Issue 19-54
  14.  
  15. System: perl version 4.0
  16. Patch #: 11
  17. Priority: MED-HIGH
  18.  
  19. Subject: added eval {}
  20. Subject: eval 'stuff' now optimized to eval {stuff}
  21.  
  22.     This set of patches doesn't have many enhancements but this is
  23.     one of them.  The eval operator has two distinct semantic functions.
  24.     First, it runs the parser on some random string and executes it.
  25.     Second, it traps exceptions and returns them in $@.  There are times
  26.     when you'd like to get the second function without the first.  In
  27.     order to do that, you can now eval a block of code, which is parsed
  28.     like ordinary code at compile time, but which traps any run-time
  29.     errors and returns them in the $@ variable.  For instance, to
  30.     trap divide by zero errors:
  31.  
  32.         eval {
  33.             $answer = $foo / $bar;
  34.         };
  35.         warn $@ if $@;
  36.  
  37.     Since single-quoted strings don't ever change, they are optimized
  38.     to the eval {} form the first time they are encountered at run-time.
  39.     This doesn't happen too often, though some of you have written things
  40.     like eval '&try_this;'.  However, the righthand side of s///e is
  41.     evaluated as a single-quoted string, so this construct should run
  42.     somewhat faster now.
  43.  
  44. Subject: added sort {} LIST
  45.  
  46.     Another enhancement that some of you have been hankering for.
  47.     You can now inline the sort subroutine as a block where the
  48.     subroutine name used to go:
  49.  
  50.         @articles = sort {$a <=> $b;} readdir(DIR);
  51.  
  52. Subject: added some support for 64-bit integers
  53.  
  54.     For Convexen and Crayen, which have 64-bit integers, there's
  55.     now pack, unpack and sprintf support for 64-bit integers.
  56.  
  57. Subject: sprintf() now supports any length of s field
  58.  
  59.     You can now use formats like %2048s and %-8192.8192s.  Perl will
  60.     totally bypass your system's sprintf() function on these.  No,
  61.     you still probably can't say %2048d.  No, I'm not going to
  62.     change that any time soon.
  63.  
  64. Subject: substr() and vec() weren't allowed in an lvalue list
  65. Subject: extra comma at end of list is now allowed in more places (Hi, Felix!)
  66. Subject: underscore is now allowed within literal octal and hex numbers
  67.  
  68.     Various syntactic relaxations.  You can now get away with
  69.  
  70.         (substr($foo,0,3), substr($bar,0,3)) = ('abc', 'def');
  71.         (1,2,3,)[$x];
  72.         $addr = 0x1a20_ff0b;
  73.  
  74. Subject: safe malloc code now integrated into Perl's malloc when possible
  75.  
  76.     To save a bunch of subroutine calls.  If you use your system's
  77.     malloc it still has to use wrappers.
  78.  
  79. Subject: added support for dbz
  80.  
  81.     By saying "make dbzperl" you can make a copy of Perl that can
  82.     access C news's dbz files.  You still have to follow the dbz rules,
  83.     though, if you're going to try to write a dbz file.
  84.  
  85. Subject: there are now subroutines for calling back from C into Perl
  86. Subject: usub/curses.mus now supports SysV curses
  87.  
  88.     More C linkage support.  I still haven't got Perl embeddable, but
  89.     we're getting there.  That's too big an enhancement for this
  90.     update, in which I've been trying to stick to bug fixes, with some
  91.     success.
  92.  
  93. Subject: prepared for ctype implementations that don't define isascii()
  94.  
  95.     A larger percentage of this update consists of code to do
  96.     consistent ctype processing whether or not <ctype.h> is 8-bit
  97.     clean.
  98.  
  99. Subject: /$foo/o optimizer could access deallocated data
  100. Subject: certain optimizations of //g in array context returned too many values
  101. Subject: regexp with no parens in array context returned wacky $`, $& and $'
  102. Subject: $' not set right on some //g
  103. Subject: grep of a split lost its values
  104. Subject: # fields could write outside allocated memory
  105. Subject: length($x) was sometimes wrong for numeric $x
  106.  
  107.     Recently added or modified stuff that you kind of expect to be
  108.     a bit flaky still.  Well, I do...
  109.  
  110. Subject: passing non-existend array elements to subrouting caused core dump
  111. Subject: "foo" x -1 dumped core
  112. Subject: truncate on a closed filehandle could dump
  113. Subject: a last statement outside any block caused occasional core dumps
  114. Subject: missing arguments caused core dump in -D8 code
  115. Subject: cacheout.pl could dump core from invalid comparison operator
  116. Subject: *foo = undef coredumped
  117. Subject: warn '-' x 10000 dumped core
  118. Subject: index("little", "longer string") could visit faraway places
  119.  
  120.     A bunch of natty little bugs that you wouldn't generally run into
  121.     unless you're trying to be coy.
  122.  
  123. Subject: hex() didn't understand leading 0x
  124.  
  125.     It wasn't documented that it should work, but oct() understands 0x,
  126.     so why not hex()?  I dunno...
  127.  
  128. Subject: "foo\0" eq "foo" was sometimes optimized to true
  129. Subject: eval confused by string containing null
  130.  
  131.     Yet more holdovers from the time before Perl was 8-bit clean.
  132.  
  133. Subject: foreach on null list could spring memory leak
  134. Subject: local(*FILEHANDLE) had a memory leak
  135.  
  136.     Kind of slow leaks, as leaks go.  Still...
  137.  
  138. Subject: minimum match length calculation in regexp is now cumulative
  139.  
  140.     More substitutions can be done in place now because Perl knows
  141.     that patterns like in s/foo\s+bar/1234567/ have to match a
  142.     certain number of characters total.  It used to be on that
  143.     particular pattern that it only knew that it had to match at
  144.     least 3 characters.  Now it know it has to match at least 7.
  145.  
  146. Subject: multiple reallocations now avoided in 1 .. 100000
  147.  
  148.     You still don't want to say 1 .. 1000000, but at least it will
  149.     refrain from allocating intermediate sized blocks while it's
  150.     constructing the value, and won't do the extra copies implied
  151.     by realloc.
  152.  
  153. Subject: indirect subroutine calls through magic vars (e.g. &$1) didn't work
  154. Subject: defined(&$foo) and undef(&$foo) didn't work
  155. Subject: certain perl errors should set EBADF so that $! looks better
  156. Subject: stats of _ forgot whether prior stat was actually lstat
  157. Subject: -T returned true on NFS directory
  158. Subject: sysread() in socket was substituting recv()
  159. Subject: formats didn't fill their fields as well as they could
  160. Subject: ^ fields chopped hyphens on line break
  161. Subject: -P didn't allow use of #elif or #undef
  162. Subject: $0 was being truncated at times
  163. Subject: forked exec on non-existent program now issues a warning
  164.  
  165.     Various things you'd expect to work the way you expect, but
  166.     didn't when you did, or I did, or something...
  167.  
  168. Subject: perl mistook some streams for sockets because they return mode 0 too
  169. Subject: reopening STDIN, STDOUT and STDERR failed on some machines
  170.  
  171.     Problems opening files portably.  So what's new?
  172.  
  173. Subject: cppstdin now installed outside of source directory
  174. Subject: installperl now overrides installer's umask
  175.  
  176.     People who used cppstdin for the cpp filter or who had their
  177.     umask set to 700 will now be happier.  (And Configure will now
  178.     prefer /lib/cpp over cppstdin like it used to.  If this gives
  179.     your machine heartburn because /lib/cpp doesn't set the symbols
  180.     it should, write a hints file to poke them into ccflags.)
  181.  
  182. Subject: initial .* in pattern had dependency on value of $*
  183.  
  184.     An initial .* was optimized to have a ^ on the front to avoid retrying
  185.     when we know it won't match.  Unfortunately this implicit ^ was
  186.     paying attention to $*, which it shouldn't have been.
  187.  
  188. Subject: certain patterns made use of garbage pointers from uncleared memory
  189.  
  190.     Many of you saw this as a failure in t/op/pat.t.
  191.  
  192. Subject: perl now issues warning if $SIG{'ALARM'} is referenced
  193.  
  194.     Since the book mentions "SIGALARM", I thought we needed this.
  195.  
  196. Subject: solitary subroutine references no longer trigger typo warnings
  197.  
  198.     You can now use -w (more) profitably on programs that require
  199.     other files.  I figured if you mistype a subroutine name you'll
  200.     get a fatal error anyway, unlike a variable, which just defaults
  201.     to being undefined.
  202.  
  203. Subject: $foo .= <BAR> could overrun malloced memory
  204.  
  205.     Good old-fashioned bug.
  206.  
  207. Subject: \$ didn't always make it through double-quoter to regexp routines
  208. Subject: \x and \c were subject to double interpretation in regexps
  209. Subject: nested list operators could miscount parens
  210. Subject: sort eval "whatever" didn't work
  211.  
  212.     Syntactic misfeatures of various sorts.
  213.  
  214. Subject: find2perl produced incorrect code for -group
  215. Subject: find2perl could be confused by names containing whitespace
  216. Subject: in a2p, split on whitespace produced extra null field
  217.  
  218.     Translator stuff.
  219.  
  220. Subject: new complete.pl from Wayne Thompson
  221. Subject: assert.pl and exceptions.pl from Tom Christiansen
  222. Subject: added Tom's c2ph stuff
  223. Subject: getcwd.pl from Brandon S. Allbery
  224. Subject: fastcwd.pl from John Basik
  225. Subject: chat2.pl from Randal L. Schwartz
  226.  
  227.     New contributed stuff.  Thanks!
  228.  
  229.     (Not that a lot of the other stuff isn't contributed too...)
  230.  
  231. Subject: debugger got confused over nested subroutine definitions
  232. Subject: once-thru blocks didn't display right in the debugger
  233. Subject: perldb.pl modified to run within emacs in perldb-mode
  234.  
  235.     Debugger stuff.  The first two were caused by not saving line
  236.     numbers at exactly the right moment.
  237.  
  238. Subject: documented meaning of scalar(%foo)
  239.  
  240.     I also updated the Errata section of the man page.
  241.  
  242. Subject: various portability fixes
  243. Subject: random cleanup
  244. Subject: saberized perl
  245.  
  246.     Type casts, saber warning message suppression, hints files and various
  247.     metaconfig fiddlehoods.
  248.  
  249. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your perl source
  250.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  251.     If you don't have the patch program, apply the following by hand,
  252.     or get patch (version 2.0, latest patchlevel).
  253.  
  254.     After patching:
  255.         *** DO NOTHING--INSTALL ALL PATCHES UP THROUGH #18 FIRST ***
  256.  
  257.     If patch indicates that patchlevel is the wrong version, you may need
  258.     to apply one or more previous patches, or the patch may already
  259.     have been applied.  See the patchlevel.h file to find out what has or
  260.     has not been applied.  In any event, don't continue with the patch.
  261.  
  262.     If you are missing previous patches they can be obtained from me:
  263.  
  264.     Larry Wall
  265.     lwall@netlabs.com
  266.  
  267.     If you send a mail message of the following form it will greatly speed
  268.     processing:
  269.  
  270.     Subject: Command
  271.     @SH mailpatch PATH perl 4.0 LIST
  272.            ^ note the c
  273.  
  274.     where PATH is a return path FROM ME TO YOU either in Internet notation,
  275.     or in bang notation from some well-known host, and LIST is the number
  276.     of one or more patches you need, separated by spaces, commas, and/or
  277.     hyphens.  Saying 35- says everything from 35 to the end.
  278.  
  279.  
  280. Index: patchlevel.h
  281. Prereq: 10
  282. 1c1
  283. < #define PATCHLEVEL 10
  284. ---
  285. > #define PATCHLEVEL 11
  286.  
  287.  
  288. Index: Configure
  289. Prereq: 4.0.1.2
  290. *** Configure.old    Tue Nov  5 23:12:54 1991
  291. --- Configure    Tue Nov  5 23:12:55 1991
  292. ***************
  293. *** 8,14 ****
  294.   # and edit it to reflect your system.  Some packages may include samples
  295.   # of config.h for certain machines, so you might look for one of those.)
  296.   #
  297. ! # $RCSfile: Configure,v $$Revision: 4.0.1.2 $$Date: 91/06/07 10:09:34 $
  298.   #
  299.   # Yes, you may rip this off to use in other distribution packages.
  300.   # (Note: this Configure script was generated automatically.  Rather than
  301. --- 8,14 ----
  302.   # and edit it to reflect your system.  Some packages may include samples
  303.   # of config.h for certain machines, so you might look for one of those.)
  304.   #
  305. ! # $RCSfile: Configure,v $$Revision: 4.0.1.5 $$Date: 91/11/05 23:11:32 $
  306.   #
  307.   # Yes, you may rip this off to use in other distribution packages.
  308.   # (Note: this Configure script was generated automatically.  Rather than
  309. ***************
  310. *** 17,30 ****
  311.   cat >/tmp/c1$$ <<EOF
  312.   ARGGGHHHH!!!!!
  313.   
  314. ! SCO csh still thinks true is false.  Write to SCO today and tell them that next
  315. ! year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
  316.   
  317. ! (Actually, Configure ought to just patch csh in place.  Hmm.  Hmmmmm.  All
  318. ! we'd have to do is go in and swap the && and || tokens, wherever they are.)
  319.   
  320. - [End of diatribe.  We now return you to your regularly scheduled programming...]
  321.   EOF
  322.   cat >/tmp/c2$$ <<EOF
  323.   OOPS!  You naughty creature!  You didn't run Configure with sh!
  324. --- 17,29 ----
  325.   cat >/tmp/c1$$ <<EOF
  326.   ARGGGHHHH!!!!!
  327.   
  328. ! Your csh still thinks true is false.  Write to your vendor today and tell
  329. ! them that next year Configure ought to "rm /bin/csh" unless they fix their
  330. ! blasted shell. :-)
  331.   
  332. ! [End of diatribe.  We now return you to your regularly scheduled
  333. ! programming...]
  334.   
  335.   EOF
  336.   cat >/tmp/c2$$ <<EOF
  337.   OOPS!  You naughty creature!  You didn't run Configure with sh!
  338. ***************
  339. *** 249,255 ****
  340.   ndiro=''
  341.   mallocsrc=''
  342.   mallocobj=''
  343. ! usemymalloc=''
  344.   mallocptrtype=''
  345.   mansrc=''
  346.   manext=''
  347. --- 248,254 ----
  348.   ndiro=''
  349.   mallocsrc=''
  350.   mallocobj=''
  351. ! d_mymalloc=''
  352.   mallocptrtype=''
  353.   mansrc=''
  354.   manext=''
  355. ***************
  356. *** 304,310 ****
  357.   undef='undef'
  358.   : change the next line if compiling for Xenix/286 on Xenix/386
  359.   xlibpth='/usr/lib/386 /lib/386'
  360. ! libpth='/usr/ccs/lib /usr/lib /usr/ucblib /usr/local/lib /usr/lib/large /lib '$xlibpth' /lib/large /usr/lib/small /lib/small'
  361.   smallmach='pdp11 i8086 z8000 i80286 iAPX286'
  362.   trap 'echo " "; exit 1' 1 2 3
  363.   
  364. --- 303,323 ----
  365.   undef='undef'
  366.   : change the next line if compiling for Xenix/286 on Xenix/386
  367.   xlibpth='/usr/lib/386 /lib/386'
  368. ! : the hints files may add more components to libpth
  369. ! test -d /usr/cs/lib        && libpth="$libpth /usr/cs/lib"
  370. ! test -d /usr/ccs/lib        && libpth="$libpth /usr/ccs/lib"
  371. ! test -d /usr/lib        && libpth="$libpth /usr/lib"
  372. ! test -d /usr/ucblib        && libpth="$libpth /usr/ucblib"
  373. ! test -d /usr/local/lib        && libpth="$libpth /usr/local/lib"
  374. ! test -d /usr/lib/large        && libpth="$libpth /usr/lib/large"
  375. ! test -d /lib            && libpth="$libpth /lib"
  376. !                    libpth="$libpth $xlibpth"
  377. ! test -d /lib/large        && libpth="$libpth /lib/large"
  378. ! test -d /usr/lib/small        && libpth="$libpth /usr/lib/small"
  379. ! test -d /lib/small        && libpth="$libpth /lib/small"
  380. ! test -d /usr/lib/cmplrs/cc    && libpth="$libpth /usr/lib/cmplrs/cc"
  381.   smallmach='pdp11 i8086 z8000 i80286 iAPX286'
  382.   trap 'echo " "; exit 1' 1 2 3
  383.   
  384. ***************
  385. *** 341,347 ****
  386.   d_ndir=ndir
  387.   voidwant=1
  388.   voidwant=7
  389. ! libswanted="c_s net_s net nsl_s nsl socket nm ndir ndbm dbm malloc sun m bsd BSD x posix ucb"
  390.   inclwanted='/usr/include /usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan /usr/ucbinclude'
  391.   
  392.   : Now test for existence of everything in MANIFEST
  393. --- 354,360 ----
  394.   d_ndir=ndir
  395.   voidwant=1
  396.   voidwant=7
  397. ! libswanted="c_s net_s net nsl_s nsl socket nm ndir ndbm dbm PW malloc sun m bsd BSD x posix ucb"
  398.   inclwanted='/usr/include /usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan /usr/ucbinclude'
  399.   
  400.   : Now test for existence of everything in MANIFEST
  401. ***************
  402. *** 737,742 ****
  403. --- 750,757 ----
  404.       hint=previous
  405.       ;;
  406.       esac
  407. + else
  408. +     lastuname=`(uname -a) 2>&1`
  409.   fi
  410.   if test -d ../hints && test ! -f ../config.sh; then
  411.       echo ' '
  412. ***************
  413. *** 1262,1267 ****
  414. --- 1277,1287 ----
  415.       n*) nativegcc="$undef"; gccflags='-fpcc-struct-return';;
  416.       *) nativegcc="$define"; gccflags='';;
  417.       esac
  418. +     case "$gccflags" in
  419. +     *-ansi*) ;;
  420. +     *-traditional*) ;;
  421. +     *) gccflags="$gccflags -traditional -Dvolatile=__volatile__" ;;
  422. +     esac
  423.       ;;
  424.   esac
  425.   
  426. ***************
  427. *** 1710,1716 ****
  428.   cd ..
  429.   echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
  430.   chmod 755 cppstdin
  431. ! wrapper=`pwd`/cppstdin
  432.   cd UU
  433.   
  434.   if test "X$cppstdin" != "X" && \
  435. --- 1730,1741 ----
  436.   cd ..
  437.   echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
  438.   chmod 755 cppstdin
  439. ! wrapper=cppstdin
  440. ! case "$cppstdin" in
  441. ! /*cppstdin) cppstdin=cppstdin;;
  442. ! esac
  443. ! cp cppstdin UU
  444.   cd UU
  445.   
  446.   if test "X$cppstdin" != "X" && \
  447. ***************
  448. *** 1736,1747 ****
  449.       echo "Yup, it does."
  450.       cppstdin="$cc -E"
  451.       cppminus='-';
  452. - elif echo 'Uh-uh.  Time to get fancy.  Trying a wrapper...'; \
  453. -   $wrapper <testcpp.c >testcpp.out 2>&1; \
  454. -   $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  455. -     cppstdin="$wrapper"
  456. -     cppminus=''
  457. -     echo "Eureka!."
  458.   elif echo 'No such luck, maybe "'$cpp'" will work...'; \
  459.     $cpp <testcpp.c >testcpp.out 2>&1; \
  460.     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  461. --- 1761,1766 ----
  462. ***************
  463. *** 1754,1759 ****
  464. --- 1773,1784 ----
  465.       echo "Hooray, it works!  I was beginning to wonder."
  466.       cppstdin="$cpp"
  467.       cppminus='-';
  468. + elif echo 'Uh-uh.  Time to get fancy.  Trying a wrapper...'; \
  469. +   $wrapper <testcpp.c >testcpp.out 2>&1; \
  470. +   $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  471. +     cppstdin="$wrapper"
  472. +     cppminus=''
  473. +     echo "Eureka!."
  474.   elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
  475.     $cc -P <testcpp.c >testcpp.out 2>&1; \
  476.     $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
  477. ***************
  478. *** 2497,2503 ****
  479.   if $test -r $usrinclude/pwd.h ; then
  480.       i_pwd="$define"
  481.       echo "pwd.h found."
  482. !     $cppstdin $cppflags $cppminus <$usrinclude/pwd.h >pwd.txt
  483.       if $contains 'pw_quota' pwd.txt >/dev/null 2>&1; then
  484.       d_pwquota="$define"
  485.       else
  486. --- 2522,2529 ----
  487.   if $test -r $usrinclude/pwd.h ; then
  488.       i_pwd="$define"
  489.       echo "pwd.h found."
  490. !     $cppstdin $cppflags $cppminus <$usrinclude/pwd.h | \
  491. !     sed -n '/struct[     ][     ]*passwd/,/^};/p' >pwd.txt
  492.       if $contains 'pw_quota' pwd.txt >/dev/null 2>&1; then
  493.       d_pwquota="$define"
  494.       else
  495. ***************
  496. *** 3029,3044 ****
  497.   
  498.   : determine which malloc to compile in
  499.   echo " "
  500. ! case "$usemymalloc" in
  501.   '')
  502. !     if bsd || v7; then
  503. !     dflt='y'
  504. !     else
  505. !     dflt='n'
  506. !     fi
  507.       ;;
  508. ! *)  dflt="$usemymalloc"
  509.       ;;
  510.   esac
  511.   rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
  512.   $echo $n "$rp $c"
  513. --- 3055,3078 ----
  514.   
  515.   : determine which malloc to compile in
  516.   echo " "
  517. ! case "$d_mymalloc" in
  518.   '')
  519. !     case "$usemymalloc" in
  520. !     '')
  521. !     if bsd || v7; then
  522. !         dflt='y'
  523. !     else
  524. !         dflt='n'
  525. !     fi
  526. !     ;;
  527. !     n*) dflt=n;;
  528. !     *)  dflt=y;;
  529. !     esac
  530.       ;;
  531. ! define)  dflt="y"
  532.       ;;
  533. + *)  dflt="n"
  534. +     ;;
  535.   esac
  536.   rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
  537.   $echo $n "$rp $c"
  538. ***************
  539. *** 3046,3055 ****
  540.   case "$ans" in
  541.   '') ans=$dflt;;
  542.   esac
  543. - usemymalloc="$ans"
  544.   case "$ans" in
  545.   y*) mallocsrc='malloc.c'; mallocobj='malloc.o'
  546.       libs=`echo $libs | sed 's/-lmalloc//'`
  547.       case "$mallocptrtype" in
  548.       '')
  549.       cat >usemymalloc.c <<'END'
  550. --- 3080,3089 ----
  551.   case "$ans" in
  552.   '') ans=$dflt;;
  553.   esac
  554.   case "$ans" in
  555.   y*) mallocsrc='malloc.c'; mallocobj='malloc.o'
  556.       libs=`echo $libs | sed 's/-lmalloc//'`
  557. +     val="$define"
  558.       case "$mallocptrtype" in
  559.       '')
  560.       cat >usemymalloc.c <<'END'
  561. ***************
  562. *** 3070,3077 ****
  563.       echo " "
  564.       echo "Your system wants malloc to return $mallocptrtype*, it would seem."
  565.       ;;
  566. ! *) mallocsrc=''; mallocobj=''; mallocptrtype=void;;
  567.   esac
  568.   
  569.   : determine where private executables go
  570.   case "$privlib" in
  571. --- 3104,3117 ----
  572.       echo " "
  573.       echo "Your system wants malloc to return $mallocptrtype*, it would seem."
  574.       ;;
  575. ! *)  mallocsrc='';
  576. !     mallocobj='';
  577. !     mallocptrtype=void
  578. !     val="$define"
  579. !     ;;
  580.   esac
  581. + set d_mymalloc
  582. + eval $setvar
  583.   
  584.   : determine where private executables go
  585.   case "$privlib" in
  586. ***************
  587. *** 3734,3740 ****
  588.   ndiro='$ndiro'
  589.   mallocsrc='$mallocsrc'
  590.   mallocobj='$mallocobj'
  591. ! usemymalloc='$usemymalloc'
  592.   mallocptrtype='$mallocptrtype'
  593.   mansrc='$mansrc'
  594.   manext='$manext'
  595. --- 3774,3780 ----
  596.   ndiro='$ndiro'
  597.   mallocsrc='$mallocsrc'
  598.   mallocobj='$mallocobj'
  599. ! d_mymalloc='$d_mymalloc'
  600.   mallocptrtype='$mallocptrtype'
  601.   mansrc='$mansrc'
  602.   manext='$manext'
  603.  
  604. Index: Makefile.SH
  605. *** Makefile.SH.old    Tue Nov  5 19:25:22 1991
  606. --- Makefile.SH    Tue Nov  5 19:25:23 1991
  607. ***************
  608. *** 25,33 ****
  609.   
  610.   echo "Extracting Makefile (with variable substitutions)"
  611.   cat >Makefile <<!GROK!THIS!
  612. ! # $RCSfile: Makefile.SH,v $$Revision: 4.0.1.2 $$Date: 91/06/07 10:14:43 $
  613.   #
  614.   # $Log:    Makefile.SH,v $
  615.   # Revision 4.0.1.2  91/06/07  10:14:43  lwall
  616.   # patch4: cflags now emits entire cc command except for the filename
  617.   # patch4: alternate make programs are now semi-supported
  618. --- 25,37 ----
  619.   
  620.   echo "Extracting Makefile (with variable substitutions)"
  621.   cat >Makefile <<!GROK!THIS!
  622. ! # $RCSfile: Makefile.SH,v $$Revision: 4.0.1.3 $$Date: 91/11/05 15:48:11 $
  623.   #
  624.   # $Log:    Makefile.SH,v $
  625. + # Revision 4.0.1.3  91/11/05  15:48:11  lwall
  626. + # patch11: saberized perl
  627. + # patch11: added support for dbz
  628. + # 
  629.   # Revision 4.0.1.2  91/06/07  10:14:43  lwall
  630.   # patch4: cflags now emits entire cc command except for the filename
  631.   # patch4: alternate make programs are now semi-supported
  632. ***************
  633. *** 56,61 ****
  634. --- 60,66 ----
  635.   mallocsrc = $mallocsrc
  636.   mallocobj = $mallocobj
  637.   SLN = $sln
  638. + RMS = rm -f
  639.   
  640.   libs = $libs $cryptlib
  641.   
  642. ***************
  643. *** 91,98 ****
  644.   
  645.   c = $(c1) $(c2) $(c3)
  646.   
  647.   obj1 = array.o cmd.o cons.o consarg.o doarg.o doio.o dolist.o dump.o
  648. ! obj2 = eval.o form.o hash.o $(mallocobj) perl.o regcomp.o regexec.o
  649.   obj3 = stab.o str.o toke.o util.o
  650.   
  651.   obj = $(obj1) $(obj2) $(obj3)
  652. --- 96,109 ----
  653.   
  654.   c = $(c1) $(c2) $(c3)
  655.   
  656. + s1 = array.c cmd.c cons.c consarg.c doarg.c doio.c dolist.c dump.c
  657. + s2 = eval.c form.c hash.c perl.c regcomp.c regexec.c
  658. + s3 = stab.c str.c toke.c util.c usersub.c perly.c
  659. + saber = $(s1) $(s2) $(s3)
  660.   obj1 = array.o cmd.o cons.o consarg.o doarg.o doio.o dolist.o dump.o
  661. ! obj2 = eval.o form.o $(mallocobj) perl.o regcomp.o regexec.o
  662.   obj3 = stab.o str.o toke.o util.o
  663.   
  664.   obj = $(obj1) $(obj2) $(obj3)
  665. ***************
  666. *** 122,136 ****
  667.   # The $& notation is tells Sequent machines that it can do a parallel make,
  668.   # and is harmless otherwise.
  669.   
  670. ! perl: $& perly.o $(obj) usersub.o
  671. !     $(CC) $(LARGE) $(CLDFLAGS) $(obj) perly.o usersub.o $(libs) -o perl
  672.   
  673. ! uperl.o: $& perly.o $(obj)
  674. !     -ld $(LARGE) $(LDFLAGS) -r $(obj) perly.o -o uperl.o
  675.   
  676. ! saber: perly.c
  677. !     # load $(c) perly.c
  678.   
  679.   # This version, if specified in Configure, does ONLY those scripts which need
  680.   # set-id emulation.  Suidperl must be setuid root.  It contains the "taint"
  681.   # checks as well as the special code to validate that the script in question
  682. --- 133,159 ----
  683.   # The $& notation is tells Sequent machines that it can do a parallel make,
  684.   # and is harmless otherwise.
  685.   
  686. ! perl: $& perly.o $(obj) hash.o usersub.o
  687. !     $(CC) $(LARGE) $(CLDFLAGS) $(obj) hash.o perly.o usersub.o $(libs) -o perl
  688.   
  689. ! # This command assumes that /usr/include/dbz.h and /usr/lib/dbz.o exist.
  690.   
  691. ! dbzperl: $& perly.o $(obj) zhash.o usersub.o
  692. !     $(CC) $(LARGE) $(CLDFLAGS) $(obj) zhash.o /usr/lib/dbz.o perly.o usersub.o $(libs) -o dbzperl
  693.   
  694. + zhash.o: hash.c $(h)
  695. +     $(RMS) zhash.c
  696. +     $(SLN) hash.c zhash.c
  697. +     $(CCCMD) -DWANT_DBZ zhash.c
  698. +     $(RMS) zhash.c
  699. + uperl.o: $& perly.o $(obj) hash.o
  700. +     -ld $(LARGE) $(LDFLAGS) -r $(obj) hash.o perly.o -o uperl.o
  701. + saber: $(saber)
  702. +     # load $(saber)
  703. +     # load /lib/libm.a
  704.   # This version, if specified in Configure, does ONLY those scripts which need
  705.   # set-id emulation.  Suidperl must be setuid root.  It contains the "taint"
  706.   # checks as well as the special code to validate that the script in question
  707. ***************
  708. *** 152,275 ****
  709.   # Replicating all this junk is yucky, but I don't see a portable way to fix it.
  710.   
  711.   tperly.o: perly.c perly.h $(h)
  712. !     /bin/rm -f tperly.c
  713.       $(SLN) perly.c tperly.c
  714.       $(CCCMD) -DTAINT tperly.c
  715. !     /bin/rm -f tperly.c
  716.   
  717.   tperl.o: perl.c perly.h patchlevel.h perl.h $(h)
  718. !     /bin/rm -f tperl.c
  719.       $(SLN) perl.c tperl.c
  720.       $(CCCMD) -DTAINT tperl.c
  721. !     /bin/rm -f tperl.c
  722.   
  723.   sperl.o: perl.c perly.h patchlevel.h $(h)
  724. !     /bin/rm -f sperl.c
  725.       $(SLN) perl.c sperl.c
  726.       $(CCCMD) -DTAINT -DIAMSUID sperl.c
  727. !     /bin/rm -f sperl.c
  728.   
  729.   tarray.o: array.c $(h)
  730. !     /bin/rm -f tarray.c
  731.       $(SLN) array.c tarray.c
  732.       $(CCCMD) -DTAINT tarray.c
  733. !     /bin/rm -f tarray.c
  734.   
  735.   tcmd.o: cmd.c $(h)
  736. !     /bin/rm -f tcmd.c
  737.       $(SLN) cmd.c tcmd.c
  738.       $(CCCMD) -DTAINT tcmd.c
  739. !     /bin/rm -f tcmd.c
  740.   
  741.   tcons.o: cons.c $(h) perly.h
  742. !     /bin/rm -f tcons.c
  743.       $(SLN) cons.c tcons.c
  744.       $(CCCMD) -DTAINT tcons.c
  745. !     /bin/rm -f tcons.c
  746.   
  747.   tconsarg.o: consarg.c $(h)
  748. !     /bin/rm -f tconsarg.c
  749.       $(SLN) consarg.c tconsarg.c
  750.       $(CCCMD) -DTAINT tconsarg.c
  751. !     /bin/rm -f tconsarg.c
  752.   
  753.   tdoarg.o: doarg.c $(h)
  754. !     /bin/rm -f tdoarg.c
  755.       $(SLN) doarg.c tdoarg.c
  756.       $(CCCMD) -DTAINT tdoarg.c
  757. !     /bin/rm -f tdoarg.c
  758.   
  759.   tdoio.o: doio.c $(h)
  760. !     /bin/rm -f tdoio.c
  761.       $(SLN) doio.c tdoio.c
  762.       $(CCCMD) -DTAINT tdoio.c
  763. !     /bin/rm -f tdoio.c
  764.   
  765.   tdolist.o: dolist.c $(h)
  766. !     /bin/rm -f tdolist.c
  767.       $(SLN) dolist.c tdolist.c
  768.       $(CCCMD) -DTAINT tdolist.c
  769. !     /bin/rm -f tdolist.c
  770.   
  771.   tdump.o: dump.c $(h)
  772. !     /bin/rm -f tdump.c
  773.       $(SLN) dump.c tdump.c
  774.       $(CCCMD) -DTAINT tdump.c
  775. !     /bin/rm -f tdump.c
  776.   
  777.   teval.o: eval.c $(h)
  778. !     /bin/rm -f teval.c
  779.       $(SLN) eval.c teval.c
  780.       $(CCCMD) -DTAINT teval.c
  781. !     /bin/rm -f teval.c
  782.   
  783.   tform.o: form.c $(h)
  784. !     /bin/rm -f tform.c
  785.       $(SLN) form.c tform.c
  786.       $(CCCMD) -DTAINT tform.c
  787. !     /bin/rm -f tform.c
  788.   
  789.   thash.o: hash.c $(h)
  790. !     /bin/rm -f thash.c
  791.       $(SLN) hash.c thash.c
  792.       $(CCCMD) -DTAINT thash.c
  793. !     /bin/rm -f thash.c
  794.   
  795.   tregcomp.o: regcomp.c $(h)
  796. !     /bin/rm -f tregcomp.c
  797.       $(SLN) regcomp.c tregcomp.c
  798.       $(CCCMD) -DTAINT tregcomp.c
  799. !     /bin/rm -f tregcomp.c
  800.   
  801.   tregexec.o: regexec.c $(h)
  802. !     /bin/rm -f tregexec.c
  803.       $(SLN) regexec.c tregexec.c
  804.       $(CCCMD) -DTAINT tregexec.c
  805. !     /bin/rm -f tregexec.c
  806.   
  807.   tstab.o: stab.c $(h)
  808. !     /bin/rm -f tstab.c
  809.       $(SLN) stab.c tstab.c
  810.       $(CCCMD) -DTAINT tstab.c
  811. !     /bin/rm -f tstab.c
  812.   
  813.   tstr.o: str.c $(h) perly.h
  814. !     /bin/rm -f tstr.c
  815.       $(SLN) str.c tstr.c
  816.       $(CCCMD) -DTAINT tstr.c
  817. !     /bin/rm -f tstr.c
  818.   
  819.   ttoke.o: toke.c $(h) perly.h
  820. !     /bin/rm -f ttoke.c
  821.       $(SLN) toke.c ttoke.c
  822.       $(CCCMD) -DTAINT ttoke.c
  823. !     /bin/rm -f ttoke.c
  824.   
  825.   tutil.o: util.c $(h)
  826. !     /bin/rm -f tutil.c
  827.       $(SLN) util.c tutil.c
  828.       $(CCCMD) -DTAINT tutil.c
  829. !     /bin/rm -f tutil.c
  830.   
  831.   perly.h: perly.c
  832.       @ echo Dummy dependency for dumb parallel make
  833. --- 175,298 ----
  834.   # Replicating all this junk is yucky, but I don't see a portable way to fix it.
  835.   
  836.   tperly.o: perly.c perly.h $(h)
  837. !     $(RMS) tperly.c
  838.       $(SLN) perly.c tperly.c
  839.       $(CCCMD) -DTAINT tperly.c
  840. !     $(RMS) tperly.c
  841.   
  842.   tperl.o: perl.c perly.h patchlevel.h perl.h $(h)
  843. !     $(RMS) tperl.c
  844.       $(SLN) perl.c tperl.c
  845.       $(CCCMD) -DTAINT tperl.c
  846. !     $(RMS) tperl.c
  847.   
  848.   sperl.o: perl.c perly.h patchlevel.h $(h)
  849. !     $(RMS) sperl.c
  850.       $(SLN) perl.c sperl.c
  851.       $(CCCMD) -DTAINT -DIAMSUID sperl.c
  852. !     $(RMS) sperl.c
  853.   
  854.   tarray.o: array.c $(h)
  855. !     $(RMS) tarray.c
  856.       $(SLN) array.c tarray.c
  857.       $(CCCMD) -DTAINT tarray.c
  858. !     $(RMS) tarray.c
  859.   
  860.   tcmd.o: cmd.c $(h)
  861. !     $(RMS) tcmd.c
  862.       $(SLN) cmd.c tcmd.c
  863.       $(CCCMD) -DTAINT tcmd.c
  864. !     $(RMS) tcmd.c
  865.   
  866.   tcons.o: cons.c $(h) perly.h
  867. !     $(RMS) tcons.c
  868.       $(SLN) cons.c tcons.c
  869.       $(CCCMD) -DTAINT tcons.c
  870. !     $(RMS) tcons.c
  871.   
  872.   tconsarg.o: consarg.c $(h)
  873. !     $(RMS) tconsarg.c
  874.       $(SLN) consarg.c tconsarg.c
  875.       $(CCCMD) -DTAINT tconsarg.c
  876. !     $(RMS) tconsarg.c
  877.   
  878.   tdoarg.o: doarg.c $(h)
  879. !     $(RMS) tdoarg.c
  880.       $(SLN) doarg.c tdoarg.c
  881.       $(CCCMD) -DTAINT tdoarg.c
  882. !     $(RMS) tdoarg.c
  883.   
  884.   tdoio.o: doio.c $(h)
  885. !     $(RMS) tdoio.c
  886.       $(SLN) doio.c tdoio.c
  887.       $(CCCMD) -DTAINT tdoio.c
  888. !     $(RMS) tdoio.c
  889.   
  890.   tdolist.o: dolist.c $(h)
  891. !     $(RMS) tdolist.c
  892.       $(SLN) dolist.c tdolist.c
  893.       $(CCCMD) -DTAINT tdolist.c
  894. !     $(RMS) tdolist.c
  895.   
  896.   tdump.o: dump.c $(h)
  897. !     $(RMS) tdump.c
  898.       $(SLN) dump.c tdump.c
  899.       $(CCCMD) -DTAINT tdump.c
  900. !     $(RMS) tdump.c
  901.   
  902.   teval.o: eval.c $(h)
  903. !     $(RMS) teval.c
  904.       $(SLN) eval.c teval.c
  905.       $(CCCMD) -DTAINT teval.c
  906. !     $(RMS) teval.c
  907.   
  908.   tform.o: form.c $(h)
  909. !     $(RMS) tform.c
  910.       $(SLN) form.c tform.c
  911.       $(CCCMD) -DTAINT tform.c
  912. !     $(RMS) tform.c
  913.   
  914.   thash.o: hash.c $(h)
  915. !     $(RMS) thash.c
  916.       $(SLN) hash.c thash.c
  917.       $(CCCMD) -DTAINT thash.c
  918. !     $(RMS) thash.c
  919.   
  920.   tregcomp.o: regcomp.c $(h)
  921. !     $(RMS) tregcomp.c
  922.       $(SLN) regcomp.c tregcomp.c
  923.       $(CCCMD) -DTAINT tregcomp.c
  924. !     $(RMS) tregcomp.c
  925.   
  926.   tregexec.o: regexec.c $(h)
  927. !     $(RMS) tregexec.c
  928.       $(SLN) regexec.c tregexec.c
  929.       $(CCCMD) -DTAINT tregexec.c
  930. !     $(RMS) tregexec.c
  931.   
  932.   tstab.o: stab.c $(h)
  933. !     $(RMS) tstab.c
  934.       $(SLN) stab.c tstab.c
  935.       $(CCCMD) -DTAINT tstab.c
  936. !     $(RMS) tstab.c
  937.   
  938.   tstr.o: str.c $(h) perly.h
  939. !     $(RMS) tstr.c
  940.       $(SLN) str.c tstr.c
  941.       $(CCCMD) -DTAINT tstr.c
  942. !     $(RMS) tstr.c
  943.   
  944.   ttoke.o: toke.c $(h) perly.h
  945. !     $(RMS) ttoke.c
  946.       $(SLN) toke.c ttoke.c
  947.       $(CCCMD) -DTAINT ttoke.c
  948. !     $(RMS) ttoke.c
  949.   
  950.   tutil.o: util.c $(h)
  951. !     $(RMS) tutil.c
  952.       $(SLN) util.c tutil.c
  953.       $(CCCMD) -DTAINT tutil.c
  954. !     $(RMS) tutil.c
  955.   
  956.   perly.h: perly.c
  957.       @ echo Dummy dependency for dumb parallel make
  958. ***************
  959. *** 298,303 ****
  960. --- 321,327 ----
  961.       rm -f *.orig */*.orig *~ */*~ core $(addedbyconf) h2ph h2ph.man
  962.       rm -f perly.c perly.h t/perl Makefile config.h makedepend makedir
  963.       rm -f makefile x2p/Makefile x2p/makefile cflags x2p/cflags
  964. +     rm -f c2ph pstruct
  965.   
  966.   # The following lint has practically everything turned on.  Unfortunately,
  967.   # you have to wade through a lot of mumbo jumbo that can't be suppressed.
  968. ***************
  969. *** 327,333 ****
  970.       echo $(sh) | tr ' ' '\012' >.shlist
  971.   
  972.   # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  973. ! $(obj):
  974.       @ echo "You haven't done a "'"make depend" yet!'; exit 1
  975.   makedepend: makedepend.SH
  976.       /bin/sh makedepend.SH
  977. --- 351,357 ----
  978.       echo $(sh) | tr ' ' '\012' >.shlist
  979.   
  980.   # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  981. ! $(obj) hash.o:
  982.       @ echo "You haven't done a "'"make depend" yet!'; exit 1
  983.   makedepend: makedepend.SH
  984.       /bin/sh makedepend.SH
  985. ***************
  986. *** 339,341 ****
  987. --- 363,366 ----
  988.       ln Makefile ../Makefile
  989.       ;;
  990.   esac
  991. + rm -f makefile
  992.  
  993. Index: x2p/Makefile.SH
  994. *** x2p/Makefile.SH.old    Tue Nov  5 19:28:33 1991
  995. --- x2p/Makefile.SH    Tue Nov  5 19:28:33 1991
  996. ***************
  997. *** 13,27 ****
  998.       . ./config.sh
  999.       ;;
  1000.   esac
  1001. - case "$mallocsrc" in
  1002. - '') ;;
  1003. - *) mallocsrc="../$mallocsrc";;
  1004. - esac
  1005.   echo "Extracting x2p/Makefile (with variable substitutions)"
  1006.   cat >Makefile <<!GROK!THIS!
  1007. ! # $RCSfile: Makefile.SH,v $$Revision: 4.0.1.1 $$Date: 91/06/07 12:12:14 $
  1008.   #
  1009.   # $Log:    Makefile.SH,v $
  1010.   # Revision 4.0.1.1  91/06/07  12:12:14  lwall
  1011.   # patch4: cflags now emits entire cc command except for the filename
  1012.   # 
  1013. --- 13,26 ----
  1014.       . ./config.sh
  1015.       ;;
  1016.   esac
  1017.   echo "Extracting x2p/Makefile (with variable substitutions)"
  1018.   cat >Makefile <<!GROK!THIS!
  1019. ! # $RCSfile: Makefile.SH,v $$Revision: 4.0.1.2 $$Date: 91/11/05 19:19:04 $
  1020.   #
  1021.   # $Log:    Makefile.SH,v $
  1022. + # Revision 4.0.1.2  91/11/05  19:19:04  lwall
  1023. + # patch11: random cleanup
  1024. + # 
  1025.   # Revision 4.0.1.1  91/06/07  12:12:14  lwall
  1026.   # patch4: cflags now emits entire cc command except for the filename
  1027.   # 
  1028. ***************
  1029. *** 119,125 ****
  1030.   lint:
  1031.       lint $(lintflags) $(defs) $(c) > a2p.fuzz
  1032.   
  1033. ! depend: ../makedepend
  1034.       ../makedepend
  1035.   
  1036.   clist:
  1037. --- 118,124 ----
  1038.   lint:
  1039.       lint $(lintflags) $(defs) $(c) > a2p.fuzz
  1040.   
  1041. ! depend: $(mallocsrc) ../makedepend
  1042.       ../makedepend
  1043.   
  1044.   clist:
  1045. ***************
  1046. *** 135,140 ****
  1047. --- 134,142 ----
  1048.       rm -f config.sh
  1049.       ln ../config.sh .
  1050.   
  1051. + malloc.c: ../malloc.c
  1052. +     sed 's/"perl.h"/"..\/perl.h"/' ../malloc.c >malloc.c
  1053.   # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  1054.   $(obj):
  1055.       @ echo "You haven't done a "'"make depend" yet!'; exit 1
  1056. ***************
  1057. *** 148,150 ****
  1058. --- 150,153 ----
  1059.       ln Makefile ../Makefile
  1060.       ;;
  1061.   esac
  1062. + rm -f makefile
  1063.  
  1064. Index: README
  1065. *** README.old    Tue Nov  5 19:25:25 1991
  1066. --- README    Tue Nov  5 19:25:26 1991
  1067. ***************
  1068. *** 149,154 ****
  1069. --- 149,156 ----
  1070.       If you have GDBM available and want it instead of NDBM, say -DHAS_GDBM.
  1071.       C's that don't try to restore registers on longjmp() may need -DJMPCLOBBER.
  1072.       (Try this if you get random glitches.)
  1073. +     If you get duplicates upon linking for malloc et al, say -DHIDEMYMALLOC.
  1074. +     Turn on support for 64-bit integers (long longs) with -DQUAD.
  1075.   
  1076.   5)  make test
  1077.   
  1078.  
  1079. Index: hints/altos486.sh
  1080. *** hints/altos486.sh.old    Tue Nov  5 19:26:26 1991
  1081. --- hints/altos486.sh    Tue Nov  5 19:26:27 1991
  1082. ***************
  1083. *** 0 ****
  1084. --- 1,3 ----
  1085. + : have heard of problems with -lc_s on Altos 486
  1086. + set `echo " $libswanted " | sed "s/ c_s / /"`
  1087. + libswanted="$*"
  1088.  
  1089. Index: hints/apollo_C6_8.sh
  1090. *** hints/apollo_C6_8.sh.old    Tue Nov  5 19:26:28 1991
  1091. --- hints/apollo_C6_8.sh    Tue Nov  5 19:26:28 1991
  1092. ***************
  1093. *** 0 ****
  1094. --- 1,20 ----
  1095. + optimize=''
  1096. + ccflags='-DDEBUGGING -A cpu,mathchip -W0,-opt,2'
  1097. + cat <<'EOF'
  1098. + Some tests may fail unless you use 'chacl -B'.  Also, op/stat
  1099. + test 2 may fail occasionally because Apollo doesn't guarantee
  1100. + that mtime will be equal to ctime on a newly created unmodified
  1101. + file.  Finally, the sleep test will sometimes fail.  See the
  1102. + sleep(3) man page to learn why.
  1103. + And a note on ccflags:
  1104. +     Lastly, while -A cpu,mathchip generates optimal code for your DN3500
  1105. +     running sr10.3, be aware that you should be using -A cpu,mathlib_sr10
  1106. +     if your perl must also run on any machines running sr10.0, sr10.1, or
  1107. +     sr10.2.  The -A cpu,mathchip option generates code that doesn't work on
  1108. +     pre-sr10.3 nodes.  See the cc(1) man page for more details.
  1109. +                         -- Steve Vinoski
  1110. + EOF
  1111.  
  1112.  
  1113. Index: lib/assert.pl
  1114. *** lib/assert.pl.old    Tue Nov  5 19:26:48 1991
  1115. --- lib/assert.pl    Tue Nov  5 19:26:48 1991
  1116. ***************
  1117. *** 0 ****
  1118. --- 1,52 ----
  1119. + # assert.pl
  1120. + # tchrist@convex.com (Tom Christiansen)
  1121. + # 
  1122. + # Usage:
  1123. + # 
  1124. + #     &assert('@x > @y');
  1125. + #     &assert('$var > 10', $var, $othervar, @various_info);
  1126. + # 
  1127. + # That is, if the first expression evals false, we blow up.  The
  1128. + # rest of the args, if any, are nice to know because they will
  1129. + # be printed out by &panic, which is just the stack-backtrace
  1130. + # routine shamelessly borrowed from the perl debugger.
  1131. + sub assert {
  1132. +     &panic("ASSERTION BOTCHED: $_[0]",$@) unless eval $_[0];
  1133. + } 
  1134. + sub panic {
  1135. +     select(STDERR);
  1136. +     print "\npanic: @_\n";
  1137. +     exit 1 if $] <= 4.003;  # caller broken
  1138. +     # stack traceback gratefully borrowed from perl debugger
  1139. +     local($i,$_);
  1140. +     local($p,$f,$l,$s,$h,$a,@a,@sub);
  1141. +     for ($i = 0; ($p,$f,$l,$s,$h,$w) = caller($i); $i++) {
  1142. +     @a = @DB'args;
  1143. +     for (@a) {
  1144. +         if (/^StB\000/ && length($_) == length($_main{'_main'})) {
  1145. +         $_ = sprintf("%s",$_);
  1146. +         }
  1147. +         else {
  1148. +         s/'/\\'/g;
  1149. +         s/([^\0]*)/'$1'/ unless /^-?[\d.]+$/;
  1150. +         s/([\200-\377])/sprintf("M-%c",ord($1)&0177)/eg;
  1151. +         s/([\0-\37\177])/sprintf("^%c",ord($1)^64)/eg;
  1152. +         }
  1153. +     }
  1154. +     $w = $w ? '@ = ' : '$ = ';
  1155. +     $a = $h ? '(' . join(', ', @a) . ')' : '';
  1156. +     push(@sub, "$w&$s$a from file $f line $l\n");
  1157. +     }
  1158. +     for ($i=0; $i <= $#sub; $i++) {
  1159. +     print $sub[$i];
  1160. +     }
  1161. +     exit 1;
  1162. + } 
  1163. + 1;
  1164.  
  1165. Index: usub/bsdcurses.mus
  1166. *** usub/bsdcurses.mus.old    Tue Nov  5 19:28:15 1991
  1167. --- usub/bsdcurses.mus    Tue Nov  5 19:28:16 1991
  1168. ***************
  1169. *** 0 ****
  1170. --- 1,684 ----
  1171. + /* $RCSfile: bsdcurses.mus,v $$Revision: 4.0.1.1 $$Date: 91/11/05 19:04:53 $
  1172. +  *
  1173. +  * $Log:    bsdcurses.mus,v $
  1174. +  * Revision 4.0.1.1  91/11/05  19:04:53  lwall
  1175. +  * initial checkin
  1176. +  * 
  1177. +  * Revision 4.0  91/03/20  01:56:13  lwall
  1178. +  * 4.0 baseline.
  1179. +  * 
  1180. +  * Revision 3.0.1.1  90/08/09  04:05:21  lwall
  1181. +  * patch19: Initial revision
  1182. +  * 
  1183. +  */
  1184. + #include "EXTERN.h"
  1185. + #include "perl.h"
  1186. + char *savestr();
  1187. + #include <curses.h>
  1188. + static enum uservars {
  1189. +     UV_curscr,
  1190. +     UV_stdscr,
  1191. +     UV_Def_term,
  1192. +     UV_My_term,
  1193. +     UV_ttytype,
  1194. +     UV_LINES,
  1195. +     UV_COLS,
  1196. +     UV_ERR,
  1197. +     UV_OK,
  1198. + };
  1199. + static enum usersubs {
  1200. +     US_addch,
  1201. +     US_waddch,
  1202. +     US_addstr,
  1203. +     US_waddstr,
  1204. +     US_box,
  1205. +     US_clear,
  1206. +     US_wclear,
  1207. +     US_clearok,
  1208. +     US_clrtobot,
  1209. +     US_wclrtobot,
  1210. +     US_clrtoeol,
  1211. +     US_wclrtoeol,
  1212. +     US_delch,
  1213. +     US_wdelch,
  1214. +     US_deleteln,
  1215. +     US_wdeleteln,
  1216. +     US_erase,
  1217. +     US_werase,
  1218. +     US_flushok,
  1219. +     US_idlok,
  1220. +     US_insch,
  1221. +     US_winsch,
  1222. +     US_insertln,
  1223. +     US_winsertln,
  1224. +     US_move,
  1225. +     US_wmove,
  1226. +     US_overlay,
  1227. +     US_overwrite,
  1228. +     US_printw,
  1229. +     US_wprintw,
  1230. +     US_refresh,
  1231. +     US_wrefresh,
  1232. +     US_standout,
  1233. +     US_wstandout,
  1234. +     US_standend,
  1235. +     US_wstandend,
  1236. +     US_cbreak,
  1237. +     US_nocbreak,
  1238. +     US_echo,
  1239. +     US_noecho,
  1240. +     US_getch,
  1241. +     US_wgetch,
  1242. +     US_getstr,
  1243. +     US_wgetstr,
  1244. +     US_raw,
  1245. +     US_noraw,
  1246. +     US_scanw,
  1247. +     US_wscanw,
  1248. +     US_baudrate,
  1249. +     US_delwin,
  1250. +     US_endwin,
  1251. +     US_erasechar,
  1252. +     US_getcap,
  1253. +     US_getyx,
  1254. +     US_inch,
  1255. +     US_winch,
  1256. +     US_initscr,
  1257. +     US_killchar,
  1258. +     US_leaveok,
  1259. +     US_longname,
  1260. +     US_fullname,
  1261. +     US_mvwin,
  1262. +     US_newwin,
  1263. +     US_nl,
  1264. +     US_nonl,
  1265. +     US_scrollok,
  1266. +     US_subwin,
  1267. +     US_touchline,
  1268. +     US_touchoverlap,
  1269. +     US_touchwin,
  1270. +     US_unctrl,
  1271. +     US_gettmode,
  1272. +     US_mvcur,
  1273. +     US_scroll,
  1274. +     US_savetty,
  1275. +     US_resetty,
  1276. +     US_setterm,
  1277. +     US_tstp,
  1278. +     US__putchar,
  1279. +     US_testcallback,
  1280. + };
  1281. + static int usersub();
  1282. + static int userset();
  1283. + static int userval();
  1284. + int
  1285. + init_curses()
  1286. + {
  1287. +     struct ufuncs uf;
  1288. +     char *filename = "curses.c";
  1289. +     uf.uf_set = userset;
  1290. +     uf.uf_val = userval;
  1291. + #define MAGICVAR(name, ix) uf.uf_index = ix, magicname(name, &uf, sizeof uf)
  1292. +     MAGICVAR("curscr",    UV_curscr);
  1293. +     MAGICVAR("stdscr",    UV_stdscr);
  1294. +     MAGICVAR("Def_term",UV_Def_term);
  1295. +     MAGICVAR("My_term",    UV_My_term);
  1296. +     MAGICVAR("ttytype",    UV_ttytype);
  1297. +     MAGICVAR("LINES",    UV_LINES);
  1298. +     MAGICVAR("COLS",    UV_COLS);
  1299. +     MAGICVAR("ERR",    UV_ERR);
  1300. +     MAGICVAR("OK",    UV_OK);
  1301. +     make_usub("addch",        US_addch,    usersub, filename);
  1302. +     make_usub("waddch",        US_waddch,    usersub, filename);
  1303. +     make_usub("addstr",        US_addstr,    usersub, filename);
  1304. +     make_usub("waddstr",    US_waddstr,    usersub, filename);
  1305. +     make_usub("box",        US_box,        usersub, filename);
  1306. +     make_usub("clear",        US_clear,    usersub, filename);
  1307. +     make_usub("wclear",        US_wclear,    usersub, filename);
  1308. +     make_usub("clearok",    US_clearok,    usersub, filename);
  1309. +     make_usub("clrtobot",    US_clrtobot,    usersub, filename);
  1310. +     make_usub("wclrtobot",    US_wclrtobot,    usersub, filename);
  1311. +     make_usub("clrtoeol",    US_clrtoeol,    usersub, filename);
  1312. +     make_usub("wclrtoeol",    US_wclrtoeol,    usersub, filename);
  1313. +     make_usub("delch",        US_delch,    usersub, filename);
  1314. +     make_usub("wdelch",        US_wdelch,    usersub, filename);
  1315. +     make_usub("deleteln",    US_deleteln,    usersub, filename);
  1316. +     make_usub("wdeleteln",    US_wdeleteln,    usersub, filename);
  1317. +     make_usub("erase",        US_erase,    usersub, filename);
  1318. +     make_usub("werase",        US_werase,    usersub, filename);
  1319. +     make_usub("flushok",    US_flushok,    usersub, filename);
  1320. +     make_usub("idlok",        US_idlok,    usersub, filename);
  1321. +     make_usub("insch",        US_insch,    usersub, filename);
  1322. +     make_usub("winsch",        US_winsch,    usersub, filename);
  1323. +     make_usub("insertln",    US_insertln,    usersub, filename);
  1324. +     make_usub("winsertln",    US_winsertln,    usersub, filename);
  1325. +     make_usub("move",        US_move,    usersub, filename);
  1326. +     make_usub("wmove",        US_wmove,    usersub, filename);
  1327. +     make_usub("overlay",    US_overlay,    usersub, filename);
  1328. +     make_usub("overwrite",    US_overwrite,    usersub, filename);
  1329. +     make_usub("printw",        US_printw,    usersub, filename);
  1330. +     make_usub("wprintw",    US_wprintw,    usersub, filename);
  1331. +     make_usub("refresh",    US_refresh,    usersub, filename);
  1332. +     make_usub("wrefresh",    US_wrefresh,    usersub, filename);
  1333. +     make_usub("standout",    US_standout,    usersub, filename);
  1334. +     make_usub("wstandout",    US_wstandout,    usersub, filename);
  1335. +     make_usub("standend",    US_standend,    usersub, filename);
  1336. +     make_usub("wstandend",    US_wstandend,    usersub, filename);
  1337. +     make_usub("cbreak",        US_cbreak,    usersub, filename);
  1338. +     make_usub("nocbreak",    US_nocbreak,    usersub, filename);
  1339. +     make_usub("echo",        US_echo,    usersub, filename);
  1340. +     make_usub("noecho",        US_noecho,    usersub, filename);
  1341. +     make_usub("getch",        US_getch,    usersub, filename);
  1342. +     make_usub("wgetch",        US_wgetch,    usersub, filename);
  1343. +     make_usub("getstr",        US_getstr,    usersub, filename);
  1344. +     make_usub("wgetstr",    US_wgetstr,    usersub, filename);
  1345. +     make_usub("raw",        US_raw,        usersub, filename);
  1346. +     make_usub("noraw",        US_noraw,    usersub, filename);
  1347. +     make_usub("scanw",        US_scanw,    usersub, filename);
  1348. +     make_usub("wscanw",        US_wscanw,    usersub, filename);
  1349. +     make_usub("baudrate",    US_baudrate,    usersub, filename);
  1350. +     make_usub("delwin",        US_delwin,    usersub, filename);
  1351. +     make_usub("endwin",        US_endwin,    usersub, filename);
  1352. +     make_usub("erasechar",    US_erasechar,    usersub, filename);
  1353. +     make_usub("getcap",        US_getcap,    usersub, filename);
  1354. +     make_usub("getyx",        US_getyx,    usersub, filename);
  1355. +     make_usub("inch",        US_inch,    usersub, filename);
  1356. +     make_usub("winch",        US_winch,    usersub, filename);
  1357. +     make_usub("initscr",    US_initscr,    usersub, filename);
  1358. +     make_usub("killchar",    US_killchar,    usersub, filename);
  1359. +     make_usub("leaveok",    US_leaveok,    usersub, filename);
  1360. +     make_usub("longname",    US_longname,    usersub, filename);
  1361. +     make_usub("fullname",    US_fullname,    usersub, filename);
  1362. +     make_usub("mvwin",        US_mvwin,    usersub, filename);
  1363. +     make_usub("newwin",        US_newwin,    usersub, filename);
  1364. +     make_usub("nl",        US_nl,        usersub, filename);
  1365. +     make_usub("nonl",        US_nonl,    usersub, filename);
  1366. +     make_usub("scrollok",    US_scrollok,    usersub, filename);
  1367. +     make_usub("subwin",        US_subwin,    usersub, filename);
  1368. +     make_usub("touchline",    US_touchline,    usersub, filename);
  1369. +     make_usub("touchoverlap",    US_touchoverlap,usersub, filename);
  1370. +     make_usub("touchwin",    US_touchwin,    usersub, filename);
  1371. +     make_usub("unctrl",        US_unctrl,    usersub, filename);
  1372. +     make_usub("gettmode",    US_gettmode,    usersub, filename);
  1373. +     make_usub("mvcur",        US_mvcur,    usersub, filename);
  1374. +     make_usub("scroll",        US_scroll,    usersub, filename);
  1375. +     make_usub("savetty",    US_savetty,    usersub, filename);
  1376. +     make_usub("resetty",    US_resetty,    usersub, filename);
  1377. +     make_usub("setterm",    US_setterm,    usersub, filename);
  1378. +     make_usub("tstp",        US_tstp,    usersub, filename);
  1379. +     make_usub("_putchar",    US__putchar,    usersub, filename);
  1380. +     make_usub("testcallback",    US_testcallback,usersub, filename);
  1381. + };
  1382. + static int
  1383. + usersub(ix, sp, items)
  1384. + int ix;
  1385. + register int sp;
  1386. + register int items;
  1387. + {
  1388. +     STR **st = stack->ary_array + sp;
  1389. +     register int i;
  1390. +     register char *tmps;
  1391. +     register STR *Str;        /* used in str_get and str_gnum macros */
  1392. +     switch (ix) {
  1393. + CASE int addch
  1394. + I    char        ch
  1395. + END
  1396. + CASE int waddch
  1397. + I    WINDOW*        win
  1398. + I    char        ch
  1399. + END
  1400. + CASE int addstr
  1401. + I    char*        str
  1402. + END
  1403. + CASE int waddstr
  1404. + I    WINDOW*        win
  1405. + I    char*        str
  1406. + END
  1407. + CASE int box
  1408. + I    WINDOW*        win
  1409. + I    char        vert
  1410. + I    char        hor
  1411. + END
  1412. + CASE int clear
  1413. + END
  1414. + CASE int wclear
  1415. + I    WINDOW*        win
  1416. + END
  1417. + CASE int clearok
  1418. + I    WINDOW*        win
  1419. + I    bool        boolf
  1420. + END
  1421. + CASE int clrtobot
  1422. + END
  1423. + CASE int wclrtobot
  1424. + I    WINDOW*        win
  1425. + END
  1426. + CASE int clrtoeol
  1427. + END
  1428. + CASE int wclrtoeol
  1429. + I    WINDOW*        win
  1430. + END
  1431. + CASE int delch
  1432. + END
  1433. + CASE int wdelch
  1434. + I    WINDOW*        win
  1435. + END
  1436. + CASE int deleteln
  1437. + END
  1438. + CASE int wdeleteln
  1439. + I    WINDOW*        win
  1440. + END
  1441. + CASE int erase
  1442. + END
  1443. + CASE int werase
  1444. + I    WINDOW*        win
  1445. + END
  1446. + CASE int flushok
  1447. + I    WINDOW*        win
  1448. + I    bool        boolf
  1449. + END
  1450. + CASE int idlok
  1451. + I    WINDOW*        win
  1452. + I    bool        boolf
  1453. + END
  1454. + CASE int insch
  1455. + I    char        c
  1456. + END
  1457. + CASE int winsch
  1458. + I    WINDOW*        win
  1459. + I    char        c
  1460. + END
  1461. + CASE int insertln
  1462. + END
  1463. + CASE int winsertln
  1464. + I    WINDOW*        win
  1465. + END
  1466. + CASE int move
  1467. + I    int        y
  1468. + I    int        x
  1469. + END
  1470. + CASE int wmove
  1471. + I    WINDOW*        win
  1472. + I    int        y
  1473. + I    int        x
  1474. + END
  1475. + CASE int overlay
  1476. + I    WINDOW*        win1
  1477. + I    WINDOW*        win2
  1478. + END
  1479. + CASE int overwrite
  1480. + I    WINDOW*        win1
  1481. + I    WINDOW*        win2
  1482. + END
  1483. +     case US_printw:
  1484. +     if (items < 1)
  1485. +         fatal("Usage: &printw($fmt, $arg1, $arg2, ... )");
  1486. +     else {
  1487. +         int retval;
  1488. +         STR*    str =        str_new(0);
  1489. +         do_sprintf(str, items - 1, st + 1);
  1490. +         retval = addstr(str->str_ptr);
  1491. +         str_numset(st[0], (double) retval);
  1492. +         str_free(str);
  1493. +     }
  1494. +     return sp;
  1495. +     case US_wprintw:
  1496. +     if (items < 2)
  1497. +         fatal("Usage: &wprintw($win, $fmt, $arg1, $arg2, ... )");
  1498. +     else {
  1499. +         int retval;
  1500. +         STR*    str =        str_new(0);
  1501. +         WINDOW*    win =        *(WINDOW**)    str_get(st[1]);
  1502. +         do_sprintf(str, items - 1, st + 1);
  1503. +         retval = waddstr(win, str->str_ptr);
  1504. +         str_numset(st[0], (double) retval);
  1505. +         str_free(str);
  1506. +     }
  1507. +     return sp;
  1508. + CASE int refresh
  1509. + END
  1510. + CASE int wrefresh
  1511. + I    WINDOW*        win
  1512. + END
  1513. + CASE int standout
  1514. + END
  1515. + CASE int wstandout
  1516. + I    WINDOW*        win
  1517. + END
  1518. + CASE int standend
  1519. + END
  1520. + CASE int wstandend
  1521. + I    WINDOW*        win
  1522. + END
  1523. + CASE int cbreak
  1524. + END
  1525. + CASE int nocbreak
  1526. + END
  1527. + CASE int echo
  1528. + END
  1529. + CASE int noecho
  1530. + END
  1531. +     case US_getch:
  1532. +         if (items != 0)
  1533. +             fatal("Usage: &getch()");
  1534. +         else {
  1535. +             int retval;
  1536. +         char retch;
  1537. +             retval = getch();
  1538. +         if (retval == EOF)
  1539. +         st[0] = &str_undef;
  1540. +         else {
  1541. +         retch = retval;
  1542. +         str_nset(st[0], &retch, 1);
  1543. +         }
  1544. +         }
  1545. +         return sp;
  1546. +     case US_wgetch:
  1547. +         if (items != 1)
  1548. +             fatal("Usage: &wgetch($win)");
  1549. +         else {
  1550. +             int retval;
  1551. +         char retch;
  1552. +             WINDOW*     win =           *(WINDOW**)     str_get(st[1]);
  1553. +             retval = wgetch(win);
  1554. +         if (retval == EOF)
  1555. +         st[0] = &str_undef;
  1556. +         else {
  1557. +         retch = retval;
  1558. +         str_nset(st[0], &retch, 1);
  1559. +         }
  1560. +         }
  1561. +         return sp;
  1562. + CASE int getstr
  1563. + IO    char*        str
  1564. + END
  1565. + CASE int wgetstr
  1566. + I    WINDOW*        win
  1567. + IO    char*        str
  1568. + END
  1569. + CASE int raw
  1570. + END
  1571. + CASE int noraw
  1572. + END
  1573. + CASE int baudrate
  1574. + END
  1575. + CASE int delwin
  1576. + I    WINDOW*        win
  1577. + END
  1578. + CASE int endwin
  1579. + END
  1580. + CASE int erasechar
  1581. + END
  1582. + CASE char* getcap
  1583. + I    char*        str
  1584. + END
  1585. +     case US_getyx:
  1586. +     if (items != 3)
  1587. +         fatal("Usage: &getyx($win, $y, $x)");
  1588. +     else {
  1589. +         int retval;
  1590. +         STR*    str =        str_new(0);
  1591. +         WINDOW*    win =        *(WINDOW**)    str_get(st[1]);
  1592. +         int        y;
  1593. +         int        x;
  1594. +         do_sprintf(str, items - 1, st + 1);
  1595. +         retval = getyx(win, y, x);
  1596. +         str_numset(st[2], (double)y);
  1597. +         str_numset(st[3], (double)x);
  1598. +         str_numset(st[0], (double) retval);
  1599. +         str_free(str);
  1600. +     }
  1601. +     return sp;
  1602. +     
  1603. + CASE int inch
  1604. + END
  1605. + CASE int winch
  1606. + I    WINDOW*        win
  1607. + END
  1608. + CASE WINDOW* initscr
  1609. + END
  1610. + CASE int killchar
  1611. + END
  1612. + CASE int leaveok
  1613. + I    WINDOW*        win
  1614. + I    bool        boolf
  1615. + END
  1616. + CASE char* longname
  1617. + I    char*        termbuf
  1618. + IO    char*        name
  1619. + END
  1620. + CASE int fullname
  1621. + I    char*        termbuf
  1622. + IO    char*        name
  1623. + END
  1624. + CASE int mvwin
  1625. + I    WINDOW*        win
  1626. + I    int        y
  1627. + I    int        x
  1628. + END
  1629. + CASE WINDOW* newwin
  1630. + I    int        lines
  1631. + I    int        cols
  1632. + I    int        begin_y
  1633. + I    int        begin_x
  1634. + END
  1635. + CASE int nl
  1636. + END
  1637. + CASE int nonl
  1638. + END
  1639. + CASE int scrollok
  1640. + I    WINDOW*        win
  1641. + I    bool        boolf
  1642. + END
  1643. + CASE WINDOW* subwin
  1644. + I    WINDOW*        win
  1645. + I    int        lines
  1646. + I    int        cols
  1647. + I    int        begin_y
  1648. + I    int        begin_x
  1649. + END
  1650. + CASE int touchline
  1651. + I    WINDOW*        win
  1652. + I    int        y
  1653. + I    int        startx
  1654. + I    int        endx
  1655. + END
  1656. + CASE int touchoverlap
  1657. + I    WINDOW*        win1
  1658. + I    WINDOW*        win2
  1659. + END
  1660. + CASE int touchwin
  1661. + I    WINDOW*        win
  1662. + END
  1663. + CASE char* unctrl
  1664. + I    char        ch
  1665. + END
  1666. + CASE int gettmode
  1667. + END
  1668. + CASE int mvcur
  1669. + I    int        lasty
  1670. + I    int        lastx
  1671. + I    int        newy
  1672. + I    int        newx
  1673. + END
  1674. + CASE int scroll
  1675. + I    WINDOW*        win
  1676. + END
  1677. + CASE int savetty
  1678. + END
  1679. + CASE void resetty
  1680. + END
  1681. + CASE int setterm
  1682. + I    char*        name
  1683. + END
  1684. + CASE int tstp
  1685. + END
  1686. + CASE int _putchar
  1687. + I    char        ch
  1688. + END
  1689. +     case US_testcallback:
  1690. +     sp = callback("callback", sp + items, curcsv->wantarray, 1, items);
  1691. +     break;
  1692. +     default:
  1693. +     fatal("Unimplemented user-defined subroutine");
  1694. +     }
  1695. +     return sp;
  1696. + }
  1697. + static int
  1698. + userval(ix, str)
  1699. + int ix;
  1700. + STR *str;
  1701. + {
  1702. +     switch (ix) {
  1703. +     case UV_COLS:
  1704. +     str_numset(str, (double)COLS);
  1705. +     break;
  1706. +     case UV_Def_term:
  1707. +     str_set(str, Def_term);
  1708. +     break;
  1709. +     case UV_ERR:
  1710. +     str_numset(str, (double)ERR);
  1711. +     break;
  1712. +     case UV_LINES:
  1713. +     str_numset(str, (double)LINES);
  1714. +     break;
  1715. +     case UV_My_term:
  1716. +     str_numset(str, (double)My_term);
  1717. +     break;
  1718. +     case UV_OK:
  1719. +     str_numset(str, (double)OK);
  1720. +     break;
  1721. +     case UV_curscr:
  1722. +     str_nset(str, &curscr, sizeof(WINDOW*));
  1723. +     break;
  1724. +     case UV_stdscr:
  1725. +     str_nset(str, &stdscr, sizeof(WINDOW*));
  1726. +     break;
  1727. +     case UV_ttytype:
  1728. +     str_set(str, ttytype);
  1729. +     break;
  1730. +     }
  1731. +     return 0;
  1732. + }
  1733. + static int
  1734. + userset(ix, str)
  1735. + int ix;
  1736. + STR *str;
  1737. + {
  1738. +     switch (ix) {
  1739. +     case UV_COLS:
  1740. +     COLS = (int)str_gnum(str);
  1741. +     break;
  1742. +     case UV_Def_term:
  1743. +     Def_term = savestr(str_get(str));    /* never freed */
  1744. +     break;
  1745. +     case UV_LINES:
  1746. +     LINES = (int)str_gnum(str);
  1747. +     break;
  1748. +     case UV_My_term:
  1749. +     My_term = (bool)str_gnum(str);
  1750. +     break;
  1751. +     case UV_ttytype:
  1752. +     strcpy(ttytype, str_get(str));        /* hope it fits */
  1753. +     break;
  1754. +     }
  1755. +     return 0;
  1756. + }
  1757.  
  1758. *** End of Patch 11 ***
  1759. exit 0 # Just in case...
  1760. -- 
  1761. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1762. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1763. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1764. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1765.