assert.cc 438 B

12345678910111213141516171819
  1. /* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
  2. Written by James Clark (jjc@jclark.com) */
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. extern const char *program_name;
  6. void
  7. assertion_failed (int lineno, const char *filename)
  8. {
  9. if (program_name != 0)
  10. fprintf(stderr, "%s: ", program_name);
  11. fprintf(stderr, "Failed assertion at line %d, file `%s'.\n",
  12. lineno, filename);
  13. fflush(stderr);
  14. abort();
  15. }