X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/5c01446c027960e00b33f623212de645475569aa..4e5acdb9a2894eca56cb7ffa022635b9af35acef:/uip/picksbr.c diff --git a/uip/picksbr.c b/uip/picksbr.c index 432bcf10..4d4d99a1 100644 --- a/uip/picksbr.c +++ b/uip/picksbr.c @@ -519,7 +519,10 @@ PRaction (struct nexus *n, int level) dasctime (&n->n_tws, TW_NULL)); return; } - fprintf(stderr, "UNKNOWN(%#llx)\n", (unsigned long long)n->n_action); + + generic_pointer gp; + gp.f = (void (*)(void))n->n_action; + fprintf(stderr, "UNKNOWN(%p)\n", gp.v); } @@ -641,21 +644,23 @@ cerror: ; static int GREPaction(struct nexus *n, FILE *fp, int msgnum, long start, long stop) { - int c, body, lf; + int c; + bool body; + bool lf; long pos = start; char *p1, *p2, *ebp, *cbp; char ibuf[BUFSIZ]; NMH_UNUSED (msgnum); fseek (fp, start, SEEK_SET); - body = 0; + body = false; ebp = cbp = ibuf; for (;;) { if (body && n->n_header) return 0; p1 = linebuf; p2 = cbp; - lf = 0; + lf = false; for (;;) { if (p2 >= ebp) { if (fgets (ibuf, sizeof ibuf, fp) == NULL @@ -674,16 +679,16 @@ GREPaction(struct nexus *n, FILE *fp, int msgnum, long start, long stop) --p2; break; } - lf = 0; + lf = false; } if (c == '\n') { if (body) break; if (lf) { - body++; + body = true; break; } - lf++; + lf = true; /* Unfold by skipping the newline. */ c = 0; } @@ -698,7 +703,7 @@ GREPaction(struct nexus *n, FILE *fp, int msgnum, long start, long stop) /* Attempt to decode as a MIME header. If it's the last header, body will be 1 and lf will be at least 1. */ - if ((body == 0 || lf > 0) && + if ((!body || lf) && decode_rfc2047 (linebuf, decoded_linebuf, sizeof decoded_linebuf)) { p1 = decoded_linebuf; } @@ -955,7 +960,7 @@ TWSaction(struct nexus *n, FILE *fp, int msgnum, long start, long stop) return 0; default: - adios (NULL, "internal error -- you lose"); + die("internal error -- you lose"); } break; }