X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/0157c8ce4707d5d05ce1741950bf1746b02f5514..9e4dbc2d5379b96a8d90e28cf8fce803d6cc1ff4:/uip/picksbr.c diff --git a/uip/picksbr.c b/uip/picksbr.c index ca330b96..90025abd 100644 --- a/uip/picksbr.c +++ b/uip/picksbr.c @@ -116,7 +116,7 @@ static unsigned char cc[] = { #define pinform if (!talked++) inform struct nexus { - int (*n_action)(); + int (*n_action)(struct nexus *n, FILE *fp, int msgnum, long start, long stop); union { /* for {OR,AND,NOT}action */ @@ -180,7 +180,7 @@ static struct nexus *parse(void); static struct nexus *nexp1(void); static struct nexus *nexp2(void); static struct nexus *nexp3(void); -static struct nexus *newnexus(int (*)(struct nexus *n, +static struct nexus *newnexus(int (*action)(struct nexus *n, FILE *fp, int msgnum, long start, long stop)); static int ORaction(struct nexus *n, FILE *fp, int msgnum, @@ -519,8 +519,7 @@ PRaction (struct nexus *n, int level) dasctime (&n->n_tws, TW_NULL)); return; } - fprintf (stderr, "UNKNOWN(0x%x)\n", - (unsigned int)(unsigned long) (*n->n_action)); + fprintf(stderr, "UNKNOWN(%#llx)\n", (unsigned long long)n->n_action); } @@ -925,20 +924,21 @@ TWSaction(struct nexus *n, FILE *fp, int msgnum, long start, long stop) char *bp; char buf[NMH_BUFSIZ], name[NAMESZ]; struct tws *tw; - m_getfld_state_t gstate = 0; + m_getfld_state_t gstate; NMH_UNUSED (stop); fseek (fp, start, SEEK_SET); + gstate = m_getfld_state_init(fp); for (bp = NULL;;) { int bufsz = sizeof buf; - switch (state = m_getfld (&gstate, name, buf, &bufsz, fp)) { + switch (state = m_getfld2(&gstate, name, buf, &bufsz)) { case FLD: case FLDPLUS: mh_xfree(bp); bp = mh_xstrdup(buf); while (state == FLDPLUS) { bufsz = sizeof buf; - state = m_getfld (&gstate, name, buf, &bufsz, fp); + state = m_getfld2(&gstate, name, buf, &bufsz); bp = add (buf, bp); } if (!strcasecmp (name, n->n_datef))