fix off-by-one column errors (needs more work, this gets
authorCynthia A. E. Livingston <cael@ucbvax.Berkeley.EDU>
Thu, 25 Jul 1991 12:15:24 +0000 (04:15 -0800)
committerCynthia A. E. Livingston <cael@ucbvax.Berkeley.EDU>
Thu, 25 Jul 1991 12:15:24 +0000 (04:15 -0800)
most of the ugliness away from *my* man pages, harumph)

SCCS-vsn: usr.bin/more/line.c 5.5
SCCS-vsn: usr.bin/more/output.c 5.10

usr/src/usr.bin/more/line.c
usr/src/usr.bin/more/output.c

index 244a4ba..34e8a0c 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)line.c     5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)line.c     5.5 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -156,6 +156,7 @@ enter_boldface:
                         * We have "X\bX" (including the current char).
                         * Switch into boldface mode.
                         */
                         * We have "X\bX" (including the current char).
                         * Switch into boldface mode.
                         */
+                       column--;
                        if (column + bo_width + be_width + 1 >= sc_width)
                                /*
                                 * Not enough room left on the screen to 
                        if (column + bo_width + be_width + 1 >= sc_width)
                                /*
                                 * Not enough room left on the screen to 
@@ -185,6 +186,7 @@ enter_underline:
                         * We have either "_\bX" or "X\b_" (including
                         * the current char).  Switch into underline mode.
                         */
                         * We have either "_\bX" or "X\b_" (including
                         * the current char).  Switch into underline mode.
                         */
+                       column--;
                        if (column + ul_width + ue_width + 1 >= sc_width)
                                /*
                                 * Not enough room left on the screen to 
                        if (column + ul_width + ue_width + 1 >= sc_width)
                                /*
                                 * Not enough room left on the screen to 
index 3a1e4e0..54270ea 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)output.c   5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)output.c   5.10 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -56,7 +56,7 @@ put_line()
                {
                case UL_CHAR:
                        ul_enter();
                {
                case UL_CHAR:
                        ul_enter();
-                       column += ul_width;
+                       column += ul_width +1;
                        break;
                case UE_CHAR:
                        ul_exit();
                        break;
                case UE_CHAR:
                        ul_exit();
@@ -64,7 +64,7 @@ put_line()
                        break;
                case BO_CHAR:
                        bo_enter();
                        break;
                case BO_CHAR:
                        bo_enter();
-                       column += bo_width;
+                       column += bo_width +1;
                        break;
                case BE_CHAR:
                        bo_exit();
                        break;
                case BE_CHAR:
                        bo_exit();