From 5bbae845df0f9f1202ad7ac5cc788d2291294a8e Mon Sep 17 00:00:00 2001 From: tradke Date: Fri, 25 Feb 2000 16:47:54 +0000 Subject: Some tidying of message output. Thomas git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOBasic/trunk@38 b589c3ab-70e8-4b4d-a09f-cba2dd200880 --- src/Write.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'src/Write.c') 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); } - - - } - -- cgit v1.2.3