From 65cd846deb5a284d6473d2ab394ac7f0d79d5930 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 22 Jan 2010 19:08:44 +0100 Subject: Send list errors to the right place --- src/list_tmp.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/list_tmp.h b/src/list_tmp.h index 84c16ab9..f95b7af9 100644 --- a/src/list_tmp.h +++ b/src/list_tmp.h @@ -18,6 +18,7 @@ * */ +#define ERROR_T(...) fprintf(stderr, __VA_ARGS__) static inline void LABEL(integrate)(TYPE *ref, signed int h, signed int k, signed int l, @@ -26,8 +27,8 @@ static inline void LABEL(integrate)(TYPE *ref, signed int h, int idx; if ( (abs(h) > INDMAX) || (abs(k) > INDMAX) || (abs(l) > INDMAX) ) { - printf("\nReflection %i %i %i is out of range!\n", h, k, l); - printf("You need to re-configure INDMAX, delete the reflection" + ERROR_T("\nReflection %i %i %i is out of range!\n", h, k, l); + ERROR_T("You need to re-configure INDMAX, delete the reflection" " cache file and re-run.\n"); exit(1); } @@ -48,8 +49,8 @@ static inline void LABEL(set)(TYPE *ref, signed int h, int idx; if ( (abs(h) > INDMAX) || (abs(k) > INDMAX) || (abs(l) > INDMAX) ) { - printf("\nReflection %i %i %i is out of range!\n", h, k, l); - printf("You need to re-configure INDMAX, delete the reflection" + ERROR_T("\nReflection %i %i %i is out of range!\n", h, k, l); + ERROR_T("You need to re-configure INDMAX, delete the reflection" " cache file and re-run.\n"); exit(1); } @@ -69,8 +70,8 @@ static inline TYPE LABEL(lookup)(TYPE *ref, signed int h, int idx; if ( (abs(h) > INDMAX) || (abs(k) > INDMAX) || (abs(l) > INDMAX) ) { - printf("\nReflection %i %i %i is out of range!\n", h, k, l); - printf("You need to re-configure INDMAX, delete the reflection" + ERROR_T("\nReflection %i %i %i is out of range!\n", h, k, l); + ERROR_T("You need to re-configure INDMAX, delete the reflection" " cache file and re-run.\n"); exit(1); } @@ -97,3 +98,4 @@ static inline TYPE *LABEL(new_list)(void) #undef LABEL #undef TYPE +#undef ERROR_T -- cgit v1.2.3