diff options
author | tradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2000-02-25 16:47:54 +0000 |
---|---|---|
committer | tradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2000-02-25 16:47:54 +0000 |
commit | 5bbae845df0f9f1202ad7ac5cc788d2291294a8e (patch) | |
tree | 6ca4a7b476174b651ac72d5d0a7b330d0b7d4159 /src/WriteInfo.c | |
parent | acb671b983d62e4284a69fa4e7818e05af0b63ad (diff) |
Some tidying of message output.
Thomas
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOBasic/trunk@38 b589c3ab-70e8-4b4d-a09f-cba2dd200880
Diffstat (limited to 'src/WriteInfo.c')
-rw-r--r-- | src/WriteInfo.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/WriteInfo.c b/src/WriteInfo.c index 5be067d..26994d0 100644 --- a/src/WriteInfo.c +++ b/src/WriteInfo.c @@ -21,21 +21,18 @@ CCTK_REAL IOBasic_WriteInfo (cGH *GH, int index, const char *operator, const char *alias) { - CCTK_REAL tt[1]; int reduce_handle; CCTK_REAL retval; /* first, check if variable has storage assigned */ if (! CCTK_QueryGroupStorageI (GH, CCTK_GroupIndexFromVarI (index))) { - char *msg, *fullname; + char *fullname; fullname = CCTK_FullName (index); - msg = (char *) malloc (200 * sizeof (char) + strlen (fullname)); - sprintf (msg, "No info output for '%s' (no storage)", fullname); - CCTK_WARN (2, msg); + CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, + "No info output for '%s' (no storage)", fullname); free (fullname); - free (msg); return (0); } @@ -43,21 +40,14 @@ CCTK_REAL IOBasic_WriteInfo (cGH *GH, int index, const char *operator, const cha if (reduce_handle > -1) { - CCTK_Reduce(GH,-1,reduce_handle,1,CCTK_VARIABLE_REAL,tt,1,index); - retval = tt[0]; + CCTK_Reduce(GH,-1,reduce_handle,1,CCTK_VARIABLE_REAL,&retval,1,index); } else { - CCTK_WARN(1, "Reduction operator doesn't exist."); - + CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING, + "Reduction operator '%s' doesn't exist", operator); retval = -27; } return retval; - } - - - - - |