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.367 2004/12/08 15:02:08 mast Exp $ + // $Id: master.pike.in,v 1.368 2004/12/26 01:06:18 per 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:387:    return combine_path(IS_ABSOLUTE_PATH(paths[0])?"":getcwd(),@paths);   }      #ifdef FILE_STAT_CACHE      #define FILE_STAT_CACHE_TIME 20      int invalidate_time;   mapping(string:multiset(string)) dir_cache = ([]);    +  + array(string) master_get_dir( string x ) + { +  return get_dir( x ); + } +    Stat master_file_stat(string x)   {    string dir = combine_path_with_cwd(x);    string file = BASENAME(dir);    dir = dirname(dir);       if(time() > invalidate_time)    {    dir_cache = ([]);    invalidate_time = time()+FILE_STAT_CACHE_TIME;    }       multiset(string) d = dir_cache[dir];    if( zero_type(d) )    { -  array(string) tmp = get_dir(dir); +  array(string) tmp = master_get_dir(dir);    if(tmp)    {   #ifdef __NT__    tmp = map(tmp, lower_case);   #endif    d = dir_cache[dir] = aggregate_multiset(@tmp);    }    else    dir_cache[dir]=0;    }
pike.git/lib/master.pike.in:1235:       static void create(string d, object|void h)    {    resolv_debug ("dirnode(%O,%O) created\n",d,h);    dirname=d;    compilation_handler=h;    fc[dirname]=this;    if(has_suffix(FIX_CASE(dirname),".pmod")) {    fc[dirname[..<5]]=this;    } -  array(string) files = sort(get_dir(d)||({})); +  array(string) files = sort(master_get_dir(d)||({}));    if (!sizeof(d)) return;    array(string) bases = map(files, base_from_filename);    files = filter(files, bases);    bases = filter(bases, bases);    resolv_debug("dirnode(%O,%O) got %d files.\n",    d, h, sizeof(bases));    if (!sizeof(files)) return;       foreach(files; int no; string fname) {    fname = combine_path(dirname, fname);
pike.git/lib/master.pike.in:4359:    }       CompatResolver ret;       if(!zero_type(ret=compat_handler_cache[v])) return ret;       array(string) files;    array(Version) available=({});      #if "¤share_prefix¤"[0]!='¤' -  if (!(files = get_dir("¤share_prefix¤"))) { +  if (!(files = master_get_dir("¤share_prefix¤"))) {    werror ("Error listing directory %O: %s\n",    "¤share_prefix¤", strerror (errno()));    files = ({});    }    foreach(files, string ver)    {    if(sscanf(ver,"%d.%d",int maj, int min))    {    Version x=Version(maj, min) ;    if(x >= v)    available|=({ x });    }    }   #endif      #if "¤lib_prefix¤"[0]!='¤' -  if (!(files = get_dir("¤lib_prefix¤"))) { +  if (!(files = master_get_dir("¤lib_prefix¤"))) {    werror ("Error listing directory %O: %s\n",    "¤lib_prefix¤", strerror (errno()));    files = ({});    }    foreach(files, string ver)    {    if(sscanf(ver,"%d.%d",int maj, int min))    {    Version x=Version(maj, min) ;    if(x >= v)