From 864c827afa90a9aa2d54376aca75e035d7b17809 Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 17 Mar 2003 15:37:54 +0000 Subject: Fixed string concatenation when creating the filename for 2D output. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOASCII/trunk@143 94b1c47f-dcfd-45ef-a468-0854c0e9e350 --- src/Write2D.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/Write2D.c b/src/Write2D.c index b9c264a..7197231 100644 --- a/src/Write2D.c +++ b/src/Write2D.c @@ -156,7 +156,7 @@ int IOASCII_Write2D (const cGH *GH, int vindex, const char *alias) } /* get the handle for IOASCII extensions */ - myGH = (asciiioGH *) CCTK_GHExtension (GH, "IOASCII"); + myGH = CCTK_GHExtension (GH, "IOASCII"); /* get the number of slices to output */ /* in general: maxdir = gdata.dim * (gdata.dim - 1) / 2; */ @@ -383,8 +383,8 @@ static FILE **OpenFile (const cGH *GH, /* get handles for IOUtil and IOASCII extensions */ - myGH = (asciiioGH *) CCTK_GHExtension (GH, "IOASCII"); - ioUtilGH = (const ioGH *) CCTK_GHExtension (GH, "IO"); + myGH = CCTK_GHExtension (GH, "IOASCII"); + ioUtilGH = CCTK_GHExtension (GH, "IO"); /* see if we are the first time through */ fileset = (FILE **) GetNamedData (myGH->fileList_2D, alias); @@ -394,9 +394,9 @@ static FILE **OpenFile (const cGH *GH, } sprintf (zlabel_fmt_string, " (%%c = %%%s),", out_format); - fileset = (FILE **) malloc (3 * sizeof (FILE *)); - filename = (char *) malloc (strlen (myGH->out2D_dir) + strlen (alias) + - sizeof (slicename) + 20); + fileset = malloc (3 * sizeof (FILE *)); + filename = malloc (strlen (myGH->out2D_dir) + strlen (alias) + + sizeof (slicename) + 20); /* open/create files for each slice */ for (dir = 0; dir < maxdir; dir++) @@ -414,7 +414,7 @@ static FILE **OpenFile (const cGH *GH, myGH->sp2xyz[dim - 1][dir]); } - sprintf (filename, "%s/%s_%s.asc", myGH->out2D_dir, alias, slicename); + sprintf (filename, "%s%s_%s.asc", myGH->out2D_dir, alias, slicename); } else { -- cgit v1.2.3