From 9728af2a7e87fddfa3a77ae6dc24755d3dda3e71 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Mon, 1 Aug 2011 08:46:32 +0000 Subject: kpathsea: More changes to reduce diffs with W32TeX git-svn-id: svn://tug.org/texlive/trunk@23300 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/kpathsea/c-pathch.h | 63 +++++++++++++++++------------------ 1 file changed, 31 insertions(+), 32 deletions(-) (limited to 'Build/source/texk/kpathsea/c-pathch.h') diff --git a/Build/source/texk/kpathsea/c-pathch.h b/Build/source/texk/kpathsea/c-pathch.h index 97970f40c67..cc8b936abf8 100644 --- a/Build/source/texk/kpathsea/c-pathch.h +++ b/Build/source/texk/kpathsea/c-pathch.h @@ -24,46 +24,45 @@ /* What separates filename components? */ #ifndef DIR_SEP -#ifdef VMS -#define DIR_SEP ':' -#define DIR_SEP_STRING ":" -#else -#ifdef DOSISH +# if defined(VMS) +# define DIR_SEP ':' +# define DIR_SEP_STRING ":" +# elif defined(DOSISH) /* not VMS */ /* Either \'s or 's work. Wayne Sullivan's web2pc prefers /, so we'll go with that. */ -#define DIR_SEP '/' -#define DIR_SEP_STRING "/" -#define IS_DEVICE_SEP(ch) ((ch) == ':') -#define NAME_BEGINS_WITH_DEVICE(name) (*(name) && IS_DEVICE_SEP((name)[1])) +# define DIR_SEP '/' +# define DIR_SEP_STRING "/" +# define IS_DEVICE_SEP(ch) ((ch) == ':') +# define NAME_BEGINS_WITH_DEVICE(name) (*(name) && IS_DEVICE_SEP((name)[1])) /* On DOS, it's good to allow both \ and / between directories. */ -#define IS_DIR_SEP(ch) ((ch) == '/' || (ch) == '\\') -/* On win32, UNC names are authorized */ -#ifdef WIN32 -#define IS_UNC_NAME(name) (strlen(name)>=3 && IS_DIR_SEP(*name) \ - && IS_DIR_SEP(*(name+1)) && isalnum(*(name+2))) -#endif -#else -#ifdef AMIGA -#define DIR_SEP '/' -#define DIR_SEP_STRING "/" -#define IS_DIR_SEP(ch) ((ch) == '/' || (ch) == ':') -#define IS_DEVICE_SEP(ch) ((ch) == ':') -#else -#ifdef VMCMS -#define DIR_SEP ' ' -#define DIR_SEP_STRING " " -#else -#define DIR_SEP '/' -#define DIR_SEP_STRING "/" -#endif /* not VM/CMS */ -#endif /* not AMIGA */ -#endif /* not DOSISH */ -#endif /* not VMS */ +# define IS_DIR_SEP(ch) ((ch) == '/' || (ch) == '\\') +# ifdef WIN32 +/* On win32, UNC names are authorized */ +# define IS_UNC_NAME(name) (strlen(name)>=3 && IS_DIR_SEP(*name) \ + && IS_DIR_SEP(*(name+1)) && isalnum(*(name+2))) +/* Used after converting '\\' into '/' */ +# define IS_DIR_SEP_CH(ch) ((ch) == '/') +# endif +# elif defined(AMIGA) /* not DOSISH */ +# define DIR_SEP '/' +# define DIR_SEP_STRING "/" +# define IS_DIR_SEP(ch) ((ch) == '/' || (ch) == ':') +# define IS_DEVICE_SEP(ch) ((ch) == ':') +# elif defined(VMCMS) /* not AMIGA */ +# define DIR_SEP ' ' +# define DIR_SEP_STRING " " +# else /* not VMCMS */ +# define DIR_SEP '/' +# define DIR_SEP_STRING "/" +# endif /* not VMCMS */ #endif /* not DIR_SEP */ #ifndef IS_DIR_SEP #define IS_DIR_SEP(ch) ((ch) == DIR_SEP) #endif +#ifndef IS_DIR_SEP_CH +#define IS_DIR_SEP_CH(ch) IS_DIR_SEP(ch) +#endif #ifndef IS_DEVICE_SEP /* No `devices' on, e.g., Unix. */ #define IS_DEVICE_SEP(ch) 0 #endif -- cgit v1.2.3