aboutsummaryrefslogtreecommitdiffstats
path: root/anchor.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-12-14 17:10:54 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-12-14 17:10:54 +0000
commit68d47de87a8f4cda2d7d50bb3a6291528d48b333 (patch)
tree0cbb4b6ecbcf861dc19dee84f177a70044b2a8d1 /anchor.c
parent[w3m-dev 02541] mouse support on cygwin (diff)
downloadw3m-68d47de87a8f4cda2d7d50bb3a6291528d48b333.tar.gz
w3m-68d47de87a8f4cda2d7d50bb3a6291528d48b333.zip
[w3m-dev 02656]
From: Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
Diffstat (limited to 'anchor.c')
-rw-r--r--anchor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/anchor.c b/anchor.c
index 02e7ef1..d54f827 100644
--- a/anchor.c
+++ b/anchor.c
@@ -1,4 +1,4 @@
-/* $Id: anchor.c,v 1.6 2001/11/24 02:01:26 ukai Exp $ */
+/* $Id: anchor.c,v 1.7 2001/12/14 17:10:54 ukai Exp $ */
#include "fm.h"
#include "myctype.h"
#include "regex.h"
@@ -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 */