From 40d405e05b078333222f942aa95632e1963d8bb9 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Fri, 16 Nov 2001 17:25:52 +0000 Subject: [w3m-dev 02418] main.c: mailto: like pattern to mark as anchor search.c: check NULL add disp_message() by ukai --- ChangeLog | 8 ++++++++ main.c | 3 ++- search.c | 8 ++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b69e7f1..2bad6a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-11-16 Tsutomu Okada + + * main.c (chkURL): add mailto: like pattern to mark as anchor + + * search.c (forwardSearch): check whether currentLine is NULL + + * search.c (backwardSearch): ditto + 2001-11-16 Dai Sato * configure: [w3m-dev-en 00641] Re: w3m-0.2.1-inu-1.6 diff --git a/main.c b/main.c index 8791dc3..923251d 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.5 2001/11/16 03:58:49 ukai Exp $ */ +/* $Id: main.c,v 1.6 2001/11/16 17:25:52 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include @@ -4005,6 +4005,7 @@ chkURL(void) "news:[^<> ][^<> ]*", "nntp://[a-zA-Z0-9][a-zA-Z0-9:%\\-\\./_]*", #endif /* USE_NNTP */ + "mailto:[^<> ][^<> ]*@[a-zA-Z0-9][a-zA-Z0-9\\-\\._]*[a-zA-Z0-9]", NULL, }; int i; diff --git a/search.c b/search.c index ae74284..5b5ddaf 100644 --- a/search.c +++ b/search.c @@ -14,6 +14,10 @@ forwardSearch(Buffer * buf, char *str) return FALSE; } l = begin = buf->currentLine; + if (l == NULL) { + disp_message("Not found", FALSE); + return FALSE; + } pos = buf->pos + 1; #ifdef JP_CHARSET if (l->propBuf[pos] & PC_KANJI2) @@ -78,6 +82,10 @@ backwardSearch(Buffer * buf, char *str) return FALSE; } l = begin = buf->currentLine; + if (l == NULL) { + disp_message("Not found", FALSE); + return FALSE; + } if (buf->pos > 0) { pos = buf->pos - 1; #ifdef JP_CHARSET -- cgit v1.2.3