X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/4a78cbcd4fa986d9c1e7bd0a5a4bdb619faeb7cb..9f8418e870a70c264eda1598f2d470e5428c216d:/uip/burst.c diff --git a/uip/burst.c b/uip/burst.c index c3f21710..0cfb4065 100644 --- a/uip/burst.c +++ b/uip/burst.c @@ -42,7 +42,6 @@ struct smsg { */ int debugsw = 0; -pid_t xpid = 0; /* * static prototypes @@ -75,13 +74,7 @@ main (int argc, char **argv) struct smsg *smsgs; struct msgs *mp; -#ifdef LOCALE - setlocale(LC_ALL, ""); -#endif - invo_name = r1bindex (argv[0], '/'); - - /* read user profile/context */ - context_read(); + if (nmh_init(argv[0], 1)) { return 1; } arguments = getarguments (invo_name, argc, argv, 1); argp = arguments; @@ -171,10 +164,7 @@ main (int argc, char **argv) done (1); seq_setprev (mp); /* set the previous-sequence */ - smsgs = (struct smsg *) - calloc ((size_t) (MAXFOLDER + 2), sizeof(*smsgs)); - if (smsgs == NULL) - adios (NULL, "unable to allocate burst storage"); + smsgs = mh_xcalloc(MAXFOLDER + 2, sizeof *smsgs); hi = mp->hghmsg + 1; @@ -294,7 +284,7 @@ find_delim (int msgnum, struct smsg *smsgs, int *mimesw) /* * Read in lines until we get to a message delimiter. * - * Previously we checked to make sure the preceeding line and + * Previously we checked to make sure the preceding line and * next line was a newline. That actually does not comply with * RFC 934, so make sure we break on a message delimiter even * if the previous character was NOT a newline. @@ -510,14 +500,14 @@ burst (struct msgs **mpp, int msgnum, struct smsg *smsgs, int numburst, #define S4 3 /* - * Copy a mesage which is being burst out of a digest. + * Copy a message which is being burst out of a digest. * It will remove any "dashstuffing" in the message. */ static void cpybrst (FILE *in, FILE *out, char *ifile, char *ofile, int len, int mime) { - register int c, state; + int c, state; for (state = mime ? S4 : S1; (c = fgetc (in)) != EOF && len > 0; len--) { if (c == 0)