pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1156:   }      //! Compile the Pike code in the string @[source] into a program.   //! 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, + program compile_string(string source, string filename="-",    object|void handler,    void|program p,    void|object o,    void|int _show_if_constant_errors)   {   #ifdef RECUR_COMPILE_DEBUG    werror ("%*s>>> compile_string %O\n", GET_MSG_DEPTH, "", filename);    INC_MSG_DEPTH();   #endif -  string code = cpp(source, filename||"-", 1, handler, +  string code = cpp(source, filename, 1, handler,    compat_major, compat_minor,    (undefinedp(_show_if_constant_errors)?    show_if_constant_errors:    _show_if_constant_errors));    program ret;    if(code)    ret = compile(code,    handler,    compat_major,    compat_minor,
pike.git/lib/master.pike.in:3559:    //! @param path    //! a string containing a path to search for Pike modules. May be a    //! directory, or a path to a ZIP archive. If a ZIP archive path is    //! provided, modules will be loaded from a directory, "modules" within    //! the ZIP archive (see the subpath argument).    //!    //! @param subpath    //! if path is a ZIP archive, this argument will determine the path within    //! the archive to be searched.    //! -  void add_module_path(string path, string|void subpath) +  void add_module_path(string path, string subpath="modules")    {    path=normalize_path(combine_path_with_cwd(path));       object s = file_stat(path);    if(s && s->isreg)    {    object fs;    catch(fs = resolv("Filesystem.Zip")(path));    if(fs) add_filesystem_handler(path, fs); -  if(!subpath) subpath = "modules"; +     path = combine_path(path, subpath);    }       root_module->add_path(path);    pike_module_path = ({ path }) + (pike_module_path - ({ path }));    }       //! Remove a directory to search for modules.    //!    //! This function performs the reverse operation of @[add_module_path()].
pike.git/lib/master.pike.in:4987:    }    }    }       return ret;    }   }         string program_path_to_name ( string path, -  void|string module_prefix, -  void|string module_suffix, -  void|string object_suffix ) +  string module_prefix="", +  string module_suffix="", +  string object_suffix="" )   //! Converts a module path on the form @expr{"Foo.pmod/Bar.pmod"@} or   //! @expr{"/path/to/pike/lib/modules/Foo.pmod/Bar.pmod"@} to a module   //! identifier on the form @expr{"Foo.Bar"@}.   //!   //! If @[module_prefix] or @[module_suffix] are given, they are   //! prepended and appended, respectively, to the returned string if   //! it's a module file (i.e. ends with @expr{".pmod"@} or   //! @expr{".so"@}). If @[object_suffix] is given, it's appended to the   //! returned string if it's an object file (i.e. ends with   //! @expr{".pike"@}).
pike.git/lib/master.pike.in:5058:    // /mast    path = trim_file_name(path);   #endif       string modname = replace(path, ".pmod/", ".");    if(search(modname, "/")<0) path=modname;       path = prefix + path;       if (has_suffix(path, ".module.pmod")) { -  return (module_prefix || "") + path[..<12] + (module_suffix || ""); +  return module_prefix + path[..<12] + module_suffix;    }    if (has_suffix(path, ".pmod")) { -  return (module_prefix || "") + path[..<5] + (module_suffix || ""); +  return module_prefix + path[..<5] + module_suffix;    }    if (has_suffix(path, ".so")) { -  return (module_prefix || "") + path[..<3] + (module_suffix || ""); +  return module_prefix + path[..<3] + module_suffix;    }    if (has_suffix(path, ".pike")) { -  return path[..<5] + (object_suffix || ""); +  return path[..<5] + object_suffix;    } -  return path + (object_suffix || ""); +  return path + object_suffix;   }         //! Describe the path to the module @[mod].   //!   //! @param mod   //! If @[mod] is a program, attempt to describe the path   //! to a clone of @[mod].   //!   //! @param ret_obj