patches11-14

[email protected] (Richard Clamp) Sun, 4 Aug 2002 17:05:11 +0100
Newsgroups perl.perl1.porters
Message-ID <[email protected]>
--tKW2IUtsqtDRztdT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

patches 11-14 applied mostly with no problem.  It needed some manual
resolution on patch13, notably in the 1.3 change to stab.c[0] was
implemented in the same way.  This is strangely reassuring.

[0] http://mirth.unixbeard.net/cgi-bin/viewcvs.cgi/perl1/stab.c.diff?r1=1.2&r2=1.3

-- 
Richard Clamp <[email protected]>

--tKW2IUtsqtDRztdT
Content-Type: message/rfc822
Content-Disposition: inline

Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mirth.unixbeard.net (mirth [127.0.0.1])
	by mirth (Postfix) with ESMTP id 538815136
	for <richardc>; Sun,  4 Aug 2002 16:34:26 +0100 (BST)
From: [email protected]
To: [email protected]
Subject: perl1 patchlevel.h,1.11,1.12 perl.man.1,1.1,1.2 perl.man.2,1.1,1.2 perldb.man,1.1,1.2
Message-Id: <20020804153426.538815136@mirth>
Date: Sun,  4 Aug 2002 16:34:26 +0100 (BST)

Update of /home/richardc/cvs-repository/perl1
In directory mirth.unixbeard.net:/home/richardc/lab/perl1

Modified Files:
	patchlevel.h perl.man.1 perl.man.2 perldb.man 
Log Message:
patch11


Index: patchlevel.h
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/patchlevel.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- patchlevel.h	4 Aug 2002 10:33:21 -0000	1.11
+++ patchlevel.h	4 Aug 2002 15:34:23 -0000	1.12
@@ -1 +1 @@
-#define PATCHLEVEL 10
+#define PATCHLEVEL 11

Index: perl.man.1
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/perl.man.1,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- perl.man.1	4 Aug 2002 10:29:41 -0000	1.1
+++ perl.man.1	4 Aug 2002 15:34:23 -0000	1.2
@@ -2,9 +2,15 @@
 ''' $Header$
 ''' 
 ''' $Log$
-''' Revision 1.1  2002/08/04 10:29:41  richardc
-''' seed sources 1.0
+''' Revision 1.2  2002/08/04 15:34:23  richardc
+''' patch11
 '''
+''' Revision 1.0.1.2  88/01/30  17:04:07  root
+''' patch 11: random cleanup
+''' 
+''' Revision 1.0.1.1  88/01/28  10:24:44  root
+''' patch8: added eval operator.
+''' 
 ''' Revision 1.0  87/12/18  16:18:16  root
 ''' Initial revision
 ''' 
@@ -95,7 +101,7 @@
 compiles it to an internal form.
 If the script is syntactically correct, it is executed.
 .Sh "Options"
-Note: on first reading this section won't make much sense to you.  It's here
+Note: on first reading this section may not make much sense to you.  It's here
 at the front for easy reference.
 .PP
 A single-character option may be combined with the following option, if any.
@@ -211,6 +217,11 @@
 To suppress printing use the
 .B \-n
 switch.
+A
+.B \-p
+overrides a
+.B \-n
+switch.
 .TP 5
 .B \-P
 causes your script to be run through the C preprocessor before
@@ -222,17 +233,17 @@
 .TP 5
 .B \-s
 enables some rudimentary switch parsing for switches on the command line
-after the script name but before any filename arguments.
-Any switch found there will set the corresponding variable in the
+after the script name but before any filename arguments (or before a --).
+Any switch found there is removed from @ARGV and sets the corresponding variable in the
 .I perl
 script.
 The following script prints \*(L"true\*(R" if and only if the script is
-invoked with a -x switch.
+invoked with a -xyz switch.
 .nf
 
 .ne 2
 	#!/bin/perl -s
-	if ($x) { print "true\en"; }
+	if ($xyz) { print "true\en"; }
 
 .fi
 .Sh "Data Types and Objects"
@@ -310,6 +321,8 @@
     print "The price is $Price.\e\|n";\h'|3.5i'# interpreted
 
 .fi
+Note that you can put curly brackets around the identifier to delimit it
+from following alphanumerics.
 .PP
 Array literals are denoted by separating individual values by commas, and
 enclosing the list in parentheses.
@@ -318,6 +331,7 @@
 For example,
 .nf
 
+.ne 4
     @foo = ('cc', '\-E', $bar);
 
 assigns the entire array value to array foo, but
@@ -346,6 +360,7 @@
 The command is executed each time the pseudo-literal is evaluated.
 Unlike in \f2csh\f1, no interpretation is done on the
 data\*(--newlines remain newlines.
+The status value of the command is returned in $?.
 .PP
 Evaluating a filehandle in angle brackets yields the next line
 from that file (newline included, so it's never false until EOF).
@@ -412,7 +427,9 @@
 It also uses filehandle ARGV internally.
 You can modify @ARGV before the first <> as long as you leave the first
 filename at the beginning of the array.
+Line numbers ($.) continue as if the input was one big happy file.
 .PP
+.ne 5
 If you want to set @ARGV to you own list of files, go right ahead.
 If you want to pass switches into your script, you can
 put a loop on the front like this:
@@ -489,7 +506,7 @@
 	LABEL BLOCK continue BLOCK
 
 .fi
-(Note that, unlike C and Pascal, these are defined in terms of BLOCKs, not
+Note that, unlike C and Pascal, these are defined in terms of BLOCKs, not
 statements.
 This means that the curly brackets are \fIrequired\fR\*(--no dangling statements allowed.
 If you want to write conditionals without curly brackets there are several
@@ -502,9 +519,9 @@
     die "Can't open $foo" unless open(foo);
     open(foo) || die "Can't open $foo";	# foo or bust!
     open(foo) ? die "Can't open $foo" : 'hi mom';
+			    # a bit exotic, that last one
 
 .fi
-though the last one is a bit exotic.)
 .PP
 The
 .I if
@@ -644,7 +661,7 @@
 (See the
 .I do
 operator below.  Note also that the loop control commands described later will
-NOT work in this construct, since loop modifiers don't take loop labels.
+NOT work in this construct, since modifiers don't take loop labels.
 Sorry.)
 .Sh "Expressions"
 Since
@@ -842,10 +859,10 @@
 	$cnt = (chown $uid,$gid,'foo');
 
 .fi
+.ne 18
 Here's an example of looking up non-numeric uids:
 .nf
 
-.ne 16
 	print "User: ";
 	$user = <stdin>;
 	open(pass,'/etc/passwd') || die "Can't open passwd";
@@ -925,6 +942,7 @@
 assigned produces a FALSE (0) value).
 The next call to each() after that will start iterating again.
 The iterator can be reset only by reading all the elements from the array.
+You should not modify the array while iterating over it.
 The following prints out your environment like the printenv program, only
 in a different order:
 .nf
@@ -957,6 +975,15 @@
 	}
 
 .fi
+.Ip "eval EXPR" 8 6
+EXPR is parsed and executed as if it were a little perl program.
+It is executed in the context of the current perl program, so that
+any variable settings, subroutine or format definitions remain afterwards.
+The value returned is the value of the last expression evaluated, just
+as with subroutines.
+If there is a syntax error or runtime error, a null string is returned by
+eval, and $@ is set to the error message.
+If there was no error, $@ is null.
 .Ip "exec LIST" 8 6
 If there is more than one argument in LIST,
 calls execvp() with the arguments in LIST.

Index: perl.man.2
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/perl.man.2,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- perl.man.2	4 Aug 2002 10:29:41 -0000	1.1
+++ perl.man.2	4 Aug 2002 15:34:23 -0000	1.2
@@ -2,9 +2,15 @@
 ''' $Header$
 '''
 ''' $Log$
-''' Revision 1.1  2002/08/04 10:29:41  richardc
-''' seed sources 1.0
+''' Revision 1.2  2002/08/04 15:34:23  richardc
+''' patch11
 '''
+''' Revision 1.0.1.2  88/01/30  17:04:28  root
+''' patch 11: random cleanup
+''' 
+''' Revision 1.0.1.1  88/01/28  10:25:11  root
+''' patch8: added $@ variable.
+''' 
 ''' Revision 1.0  87/12/18  16:18:41  root
 ''' Initial revision
 ''' 
@@ -148,8 +154,7 @@
 with a \*(L"|\*(R", the filename is interpreted as command which pipes
 input to us.
 (You may not have a command that pipes both in and out.)
-On non-pipe opens, the filename '\-' represents either stdin or stdout, as
-appropriate.
+Opening '\-' opens stdin and opening '>\-' opens stdout.
 Open returns 1 upon success, '' otherwise.
 Examples:
 .nf
@@ -313,7 +318,9 @@
 Shifts the first value of the array off, shortening the array by 1 and
 moving everything down.
 If ARRAY is omitted, shifts the ARGV array.
-See also unshift().
+See also unshift(), push() and pop().
+Shift() and unshift() do the same thing to the left end of an array that push()
+and pop() do to the right end.
 .Ip "sleep EXPR" 8 6
 .Ip "sleep" 8
 Causes the script to sleep for EXPR seconds, or forever if no EXPR.
@@ -329,7 +336,8 @@
 (Note that the delimiter may be longer than one character.)
 Trailing null fields are stripped, which potential users of pop() would
 do well to remember.
-A pattern matching the null string will split into separate characters.
+A pattern matching the null string will split the value of EXPR into separate
+characters.
 .sp
 Example:
 .nf
@@ -376,6 +384,7 @@
 Does exactly the same thing as \*(L"exec LIST\*(R" except that a fork
 is done first, and the parent process waits for the child process to complete.
 Note that argument processing varies depending on the number of arguments.
+The return value is the exit status of the program.
 See exec.
 .Ip "tell(FILEHANDLE)" 8 6
 .Ip "tell" 8
@@ -425,6 +434,7 @@
 	$cnt = (unlink 'a','b','c');
 
 .fi
+.ne 7
 .Ip "unshift(ARRAY,LIST)" 8 4
 Does the opposite of a shift.
 Prepends list to the front of the array, and returns the number of elements
@@ -820,6 +830,11 @@
 The value should be copied elsewhere before any pattern matching happens, which
 clobbers $0.
 (Mnemonic: same as sh and ksh.)
+.Ip $<digit> 8
+Contains the subpattern from the corresponding set of parentheses in the last
+pattern matched, not counting patterns matched in nested blocks that have
+been exited already.
+(Mnemonic: like \edigit.)
 .Ip $[ 8 2
 The index of the first element in an array, and of the first character in
 a substring.
@@ -833,6 +848,10 @@
 .Ip $! 8 2
 The current value of errno, with all the usual caveats.
 (Mnemonic: What just went bang?)
+.Ip $@ 8 2
+The error message from the last eval command.
+If null, the last eval parsed and executed correctly.
+(Mnemonic: Where was the syntax error "at"?)
 .Ip @ARGV 8 3
 The array ARGV contains the command line arguments intended for the script.
 Note that $#ARGV is the generally number of arguments minus one, since
@@ -885,6 +904,8 @@
 a2p	awk to perl translator
 .br
 s2p	sed to perl translator
+.br
+perldb	interactive perl debugger
 .SH DIAGNOSTICS
 Compilation errors will tell you the line number of the error, with an
 indication of the next token or token type that was to be examined.

Index: perldb.man
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/perldb.man,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- perldb.man	4 Aug 2002 10:33:19 -0000	1.1
+++ perldb.man	4 Aug 2002 15:34:23 -0000	1.2
@@ -2,9 +2,12 @@
 ''' $Header$
 ''' 
 ''' $Log$
-''' Revision 1.1  2002/08/04 10:33:19  richardc
-''' seed sources 1.0.8
+''' Revision 1.2  2002/08/04 15:34:23  richardc
+''' patch11
 '''
+''' Revision 1.0.1.2  88/01/30  17:04:48  root
+''' patch 11: random cleanup
+''' 
 ''' Revision 1.0.1.1  88/01/28  10:28:19  root
 ''' patch8: created this file.
 ''' 
@@ -94,6 +97,7 @@
 List breakpoints.
 .Ip t 8
 Toggle trace mode.
+Trace mode causes lines to be printed out as they are executed.
 .Ip "b line" 8
 Set breakpoint at indicated line.
 .Ip "d line" 8


--tKW2IUtsqtDRztdT
Content-Type: message/rfc822
Content-Disposition: inline

Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mirth.unixbeard.net (mirth [127.0.0.1])
	by mirth (Postfix) with ESMTP id 2E1CC5136
	for <richardc>; Sun,  4 Aug 2002 16:34:44 +0100 (BST)
From: [email protected]
To: [email protected]
Subject: perl1 arg.c,1.6,1.7 patchlevel.h,1.12,1.13 perl.man.2,1.2,1.3
Message-Id: <20020804153444.2E1CC5136@mirth>
Date: Sun,  4 Aug 2002 16:34:44 +0100 (BST)

Update of /home/richardc/cvs-repository/perl1
In directory mirth.unixbeard.net:/home/richardc/lab/perl1

Modified Files:
	arg.c patchlevel.h perl.man.2 
Log Message:
patch12


Index: arg.c
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/arg.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- arg.c	4 Aug 2002 10:33:20 -0000	1.6
+++ arg.c	4 Aug 2002 15:34:41 -0000	1.7
@@ -1,9 +1,12 @@
 /* $Header$
  *
  * $Log$
- * Revision 1.6  2002/08/04 10:33:20  richardc
- * seed sources 1.0.9
+ * Revision 1.7  2002/08/04 15:34:41  richardc
+ * patch12
  *
+ * Revision 1.0.1.6  88/02/01  17:32:26  root
+ * patch12: made split(' ') behave like awk in ignoring leading white space.
+ * 
  * Revision 1.0.1.5  88/01/30  08:53:16  root
  * patch9: fixed some missing right parens introduced (?) by patch 2
  * 
@@ -223,6 +226,15 @@
 	char *d;
 
 	m = str_get(eval(spat->spat_runtime,Null(STR***)));
+	if (!*m || (*m == ' ' && !m[1])) {
+	    m = "[ \\t\\n]+";
+	    while (isspace(*s)) s++;
+	}
+	if (spat->spat_runtime->arg_type == O_ITEM &&
+	  spat->spat_runtime[1].arg_type == A_SINGLE) {
+	    arg_free(spat->spat_runtime);	/* it won't change, so */
+	    spat->spat_runtime = Nullarg;	/* no point compiling again */
+	}
 	if (d = compile(&spat->spat_compex,m,TRUE,FALSE)) {
 #ifdef DEBUGGING
 	    deb("/%s/: %s\n", m, d);

Index: patchlevel.h
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/patchlevel.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- patchlevel.h	4 Aug 2002 15:34:23 -0000	1.12
+++ patchlevel.h	4 Aug 2002 15:34:41 -0000	1.13
@@ -1 +1 @@
-#define PATCHLEVEL 11
+#define PATCHLEVEL 12

Index: perl.man.2
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/perl.man.2,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- perl.man.2	4 Aug 2002 15:34:23 -0000	1.2
+++ perl.man.2	4 Aug 2002 15:34:41 -0000	1.3
@@ -2,9 +2,12 @@
 ''' $Header$
 '''
 ''' $Log$
-''' Revision 1.2  2002/08/04 15:34:23  richardc
-''' patch11
+''' Revision 1.3  2002/08/04 15:34:41  richardc
+''' patch12
 '''
+''' Revision 1.0.1.3  88/02/01  17:33:03  root
+''' patch12: documented split more adequately.
+''' 
 ''' Revision 1.0.1.2  88/01/30  17:04:28  root
 ''' patch 11: random cleanup
 ''' 
@@ -336,8 +339,25 @@
 (Note that the delimiter may be longer than one character.)
 Trailing null fields are stripped, which potential users of pop() would
 do well to remember.
-A pattern matching the null string will split the value of EXPR into separate
-characters.
+A pattern matching the null string (not to be confused with a null pattern)
+will split the value of EXPR into separate characters at each point it
+matches that way.
+For example:
+.nf
+
+	print join(':',split(/ */,'hi there'));
+
+.fi
+produces the output 'h:i:t:h:e:r:e'.
+
+The pattern /PATTERN/ may be replaced with an expression to specify patterns
+that vary at runtime.
+As a special case, specifying a space ('\ ') will split on white space
+just as split with no arguments does, but leading white space does NOT
+produce a null first field.
+Thus, split('\ ') can be used to emulate awk's default behavior, whereas
+split(/\ /) will give you as many null initial fields as there are
+leading spaces.
 .sp
 Example:
 .nf


--tKW2IUtsqtDRztdT
Content-Type: message/rfc822
Content-Disposition: inline

Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mirth.unixbeard.net (mirth [127.0.0.1])
	by mirth (Postfix) with ESMTP id 95BA75137
	for <richardc>; Sun,  4 Aug 2002 16:34:44 +0100 (BST)
From: [email protected]
To: [email protected]
Subject: perl1/x2p a2p.h,1.2,1.3 walk.c,1.2,1.3
Message-Id: <20020804153444.95BA75137@mirth>
Date: Sun,  4 Aug 2002 16:34:44 +0100 (BST)

Update of /home/richardc/cvs-repository/perl1/x2p
In directory mirth.unixbeard.net:/home/richardc/lab/perl1/x2p

Modified Files:
	a2p.h walk.c 
Log Message:
patch12


Index: a2p.h
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/x2p/a2p.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a2p.h	4 Aug 2002 10:33:16 -0000	1.2
+++ a2p.h	4 Aug 2002 15:34:42 -0000	1.3
@@ -1,9 +1,12 @@
 /* $Header$
  *
  * $Log$
- * Revision 1.2  2002/08/04 10:33:16  richardc
- * seed sources 1.0.5
+ * Revision 1.3  2002/08/04 15:34:42  richardc
+ * patch12
  *
+ * Revision 1.0.1.2  88/02/01  17:33:40  root
+ * patch12: forgot to fix #define YYDEBUG; bug in a2p.
+ * 
  * Revision 1.0.1.1  88/01/26  09:52:30  root
  * patch 5: a2p didn't use config.h.
  * 
@@ -229,7 +232,7 @@
 #ifdef DEBUGGING
 EXT int debug INIT(0);
 EXT int dlevel INIT(0);
-#define YYDEBUG;
+#define YYDEBUG 1
 extern int yydebug;
 #endif
 

Index: walk.c
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/x2p/walk.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- walk.c	4 Aug 2002 10:33:19 -0000	1.2
+++ walk.c	4 Aug 2002 15:34:42 -0000	1.3
@@ -1,9 +1,12 @@
 /* $Header$
  *
  * $Log$
- * Revision 1.2  2002/08/04 10:33:19  richardc
- * seed sources 1.0.8
+ * Revision 1.3  2002/08/04 15:34:42  richardc
+ * patch12
  *
+ * Revision 1.0.1.2  88/02/01  17:34:05  root
+ * patch12: made a2p take advantage of new awk-compatible split in perl.
+ * 
  * Revision 1.0.1.1  88/01/28  11:07:56  root
  * patch8: changed some misleading comments.
  * 
@@ -74,7 +77,7 @@
 	    str_cat(str,"';\t\t# field separator from -F switch\n");
 	}
 	else if (saw_FS && !const_FS) {
-	    str_cat(str,"$FS = '[ \\t\\n]+';\t\t# set field separator\n");
+	    str_cat(str,"$FS = ' ';\t\t# set field separator\n");
 	}
 	if (saw_OFS) {
 	    str_cat(str,"$, = ' ';\t\t# set output field separator\n");
@@ -364,8 +367,6 @@
 	str_scat(str,fstr=walk(1,level,ops[node+3].ival,&numarg));
 	str_free(fstr);
 	numeric |= numarg;
-	if (strEQ(str->str_ptr,"$FS = '\240'"))
-	    str_set(str,"$FS = '[\240\\n\\t]+'");
 	break;
     case OADD:
 	str = walk(1,level,ops[node+1].ival,&numarg);
@@ -514,7 +515,7 @@
 	else if (saw_FS)
 	    str_cat(str,"$FS");
 	else
-	    str_cat(str,"/[ \\t\\n]+/");
+	    str_cat(str,"' '");
 	str_cat(str,", ");
 	str_scat(str,fstr=walk(1,level,ops[node+1].ival,&numarg));
 	str_free(fstr);
@@ -1098,7 +1099,7 @@
     else if (saw_FS)
 	str_cat(str," = split($FS);\n");
     else
-	str_cat(str," = split;\n");
+	str_cat(str," = split(' ');\n");
     tab(str,level);
 }
 


--tKW2IUtsqtDRztdT
Content-Type: message/rfc822
Content-Disposition: inline

Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mirth.unixbeard.net (mirth [127.0.0.1])
	by mirth (Postfix) with ESMTP id 5E3F45137
	for <richardc>; Sun,  4 Aug 2002 16:40:40 +0100 (BST)
From: [email protected]
To: [email protected]
Subject: perl1/t op.split,1.1,1.2
Message-Id: <20020804154040.5E3F45137@mirth>
Date: Sun,  4 Aug 2002 16:40:40 +0100 (BST)

Update of /home/richardc/cvs-repository/perl1/t
In directory mirth.unixbeard.net:/home/richardc/lab/perl1/t

Modified Files:
	op.split 
Log Message:
patch13


Index: op.split
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/t/op.split,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- op.split	4 Aug 2002 10:29:42 -0000	1.1
+++ op.split	4 Aug 2002 15:40:37 -0000	1.2
@@ -2,7 +2,7 @@
 
 # $Header$
 
-print "1..4\n";
+print "1..6\n";
 
 $FS = ':';
 
@@ -22,3 +22,10 @@
 $_ = "a:b:c::::";
 @ary = split(/:/);
 if (join(".",@ary) eq "a.b.c") {print "ok 4\n";} else {print "not ok 4\n";}
+
+$_ = join(':',split(' ','    a b	c '));
+if ($_ eq 'a:b:c') {print "ok 5\n";} else {print "not ok 5\n";}
+
+$_ = join(':',split(/ */,"foo  bar bie\tdoll"));
+if ($_ eq "f:o:o:b:a:r:b:i:e:\t:d:o:l:l")
+	{print "ok 6\n";} else {print "not ok 6\n";}


--tKW2IUtsqtDRztdT
Content-Type: message/rfc822
Content-Disposition: inline

Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mirth.unixbeard.net (mirth [127.0.0.1])
	by mirth (Postfix) with ESMTP id 37A9D5136
	for <richardc>; Sun,  4 Aug 2002 16:40:40 +0100 (BST)
From: [email protected]
To: [email protected]
Subject: perl1 Makefile.SH,1.7,1.8 arg.c,1.7,1.8 makedepend.SH,1.1,1.2 patchlevel.h,1.13,1.14 spat.h,1.1,1.2 stab.c,1.4,1.5
Message-Id: <20020804154040.37A9D5136@mirth>
Date: Sun,  4 Aug 2002 16:40:40 +0100 (BST)

Update of /home/richardc/cvs-repository/perl1
In directory mirth.unixbeard.net:/home/richardc/lab/perl1

Modified Files:
	Makefile.SH arg.c makedepend.SH patchlevel.h spat.h stab.c 
Log Message:
patch13


Index: Makefile.SH
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/Makefile.SH,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Makefile.SH	4 Aug 2002 10:46:40 -0000	1.7
+++ Makefile.SH	4 Aug 2002 15:40:37 -0000	1.8
@@ -12,14 +12,23 @@
 case "$0" in
 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
 esac
+
+case "$d_symlink" in
+*define*) sln='ln -s' ;;
+*) sln='ln';;
+esac
+
 echo "Extracting Makefile (with variable substitutions)"
 cat >Makefile <<!GROK!THIS!
 # $Header$
 #
 # $Log$
-# Revision 1.7  2002/08/04 10:46:40  richardc
-# don't assume . is in the PATH
+# Revision 1.8  2002/08/04 15:40:37  richardc
+# patch13
 #
+# Revision 1.0.1.5  88/02/02  11:20:49  root
+# patch13: added d_symlink dependency, changed TEST to ./perl TEST.
+# 
 # Revision 1.0.1.4  88/01/28  10:17:59  root
 # patch8: added perldb.man
 # 
@@ -47,6 +56,7 @@
 LARGE = $large $split
 mallocsrc = $mallocsrc
 mallocobj = $mallocobj
+SLN = $sln
 
 libs = $libs $libnm -lm
 !GROK!THIS!
@@ -155,7 +165,7 @@
 
 test: perl
 	chmod 755 t/TEST t/base.* t/comp.* t/cmd.* t/io.* t/op.*
-	cd t && (rm -f perl; ln -s ../perl . || ln ../perl .) && ./TEST
+	cd t && (rm -f perl; $(SLN) ../perl .) && ./TEST
 
 clist:
 	echo $(c) | tr ' ' '\012' >.clist

Index: arg.c
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/arg.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- arg.c	4 Aug 2002 15:34:41 -0000	1.7
+++ arg.c	4 Aug 2002 15:40:37 -0000	1.8
@@ -1,9 +1,12 @@
 /* $Header$
  *
  * $Log$
- * Revision 1.7  2002/08/04 15:34:41  richardc
- * patch12
+ * Revision 1.8  2002/08/04 15:40:37  richardc
+ * patch13
  *
+ * Revision 1.0.1.7  88/02/02  11:22:19  root
+ * patch13: fixed split(' ') to work right second time.  Added CRYPT dependency.
+ * 
  * Revision 1.0.1.6  88/02/01  17:32:26  root
  * patch12: made split(' ') behave like awk in ignoring leading white space.
  * 
@@ -228,7 +231,7 @@
 	m = str_get(eval(spat->spat_runtime,Null(STR***)));
 	if (!*m || (*m == ' ' && !m[1])) {
 	    m = "[ \\t\\n]+";
-	    while (isspace(*s)) s++;
+	    spat->spat_flags |= SPAT_SKIPWHITE;
 	}
 	if (spat->spat_runtime->arg_type == O_ITEM &&
 	  spat->spat_runtime[1].arg_type == A_SINGLE) {
@@ -254,6 +257,10 @@
     if (!ary)
 	myarray = ary = anew();
     ary->ary_fill = -1;
+    if (spat->spat_flags & SPAT_SKIPWHITE) {
+	while (isspace(*s))
+	    s++;
+    }
     while (*s && (m = execute(&spat->spat_compex, s, (iters == 0), 1))) {
 	if (spat->spat_compex.numsubs)
 	    s = spat->spat_compex.subbase;
@@ -1955,8 +1962,13 @@
 	retary = Null(STR***);		/* do_stat already did retary */
 	goto donumset;
     case O_CRYPT:
+#ifdef CRYPT
 	tmps = str_get(sarg[1]);
 	str_set(str,crypt(tmps,str_get(sarg[2])));
+#else
+	fatal(
+	  "The crypt() function is unimplemented due to excessive paranoia.");
+#endif
 	break;
     case O_EXP:
 	value = exp(str_gnum(sarg[1]));

Index: makedepend.SH
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/makedepend.SH,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- makedepend.SH	4 Aug 2002 10:29:41 -0000	1.1
+++ makedepend.SH	4 Aug 2002 15:40:37 -0000	1.2
@@ -18,9 +18,12 @@
 # $Header$
 #
 # $Log$
-# Revision 1.1  2002/08/04 10:29:41  richardc
-# seed sources 1.0
+# Revision 1.2  2002/08/04 15:40:37  richardc
+# patch13
 #
+# Revision 1.0.1.1  88/02/02  11:24:05  root
+# patch13: removed spurious -I./h.
+# 
 # Revision 1.0  87/12/18  17:54:32  root
 # Initial revision
 # 
@@ -86,7 +89,7 @@
 	-e 's|\\$||' \
 	-e p \
 	-e '}'
-    $cpp -I/usr/local/include -I. -I./h $file.c | \
+    $cpp -I/usr/local/include -I. $file.c | \
     $sed \
 	-e '/^# *[0-9]/!d' \
 	-e 's/^.*"\(.*\)".*$/'$filebase'.o: \1/' \

Index: patchlevel.h
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/patchlevel.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- patchlevel.h	4 Aug 2002 15:34:41 -0000	1.13
+++ patchlevel.h	4 Aug 2002 15:40:37 -0000	1.14
@@ -1 +1 @@
-#define PATCHLEVEL 12
+#define PATCHLEVEL 13

Index: spat.h
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/spat.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- spat.h	4 Aug 2002 10:29:41 -0000	1.1
+++ spat.h	4 Aug 2002 15:40:37 -0000	1.2
@@ -1,9 +1,12 @@
 /* $Header$
  *
  * $Log$
- * Revision 1.1  2002/08/04 10:29:41  richardc
- * seed sources 1.0
+ * Revision 1.2  2002/08/04 15:40:37  richardc
+ * patch13
  *
+ * Revision 1.0.1.1  88/02/02  11:24:37  root
+ * patch13: added flag for stripping leading spaces on split.
+ * 
  * Revision 1.0  87/12/18  13:06:10  root
  * Initial revision
  * 
@@ -23,6 +26,7 @@
 #define SPAT_USE_ONCE 2			/* use pattern only once per article */
 #define SPAT_SCANFIRST 4		/* initial constant not anchored */
 #define SPAT_SCANALL 8			/* initial constant is whole pat */
+#define SPAT_SKIPWHITE 16		/* skip leading whitespace for split */
 
 EXT SPAT *spat_root;		/* list of all spats */
 EXT SPAT *curspat;		/* what to do \ interps from */

Index: stab.c
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/stab.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- stab.c	4 Aug 2002 15:19:44 -0000	1.4
+++ stab.c	4 Aug 2002 15:40:37 -0000	1.5
@@ -1,9 +1,12 @@
 /* $Header$
  *
  * $Log$
- * Revision 1.4  2002/08/04 15:19:44  richardc
- * rename setenv to PL_setenv to avoid clash
+ * Revision 1.5  2002/08/04 15:40:37  richardc
+ * patch13
  *
+ * Revision 1.0.1.2  88/02/02  11:25:53  root
+ * patch13: moved extern int out of function for a poor Xenix machine.
+ * 
  * Revision 1.0.1.1  88/01/28  10:35:17  root
  * patch8: changed some stabents to support eval operator.
  * 


--tKW2IUtsqtDRztdT
Content-Type: message/rfc822
Content-Disposition: inline

Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mirth.unixbeard.net (mirth [127.0.0.1])
	by mirth (Postfix) with ESMTP id D32605136
	for <richardc>; Sun,  4 Aug 2002 16:41:04 +0100 (BST)
From: [email protected]
To: [email protected]
Subject: perl1 patchlevel.h,1.14,1.15
Message-Id: <20020804154104.D32605136@mirth>
Date: Sun,  4 Aug 2002 16:41:04 +0100 (BST)

Update of /home/richardc/cvs-repository/perl1
In directory mirth.unixbeard.net:/home/richardc/lab/perl1

Modified Files:
	patchlevel.h 
Log Message:
patch14


Index: patchlevel.h
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/patchlevel.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- patchlevel.h	4 Aug 2002 15:40:37 -0000	1.14
+++ patchlevel.h	4 Aug 2002 15:41:02 -0000	1.15
@@ -1 +1 @@
-#define PATCHLEVEL 13
+#define PATCHLEVEL 14


--tKW2IUtsqtDRztdT
Content-Type: message/rfc822
Content-Disposition: inline

Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mirth.unixbeard.net (mirth [127.0.0.1])
	by mirth (Postfix) with ESMTP id 42C105137
	for <richardc>; Sun,  4 Aug 2002 16:41:05 +0100 (BST)
From: [email protected]
To: [email protected]
Subject: perl1/x2p walk.c,1.3,1.4
Message-Id: <20020804154105.42C105137@mirth>
Date: Sun,  4 Aug 2002 16:41:05 +0100 (BST)

Update of /home/richardc/cvs-repository/perl1/x2p
In directory mirth.unixbeard.net:/home/richardc/lab/perl1/x2p

Modified Files:
	walk.c 
Log Message:
patch14


Index: walk.c
===================================================================
RCS file: /home/richardc/cvs-repository/perl1/x2p/walk.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- walk.c	4 Aug 2002 15:34:42 -0000	1.3
+++ walk.c	4 Aug 2002 15:41:02 -0000	1.4
@@ -1,9 +1,12 @@
 /* $Header$
  *
  * $Log$
- * Revision 1.3  2002/08/04 15:34:42  richardc
- * patch12
+ * Revision 1.4  2002/08/04 15:41:02  richardc
+ * patch14
  *
+ * Revision 1.0.1.3  88/02/02  11:54:58  root
+ * patch14: got return value of each() backwards in translating 'for (a in b)'.
+ * 
  * Revision 1.0.1.2  88/02/01  17:34:05  root
  * patch12: made a2p take advantage of new awk-compatible split in perl.
  * 
@@ -965,10 +968,10 @@
 	    str_free(fstr);
 	}
 	else {
-	    str_set(str,"while (($junkkey,$");
+	    str_set(str,"while (($");
 	    str_scat(str,fstr=walk(1,level,ops[node+1].ival,&numarg));
 	    str_free(fstr);
-	    str_cat(str,") = each(");
+	    str_cat(str,",$junkval) = each(");
 	    str_scat(str,tmpstr);
 	    str_cat(str,")) ");
 	    str_scat(str,fstr=walk(0,level,ops[node+3].ival,&numarg));


--tKW2IUtsqtDRztdT--