summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/absolute.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-05-12 08:16:41 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-05-12 08:16:41 +0000
commit4c5256d4f51b7a5022c0adf849b743f71024f078 (patch)
treef85dac3e38efcda4d2e486e82219c5f65d04b8b4 /Build/source/texk/kpathsea/absolute.c
parenta726f5a7c13c8a74e9ae3d1de1a82f364ea56981 (diff)
Minor rewrite
git-svn-id: svn://tug.org/texlive/trunk@22435 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/absolute.c')
-rw-r--r--Build/source/texk/kpathsea/absolute.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/Build/source/texk/kpathsea/absolute.c b/Build/source/texk/kpathsea/absolute.c
index 2afc4577ed0..9a2f130619d 100644
--- a/Build/source/texk/kpathsea/absolute.c
+++ b/Build/source/texk/kpathsea/absolute.c
@@ -1,6 +1,6 @@
/* absolute.c: test if a filename is absolute or explicitly relative.
- Copyright 1993, 1994, 1995, 2008, 2009, 2010 Karl Berry.
+ Copyright 1993, 1994, 1995, 2008, 2009, 2010, 2011 Karl Berry.
Copyright 1997, 2002, 2005 Olaf Weber.
This library is free software; you can redistribute it and/or
@@ -27,16 +27,13 @@
boolean
kpathsea_absolute_p (kpathsea kpse, const_string filename, boolean relative_ok)
{
-#ifndef VMS
- boolean absolute;
- boolean explicit_relative;
-#endif
#ifdef VMS
#include <string.h>
(void)kpse; /* currenty not used */
return strcspn (filename, "]>:") != strlen (filename);
-#else /* not VMS */
- absolute = IS_DIR_SEP (*filename)
+#endif /* VMS */
+
+ boolean absolute = IS_DIR_SEP (*filename)
#ifdef DOSISH
/* Novell allows non-alphanumeric drive letters. */
|| (*filename && IS_DEVICE_SEP (filename[1]))
@@ -45,14 +42,13 @@ kpathsea_absolute_p (kpathsea kpse, const_string filename, boolean relative_ok)
/* UNC names */
|| (*filename == '\\' && filename[1] == '\\')
|| (*filename == '/' && filename[1] == '/')
-#endif
+#endif /* WIN32 */
#ifdef AMIGA
/* Colon anywhere means a device. */
|| strchr (filename, ':')
#endif /* AMIGA */
;
- explicit_relative
- = relative_ok
+ boolean explicit_relative = relative_ok
#ifdef AMIGA
/* Leading / is like `../' on Unix and DOS. Allow Unix syntax,
too, though, because of possible patch programs like
@@ -66,7 +62,6 @@ kpathsea_absolute_p (kpathsea kpse, const_string filename, boolean relative_ok)
/* FIXME: On UNIX an IS_DIR_SEP of any but the last character in the name
implies relative. */
return absolute || explicit_relative;
-#endif /* not VMS */
}
#if defined (KPSE_COMPAT_API)