Reformated comments and long lines
[mmh] / uip / scan.c
index 52a40af..3a0e6c6 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * scan.c -- display a one-line "scan" listing of folder or messages
- *
- * 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.
- */
+** scan.c -- display a one-line "scan" listing of folder or messages
+**
+** 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 <h/fmt_scan.h>
@@ -44,15 +44,15 @@ static struct swit switches[] = {
 
 
 /*
- * global for sbr/formatsbr.c - yech!
- */
+** global for sbr/formatsbr.c - yech!
+*/
 #ifdef LBL
 extern struct msgs *fmt_current_folder;
 #endif
 
 /*
- * prototypes
- */
+** prototypes
+*/
 void clear_screen(void);  /* from termsbr.c */
 
 
@@ -83,8 +83,8 @@ main (int argc, char **argv)
        argp = arguments;
 
        /*
-        * Parse arguments
-        */
+       ** Parse arguments
+       */
        while ((cp = *argp++)) {
                if (*cp == '-') {
                        switch (smatch (++cp, switches)) {
@@ -95,8 +95,7 @@ main (int argc, char **argv)
                                        adios (NULL, "-%s unknown", cp);
 
                                case HELPSW:
-                                       snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
-                                               invo_name);
+                                       snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]", invo_name);
                                        print_help (buf, switches, 1);
                                        done (1);
                                case VERSIONSW:
@@ -116,7 +115,8 @@ main (int argc, char **argv)
                                        format = NULL;
                                        continue;
                                case FMTSW:
-                                       if (!(format = *argp++) || *format == '-')
+                                       if (!(format = *argp++) ||
+                                                       *format == '-')
                                                adios (NULL, "missing argument to %s", argp[-2]);
                                        form = NULL;
                                        continue;
@@ -161,13 +161,13 @@ main (int argc, char **argv)
                free (path ("./", TFOLDER));
 
        /*
-        * Get new format string.  Must be before chdir().
-        */
+       ** Get new format string.  Must be before chdir().
+       */
        nfs = new_fs (form, format, FORMAT);
 
        /*
-        * We are scanning a maildrop file
-        */
+       ** We are scanning a maildrop file
+       */
        if (file) {
                if (msgs.size)
                        adios (NULL, "\"msgs\" not allowed with -file");
@@ -201,8 +201,8 @@ main (int argc, char **argv)
        }
 
        /*
-        * We are scanning a folder
-        */
+       ** We are scanning a folder
+       */
 
        if (!msgs.size)
                app_msgarg(&msgs, "all");
@@ -232,9 +232,9 @@ main (int argc, char **argv)
        context_save ();  /* save the context file */
 
        /*
-        * Get the sequence number for each sequence
-        * specified by Unseen-Sequence
-        */
+       ** Get the sequence number for each sequence
+       ** specified by Unseen-Sequence
+       */
        if ((cp = context_find (usequence)) && *cp) {
                char **ap, *dp;
 
@@ -266,21 +266,23 @@ main (int argc, char **argv)
                                        admonish (cp, "unable to open message");
 #if 0
                                else
-                                       printf ("%*d  unreadable\n", DMAXFOLDER, msgnum);
+                                       printf ("%*d  unreadable\n",
+                                                       DMAXFOLDER, msgnum);
 #endif
                                continue;
                        }
 
 #ifndef JLR
                        if (hdrflag) {
-                               printf ("FOLDER %s\t%s\n", folder, dtimenow(1));
+                               printf ("FOLDER %s\t%s\n", folder,
+                                               dtimenow(1));
                        }
 #endif /* JLR */
 
                        /*
-                        * Check if message is in any sequence given
-                        * by Unseen-Sequence profile entry.
-                        */
+                       ** Check if message is in any sequence given
+                       ** by Unseen-Sequence profile entry.
+                       */
                        unseen = 0;
                        for (i = 0; i < num_unseen_seq; i++) {
                                if (in_sequence(mp, seqnum[i], msgnum)) {
@@ -298,13 +300,16 @@ main (int argc, char **argv)
                                        break;
 
                                default:
-                                       adios (NULL, "scan() botch (%d)", state);
+                                       adios (NULL, "scan() botch (%d)",
+                                                       state);
 
                                case SCNEOF:
 #if 0
-                                       printf ("%*d  empty\n", DMAXFOLDER, msgnum);
+                                       printf ("%*d  empty\n", DMAXFOLDER,
+                                                       msgnum);
 #else
-                                       advise (NULL, "message %d: empty", msgnum);
+                                       advise (NULL, "message %d: empty",
+                                                       msgnum);
 #endif
                                        break;
                        }