Some style(9) fixes

No functional changes

Obtained from:	OpenBSD
This commit is contained in:
Baptiste Daroussin 2016-05-09 20:55:00 +00:00
parent 8d791e5af1
commit d819303ada

View File

@ -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<maxcol; i++) {
for (i = 0; i < maxcol; i++) {
if (obuf[i].c_mode != lastmode) {
hadmodes++;
setnewmode(obuf[i].c_mode);