On 10.03.2010 19:15, Denys Vlasenko wrote:
> The fix is attached. Still doesn't work for nested "for" loops with "break"
>   
That's it ... now I know, what's going wrong. Busybox awk behaves like
original awk, where as gawk assigns a new temporary variable for each
for loop. Does anybody know what posix says to this "for(i in array)"?

According to original awk specification the bug is in script.awk ... the
definition of the function output has to be written as:

function output(lib,            sym, l) {
   ...
}

This assigns temporary variables to sym and l on the iterations of the
function call ... and works correctly in busybox awk AND gawk. That
means the bug fix hast to go to the orginal awk script in gcc, as this
script violates original awk specification!

So do we really need to do any modifications to the busybox awk?

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to