w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit d1d4509bef9667e5125a6a23669e4a4ee7deebe4
parent 6d316b3598917d0721ee8fc94a7df9b45c5c8baa
Author: ukai <ukai>
Date:   Fri, 14 Dec 2001 17:10:54 +0000

[w3m-dev 02656]
From: Kiyokazu SUTO <suto@ks-and-ks.ne.jp>

Diffstat:
MChangeLog | 7+++++++
MXMakefile | 2+-
Manchor.c | 8++++----
Mindep.c | 12++++--------
4 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,10 @@ +2001-12-15 Kiyokazu SUTO <suto@ks-and-ks.ne.jp> + + * [w3m-dev 02656] + * XMakefile (clean): remove functable.c + * anchor.c (_put_anchor_new): use Strnew_size() and Strcat_charp_n() + * indep.c (getescapechar): use GET_MYCDIGIT + 2001-12-13 Kiyokazu SUTO <suto@ks-and-ks.ne.jp> * [w3m-dev 02541] mouse support on cygwin diff --git a/XMakefile b/XMakefile @@ -142,7 +142,7 @@ uninstall: clean: sweep -rm -f *.o *.a $(TARGETS) mktable$(EXT) - -rm -f funcname.c funcname1.h funcname2.h tagtable.c + -rm -f funcname.c funcname1.h funcname2.h tagtable.c functable.c -for dir in $(SCRIPTSUBDIRS); \ do \ (cd $$dir; $(MAKE) clean); \ diff --git a/anchor.c b/anchor.c @@ -185,14 +185,14 @@ searchURLLabel(Buffer *buf, char *url) static Anchor * _put_anchor_news(Buffer *buf, char *p1, char *p2, int line, int pos) { - Str tmp = Strnew_charp("news:"); + Str tmp; p1++; if (*(p2 - 1) == '>') p2--; - while (p1 < p2) { - Strcat_char(tmp, *(p1++)); - } + tmp = Strnew_size(sizeof("news:") - 1 + (p2 - p1)); + Strcat_charp_n(tmp, "news:", sizeof("news:") - 1); + Strcat_charp_n(tmp, p1, p2 - p1); return registerHref(buf, tmp->ptr, NULL, NO_REFERER, line, pos); } #endif /* USE_NNTP */ diff --git a/indep.c b/indep.c @@ -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; } }