1 /*
2 Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
3 
4 Permission to use, copy, modify, and distribute this software
5 is freely granted, provided that this notice is preserved.
6  */
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include <errno.h>
10 
11 #define CHECK(a) { \
12   if (!(a)) \
13     { \
14       int err = errno; \
15       printf ("Failed " #a " in <%s> at line %d\n", __FILE__, __LINE__); \
16       fflush(stdout); \
17       exit(err == ENOMEM ? 77 : 1); \
18     } \
19 }
20