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.398 2007/06/19 13:43:18 mbaehr Exp $ + // $Id: master.pike.in,v 1.399 2007/06/23 16:31:48 mbaehr 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:762:   //! joinnodes and dirnodes   //!   //! @param mod   //! The module we are looking for.   //!   //! @returns   //! An array of strings with filenames.   //! (one for each file in a joinnode, or just one otherwise)   array(string) module_defined(object mod)   { -  array mods; +     array files = ({}); -  +  if (programp(mod)) +  return ({ Builtin()->program_defined([program]mod) }); +  +  array mods;    if (mod->is_resolv_joinnode)    mods = mod->joined_modules;    else    mods = ({ mod });       foreach (mods;; object mod)    {    if (mod->is_resolv_dirnode)    files += ({ Builtin()->program_defined(object_program(mod->module)) });    else
pike.git/lib/master.pike.in:823:    prog = object_program(obj);    }          if (prog && !documentation[prog] && doc_extractor)    {    string source;    if (source_cache && source_cache[prog])    source = source_cache[prog];    else -  source = master_read_file(Builtin()->program_defined(prog)); +  { +  array sourceref = array_sscanf(Builtin()->program_defined(prog), +  "%s%[:]%[0-9]"); +  source = master_read_file(sourceref[0]); +  if (sizeof(sourceref[1]) && sizeof(sourceref[2])) +  { +  if (programp(prog)) +  child = ((describe_program(prog)||"")/".")[-1]; +  } +  }       if (source)    {    catch    {    documentation[prog] = doc_extractor(source, sprintf("%O", prog));    };    //FIXME: handle this error somehow    }    }       if (documentation[prog])    {    if (child) -  return documentation[prog]->findObject(child); +  return documentation[prog]->findObject(child)||documentation[prog]->findChild(child);    else    return documentation[prog];    }   }         static program low_findprog(string pname,    string ext,    object|void handler,    void|int mkobj)