diff options
author | Jari Aalto <jari.aalto@cante.net> | 2001-11-13 17:56:06 +0000 |
---|---|---|
committer | Jari Aalto <jari.aalto@cante.net> | 2009-09-12 16:46:54 +0000 |
commit | f73dda092b33638d2d5e9c35375f687a607b5403 (patch) | |
tree | f21584e70a444d6a1ecba0fb5e2cf79e8cce91db /lib/sh/pathphys.c | |
parent | 28ef6c316f1aff914bb95ac09787a3c83c1815fd (diff) | |
download | android_external_bash-f73dda092b33638d2d5e9c35375f687a607b5403.tar.gz android_external_bash-f73dda092b33638d2d5e9c35375f687a607b5403.tar.bz2 android_external_bash-f73dda092b33638d2d5e9c35375f687a607b5403.zip |
Imported from ../bash-2.05a.tar.gz.
Diffstat (limited to 'lib/sh/pathphys.c')
-rw-r--r-- | lib/sh/pathphys.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/sh/pathphys.c b/lib/sh/pathphys.c index eb58524..df69204 100644 --- a/lib/sh/pathphys.c +++ b/lib/sh/pathphys.c @@ -18,27 +18,26 @@ with Bash; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ -#include "config.h" +#include <config.h> -#include "bashtypes.h" +#include <bashtypes.h> #ifndef _MINIX # include <sys/param.h> #endif -#include "posixstat.h" +#include <posixstat.h> #if defined (HAVE_UNISTD_H) # include <unistd.h> #endif -#include "filecntl.h" -#include "bashansi.h" +#include <filecntl.h> +#include <bashansi.h> #include <stdio.h> +#include <chartypes.h> #include <errno.h> #include "shell.h" -#include "maxpath.h" - #if !defined (MAXSYMLINKS) # define MAXSYMLINKS 32 #endif @@ -82,9 +81,9 @@ sh_physpath (path, flags) int double_slash_path, linklen, nlink; nlink = 0; - q = result = xmalloc (PATH_MAX + 1); + q = result = (char *)xmalloc (PATH_MAX + 1); - workpath = xmalloc (PATH_MAX + 1); + workpath = (char *)xmalloc (PATH_MAX + 1); strcpy (workpath, path); /* This always gets an absolute pathname. */ @@ -92,7 +91,7 @@ sh_physpath (path, flags) /* POSIX.2 says to leave a leading `//' alone. On cygwin, we skip over any leading `x:' (dos drive name). */ #if defined (__CYGWIN__) - qbase = (isalpha(workpath[0]) && workpath[1] == ':') ? workpath + 3 : workpath + 1; + qbase = (ISALPHA((unsigned char)workpath[0]) && workpath[1] == ':') ? workpath + 3 : workpath + 1; #else qbase = workpath + 1; #endif @@ -176,7 +175,7 @@ error: q = result; /* Duplicating some code here... */ #if defined (__CYGWIN__) - qbase = (isalpha(workpath[0]) && workpath[1] == ':') ? workpath + 3 : workpath + 1; + qbase = (ISALPHA((unsigned char)workpath[0]) && workpath[1] == ':') ? workpath + 3 : workpath + 1; #else qbase = workpath + 1; #endif |