Reformated comments and long lines
[mmh] / sbr / seq_read.c
index 6945f00..448f9ef 100644 (file)
@@ -1,36 +1,36 @@
 /*
- * seq_read.c -- read the .mh_sequence file and
- *            -- initialize sequence information
- *
- * 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.
- */
+** seq_read.c -- read the .mh_sequence file and
+**            -- initialize sequence information
+**
+** 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/utils.h>
 
 /*
- * static prototypes
- */
+** static prototypes
+*/
 static int seq_init (struct msgs *, char *, char *);
 static void seq_public (struct msgs *);
 static void seq_private (struct msgs *);
 
 
 /*
- * Get the sequence information for this folder from
- * .mh_sequences (or equivalent specified in .mh_profile)
- * or context file (for private sequences).
- */
+** Get the sequence information for this folder from
+** .mh_sequences (or equivalent specified in .mh_profile)
+** or context file (for private sequences).
+*/
 
 void
 seq_read (struct msgs *mp)
 {
        /*
-        * Initialize the list of sequence names.  Go ahead and
-        * add the "cur" sequence to the list of sequences.
-        */
+       ** Initialize the list of sequence names.  Go ahead and
+       ** add the "cur" sequence to the list of sequences.
+       */
        mp->msgattrs[0] = getcpy (current);
        mp->msgattrs[1] = NULL;
        make_all_public (mp);  /* initially, make all public */
@@ -48,8 +48,8 @@ seq_read (struct msgs *mp)
 
 
 /*
- * read folder's sequences file for public sequences
- */
+** read folder's sequences file for public sequences
+*/
 
 static void
 seq_public (struct msgs *mp)
@@ -60,11 +60,11 @@ seq_public (struct msgs *mp)
        FILE *fp;
 
        /*
-        * If mh_seq == NULL (such as if nmh been compiled with
-        * NOPUBLICSEQ), or if *mh_seq == '\0' (the user has defined
-        * the "mh-sequences" profile entry, but left it empty),
-        * then just return, and do not initialize any public sequences.
-        */
+       ** If mh_seq == NULL (such as if nmh been compiled with
+       ** NOPUBLICSEQ), or if *mh_seq == '\0' (the user has defined
+       ** the "mh-sequences" profile entry, but left it empty),
+       ** then just return, and do not initialize any public sequences.
+       */
        if (mh_seq == NULL || *mh_seq == '\0')
                return;
 
@@ -114,11 +114,11 @@ seq_public (struct msgs *mp)
 
 
 /*
- * Scan profile/context list for private sequences.
- *
- * We search the context list for all keys that look like
- * "atr-seqname-folderpath", and add them as private sequences.
- */
+** Scan profile/context list for private sequences.
+**
+** We search the context list for all keys that look like
+** "atr-seqname-folderpath", and add them as private sequences.
+*/
 
 static void
 seq_private (struct msgs *mp)
@@ -145,14 +145,14 @@ seq_private (struct msgs *mp)
 
 
 /*
- * Add the name of sequence to the list of folder sequences.
- * Then parse the list of message ranges for this
- * sequence, and setup the various bit flags for each
- * message in the sequence.
- *
- * Return internal index for the sequence if successful.
- * Return -1 on error.
- */
+** Add the name of sequence to the list of folder sequences.
+** Then parse the list of message ranges for this
+** sequence, and setup the various bit flags for each
+** message in the sequence.
+**
+** Return internal index for the sequence if successful.
+** Return -1 on error.
+*/
 
 static int
 seq_init (struct msgs *mp, char *name, char *field)
@@ -161,17 +161,17 @@ seq_init (struct msgs *mp, char *name, char *field)
        char *cp, **ap;
 
        /*
-        * Check if this is "cur" sequence,
-        * so we can do some special things.
-        */
+       ** Check if this is "cur" sequence,
+       ** so we can do some special things.
+       */
        is_current = !strcmp (current, name);
 
        /*
-        * Search for this sequence name to see if we've seen
-        * it already.  If we've seen this sequence before,
-        * then clear the bit for this sequence from all the
-        * mesages in this folder.
-        */
+       ** Search for this sequence name to see if we've seen
+       ** it already.  If we've seen this sequence before,
+       ** then clear the bit for this sequence from all the
+       ** mesages in this folder.
+       */
        for (i = 0; mp->msgattrs[i]; i++) {
                if (!strcmp (mp->msgattrs[i], name)) {
                        for (j = mp->lowmsg; j <= mp->hghmsg; j++)
@@ -188,9 +188,9 @@ seq_init (struct msgs *mp, char *name, char *field)
        }
 
        /*
-        * If we've already seen this sequence name, just free the
-        * name string.  Else add it to the list of sequence names.
-        */
+       ** If we've already seen this sequence name, just free the
+       ** name string.  Else add it to the list of sequence names.
+       */
        if (mp->msgattrs[i]) {
                free (name);
        } else {
@@ -199,8 +199,8 @@ seq_init (struct msgs *mp, char *name, char *field)
        }
 
        /*
-        * Split up the different message ranges at whitespace
-        */
+       ** Split up the different message ranges at whitespace
+       */
        for (ap = brkstring (field, " ", "\n"); *ap; ap++) {
                if ((cp = strchr(*ap, '-')))
                        *cp++ = '\0';
@@ -208,19 +208,19 @@ seq_init (struct msgs *mp, char *name, char *field)
                        k = cp ? m_atoi (cp) : j;
 
                        /*
-                        * Keep mp->curmsg and "cur" sequence in synch.  Unlike
-                        * other sequences, this message doesn't need to exist.
-                        * Think about the series of command (rmm; next) to
-                        * understand why this can be the case.  But if it does
-                        * exist, we will still set the bit flag for it like
-                        * other sequences.
-                        */
+                       ** Keep mp->curmsg and "cur" sequence in synch.  Unlike
+                       ** other sequences, this message doesn't need to exist.
+                       ** Think about the series of command (rmm; next) to
+                       ** understand why this can be the case.  But if it does
+                       ** exist, we will still set the bit flag for it like
+                       ** other sequences.
+                       */
                        if (is_current)
                                mp->curmsg = j;
                        /*
-                        * We iterate through messages in this range
-                        * and flip on bit for this sequence.
-                        */
+                       ** We iterate through messages in this range
+                       ** and flip on bit for this sequence.
+                       */
                        for (; j <= k; j++) {
                                if (j >= mp->lowmsg && j <= mp->hghmsg && does_exist(mp, j))
                                        add_sequence (mp, i, j);