svn commit: r299287 - head/usr.bin/ul
Baptiste Daroussin
bapt at FreeBSD.org
Mon May 9 20:55:02 UTC 2016
Author: bapt
Date: Mon May 9 20:55:00 2016
New Revision: 299287
URL: https://svnweb.freebsd.org/changeset/base/299287
Log:
Some style(9) fixes
No functional changes
Obtained from: OpenBSD
Modified:
head/usr.bin/ul/ul.c
Modified: head/usr.bin/ul/ul.c
==============================================================================
--- head/usr.bin/ul/ul.c Mon May 9 20:50:21 2016 (r299286)
+++ head/usr.bin/ul/ul.c Mon May 9 20:55:00 2016 (r299287)
@@ -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);
More information about the svn-src-all
mailing list