From 9f431670a8e72386527ba1d6663149f5c4d9ec04 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Thu, 13 Mar 2003 15:40:40 +0000 Subject: [w3m-dev 03822] Re: etc.c: treatment for "%7E" is added to expandName() * etc.c (expandName): rewrite with strncasecmp From: Fumitoshi UKAI --- ChangeLog | 7 ++++++- etc.c | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ffa24f..eebf30d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-03-14 Fumitoshi UKAI + + * [w3m-dev 03822] Re: etc.c: treatment for "%7E" is added to expandName() + * etc.c (expandName): rewrite with strncasecmp + 2003-03-14 Fumitoshi UKAI * [w3m-dev 03821] fix for pmake @@ -7530,4 +7535,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.793 2003/03/13 15:29:42 ukai Exp $ +$Id: ChangeLog,v 1.794 2003/03/13 15:40:40 ukai Exp $ 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 #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, '/'); -- cgit v1.2.3