arrange to turn off special modes when doing immediate font switches,
authorBill Joy <root@ucbvax.Berkeley.EDU>
Mon, 4 Jan 1982 12:50:31 +0000 (04:50 -0800)
committerBill Joy <root@ucbvax.Berkeley.EDU>
Mon, 4 Jan 1982 12:50:31 +0000 (04:50 -0800)
e.g., bold to italic without roman inbetween.  Add SCCS Ids.  (EPA)

SCCS-vsn: usr.bin/ul/ul.c 4.3

usr/src/usr.bin/ul/ul.c

index 5a0790c..f8d7428 100644 (file)
@@ -1,4 +1,6 @@
 /*     @(#)vcrt.c      3.13    */
 /*     @(#)vcrt.c      3.13    */
+static char SccsId[] = "@(#)ul.c       4.3     (Berkeley)      %G%";
+
 #include <stdio.h>
 
 #define        IESC    '\033'
 #include <stdio.h>
 
 #define        IESC    '\033'
@@ -424,6 +426,9 @@ setmode(newmode)
 int newmode;
 {
        if (!iflag)
 int newmode;
 {
        if (!iflag)
+       {
+               if (curmode != NORMAL && newmode != NORMAL)
+                       setmode(NORMAL);
                switch (newmode) {
                case NORMAL:
                        switch(curmode) {
                switch (newmode) {
                case NORMAL:
                        switch(curmode) {
@@ -466,6 +471,7 @@ int newmode;
                        puts(ENTER_STANDOUT);
                        break;
                }
                        puts(ENTER_STANDOUT);
                        break;
                }
+       }
        curmode = newmode;
 }
 /*     @(#)getopt.c    3.2     */
        curmode = newmode;
 }
 /*     @(#)getopt.c    3.2     */