diff options
author | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1995-04-14 22:32:18 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1995-04-14 22:32:18 +0000 |
commit | 5d94fbed3754780f11eb4db2d2379544cacb60e1 (patch) | |
tree | 9d1c81cc2141769c76b61c272f84155723edb002 /pod | |
parent | 232e078e289220085e912e3d740ae77767611478 (diff) | |
download | perl-5d94fbed3754780f11eb4db2d2379544cacb60e1.tar.gz |
perl5.001 patch.1d
This is my patch patch.1d for perl5.001. A complete description is
given below, but here are the basic changes.
1. Linux: more tweaks so dynamic loading works under ELF
or (maybe) under dld. There are so many different dld versions
and so many different tool sets, it's hard to be more specific.
2. perl -e '$v=1e19+0' no longer dumps core on Intel x86
processors.
3. pod stuff:
a. Wrapped pod2* translators in a 'SH' wrapper so that they
have the proper path to perl at the top.
b. Fixed pod/ Makefile to call the pod2html translator
correctly. (Why do pod2man and pod2html work differently?)
c. Include latest (Feb 2, 1995) version of pod2html, fresh from
ftp.metronet.com.
4. MakeMaker 4.093.
5. GIMME and installperl patches from Tim Bunce.
6. Miscellaneous hint file updates.
Configure
Allow ' ' to mean 'none' in a few more places. This provides
a way for hint files to set something to an empty value and to
ensure that the empty value will be maintained when config.sh is
reused.
Fix silly ld typo that prevented hint file from actually setting
$ld.
MANIFEST
Now has pod/pod2*.SH.
Makefile.SH
Remove old libperl.a instead of blindly adding to it. Failure to
do this causes a problem if you originally used perl's malloc but
later changed your mind. The old malloc.o would still be in
libperl.a
ext/DynaLoader/dl_dlopen.xs
Use strerror(errno) instead of dlerror for NetBSD.
handy.h
Clarify & rework HAS_BOOL comments and code. No functionality is
changed, but I hope this is easier to follow.
hints/freebsd.sh
hints/isc.sh
hints/linux.sh
hints/netbsd.sh
hints/next_3_0.sh
hints/next_3_2.sh
hints/sco_3.sh
Miscellaneous updates. See the individual comments in the patches.
installperl
Run ranlib on installed .a libraries.
unlink() old versions of files before installing new ones, in
case the old ones are are write-protected.
lib/ExtUtils/MakeMaker.pm
Updated to 4.092 by Andreas Koenig. This features better
selection of shared library versions and shorter command lines for
static linking of new extensions. It is also more robust against
broken csh on Linux. (There's still a glob in the library
selection loop, however.)
I further updated it to 4.093 because I didn't like the
distclean target :-). It's just a sloppy quick fix, but that's
all I have time for now. I've also worked on the library version
selection stuff and the $(CC) command stuff a little more.
lib/TieHash.pm
Overdue removal of ambiguous ${pack} construction.
perl.h
New U_V macro to cast to the UV type (usually unsigned long).
pod/Makefile
Updated.
pod/pod2html.SH
Updated.
Converted to 'SH' wrapper so correct #!/path/to/perl gets used.
pod/pod2latex.SH
pod/pod2man.SH
Converted to 'SH' wrapper so correct #!/path/to/perl gets used.
pp_hot.c
GIMME patch from Tim Bunce.
pp_sys.c
Allow use of F_FREESP fcntl() directive to truncate files.
If HAS_MKDIR is not defined, the stat() call to check the result
of the system "mkdir" call was failing because the filename
pointer no longer pointed to the right location.
sv.c
Protect some (UV) casts by the new U_V() macro.
util.c
New cast_uv() function to support the U_V() macro, if needed.
cast_iv() and cast_uv() no longer assume 32-bit longs.
The various cast_() functions have also been simplified.
Diffstat (limited to 'pod')
-rw-r--r-- | pod/Makefile | 24 | ||||
-rwxr-xr-x | pod/pod2html.SH (renamed from pod/pod2html) | 101 | ||||
-rwxr-xr-x | pod/pod2latex.SH (renamed from pod/pod2latex) | 30 | ||||
-rwxr-xr-x | pod/pod2man.SH (renamed from pod/pod2man) | 29 |
4 files changed, 144 insertions, 40 deletions
diff --git a/pod/Makefile b/pod/Makefile index 077ecd19bb..47fc2e9512 100644 --- a/pod/Makefile +++ b/pod/Makefile @@ -1,5 +1,7 @@ all: man +PERL = ../miniperl + POD = \ perl.pod \ perlapi.pod \ @@ -89,19 +91,35 @@ HTML = \ man: $(MAN) -html: $(HTML) +# pod2html runs on all the pods at once in order to build up +# cross-references. +html: + $(PERL) pod2html *.pod .SUFFIXES: .pod .man .pod.man: - ../miniperl pod2man $*.pod >$*.man + $(PERL) pod2man $*.pod >$*.man .SUFFIXES: .pod .html .pod.html: - ../miniperl pod2html $*.pod >$*.html + $(PERL) pod2html $*.pod clean: rm -f $(MAN) $(HTML) realclean: clean + rm -f pod2man pod2latex pod2html + +distclean: realclean + +# Dependencies. +pod2latex: pod2latex.SH ../config.sh + sh pod2latex.SH + +pod2html: pod2html.SH ../config.sh + sh pod2html.SH + +pod2man: pod2man.SH ../config.sh + sh pod2man.SH diff --git a/pod/pod2html b/pod/pod2html.SH index a2cde18ce4..d37cbbe87c 100755 --- a/pod/pod2html +++ b/pod/pod2html.SH @@ -1,4 +1,28 @@ -#!/usr/bin/perl +case $CONFIG in +'') + if test -f config.sh; then TOP=.; + elif test -f ../config.sh; then TOP=..; + elif test -f ../../config.sh; then TOP=../..; + elif test -f ../../../config.sh; then TOP=../../..; + elif test -f ../../../../config.sh; then TOP=../../../..; + else + echo "Can't find config.sh."; exit 1 + fi + . $TOP/config.sh + ;; +esac +case "$0" in +*/*) cd `expr X$0 : 'X\(.*\)/'` ;; +esac +echo "Extracting pod/pod2html (with variable substitutions)" +rm -f pod2html +$spitshell >pod2html <<!GROK!THIS! +#!$bin/perl +eval 'exec $bin/perl -S \$0 \${1+"\$@"}' + if \$running_under_some_shell; +!GROK!THIS! + +$spitshell >>pod2html <<'!NO!SUBS!' # # pod2html - convert pod format to html # @@ -46,9 +70,11 @@ unless(@Pods){ # loop twice through the pods, first to learn the links, then to produce html for $count (0,1){ + (print "Scanning pods...\n") unless $count; foreach $podfh ( @Pods ) { ($pod = $podfh) =~ s/\.pod$//; Debug("files", "opening 2 $podfh" ); + (print "Creating $pod.html from $podfh\n") if $count; $RS = "\n="; open($podfh,"<".$podfh) || die "can't open $podfh: $ERRNO"; @all=<$podfh>; @@ -60,11 +86,10 @@ for $count (0,1){ $in_list=0; $html=$pod.".html"; if($count){ - #open(HTML,">&STDOUT") || die "can't create $html: $ERRNO"; open(HTML,">$html") || die "can't create $html: $ERRNO"; print HTML <<'HTML__EOQ', <<"HTML__EOQQ"; - <!-- $RCSfile$$Date$ --> - <!-- $Log$ --> + <!-- \$RCSfile\$\$Revision\$\$Date\$ --> + <!-- \$Log\$ --> <HTML> HTML__EOQ <TITLE> \U$pod\E </TITLE> @@ -77,44 +102,45 @@ HTML__EOQQ ($cmd, $title, $rest) = ($1,$2,$3); if ($cmd eq "item") { if($count ){ - ($depth) or &do_list("over",$all[$i],\$in_list,\$depth); - &do_item($title,$rest,$in_list); + ($depth) or do_list("over",$all[$i],\$in_list,\$depth); + do_item($title,$rest,$in_list); } else{ # scan item - &scan_thing("item",$title,$pod); + scan_thing("item",$title,$pod); } } elsif ($cmd =~ /^head([12])/){ $num=$1; if($count){ - &do_hdr($num,$title,$rest,$depth); + do_hdr($num,$title,$rest,$depth); } else{ # header scan - &scan_thing($cmd,$title,$pod); # skip head1 + scan_thing($cmd,$title,$pod); # skip head1 } } elsif ($cmd =~ /^over/) { - $depth and &do_list("over",$all[$i+1],\$in_list,\$depth); + $count and $depth and do_list("over",$all[$i+1],\$in_list,\$depth); } elsif ($cmd =~ /^back/) { if($count){ ($depth) or next; # just skip it - &do_list("back",$all[$i+1],\$in_list,\$depth); - &do_rest("$title.$rest"); + do_list("back",$all[$i+1],\$in_list,\$depth); + do_rest("$title.$rest"); } } elsif ($cmd =~ /^cut/) { - &do_rest($rest); + next; } - else { - warn "unrecognized header: $cmd"; + elsif($Debug){ + (warn "unrecognized header: $cmd") if $Debug; } } + # close open lists without '=back' stmts if($count){ while($depth){ - &do_list("back",$all[$i+1],\$in_list,\$depth); + do_list("back",$all[$i+1],\$in_list,\$depth); } print HTML "\n</HTML>\n"; } @@ -125,7 +151,7 @@ sub do_list{ my($which,$next_one,$list_type,$depth)=@_; my($key); if($which eq "over"){ - ($next_one =~ /^item\s+(.*)/ ) or warn "Bad list, $1\n"; + ($next_one =~ /^item\s+(.*)/ ) or (warn "Bad list, $1\n") if $Debug; $key=$1; if($key =~ /^1\.?/){ $$list_type = "OL"; @@ -137,7 +163,7 @@ sub do_list{ $$list_type="DL"; } else{ - warn "unknown list type for item $key"; + (warn "unknown list type for item $key") if $Debug; } print HTML qq{\n}; print HTML qq{<$$list_type>}; @@ -152,16 +178,16 @@ sub do_list{ sub do_hdr{ my($num,$title,$rest,$depth)=@_; ($num == 1) and print HTML qq{<p><hr>\n}; - &process_thing(\$title,"NAME"); + process_thing(\$title,"NAME"); print HTML qq{\n<H$num> }; print HTML $title; print HTML qq{</H$num>\n}; - &do_rest($rest); + do_rest($rest); } sub do_item{ my($title,$rest,$list_type)=@_; - &process_thing(\$title,"NAME"); + process_thing(\$title,"NAME"); if($list_type eq "DL"){ print HTML qq{\n<DT><STRONG>\n}; print HTML $title; @@ -172,13 +198,13 @@ sub do_item{ print HTML qq{\n<LI>}; ($list_type ne "OL") && (print HTML $title,"\n"); } - &do_rest($rest); + do_rest($rest); print HTML ($list_type eq "DL" )? qq{</DD>} : qq{</LI>}; } sub do_rest{ my($rest)=@_; - my(@lines,$p,$q,$line,@paras,$inpre); + my(@lines,$p,$q,$line,,@paras,$inpre); @paras=split(/\n\n+/,$rest); for($p=0;$p<=$#paras;$p++){ @lines=split(/\n/,$paras[$p]); @@ -207,13 +233,13 @@ inner: foreach $q (@lines){ if($paras[$p]=~/>>|<</){ if($inpre){ - &process_thing(\$q,"HTML"); + process_thing(\$q,"HTML"); } else { print HTML qq{\n</XMP>\n}; print HTML qq{<PRE>\n}; $inpre=1; - &process_thing(\$q,"HTML"); + process_thing(\$q,"HTML"); } } while($q =~ s/\t+/' 'x (length($&) * 8 - length($`) % 8)/e){ @@ -229,7 +255,7 @@ inner: else{ # other text @lines=split(/\n/,$paras[$p]); foreach $line (@lines){ - &process_thing(\$line,"HTML"); + process_thing(\$line,"HTML"); print HTML qq{$line\n}; } } @@ -239,9 +265,9 @@ inner: sub process_thing{ my($thing,$htype)=@_; - &pre_escapes($thing); - &find_refs($thing,$htype); - &post_escapes($thing); + pre_escapes($thing); + find_refs($thing,$htype); + post_escapes($thing); } sub scan_thing{ @@ -284,7 +310,7 @@ sub scan_thing{ Debug("headers", "header $_"); } else { - warn "unrecognized header: $cmd"; + (warn "unrecognized header: $cmd") if $Debug; } } @@ -316,9 +342,11 @@ sub picrefs { } if ($char =~ /[IF]/) { return "<EM> $bigkey </EM>"; + } elsif($char =~ /C/) { + return "<CODE> $bigkey </CODE>"; } else { return "<STRONG> $bigkey </STRONG>"; - } + } } sub find_refs { @@ -329,7 +357,7 @@ sub find_refs { $$thing=~s/L<([^>]*)>/lrefs($1,$htype)/ge; $$thing=~s/([CIBF])<(\W*?(-?\w*).*?)>/picrefs($1, $2, $3, $htype)/ge; $$thing=~s/((\w+)\(\))/picrefs("I", $1, $2,$htype)/ge; - $$thing=~s/([\$\@%]([\w:]+|\W\b))/varrefs($1,$htype)/ge; + $$thing=~s/([\$\@%](?!&[gl]t)([\w:]+|\W\b))/varrefs($1,$htype)/ge; (($$thing eq $orig) && ($htype eq "NAME")) && ($$thing=picrefs("I", $$thing, "", $htype)); } @@ -354,7 +382,7 @@ sub lrefs { if (!defined $section && defined $Podnames{$page}) { return "\n$type$page.html\">\nthe <EM> $page </EM> manpage<\/A>\n"; } else { - warn "Bizarre entry $page/$item"; + (warn "Bizarre entry $page/$item") if $Debug; return "the <EM> $_[0] </EM> manpage\n"; } } @@ -385,7 +413,7 @@ sub lrefs { } } } - warn "No $ref reference for $item (@_)"; + (warn "No $ref reference for $item (@_)") if $Debug; return $text; } @@ -433,7 +461,7 @@ sub noremap { sub post_escapes { my($thing)=@_; $$thing=~s/[^GM]>>/\>\;\>\;/g; - $$thing=~s/([^"MGA])>/$1\>\;/g; + $$thing=~s/([^"MGAE])>/$1\>\;/g; $$thing=~tr/\200-\377/\000-\177/; } @@ -457,3 +485,6 @@ sub trim { } +!NO!SUBS! +chmod 755 pod2html +$eunicefix pod2html diff --git a/pod/pod2latex b/pod/pod2latex.SH index 9dbb2cd27b..7c9d1f6789 100755 --- a/pod/pod2latex +++ b/pod/pod2latex.SH @@ -1,4 +1,29 @@ -#!/usr/bin/perl +case $CONFIG in +'') + if test -f config.sh; then TOP=.; + elif test -f ../config.sh; then TOP=..; + elif test -f ../../config.sh; then TOP=../..; + elif test -f ../../../config.sh; then TOP=../../..; + elif test -f ../../../../config.sh; then TOP=../../../..; + else + echo "Can't find config.sh."; exit 1 + fi + . $TOP/config.sh + ;; +esac +case "$0" in +*/*) cd `expr X$0 : 'X\(.*\)/'` ;; +esac +echo "Extracting pod/pod2latex (with variable substitutions)" +rm -f pod2latex +$spitshell >pod2latex <<!GROK!THIS! +#!$bin/perl +eval 'exec $bin/perl -S \$0 \${1+"\$@"}' + if \$running_under_some_shell; +!GROK!THIS! + +$spitshell >>pod2latex <<'!NO!SUBS!' +# # pod2latex, version 1.1 # by Taro Kawagish (kawagish@imslab.co.jp), Jan 11, 1995. # @@ -630,3 +655,6 @@ BEGIN { "yuml" => '\\"{y}', # small y, dieresis or umlaut mark ); } +!NO!SUBS! +chmod 755 pod2latex +$eunicefix pod2latex diff --git a/pod/pod2man b/pod/pod2man.SH index b375b0184e..1528b0190c 100755 --- a/pod/pod2man +++ b/pod/pod2man.SH @@ -1,4 +1,28 @@ -#!/usr/bin/perl +case $CONFIG in +'') + if test -f config.sh; then TOP=.; + elif test -f ../config.sh; then TOP=..; + elif test -f ../../config.sh; then TOP=../..; + elif test -f ../../../config.sh; then TOP=../../..; + elif test -f ../../../../config.sh; then TOP=../../../..; + else + echo "Can't find config.sh."; exit 1 + fi + . $TOP/config.sh + ;; +esac +case "$0" in +*/*) cd `expr X$0 : 'X\(.*\)/'` ;; +esac +echo "Extracting pod/pod2man (with variable substitutions)" +rm -f pod2man +$spitshell >pod2man <<!GROK!THIS! +#!$bin/perl +eval 'exec $bin/perl -S \$0 \${1+"\$@"}' + if \$running_under_some_shell; +!GROK!THIS! + +$spitshell >>pod2man <<'!NO!SUBS!' $/ = ""; $cutting = 1; @@ -623,3 +647,6 @@ BEGIN { "yuml" => "y\\*:", # small y, dieresis or umlaut mark ); } +!NO!SUBS! +chmod 755 pod2man +$eunicefix pod2man |