X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=x2p%2Fwalk.c;h=de1263fc16bfb4b02eea79389e81ce191e33f777;hb=9f10b7978c0f0158c4689058d5599a8d2c5e52da;hp=de1743fc8e287536a9987006754984addd777c42;hpb=07409e015252427f5ec1d8889bbfb78cf39d061d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/x2p/walk.c b/x2p/walk.c index de1743f..de1263f 100644 --- a/x2p/walk.c +++ b/x2p/walk.c @@ -1,12 +1,10 @@ -/* $RCSfile: walk.c,v $$Revision: 4.1 $$Date: 92/08/07 18:29:31 $ +/* walk.c * * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999, * 2000, 2001, 2002, 2005 by Larry Wall and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. - * - * $Log: walk.c,v $ */ #include "EXTERN.h" @@ -43,11 +41,6 @@ char *instr(char *big, char *little); STR * walk(int useval, int level, register int node, int *numericptr, int minprec) - - - - - /* minimum precedence without parens */ { register int len; register STR *str; @@ -660,13 +653,11 @@ sub Pick {\n\ str_cat(str,", "); str_scat(str,fstr=walk(1,level,ops[node+2].ival,&numarg,P_COMMA+1)); str_free(fstr); - str_cat(str,", "); if (len == 3) { + str_cat(str,", "); str_scat(str,fstr=walk(1,level,ops[node+3].ival,&numarg,P_COMMA+1)); str_free(fstr); } - else - str_cat(str,"999999"); str_cat(str,")"); break; case OSTRING: @@ -675,7 +666,7 @@ sub Pick {\n\ break; case OSPLIT: str = str_new(0); - limit = ", 9999)"; + limit = ", -1)"; numeric = 1; tmpstr = walk(1,level,ops[node+2].ival,&numarg,P_MIN); if (useval) @@ -1617,13 +1608,13 @@ emit_split(register STR *str, int level) str_cat(str,tokenbuf); } if (const_FS) { - sprintf(tokenbuf," = split(/[%c\\n]/, $_, 9999);\n",const_FS); + sprintf(tokenbuf," = split(/[%c\\n]/, $_, -1);\n",const_FS); str_cat(str,tokenbuf); } else if (saw_FS) - str_cat(str," = split($FS, $_, 9999);\n"); + str_cat(str," = split($FS, $_, -1);\n"); else - str_cat(str," = split(' ', $_, 9999);\n"); + str_cat(str," = split(' ', $_, -1);\n"); tab(str,level); }