~ubuntu-branches/debian/sid/bc/sid

« back to all changes in this revision

Viewing changes to bc/util.c

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2009-04-16 10:23:39 UTC
  • Revision ID: james.westby@ubuntu.com-20090416102339-l7970sr667eekbvw
Tags: 1.06.94-3.1
* Non-maintainer upload with John's permission.
* Apply patch to restore the .dcrc config file (closes: #472250)
* Merge patch from Ubuntu to notice read and write errors on
  input and output (closes: #488735)
* Include the bc manual (HTML) in the bc binary package

* Bump Standards Version to 3.8.1
* Bump debhelper compatibility to 7
* debian/rules: replace "dh_clean -k" with "dh_prep"
* debian/control: Add homepage field
* Fix hyphens in the bc and dc manpages
* Add a watch file
* debian/dc.doc-base: Remove leading whitespace
* debian/dc.doc-base: Move to section Science/Mathematics

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
 
656
661
#ifdef OLD_EQ_OP
657
662
  printf ("Old assignment operatiors are valid. (=-, =+, ...)\n");
658
663
#endif 
 
664
  checkferror_output(stdout);
659
665
}
660
666
 
661
667
/* bc_malloc will check the return value so all other places do not
720
726
  fprintf (stderr,"%s %d: ",name,line_no);
721
727
  vfprintf (stderr, str, args);
722
728
  fprintf (stderr, "\n");
 
729
  checkferror_output(stderr);
723
730
  had_error = TRUE;
724
731
  va_end (args);
725
732
}
760
767
      fprintf (stderr,"%s %d: Error: ",name,line_no);
761
768
      vfprintf (stderr, mesg, args);
762
769
      fprintf (stderr, "\n");
 
770
      checkferror_output(stderr);
763
771
      had_error = TRUE;
764
772
    }
765
773
  else
772
780
        fprintf (stderr,"%s %d: (Warning) ",name,line_no);
773
781
        vfprintf (stderr, mesg, args);
774
782
        fprintf (stderr, "\n");
 
783
        checkferror_output(stderr);
775
784
      }
776
785
  va_end (args);
777
786
}
806
815
  va_end (args);
807
816
  
808
817
  fprintf (stderr, "\n");
 
818
  checkferror_output(stderr);
809
819
  runtime_error = TRUE;
810
820
}
811
821
 
842
852
  va_end (args);
843
853
 
844
854
  fprintf (stderr, "\n");
 
855
  checkferror_output(stderr);
845
856
}