pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1:   /* -*- Pike -*-    * -  * $Id: master.pike.in,v 1.128 2000/08/29 21:54:01 mast Exp $ +  * $Id: master.pike.in,v 1.129 2000/09/05 02:15:53 hubbe Exp $    *    * Master-file for Pike.    *    * Based on master.pike 1.67.    */      // Some configurable parameters useful for debugging      #define PIKE_AUTORELOAD   
pike.git/lib/master.pike.in:967:   /* This function is called when all the driver is done with all setup    * of modules, efuns, tables etc. etc. and is ready to start executing    * _real_ programs. It receives the arguments not meant for the driver    * and an array containing the environment variables on the same form as    * a C program receives them.    */   void _main(array(string) orig_argv, array(string) env)   {    array(string) argv=copy_value(orig_argv);    int i,debug,trace; -  object script; +     object tmp;    string a,b;    array q;       _pike_file_name = orig_argv[0];       foreach(env,a)    {    if(sscanf(a,"%s=%s",a,b))    {
pike.git/lib/master.pike.in:1167:    exit(1);    }    tmp->StdinHilfe();    exit(0);    } else {    argv=argv[1..];    }       argv[0]=combine_path_with_cwd(argv[0]);    -  program tmp; +  program prog;       mixed err = catch { -  tmp=(program)argv[0]; +  prog=(program)argv[0];    };       if (err) {    werror(sprintf("Pike: Failed to compile script:\n"    "%s\n", stringp(err[0])?err[0]:describe_backtrace(err)));    exit(1);    }       // FIXME: Isn't the following code dead? -  if(!tmp) +  if(!prog)    {    werror("Pike: Couldn't find script to execute\n(%O)\n",argv[0]);    exit(1);    }    -  object script=tmp(); +  object script=prog();      #if constant(_debug)    if(debug) _debug(debug);   #endif    if(!script->main)    {    werror("Error: "+argv[0]+" has no main().\n");    exit(1);    }