diff options
author | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2002-01-09 22:13:12 +0000 |
---|---|---|
committer | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2002-01-09 22:13:12 +0000 |
commit | 6593ac99c93c8803baafd0f1ed3483fdea249ff8 (patch) | |
tree | c9addc7dc09752567e2e8e206eca98eae70e6fd5 | |
parent | 3be3dc1e992d6b7d6daa62791a1f3311df6b2a3c (diff) |
Include the variable name in warning messages for hyperslab options parsing errors.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5Util/trunk@47 7842ec3a-9562-4be5-9c5b-06ba18f2b668
-rw-r--r-- | src/ParseVars.c | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/src/ParseVars.c b/src/ParseVars.c index 1d46f5b..fb70525 100644 --- a/src/ParseVars.c +++ b/src/ParseVars.c @@ -95,14 +95,12 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, const char *optstring, void *arg) { - DECLARE_CCTK_PARAMETERS regmatch_t gmatch[6], *dmatch; - int matched; - char *token, *separator; + int i, j, bytes, matched; + char *token, *separator, *fullname; char *substring, *parsestring, *regexstring; - int i, j; - int bytes; ioHDF5Geo_t **output_requests, *new_request; + DECLARE_CCTK_PARAMETERS output_requests = (ioHDF5Geo_t **) arg; @@ -126,8 +124,11 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, 6, gmatch); if (matched <= 0) { + fullname = CCTK_FullName (vindex); CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, - "Couldn't parse hyperslab parameter '%s'", optstring); + "Couldn't parse hyperslab options '%s' for variable '%s'", + optstring, fullname); + free (fullname); free (new_request); return; } @@ -139,9 +140,11 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, new_request->sdim = atoi (optstring + gmatch[1].rm_so); if (new_request->sdim <= 0 || new_request->sdim > new_request->vdim) { + fullname = CCTK_FullName (vindex); CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, - "Invalid dimension given %d in hyperslab parameter '%s'", - new_request->sdim, optstring); + "Invalid dimension given %d in hyperslab options '%s' " + "for variable '%s'", new_request->sdim, optstring, fullname); + free (fullname); free (new_request); return; } @@ -167,9 +170,11 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, free (regexstring); if (matched <= 0) { + fullname = CCTK_FullName (vindex); CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, - "Couldn't parse direction vectors in hyperslab " - "parameter '%s'.", optstring); + "Couldn't parse direction vectors in hyperslab options '%s' " + "for variable '%s'.", optstring, fullname); + free (fullname); free (dmatch); free (new_request); return; @@ -201,9 +206,11 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, free (substring); if (i < new_request->vdim) { + fullname = CCTK_FullName (vindex); CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, "Direction vectors are incomplete or missing in hyperslab " - "parameter '%s'.", optstring); + "options '%s' for variable '%s'.", optstring, fullname); + free (fullname); free (new_request); return; } @@ -234,9 +241,11 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, if (i < new_request->vdim) { + fullname = CCTK_FullName (vindex); CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, "Origin vector is incomplete or missing in hyperslab " - "parameter '%s'.", optstring); + "options '%s' for variable '%s'.", optstring, fullname); + free (fullname); free (new_request); return; } @@ -266,9 +275,11 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, if (i < new_request->sdim) { + fullname = CCTK_FullName (vindex); CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, "Length vector is incomplete or missing in hyperslab " - "parameter '%s'.", optstring); + "options '%s' for variable '%s'.", optstring, fullname); + free (fullname); free (new_request); return; } @@ -298,9 +309,11 @@ static void IOHDF5Util_ParseOutputRequest (int vindex, if (i < new_request->sdim) { + fullname = CCTK_FullName (vindex); CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, "Downsampling vector is incomplete or missing in hyperslab " - "parameter '%s'.", optstring); + "options '%s' for variable '%s'.", optstring, fullname); + free (fullname); free (new_request); return; } |