diff options
author | joerg <joerg@FreeBSD.org> | 1995-03-19 13:29:28 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1995-03-19 13:29:28 +0000 |
commit | c6030c6511c69b69a216c893957b01bfc264d365 (patch) | |
tree | 163891f0a6f18e48e3d38e4d107ad82c2f5c570a /bin/ed/sub.c | |
parent | 568f2efc88b72b511e26d42250ac4250a6610415 (diff) | |
download | FreeBSD-src-c6030c6511c69b69a216c893957b01bfc264d365.zip FreeBSD-src-c6030c6511c69b69a216c893957b01bfc264d365.tar.gz |
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)
Diffstat (limited to 'bin/ed/sub.c')
-rw-r--r-- | bin/ed/sub.c | 9 |
1 files changed, 5 insertions, 4 deletions
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)) { |