Roxen.git / server / base_server / module_support.pike

version» Context lines:

Roxen.git/server/base_server/module_support.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2009, Roxen IS. - // $Id: module_support.pike,v 1.148 2011/12/28 18:29:37 mast Exp $ + // $Id$      #define IN_ROXEN   #include <roxen.h>   #include <module_constants.h>   #include <stat.h>      protected int got_java_flag = 0; // 1: yes, -1: no, 0: unknown.      int got_java()   //! @appears roxen.got_java
Roxen.git/server/base_server/module_support.pike:601:    dir + file, strerror (f->errno()));    else if( (f->read( 4 ) != "#!NO" ) )    files[dir + file] = 1;    }    }    }    }       int find_module( string sn )    { -  foreach( roxenp()->query( "ModuleDirs" ), string dir ) { +  foreach( roxenp()->query( "ModuleDirs" ) + roxenloader.package_module_path, +  string dir ) {    dir = roxen_path (dir);    multiset(string) files = (<>);    rec_find_module_files (sn, dir, files);    if (sizeof (files)) {    if (sizeof (files) > 1 &&    check_ambiguous_module (sn, indices (files)))    return 0;    else    return init_module (Multiset.Iterator (files)->index());    }
Roxen.git/server/base_server/module_support.pike:768:    report_debug("Searching for roxen modules ... \b");    t = gethrtime();    if( !modules )    {    modules = ([]);    module_cache = roxenp()->ConfigIFCache( "modules" );    }       array(string) possible = ({});    -  foreach( roxenp()->query( "ModuleDirs" ), string dir ) { +  foreach( roxenp()->query( "ModuleDirs" ) + roxenloader.package_module_path, +  string dir ) {    dir = roxen_path (dir);    mapping(string:string) module_files = ([]);    rec_find_all_modules( dir, module_files );       array(string) module_names = Array.uniq (values (module_files));    if (sizeof (module_names) < sizeof (module_files)) {    mapping(string:array(string)) inv = ([]);    foreach (module_files; string file; string name)    inv[name] += ({file});    foreach (inv; string name; array(string) files)
Roxen.git/server/base_server/module_support.pike:815:    foreach( get_dir( dir )||({}), string s )    if( (st = file_stat( combine_path( dir, s ) )) && st->isdir )    if( s == "pike-modules" )    res += ({ dir+"/pike-modules" });    else if( s != "CVS" )    res += recurse( combine_path( dir, s ) );    return res;    };       all_pike_module_cache = ({}); -  foreach( roxenp()->query( "ModuleDirs" ), string dir ) +  foreach( roxenp()->query( "ModuleDirs" ) + roxenloader.package_module_path, +  string dir )    all_pike_module_cache += recurse( roxen_path (dir) );    return all_pike_module_cache;   }      // List of modules that have been renamed   protected constant module_aliases = ([    "whitespace_sucker":"whitespace_remover",   ]);      ModuleInfo find_module( string name, int|void noforce )