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.282 2003/05/31 10:58:30 mast Exp $ + // $Id: master.pike.in,v 1.283 2003/05/31 11:03:16 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:2641:    break;    }    }    }       return ret;    }   }       - string module_path_to_name (string path) - //! Converts a module path on the form @expr{"Foo.pmod/Bar.pmod"@} to - //! a module identifier on the form @expr{"Foo.Bar"@}. - { -  string modname = replace(path, ".pmod/", "."); -  if(search(modname, "/")<0) path=modname; -  if (has_suffix(path, ".module.pmod")) { -  return path[..sizeof(path)-13]; -  } -  if (has_suffix(path, ".pmod")) { -  return path[..sizeof(path)-6]; -  } -  if (has_suffix(path, ".so")) { -  return path[..sizeof(path)-4]; -  } -  if (has_suffix(path, ".pike")) { -  return path[..sizeof(path)-6]; -  } -  return path; - } -  -  +    static string get_clean_program_path ( program p, string pref1,    string suff1, string suff2 )   {    array(string) sort_paths_by_length(array(string) paths)    {    sort(map(paths, sizeof), paths);    return reverse(paths);    };    string path = programs_reverse_lookup (p);    if (path) {