Improve and restructure t/op/pat.t and split out some unicode related tests into...
[p5sagit/p5-mst-13.2.git] / util.h
CommitLineData
a0d0e21e 1/* util.h
a687059c 2 *
663f364b 3 * Copyright (C) 1991, 1992, 1993, 1999, 2001, 2002, 2003, 2004, 2005,
4 * 2007, by Larry Wall and others
a687059c 5 *
d48672a2 6 * You may distribute under the terms of either the GNU General Public
7 * License or the Artistic License, as specified in the README file.
8d063cd8 8 *
8d063cd8 9 */
57843af0 10
11#ifdef VMS
12# define PERL_FILE_IS_ABSOLUTE(f) \
13 (*(f) == '/' \
14 || (strchr(f,':') \
15 || ((*(f) == '[' || *(f) == '<') \
16 && (isALNUM((f)[1]) || strchr("$-_]>",(f)[1])))))
17
18#else /* !VMS */
546cd220 19# if defined(WIN32) || defined(__CYGWIN__)
57843af0 20# define PERL_FILE_IS_ABSOLUTE(f) \
f2ed23b0 21 (*(f) == '/' || *(f) == '\\' /* UNC/rooted path */ \
22 || ((f)[0] && (f)[1] == ':')) /* drive name */
57843af0 23# else /* !WIN32 */
2986a63f 24# ifdef NETWARE
25# define PERL_FILE_IS_ABSOLUTE(f) \
26 (((f)[0] && (f)[1] == ':') /* drive name */ \
27 || ((f)[0] == '\\' && (f)[1] == '\\') /* UNC path */ \
28 || ((f)[3] == ':')) /* volume name, currently only sys */
29# else /* !NETWARE */
9969cdde 30# if defined(DOSISH) || defined(EPOC) || defined(__SYMBIAN32__)
57843af0 31# define PERL_FILE_IS_ABSOLUTE(f) \
32 (*(f) == '/' \
33 || ((f)[0] && (f)[1] == ':')) /* drive name */
27da23d5 34# else /* NEITHER DOSISH NOR EPOCISH NOR SYMBIANISH */
bf4acbe4 35# ifdef MACOS_TRADITIONAL
084592ab 36# define PERL_FILE_IS_ABSOLUTE(f) (strchr(f, ':') && *(f) != ':')
bf4acbe4 37# else /* !MACOS_TRADITIONAL */
38# define PERL_FILE_IS_ABSOLUTE(f) (*(f) == '/')
39# endif /* MACOS_TRADITIONAL */
57843af0 40# endif /* DOSISH */
2986a63f 41# endif /* NETWARE */
57843af0 42# endif /* WIN32 */
43#endif /* VMS */
e9a8c099 44
45/*
46 * Local variables:
47 * c-indentation-style: bsd
48 * c-basic-offset: 4
49 * indent-tabs-mode: t
50 * End:
51 *
52 * ex: set ts=8 sts=4 sw=4 noet:
53 */