aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2003-03-17 15:37:54 +0000
committertradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2003-03-17 15:37:54 +0000
commit864c827afa90a9aa2d54376aca75e035d7b17809 (patch)
tree7d31cf338b1072424c7cec0780cb609e9cb17729
parent5928cfe3318b5e140f61ae5c8470e61164063d79 (diff)
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
-rw-r--r--src/Write2D.c14
1 files changed, 7 insertions, 7 deletions
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
{