]> diplodocus.org Git - nmh/blobdiff - uip/mhcachesbr.c
Alter HasSuffixC()'s char * to be const.
[nmh] / uip / mhcachesbr.c
index 7814d6ee692126dc9dccc051568a84d68596a081..7afbadd5bc48d7b709b660f007a0a4841cdfeeaf 100644 (file)
@@ -9,7 +9,6 @@
 
 #include <h/mh.h>
 #include <fcntl.h>
-#include <h/signals.h>
 #include <h/md5.h>
 #include <h/mts.h>
 #include <h/tws.h>
@@ -38,7 +37,7 @@ char *cache_private;
 
 
 /* mhmisc.c */
-int part_ok (CT, int);
+int part_ok (CT);
 int type_ok (CT, int);
 void content_error (char *, CT, char *, ...);
 void flush_errors (void);
@@ -136,7 +135,9 @@ cache_content (CT ct)
 
            while ((cc = fread (buffer, sizeof(*buffer), sizeof(buffer), gp))
                       > 0)
-               fwrite (buffer, sizeof(*buffer), cc, fp);
+               if ((int) fwrite (buffer, sizeof(*buffer), cc, fp) < cc) {
+                   advise ("cache_content", "fwrite");
+               }
            fflush (fp);
 
            if (ferror (gp)) {
@@ -257,7 +258,7 @@ got_it:
        snprintf (bp, buflen, "\n    in file %s? ", buffer);
 
        /* Now, check answer */
-       if (!getanswer (query))
+       if (!read_yes_or_no_if_tty (query))
            status = NOTOK;
     }