diff options
author | Thomas White <taw@physics.org> | 2010-01-22 19:08:44 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2010-01-22 19:08:44 +0100 |
commit | 65cd846deb5a284d6473d2ab394ac7f0d79d5930 (patch) | |
tree | 4524742fb5ea51e23f20894156f59ff1d6c78a0c /src/list_tmp.h | |
parent | 35e3e0d31f51277c86b1f42963b26dd45d522880 (diff) |
Send list errors to the right place
Diffstat (limited to 'src/list_tmp.h')
-rw-r--r-- | src/list_tmp.h | 14 |
1 files 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 |