aboutsummaryrefslogtreecommitdiff
path: root/src/Write.c
diff options
context:
space:
mode:
authortradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880>2000-02-25 16:47:54 +0000
committertradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880>2000-02-25 16:47:54 +0000
commit5bbae845df0f9f1202ad7ac5cc788d2291294a8e (patch)
tree6ca4a7b476174b651ac72d5d0a7b330d0b7d4159 /src/Write.c
parentacb671b983d62e4284a69fa4e7818e05af0b63ad (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/Write.c')
-rw-r--r--src/Write.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/Write.c b/src/Write.c
index 99180cb..d10d69e 100644
--- a/src/Write.c
+++ b/src/Write.c
@@ -31,14 +31,12 @@ void IOBasic_Write (cGH *GH, int index, const char *alias)
/* 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 scalar output for '%s' (no storage)", fullname);
- CCTK_WARN (2, msg);
+ CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "No scalar output for '%s' (no storage)", fullname);
free (fullname);
- free (msg);
return;
}
@@ -61,11 +59,8 @@ void IOBasic_Write (cGH *GH, int index, const char *alias)
file = fopen(fname,openmode);
if (file == NULL) {
- char *msg = (char *) malloc (100 + strlen (fname));
-
- sprintf (msg, "Could not open output file '%s'", fname);
- CCTK_WARN (3, msg);
- free (msg);
+ CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Could not open output file '%s'", fname);
free (fname);
return;
}
@@ -102,8 +97,4 @@ void IOBasic_Write (cGH *GH, int index, const char *alias)
free (fname);
}
-
-
-
}
-