From c6030c6511c69b69a216c893957b01bfc264d365 Mon Sep 17 00:00:00 2001 From: joerg Date: Sun, 19 Mar 1995 13:29:28 +0000 Subject: You will find enclosed some changes to make gcc -Wall more happy in /usr/src/bin. Note that some patches are still needed in that directory. I (Joerg) finished most of Philippe's cleanup. /bin/sh will still need *allot* of work, however. Submitted by: charnier@lirmm.fr (Philippe Charnier) --- bin/ed/sub.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'bin/ed/sub.c') diff --git a/bin/ed/sub.c b/bin/ed/sub.c index c23e4a2..904bc6a 100644 --- a/bin/ed/sub.c +++ b/bin/ed/sub.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sub.c,v 1.3 1994/09/24 02:55:31 davidg Exp $ + * $Id: sub.c,v 1.4 1995/01/14 11:47:16 alm Exp $ */ #ifndef lint @@ -97,7 +97,7 @@ extract_subst_template() ; else if (!isglobal) { while ((n = get_tty_line()) == 0 || - n > 0 && ibuf[n - 1] != '\n') + (n > 0 && ibuf[n - 1] != '\n')) clearerr(stdin); if (n < 0) return NULL; @@ -213,8 +213,9 @@ substitute_matching_text(pat, lp, gflag, kth) off += i; } txt += rm[0].rm_eo; - } while (*txt && (!changed || (gflag & GSG) && rm[0].rm_eo) && - !regexec(pat, txt, SE_MAX, rm, REG_NOTBOL)); + } while (*txt && + (!changed || ((gflag & GSG) && rm[0].rm_eo)) && + !regexec(pat, txt, SE_MAX, rm, REG_NOTBOL)); i = eot - txt; REALLOC(rbuf, rbufsz, off + i + 2, ERR); if (i > 0 && !rm[0].rm_eo && (gflag & GSG)) { -- cgit v1.1