Changeset 140 for trunk/src/helpers/stringh.c
- Timestamp:
- Feb 9, 2002, 6:48:12 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/stringh.c
r132 r140 81 81 PCSZ pcszSource, 82 82 PULONG pulLength, // out: length of new string (ptr can be NULL) 83 const char *pcszSourceFile,83 PCSZ pcszSourceFile, 84 84 unsigned long ulLine, 85 const char *pcszFunction)85 PCSZ pcszFunction) 86 86 { 87 87 ULONG ulLength = 0; … … 169 169 */ 170 170 171 PSZ strhcpy(PSZ string1, const char *string2)171 PSZ strhcpy(PSZ string1, PCSZ string2) 172 172 { 173 173 if (string2) … … 187 187 */ 188 188 189 PSZ strhdupDebug( const char *pcszSource,189 PSZ strhdupDebug(PCSZ pcszSource, 190 190 unsigned long *pulLength, 191 const char *pcszSourceFile,191 PCSZ pcszSourceFile, 192 192 unsigned long ulLine, 193 const char *pcszFunction)193 PCSZ pcszFunction) 194 194 { 195 195 PSZ pszReturn = NULL; … … 225 225 */ 226 226 227 PSZ strhdup( const char *pcszSource,227 PSZ strhdup(PCSZ pcszSource, 228 228 unsigned long *pulLength) // out: length of string excl. null terminator (ptr can be NULL) 229 229 { … … 259 259 */ 260 260 261 int strhcmp( const char *p1, const char *p2)261 int strhcmp(PCSZ p1, PCSZ p2) 262 262 { 263 263 if (p1 && p2) … … 286 286 */ 287 287 288 int strhicmp( const char *p1, const char *p2)288 int strhicmp(PCSZ p1, PCSZ p2) 289 289 { 290 290 if (p1 && p2) … … 312 312 */ 313 313 314 PSZ strhistr( const char *string1, const char *string2)314 PSZ strhistr(PCSZ string1, PCSZ string2) 315 315 { 316 316 PSZ prc = NULL; … … 352 352 353 353 ULONG strhncpy0(PSZ pszTarget, 354 const char *pszSource,354 PCSZ pszSource, 355 355 ULONG cbSource) 356 356 { … … 378 378 */ 379 379 380 ULONG strhCount( const char *pszSearch,380 ULONG strhCount(PCSZ pszSearch, 381 381 CHAR c) 382 382 { … … 424 424 */ 425 425 426 PSZ strhSubstrDebug( const char *pBegin, // in: first char427 const char *pEnd, // in: last char (not included)428 const char *pcszSourceFile,426 PSZ strhSubstrDebug(PCSZ pBegin, // in: first char 427 PCSZ pEnd, // in: last char (not included) 428 PCSZ pcszSourceFile, 429 429 unsigned long ulLine, 430 const char *pcszFunction)430 PCSZ pcszFunction) 431 431 { 432 432 PSZ pszSubstr = NULL; … … 469 469 */ 470 470 471 PSZ strhSubstr( const char *pBegin, // in: first char472 const char *pEnd) // in: last char (not included)471 PSZ strhSubstr(PCSZ pBegin, // in: first char 472 PCSZ pEnd) // in: last char (not included) 473 473 { 474 474 PSZ pszSubstr = NULL; … … 671 671 */ 672 672 673 PSZ strhins( const char *pcszBuffer,673 PSZ strhins(PCSZ pcszBuffer, 674 674 ULONG ulInsertOfs, 675 const char *pcszInsert)675 PCSZ pcszInsert) 676 676 { 677 677 PSZ pszNew = NULL; … … 723 723 PULONG pulOfs, // in: where to begin search (0 = start); 724 724 // out: ofs of first char after replacement string 725 const char *pcszSearch, // in: search string; cannot be NULL726 const char *pcszReplace) // in: replacement string; cannot be NULL725 PCSZ pcszSearch, // in: search string; cannot be NULL 726 PCSZ pcszReplace) // in: replacement string; cannot be NULL 727 727 { 728 728 ULONG ulrc = 0; … … 797 797 BOOL strhGetWord(PSZ *ppszStart, // in: start of search, 798 798 // out: start of word (if TRUE is returned) 799 const char *pLimit, // in: ptr to last char after *ppszStart to be799 PCSZ pLimit, // in: ptr to last char after *ppszStart to be 800 800 // searched; if the word does not end before 801 801 // or with this char, FALSE is returned 802 const char *pcszBeginChars, // stringh.h defines STRH_BEGIN_CHARS803 const char *pcszEndChars, // stringh.h defines STRH_END_CHARS802 PCSZ pcszBeginChars, // stringh.h defines STRH_BEGIN_CHARS 803 PCSZ pcszEndChars, // stringh.h defines STRH_END_CHARS 804 804 PSZ *ppszEnd) // out: first char _after_ word 805 805 // (if TRUE is returned) 806 806 { 807 807 // characters after which a word can be started 808 // const char *pcszBeginChars = "\x0d\x0a ";809 // const char *pcszEndChars = "\x0d\x0a /-";808 // PCSZ pcszBeginChars = "\x0d\x0a "; 809 // PCSZ pcszEndChars = "\x0d\x0a /-"; 810 810 811 811 PSZ pStart = *ppszStart; … … 855 855 */ 856 856 857 BOOL strhIsWord( const char *pcszBuf,858 const char *p, // in: start of word857 BOOL strhIsWord(PCSZ pcszBuf, 858 PCSZ p, // in: start of word 859 859 ULONG cbSearch, // in: length of word 860 const char *pcszBeginChars, // suggestion: "\x0d\x0a ()/\\-,."861 const char *pcszEndChars) // suggestion: "\x0d\x0a ()/\\-,.:;"860 PCSZ pcszBeginChars, // suggestion: "\x0d\x0a ()/\\-,." 861 PCSZ pcszEndChars) // suggestion: "\x0d\x0a ()/\\-,.:;" 862 862 { 863 863 BOOL fEndOK = FALSE; … … 915 915 */ 916 916 917 PSZ strhFindWord( const char *pszBuf,918 const char *pszSearch,919 const char *pcszBeginChars, // suggestion: "\x0d\x0a ()/\\-,."920 const char *pcszEndChars) // suggestion: "\x0d\x0a ()/\\-,.:;"917 PSZ strhFindWord(PCSZ pszBuf, 918 PCSZ pszSearch, 919 PCSZ pcszBeginChars, // suggestion: "\x0d\x0a ()/\\-,." 920 PCSZ pcszEndChars) // suggestion: "\x0d\x0a ()/\\-,.:;" 921 921 { 922 922 PSZ pszReturn = 0; … … 926 926 if ((cbBuf) && (cbSearch)) 927 927 { 928 const char *p = pszBuf;928 PCSZ p = pszBuf; 929 929 930 930 do // while p … … 966 966 */ 967 967 968 PSZ strhFindEOL( const char *pcszSearchIn, // in: where to search968 PSZ strhFindEOL(PCSZ pcszSearchIn, // in: where to search 969 969 PULONG pulOffset) // out: offset (ptr can be NULL) 970 970 { 971 const char *p = pcszSearchIn,972 *prc = 0;971 PCSZ p = pcszSearchIn, 972 prc = 0; 973 973 while (TRUE) 974 974 {
Note:
See TracChangeset
for help on using the changeset viewer.