pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:432:      //! Namespaces for compat masters.   //!   //! This inherit is used to provide compatibility namespaces   //! for @[get_compat_master()].   //!   //! @seealso   //! @[get_compat_master()]   protected inherit Pike_8_0_master;    + //! @namespace predef:: +    //! Throws an error. A more readable version of the code   //! @expr{throw( ({ sprintf(f, @@args), backtrace() }) )@}.   void error(sprintf_format f, sprintf_args ... args) {    if (sizeof(args)) f = sprintf(f, @args);    throw( ({ f, backtrace()[..<1] }) );   }      // FIXME: Should the pikeroot-things be private?   #ifdef PIKE_FAKEROOT   object o;
pike.git/lib/master.pike.in:658:    o);    if (source_cache)    source_cache[ret] = source;   #ifdef RECUR_COMPILE_DEBUG    DEC_MSG_DEPTH();    werror ("%*s<<< compile_string %O\n", GET_MSG_DEPTH, "", filename);   #endif    return ret;   }    + //! @endnamespace +    //! Read a file from the master filesystem.   //!   //! The master filesystem defaults to the system filesystem,   //! but additional mountpoints may be added via   //! @[add_filesystem_handler()].   //!   //! All file I/O performed by the @[MasterObject] is performed   //! via this function and its related functions.   //!   //! @seealso
pike.git/lib/master.pike.in:863:      #ifdef __NT__   protected void set_lc_env (mapping(string:string) env)   {    environment = ([]);    foreach (env; string var; string val)    environment[lower_case (var)] = val;   }   #endif    + //! @namespace predef:: +    //! @decl mapping(string:string) getenv (void|int force_update)   //!   //! Queries the environment variables.   //!   //! @param force_update   //! A cached copy of the real environment is kept to make this   //! function quicker. If the optional flag @[force_update] is nonzero   //! then the real environment is queried and the cache is updated from   //! it. That can be necessary if the environment changes through other   //! means than @[putenv], typically from a C-level library.
pike.git/lib/master.pike.in:1031:   //! adviced to use @[System.normalize_path] instead.   string normalize_path( string path )   {   #ifndef __NT__    return path;   #else    return replace(path,"\\","/");   #endif   }    + //! @endnamespace +    //! Mapping containing the cache of currently compiled files.   //!   //! This mapping currently has the following structure:   //! @mapping   //! @member program filename   //! @endmapping   //! The filename path separator is / on both NT and UNIX.   //!   //! @note   //! Special cases: The current master program is available under the
pike.git/lib/master.pike.in:1771:      //! Prefix for autodoc files.   string doc_prefix;      //! Flags suitable for use when compiling Pike C modules   string cflags;      //! Flags suitable for use when linking Pike C modules   string ldflags; // Not yet used    + //! @namespace predef:: + //! + //! This is the default namespace and contains lots of global symbols. +    //! Boolean datatype.   enum bool { false=0, true=1 };      //! @decl int write(string fmt, mixed ... args)   //! Writes a string on stdout. Works just like @[Stdio.File.write]   //! on @[Stdio.stdout].      //! @decl int werror(string fmt, mixed ... args)   //! Writes a string on stderr. Works just like @[Stdio.File.write]   //! on @[Stdio.stderr].
pike.git/lib/master.pike.in:1882:    // for use with embedded interpreters    // add path for architecture-dependant files    add_include_path(__embedded_resource_directory + "/lib/include");    add_module_path(__embedded_resource_directory + "/lib/modules");    add_module_path(__embedded_resource_directory + "/" + replace(uname()->machine, " ", "_") + "/modules");      #endif    system_module_path=pike_module_path;   }    + //! @endnamespace +    //! This function is called whenever a inherit is called for.   //! It is supposed to return the program to inherit.   //! The first argument is the argument given to inherit, and the second   //! is the file name of the program currently compiling. Note that the   //! file name can be changed with #line, or set by compile_string, so   //! it can not be 100% trusted to be a filename.   //! previous_object(), can be virtually anything in this function, as it   //! is called from the compiler.   program handle_inherit(string pname, string current_file, object|void handler)   {
pike.git/lib/master.pike.in:3192:    }       protected string _sprintf(int t)    {    return t=='O' && sprintf("CompatResolver(%O)",ver);    }   }      inherit CompatResolver;    + //! @namespace predef:: +    //! @class __dirnode      //! @decl inherit MasterObject.dirnode      //! @endclass      //! @class __joinnode      //! @decl inherit MasterObject.joinnode   
pike.git/lib/master.pike.in:3272:      //! @decl void remove_program_path(string tmp)   //! Remove a directory to search for programs.   //!   //! This function performs the reverse operation of @[add_program_path()].   //!   //! @seealso   //! @[add_program_path()]   //!    + //! @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   //! returned a negative number.
pike.git/lib/master.pike.in:4509:    return s+"->"+name;    }    return name;   }      /* It is possible that this should be a real efun,    * it is currently used by handle_error to convert a backtrace to a    * readable message.    */    + //! @namespace predef:: +    //! Return a readable message that describes where the backtrace   //! @[trace] was made (by @[backtrace]).   //!   //! It may also be an error object or array (typically caught by a   //! @[catch]), in which case the error message also is included in the   //! description.   //!   //! Pass @[linewidth] -1 to disable wrapping of the output.   //!   //! @seealso
pike.git/lib/master.pike.in:4835:    else if (arrayp(err) && sizeof([array]err)==2 &&    (!(bt = ([array]err)[1]) || arrayp (bt)))    {}       else if (err)    error ("Invalid error container: %O\n", err);       return bt;   }    + //! @endnamespace +    void thread_quanta_exceeded(object thread, int ns)   {    werror("Thread quanta exceeded for %O (%d ns):\n"    "%s\n",    thread, ns,    describe_backtrace(thread->backtrace()));   }         #ifdef ENCODE_DEBUG