pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1:   // -*- Pike -*-   //   // Master Control Program for Pike.   //   // This file is part of Pike. For copyright information see COPYRIGHT.   // Pike is distributed under GPL, LGPL and MPL. See the file COPYING   // for more information.   // - // $Id: master.pike.in,v 1.241 2003/02/26 16:35:09 mast Exp $ + // $Id: master.pike.in,v 1.242 2003/03/20 18:02:57 mast Exp $      #pike __REAL_VERSION__      // Some programs destroys character pairs beginning with the currency   // symbol when running in chinese locale.   #if "ยค/" != "\244/"   #error "master.pike.in is corrupted."   #endif      // --- Some configurable parameters
pike.git/lib/master.pike.in:1811:    case "showpaths":    werror(format_paths());    exit(0);       case "execute":    random_seed(time() ^ (getpid()<<8));    argv = tmp->get_args(argv,1);   #ifdef __AUTO_BIGNUM__    main_resolv( "Gmp", "bignum" );   #endif /* __AUTO_BIGNUM__ */ -  if(trace) predef::trace(trace); +  +  program prog =    compile_string("mixed create(int argc, array(string) argv,array(string) env){"+ -  opts[1]+";}")(sizeof(argv),argv,env); +  opts[1]+";}"); +  + #if constant(_debug) +  if(debug) _debug(debug); + #endif +  if(trace) predef::trace(trace); +  mixed err = catch { +  // One reason for this catch is to get a new call to +  // eval_instruction in interpret.c so that the debug and +  // trace levels set above take effect in the bytecode +  // evaluator. +  prog(sizeof(argv),argv,env); +  }; +  if(trace) predef::trace(0); +  if (err) { +  handle_error (err); +  exit (10); +  }    exit(0);       case "preprocess":   #ifdef __AUTO_BIGNUM__    main_resolv( "Gmp", "bignum" );   #endif /* __AUTO_BIGNUM__ */    _static_modules.files()->_stdout->write(cpp(master_read_file(opts[1]),    opts[1]));    exit(0);    }
pike.git/lib/master.pike.in:1896:    };       if (err)    _error( "Pike: Failed to compile script:\n"    "%s\n", stringp(err[0])?err[0]:describe_backtrace(err) );    }       if(!prog)    _error("Pike: Couldn't find script to execute\n(%O)\n", argv[0]);    -  object script=prog(); -  +    #if constant(_debug)    if(debug) _debug(debug);   #endif -  +  if(trace) predef::trace(trace);    -  +  mixed err = catch { +  // The main reason for this catch is actually to get a new call +  // to eval_instruction in interpret.c so that the debug and +  // trace levels set above take effect in the bytecode evaluator. +  object script=prog();    if(!script->main)    _error("Error: %s has no main().\n", argv[0]); -  -  if(trace) predef::trace(trace); +     i=script->main(sizeof(argv),argv,env); -  +  }; +  if(trace) predef::trace(0); +  if (err) { +  handle_error (err); +  i = 10; +  }    if(i >=0) exit(i);    _async=1;       while(1)    {    mixed err=catch    {    while(1)    _static_modules.Builtin.__backend(3600.0);    };