X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=util.h;h=cb9f4c9f9300c52562bdc68ffbda65f6ba94165f;hb=5095244257e3c5d9389813ccbcd2187ff6e2e91f;hp=df5184673428d0e4052326f358856610fe579fc4;hpb=a0d0e21ea6ea90a22318550944fe6cb09ae10cda;p=p5sagit%2Fp5-mst-13.2.git diff --git a/util.h b/util.h index df51846..cb9f4c9 100644 --- a/util.h +++ b/util.h @@ -1,8 +1,36 @@ /* util.h * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. * */ + +#ifdef VMS +# define PERL_FILE_IS_ABSOLUTE(f) \ + (*(f) == '/' \ + || (strchr(f,':') \ + || ((*(f) == '[' || *(f) == '<') \ + && (isALNUM((f)[1]) || strchr("$-_]>",(f)[1]))))) + +#else /* !VMS */ +# ifdef WIN32 +# define PERL_FILE_IS_ABSOLUTE(f) \ + (*(f) == '/' \ + || ((f)[0] && (f)[1] == ':') /* drive name */ \ + || ((f)[0] == '\\' && (f)[1] == '\\')) /* UNC path */ +# else /* !WIN32 */ +# ifdef DOSISH +# define PERL_FILE_IS_ABSOLUTE(f) \ + (*(f) == '/' \ + || ((f)[0] && (f)[1] == ':')) /* drive name */ +# else /* !DOSISH */ +# ifdef MACOS_TRADITIONAL +# define PERL_FILE_IS_ABSOLUTE(f) (strchr(f, ':')) +# else /* !MACOS_TRADITIONAL */ +# define PERL_FILE_IS_ABSOLUTE(f) (*(f) == '/') +# endif /* MACOS_TRADITIONAL */ +# endif /* DOSISH */ +# endif /* WIN32 */ +#endif /* VMS */