~ubuntu-branches/ubuntu/vivid/bc/vivid-proposed

« back to all changes in this revision

Viewing changes to bc/load.c

  • Committer: Bazaar Package Importer
  • Author(s): Ian Jackson
  • Date: 2006-04-04 17:21:02 UTC
  • Revision ID: james.westby@ubuntu.com-20060404172102-64vnydii80rn39jt
Tags: 1.06-19ubuntu1
Make dc notice read and write errors on its input and output.
I grepped for mentions of the strings `putc', `print', `getc', `FILE',
`stdin', `stdout' and `stderr' and added calls to new error-checking
functions unless it was clear from the immediately-surrounding code
that the program was exiting nonzero, or would exit nonzero if the
call failed.  I ignored hits in lib/getopt*, which seems to
pervasively ignore write errors when printing usage messages, in the
hope that these were correct.  I _think_ I got them all.  -iwj.

Show diffs side-by-side

added added

removed removed

Lines of Context:
217
217
                if (label_no > 65535L)
218
218
                  {  /* Better message? */
219
219
                    fprintf (stderr,"Program too big.\n");
 
220
                    checkferror_output(stderr);
220
221
                    exit(1);
221
222
                  }
222
223
                addbyte ( (char) (label_no & 0xFF));