diff options
author | allen <allen@eff87b29-5268-4891-90a3-a07138403961> | 2000-09-20 16:35:03 +0000 |
---|---|---|
committer | allen <allen@eff87b29-5268-4891-90a3-a07138403961> | 2000-09-20 16:35:03 +0000 |
commit | f361bf1317802a25f6103af40cfa51fec5c07ae3 (patch) | |
tree | 76f57f15f29b79c03d06d2bde7debda5fd95fbfc /src | |
parent | 619db51384424ef488d0ef07ae18d11af4eae4d6 (diff) |
Fix to advertise files created from steering. Doesn't quite work yet,
it is a bit bizarre, I switched on grid::r, but just got two of the
three different slices on the page.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusIO/IOJpeg/trunk@9 eff87b29-5268-4891-90a3-a07138403961
Diffstat (limited to 'src')
-rw-r--r-- | src/Write2D.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Write2D.c b/src/Write2D.c index 216308c..34691d0 100644 --- a/src/Write2D.c +++ b/src/Write2D.c @@ -12,7 +12,7 @@ int IOJpeg_NumDirection(int sdim, int vdim); int IOJpeg_SetDirection(int vdim, int sdim, int ci, int *direction); -static int *advertised; +static int **advertised; int IOJpeg_Write2D (cGH *GH, int index, const char *alias) { @@ -72,10 +72,15 @@ int IOJpeg_Write2D (cGH *GH, int index, const char *alias) /* Set flags for remembering if files have been advertised */ if (!advertised) { - advertised = (int *)malloc(max_slabs*sizeof(int)); + int i; + advertised = (int **)malloc(max_slabs*sizeof(int)); for (si=0;si<max_slabs;si++) { - advertised[si] = 0; + advertised[si] = (int *)malloc(CCTK_NumVars()*sizeof(int)); + for (i=0;i<CCTK_NumVars();i++) + { + advertised[si][index] = 0; + } } } @@ -123,7 +128,7 @@ int IOJpeg_Write2D (cGH *GH, int index, const char *alias) } /* advertise the file for downloading */ - if (CCTK_Equals(mode,"remove") && advertised[si] == 0) + if (CCTK_Equals(mode,"remove") && advertised[si][index]==0) { advertised_file.slice = (char *) extensions [si]; advertised_file.thorn = CCTK_THORNSTRING; @@ -132,7 +137,7 @@ int IOJpeg_Write2D (cGH *GH, int index, const char *alias) advertised_file.mimetype = "image/jpeg"; IOUtil_AdvertiseFile (GH, fname, &advertised_file); - advertised[si] = 1; + advertised[si][index] = 1; free (advertised_file.varname); } } |