Changeset 115 for trunk/include/helpers/stringh.h
- Timestamp:
- Nov 1, 2001, 6:37:28 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/helpers/stringh.h
r113 r115 32 32 #define STRINGH_HEADER_INCLUDED 33 33 34 PSZ strhcpy(PSZ string1, const char *string2);34 PSZ XWPENTRY strhcpy(PSZ string1, const char *string2); 35 35 36 36 #if defined(__DEBUG_MALLOC_ENABLED__) && !defined(DONT_REPLACE_STRINGH_MALLOC) // setup.h, helpers\memdebug.c 37 PSZ strhdupDebug(const char *pszSource, 38 const char *pcszSourceFile, 39 unsigned long ulLine, 40 const char *pcszFunction); 41 #define strhdup(a) strhdupDebug((a), __FILE__, __LINE__, __FUNCTION__) 37 PSZ XWPENTRY strhdupDebug(const char *pcszSource, 38 unsigned long *pulLength, 39 const char *pcszSourceFile, 40 unsigned long ulLine, 41 const char *pcszFunction); 42 #define strhdup(a, pul) strhdupDebug((a), (pul), __FILE__, __LINE__, __FUNCTION__) 42 43 #else 43 PSZ strhdup(const char *pszSource); 44 PSZ XWPENTRY strhdup(const char *pcszSource, 45 unsigned long *pulLength); 44 46 #endif 45 47 46 int strhcmp(const char *p1, const char *p2);47 48 int strhicmp(const char *p1, const char *p2);49 50 PSZ strhistr(const char *string1, const char *string2);51 52 ULONG strhncpy0(PSZ pszTarget,53 const char *pszSource,54 ULONG cbSource);55 56 ULONG strhCount(const char *pszSearch, CHAR c);57 58 BOOL strhIsDecimal(PSZ psz);48 int XWPENTRY strhcmp(const char *p1, const char *p2); 49 50 int XWPENTRY strhicmp(const char *p1, const char *p2); 51 52 PSZ XWPENTRY strhistr(const char *string1, const char *string2); 53 54 ULONG XWPENTRY strhncpy0(PSZ pszTarget, 55 const char *pszSource, 56 ULONG cbSource); 57 58 ULONG XWPENTRY strhCount(const char *pszSearch, CHAR c); 59 60 BOOL XWPENTRY strhIsDecimal(PSZ psz); 59 61 60 62 #if defined(__DEBUG_MALLOC_ENABLED__) && !defined(DONT_REPLACE_STRINGH_MALLOC) // setup.h, helpers\memdebug.c 61 PSZ strhSubstrDebug(const char *pBegin, // in: first char62 const char *pEnd, // in: last char (not included)63 const char *pcszSourceFile,64 unsigned long ulLine,65 const char *pcszFunction);63 PSZ XWPENTRY strhSubstrDebug(const char *pBegin, // in: first char 64 const char *pEnd, // in: last char (not included) 65 const char *pcszSourceFile, 66 unsigned long ulLine, 67 const char *pcszFunction); 66 68 #define strhSubstr(a, b) strhSubstrDebug((a), (b), __FILE__, __LINE__, __FUNCTION__) 67 69 #else 68 PSZ strhSubstr(const char *pBegin, const char *pEnd);70 PSZ XWPENTRY strhSubstr(const char *pBegin, const char *pEnd); 69 71 #endif 70 72 71 PSZ strhExtract(PSZ pszBuf,72 CHAR cOpen,73 CHAR cClose,74 PSZ *ppEnd);75 76 PSZ strhQuote(PSZ pszBuf,77 CHAR cQuote,78 PSZ *ppEnd);79 80 ULONG strhStrip(PSZ psz);81 82 PSZ strhins(const char *pcszBuffer,83 ULONG ulInsertOfs,84 const char *pcszInsert);85 86 ULONG strhFindReplace(PSZ *ppszBuf,87 PULONG pulOfs,88 const char *pcszSearch,89 const char *pcszReplace);90 91 ULONG strhWords(PSZ psz);73 PSZ XWPENTRY strhExtract(PSZ pszBuf, 74 CHAR cOpen, 75 CHAR cClose, 76 PSZ *ppEnd); 77 78 PSZ XWPENTRY strhQuote(PSZ pszBuf, 79 CHAR cQuote, 80 PSZ *ppEnd); 81 82 ULONG XWPENTRY strhStrip(PSZ psz); 83 84 PSZ XWPENTRY strhins(const char *pcszBuffer, 85 ULONG ulInsertOfs, 86 const char *pcszInsert); 87 88 ULONG XWPENTRY strhFindReplace(PSZ *ppszBuf, 89 PULONG pulOfs, 90 const char *pcszSearch, 91 const char *pcszReplace); 92 93 ULONG XWPENTRY strhWords(PSZ psz); 92 94 93 95 #define STRH_BEGIN_CHARS "\x0d\x0a " 94 96 #define STRH_END_CHARS "\x0d\x0a /-" 95 97 96 BOOL strhGetWord(PSZ *ppszStart,97 const char *pLimit,98 const char *pcszBeginChars,99 const char *pcszEndChars, // = "\x0d\x0a /-";100 PSZ *ppszEnd);101 102 BOOL strhIsWord(const char *pcszBuf,103 const char *p,104 ULONG cbSearch,105 const char *pcszBeginChars,106 const char *pcszEndChars);107 108 PSZ strhFindWord(const char *pszBuf,109 const char *pszSearch,110 const char *pcszBeginChars,111 const char *pcszEndChars);112 113 PSZ strhFindEOL(const char *pcszSearchIn, ULONG *pulOffset);114 115 PSZ strhFindNextLine(PSZ pszSearchIn, PULONG pulOffset);116 117 BOOL strhBeautifyTitle(PSZ psz);118 119 PSZ strhFindAttribValue(const char *pszSearchIn, const char *pszAttrib);120 121 PSZ strhGetNumAttribValue(const char *pszSearchIn,122 const char *pszTag,123 PLONG pl);124 125 PSZ strhGetTextAttr(const char *pszSearchIn, const char *pszTag, PULONG pulOffset);126 127 PSZ strhFindEndOfTag(const char *pszBeginOfTag);128 129 ULONG strhGetBlock(const char *pszSearchIn,130 PULONG pulSearchOffset,131 PSZ pszTag,132 PSZ *ppszBlock,133 PSZ *ppszAttribs,134 PULONG pulOfsBeginTag,135 PULONG pulOfsBeginBlock);98 BOOL XWPENTRY strhGetWord(PSZ *ppszStart, 99 const char *pLimit, 100 const char *pcszBeginChars, 101 const char *pcszEndChars, // = "\x0d\x0a /-"; 102 PSZ *ppszEnd); 103 104 BOOL XWPENTRY strhIsWord(const char *pcszBuf, 105 const char *p, 106 ULONG cbSearch, 107 const char *pcszBeginChars, 108 const char *pcszEndChars); 109 110 PSZ XWPENTRY strhFindWord(const char *pszBuf, 111 const char *pszSearch, 112 const char *pcszBeginChars, 113 const char *pcszEndChars); 114 115 PSZ XWPENTRY strhFindEOL(const char *pcszSearchIn, ULONG *pulOffset); 116 117 PSZ XWPENTRY strhFindNextLine(PSZ pszSearchIn, PULONG pulOffset); 118 119 BOOL XWPENTRY strhBeautifyTitle(PSZ psz); 120 121 PSZ XWPENTRY strhFindAttribValue(const char *pszSearchIn, const char *pszAttrib); 122 123 PSZ XWPENTRY strhGetNumAttribValue(const char *pszSearchIn, 124 const char *pszTag, 125 PLONG pl); 126 127 PSZ XWPENTRY strhGetTextAttr(const char *pszSearchIn, const char *pszTag, PULONG pulOffset); 128 129 PSZ XWPENTRY strhFindEndOfTag(const char *pszBeginOfTag); 130 131 ULONG XWPENTRY strhGetBlock(const char *pszSearchIn, 132 PULONG pulSearchOffset, 133 PSZ pszTag, 134 PSZ *ppszBlock, 135 PSZ *ppszAttribs, 136 PULONG pulOfsBeginTag, 137 PULONG pulOfsBeginBlock); 136 138 137 139 /* ****************************************************************** … … 146 148 PULONG pcbRoot); 147 149 148 PSZ strhCreateDump(PBYTE pb,149 ULONG ulSize,150 ULONG ulIndent);150 PSZ XWPENTRY strhCreateDump(PBYTE pb, 151 ULONG ulSize, 152 ULONG ulIndent); 151 153 152 154 /* ****************************************************************** … … 173 175 #define FNM_PATHPREFIX 256 174 176 175 BOOL strhMatchOS2(const char *pcszMask, const char *pcszName);176 177 BOOL strhMatchExt(const char *pcszMask,178 const char *pcszName,179 unsigned flags);177 BOOL XWPENTRY strhMatchOS2(const char *pcszMask, const char *pcszName); 178 179 BOOL XWPENTRY strhMatchExt(const char *pcszMask, 180 const char *pcszName, 181 unsigned flags); 180 182 181 183 /* ****************************************************************** … … 185 187 ********************************************************************/ 186 188 187 void* strhmemfind(const void *in_block,188 size_t block_size,189 const void *in_pattern,190 size_t pattern_size,191 size_t *shift,192 BOOL *repeat_find);193 194 char* strhtxtfind (const char *string,195 const char *pattern);189 void* XWPENTRY strhmemfind(const void *in_block, 190 size_t block_size, 191 const void *in_pattern, 192 size_t pattern_size, 193 size_t *shift, 194 BOOL *repeat_find); 195 196 char* XWPENTRY strhtxtfind (const char *string, 197 const char *pattern); 196 198 197 199 #endif
Note:
See TracChangeset
for help on using the changeset viewer.