%%% Created Sat Jul 29 21:10:42 MDT 2006 by target lynx.patch. %%% diff -bru orig/lynx2-8-6/src/HTFWriter.c lynx2-8-6/src/HTFWriter.c --- orig/lynx2-8-6/src/HTFWriter.c Sun Jan 22 18:16:14 2006 +++ lynx2-8-6/src/HTFWriter.c Sat Jul 29 21:02:12 2006 @@ -81,9 +81,27 @@ * * A C T I O N R O U T I N E S * Bug: - * All errors are ignored. + * Most errors are ignored. */ +/* Error handling + * ------------------ + */ +static void HTFWriter_error(HTStream *me, char *id) +{ + char buf[200]; + + sprintf(buf, "%.60s: %.60s: %.60s", + id, + me->isa->name, + LYStrerror(errno)); + HTAlert(buf); +/* + * Only disaster results from: + * me->isa->_abort(me, NULL); + */ +} + /* Character handling * ------------------ */ @@ -109,8 +127,13 @@ */ static void HTFWriter_write(HTStream *me, const char *s, int l) { + size_t result; + if (me->fp) { - fwrite(s, 1, l, me->fp); + result = fwrite(s, 1, l, me->fp); + if (result!=l) { + HTFWriter_error(me, "HTFWriter_write"); + } } } @@ -487,7 +510,8 @@ "FileWriter", HTFWriter_free, HTFWriter_abort, - HTFWriter_put_character, HTFWriter_put_string, + HTFWriter_put_character, + HTFWriter_put_string, HTFWriter_write };