-/* variable-argument internal error function. */
-
-void
-barf(char *s, ...)
-{
- va_list ap;
- va_start(ap,s);
- /* don't fflush(stdout); WORKAROUND bug in Linux glibc */
- if (prog_argv != NULL && prog_argv[0] != NULL) {
- fprintf(stderr, "%s: internal error: ", prog_argv[0]);
- } else {
- fprintf(stderr, "internal error: ");
- }
- vfprintf(stderr, s, ap);
- fprintf(stderr, "\n");
- fprintf(stderr, " Please report this as a bug to glasgow-haskell-bugs@haskell.org,\n or http://www.sourceforge.net/projects/ghc/\n");
- fflush(stderr);
- stg_exit(EXIT_INTERNAL_ERROR);
- va_end(ap);
-}
-
-void
-prog_belch(char *s, ...)
-{
- va_list ap;
- va_start(ap,s);
- /* don't fflush(stdout); WORKAROUND bug in Linux glibc */
- if (prog_argv != NULL && prog_argv[0] != NULL) {
- fprintf(stderr, "%s: ", prog_argv[0]);
- }
- vfprintf(stderr, s, ap);
- fprintf(stderr, "\n");
- va_end(ap);
-}