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.355 2004/07/04 16:28:23 srb Exp $ + // $Id: master.pike.in,v 1.356 2004/07/04 17:23:02 srb 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:85:   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)) +    #define trim_all_whites(X) (Builtin()->string_trim_all_whites (X))    - //! @appears void werror(string msg, mixed ... args) - //! - //! Write to standard error. - //! - void werror(mixed ... args) { -  _werror(@args); - } + private function write = Files()->_stdout->write; + private function werror = Files()->_stderr->write;      #ifdef RESOLV_DEBUG      #if constant (thread_local)   static object resolv_msg_depth = thread_local();   // NOTE: May be used before __INIT has completed.   #define GET_RESOLV_MSG_DEPTH (resolv_msg_depth && resolv_msg_depth->get())   #define INC_RESOLV_MSG_DEPTH() (resolv_msg_depth && resolv_msg_depth->set (resolv_msg_depth->get() + 1))   #define DEC_RESOLV_MSG_DEPTH() (resolv_msg_depth && resolv_msg_depth->set (resolv_msg_depth->get() - 1))   #else
pike.git/lib/master.pike.in:1059:    "add_module_path",    "remove_module_path",    "add_program_path",    "remove_program_path",    "describe_backtrace",    "describe_error",    "get_backtrace",    "normalize_path",    "getenv",    "putenv", -  "werror", +       #ifdef GETCWD_CACHE    "cd",    "getcwd",   #endif   });      string include_prefix;         //! @decl int strlen(string|multiset|array|mapping|object thing)   //! @appears strlen   //! Alias for @[sizeof].   //! @deprecated sizeof      //! @decl int write(string fmt, mixed ... args)   //! @appears write   //! Writes a string on stdout. Works just like @[Stdio.File.write]   //! on @[Stdio.stdout].    -  + //! @decl int werror(string fmt, mixed ... args) + //! @appears werror + //! Writes a string on stderr. Works just like @[Stdio.File.write] + //! on @[Stdio.stderr]. +    /* Note that create is called before add_precompiled_program    */   static void create()   {    foreach(master_efuns, string e)    if (this[e])    add_constant(e, this[e]);    else    error("Function %O is missing from master.pike.\n", e);       add_constant("strlen", sizeof); -  add_constant("write", Files()->_stdout->write); +  add_constant("write", write); +  add_constant("werror", werror);      #define CO(X) add_constant(#X,Builtin.__backend->X)    CO(call_out);    CO(_do_call_outs);    CO(find_call_out);    CO(remove_call_out);    CO(call_out_info);      #if "¤share_prefix¤"[0]!='¤'    // add path for architecture-independant files