pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:48:   // Enables the out of date warning in low_findprog().   #ifndef OUT_OF_DATE_WARNING   #define OUT_OF_DATE_WARNING 1   #endif /* OUT_OF_DATE_WARNING */   constant out_of_date_warning = OUT_OF_DATE_WARNING;      // FIXME: PATH_SEPARATOR and UPDIR should probably be exported,   // or at least some functions that use them should be.   // cf Tools.Shoot.runpike.   // /grubba 2004-04-11 - #if defined(__NT__) || defined(__amigaos__) + #if defined(__NT__) || defined(__amigaos__) || defined(__OS2__)   #define PATH_SEPARATOR ";"   #else   #define PATH_SEPARATOR ":"   #endif      #ifdef __amigaos__   #define UPDIR "/"   #else   #define UPDIR "../"   #endif
pike.git/lib/master.pike.in:1009:   //! 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) (search((X),":")>0)    return IS_ABSOLUTE_PATH(p);   #else - #ifdef __NT__ + #if defined(__NT__) || defined(__OS2__)    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__ + #if defined(__NT__) || defined(__OS2__)   #define EXPLODE_PATH(X) (replace((X),"\\","/")/"/")   #else   #define EXPLODE_PATH(X) ((X)/"/")   #endif      //! @appears explode_path   //! Split a path @[p] into its components.   //!   //! This function divides a path into its components. This might seem like   //! it could be done by dividing the string on <tt>"/"</tt>, but that will