diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-05-12 08:16:41 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-05-12 08:16:41 +0000 |
commit | 4c5256d4f51b7a5022c0adf849b743f71024f078 (patch) | |
tree | f85dac3e38efcda4d2e486e82219c5f65d04b8b4 /Build/source/texk/kpathsea | |
parent | a726f5a7c13c8a74e9ae3d1de1a82f364ea56981 (diff) |
Minor rewrite
git-svn-id: svn://tug.org/texlive/trunk@22435 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea')
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/absolute.c | 17 |
2 files changed, 10 insertions, 11 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index 7cc71bd9744..806fcfcedf9 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,7 @@ +2011-05-12 Peter Breitenlohner <peb@mppmu.mpg.de> + + * absolute.c: Minor rewrite. + 2011-05-06 Karl Berry <karl@tug.org> * texmf.cnf (TEXINPUTS.eplatex): no longer needed per Akira. 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) |