* Changed the recursion into an iteration so that we don't use awk functions

and it properly works with the Solaris implementation.


git-svn-id: svn://svn.zoy.org/elk/trunk@207 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
sam 2003-09-27 12:05:59 +00:00
parent 25c92f739b
commit aefd5ebc52
1 changed files with 73 additions and 73 deletions

View File

@ -29,16 +29,15 @@
{
need_nl = 0;
do_line($0);
printf "\n";
}
line = $0;
while(line != "") {
function do_line(line) {
nxt = index(line, "@[")
if(nxt == 0) {
printf "%s", line;
return;
break;
}
if(nxt > 1) {
@ -47,8 +46,8 @@ function do_line(line) {
}
need_nl = 1;
printf "%s", substr(line, 1, nxt - 1);
do_line(substr(line, nxt));
return;
line = substr(line, nxt);
continue;
}
tmp = substr(line, 1, 3);
@ -101,7 +100,8 @@ function do_line(line) {
printf "\"%s\"\n%s", arg, inx;
need_nl = 1;
}
}
do_line(line);
printf "\n";
}