diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-12-14 17:10:54 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-12-14 17:10:54 +0000 |
commit | 68d47de87a8f4cda2d7d50bb3a6291528d48b333 (patch) | |
tree | 0cbb4b6ecbcf861dc19dee84f177a70044b2a8d1 /indep.c | |
parent | [w3m-dev 02541] mouse support on cygwin (diff) | |
download | w3m-68d47de87a8f4cda2d7d50bb3a6291528d48b333.tar.gz w3m-68d47de87a8f4cda2d7d50bb3a6291528d48b333.zip |
[w3m-dev 02656]
From: Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
Diffstat (limited to '')
-rw-r--r-- | indep.c | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -1,4 +1,4 @@ -/* $Id: indep.c,v 1.17 2001/12/10 17:02:44 ukai Exp $ */ +/* $Id: indep.c,v 1.18 2001/12/14 17:10:54 ukai Exp $ */ #include "fm.h" #include <stdio.h> #include <pwd.h> @@ -286,13 +286,11 @@ getescapechar(char **str) *str = p; return -1; } - q = p; - for (p++; IS_XDIGIT(*p); p++) ; - q = allocStr(q, p - q); + for (dummy = GET_MYCDIGIT(*p), p++; IS_XDIGIT(*p); p++) + dummy = dummy * 0x10 + GET_MYCDIGIT(*p); if (*p == ';') p++; *str = p; - sscanf(q, "%x", &dummy); return dummy; } else { @@ -300,13 +298,11 @@ getescapechar(char **str) *str = p; return -1; } - q = p; - for (p++; IS_DIGIT(*p); p++) ; - q = allocStr(q, p - q); + for (dummy = GET_MYCDIGIT(*p), p++; IS_DIGIT(*p); p++) + dummy = dummy * 10 + GET_MYCDIGIT(*p); if (*p == ';') p++; *str = p; - sscanf(q, "%d", &dummy); return dummy; } } |