On Tue, Jan 16, 2018 at 9:28 AM, daggs <[email protected]> wrote: > Greetings Denys, > >> Sent: Monday, January 15, 2018 at 1:16 PM >> From: "Denys Vlasenko" <[email protected]> >> To: daggs <[email protected]> >> Cc: busybox <[email protected]> >> Subject: Re: adding lineno implementation >> >> On Mon, Jan 15, 2018 at 10:52 AM, daggs <[email protected]> wrote: >> > Greetings, >> > >> > I'm trying to add LINENO implementation to hush, I've decided to check for >> > new lines in i_getch calls and it seems to work but with one bug, in >> > loops, the value gets updated wrongly. >> > >> > here is my test output: >> > #!/bin/bash >> > >> > t=0 >> > >> > echo "at line ${LINENO}" >> > while [ ${t} -lt 10 ]; do >> > echo "at line ${LINENO}" >> > t=$((t+1)) >> > done >> > echo "at line ${LINENO}" >> > >> > echo "hello world ${t}" >> > >> > bash output: >> > at line 5 >> > at line 7 >> > at line 7 >> > at line 7 >> > at line 7 >> > at line 7 >> > at line 7 >> > at line 7 >> > at line 7 >> > at line 7 >> > at line 7 >> > at line 10 >> > hello world 10 >> > >> > hush output: >> > at line 5 >> > at line 9 >> > at line 9 >> > at line 9 >> > at line 9 >> > at line 9 >> > at line 9 >> > at line 9 >> > at line 9 >> > at line 9 >> > at line 9 >> > at line 10 >> > hello world 10 >> > >> > all the line 9 prints are the print within the loop. >> > >> > any ideas why? >> >> Care to send the patch? >> > > sure, see attached.
Implemented in git a bit differently _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
