X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/19bf8698eeb0ab3d7694232af115fa3f007d5c7b..ef1ba39e8dae81091b6c3e73e72825ef6edea3c6:/uip/mhcachesbr.c diff --git a/uip/mhcachesbr.c b/uip/mhcachesbr.c index 7814d6ee..7afbadd5 100644 --- a/uip/mhcachesbr.c +++ b/uip/mhcachesbr.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include @@ -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; }