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.350 2004/06/17 16:01:40 mast Exp $ + // $Id: master.pike.in,v 1.351 2004/06/27 14:11:40 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:74:      //! If not zero compilation warnings will be written out on stderr.   int want_warnings = PIKE_WARNINGS;      //!   int compat_major=-1;      //!   int compat_minor=-1;    + //! + int show_if_constant_errors = 0;      // --- Functions begin here.      // Have to access some stuff without going through the resolver.   private constant Builtin = _static_modules.Builtin;   private constant Files = _static_modules.files;      #define Stat Files.Stat   #define capitalize(X) (upper_case((X)[..0])+(X)[1..])   #define write(X ...) (Files()->_stdout->write(X))
pike.git/lib/master.pike.in:334:   //! If @[filename] is not specified, it will default to @expr{"-"@}.   //!   //! Functionally equal to @expr{@[compile](@[cpp](@[source], @[filename]))@}.   //!   //! @seealso   //! @[compile()], @[cpp()], @[compile_file()]   //!   program compile_string(string source, void|string filename,    object|void handler,    void|program p, -  void|object o) +  void|object o, +  void|int _show_if_constant_errors)   {    return compile(cpp(source, filename||"-", 1, handler, -  compat_major, compat_minor), +  compat_major, compat_minor, +  (zero_type(_show_if_constant_errors)? +  show_if_constant_errors: +  _show_if_constant_errors)),    handler,    compat_major,    compat_minor,    p,    o);   }      //!   string master_read_file(string file)   {
pike.git/lib/master.pike.in:2361:    ({"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}),    ({"ignore", HAS_ARG, ({"-s"}), 0, 0}),    ({"run_tool", NO_ARG, ({"-x"}), 0, 0}), +  ({"show_cpp_warn", NO_ARG, ({"--show-all-cpp-warnings"}), 0, 0}),    }), 1);       /* Parse -M and -I backwards */    for(int i=sizeof(q)-1; i>=0; i--)    {    switch(q[i][0])    {    case "compat_version":    sscanf(q[i][1],"%d.%d",compat_major,compat_minor);    break;
pike.git/lib/master.pike.in:2459:    want_warnings--;    break;       case "master":    _master_file_name = q[i][1];    break;       case "run_tool":    run_tool = 1;    break; +  +  case "show_cpp_warn": +  show_if_constant_errors = 1; +  break;    }    }       foreach(q, array opts)    {    switch(opts[0])    {    case "dumpversion":    write("%d.%d.%d\n", __REAL_MAJOR__, __REAL_MINOR__, __REAL_BUILD__);    exit(0);
pike.git/lib/master.pike.in:2628:    stringp(err[0])?err[0]:describe_backtrace(err) );       argv[0] = search(programs, prog) || argv[0];    } else {    argv[0]=combine_path_with_cwd(argv[0]);       mixed err = catch {    prog=(program)argv[0];    };    -  if (err) +  if (err) { +  if( !file_stat(argv[0]) ) +  exit(1, "Could not find file %O.\n", argv[0]); +  if( !file_stat(argv[0])->isreg ) +  exit(1, "File %O is not a regular file.\n", argv[0]);    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]);      #if constant(_debug)    if(debug) _debug(debug);   #endif    if(trace) trace = predef::trace(trace);    mixed ret;    mixed err = catch {