changed reading hint
[gromacs/adressmacs.git] / include / assert.h
blob9b611d15924805869d76f8625c326ae01ee511a9
1 /*
2 * $Id$
3 *
4 * This source code is part of
5 *
6 * G R O M A C S
7 *
8 * GROningen MAchine for Chemical Simulations
9 *
10 * VERSION 2.0
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
16 * Please refer to:
17 * GROMACS: A message-passing parallel molecular dynamics implementation
18 * H.J.C. Berendsen, D. van der Spoel and R. van Drunen
19 * Comp. Phys. Comm. 91, 43-56 (1995)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
23 * or e-mail to:
24 * gromacs@chem.rug.nl
26 * And Hey:
27 * Good ROcking Metal Altar for Chronical Sinners
30 #ifndef _assert_h
31 #define _assert_h
33 static char *SRCID_assert_h = "$Id$";
35 #ifdef HAVE_IDENT
36 #ident "@(#) assert.h 1.12 11/23/92"
37 #endif /* HAVE_IDENT */
39 #include <ctype.h>
40 #include "sysstuff.h"
42 #ifdef assert
43 #undef assert
44 #endif
46 #define assert(EXPRESSION) \
47 if (!(EXPRESSION)) { \
48 fprintf(stderr,"Assertion failed for \"%s\" in file %s, " \
49 "line %d\ndump core ? (y/n):",#EXPRESSION, __FILE__, __LINE__); \
50 fflush(stderr); \
51 if (toupper(getc(stdin))=='Y') \
52 (void) abort(); else exit(-1); \
53 } else
55 #endif /* _assert_h */