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.232 2002/11/28 22:03:49 nilsson Exp $ + // $Id: master.pike.in,v 1.233 2002/11/29 11:09:39 grubba 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:1160:      object findmodule(string fullname, object|void handler)   {    object o;   #ifdef MODULE_TRACE    werror("%*nfindmodule(%O)\n",sizeof(backtrace()),fullname);   #endif    if(!zero_type(o=fc[fullname]))    {   // werror("fc[%O] -> %O\n",fullname, o); +  if (o == 0) return UNDEFINED;    return o;    }       if(Stat stat=master_file_stat(fakeroot(fullname+".pmod")))    {    if(stat[1]==-2)    return dirnode(fullname+".pmod", handler);    }       if(o = low_cast_to_object(fullname+".pmod", "/.", handler))
pike.git/lib/master.pike.in:1365:    mixed resolv_base(string identifier, string|void current_file,    object|void current_handler)    {   // werror("Resolv_base(%O)\n",identifier);    array(mixed) tmp = ({});    string dir=current_file ? dirname(current_file) : "/";       foreach(pike_module_path, string path)    {    string file=combine_path(dir, path, identifier); -  if(mixed ret=findmodule(file, current_handler)) { +  mixed ret; +  if(!zero_type(ret=findmodule(file, current_handler))) {    if ((objectp(ret)) &&    (ret->is_resolv_dirnode || ret->is_resolv_joinnode)) {    if (mixed new_ret = ret->_module_value) {    ret = new_ret;    }    tmp += ({ ret });    } else {    if (mixed new_ret = ret->_module_value) {    ret = new_ret;    }
pike.git/lib/master.pike.in:1436:    if (ret == ZERO_TYPE)    werror("Resolv(%O, %O) => not found (cached)\n",identifier, current_file);    else    werror("Resolv(%O, %O) => found %O (cached)\n",identifier, current_file, ret);   #endif /* RESOLV_DEBUG */    return ret == ZERO_TYPE ? UNDEFINED : ret;    }       array(string) tmp=identifier/".";    ret=resolv_base(tmp[0], current_file, current_handler); -  foreach(tmp[1..],string index) ret=ret[index]; +  foreach(tmp[1..],string index) { +  if (zero_type(ret)) break; +  ret=ret[index]; +  }    resolv_cache[id] = zero_type (ret) ? ZERO_TYPE : ret;   #ifdef RESOLV_DEBUG    if (zero_type (ret))    werror("Resolv(%O, %O) => not found\n",identifier, current_file);    else    werror("Resolv(%O, %O) => found %O\n",identifier, current_file, ret);   #endif /* RESOLV_DEBUG */    return ret;    }