X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9e730a78765d0e70ca5b77512569c94585070fe2..9513c5b609740c15322f2284e5e8b9609eeaa069:/src/stc/scintilla/include/PropSet.h diff --git a/src/stc/scintilla/include/PropSet.h b/src/stc/scintilla/include/PropSet.h index 3f1b64f77f..62cd5da3a9 100644 --- a/src/stc/scintilla/include/PropSet.h +++ b/src/stc/scintilla/include/PropSet.h @@ -24,11 +24,21 @@ struct Property { /** */ class PropSet { -private: +protected: enum { hashRoots=31 }; Property *props[hashRoots]; Property *enumnext; int enumhash; + static unsigned int HashString(const char *s, size_t len) { + unsigned int ret = 0; + while (len--) { + ret <<= 4; + ret ^= *s; + s++; + } + return ret; + } + static bool IncludesVar(const char *value, const char *key); public: PropSet *superPS; PropSet(); @@ -38,7 +48,7 @@ public: void SetMultiple(const char *s); SString Get(const char *key); SString GetExpanded(const char *key); - SString Expand(const char *withVars); + SString Expand(const char *withVars, int maxExpands=100); int GetInt(const char *key, int defaultValue=0); SString GetWild(const char *keybase, const char *filename); SString GetNewExpand(const char *keybase, const char *filename=""); @@ -71,7 +81,7 @@ public: void SetFromAllocated(); bool InList(const char *s); const char *GetNearestWord(const char *wordStart, int searchLen = -1, - bool ignoreCase = false, SString wordCharacters=""); + bool ignoreCase = false, SString wordCharacters="", int wordIndex = -1); char *GetNearestWords(const char *wordStart, int searchLen=-1, bool ignoreCase=false, char otherSeparator='\0'); };