1*53252Sbostic /*- 2*53252Sbostic * Copyright (c) 1992 The Regents of the University of California. 3*53252Sbostic * All rights reserved. 4*53252Sbostic * 5*53252Sbostic * %sccs.include.redist.c% 6*53252Sbostic */ 7*53252Sbostic 8*53252Sbostic #if defined(LIBC_SCCS) && !defined(lint) 9*53252Sbostic static char sccsid[] = "@(#)assert.c 5.1 (Berkeley) 04/23/92"; 10*53252Sbostic #endif /* LIBC_SCCS and not lint */ 11*53252Sbostic 12*53252Sbostic #include <sys/types.h> 13*53252Sbostic #include <assert.h> 14*53252Sbostic #include <stdio.h> 15*53252Sbostic #include <stdlib.h> 16*53252Sbostic 17*53252Sbostic void 18*53252Sbostic __assert(file, line, failedexpr) 19*53252Sbostic const char *file, *failedexpr; 20*53252Sbostic int line; 21*53252Sbostic { 22*53252Sbostic (void)fprintf(stderr, 23*53252Sbostic "assertion \"%s\" failed: file \"%s\", line %d\n", 24*53252Sbostic failedexpr, file, line); 25*53252Sbostic abort(); 26*53252Sbostic /* NOTREACHED */ 27*53252Sbostic } 28