#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 */
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,
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);
}
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))