pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:3561:    mixed v = (resolver||this)->resolv(sym);    if(!v)    error("Could not resolve %s. "    "(Perhaps the installed pike tree has been moved.)\n", sym);    return v;   };      //! 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. - void _main(array(string) orig_argv) + void _main(array(string(0..255)) orig_argv)   {    array(string) argv=copy_value(orig_argv);    int debug,trace,run_tool;    object tmp;    string postparseaction=0;       predefines = initial_predefines =    Builtin._take_over_initial_predefines();    _pike_file_name = orig_argv[0];    _master_file_name = __FILE__;
pike.git/lib/master.pike.in:4026:    if(cur_compat_ver <= Version(7,4)) {    script=prog();    }    else {    script=prog(argv);    }    if(!script->main)    error("Error: %s has no main().\n", argv[0]);    if (cur_compat_ver <= Version (7, 6))    ret=script->main(sizeof(argv),argv,getenv()); +  else if (cur_compat_ver <= Version (8, 0)) +  ret = script->main(sizeof(argv),argv);    else    { -  array a; -  if( __get_first_arg_type(_typeof(script->main))<=typeof(a) ) +  mixed first_arg = __get_first_arg_type(_typeof(script->main)); +  // NB: first_arg may be zero eg in case main() ignores all args. +  if( first_arg && (typeof(argv) <= first_arg) ) { +  // argv accepted as first argument.    ret=script->main(argv); -  else +  } else    ret=script->main(sizeof(argv),argv);    }    };    // Disable tracing.    trace = predef::trace(trace);    if (err) {    handle_error (err);    ret = 10;    }    if(!intp(ret))