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.314 2003/12/17 22:46:07 marcus Exp $ + // $Id: master.pike.in,v 1.315 2003/12/18 21:28:02 marcus 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:49:   #define OUT_OF_DATE_WARNING 1   #endif /* OUT_OF_DATE_WARNING */   constant out_of_date_warning = OUT_OF_DATE_WARNING;      #if defined(__NT__) || defined(__amigaos__)   #define PATH_SEPARATOR ";"   #else   #define PATH_SEPARATOR ":"   #endif    + #ifdef __amigaos__ + #define UPDIR "/" + #else + #define UPDIR "../" + #endif +    //! @decl constant out_of_date_warning = 1   //! Should Pike complain about out of date compiled files.   //! 1 means yes and 0 means no. Controlled by the OUT_OF_DATE_WARNING   //! define.      //! If not zero compilation warnings will be written out on stderr.   int want_warnings = PIKE_WARNINGS;      //!   int compat_major=-1;
pike.git/lib/master.pike.in:163:    if(s == path)    return "/${PIKE_MODULE_PATH}";    else {    path = combine_path(path, "");    if(has_prefix (s, path))    return "/${PIKE_MODULE_PATH}/"+s[sizeof(path)..];    }       /* This is necessary to find compat modules... */    foreach(pike_module_path, string path) { -  path = combine_path(path, "..", ""); +  path = combine_path(path, UPDIR, "");    if(has_prefix (s, path)) -  return "/${PIKE_MODULE_PATH}/../"+s[sizeof(path)..]; +  return "/${PIKE_MODULE_PATH}/"+UPDIR+s[sizeof(path)..];    }       return s;   }      #ifdef fakeroot   #undef fakeroot   #endif   #define fakeroot relocate_module   #endif // PIKE_MODULE_RELOC         //! @appears is_absolute_path   //! Check if a path @[p] is fully qualified (ie not relative).   //!   //! @returns   //! Returns 1 if the path is absolute, 0 otherwise.   int is_absolute_path(string p)   { -  + #ifdef __amigaos__ + #define IS_ABSOLUTE_PATH(X) has_value((X),":") +  return IS_ABSOLUTE_PATH(p); + #else   #ifdef __NT__    p=replace(p,"\\","/");    if(sscanf(p,"%[a-zA-Z]:%*c",string s)==2 && sizeof(s)==1)    return 1;   #define IS_ABSOLUTE_PATH is_absolute_path   #else   #define IS_ABSOLUTE_PATH(X) has_prefix((X),"/")   #endif    return has_prefix(p,"/"); -  + #endif   }      #ifdef __NT__   #define EXPLODE_PATH(X) (replace((X),"\\","/")/"/")   #else   #define EXPLODE_PATH(X) ((X)/"/")   #endif      //! @appears explode_path   //! Split a path @[p] into its components.
pike.git/lib/master.pike.in:330:   }      string getcwd()   {    return current_path || (current_path=predef::getcwd());   }   #endif // GETCWD_CACHE      string combine_path_with_cwd(string path)   { -  return combine_path(IS_ABSOLUTE_PATH(path)?"/":getcwd(),path); +  return combine_path(IS_ABSOLUTE_PATH(path)?"":getcwd(),path);   }      #ifdef FILE_STAT_CACHE      #define FILE_STAT_CACHE_TIME 20      int invalidate_time;   mapping(string:multiset(string)) dir_cache = ([]);      Stat master_file_stat(string x)
pike.git/lib/master.pike.in:873:    pname=tmp*"/";    }    else {    ext="";    }       if(IS_ABSOLUTE_PATH(pname))    {    program|NoValue prog = programs[pname];    if (programp (prog)) return prog; -  pname=combine_path("/",pname); +  pname=combine_path("",pname);    return findprog(pname,ext,handler,mkobj);    }    else {    string cwd;    if(current_file)    {    cwd=dirname(current_file);    }    else {    cwd=getcwd();