Permalink
Browse files

perl 5.0 alpha 8

[the last one taken from the September '94 InfoMagic CD; a similar
style of cleanup as the previous commits was performed]
  • Loading branch information...
1 parent 8990e30 commit 2304df62caa7d9be70e8b8bcdb454e139c9c103d Andy Dougherty committed Apr 4, 1994
Showing with 25,793 additions and 3,242 deletions.
  1. +4 −0 .config/README
  2. +1 −0 .config/instruct
  3. +72 −0 Bugs/arraynotok
  4. +4 −0 Bugs/clearmyarray
  5. +1 −0 Bugs/clobberref
  6. +2 −0 Bugs/delete_env
  7. +7 −0 Bugs/formatsub
  8. +37 −0 Bugs/lcsort
  9. +6 −0 Bugs/lcsortdump
  10. +17 −0 Bugs/mig
  11. +1 −0 Bugs/myforeach
  12. +12 −0 Bugs/numkey
  13. +2 −0 Bugs/signedbits
  14. +1 −0 Bugs/splitdump
  15. +1 −0 Bugs/splitscalar
  16. +107 −0 Bugs/subform
  17. +2 −0 Bugs/substrdump
  18. +1 −0 Bugs/zeroanonref
  19. +5,689 −0 Configure
  20. +13 −0 HelpWanted
  21. +89 −36 MANIFEST
  22. +449 −0 MANIFEST.new
  23. +110 −201 Makefile
  24. +325 −0 Makefile.SH
  25. +10 −5 NDBM_File.c
  26. +10 −5 ODBM_File.c
  27. +25 −0 Obsolete
  28. +3,126 −129 POSIX.c
  29. +1 −8 README
  30. +64 −0 README.Conf
  31. +47 −42 SDBM_File.c
  32. +169 −0 TCL
  33. +6 −1 Todo
  34. +48 −0 U/Extensions.U
  35. +260 −0 U/Loc.U
  36. +284 −0 U/Oldconfig.U
  37. +15 −0 U/README.U
  38. +119 −0 U/cc.U
  39. +241 −0 U/ccflags.U
  40. +86 −0 U/d_casti32.U
  41. +59 −0 U/d_isascii.U
  42. +39 −0 U/d_setlocale.U
  43. +122 −0 U/d_strerror.U
  44. +66 −0 U/dlsrc.U
  45. +60 −0 U/gidtype.U
  46. +58 −0 U/groupstype.U
  47. +37 −0 U/i_dlfcn.U
  48. +297 −0 U/libc.U
  49. +83 −0 U/libpth.U
  50. +132 −0 U/libs.U
  51. +69 −0 U/libyacc.U
  52. +101 −0 U/mallocsrc.U
  53. +124 −0 U/prototype.U
  54. +161 −0 U/voidflags.U
  55. +91 −0 U/yacc.U
  56. +361 −0 Wanted
  57. +29 −0 autosplit
  58. +27 −3 bar
  59. +500 −0 bar.out
  60. +30 −1 cflags
  61. +20 −32 cflags.SH
  62. +596 −486 config.h
  63. +214 −147 config.sh
  64. +605 −492 config_h.SH
  65. +1 −1 configpm
  66. +1 −0 cppstdin
  67. +0 −8 deb.c
  68. +3 −3 dl.c
  69. +5 −5 doio.c
  70. +10 −1 dump.c
  71. +4 −0 embed.h
  72. +3,048 −0 eval.c.save
  73. +267 −0 ext/dbm/SDBM_File.c.bak
  74. +2 −1 ext/dbm/typemap
  75. +3 −3 ext/dl/dl.c
  76. +2,421 −29 ext/posix/POSIX.xs
  77. +7 −4 ext/posix/typemap
  78. +47 −0 ext/typemap
  79. +252 −198 ext/xsubpp
  80. +529 −0 ext/xsubpp.bak
  81. +1 −1 ext/xvarpp
  82. +15 −9 foo
  83. +1 −1 gv.c
  84. +7 −7 h2ph
  85. +7 −1 handy.h
  86. +2 −2 hints/isc_3_2_2.sh
  87. +1 −1 hints/isc_3_2_3.sh
  88. +10 −0 hints/solaris_2_2.sh
  89. +10 −0 hints/solaris_2_3.sh
  90. +1 −0 hints/sunos_4_1_2.sh
  91. +1 −0 hints/sunos_4_1_3.sh
  92. +14 −14 hvdbm.h
  93. +29 −3 internals
  94. +2 −0 interp.sym
  95. +214 −147 lib/Config.pm
  96. +0 −2 lib/English.pm
  97. +19 −2 lib/FileHandle.pm
  98. +1,034 −11 lib/POSIX.pm
  99. +9 −0 lib/auto/POSIX/_exit
  100. +2 −0 lib/auto/README
  101. +154 −0 lib/dotsh.pl.art
  102. +146 −0 lib/quotewords.pl.art
  103. +285 −0 lib/soundex.pl.art
  104. +0 −20 main.c
  105. +4 −5 make.out
  106. +15 −14 makedepend
  107. +1 −0 makedepend.SH
  108. +5 −5 makedir
  109. +852 −903 makefile
  110. +6 −6 malloc.c
  111. +6 −12 mg.c
  112. +39 −0 miniperlmain.c
  113. +1 −2 op.c
  114. +16 −10 perl.c
  115. +27 −12 perl.h
  116. +1 −1 perl.man
  117. +42 −0 perlmain.c
  118. +3 −0 perlmain.x
  119. +591 −0 perly.y.save
  120. +15 −20 pp.c
  121. +5 −3 proto.h
  122. +2 −2 regcomp.h
  123. +4 −3 regexec.c
  124. +26 −29 sv.c
  125. +3 −3 sv.h
  126. +4 −0 t/SDBM_File.so
  127. +2 −2 t/lib/english.t
  128. +18 −5 toke.c
  129. +11 −0 unobsolete
  130. +45 −45 util.c
  131. +44 −0 writemain
  132. +6 −6 x2p/Makefile
  133. +3 −1 x2p/a2p.y
  134. +19 −15 x2p/find2perl
  135. +46 −49 x2p/makefile
  136. +22 −27 x2p/malloc.c
View
@@ -0,0 +1,4 @@
+This directory created by Configure to save information that should
+persist across sessions.
+
+You may safely delete it if you wish.
View
@@ -0,0 +1 @@
+lwall
View
@@ -0,0 +1,72 @@
+#!/usr/bin/perl
+
+#
+# I thought that I would try out some perl 5 features for the first time.
+# So I wrote a small program, included below. It died, and the partial
+# output looks very much like what I wanted to accompish. Even if the program
+# had not died, there is still the problem that no output was given under the
+# label "sonia:".
+#
+# Since the output is close, perhaps a bug lurks within...(?) I'm using the
+# compiled binary provided in the perl5a6 tar file. I tried to write this
+# post so it could be given to perl with the -x flag. You should get the
+# output I describe here --
+# James Bence
+# jbence@math.ucla.edu
+#
+# Output:
+#
+# Pushed ege into @sonia
+# Pushed caflisch into @joshua
+# Pushed catalina into @julia
+# Pushed lunnon into @sonia
+# Pushed m270alg into @redwood
+# Pushed harten into @joshua
+# Pushed ycc into @joshua
+# Pushed m270wsc into @redwood
+#
+#
+# joshua:
+# caflisch harten ycc
+#
+# sonia:
+#
+#
+# redwood:
+# m270alg m270wsc
+#
+# julia:
+# Segmentation fault
+#
+#
+
+require 5.000;
+
+while (<DATA>) {
+ ($login,$host) = split;
+ push(@{$hostref{$host}},$login); # t/op/ref.t (22) suggests this is ok.
+ print "Pushed $login into \@$host\n";
+}
+
+print"\n\n";
+
+while ( ($host,$ref) = each(%hostref)) {
+ print "$host:\n ";
+ $count = 0;
+ foreach $person (@{$ref}) {
+ print $person, " ";
+ $count++;
+ if ($count % 5 == 0) { print "\n "; }
+ }
+ print "\n\n";
+}
+
+__END__
+ege sonia
+caflisch joshua
+catalina julia
+lunnon sonia
+m270alg redwood
+harten joshua
+ycc joshua
+m270wsc redwood
View
@@ -0,0 +1,4 @@
+@a = ( 5, 6, 7, 8);
+&foo(1, 2, @a);
+
+sub foo { my($a, $b, @c) = @_; print scalar(@c), "\n"; }
View
@@ -0,0 +1 @@
+$B = [X, Y]; $B = 1; print $B
View
@@ -0,0 +1,2 @@
+delete $ENV{TERM};
+system "env";
View
@@ -0,0 +1,7 @@
+#!./perl
+
+format STDOUT {
+ formline "@<<<<<<<<<<<<< @>>>>>>>>>>>\n", "foo", "bar";
+}
+
+write;
View
@@ -0,0 +1,37 @@
+Article 20341 of comp.lang.perl:
+Path: netlabs!news.cerf.net!mvb.saic.com!MathWorks.Com!news.kei.com!hookup!swrinde!gatech!taco.cc.ncsu.edu!taco.cc.ncsu.edu!setzer
+From: setzer@math.ncsu.edu (William Setzer)
+Newsgroups: comp.lang.perl
+Subject: perl5a6 bug: sort sub @ary
+Date: 30 Mar 94 13:49:20
+Organization: The Chebychev Church of Probability
+Lines: 23
+Distribution: world
+Message-ID: <SETZER.94Mar30134920@math.math.ncsu.edu>
+NNTP-Posting-Host: math.ncsu.edu
+
+Ok, here's a weird one. Using the precompiled perl5a6 binary for the
+sun, the following dumps core:
+----
+@S = (0, 1, 2, 3);
+for ("A", "D", "b", "c") { $foo{$i++} = $_; }
+# for (sort { lc($foo{$a}) cmp lc($foo{$b}) } @S) { print $foo{$_}, "\n"; }
+for (sort Alpha @S) { print $foo{$_}, "\n"; }
+
+sub Alpha { lc($foo{$a}) cmp lc($foo{$b}); }
+----
+[Output]
+Segmentation fault (core dumped)
+----
+However, if you comment out the "sort Alpha" and uncomment the "sort
+{lc(...) cmp lc(...) }" line, everything works as expected. Also note
+that if you uncomment both "sort"s, everything also works as expected.
+Do-do-do-do [twilight zone music :-].
+
+William
+
+PS: Does anyone actually care about these bug reports? I thought I
+ remember Larry saying that he preferred them in c.l.p., but it
+ wouldn't be the first time my memory has fritzed.
+
+
View
@@ -0,0 +1,6 @@
+@S = (0, 1, 2, 3);
+for ("A", "D", "b", "c") { $foo{$i++} = $_; }
+# for (sort { lc($foo{$a}) cmp lc($foo{$b}) } @S) { print $foo{$_}, "\n"; }
+for (sort Alpha @S) { print $foo{$_}, "\n"; }
+
+sub Alpha { lc($foo{$a}) cmp lc($foo{$b}); }
View
@@ -0,0 +1,17 @@
+#!./perl
+
+$foo = <<EOF;
+Subject: foobar
+From: baz
+EOF
+
+$* = 1;
+
+$pat = '^([*+&!]*)(Subject:)';
+#$pat =~ s/([a-zA-Z])/[\u$1\l$1]/g;
+#print $pat;
+
+$foo =~ /$pat/g;
+
+print $', "\n";
+
View
@@ -0,0 +1 @@
+sub foo { my $i; for $i (@bar) { } }
View
@@ -0,0 +1,12 @@
+$zz = { 1, 9 };
+print %$zz; # wrong; outputs 9
+
+print "\n";
+
+$zz = { "1", 9 };
+print %$zz; # ok; outputs 19
+
+print "\n";
+
+%xx = ( 1, 9 );
+print %xx; # ok; outputs 19
View
@@ -0,0 +1,2 @@
+printf "%x\n", 0x40000000 | 0x00000010;
+printf "%x\n", 0x80000000 | 0x00000010;
View
@@ -0,0 +1 @@
+0 + split
View
@@ -0,0 +1 @@
+$_ = "a b c" ; $a = ( @b = split ) ; print "$a\n@b\n"
View
@@ -0,0 +1,107 @@
+Replied: Wed, 02 Mar 94 09:29:46 -0800
+Replied: brad_figg@rainbow.mentorg.com ("Brad Figg")
+Return-Path: brad_figg@rainbow.mentorg.com
+Return-Path: <brad_figg@rainbow.mentorg.com>
+Received: from mgc.mentorg.com by netlabs.com (4.1/SMI-4.1)
+ id AA15524; Wed, 2 Mar 94 09:17:50 PST
+Received: from rainbow.mentorg.com by mgc.mentorg.com with SMTP
+ (16.6/15.5+MGC-TD 2.20) id AA04359; Wed, 2 Mar 94 09:16:55 -0800
+Received: from wv.mentorg.com by rainbow.mentorg.com with SMTP
+ (15.11.1.6/15.5+MGC-TD 2.08) id AA22830; Wed, 2 Mar 94 09:16:53 -0800
+Received: from em-wv02.MENTORG.COM by wv.mentorg.com (8.6.4/CF5.11R)
+ id JAA18865; Wed, 2 Mar 1994 09:16:51 -0800
+Received: from cynic.MENTORG.COM by em-wv02.MENTORG.COM (4.1/CF3.4)
+ id AA23300; Wed, 2 Mar 94 09:16:50 PST
+Received: by cynic.MENTORG.COM (4.1/CF3.4)
+ id AA24503; Wed, 2 Mar 94 09:16:50 PST
+From: brad_figg@rainbow.mentorg.com ("Brad Figg")
+Message-Id: <9403020916.ZM24501@cynic>
+Date: Wed, 2 Mar 1994 09:16:50 -0800
+X-Mailer: Z-Mail (3.0.0 15dec93)
+To: lwall@netlabs.com
+Subject: Perl5 Alpha 6 bug (subs & formats)
+Content-Type: text/plain; charset=us-ascii
+Mime-Version: 1.0
+
+
+The following works just fine as is with Perl 4 but doesn't work with
+Perl5 Alpha 6 unless the format lines are moved outside the sub block.
+
+
+Brad
+
+p.s. I'm not currently at a point where I can make the actual offer
+ but I'm just asking if you have any interest. I have access to
+ 'Purify' and 'Quantify' from Pure Software. I was thinking of
+ building Perl5 with these just to see what I'd get. Would you
+ be interested in the results?
+
+
+-----------------------Error.pl---------------------------------
+######################################################################
+## Package Variables
+##
+
+package Error;
+
+push( @main'Versions, '$Id: Error.pl,v 1.3 1994/02/13 00:26:00 bradf Exp $' );
+
+$Strings[ ($None = 0) ] =
+ "Everythings OK";
+$Strings[ ($BadFileOpen = 0) ] =
+ "I was unable to open the file \'%s\' due to:\n$!";
+$Strings[ ($NoVersion = 0) ] =
+ "Unable to read the first four bytes from the file." .
+ " This probably means it is an empty file.";
+
+######################################################################
+##
+## Emsg
+##
+## Print a formatted error message to STDERR.
+##
+## Args: 2
+## 1. An error message that may contain printf formatting strings.
+## 2. A list of arguments to be used for the format string
+## expansions.
+##
+## Returns:
+##
+## if successful: none
+## if unsuccessful: none
+##
+## Calls:
+##
+## Requires:
+##
+## Notes:
+##
+
+sub Emsg
+ {
+ local( $String, @Args ) = @_;
+ local( $Err );
+
+format EFIRSTLINE =
+ *** Error: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+$_
+ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
+$_
+.
+
+format EBODY =
+ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
+$_
+.
+
+
+ $~ = 'EFIRSTLINE';
+ $Err = sprintf( $String, @Args );
+ foreach (split( "\n", $Err )) {
+ if ( $_ eq '' ) { print( "\n" ); }
+ write;
+ $~ = 'EBODY';
+ }
+ }
+[Acked]
+
View
@@ -0,0 +1,2 @@
+ $a="abc";
+ substr(\$a,1,0)='a';
View
@@ -0,0 +1 @@
+$z = \'23'
Oops, something went wrong.

0 comments on commit 2304df6

Please sign in to comment.