summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl
diff options
context:
space:
mode:
authorPaul Traina <pst@FreeBSD.org>1994-10-29 07:14:55 +0000
committerPaul Traina <pst@FreeBSD.org>1994-10-29 07:14:55 +0000
commit1dd5e278095ec5cda7b6d4791d0cb2af3827cc21 (patch)
treee99211ec2b8f3a8bdc824c10d7a4e461915c0d0d /gnu/usr.bin/perl
parentc0d678dc8305837d6d746601b2e97021a345daba (diff)
Notes
Diffstat (limited to 'gnu/usr.bin/perl')
-rw-r--r--gnu/usr.bin/perl/misc/c2ph4
-rw-r--r--gnu/usr.bin/perl/misc/pstruct4
-rw-r--r--gnu/usr.bin/perl/perl/config.sh14
-rw-r--r--gnu/usr.bin/perl/x2p/Makefile4
-rwxr-xr-xgnu/usr.bin/perl/x2p/find2perl6
-rwxr-xr-xgnu/usr.bin/perl/x2p/h2ph7
-rwxr-xr-xgnu/usr.bin/perl/x2p/h2ph.1212
-rwxr-xr-xgnu/usr.bin/perl/x2p/s2p11
8 files changed, 29 insertions, 233 deletions
diff --git a/gnu/usr.bin/perl/misc/c2ph b/gnu/usr.bin/perl/misc/c2ph
index 0e06c9c81a7f..1a2e4b8306ea 100644
--- a/gnu/usr.bin/perl/misc/c2ph
+++ b/gnu/usr.bin/perl/misc/c2ph
@@ -1,4 +1,4 @@
-#!/usr/gnu/bin/perl
+#!/usr/bin/perl
#
#
# c2ph (aka pstruct)
@@ -10,7 +10,7 @@
# See the usage message for more. If this isn't enough, read the code.
#
-$RCSID = '$RCSfile: c2ph,v $$Revision: 1.2 $$Date: 1994/03/05 01:28:15 $';
+$RCSID = '$RCSfile: c2ph,v $$Revision: 1.1.1.1 $$Date: 1994/09/10 06:27:31 $';
######################################################################
diff --git a/gnu/usr.bin/perl/misc/pstruct b/gnu/usr.bin/perl/misc/pstruct
index 1009d29c5a75..5dfea04776f6 100644
--- a/gnu/usr.bin/perl/misc/pstruct
+++ b/gnu/usr.bin/perl/misc/pstruct
@@ -1,4 +1,4 @@
-#!/usr/gnu/bin/perl
+#!/usr/bin/perl
#
#
# c2ph (aka pstruct)
@@ -10,7 +10,7 @@
# See the usage message for more. If this isn't enough, read the code.
#
-$RCSID = '$RCSfile: pstruct,v $$Revision: 1.2 $$Date: 1994/03/05 01:28:22 $';
+$RCSID = '$RCSfile: pstruct,v $$Revision: 1.1.1.1 $$Date: 1994/09/10 06:27:31 $';
######################################################################
diff --git a/gnu/usr.bin/perl/perl/config.sh b/gnu/usr.bin/perl/perl/config.sh
index 0baad6b9925c..a4196bdcb84d 100644
--- a/gnu/usr.bin/perl/perl/config.sh
+++ b/gnu/usr.bin/perl/perl/config.sh
@@ -90,8 +90,8 @@ Header='$Header'
Id='$Id'
lastuname='uname: not found'
alignbytes='4'
-bin='/usr/gnu/bin'
-installbin='/usr/gnu/bin'
+bin='/usr/bin'
+installbin='/usr/bin'
byteorder='1234'
contains='grep'
cppstdin='/usr/bin/cpp'
@@ -224,7 +224,7 @@ mallocsrc='malloc.c'
mallocobj='malloc.o'
d_mymalloc='define'
mallocptrtype='void'
-mansrc='/usr/gnu/man/man1'
+mansrc='/usr/man/man1'
manext='1'
models='none'
split=''
@@ -243,8 +243,8 @@ n='-n'
c=''
package='perl'
randbits='31'
-scriptdir='/usr/gnu/bin'
-installscr='/usr/gnu/bin'
+scriptdir='/usr/bin'
+installscr='/usr/bin'
sig_name='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM URG STOP TSTP CONT CHLD TTIN TTOU IO XCPU XFSZ VTALRM PROF WINCH INFO USR1 USR2'
spitshell='cat'
shsharp='true'
@@ -262,7 +262,7 @@ w_s_timevl='1'
w_s_tm='1'
yacc='/usr/bin/yacc'
lib=''
-privlib='/usr/gnu/lib/perl'
-installprivlib='/usr/gnu/lib/perl'
+privlib='/usr/share/perl'
+installprivlib='/usr/share/perl'
PATCHLEVEL=36
CONFIG=true
diff --git a/gnu/usr.bin/perl/x2p/Makefile b/gnu/usr.bin/perl/x2p/Makefile
index 15146d839818..2d0531ebeecc 100644
--- a/gnu/usr.bin/perl/x2p/Makefile
+++ b/gnu/usr.bin/perl/x2p/Makefile
@@ -15,5 +15,9 @@ beforeinstall:
install -c -o ${BINOWN} -g ${BINGRP} -m 555 ${.CURDIR}/h2ph \
${DESTDIR}${BINDIR}
+afterinstall:
+ -mkdir -p ${DESTDIR}/usr/share/perl/sys
+ cd ${DESTDIR}/usr/include ; h2ph * sys/*
+
.include "../../Makefile.inc"
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/perl/x2p/find2perl b/gnu/usr.bin/perl/x2p/find2perl
index 6d7f0adbb28c..fd74c3f2188a 100755
--- a/gnu/usr.bin/perl/x2p/find2perl
+++ b/gnu/usr.bin/perl/x2p/find2perl
@@ -1,9 +1,9 @@
-#!/usr/gnu/bin/perl
+#!/usr/bin/perl
-eval 'exec /usr/gnu/bin/perl -S $0 ${1+"$@"}'
+eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if $running_under_some_shell;
-$bin = "/usr/gnu/bin";
+$bin = "/usr/bin";
while ($ARGV[0] =~ /^[^-!(]/) {
diff --git a/gnu/usr.bin/perl/x2p/h2ph b/gnu/usr.bin/perl/x2p/h2ph
index f093626d43cc..26c4ec430ccf 100755
--- a/gnu/usr.bin/perl/x2p/h2ph
+++ b/gnu/usr.bin/perl/x2p/h2ph
@@ -1,10 +1,11 @@
-#!/usr/gnu/bin/perl
+#!/usr/bin/perl
'di';
'ig00';
-$perlincl = '/usr/gnu/lib/perl';
+$destdir = $ENV{'DESTDIR'};
+$perlincl = $destdir . '/usr/share/perl';
-chdir '/usr/include' || die "Can't cd /usr/include";
+chdir $destdir . '/usr/include' || die "Can't cd $destdir/usr/include";
@isatype = split(' ',<<END);
char uchar u_char
diff --git a/gnu/usr.bin/perl/x2p/h2ph.1 b/gnu/usr.bin/perl/x2p/h2ph.1
index f093626d43cc..3ac76f48cf79 100755
--- a/gnu/usr.bin/perl/x2p/h2ph.1
+++ b/gnu/usr.bin/perl/x2p/h2ph.1
@@ -1,215 +1,3 @@
-#!/usr/gnu/bin/perl
-'di';
-'ig00';
-
-$perlincl = '/usr/gnu/lib/perl';
-
-chdir '/usr/include' || die "Can't cd /usr/include";
-
-@isatype = split(' ',<<END);
- char uchar u_char
- short ushort u_short
- int uint u_int
- long ulong u_long
- FILE
-END
-
-@isatype{@isatype} = (1) x @isatype;
-
-@ARGV = ('-') unless @ARGV;
-
-foreach $file (@ARGV) {
- if ($file eq '-') {
- open(IN, "-");
- open(OUT, ">-");
- }
- else {
- ($outfile = $file) =~ s/\.h$/.ph/ || next;
- print "$file -> $outfile\n";
- if ($file =~ m|^(.*)/|) {
- $dir = $1;
- if (!-d "$perlincl/$dir") {
- mkdir("$perlincl/$dir",0777);
- }
- }
- open(IN,"$file") || ((warn "Can't open $file: $!\n"),next);
- open(OUT,">$perlincl/$outfile") || die "Can't create $outfile: $!\n";
- }
- while (<IN>) {
- chop;
- while (/\\$/) {
- chop;
- $_ .= <IN>;
- chop;
- }
- if (s:/\*:\200:g) {
- s:\*/:\201:g;
- s/\200[^\201]*\201//g; # delete single line comments
- if (s/\200.*//) { # begin multi-line comment?
- $_ .= '/*';
- $_ .= <IN>;
- redo;
- }
- }
- if (s/^#\s*//) {
- if (s/^define\s+(\w+)//) {
- $name = $1;
- $new = '';
- s/\s+$//;
- if (s/^\(([\w,\s]*)\)//) {
- $args = $1;
- if ($args ne '') {
- foreach $arg (split(/,\s*/,$args)) {
- $arg =~ s/^\s*([^\s].*[^\s])\s*$/$1/;
- $curargs{$arg} = 1;
- }
- $args =~ s/\b(\w)/\$$1/g;
- $args = "local($args) = \@_;\n$t ";
- }
- s/^\s+//;
- do expr();
- $new =~ s/(["\\])/\\$1/g;
- if ($t ne '') {
- $new =~ s/(['\\])/\\$1/g;
- print OUT $t,
- "eval 'sub $name {\n$t ${args}eval \"$new\";\n$t}';\n";
- }
- else {
- print OUT "sub $name {\n ${args}eval \"$new\";\n}\n";
- }
- %curargs = ();
- }
- else {
- s/^\s+//;
- do expr();
- $new = 1 if $new eq '';
- if ($t ne '') {
- $new =~ s/(['\\])/\\$1/g;
- print OUT $t,"eval 'sub $name {",$new,";}';\n";
- }
- else {
- print OUT $t,"sub $name {",$new,";}\n";
- }
- }
- }
- elsif (/^include\s+<(.*)>/) {
- ($incl = $1) =~ s/\.h$/.ph/;
- print OUT $t,"require '$incl';\n";
- }
- elsif (/^ifdef\s+(\w+)/) {
- print OUT $t,"if (defined &$1) {\n";
- $tab += 4;
- $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
- }
- elsif (/^ifndef\s+(\w+)/) {
- print OUT $t,"if (!defined &$1) {\n";
- $tab += 4;
- $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
- }
- elsif (s/^if\s+//) {
- $new = '';
- do expr();
- print OUT $t,"if ($new) {\n";
- $tab += 4;
- $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
- }
- elsif (s/^elif\s+//) {
- $new = '';
- do expr();
- $tab -= 4;
- $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
- print OUT $t,"}\n${t}elsif ($new) {\n";
- $tab += 4;
- $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
- }
- elsif (/^else/) {
- $tab -= 4;
- $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
- print OUT $t,"}\n${t}else {\n";
- $tab += 4;
- $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
- }
- elsif (/^endif/) {
- $tab -= 4;
- $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
- print OUT $t,"}\n";
- }
- }
- }
- print OUT "1;\n";
-}
-
-sub expr {
- while ($_ ne '') {
- s/^(\s+)// && do {$new .= ' '; next;};
- s/^(0x[0-9a-fA-F]+)// && do {$new .= $1; next;};
- s/^(\d+)// && do {$new .= $1; next;};
- s/^("(\\"|[^"])*")// && do {$new .= $1; next;};
- s/^'((\\"|[^"])*)'// && do {
- if ($curargs{$1}) {
- $new .= "ord('\$$1')";
- }
- else {
- $new .= "ord('$1')";
- }
- next;
- };
- s/^sizeof\s*\(([^)]+)\)/{$1}/ && do {
- $new .= '$sizeof';
- next;
- };
- s/^([_a-zA-Z]\w*)// && do {
- $id = $1;
- if ($id eq 'struct') {
- s/^\s+(\w+)//;
- $id .= ' ' . $1;
- $isatype{$id} = 1;
- }
- elsif ($id eq 'unsigned') {
- s/^\s+(\w+)//;
- $id .= ' ' . $1;
- $isatype{$id} = 1;
- }
- if ($curargs{$id}) {
- $new .= '$' . $id;
- }
- elsif ($id eq 'defined') {
- $new .= 'defined';
- }
- elsif (/^\(/) {
- s/^\((\w),/("$1",/ if $id =~ /^_IO[WR]*$/i; # cheat
- $new .= " &$id";
- }
- elsif ($isatype{$id}) {
- if ($new =~ /{\s*$/) {
- $new .= "'$id'";
- }
- elsif ($new =~ /\(\s*$/ && /^[\s*]*\)/) {
- $new =~ s/\(\s*$//;
- s/^[\s*]*\)//;
- }
- else {
- $new .= $id;
- }
- }
- else {
- $new .= ' &' . $id;
- }
- next;
- };
- s/^(.)// && do {$new .= $1; next;};
- }
-}
-##############################################################################
-
- # These next few lines are legal in both Perl and nroff.
-
-.00; # finish .ig
-
-'di \" finish diversion--previous line must be blank
-.nr nl 0-1 \" fake up transition to first page again
-.nr % 0 \" start at page 1
-'; __END__ ############# From here on it's a standard manual page ############
.TH H2PH 1 "August 8, 1990"
.AT 3
.SH NAME
diff --git a/gnu/usr.bin/perl/x2p/s2p b/gnu/usr.bin/perl/x2p/s2p
index 8a8a74c58bfc..c110e5ef5720 100755
--- a/gnu/usr.bin/perl/x2p/s2p
+++ b/gnu/usr.bin/perl/x2p/s2p
@@ -1,13 +1,16 @@
-#!/usr/gnu/bin/perl
+#!/usr/bin/perl
-eval 'exec /usr/gnu/bin/perl -S $0 ${1+"$@"}'
+eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if $running_under_some_shell;
-$bin = '/usr/gnu/bin';
+$bin = '/usr/bin';
-# $RCSfile: s2p,v $$Revision: 1.2 $$Date: 1994/03/05 01:28:48 $
+# $RCSfile: s2p,v $$Revision: 1.1.1.1 $$Date: 1994/09/10 06:27:54 $
#
# $Log: s2p,v $
+# Revision 1.1.1.1 1994/09/10 06:27:54 gclarkii
+# Initial import of Perl 4.046 bmaked
+#
# Revision 1.2 1994/03/05 01:28:48 ache
# 1) Perl uses scrambler crypt() version from libc instead of proper one
# from -lcrypt (if exist)