Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils/sysinst Fold long lines and a little KNF.



details:   https://anonhg.NetBSD.org/src/rev/8320b0de1360
branches:  trunk
changeset: 777628:8320b0de1360
user:      mbalmer <mbalmer%NetBSD.org@localhost>
date:      Sun Feb 26 10:17:44 2012 +0000

description:
Fold long lines and a little KNF.

diffstat:

 distrib/utils/sysinst/run.c |  17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diffs (62 lines):

diff -r f04454a257b1 -r 8320b0de1360 distrib/utils/sysinst/run.c
--- a/distrib/utils/sysinst/run.c       Sun Feb 26 08:44:12 2012 +0000
+++ b/distrib/utils/sysinst/run.c       Sun Feb 26 10:17:44 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: run.c,v 1.69 2012/01/05 21:29:24 christos Exp $        */
+/*     $NetBSD: run.c,v 1.70 2012/02/26 10:17:44 mbalmer Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -138,7 +138,8 @@
 
        (void)time(&tloc);
        if (script) {
-               scripting_fprintf(NULL, "# Script ended at: %s\n", asctime(localtime(&tloc)));
+               scripting_fprintf(NULL, "# Script ended at: %s\n",
+                   asctime(localtime(&tloc)));
                fflush(script);
                fclose(script);
                script = NULL;
@@ -150,7 +151,8 @@
                            asctime(localtime(&tloc)));
                        fflush(script);
                } else {
-                       msg_display(MSG_openfail, "script file", strerror(errno));
+                       msg_display(MSG_openfail, "script file",
+                           strerror(errno));
                }
        }
        return(0);
@@ -366,7 +368,7 @@
  */
 static int
 launch_subwin(WINDOW **actionwin, char **args, struct winsize *win, int flags,
-       const char *scmd, const char **errstr)
+    const char *scmd, const char **errstr)
 {
        int n, i;
        int selectfailed;
@@ -376,12 +378,10 @@
        char ibuf[MAXBUF];
        char pktdata;
        char *cp, *ncp;
-       struct termios rtt;
-       struct termios tt;
+       struct termios rtt, tt;
        struct timeval tmo;
        static int do_tioccons = 2;
 
-
        (void)tcgetattr(STDIN_FILENO, &tt);
        if (openpty(&master, &slave, NULL, &tt, win) == -1) {
                *errstr = "openpty() failed";
@@ -483,7 +483,8 @@
 
        for (selectfailed = 0;;) {
                if (selectfailed) {
-                       const char mmsg[] = "select(2) failed but no child died?";
+                       const char mmsg[] =
+                           "select(2) failed but no child died?";
                        if (logfp)
                                (void)fprintf(logfp, mmsg);
                        errx(1, mmsg);



Home | Main Index | Thread Index | Old Index