diff --git a/usr.bin/ul/ul.c b/usr.bin/ul/ul.c index 7aecf6c1ec7e..cc76e3c6aeb3 100644 --- a/usr.bin/ul/ul.c +++ b/usr.bin/ul/ul.c @@ -113,9 +113,8 @@ main(int argc, char **argv) termtype = getenv("TERM"); if (termtype == NULL || (argv[0][0] == 'c' && !isatty(1))) termtype = "lpr"; - while ((c=getopt(argc, argv, "it:T:")) != -1) - switch(c) { - + while ((c = getopt(argc, argv, "it:T:")) != -1) + switch (c) { case 't': case 'T': /* for nroff compatibility */ termtype = optarg; @@ -127,24 +126,21 @@ main(int argc, char **argv) usage(); } - switch(tgetent(termcap, termtype)) { - + switch (tgetent(termcap, termtype)) { case 1: break; - default: warnx("trouble reading termcap"); /* FALLTHROUGH */ - case 0: /* No such terminal type - assume dumb */ (void)strcpy(termcap, "dumb:os:col#80:cr=^M:sf=^J:am:"); break; } initcap(); - if ( (tgetflag("os") && ENTER_BOLD==NULL ) || - (tgetflag("ul") && ENTER_UNDERLINE==NULL && UNDER_CHAR==NULL)) - must_overstrike = 1; + if ((tgetflag("os") && ENTER_BOLD == NULL ) || + (tgetflag("ul") && ENTER_UNDERLINE == NULL && UNDER_CHAR == NULL)) + must_overstrike = 1; initbuf(); if (optind == argc) filter(stdin); @@ -307,7 +303,7 @@ flushln(void) int hadmodes = 0; lastmode = NORMAL; - for (i=0; i