aboutsummaryrefslogtreecommitdiffstats
path: root/etc.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-03-13 15:40:40 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-03-13 15:40:40 +0000
commit9f431670a8e72386527ba1d6663149f5c4d9ec04 (patch)
tree7184721e9fa90fdf681b3f9b4b20ed84f7ecdd98 /etc.c
parentfix indent (diff)
downloadw3m-9f431670a8e72386527ba1d6663149f5c4d9ec04.tar.gz
w3m-9f431670a8e72386527ba1d6663149f5c4d9ec04.zip
[w3m-dev 03822] Re: etc.c: treatment for "%7E" is added to expandName()
* etc.c (expandName): rewrite with strncasecmp From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat (limited to 'etc.c')
-rw-r--r--etc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc.c b/etc.c
index 223fd22..ce95a42 100644
--- a/etc.c
+++ b/etc.c
@@ -1,4 +1,4 @@
-/* $Id: etc.c,v 1.68 2003/03/13 15:15:47 inu Exp $ */
+/* $Id: etc.c,v 1.69 2003/03/13 15:40:47 ukai Exp $ */
#include "fm.h"
#include <pwd.h>
#include "myctype.h"
@@ -1552,9 +1552,9 @@ expandName(char *name)
return NULL;
p = name;
if (*p == '/') {
- if ( (*(p + 1) == '~' && IS_ALPHA(*(p + 2)) )
- || ( strncmp( p+1, "%7", 2 ) == 0 && tolower( *(p+3) ) == 'e' )
- && personal_document_root) {
+ if (((*(p + 1) == '~' && IS_ALPHA(*(p + 2)))
+ || (strncasecmp(p + 1, "%7e", 3) == 0))
+ && personal_document_root) {
char *q;
p += 2;
q = strchr(p, '/');