diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-04-20 15:40:54 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-04-20 15:40:54 +0000 |
commit | 3e7fb8430d91c8af28ab557af69f848e240d90d8 (patch) | |
tree | 0cc801ab949af692dafbdc8f5cdd30da026ae178 | |
parent | e7b0c5059527b1bab2ee6c216657f073eef87607 (diff) |
For error/warning messages, put the variable/group name in quotes.
In CCTK_TraverseString(): check for special token 'all' before trying the get
the index of a group or variable of that name.
This closes PR CactusBase-621.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2129 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | src/main/Groups.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/Groups.c b/src/main/Groups.c index 8b76f3b8..9a59111a 100644 --- a/src/main/Groups.c +++ b/src/main/Groups.c @@ -975,7 +975,7 @@ int CCTK_DecomposeName (const char *fullname, if (retval == 1) { CCTK_VWarn (2, __LINE__, __FILE__, "Cactus", - "CCTK_DecomposeName: Full name %s in wrong format", + "CCTK_DecomposeName: Full name '%s' in wrong format", fullname); retval = -3; } @@ -1531,6 +1531,7 @@ int CCTK_TraverseString (const char *parsestring, char *splitstring; char *optstring; int idx, first, last; + int selected_all; if (callback == NULL) @@ -1571,8 +1572,12 @@ int CCTK_TraverseString (const char *parsestring, *optstring = '\0'; } + /* Look for the token 'all' */ + selected_all = CCTK_Equals (before, "all"); + /* See if this name is "<implementation>::<variable>" */ - if (selection == CCTK_VAR || selection == CCTK_GROUP_OR_VAR) + if (! selected_all && + (selection == CCTK_VAR || selection == CCTK_GROUP_OR_VAR)) { first = last = CCTK_VarIndex (before); } @@ -1584,7 +1589,8 @@ int CCTK_TraverseString (const char *parsestring, { /* See if this name is "<implementation>::<group>" */ - if (selection == CCTK_GROUP || selection == CCTK_GROUP_OR_VAR) + if (! selected_all && + (selection == CCTK_GROUP || selection == CCTK_GROUP_OR_VAR)) { idx = CCTK_GroupIndex (before); } @@ -1598,7 +1604,7 @@ int CCTK_TraverseString (const char *parsestring, first = CCTK_FirstVarIndexI (idx); last = first + CCTK_NumVarsInGroupI (idx) - 1; } - else if (CCTK_Equals (before, "all")) /* Look for any special tokens */ + else if (selected_all) { first = 0; if (selection == CCTK_GROUP) |