/* $RCSfile: walk.c,v $$Revision: 4.1 $$Date: 92/08/07 18:29:31 $
*
- * Copyright (c) 1991, Larry Wall
+ * Copyright (c) 1991-1997, Larry Wall
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
STR *
-walk(useval,level,node,numericptr,minprec)
-int useval;
-int level;
-register int node;
-int *numericptr;
-int minprec; /* minimum precedence without parens */
+walk(int useval, int level, register int node, int *numericptr, int minprec)
+
+
+
+
+ /* minimum precedence without parens */
{
register int len;
register STR *str;
if (saw_FS && !const_FS)
do_chop = TRUE;
if (do_chop) {
- str_cat(str,"chop;\t# strip record separator\n");
+ str_cat(str,"chomp;\t# strip record separator\n");
tab(str,level);
}
if (do_split)
if (saw_FNR)
str_cat(str,"continue {\n $FNRbase = $. if eof;\n}\n");
}
- else
+ else if (old_awk)
str_cat(str,"while (<>) { } # (no line actions)\n");
if (ops[node+4].ival) {
realexit = TRUE;
i = 0;
if (do_chop) {
i++;
- str_cat(str,"chop;\t# strip record separator\n");
+ str_cat(str,"chomp;\t# strip record separator\n");
tab(str,level);
}
if (do_split && !(len & 1)) {
}
static void
-tab(str,lvl)
-register STR *str;
-register int lvl;
+tab(register STR *str, register int lvl)
{
while (lvl > 1) {
str_cat(str,"\t");
}
static void
-fixtab(str,lvl)
-register STR *str;
-register int lvl;
+fixtab(register STR *str, register int lvl)
{
register char *s;
}
static void
-addsemi(str)
-register STR *str;
+addsemi(register STR *str)
{
register char *s;
}
static void
-emit_split(str,level)
-register STR *str;
-int level;
+emit_split(register STR *str, int level)
{
register int i;
}
int
-prewalk(numit,level,node,numericptr)
-int numit;
-int level;
-register int node;
-int *numericptr;
+prewalk(int numit, int level, register int node, int *numericptr)
{
register int len;
register int type;
}
static void
-numericize(node)
-register int node;
+numericize(register int node)
{
register int len;
register int type;