From b101f703c0ddbca2c3450a86687286fe10e7a5ca Mon Sep 17 00:00:00 2001 From: Renaud Fivet Date: Wed, 21 Jan 2015 14:48:03 +0800 Subject: [PATCH] Insure consistent use of TTbeep for bell (instead of alternative TTputc( BEL)). --- isearch.c | 4 ++-- search.c | 6 ++++-- search.h | 2 -- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/isearch.c b/isearch.c index 258d8ce..4acb162 100644 --- a/isearch.c +++ b/isearch.c @@ -300,7 +300,7 @@ static int isearch(int f, int n) pat[cpos] = 0; /* null terminate the buffer */ col = echo_char(c, col); /* Echo the character */ if (!status) { /* If we lost last time */ - TTputc(BELL); /* Feep again */ + TTbeep() ; /* Feep again */ TTflush(); /* see that the feep feeps */ } else /* Otherwise, we must have won */ if (!(status = checknext(c, pat, n))) /* See if match */ status = scanmore(pat, n); /* or find the next match */ @@ -377,7 +377,7 @@ static int scanmore(char *patrn, int dir) /* search forward or back for a patter sts = scanner(patrn, FORWARD, PTEND); /* Nope. Go forward */ if (!sts) { - TTputc(BELL); /* Feep if search fails */ + TTbeep() ; /* Feep if search fails */ TTflush(); /* see that the feep feeps */ } diff --git a/search.c b/search.c index db2971a..38ebbff 100644 --- a/search.c +++ b/search.c @@ -93,6 +93,9 @@ spat_t rpat ; /* replacement pattern */ #if defined(MAGIC) + +#define BELL 0x07 /* a bell character */ + /* * Defines for the metacharacters in the regular expression * search routines. @@ -981,8 +984,7 @@ static int replaces(int kind, int f, int n) curwp->w_flag |= WFMOVE; case BELL: /* abort! and stay */ - mlwrite("Aborted!"); - return FALSE; + return logger( FALSE, "Aborted!") ; default: /* bitch and beep */ TTbeep(); diff --git a/search.h b/search.h index 568d553..19e9136 100644 --- a/search.h +++ b/search.h @@ -5,8 +5,6 @@ #include "line.h" -#define BELL 0x07 /* a bell character */ - typedef char spat_t[ 128] ; /* search pattern type */ #define NPAT sizeof( spat_t) /* # of bytes, pattern */