diff options
author | allen <allen@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2001-02-24 13:04:45 +0000 |
---|---|---|
committer | allen <allen@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2001-02-24 13:04:45 +0000 |
commit | 745ba10870d3fab10b6aa71e6d7d34a51d12372c (patch) | |
tree | d6e11497d84993bd382078fb11e48a8541e6fb35 | |
parent | ed995d1b7ab411b7e6f196e70b7b2227fd28a836 (diff) |
Fixing warnings
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOBasic/trunk@78 b589c3ab-70e8-4b4d-a09f-cba2dd200880
-rw-r--r-- | src/Output.c | 67 | ||||
-rw-r--r-- | src/iobasicGH.h | 6 |
2 files changed, 37 insertions, 36 deletions
diff --git a/src/Output.c b/src/Output.c index f988c02..2a6acee 100644 --- a/src/Output.c +++ b/src/Output.c @@ -19,9 +19,10 @@ /* function prototypes */ -int IOBasic_TimeForOutput (cGH *GH, int index); +int IOBasic_TimeForOutput (cGH *GH, int vindex); +int IOBasic_OutputGH (cGH *GH); static void CheckSteerableParameters (iobasicGH *myGH); -static void SetOutputFlag (int index, const char *optstring, void *arg); +static void SetOutputFlag (int vindex, const char *optstring, void *arg); /*@@ @@ -43,7 +44,7 @@ static void SetOutputFlag (int index, const char *optstring, void *arg); @@*/ int IOBasic_OutputGH (cGH *GH) { - int index; + int vindex; const char *name; iobasicGH *myGH; @@ -60,37 +61,37 @@ int IOBasic_OutputGH (cGH *GH) } /* Loop over all variables */ - for (index = 0; index < CCTK_NumVars (); index++) + for (vindex = 0; vindex < CCTK_NumVars (); vindex++) { /* Is it time for output ? */ - if (! IOBasic_TimeForOutput (GH, index)) + if (! IOBasic_TimeForOutput (GH, vindex)) { continue; } /* Get the variable name for this index (for filename) */ - name = CCTK_VarName (index); + name = CCTK_VarName (vindex); #ifdef IO_DEBUG printf("\nIn IOBasic_OutputGH\n----------------\n"); - printf(" Index = %d\n",index); + printf(" Index = %d\n",vindex); printf(" Variable = -%s-\n",name); - printf(" Last output iteration was = %d\n",myGH->outScalar_last[index]); + printf(" Last output iteration was = %d\n",myGH->outScalar_last[vindex]); #endif /* Make the IO call */ - if (CCTK_GroupTypeFromVarI (index) == CCTK_SCALAR) + if (CCTK_GroupTypeFromVarI (vindex) == CCTK_SCALAR) { - IOBasic_Write (GH, index, name); + IOBasic_Write (GH, vindex, name); } else { - IOBasic_WriteGF (GH, index, name); + IOBasic_WriteGF (GH, vindex, name); } /* Register GF as having 0D output this iteration */ - myGH->outScalar_last [index] = GH->cctk_iteration; + myGH->outScalar_last [vindex] = GH->cctk_iteration; } /* end of loop over all variables */ @@ -127,25 +128,25 @@ int IOBasic_OutputGH (cGH *GH) @@*/ int IOBasic_OutputVarAs (cGH *GH, const char *fullname, const char *alias) { - int index; + int vindex; - index = CCTK_VarIndex (fullname); + vindex = CCTK_VarIndex (fullname); #ifdef IO_DEBUG printf("\nIn IOBasic_OutputVarAs\n-------------------\n"); printf(" Fullname = -%s-\n",fullname); printf(" Alias = -%s-\n",alias); - printf(" Index = %d\n",index); + printf(" Index = %d\n",vindex); #endif - if (CCTK_GroupTypeFromVarI (index) == CCTK_SCALAR) + if (CCTK_GroupTypeFromVarI (vindex) == CCTK_SCALAR) { - IOBasic_Write (GH, index, alias); + IOBasic_Write (GH, vindex, alias); } else { - IOBasic_WriteGF (GH, index, alias); + IOBasic_WriteGF (GH, vindex, alias); } return (0); @@ -173,7 +174,7 @@ int IOBasic_OutputVarAs (cGH *GH, const char *fullname, const char *alias) @vio in @vcomment @endvar - @var index + @var vindex @vdesc index of variable @vtype int @vio in @@ -181,7 +182,7 @@ int IOBasic_OutputVarAs (cGH *GH, const char *fullname, const char *alias) @endvar @@*/ -int IOBasic_TimeForOutput (cGH *GH, int index) +int IOBasic_TimeForOutput (cGH *GH, int vindex) { int return_type; iobasicGH *myGH; @@ -203,13 +204,13 @@ int IOBasic_TimeForOutput (cGH *GH, int index) } /* Check if this variable should be output */ - if (myGH->do_outScalar [index] && + if (myGH->do_outScalar [vindex] && (GH->cctk_iteration % myGH->outScalar_every) == 0) { /* Check if variable wasn't already output this iteration */ - if (myGH->outScalar_last [index] == GH->cctk_iteration) + if (myGH->outScalar_last [vindex] == GH->cctk_iteration) { - fullname = CCTK_FullName (index); + fullname = CCTK_FullName (vindex); CCTK_VWarn (5, __LINE__, __FILE__, CCTK_THORNSTRING, "Already done IOBasic scalar output for '%s' in " "current iteration (probably via triggers)", fullname); @@ -241,14 +242,14 @@ int IOBasic_TimeForOutput (cGH *GH, int index) @vio in @vcomment @endvar - @var index + @var vindex @vdesc index of variable to output @vtype int @vio in @vcomment @endvar @@*/ -int IOBasic_TriggerOutput (cGH *GH, int index) +int IOBasic_TriggerOutput (cGH *GH, int vindex) { const char *name; iobasicGH *myGH; @@ -257,26 +258,26 @@ int IOBasic_TriggerOutput (cGH *GH, int index) /* Get the GH extension for IOBasic */ myGH = (iobasicGH *) GH->extensions [CCTK_GHExtensionHandle ("IOBasic")]; - name = CCTK_VarName (index); + name = CCTK_VarName (vindex); #ifdef IO_DEBUG printf ("\nIn IOBasic_TriggerOutput\n---------------------\n"); - printf (" Index = %d\n", index); + printf (" Index = %d\n", vindex); printf (" Variable = -%s-\n", name); #endif /* Do the Scalar output */ - if (CCTK_GroupTypeFromVarI (index) == CCTK_SCALAR) + if (CCTK_GroupTypeFromVarI (vindex) == CCTK_SCALAR) { - IOBasic_Write (GH, index, name); + IOBasic_Write (GH, vindex, name); } else { - IOBasic_WriteGF (GH, index, name); + IOBasic_WriteGF (GH, vindex, name); } /* Register variable as having Scalar output this iteration */ - myGH->outScalar_last [index] = GH->cctk_iteration; + myGH->outScalar_last [vindex] = GH->cctk_iteration; return (0); } @@ -315,12 +316,12 @@ static void CheckSteerableParameters (iobasicGH *myGH) /* callback for CCTK_TraverseString() to set the output flag for the given variable */ -static void SetOutputFlag (int index, const char *optstring, void *arg) +static void SetOutputFlag (int vindex, const char *optstring, void *arg) { char *flags = (char *) arg; - flags[index] = 1; + flags[vindex] = 1; if (optstring) { diff --git a/src/iobasicGH.h b/src/iobasicGH.h index 3f41cf5..fe1cb16 100644 --- a/src/iobasicGH.h +++ b/src/iobasicGH.h @@ -38,6 +38,6 @@ typedef struct IOBASICGH { /* function prototypes */ -void IOBasic_Write (cGH *GH, int index, const char *alias); -void IOBasic_WriteGF (cGH *GH, int index, const char *alias); -int IOBasic_WriteInfo (cGH *GH, CCTK_REAL *val,int index, const char *operator, const char *alias); +void IOBasic_Write (cGH *GH, int vindex, const char *alias); +void IOBasic_WriteGF (cGH *GH, int vindex, const char *alias); +int IOBasic_WriteInfo (cGH *GH, CCTK_REAL *val,int vindex, const char *operator, const char *alias); |