# and edit it to reflect your system. Some packages may include samples
# of config.h for certain machines, so you might look for one of those.)
#
-# $Header: Configure,v 1.0.1.5 88/01/30 09:21:20 root Exp $
+# $Header: Configure,v 1.0.1.6 88/02/02 11:20:07 root Exp $
#
# Yes, you may rip this off to use in other distribution packages.
# (Note: this Configure script was generated automatically. Rather than
cppminus=''
d_bcopy=''
d_charsprf=''
+d_crypt=''
d_index=''
d_statblks=''
d_stdstdio=''
d_strctcpy=''
+d_symlink=''
d_tminsys=''
d_vfork=''
d_voidsig=''
d_charsprf="$undef"
fi
+: see if crypt exists
+echo " "
+if $contains crypt libc.list >/dev/null 2>&1; then
+ echo 'crypt() found.'
+ d_crypt="$define"
+else
+ echo 'crypt() not found.'
+ d_crypt="$undef"
+fi
+
: index or strcpy
echo " "
dflt=y
cc=cc
fi
+: see if symlink exists
+echo " "
+if $contains symlink libc.list >/dev/null 2>&1; then
+ echo 'symlink() found.'
+ d_symlink="$define"
+else
+ echo 'symlink() not found.'
+ d_symlink="$undef"
+fi
+
: see if we should include -lnm
echo " "
if $test -r /usr/lib/libnm.a || $test -r /usr/local/lib/libnm.a ; then
cppminus='$cppminus'
d_bcopy='$d_bcopy'
d_charsprf='$d_charsprf'
+d_crypt='$d_crypt'
d_index='$d_index'
d_statblks='$d_statblks'
d_stdstdio='$d_stdstdio'
d_strctcpy='$d_strctcpy'
+d_symlink='$d_symlink'
d_tminsys='$d_tminsys'
d_vfork='$d_vfork'
d_voidsig='$d_voidsig'
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: Makefile.SH,v 1.0.1.4 88/01/28 10:17:59 root Exp $
+# $Header: Makefile.SH,v 1.0.1.5 88/02/02 11:20:49 root Exp $
#
# $Log: Makefile.SH,v $
+# 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
#
LARGE = $large $split
mallocsrc = $mallocsrc
mallocobj = $mallocobj
+SLN = $sln
libs = $libnm -lm
!GROK!THIS!
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 .) && ./perl TEST
clist:
echo $(c) | tr ' ' '\012' >.clist
-/* $Header: arg.c,v 1.0.1.6 88/02/01 17:32:26 root Exp $
+/* $Header: arg.c,v 1.0.1.7 88/02/02 11:22:19 root Exp $
*
* $Log: arg.c,v $
+ * 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.
*
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) {
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;
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]));
*/
#$d_charsprf CHARSPRINTF /**/
+/* CRYPT:
+ * This symbol, if defined, indicates that the crypt routine is available
+ * to encrypt passwords and the like.
+ */
+#$d_crypt CRYPT /**/
+
/* index:
* This preprocessor symbol is defined, along with rindex, if the system
* uses the strchr and strrchr routines instead.
*/
#$d_strctcpy STRUCTCOPY /**/
+/* SYMLINK:
+ * This symbol, if defined, indicates that the symlink routine is available
+ * to create symbolic links.
+ */
+#$d_symlink SYMLINK /**/
+
/* TMINSYS:
* This symbol is defined if this system declares "struct tm" in
* in <sys/time.h> rather than <time.h>. We can't just say
echo "Extracting makedepend (with variable substitutions)"
$spitshell >makedepend <<!GROK!THIS!
$startsh
-# $Header: makedepend.SH,v 1.0 87/12/18 17:54:32 root Exp $
+# $Header: makedepend.SH,v 1.0.1.1 88/02/02 11:24:05 root Exp $
#
# $Log: makedepend.SH,v $
+# 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
#
-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/' \
-#define PATCHLEVEL 12
+#define PATCHLEVEL 13
-/* $Header: spat.h,v 1.0 87/12/18 13:06:10 root Exp $
+/* $Header: spat.h,v 1.0.1.1 88/02/02 11:24:37 root Exp $
*
* $Log: spat.h,v $
+ * 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
*
#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 */
-/* $Header: stab.c,v 1.0.1.1 88/01/28 10:35:17 root Exp $
+/* $Header: stab.c,v 1.0.1.2 88/02/02 11:25:53 root Exp $
*
* $Log: stab.c,v $
+ * 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.
*
,0
};
+extern int errno;
+
STR *
stab_str(stab)
STAB *stab;
{
register int paren;
register char *s;
- extern int errno;
switch (*stab->stab_name) {
case '0': case '1': case '2': case '3': case '4':
#!./perl
-# $Header: op.split,v 1.0 87/12/18 13:14:20 root Exp $
+# $Header: op.split,v 1.0.1.1 88/02/02 11:26:37 root Exp $
-print "1..4\n";
+print "1..6\n";
$FS = ':';
$_ = "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";}