~ubuntu-branches/ubuntu/saucy/bc/saucy-proposed

« back to all changes in this revision

Viewing changes to bc/util.c

  • Committer: Package Import Robot
  • Author(s): John G. Hasler
  • Date: 2012-06-22 21:00:45 UTC
  • Revision ID: package-import@ubuntu.com-20120622210045-cpu8v54e1x1z0ep0
Tags: 1.06.95-3
* Applied patch from Pádraig Brady.
  Closes: #608255: bc uses uninitialized memory

* Applied patch from Paul Dwerryhouse.
  Closes: #472250: please return support for .dcrc file

* Applied patch from Ian Jackson.
  Closes: #488735: notice read and write errors on input and output

* Generated bc.html and dc.html but something is still wrong.

* Added homepage field to debian/control.

* I can't see the problem with hyphens.

* Fixed doc-base white space.

* Added watch file.

* I believe that the above changes deal with 558188.
  Closes: #558188: Changes made in 1.06.94-3.1 NMU have been lost

Show diffs side-by-side

added added

removed removed

Lines of Context:
260
260
  continue_label = 0;
261
261
  next_label  = 1;
262
262
  out_count = 2;
263
 
  if (compile_only) 
 
263
  if (compile_only) {
264
264
    printf ("@i");
265
 
  else
 
265
    checkferror_output(stdout);
 
266
  } else
266
267
    init_load ();
267
268
  had_error = FALSE;
268
269
  did_gen = FALSE;
286
287
          printf ("\n");
287
288
          out_count = 0;
288
289
        }
 
290
      checkferror_output(stdout);
289
291
    }
290
292
  else
291
293
    load_code (str);
303
305
      if (compile_only)
304
306
        {
305
307
          printf ("@r\n"); 
 
308
          checkferror_output(stdout);
306
309
          out_count = 0;
307
310
        }
308
311
      else
341
344
        }
342
345
      putchar (ch);
343
346
    }
 
347
  checkferror_output(stdout);
344
348
}
345
349
 
346
350
/* Output routines: Write a character CH to the standard output.
371
375
        }
372
376
      putchar (ch);
373
377
    }
 
378
  checkferror_output(stdout);
374
379
}
375
380
 
376
381
 
657
662
#ifdef OLD_EQ_OP
658
663
  printf ("Old assignment operatiors are valid. (=-, =+, ...)\n");
659
664
#endif 
 
665
  checkferror_output(stdout);
660
666
}
661
667
 
662
668
/* bc_malloc will check the return value so all other places do not
721
727
  fprintf (stderr,"%s %d: ",name,line_no);
722
728
  vfprintf (stderr, str, args);
723
729
  fprintf (stderr, "\n");
 
730
  checkferror_output(stderr);
724
731
  had_error = TRUE;
725
732
  va_end (args);
726
733
}
761
768
      fprintf (stderr,"%s %d: Error: ",name,line_no);
762
769
      vfprintf (stderr, mesg, args);
763
770
      fprintf (stderr, "\n");
 
771
      checkferror_output(stderr);
764
772
      had_error = TRUE;
765
773
    }
766
774
  else
773
781
        fprintf (stderr,"%s %d: (Warning) ",name,line_no);
774
782
        vfprintf (stderr, mesg, args);
775
783
        fprintf (stderr, "\n");
 
784
        checkferror_output(stderr);
776
785
      }
777
786
  va_end (args);
778
787
}
807
816
  va_end (args);
808
817
  
809
818
  fprintf (stderr, "\n");
 
819
  checkferror_output(stderr);
810
820
  runtime_error = TRUE;
811
821
}
812
822
 
843
853
  va_end (args);
844
854
 
845
855
  fprintf (stderr, "\n");
 
856
  checkferror_output(stderr);
846
857
}