diff options
author | Neil Millstone | 2008-05-15 22:12:51 +0000 |
---|---|---|
committer | Neil Millstone | 2008-05-15 22:12:51 +0000 |
commit | 2c5e8cc93861cded0b9a8ca7c605c61c7c2acc31 (patch) | |
tree | f5c0b1d4914d85d5f09eab5b739fbf9a4c3b59a8 /backends/platform/ds/arm9/source/wordcompletion.cpp | |
parent | defc030143487550057cac1fb617d31ce9ab1ab2 (diff) | |
download | scummvm-rg350-2c5e8cc93861cded0b9a8ca7c605c61c7c2acc31.tar.gz scummvm-rg350-2c5e8cc93861cded0b9a8ca7c605c61c7c2acc31.tar.bz2 scummvm-rg350-2c5e8cc93861cded0b9a8ca7c605c61c7c2acc31.zip |
Porting changes from 0.11.0 branch
svn-id: r32140
Diffstat (limited to 'backends/platform/ds/arm9/source/wordcompletion.cpp')
-rw-r--r-- | backends/platform/ds/arm9/source/wordcompletion.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/backends/platform/ds/arm9/source/wordcompletion.cpp b/backends/platform/ds/arm9/source/wordcompletion.cpp index bf4ce7c909..9eeeb62410 100644 --- a/backends/platform/ds/arm9/source/wordcompletion.cpp +++ b/backends/platform/ds/arm9/source/wordcompletion.cpp @@ -23,7 +23,7 @@ void addAutoCompleteLine(char* line) { { char word[32]; int length; - + // Skip the T9-style numbers while (*line != ' ') { @@ -37,7 +37,7 @@ void addAutoCompleteLine(char* line) { if (*line == ' ') line++; - // Copy the new word + // Copy the new word do { word[length++] = *line++; } while ((*line != '\0') && (*line != ' ') && (*line != '\n')); @@ -47,7 +47,7 @@ void addAutoCompleteLine(char* line) { // Store a pointer to the start of the word wordBufferPtr[wordBufferPtrPos++] = &wordBuffer[wordBufferPos]; - + // copy the new word into the buffer strcpy(&wordBuffer[wordBufferPos], word); wordBufferPos += strlen(word) + 1; @@ -104,11 +104,11 @@ bool findWordCompletions(char* input) // Get the word from the dictonary line word = wordBufferPtr[position]; - + // Now check to see if the word is before or after the stub we're after int result = scumm_stricmp((const char *) partialWord, (const char *) word); - + if (result == 0) { // We've found the whole word. Aren't we good. break; @@ -128,10 +128,10 @@ bool findWordCompletions(char* input) word = wordBufferPtr[position]; //consolePrintf("Final word: %s\n", word); - + system->setCharactersEntered(strlen(partialWord)); - + bool match = true; @@ -161,7 +161,7 @@ bool findWordCompletions(char* input) break; } } - + if (match) { system->addAutoComplete(word); } |