diff options
-rw-r--r-- | src/include/cctk_WarnLevel.h | 1 | ||||
-rw-r--r-- | src/main/WarnLevel.c | 32 |
2 files changed, 33 insertions, 0 deletions
diff --git a/src/include/cctk_WarnLevel.h b/src/include/cctk_WarnLevel.h index 52cbda39..48fca652 100644 --- a/src/include/cctk_WarnLevel.h +++ b/src/include/cctk_WarnLevel.h @@ -28,6 +28,7 @@ int CCTK_VWarn(int level, const char *format, ...); 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 __cplusplus } diff --git a/src/main/WarnLevel.c b/src/main/WarnLevel.c index 9036bcbe..6b30b468 100644 --- a/src/main/WarnLevel.c +++ b/src/main/WarnLevel.c @@ -375,6 +375,38 @@ void FMODIFIER FORTRAN_NAME(CCTK_Info)(TWO_FORTSTRINGS_ARGS) /*@@ + @routine CCTK_VInfo + @date Mon Apr 10 + @author Thomas Radke + @desc + Info routine with variable argument list + @enddesc + @calls + @calledby + @history + + @endhistory + +@@*/ + +int CCTK_VInfo (const char *thorn, const char *format, ...) +{ + va_list ap; + + va_start(ap, format); + + fprintf(stdout, "INFO (%s): ", thorn); + vfprintf(stdout, format, ap); + fprintf(stdout, "\n"); + fflush(stdout); + + va_end(ap); + + return 0; +} + + +/*@@ @routine CCTKi_SetErrorLevel @date Wed Feb 17 00:48:02 1999 @author Tom Goodale |