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.446 2008/06/28 17:14:27 nilsson Exp $ + // $Id: master.pike.in,v 1.447 2008/06/29 10:49:16 nilsson Exp $      #pike __REAL_VERSION__   //#pragma strict_types      // Some programs destroys character pairs beginning with the currency   // symbol when running in chinese locale.   #if "¤/" != "\244/"   #error "master.pike.in is corrupted."   #endif   
pike.git/lib/master.pike.in:3261:    ({"dumpversion", NO_ARG, ({"--dumpversion"}), 0, 0}),    ({"help", MAY_HAVE_ARG, ({"-h", "--help"}), 0, 0}),    ({"features", NO_ARG, ({"--features"}), 0, 0}),    ({"info", NO_ARG, ({"--info"}), 0, 0}),    ({"execute", HAS_ARG, ({"-e", "--execute"}), 0, 0}),    ({"debug_without", HAS_ARG, ({"--debug-without"}), 0, 0}),    ({"preprocess", HAS_ARG, ({"-E", "--preprocess"}), 0, 0}),    ({"modpath", HAS_ARG, ({"-M", "--module-path"}), 0, 0}),    ({"ipath", HAS_ARG, ({"-I", "--include-path"}), 0, 0}),    ({"ppath", HAS_ARG, ({"-P", "--program-path"}), 0, 0}), -  ({"showpaths", NO_ARG, ({"--show-paths"}), 0, 0}), +  ({"showpaths", MAY_HAVE_ARG, ({"--show-paths"}), 0, 0}),    ({"warnings", NO_ARG, ({"-w", "--warnings"}), 0, 0}),    ({"nowarnings", NO_ARG, ({"-W", "--woff", "--no-warnings"}), 0, 0}),    ({"autoreload", NO_ARG, ({"--autoreload"}), 0, 0}),    ({"master", HAS_ARG, ({"-m"}), 0, 0}),    ({"compiler_trace", NO_ARG, ({"--compiler-trace"}), 0, 0}),    ({"assembler_debug",MAY_HAVE_ARG, ({"--assembler-debug"}), 0, 0}),    ({"optimizer_debug",MAY_HAVE_ARG, ({"--optimizer-debug"}), 0, 0}),    ({"debug", MAY_HAVE_ARG, ({"--debug"}), 0, 1}),    ({"trace", MAY_HAVE_ARG, ({"--trace"}), 0, 1}),    ({"ignore", MAY_HAVE_ARG, ({"-Dqdatplr"}), 0, 1}),
pike.git/lib/master.pike.in:3406:       foreach(q, array opts)    {    switch(opts[0])    {    case "dumpversion":    write("%d.%d.%d\n", __REAL_MAJOR__, __REAL_MINOR__, __REAL_BUILD__);    exit(0);       case "version": -  werror(version() + " Copyright © 1994-2008 Linköping University\n" +  exit(0, version() + " Copyright © 1994-2008 Linköping University\n"    "Pike comes with ABSOLUTELY NO WARRANTY; This is free software and you are\n"    "welcome to redistribute it under certain conditions; read the files\n"    "COPYING and COPYRIGHT in the Pike distribution for more details.\n"); -  exit(0); +        case "help": -  werror( main_resolv("Tools.MasterHelp")->do_help(opts[1]) ); -  exit(0); +  exit( 0, main_resolv("Tools.MasterHelp")->do_help(opts[1]) );       case "features":    postparseaction="features";    break;       case "info":    postparseaction="info";    break;       case "showpaths": -  werror(format_paths()); +  if( stringp(opts[1]) ) +  { +  switch(opts[1]) +  { +  case "master": +  write( (_master_file_name || __FILE__)+"\n" ); +  break; +  +  case "module": +  write( (pike_module_path * ":")+"\n" ); +  break; +  +  case "include": +  write( (pike_include_path * ":")+"\n" ); +  break; +  +  case "program": +  write( (pike_program_path * ":")+"\n" ); +  break; +  +  default: +  exit(1, "Unknown path type %s\n", opts[1]); +  }    exit(0); -  +  }    -  +  exit(0, format_paths()); +     case "execute":   #ifdef __AUTO_BIGNUM__    main_resolv( "Gmp.bignum" );   #endif /* __AUTO_BIGNUM__ */       random_seed((time() ^ (getpid()<<8)));    argv = tmp->get_args(argv,1);       program prog;    mixed compile_err = catch {;
pike.git/lib/master.pike.in:3465:    prog = compile_string(    "#define NOT(X) !(X)\n"    "mixed run(int argc, array(string) argv){" + code + ";}");    }    };       if (compile_err) {    if (compile_err->is_cpp_or_compilation_error) {    // Don't clutter the output with the backtrace for    // compilation errors. -  werror (describe_error (compile_err)); -  exit (20); +  exit (20, describe_error (compile_err));    }    else throw (compile_err);    }      #if constant(_debug)    if(debug) _debug(debug);   #endif    if(trace) trace = predef::trace(trace);    mixed ret;    mixed err = catch {
pike.git/lib/master.pike.in:3653:    ret=script->main(sizeof(argv),argv,getenv());    else    ret=script->main(sizeof(argv),argv);    };    // Disable tracing.    trace = predef::trace(trace);    if (err) {    handle_error (err);    ret = 10;    } -  if(!intp(ret)) { -  werror("Error: Non-integer value %O returned from main.\n", ret); -  exit(10); -  } +  if(!intp(ret)) +  exit(10, "Error: Non-integer value %O returned from main.\n", ret); +     if(ret >=0) exit([int]ret);    _async=1;       // Reenable tracing.    trace = predef::trace(trace);    while(1)    {    mixed err=catch    {    while(1)