aboutsummaryrefslogtreecommitdiffhomepage
path: root/exec.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-02-02 01:49:11 +1000
committerGravatar axel <axel@liljencrantz.se>2006-02-02 01:49:11 +1000
commitfeabc032f62cc2a2dd4c2626b1c6806a22d5988d (patch)
tree88773f269100dad40fff31376f81470d7f62a2cc /exec.c
parent9f9f7bf95aa56f266994647b008116721f95132a (diff)
Generalize the stack tracing code, add support for showing events and command substitutions in stack traces
darcs-hash:20060201154911-ac50b-707358ea50231661c05a92b40ca109ec801081e6.gz
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/exec.c b/exec.c
index 5f293eb9..4491ebb5 100644
--- a/exec.c
+++ b/exec.c
@@ -797,25 +797,17 @@ void exec( job_t *j )
string_buffer_t sb;
const wchar_t * def = function_get_definition( p->argv[0] );
-// fwprintf( stderr, L"run function %ls\n", argv[0] );
+ //fwprintf( stderr, L"run function %ls\n", argv[0] );
if( def == 0 )
{
debug( 0, _( L"Unknown function '%ls'" ), p->argv[0] );
break;
}
- /*
- These two lines must be called before the new block is pushed
- */
- int lineno = parser_get_lineno();
- wchar_t *file = parser_current_filename()?wcsdup(parser_current_filename()):0;
-
parser_push_block( FUNCTION_CALL );
- al_init( &current_block->param2.function_vars );
+ current_block->param2.function_call_process = p;
current_block->param1.function_name = wcsdup( p->argv[0] );
- current_block->param3.call_lineno = lineno;
- current_block->param4.call_filename = file;
if( builtin_count_args(p->argv)>1 )
{
@@ -823,9 +815,6 @@ void exec( job_t *j )
for( i=1, arg=p->argv+1; *arg; i++, arg++ )
{
- al_push( &current_block->param2.function_vars,
- escape(*arg, 1) );
-
if( i != 1 )
sb_append( &sb, ARRAY_SEP_STR );
sb_append( &sb, *arg );