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.248 2003/05/19 12:09:37 mast Exp $ + // $Id: master.pike.in,v 1.249 2003/08/18 12:43:49 tomas Exp $      #pike __REAL_VERSION__      // Some programs destroys character pairs beginning with the currency   // symbol when running in chinese locale.   #if "ยค/" != "\244/"   #error "master.pike.in is corrupted."   #endif      // --- Some configurable parameters
pike.git/lib/master.pike.in:1228:    tmp=EXPLODE_PATH(current_file);    tmp[-1]=what;    path=combine_path_with_cwd( tmp*"/");    } else {    path = combine_path_with_cwd(what);    }   #ifdef MODULE_TRACE    werror("%*nhandle_import(%O, %O, %O)\n",    sizeof(backtrace()), what, current_file, handler);   #endif /* MODULE_TRACE */ +  if (!handler && fc[path]) return fc[path]; + #ifdef PIKE_MODULE_RELOC +  if (has_prefix(path+"/", "/${PIKE_MODULE_PATH}/")) { +  string tmp = path[21..]; +  array(mixed) dirnodes = ({}); +  foreach(pike_module_path, string path) { +  string s2 = fakeroot(sizeof(tmp)? combine_path(path, tmp) : path); +  if(master_file_stat(s2)) { +  dirnodes += ({ handler?dirnode(s2, handler):dirnode(s2) }); +  } +  } +  if (sizeof(dirnodes) > 1) { +  if (!handler) return fc[path] = joinnode(dirnodes); +  return joinnode(dirnodes); +  } +  if (sizeof(dirnodes)) { +  if (!handler) return fc[path] = dirnodes[0]; +  return dirnodes[0]; +  } +  return UNDEFINED; +  } + #endif    if (handler) { -  return dirnode(path, handler); +  return dirnode(fakeroot(path), handler);    }    if(fc[path]) return fc[path]; -  return dirnode(path); +  return dirnode(fakeroot(path));   }            multiset no_resolv = (<>);      //!   class CompatResolver   {    array(string) pike_include_path=({});