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.   //      #pike __REAL_VERSION__ + //#charset iso-8859-1 // hardcoded, can not be changed   //#pragma strict_types   #pragma dynamic_dot      //! @appears predef::MasterObject   //!   //! Master control program for Pike.   //!   //! @seealso   //! @[predef::master()], @[predef::replace_master()]   
pike.git/lib/master.pike.in:2142:   // than the enum type (aka int(1..1))   //   // doing the add_constant on the typeof directly gives int(1..1)   // instead, since the same "optimization" of the type is done in that   // case.    add_constant("bool", typeof([int(0..1)](mixed)0));       add_constant("__dirnode", dirnode);    add_constant("__joinnode", joinnode);    +  werror = locale_werror;    add_constant("write", write);    add_constant("werror", werror);    // To make it possible to overload get_dir and file_stat later on.    // It's not possible to replace efuns with normal functions in .o-files       add_constant("get_dir", high_master_get_dir );    add_constant("file_stat", lambda( string f, int|void d ) { return file_stat(f,d);} );       object rnd = Builtin.RandomSystem();    add_constant("random", rnd->random);
pike.git/lib/master.pike.in:3604:   //! @endnamespace      //! These are useful if you want to start other Pike processes   //! with the same options as this one was started with.   string _pike_file_name;   string _master_file_name;      // Gets set to 1 if we're in async-mode (script->main() returned <0)   private int(0..1) _async=0;    - //! Returns 1 if we´re in async-mode, e.g. if the main method has + //! Returns 1 if we're in async-mode, e.g. if the main method has   //! returned a negative number.   int(0..1) asyncp() {    return _async;   }      #if constant(thread_create)   // this must be done in __init if someone inherits the master   protected object _backend_thread=this_thread();      //! The backend_thread() function is useful to determine if you are
pike.git/lib/master.pike.in:3885:       foreach(q, array opts)    {    switch(opts[0])    {    case "dumpversion":    write("%d.%d.%d\n", __REAL_MAJOR__, __REAL_MINOR__, __REAL_BUILD__);    exit(0);       case "version": -  exit(0, string_to_utf8(version() + " Copyright © 1994-2018 Linköping University\n" +  exit(0, version() + " Copyright © 1994-2018 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")); +  "COPYING and COPYRIGHT in the Pike distribution for more details.\n");       case "help":    exit( 0, main_resolv("Tools.MasterHelp")->do_help(opts[1]) );       case "features":    postparseaction="features";    break;       case "info":    postparseaction="info";
pike.git/lib/master.pike.in:6152:   //!   //! @seealso   //! @[get_compilation_handler()], @[master()]   object get_compat_master(int major, int minor)   {    if ((major < 8) || ((major == 8) && (minor < 1)))    return Pike_8_0_master::get_compat_master(major, minor);    // 8.1 and later.    return this;   } +  + private function locale_werror_cache; + protected void locale_werror(mixed ... args) + { +  function werror = locale_werror_cache; +  if (!werror) { +  catch { +  object stderr = main_resolv( "Stdio.FILE" )( "stderr", "w" ); +  stderr->set_charset( 0 ); +  werror = stderr->write; +  if (werror && !locale_werror_cache) +  locale_werror_cache = werror; +  }; +  if (!werror) +  werror = Files()->_stderr->write; +  } +  werror(@args); + }