summaryrefslogtreecommitdiff
path: root/src/include/cctk_WarnLevel.h
diff options
context:
space:
mode:
authoreschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2013-02-26 03:08:06 +0000
committereschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2013-02-26 03:08:06 +0000
commit6876767592de3e96dfe5aa24489906c1cd3b406b (patch)
treeae92b4b8027b7f34439dda98c0150bc314104964 /src/include/cctk_WarnLevel.h
parent3f9e2a8886b5ad2534971f4fe0a9438de857c9cc (diff)
Implement CCTK_Error and friends
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4963 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include/cctk_WarnLevel.h')
-rw-r--r--src/include/cctk_WarnLevel.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/include/cctk_WarnLevel.h b/src/include/cctk_WarnLevel.h
index fed8bbad..a2a7b531 100644
--- a/src/include/cctk_WarnLevel.h
+++ b/src/include/cctk_WarnLevel.h
@@ -11,6 +11,8 @@
#ifndef _CCTK_WARNLEVEL_H_
#define _CCTK_WARNLEVEL_H_
+#include <cctk_Config.h>
+
#ifdef CCODE
#ifdef __cplusplus
@@ -28,24 +30,28 @@ int CCTK_VWarn(int level,
const char *file,
const char *thorn,
const char *format, ...)
-#ifdef __GNUC__
-__attribute__ ((format (printf, 5, 6)))
-#endif
-;
+ CCTK_ATTRIBUTE_FORMAT(printf, 5, 6);
+
+void CCTK_Error(int line,
+ const char *file,
+ const char *thorn,
+ const char *message)
+ CCTK_ATTRIBUTE_NORETURN;
+
+void CCTK_VError(int line,
+ const char *file,
+ const char *thorn,
+ const char *format, ...)
+ CCTK_ATTRIBUTE_FORMAT(printf, 4, 5)
+ CCTK_ATTRIBUTE_NORETURN;
int CCTK_VParamWarn (const char *thorn,
const char *format,
...)
-#ifdef __GNUC__
-__attribute__ ((format (printf, 2, 3)))
-#endif
-;
+ CCTK_ATTRIBUTE_FORMAT(printf, 2, 3);
int CCTK_ParamWarn(const char *thorn, const char *message);
int CCTK_Info(const char *thorn, const char *message);
int CCTK_VInfo(const char *thorn, const char *format, ...)
-#ifdef __GNUC__
-__attribute__ ((format (printf, 2, 3)))
-#endif
-;
+ CCTK_ATTRIBUTE_FORMAT(printf, 2, 3);
/* prototypes for warn/info callback routines */