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.262 2003/03/20 18:00:36 mast Exp $ + // $Id: master.pike.in,v 1.263 2003/03/27 02:32:04 mast 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:64:   //!   int compat_minor=-1;         // --- Functions begin here.      #define Stat _static_modules.files.Stat   #define capitalize(X) (upper_case((X)[..0])+(X)[1..])   #define write(X) _static_modules.files()->_stdout->write(X)    + #ifdef RESOLV_DEBUG +  + #if constant (thread_local) + static object resolv_msg_depth = thread_local(); + #define GET_RESOLV_MSG_DEPTH (resolv_msg_depth->get()) + #define INC_RESOLV_MSG_DEPTH() (resolv_msg_depth->set (resolv_msg_depth->get() + 1)) + #define DEC_RESOLV_MSG_DEPTH() (resolv_msg_depth->set (resolv_msg_depth->get() - 1)) + #else + static int resolv_msg_depth; + #define GET_RESOLV_MSG_DEPTH resolv_msg_depth + #define INC_RESOLV_MSG_DEPTH() (++resolv_msg_depth) + #define DEC_RESOLV_MSG_DEPTH() (--resolv_msg_depth) + #endif +  + void resolv_debug (string fmt, mixed... args) + { +  string pad = " " * GET_RESOLV_MSG_DEPTH; +  if (sizeof (args)) fmt = sprintf (fmt, @args); +  if (fmt[-1] == '\n') +  fmt = pad + replace (fmt[..sizeof (fmt) - 2], "\n", "\n" + pad) + "\n"; +  else +  fmt = pad + replace (fmt, "\n", "\n" + pad); +  werror (fmt); + } +  + #else // !RESOLV_DEBUG + #define INC_RESOLV_MSG_DEPTH() 0 + #define DEC_RESOLV_MSG_DEPTH() 0 + #define resolv_debug(X...) do {} while (0) + #endif // !RESOLV_DEBUG +    //! @appears error   //! Throws an error. A more readable version of the code   //! @tt{throw( ({ sprintf(f, @@args), backtrace() }) )@}.   void error(string f, mixed ... args) {    array b = backtrace();    if (sizeof(args)) f = sprintf(f, @args);    throw( ({ f, b[..sizeof(b)-2] }) );   }      // FIXME: Should the pikeroot-things be private?
pike.git/lib/master.pike.in:523:      #ifdef PIKE_MODULE_RELOC    fname = unrelocate_module(fname);   #endif      #ifdef PIKE_AUTORELOAD    if(!autoreload_on || load_time[fname]>=time())   #endif    {    if(!zero_type (ret=programs[fname])) { - #ifdef RESOLV_DEBUG -  werror ("low_findprog: %s returning cached (no autoreload)\n" -  " %O\n", fname, ret); - #endif +  resolv_debug ("low_findprog %s: returning cached (no autoreload)\n", fname);    return ret;    }    }      #ifdef __NT__    // Ugly kluge to work better with cygwin32    if(getenv("OSTYPE")=="cygwin32")    {    string tmp=fname[..1];    if((tmp=="//" || tmp=="\\\\") && (fname[3]=='/' || fname[3]=='\\'))
pike.git/lib/master.pike.in:553:    }   #endif       if( (s=master_file_stat(fakeroot(fname))) && s[1]>=0 )    {    AUTORELOAD_BEGIN();      #ifdef PIKE_AUTORELOAD    if (load_time[fname] > s[3])    if (!zero_type (ret=programs[fname])) { - #ifdef RESOLV_DEBUG -  werror ("low_findprog: %s returning cached (autoreload)\n", fname); - #endif +  resolv_debug ("low_findprog %s: returning cached (autoreload)\n", fname);    return ret;    }   #endif       switch(ext)    {    case "":    case ".pike":    foreach(query_precompiled_names(fname), string oname) {    if(Stat s2=master_file_stat(fakeroot(oname)))    {    if(s2[1]>=0 && s2[3]>=s[3])    {    mixed err=catch {    AUTORELOAD_CHECK_FILE(oname); -  +  resolv_debug ("low_findprog %s: decoding dumped\n", fname); +  INC_RESOLV_MSG_DEPTH();    ret = decode_value(master_read_file(oname),    (handler && handler->get_codec ||    get_codec)(fname, mkobj)); - #ifdef RESOLV_DEBUG -  werror ("low_findprog: %s returning decoded dump\n", fname); - #endif +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("low_findprog %s: dump decode ok\n", fname);    return programs[fname] = ret;       }; -  +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("low_findprog %s: dump decode failed\n", fname);    m_delete(programs, fname);    if (handler && handler->compile_warning) {    handler->compile_warning(oname, 0,    sprintf("Decode failed:\n"    "\t%s", describe_error(err)));    } else {    compile_warning(oname, 0,    sprintf("Decode failed:\n"    "\t%s", describe_error(err)));    }
pike.git/lib/master.pike.in:601:    if (handler && handler->compile_warning) {    handler->compile_warning(oname, 0,    "Compiled file is out of date\n");    } else {    compile_warning(oname, 0, "Compiled file is out of date\n");    }    }    }    }    - #ifdef RESOLV_DEBUG -  werror ("low_findprog: %s compiling, mkobj:%O\n", fname, mkobj); - #endif +  resolv_debug ("low_findprog %s: compiling, mkobj: %O\n", fname, mkobj); +  INC_RESOLV_MSG_DEPTH();    programs[fname]=ret=__empty_program(0, fname);    if ( mixed e=catch {    ret=compile_file(fname,    handler,    ret,    mkobj? (objects[ret]=__null_program()) : 0);    } )    { -  +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("low_findprog %s: compilation failed\n", fname);    m_delete(objects, ret);    ret=programs[fname]=0; // Negative cache.    throw(e);    } -  +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("low_findprog %s: compilation ok\n", fname);    break;   #if constant(load_module)    case ".so":    if (fname == "") {    werror( "low_findprog(\"%s\", \"%s\") => load_module(\"\")\n"    "%s\n", pname, ext, describe_backtrace(backtrace()) );    }       ret=load_module(fakeroot(fname)); - #ifdef RESOLV_DEBUG -  werror ("low_findprog: %s loaded binary\n", fname); - #endif +  resolv_debug ("low_findprog %s: loaded binary\n", fname);   #endif /* load_module */    }       AUTORELOAD_FINISH(ret,programs,fname);       return programs[fname]=ret;    } - #ifdef RESOLV_DEBUG -  werror ("low_findprog: %s file not found\n", fname); - #endif +  resolv_debug ("low_findprog %s: file not found\n", fname);    return 0;   }      //   // This function is called by the compiler when a delayed compilation   // error occurs in the given program. It should remove all references   // to the program so that it can be freed.   //   void unregister(program p)   {
pike.git/lib/master.pike.in:744:         //! This function is called when the driver wants to cast a string   //! to a program, this might be because of an explicit cast, an inherit   //! or a implict cast. In the future it might receive more arguments,   //! to aid the master finding the right program.   program cast_to_program(string pname,    string current_file,    object|void handler)   { -  return low_cast_to_program(pname, current_file, handler); +  resolv_debug ("cast_to_program(%O, %O)\n", pname, current_file); +  INC_RESOLV_MSG_DEPTH(); +  program ret = low_cast_to_program(pname, current_file, handler); +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("cast_to_program(%O, %O) => %O\n", pname, current_file, ret); +  return ret;   }         //! This function is called when an error occurs that is not caught   //! with catch().   void handle_error(array(mixed)|object trace)   {    if(mixed x=catch {    werror(describe_backtrace(trace));    }) {
pike.git/lib/master.pike.in:870:   //! This function is called whenever a inherit is called for.   //! It is supposed to return the program to inherit.   //! The first argument is the argument given to inherit, and the second   //! is the file name of the program currently compiling. Note that the   //! file name can be changed with #line, or set by compile_string, so   //! it can not be 100% trusted to be a filename.   //! previous_object(), can be virtually anything in this function, as it   //! is called from the compiler.   program handle_inherit(string pname, string current_file, object|void handler)   { -  return cast_to_program(pname, current_file, handler); +  resolv_debug ("handle_inherit(%O, %O)\n", pname, current_file); +  INC_RESOLV_MSG_DEPTH(); +  program ret = low_cast_to_program(pname, current_file, handler); +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("handle_inherit(%O, %O) => %O\n", pname, current_file, ret); +  return ret;   }      mapping (program:object) objects=([object_program(this_object()):this_object()]);      object low_cast_to_object(string oname, string current_file,    object|void current_handler)   {    program p;    object o;   
pike.git/lib/master.pike.in:893:    // NB: p might be a function in a fake_object...    if(!objectp (o=objects[p])) o=objects[p]=p();    return o;   }      //! This function is called when the drivers wants to cast a string   //! to an object because of an implict or explicit cast. This function   //! may also receive more arguments in the future.   object cast_to_object(string oname, string current_file)   { +  resolv_debug ("cast_to_object(%O, %O)\n", oname, current_file); +  INC_RESOLV_MSG_DEPTH();    object o = low_cast_to_object(oname, current_file); -  +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("cast_to_object(%O, %O) => %O\n", oname, current_file, o);    if (objectp (o)) return o;    error("Cast '"+oname+"' to object failed"+    ((current_file && current_file!="-")?sprintf(" for '%s'",current_file):"")+".\n");    return 0;   }      class dirnode   {    string dirname;    object|void handler;    constant is_resolv_dirnode = 1;    // objectp() is intentionally not used on the module object, to    // allow a module to deny its own existence with `!.    mixed module=module_checker();    mapping(string:mixed) cache=([]);    array(string) files;       void create(string d, object|void h)    { - #ifdef MODULE_TRACE -  werror("%*ndirnode(%O,%O);\n",sizeof(backtrace())-1,d,h); - #endif +  resolv_debug ("dirnode(%O,%O) created\n",d,h);    dirname=d;    handler=h;    fc[dirname]=this_object();    if(has_suffix(dirname,".pmod"))    fc[dirname[..sizeof(dirname)-6]]=this_object();    }       void get_files() {    if (!(files = get_dir(fakeroot(dirname)))) {    werror ("Error listing module directory %O: %s\n",    dirname, strerror (errno()));    files = ({});    }    }       class module_checker    {    int `!()    { - #ifdef MODULE_TRACE -  werror("%*ndirnode(%O)->module_checker()->`!()\n", -  sizeof(backtrace()),dirname); - #endif +  resolv_debug ("dirnode(%O)->module_checker()->`!()\n",dirname); +  INC_RESOLV_MSG_DEPTH();    if (catch {    if(module=findmodule(dirname+"/module", handler))    {    if(mixed tmp=module->_module_value)    module=tmp;       /* This allows for `[] to have side effects first time    * it is called. (Specifically, the Calendar module uses    * this    */    cache=([]);    _cache_full=0;    } -  +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("dirnode(%O)->module_checker()->`!() => %s\n", +  dirname, !module ? "doesn't exist" : "exists"); +  return !module;    }) {    // findmodule() failed. This can occur due to circularities    // between encode_value()'ed programs.    // The error will then typically be:    // "Cannot call functions in unfinished objects."       // Pretend not to exist for now... -  +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("dirnode(%O)->module_checker()->`!() => failure, doesn't exist\n", +  dirname);    return 1;    } -  -  return !module; +     }       mixed `[](string index)    { - #ifdef MODULE_TRACE -  werror("%*ndirnode(%O)->module_checker()[%O]\n", -  sizeof(backtrace()),dirname,index); - #endif -  if(module) return module[index]; +  resolv_debug ("dirnode(%O)->module_checker()[%O] => %O\n", +  dirname, index, module && module[index]); +  return module && module[index];    }    array(string) _indices() { if(module) return indices(module); }    array _values() { if(module) return values(module); }    }       static mixed ind(string index)    { - #ifdef MODULE_TRACE -  werror("%*nDirnode(%O) ind[%O] -> ???\n", -  sizeof(backtrace()),dirname,index); - #endif +  resolv_debug ("dirnode(%O)->ind(%O)\n", dirname, index); +  INC_RESOLV_MSG_DEPTH(); +     if(module)    { - #ifdef MODULE_TRACE -  werror("%*nDirnode(%O) module[%O] -> ???\n", -  sizeof(backtrace()),dirname,index); - #endif +     mixed o;   // _describe(module);    if(!zero_type(o=module[index]))    { - #ifdef MODULE_TRACE -  werror("%*nDirnode(%O) module[%O] -> %O\n", -  sizeof(backtrace()),dirname,index, o); - #endif +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("dirnode(%O)->ind(%O) => found %O\n", +  dirname, index, o);    return o;    }    }       if(!files) get_files();       int(0..1) ret;    foreach( files, string s )    if( has_value(s, index) || has_value(index,s) )    {    ret=1;    break;    } -  if(!ret) +  if(!ret) { +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("dirnode(%O)->ind(%O) => no file match\n", dirname, index);    return UNDEFINED; -  +  }    -  index = dirname+"/"+index; - #ifdef MODULE_TRACE -  werror("%*nDirnode(%O) findmodule(%O)\n", -  sizeof(backtrace()), dirname, index); - #endif +  string fullname = dirname+"/"+index;    object o; -  if(objectp(o=findmodule(index, handler))) +  if(objectp(o=findmodule(fullname, handler)))    {    if(mixed tmp=o->_module_value) o=tmp; - #ifdef MODULE_TRACE -  werror("%*nDirnode(%O) findmodule(%O) ==> %O\n", -  sizeof(backtrace()), dirname, index, o); - #endif +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("dirnode(%O)->ind(%O) => found submodule %O\n", +  dirname, index, o);    return o;    } -  if (program p=cast_to_program( index, 0, handler )) +  if (program p=cast_to_program( fullname, 0, handler ))    { - #ifdef MODULE_TRACE -  werror("%*nDirnode(%O) cast_to_program(%O) ==> %O\n", -  sizeof(backtrace()), dirname, index, p); - #endif +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("dirnode(%O)->ind(%O) => found subprogram %O\n", +  dirname, index, p);    return p;    } - #ifdef MODULE_TRACE -  werror("%*nDirnode(%O)->`[](%O) FAILED\n", -  sizeof(backtrace()), dirname, index); - #endif +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("dirnode(%O)->ind(%O) => not found\n", +  dirname, index);    return UNDEFINED;    }       mixed `[](string index)    {    mixed ret;   #ifdef MODULE_TRACE    werror("%*nDirnode(%O) cache[%O] ?????\n",    sizeof(backtrace()),dirname,index);   #endif    if(!zero_type(ret=cache[index]))    {   #ifdef MODULE_TRACE -  werror("%*nDirnode(%O) cache[%O] -> %O%s\n", +  werror("%*nDirnode(%O) cache[%O] => %O%s\n",    sizeof(backtrace()),dirname,index, ret,    (ret != ZERO_TYPE)?"":" (zero_type)");   #endif    if (ret != ZERO_TYPE) return ret;   #ifdef MODULE_TRACE    werror("%*nDirnode(%O) ZERO_TYPE!\n",    sizeof(backtrace()),dirname);   #endif    return UNDEFINED;    }
pike.git/lib/master.pike.in:1083:    return ret;    }       cache[index] = zero_type(ret) ? ZERO_TYPE : ret;    return ret;    }       static int(0..1) _cache_full;    void fill_cache()    { - #ifdef RESOLV_DEBUG + #if 0    werror(describe_backtrace(({ sprintf("Filling cache in dirnode %O\n",    dirname),    backtrace() }))); - #endif /* RESOLV_DEBUG */ + #endif    if (_cache_full) {    return;    }       if (module) {    foreach(indices(module), string index) {    cache[index] = module[index];    }    }   
pike.git/lib/master.pike.in:1166:    mapping(string:mixed) cache=([]);       string _sprintf(int as)    {    return as=='O' && sprintf("master()->joinnode(%O)",joined_modules);    }       void create(array(object|mapping) _joined_modules)    {    joined_modules = _joined_modules; +  resolv_debug ("joinnode(%O) created\n", joined_modules);    }       static mixed ind(string index)    { -  +  resolv_debug ("joinnode(%O)->ind(%O)\n", joined_modules, index); +  INC_RESOLV_MSG_DEPTH(); +     array(mixed) res = ({});    foreach(joined_modules, object|mapping o)    {    mixed ret;    if (!zero_type(ret = o[index]))    {    if (objectp(ret = o[index]) &&    (ret->is_resolv_dirnode || ret->is_resolv_joinnode))    {    // Only join directorynodes (or joinnodes).    res += ({ ret });    } else if ( !zero_type(ret) ) { -  +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("joinnode(%O)->ind(%O) => found %O\n", +  joined_modules, index, ret);    return (ret);    } else {    // Ignore    continue;    }    }    } -  if (sizeof(res) > 1) +  +  if (sizeof(res) > 1) { +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("joinnode(%O)->ind(%O) => new joinnode\n", +  joined_modules, index);    return joinnode(res); -  else if (sizeof(res)) +  } +  +  else if (sizeof(res)) { +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("joinnode(%O)->ind(%O) => found %O\n", +  joined_modules, index, res[0]);    return res[0]; -  +  } +  +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("joinnode(%O)->ind(%O) => not found\n", joined_modules, index);    return UNDEFINED;    }       mixed `[](string index)    {    mixed ret;    if (!zero_type(ret = cache[index])) {    if (ret != ZERO_TYPE) {    return ret;    }
pike.git/lib/master.pike.in:1221:    if (zero_type(ret)) {    cache[index] = ZERO_TYPE;    } else {    cache[index] = ret;    }    return ret;    }    static int _cache_full;    void fill_cache()    { - #ifdef RESOLV_DEBUG + #if 0    werror(describe_backtrace(({ "Filling cache in joinnode\n",    backtrace() }))); - #endif /* RESOLV_DEBUG */ + #endif    if (_cache_full) {    return;    }    foreach(joined_modules, object|mapping|program o) {    foreach(indices(o), string index) {    if (zero_type(cache[index])) {    `[](index);    }    }    }
pike.git/lib/master.pike.in:1273:    }   };      // Variables mustn't be static to allow for replace_master().   // /grubba 1998-04-10   mapping(string:mixed) fc=([]);      object findmodule(string fullname, object|void handler)   {    object o; - #ifdef MODULE_TRACE -  werror("%*nfindmodule(%O)\n",sizeof(backtrace()),fullname); - #endif +  resolv_debug ("findmodule(%O)\n", fullname);    if(!zero_type(o=fc[fullname]))    { - // werror("fc[%O] -> %O\n",fullname, o); -  if (objectp(o)) return o; -  if (o == 0) return UNDEFINED; +  if (objectp(o) || o != 0) { +  resolv_debug ("findmodule(%O) => found %O (cached)\n", fullname, o);    return o;    } -  +  resolv_debug ("findmodule(%O) => not found (cached)\n", fullname); +  return UNDEFINED; +  }       if(Stat stat=master_file_stat(fakeroot(fullname+".pmod")))    { -  if(stat[1]==-2) +  if(stat[1]==-2) { +  resolv_debug ("findmodule(%O) => new dirnode\n", fullname);    return dirnode(fullname+".pmod", handler);    } -  +  }    -  if(objectp (o = low_cast_to_object(fullname+".pmod", "/.", handler))) +  INC_RESOLV_MSG_DEPTH(); +  +  if(objectp (o = low_cast_to_object(fullname+".pmod", "/.", handler))) { +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("findmodule(%O) => got object %O\n", fullname, o);    return fc[fullname]=o; -  +  }      #if constant(load_module) -  if(master_file_stat(fakeroot(fullname+".so"))) -  return fc[fullname] = low_cast_to_object(fullname, "/.", handler); +  if(master_file_stat(fakeroot(fullname+".so"))) { +  o = fc[fullname] = low_cast_to_object(fullname, "/.", handler); +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("findmodule(%O) => got .so object %O\n", fullname, o); +  return o; +  }   #endif    -  +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug ("findmodule(%O) => not found\n", fullname);    return fc[fullname] = 0;   }      mixed handle_import(string what, string|void current_file, object|void handler)   {    array(string) tmp;    string path;    if(current_file)    {    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) { -  +  resolv_debug ("handle_import(%O, %O, %O) => new dirnode with handler\n", +  what, current_file, handler);    return dirnode(path, handler);    } -  if(fc[path]) return fc[path]; +  if(fc[path]) { +  resolv_debug ("handle_import(%O, %O) => found %O (cached)\n", +  what, current_file, fc[path]); +  return fc[path]; +  } +  resolv_debug ("handle_import(%O, %O) => new dirnode\n", what, current_file);    return dirnode(path);   }            multiset no_resolv = (<>);      //!   class CompatResolver   {
pike.git/lib/master.pike.in:1523:    }    return UNDEFINED;    }       mapping resolv_cache = set_weak_flag( ([]), 1 );       //!    mixed resolv(string identifier, string|void current_file,    object|void current_handler)    { - #ifdef RESOLV_DEBUG -  werror("Resolv(%O, %O)\n",identifier, current_file); - #endif /* RESOLV_DEBUG */ +  resolv_debug("resolv(%O, %O)\n",identifier, current_file); +  INC_RESOLV_MSG_DEPTH();       // FIXME: Support having the cache in the handler?    if( no_resolv[ identifier ] ) { - #ifdef RESOLV_DEBUG -  werror("Resolv(%O, %O) => excluded\n",identifier, current_file); - #endif /* RESOLV_DEBUG */ +  DEC_RESOLV_MSG_DEPTH(); +  resolv_debug("resolv(%O, %O) => excluded\n",identifier, current_file);    return UNDEFINED;    }       if (current_file && !stringp(current_file)) {    error( "resolv(%O, %O, %O): current_file is not a string!\n",    identifier, current_file, current_handler,    backtrace() );    }       mixed ret;    string id=identifier+":"+(current_file ? dirname(current_file) : "-");    if( zero_type (ret = resolv_cache[id]) != 1 )    { - // werror("Resolv cached(%O) => %O (%d)\n",id,resolv_cache[id],zero_type(resolv_cache[id])); +    #ifdef RESOLV_DEBUG -  +  DEC_RESOLV_MSG_DEPTH();    if (ret == ZERO_TYPE) -  werror("Resolv(%O, %O) => not found (cached)\n",identifier, current_file); +  resolv_debug("resolv(%O, %O) => not found (cached)\n",identifier, current_file);    else -  werror("Resolv(%O, %O) => found %O (cached)\n",identifier, current_file, ret); +  resolv_debug("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) {    if (zero_type(ret)) break;    ret=ret[index];    }    resolv_cache[id] = zero_type (ret) ? ZERO_TYPE : ret; -  +  DEC_RESOLV_MSG_DEPTH();   #ifdef RESOLV_DEBUG    if (zero_type (ret)) -  werror("Resolv(%O, %O) => not found\n",identifier, current_file); +  resolv_debug("resolv(%O, %O) => not found\n",identifier, current_file);    else -  werror("Resolv(%O, %O) => found %O\n",identifier, current_file, ret); +  resolv_debug("resolv(%O, %O) => found %O\n",identifier, current_file, ret);   #endif /* RESOLV_DEBUG */    return ret;    }       //! This function is called whenever an #include directive is encountered    //! it receives the argument for #include and should return the file name    //! of the file to include    string handle_include(string f,    string current_file,    int local_include)