/* vi: set sw=4 ts=4: */
/*
* awk implementation for busybox
-@@ -70,9 +71,14 @@ typedef struct chain_s {
+@@ -74,9 +75,14 @@ typedef struct chain_s {
} chain;
/* Function */
} func;
/* I/O stream */
-@@ -1453,7 +1459,8 @@ static void parse_program(char *p)
+@@ -1466,7 +1472,8 @@ static void parse_program(char *p)
next_token(TC_FUNCTION);
g_pos++;
f = newfunc(t_string);
f->nargs = 0;
while (next_token(TC_VARIABLE | TC_SEQTERM) & TC_VARIABLE) {
v = findvar(ahash, t_string);
-@@ -1462,7 +1469,7 @@ static void parse_program(char *p)
+@@ -1475,7 +1482,7 @@ static void parse_program(char *p)
if (next_token(TC_COMMA | TC_SEQTERM) & TC_SEQTERM)
break;
}
chain_group();
clear_array(ahash);
-@@ -2547,7 +2554,8 @@ static var *evaluate(node *op, var *res)
+@@ -2573,7 +2580,8 @@ static var *evaluate(node *op, var *res)
var *vbeg, *v;
const char *sv_progname;
syntax_error(EMSG_UNDEF_FUNC);
vbeg = v = nvalloc(op->r.f->nargs + 1);
-@@ -2564,7 +2572,10 @@ static var *evaluate(node *op, var *res)
+@@ -2590,7 +2598,10 @@ static var *evaluate(node *op, var *res)
fnargs = vbeg;
sv_progname = g_progname;
g_progname = sv_progname;
nvfree(fnargs);
-@@ -2942,6 +2953,143 @@ static rstream *next_input_file(void)
+@@ -2984,6 +2995,143 @@ static rstream *next_input_file(void)
#undef files_happen
}
int awk_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int awk_main(int argc, char **argv)
{
-@@ -3007,6 +3155,9 @@ int awk_main(int argc, char **argv)
+@@ -3049,6 +3197,9 @@ int awk_main(int argc, char **argv)
*s1 = '=';
}
}