=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mg/re_search.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- src/usr.bin/mg/re_search.c 2013/12/20 18:44:13 1.29 +++ src/usr.bin/mg/re_search.c 2014/03/20 07:47:29 1.30 @@ -1,4 +1,4 @@ -/* $OpenBSD: re_search.c,v 1.29 2013/12/20 18:44:13 florian Exp $ */ +/* $OpenBSD: re_search.c,v 1.30 2014/03/20 07:47:29 lum Exp $ */ /* This file is in the public domain. */ @@ -57,6 +57,7 @@ if ((s = re_readpattern("RE Search")) != TRUE) return (s); if (re_forwsrch() == FALSE) { + dobeep(); ewprintf("Search failed: \"%s\"", re_pat); return (FALSE); } @@ -80,6 +81,7 @@ if ((s = re_readpattern("RE Search backward")) != TRUE) return (s); if (re_backsrch() == FALSE) { + dobeep(); ewprintf("Search failed: \"%s\"", re_pat); return (FALSE); } @@ -100,11 +102,13 @@ re_searchagain(int f, int n) { if (re_srch_lastdir == SRCH_NOPR) { + dobeep(); ewprintf("No last search"); return (FALSE); } if (re_srch_lastdir == SRCH_FORW) { if (re_forwsrch() == FALSE) { + dobeep(); ewprintf("Search failed: \"%s\"", re_pat); return (FALSE); } @@ -112,6 +116,7 @@ } if (re_srch_lastdir == SRCH_BACK) if (re_backsrch() == FALSE) { + dobeep(); ewprintf("Search failed: \"%s\"", re_pat); return (FALSE); } @@ -438,6 +443,7 @@ if (error != 0) { char message[256]; regerror(error, ®ex_buff, message, sizeof(message)); + dobeep(); ewprintf("Regex Error: %s", message); re_pat[0] = '\0'; return (FALSE);