]> diplodocus.org Git - nmh/blobdiff - uip/distsbr.c
Use existing macros min() and max() more.
[nmh] / uip / distsbr.c
index bdea4b144c3f79906081a9a1f629a5ef678de81c..91eb0a8b2a60cfc9a36217a245a2cfc3af2ff138 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * distsbr.c -- routines to do additional "dist-style" processing
+/* distsbr.c -- routines to do additional "dist-style" processing
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -29,7 +27,7 @@ distout (char *drft, char *msgnam, char *backup)
 {
     int state;
     char *dp, *resent;
-    char name[NAMESZ], buffer[BUFSIZ];
+    char name[NAMESZ], buffer[NMH_BUFSIZ];
     FILE *ifp, *ofp;
     m_getfld_state_t gstate = 0;
 
@@ -126,15 +124,19 @@ static void
 ready_msg (char *msgnam)
 {
     int state, out;
-    char name[NAMESZ], buffer[BUFSIZ], tmpfil[BUFSIZ];
+    char name[NAMESZ], buffer[NMH_BUFSIZ], tmpfil[BUFSIZ];
     FILE *ifp, *ofp;
     char *cp = NULL;
     m_getfld_state_t gstate = 0;
 
-    if (hdrfd != NOTOK)
-       close (hdrfd), hdrfd = NOTOK;
-    if (txtfd != NOTOK)
-       close (txtfd), txtfd = NOTOK;
+    if (hdrfd != NOTOK) {
+        close (hdrfd);
+        hdrfd = NOTOK;
+    }
+    if (txtfd != NOTOK) {
+        close (txtfd);
+        txtfd = NOTOK;
+    }
 
     if ((ifp = fopen (msgnam, "r")) == NULL)
        adios (msgnam, "unable to open message");