diff options
author | Max Horn | 2009-03-24 17:41:46 +0000 |
---|---|---|
committer | Max Horn | 2009-03-24 17:41:46 +0000 |
commit | 65b96f6a1bf1f4ca8a062f785996306dabbfedf3 (patch) | |
tree | 4939957bec85362a8070a1225f47c9f3c2d2f84b /engines/sci/scicore/vocabulary.h | |
parent | d38590e6d4053939390ae5a853397f9574d9982e (diff) | |
download | scummvm-rg350-65b96f6a1bf1f4ca8a062f785996306dabbfedf3.tar.gz scummvm-rg350-65b96f6a1bf1f4ca8a062f785996306dabbfedf3.tar.bz2 scummvm-rg350-65b96f6a1bf1f4ca8a062f785996306dabbfedf3.zip |
SCI: Changed vocab_tokenize_string to not 'return' the list it generates, but rather pass a reference to an existing list to it (this is a bit more efficient, and allows us to return an error value)
svn-id: r39670
Diffstat (limited to 'engines/sci/scicore/vocabulary.h')
-rw-r--r-- | engines/sci/scicore/vocabulary.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/sci/scicore/vocabulary.h b/engines/sci/scicore/vocabulary.h index 41562e092d..7a9507b74c 100644 --- a/engines/sci/scicore/vocabulary.h +++ b/engines/sci/scicore/vocabulary.h @@ -283,7 +283,7 @@ ResultWord vocab_lookup_word(char *word, int word_len, */ -ResultWordList vocab_tokenize_string(char *sentence, +int vocab_tokenize_string(ResultWordList &retval, char *sentence, word_t **words, int words_nr, const SuffixList &suffixes, char **error); /* Tokenizes a string and compiles it into word_ts. ** Parameters: (char *) sentence: The sentence to examine @@ -291,7 +291,8 @@ ResultWordList vocab_tokenize_string(char *sentence, ** (int) words_nr: Number of words to scan for ** (SuffixList) suffixes: suffixes to scan for ** (char **) error: Points to a malloc'd copy of the offending text or to NULL on error -** Returns : (word_t *): A list of word_ts containing the result, or NULL. +** (ResultWordList) retval: A list of word_ts containing the result, or NULL. +** Returns : 0 on success, 1 if an error occurred ** On error, NULL is returned. If *error is NULL, the sentence did not contain any useful words; ** if not, *error points to a malloc'd copy of the offending word. ** The returned list may contain anywords. |