diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-01-08 21:06:40 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-01-08 21:06:40 +0000 |
commit | bb182e3f96eae7b1ae90bf8263558c84f34e4b7f (patch) | |
tree | 41104d613df4b4033ae47fcfdb379e1475357a10 /usr.bin | |
parent | fcde5ec1a7e7dda343ba822c73be5f080b0ff0c8 (diff) |
Appease gcc 3 and the C gods by fixing a couple of undefined statements;
from Ray Lai.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/vi/ex/ex_txt.c | 6 | ||||
-rw-r--r-- | usr.bin/vi/vi/v_txt.c | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/vi/ex/ex_txt.c b/usr.bin/vi/ex/ex_txt.c index b13c5990da0..c89cf1a4d72 100644 --- a/usr.bin/vi/ex/ex_txt.c +++ b/usr.bin/vi/ex/ex_txt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_txt.c,v 1.8 2005/10/17 19:12:16 otto Exp $ */ +/* $OpenBSD: ex_txt.c,v 1.9 2006/01/08 21:06:38 miod Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -400,8 +400,8 @@ txt_dent(sp, tp) ++scno; /* Get the previous shiftwidth column. */ - cno = scno; - scno -= --scno % sw; + cno = scno--; + scno -= scno % sw; /* * Since we don't know what comes before the character(s) being diff --git a/usr.bin/vi/vi/v_txt.c b/usr.bin/vi/vi/v_txt.c index 140bb2971c6..43aee09e0d0 100644 --- a/usr.bin/vi/vi/v_txt.c +++ b/usr.bin/vi/vi/v_txt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: v_txt.c,v 1.17 2006/01/08 21:05:40 miod Exp $ */ +/* $OpenBSD: v_txt.c,v 1.18 2006/01/08 21:06:39 miod Exp $ */ /*- * Copyright (c) 1993, 1994 @@ -1941,8 +1941,10 @@ txt_dent(sp, tp, isindent) target = current; if (isindent) target += COL_OFF(target, sw); - else - target -= --target % sw; + else { + --target; + target -= target % sw; + } /* * The AI characters will be turned into overwrite characters if the |