home *** CD-ROM | disk | FTP | other *** search
- #ifdef __STDC__
- static char sccs_id[] = "@(#) assert.c 1.0 " __DATE__ " HJR";
- #else
- static char sccs_id[] = "@(#) assert.c 1.0 26/9/90 HJR";
- #endif
-
- /* assert.c (c) Copyright 1990 H.Rogers */
-
- #include <stdio.h>
- #include <signal.h>
- #include <assert.h>
-
- #ifdef __STDC__
- int
- __fail (char *exp, char *file, int line)
- #else
- int
- __fail (exp, file, line)
- char *exp;
- char *file;
- int line;
- #endif
- {
- fprintf (stderr, "\n\"%s\", line %d: Assertion failed: %s\n", file, line, exp);
- raise (SIGABRT);
- return (0);
- }
-
- #ifdef __STDC__
- void (assert) (register int x)
- #else
- void (assert) (x)
- register int x;
- #endif
- {
- assert (x);
- }
-