diff options
Diffstat (limited to 'src/IsoSurfacer.c')
-rw-r--r-- | src/IsoSurfacer.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/IsoSurfacer.c b/src/IsoSurfacer.c index ef9fb9f..3e3f120 100644 --- a/src/IsoSurfacer.c +++ b/src/IsoSurfacer.c @@ -32,7 +32,7 @@ static const char *rcsid = "$Id$"; CCTK_FILEVERSION(CactusPUGHIO_IsoSurfacer_IsoSurfacer_c) /* *******Some Macro Definitions *************/ -#define NEW(n,what) ((what*)malloc((n)*sizeof(what))) +#define NEW(n,what) malloc((n)*sizeof(what)) #define REALLOC(object,n,what) \ if((object) != NULL) free(object); \ (object) = NEW(n,what); \ @@ -42,7 +42,7 @@ CCTK_FILEVERSION(CactusPUGHIO_IsoSurfacer_IsoSurfacer_c) q = p; \ if( (p += strlen(tmps)) >= lfs ) \ { \ - (outs) = ((char *)realloc((void *)(outs), 2 * lfs * sizeof(char))); \ + (outs) = (realloc((void *)(outs), 2 * lfs * sizeof(char))); \ lfs *= 2; \ } \ strcpy(&(outs)[q], (tmps)) @@ -505,9 +505,9 @@ static void WriteHDF5(const cGH *GH, polypatch *totals, isosurfacerGH *myGH, #ifdef CACTUSPUGHIO_IOHDF5 char *filename; - filename = (char *) malloc (strlen (outdir) + strlen (fullname) + - strlen (PUGH_pGH (GH)->identity_string) + 20); - sprintf (filename, "%s/%s%s.iso.h5", outdir, fullname, + filename = malloc (strlen (out_dir) + strlen (fullname) + + strlen (PUGH_pGH (GH)->identity_string) + 20); + sprintf (filename, "%s/%s%s.iso.h5", out_dir, fullname, PUGH_pGH (GH)->identity_string); /* needs to extract min/max value for GF with CCTK_Reduction op*/ #if 0 /* disabled for now */ @@ -558,9 +558,9 @@ WriteBin(const cGH *GH, polypatch *totals, isosurfacerGH *myGH, const char *full printf("SockString = [%s]\n",fname); --------------------------------------------*/ if(*format_str=='%') - sprintf (formatstring, "%s/%%s%%s_%s_%%d.iso.bin", outdir, format_str); + sprintf (formatstring, "%s/%%s%%s_%s_%%d.iso.bin", out_dir, format_str); else - sprintf (formatstring, "%s/%%s%%s_%%3.3f_%%d.iso.bin", outdir); + sprintf (formatstring, "%s/%%s%%s_%%3.3f_%%d.iso.bin", out_dir); sprintf (fname, formatstring, fullname, PUGH_pGH (GH)->identity_string, isolevel, GH->cctk_iteration); @@ -612,7 +612,7 @@ WriteVRML(const cGH *GH, polypatch *totals, const char *fullname, static CCTK_INT4 efs = 0, lfs = 0; sprintf(fname, "%s/%s%s_%3.3f_%d.iso.wrl", - outdir, fullname, PUGH_pGH (GH)->identity_string, isolevel, + out_dir, fullname, PUGH_pGH (GH)->identity_string, isolevel, GH->cctk_iteration); if (!(pd = fopen(fname, "w"))) { perror("Could not create isosurface vrml output file"); @@ -626,7 +626,7 @@ WriteVRML(const cGH *GH, polypatch *totals, const char *fullname, p = 0; if(lfs < efs) { - outs = (char *)realloc((void *)outs, efs * sizeof(char)); + outs = realloc((void *)outs, efs * sizeof(char)); lfs = efs; } outs[0] = '\0'; @@ -679,7 +679,7 @@ WriteASCII(const cGH *GH, polypatch *totals, const char *fullname, static CCTK_INT4 efs = 0, lfs = 0; sprintf(fname, "%s/%s%s_%3.3f_%d.iso.ascii", - outdir, fullname, PUGH_pGH (GH)->identity_string, isolevel, + out_dir, fullname, PUGH_pGH (GH)->identity_string, isolevel, GH->cctk_iteration); if (!(pd = fopen(fname, "w"))){ @@ -694,7 +694,7 @@ WriteASCII(const cGH *GH, polypatch *totals, const char *fullname, p = 0; if(lfs < efs) { - outs = (char *)realloc((void *)outs, efs * sizeof(char)); + outs = realloc((void *)outs, efs * sizeof(char)); lfs = efs; } outs[0] = '\0'; @@ -737,7 +737,7 @@ WriteUCD(const cGH *GH, polypatch *totals, const char *fullname, static CCTK_INT4 efs = 0, lfs = 0; sprintf(fname, "%s/%s%s_%3.3f_%d.iso.inp", - outdir, fullname, PUGH_pGH (GH)->identity_string, isolevel, + out_dir, fullname, PUGH_pGH (GH)->identity_string, isolevel, GH->cctk_iteration); if (!(uf = fopen(fname, "w"))) { @@ -752,7 +752,7 @@ WriteUCD(const cGH *GH, polypatch *totals, const char *fullname, p = 0; if(lfs < efs) { - outs = (char *)realloc((void *)outs, efs * sizeof(char)); + outs = realloc((void *)outs, efs * sizeof(char)); lfs = efs; } outs[0] = '\0'; |