diff options
author | Evan Martin <martine@danga.com> | 2012-01-04 23:47:29 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-01-04 23:56:29 (GMT) |
commit | d56c101948bd69fdc9e7541eb6ac38ebc0e6c8bf (patch) | |
tree | e7193e2fa4aaa2c15752215f6a4fef12c6044d50 /src/util.h | |
parent | 4f6f015b7f43099a2514c8e75308d81dcd1b8e7d (diff) | |
download | Ninja-d56c101948bd69fdc9e7541eb6ac38ebc0e6c8bf.zip Ninja-d56c101948bd69fdc9e7541eb6ac38ebc0e6c8bf.tar.gz Ninja-d56c101948bd69fdc9e7541eb6ac38ebc0e6c8bf.tar.bz2 |
allow spellcheck to be used with a vector of strings
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -23,6 +23,7 @@ #endif #include <string> +#include <vector> using namespace std; #define NINJA_UNUSED_ARG(arg_name) (void)arg_name; @@ -55,8 +56,11 @@ void SetCloseOnExec(int fd); /// time. int64_t GetTimeMillis(); -/// Given a misspelled string and a NULL-terminatd list of correct spellings, -/// returns the closest match or NULL if there is no close enough match. +/// Given a misspelled string and a list of correct spellings, returns +/// the closest match or NULL if there is no close enough match. +const char* SpellcheckStringV(const string& text, const vector<const char*>& words); + +/// Like SpellcheckStringV, but takes a NULL-terminated list. const char* SpellcheckString(const string& text, ...); #ifdef _WIN32 |