aboutsummaryrefslogtreecommitdiffstats
path: root/etc.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-12-24 17:20:45 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-12-24 17:20:45 +0000
commit4ca69fff36ed4c9013f8ba74eeb47fea71b7121b (patch)
treef20970c6c6c73feb448ebdcd663792a4e8d49f96 /etc.c
parentmimehead.c (decodeWord): don't use toupper() (requires ctype.h) (diff)
downloadw3m-4ca69fff36ed4c9013f8ba74eeb47fea71b7121b.tar.gz
w3m-4ca69fff36ed4c9013f8ba74eeb47fea71b7121b.zip
[w3m-dev 03595] tolower, toupper
* Str.c (Strlower): TOLOWER (Strupper): TOUPPER * backend.c: delete ctype.h * etc.c (gethtmlcmd): TOLOWER * file.c (readHeader): TOLOWER (checkOverWrite): TOLOWER (guess_charset): TOLOWER * ftp.c: delete ctype.h * indep.c (strcasecmp): TOLOWER (strncasecmp): TOLOWER (strcasematch): TOLOWER * istream.c: include myctype.h (ssl_get_certificate): TOLOWER * mailcap.c (mailcapMatch): TOLOWER * main.c (_quitfm): TOLOWER * menu.c (accesskey_menu): TOLOWER * mimehead.c: include myctype.h (decodeWord): TOUPPER * mktable.c: delete ctype.h, include myctype.h (main): IS_SPACE * myctype.h: delete ctype.h (TOLOWER): added (TOUPPER): added * parsetagx.c (parse_tag): TOLOWER * rc.c (str_to_bool): TOLOWER (str_to_color): TOLOWER * regex.c: delete ctype.h, include myctype.h (TOLOWER): added (TOUPPER): added (regmatch1): TOLOWER (matchWhich): TOLOWER, TOUPPER From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'etc.c')
-rw-r--r--etc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/etc.c b/etc.c
index 616bdf2..157f38f 100644
--- a/etc.c
+++ b/etc.c
@@ -1,4 +1,4 @@
-/* $Id: etc.c,v 1.43 2002/12/14 15:18:38 ukai Exp $ */
+/* $Id: etc.c,v 1.44 2002/12/24 17:20:46 ukai Exp $ */
#include "fm.h"
#include <pwd.h>
#include "myctype.h"
@@ -134,14 +134,17 @@ gethtmlcmd(char **s)
(*s)++;
/* first character */
- if (IS_ALNUM(**s) || **s == '_' || **s == '/')
- *(p++) = tolower(*((*s)++));
+ if (IS_ALNUM(**s) || **s == '_' || **s == '/') {
+ *(p++) = TOLOWER(**s);
+ (*s)++;
+ }
else
return HTML_UNKNOWN;
if (p[-1] == '/')
SKIP_BLANKS(*s);
while ((IS_ALNUM(**s) || **s == '_') && p - cmdstr < MAX_CMD_LEN) {
- *(p++) = tolower(*((*s)++));
+ *(p++) = TOLOWER(**s);
+ (*s)++;
}
if (p - cmdstr == MAX_CMD_LEN) {
/* buffer overflow: perhaps caused by bad HTML source */