aboutsummaryrefslogtreecommitdiffstats
path: root/etc.c
diff options
context:
space:
mode:
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 */