Headers and library sources from all versions of Lightspeed C and THINK C
1
2/*
3 * assert.c
4 *
5 * Copyright (c) 1991 Symantec Corporation. All rights reserved.
6 *
7 */
8
9#include "assert.h"
10#include "stdio.h"
11#include "stdlib.h"
12
13
14int
15__assert(char *expr, char *file, int line)
16{
17 fprintf(stderr, "Assertion failed: %s, file %s, line %d\n", expr, file, line);
18 if (stderr->window) {
19 fprintf(stderr, "(press �return� to exit)");
20 fflush(stderr);
21 fgetc(stderr);
22 }
23 abort();
24}