2009-08-25 22:50:41 +08:00
|
|
|
/*
|
2011-01-21 03:28:54 +08:00
|
|
|
* Copyright (c) 2009-2011 Petri Lehtinen <petri@digip.org>
|
2009-08-25 22:50:41 +08:00
|
|
|
*
|
|
|
|
* Jansson is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the MIT license. See LICENSE for details.
|
|
|
|
*/
|
|
|
|
|
2009-08-19 02:33:45 +08:00
|
|
|
#ifndef TESTPROGS_UTIL_H
|
|
|
|
#define TESTPROGS_UTIL_H
|
|
|
|
|
2009-09-30 02:19:55 +08:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
2009-08-19 02:33:45 +08:00
|
|
|
#define fail(msg) \
|
|
|
|
do { \
|
2009-09-30 02:19:55 +08:00
|
|
|
fprintf(stderr, "%s:%s:%d: %s\n", \
|
|
|
|
__FILE__, __FUNCTION__, __LINE__, msg); \
|
|
|
|
exit(1); \
|
2009-08-19 02:33:45 +08:00
|
|
|
} while(0)
|
|
|
|
|
|
|
|
#endif
|