Reformated comments and long lines
[mmh] / uip / pick.c
index a4f61bd..95f99cd 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * pick.c -- search for messages by content
- *
- * This code is Copyright (c) 2002, 2008, by the authors of nmh.  See the
- * COPYRIGHT file in the root directory of the nmh distribution for
- * complete copyright information.
- */
+** pick.c -- search for messages by content
+**
+** This code is Copyright (c) 2002, 2008, 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/tws.h>
@@ -107,8 +107,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);
                                listsw = 0;  /* HACK */
                                done (1);
@@ -128,8 +127,9 @@ main (int argc, char **argv)
                        case SRCHSW:
                                vec[vecp++] = --cp;
                        pattern:
-                               if (!(cp = *argp++))/* allow -xyz arguments */
-                                       adios (NULL, "missing argument to %s", argp[-2]);
+                               if (!(cp = *argp++)) /* allow -xyz arguments */
+                                       adios (NULL, "missing argument to %s",
+                                                       argp[-2]);
                                vec[vecp++] = cp;
                                continue;
                        case OTHRSW:
@@ -145,7 +145,8 @@ main (int argc, char **argv)
 
                        case SEQSW:
                                if (!(cp = *argp++) || *cp == '-')
-                                       adios (NULL, "missing argument to %s", argp[-2]);
+                                       adios (NULL, "missing argument to %s",
+                                                       argp[-2]);
 
                                /* check if too many sequences specified */
                                if (seqp >= NUMATTRS)
@@ -183,7 +184,7 @@ main (int argc, char **argv)
                        else
                                folder = pluspath (cp);
                } else
-                               app_msgarg(&msgs, cp);
+                       app_msgarg(&msgs, cp);
        }
        vec[vecp] = NULL;
 
@@ -191,9 +192,9 @@ main (int argc, char **argv)
                free (path ("./", TFOLDER));
 
        /*
-        * If we didn't specify which messages to search,
-        * then search the whole folder.
-        */
+       ** If we didn't specify which messages to search,
+       ** then search the whole folder.
+       */
        if (!msgs.size)
                app_msgarg(&msgs, "all");
 
@@ -219,14 +220,15 @@ main (int argc, char **argv)
        seq_setprev (mp);  /* set the previous-sequence */
 
        /*
-        * If we aren't saving the results to a sequence,
-        * we default to list the results.
-        */
+       ** If we aren't saving the results to a sequence,
+       ** we default to list the results.
+       */
        if (listsw == -1)
                listsw = !seqp;
 
        if (publicsw == 1 && is_readonly(mp))
-               adios (NULL, "folder %s is read-only, so -public not allowed", folder);
+               adios (NULL, "folder %s is read-only, so -public not allowed",
+                               folder);
 
        if (!pcompile (vec, NULL))
                done (1);
@@ -234,15 +236,17 @@ main (int argc, char **argv)
        lo = mp->lowsel;
        hi = mp->hghsel;
 
-       /* If printing message numbers to standard out, force line buffering on.
-        */
+       /*
+       ** If printing message numbers to standard out,
+       ** force line buffering on.
+       */
        if (listsw)
                setvbuf (stdout, NULL, _IOLBF, 0);
 
        /*
-        * Scan through all the SELECTED messages and check for a
-        * match.  If the message does not match, then unselect it.
-        */
+       ** Scan through all the SELECTED messages and check for a
+       ** match.  If the message does not match, then unselect it.
+       */
        for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {
                if (is_selected (mp, msgnum)) {
                        if ((fp = fopen (cp = m_name (msgnum), "r")) == NULL)
@@ -274,15 +278,15 @@ main (int argc, char **argv)
        seqs[seqp] = NULL;
 
        /*
-        * Add the matching messages to sequences
-        */
+       ** Add the matching messages to sequences
+       */
        for (seqp = 0; seqs[seqp]; seqp++)
                if (!seq_addsel (mp, seqs[seqp], publicsw, zerosw))
                        done (1);
 
        /*
-        * Print total matched if not printing each matched message number.
-        */
+       ** Print total matched if not printing each matched message number.
+       */
        if (!listsw) {
                printf ("%d hit%s\n", mp->numsel, mp->numsel == 1 ? "" : "s");
        }