From 5bb39bb1995cb12d8da76b1d482df9be1acc2eb4 Mon Sep 17 00:00:00 2001 From: Harald van Dijk Date: Tue, 15 Mar 2011 15:52:05 +0800 Subject: [SHELL] Improve LINENO support This patch improves LINENO support by storing line numbers in the parse tree, for commands as well as for function definitions. It makes LINENO behaves properly when calling functions, and has the added benefit of improved line numbers in error messages when the last-parsed command is not the last-executed one. It removes the earlier LINENO support, and instead sets LINENO from evaltree when a command is executed Signed-off-by: Harald van Dijk Signed-off-by: Herbert Xu --- src/jobs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/jobs.c') diff --git a/src/jobs.c b/src/jobs.c index 4b1b938..bf40204 100644 --- a/src/jobs.c +++ b/src/jobs.c @@ -1288,7 +1288,7 @@ dotail: p = "; done"; goto dodo; case NDEFUN: - cmdputs(n->narg.text); + cmdputs(n->ndefun.text); p = "() { ... }"; goto dotail2; case NCMD: -- cgit 1.4.1