Reformated comments and long lines
[mmh] / uip / prompter.c
index f92eda1..88a56df 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * prompter.c -- simple prompting editor front-end
- *
- * This code is Copyright (c) 2002, by the authors of nmh.  See the
- * COPYRIGHT file in the root directory of the nmh distribution for
- * complete copyright information.
- */
+** prompter.c -- simple prompting editor front-end
+**
+** This code is Copyright (c) 2002, by the authors of nmh.  See the
+** COPYRIGHT file in the root directory of the nmh distribution for
+** complete copyright information.
+*/
 
 #include <h/mh.h>
 #include <fcntl.h>
@@ -87,8 +87,8 @@ static int sigint = 0;
 static jmp_buf sigenv;
 
 /*
- * prototypes
- */
+** prototypes
+*/
 int getln (char *, int);
 static int chrcnv (char *);
 static void chrdsp (char *, char);
@@ -128,8 +128,9 @@ main (int argc, char **argv)
                                        adios (NULL, "-%s unknown", cp);
 
                                case HELPSW:
-                                       snprintf (buffer, sizeof(buffer), "%s [switches] file",
-                                               invo_name);
+                                       snprintf (buffer, sizeof(buffer),
+                                                       "%s [switches] file",
+                                                       invo_name);
                                        print_help (buffer, switches, 1);
                                        done (1);
                                case VERSIONSW:
@@ -173,9 +174,8 @@ main (int argc, char **argv)
                                        doteof = 0;
                                        continue;
                        }
-               } else {
-                       if (!drft)
-                               drft = cp;
+               } else if (!drft) {
+                       drft = cp;
                }
 
        if (!drft)
@@ -184,13 +184,14 @@ main (int argc, char **argv)
                adios (drft, "unable to open");
 
        tfile = m_mktemp2(NULL, invo_name, NULL, &out);
-       if (tfile == NULL) adios("prompter", "unable to create temporary file");
+       if (tfile == NULL)
+               adios("prompter", "unable to create temporary file");
        chmod (tmpfil, 0600);
        strncpy (tmpfil, tfile, sizeof(tmpfil));
 
        /*
-        * Are we changing the kill or erase character?
-        */
+       ** Are we changing the kill or erase character?
+       */
        if (killp || erasep) {
 #ifdef HAVE_TERMIOS_H
                cc_t save_erase, save_kill;
@@ -237,10 +238,10 @@ main (int argc, char **argv)
                fflush (stdout);
 
                /*
-                * We set the kill and erase character back to original
-                * setup in terminal structure so we can easily
-                * restore it upon exit.
-                */
+               ** We set the kill and erase character back to original
+               ** setup in terminal structure so we can easily
+               ** restore it upon exit.
+               */
                KILL = save_kill;
                ERASE = save_erase;
        }
@@ -249,17 +250,17 @@ main (int argc, char **argv)
        SIGNAL2 (SIGINT, intrser);
 
        /*
-        * Loop through the lines of the draft skeleton.
-        */
+       ** Loop through the lines of the draft skeleton.
+       */
        for (state = FLD;;) {
                switch (state = m_getfld (state, name, field, sizeof(field), in)) {
                        case FLD:
                        case FLDEOF:
                        case FLDPLUS:
                                /*
-                                * Check if the value of field contains anything
-                                * other than space or tab.
-                                */
+                               ** Check if the value of field contains
+                               ** anything other than space or tab.
+                               */
                                for (cp = field; *cp; cp++)
                                        if (*cp != ' ' && *cp != '\t')
                                                break;