]> diplodocus.org Git - nmh/blobdiff - sbr/seq_read.c
Fixed addition to test-inc-scanout in
[nmh] / sbr / seq_read.c
index f36edb56cfb8cf5cc9f79d0b0d45088fd9dced2e..3cf8ad89ceed44715dadaac7e5f97f7d325d3024 100644 (file)
@@ -3,14 +3,13 @@
  * seq_read.c -- read the .mh_sequence file and
  *            -- initialize sequence information
  *
- * $Id$
- *
  * 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
@@ -78,14 +77,16 @@ seq_public (struct msgs *mp)
 
     /* Use m_getfld to scan sequence file */
     for (state = FLD;;) {
-       switch (state = m_getfld (state, name, field, sizeof(field), fp)) {
+       int fieldsz = sizeof field;
+       switch (state = m_getfld (state, name, field, &fieldsz, fp)) {
            case FLD: 
            case FLDPLUS:
            case FLDEOF: 
                if (state == FLDPLUS) {
                    cp = getcpy (field);
                    while (state == FLDPLUS) {
-                       state = m_getfld (state, name, field, sizeof(field), fp);
+                       fieldsz = sizeof field;
+                       state = m_getfld (state, name, field, &fieldsz, fp);
                        cp = add (field, cp);
                    }
                    seq_init (mp, getcpy (name), trimcpy (cp));
@@ -159,7 +160,8 @@ seq_private (struct msgs *mp)
 static int
 seq_init (struct msgs *mp, char *name, char *field)
 {
-    int i, j, k, is_current;
+    unsigned int i;
+    int j, k, is_current;
     char *cp, **ap;
 
     /*