pike.git / src / main.c

version» Context lines:

pike.git/src/main.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: main.c,v 1.38 1998/01/27 18:06:43 hubbe Exp $"); + RCSID("$Id: main.c,v 1.39 1998/02/01 05:46:03 hubbe Exp $");   #include "fdlib.h"   #include "backend.h"   #include "module.h"   #include "object.h"   #include "lex.h"   #include "pike_types.h"   #include "builtin_functions.h"   #include "array.h"   #include "stralloc.h"   #include "interpret.h"
pike.git/src/main.c:253:    init_interpreter();    init_cpp();    init_lex();    init_types();       init_modules();    master();    call_callback(& post_master_callbacks, 0);    free_callback(& post_master_callbacks);    -  a=allocate_array_no_init(argc,0); -  for(num=0;num<argc;num++) -  { -  ITEM(a)[num].u.string=make_shared_string(argv[num]); -  ITEM(a)[num].type=T_STRING; -  } -  push_array(a); -  -  for(num=0;environ[num];num++); -  a=allocate_array_no_init(num,0); -  for(num=0;environ[num];num++) -  { -  ITEM(a)[num].u.string=make_shared_string(environ[num]); -  ITEM(a)[num].type=T_STRING; -  } -  push_array(a); -  +     if(SETJMP(back))    {    if(throw_severity == THROW_EXIT)    {    num=throw_value.u.integer;    }else{    ONERROR tmp;    SET_ONERROR(tmp,exit_on_error,"Error in handle_error in master object!");    push_svalue(& throw_value);    APPLY_MASTER("handle_error", 1);    pop_stack();    UNSET_ONERROR(tmp);    num=10;    }    }else{    back.severity=THROW_EXIT;    -  +  a=allocate_array_no_init(argc,0); +  for(num=0;num<argc;num++) +  { +  ITEM(a)[num].u.string=make_shared_string(argv[num]); +  ITEM(a)[num].type=T_STRING; +  } +  push_array(a); +  +  for(num=0;environ[num];num++); +  a=allocate_array_no_init(num,0); +  for(num=0;environ[num];num++) +  { +  ITEM(a)[num].u.string=make_shared_string(environ[num]); +  ITEM(a)[num].type=T_STRING; +  } +  push_array(a); +     apply(master(),"_main",2);    pop_stack();       backend();    num=0;    }    UNSETJMP(back);       do_exit(num);    return num; /* avoid warning */