3 * Copyright (c) 1991-2002, Larry Wall
5 * You may distribute under the terms of either the GNU General Public
6 * License or the Artistic License, as specified in the README file.
11 # define PERL_FILE_IS_ABSOLUTE(f) \
14 || ((*(f) == '[' || *(f) == '<') \
15 && (isALNUM((f)[1]) || strchr("$-_]>",(f)[1])))))
19 # define PERL_FILE_IS_ABSOLUTE(f) \
20 (*(f) == '/' || *(f) == '\\' /* UNC/rooted path */ \
21 || ((f)[0] && (f)[1] == ':')) /* drive name */
24 # define PERL_FILE_IS_ABSOLUTE(f) \
25 (((f)[0] && (f)[1] == ':') /* drive name */ \
26 || ((f)[0] == '\\' && (f)[1] == '\\') /* UNC path */ \
27 || ((f)[3] == ':')) /* volume name, currently only sys */
29 # if defined( DOSISH) || defined(EPOC)
30 # define PERL_FILE_IS_ABSOLUTE(f) \
32 || ((f)[0] && (f)[1] == ':')) /* drive name */
33 # else /* NEITHER DOSISH NOR EPOCISH */
34 # ifdef MACOS_TRADITIONAL
35 # define PERL_FILE_IS_ABSOLUTE(f) (strchr(f, ':') && *(f) != ':')
36 # else /* !MACOS_TRADITIONAL */
37 # define PERL_FILE_IS_ABSOLUTE(f) (*(f) == '/')
38 # endif /* MACOS_TRADITIONAL */