X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/afee8ed17a56617618fb7f963b111d7cf0fb56e7..a404a36988ef8eb4b640bdd1d3f30298e0ca5182:/uip/distsbr.c diff --git a/uip/distsbr.c b/uip/distsbr.c index b5119fbe..d371ec1d 100644 --- a/uip/distsbr.c +++ b/uip/distsbr.c @@ -28,8 +28,7 @@ int distout (char *drft, char *msgnam, char *backup) { int state; - register unsigned char *dp; - register char *resent; + char *dp, *resent; char name[NAMESZ], buffer[BUFSIZ]; register FILE *ifp, *ofp; m_getfld_state_t gstate = 0; @@ -74,7 +73,7 @@ distout (char *drft, char *msgnam, char *backup) case BODY: for (dp = buffer; *dp; dp++) - if (!isspace (*dp)) { + if (!isspace ((unsigned char) *dp)) { advise (NULL, BADTXT, "draft"); goto leave_bad; } @@ -142,9 +141,8 @@ ready_msg (char *msgnam) cp = m_mktemp2(NULL, "dist", &hdrfd, NULL); if (cp == NULL) { - adios("distsbr", "unable to create temporary file"); + adios(NULL, "unable to create temporary file in %s", get_temp_dir()); } - fchmod(hdrfd, 0600); strncpy(tmpfil, cp, sizeof(tmpfil)); if ((out = dup (hdrfd)) == NOTOK || (ofp = fdopen (out, "w")) == NULL) @@ -171,7 +169,8 @@ ready_msg (char *msgnam) cp = m_mktemp2(NULL, "dist", &txtfd, NULL); if (cp == NULL) { - adios("distsbr", "unable to create temporary file"); + adios(NULL, "unable to create temporary file in %s", + get_temp_dir()); } fchmod(txtfd, 0600); strncpy (tmpfil, cp, sizeof(tmpfil));