aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2019-05-22 21:52:41 -0700
committerPaul Gilbert2019-05-24 18:21:07 -0700
commit139673984edd38895ed7646066f2af06f3dc00a3 (patch)
tree6f84a0ea5b5fbc207df150a260f8556831795e7a
parent0d0dbf601e70b569936469c88b9f2a8f0197e6e6 (diff)
downloadscummvm-rg350-139673984edd38895ed7646066f2af06f3dc00a3.tar.gz
scummvm-rg350-139673984edd38895ed7646066f2af06f3dc00a3.tar.bz2
scummvm-rg350-139673984edd38895ed7646066f2af06f3dc00a3.zip
GLK: TADS2: Revert char * statics back to string literals
-rw-r--r--engines/glk/tads/tads2/execute_command.cpp5
-rw-r--r--engines/glk/tads/tads2/vocabulary_parser.cpp15
2 files changed, 5 insertions, 15 deletions
diff --git a/engines/glk/tads/tads2/execute_command.cpp b/engines/glk/tads/tads2/execute_command.cpp
index 63c5f02631..ffec9d6c59 100644
--- a/engines/glk/tads/tads2/execute_command.cpp
+++ b/engines/glk/tads/tads2/execute_command.cpp
@@ -1687,11 +1687,8 @@ static void exesaveit(voccxdef *ctx, vocoldef *dolist)
ctx->voccxthm[i] = dolist[i].vocolobj;
if (dbg)
{
- static char *STR1 = ", ";
- static char *STR2 = "]\\n";
-
runppr(rcx, dolist[i].vocolobj, PRP_SDESC, 0);
- tioputs(ctx->voccxtio, i+1 < cnt ? STR1 : STR2);
+ tioputs(ctx->voccxtio, i+1 < cnt ? ", " : "]\\n");
}
}
}
diff --git a/engines/glk/tads/tads2/vocabulary_parser.cpp b/engines/glk/tads/tads2/vocabulary_parser.cpp
index a70c6f85d1..fba515e797 100644
--- a/engines/glk/tads/tads2/vocabulary_parser.cpp
+++ b/engines/glk/tads/tads2/vocabulary_parser.cpp
@@ -1200,7 +1200,7 @@ static int voc_check_special(voccxdef *ctx, const char *wrd, int checktyp)
char *endp;
char typ;
int len;
- int wrdlen = strlen((char *)wrd);
+ int wrdlen = strlen(wrd);
for (p = ctx->voccxspp, endp = p + ctx->voccxspl ;
p < endp ; )
@@ -2516,9 +2516,7 @@ static int vocg1o(voccxdef *ctx, char *cmd[], int typelist[],
/* show trace message if in debug mode */
if (ctx->voccxflg & VOCCXFDBG) {
- static char *CHECK = ". Checking for actor\\n";
- static char *READING = ". Reading noun phrase\\n";
- tioputs(ctx->vocxtio, chkact ? CHECK : READING);
+ tioputs(ctx->vocxtio, chkact ? ". Checking for actor\\n" : ". Reading noun phrase\\n");
}
/* try the user parseNounPhrase hook */
@@ -5300,11 +5298,9 @@ int vocdisambig(voccxdef *ctx, vocoldef *outlist, vocoldef *inlist,
else if (inlist[inpos].vocolflg == VOCS_IT ||
(inlist[inpos].vocolflg == VOCS_THEM && ctx->voccxthc == 0))
{
- static char *IT = "it";
- static char *THEM = "them";
err = vocsetit(ctx, ctx->voccxit, accprop, cmdActor,
cmdVerb, cmdPrep, &outlist[outpos],
- inlist[inpos].vocolflg == VOCS_IT ? IT : THEM,
+ inlist[inpos].vocolflg == VOCS_IT ? "it" : "them",
(char)(inlist[inpos].vocolflg == VOCS_IT
? VOCW_IT : VOCW_THEM), defprop, silent);
if (err != 0)
@@ -6803,11 +6799,8 @@ int vocdisambig(voccxdef *ctx, vocoldef *outlist, vocoldef *inlist,
}
else if (vocspec(diswordlist[0], VOCW_ANY))
{
- static char *anynm = "any";
-
/* choose the first object arbitrarily */
- vocout(&outlist[outpos++], list1[i], VOCS_ALL,
- anynm, anynm);
+ vocout(&outlist[outpos++], list1[i], VOCS_ALL, "any", "any");
break;
}
else