Ignore:
Timestamp:
Feb 9, 2002, 6:48:12 PM (24 years ago)
Author:
umoeller
Message:

V0.9.18, plus a bunch of fixes already.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/stringh.c

    r132 r140  
    8181                      PCSZ pcszSource,
    8282                      PULONG pulLength,        // out: length of new string (ptr can be NULL)
    83                       const char *pcszSourceFile,
     83                      PCSZ pcszSourceFile,
    8484                      unsigned long ulLine,
    85                       const char *pcszFunction)
     85                      PCSZ pcszFunction)
    8686{
    8787    ULONG ulLength = 0;
     
    169169 */
    170170
    171 PSZ strhcpy(PSZ string1, const char *string2)
     171PSZ strhcpy(PSZ string1, PCSZ string2)
    172172{
    173173    if (string2)
     
    187187 */
    188188
    189 PSZ strhdupDebug(const char *pcszSource,
     189PSZ strhdupDebug(PCSZ pcszSource,
    190190                 unsigned long *pulLength,
    191                  const char *pcszSourceFile,
     191                 PCSZ pcszSourceFile,
    192192                 unsigned long ulLine,
    193                  const char *pcszFunction)
     193                 PCSZ pcszFunction)
    194194{
    195195    PSZ     pszReturn = NULL;
     
    225225 */
    226226
    227 PSZ strhdup(const char *pcszSource,
     227PSZ strhdup(PCSZ pcszSource,
    228228            unsigned long *pulLength)       // out: length of string excl. null terminator (ptr can be NULL)
    229229{
     
    259259 */
    260260
    261 int strhcmp(const char *p1, const char *p2)
     261int strhcmp(PCSZ p1, PCSZ p2)
    262262{
    263263    if (p1 && p2)
     
    286286 */
    287287
    288 int strhicmp(const char *p1, const char *p2)
     288int strhicmp(PCSZ p1, PCSZ p2)
    289289{
    290290    if (p1 && p2)
     
    312312 */
    313313
    314 PSZ strhistr(const char *string1, const char *string2)
     314PSZ strhistr(PCSZ string1, PCSZ string2)
    315315{
    316316    PSZ prc = NULL;
     
    352352
    353353ULONG strhncpy0(PSZ pszTarget,
    354                 const char *pszSource,
     354                PCSZ pszSource,
    355355                ULONG cbSource)
    356356{
     
    378378 */
    379379
    380 ULONG strhCount(const char *pszSearch,
     380ULONG strhCount(PCSZ pszSearch,
    381381                CHAR c)
    382382{
     
    424424 */
    425425
    426 PSZ strhSubstrDebug(const char *pBegin,      // in: first char
    427                     const char *pEnd,        // in: last char (not included)
    428                     const char *pcszSourceFile,
     426PSZ strhSubstrDebug(PCSZ pBegin,      // in: first char
     427                    PCSZ pEnd,        // in: last char (not included)
     428                    PCSZ pcszSourceFile,
    429429                    unsigned long ulLine,
    430                     const char *pcszFunction)
     430                    PCSZ pcszFunction)
    431431{
    432432    PSZ pszSubstr = NULL;
     
    469469 */
    470470
    471 PSZ strhSubstr(const char *pBegin,      // in: first char
    472                const char *pEnd)        // in: last char (not included)
     471PSZ strhSubstr(PCSZ pBegin,      // in: first char
     472               PCSZ pEnd)        // in: last char (not included)
    473473{
    474474    PSZ pszSubstr = NULL;
     
    671671 */
    672672
    673 PSZ strhins(const char *pcszBuffer,
     673PSZ strhins(PCSZ pcszBuffer,
    674674            ULONG ulInsertOfs,
    675             const char *pcszInsert)
     675            PCSZ pcszInsert)
    676676{
    677677    PSZ     pszNew = NULL;
     
    723723                      PULONG pulOfs,               // in: where to begin search (0 = start);
    724724                                                   // out: ofs of first char after replacement string
    725                       const char *pcszSearch,      // in: search string; cannot be NULL
    726                       const char *pcszReplace)     // in: replacement string; cannot be NULL
     725                      PCSZ pcszSearch,      // in: search string; cannot be NULL
     726                      PCSZ pcszReplace)     // in: replacement string; cannot be NULL
    727727{
    728728    ULONG   ulrc = 0;
     
    797797BOOL strhGetWord(PSZ *ppszStart,        // in: start of search,
    798798                                        // out: start of word (if TRUE is returned)
    799                  const char *pLimit,    // in: ptr to last char after *ppszStart to be
     799                 PCSZ pLimit,    // in: ptr to last char after *ppszStart to be
    800800                                        // searched; if the word does not end before
    801801                                        // or with this char, FALSE is returned
    802                  const char *pcszBeginChars, // stringh.h defines STRH_BEGIN_CHARS
    803                  const char *pcszEndChars, // stringh.h defines STRH_END_CHARS
     802                 PCSZ pcszBeginChars, // stringh.h defines STRH_BEGIN_CHARS
     803                 PCSZ pcszEndChars, // stringh.h defines STRH_END_CHARS
    804804                 PSZ *ppszEnd)          // out: first char _after_ word
    805805                                        // (if TRUE is returned)
    806806{
    807807    // 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 /-";
    810810
    811811    PSZ pStart = *ppszStart;
     
    855855 */
    856856
    857 BOOL strhIsWord(const char *pcszBuf,
    858                 const char *p,                 // in: start of word
     857BOOL strhIsWord(PCSZ pcszBuf,
     858                PCSZ p,                 // in: start of word
    859859                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 ()/\\-,.:;"
    862862{
    863863    BOOL    fEndOK = FALSE;
     
    915915 */
    916916
    917 PSZ strhFindWord(const char *pszBuf,
    918                  const char *pszSearch,
    919                  const char *pcszBeginChars,    // suggestion: "\x0d\x0a ()/\\-,."
    920                  const char *pcszEndChars)      // suggestion: "\x0d\x0a ()/\\-,.:;"
     917PSZ strhFindWord(PCSZ pszBuf,
     918                 PCSZ pszSearch,
     919                 PCSZ pcszBeginChars,    // suggestion: "\x0d\x0a ()/\\-,."
     920                 PCSZ pcszEndChars)      // suggestion: "\x0d\x0a ()/\\-,.:;"
    921921{
    922922    PSZ     pszReturn = 0;
     
    926926    if ((cbBuf) && (cbSearch))
    927927    {
    928         const char *p = pszBuf;
     928        PCSZ p = pszBuf;
    929929
    930930        do  // while p
     
    966966 */
    967967
    968 PSZ strhFindEOL(const char *pcszSearchIn,        // in: where to search
     968PSZ strhFindEOL(PCSZ pcszSearchIn,        // in: where to search
    969969                PULONG pulOffset)       // out: offset (ptr can be NULL)
    970970{
    971     const char *p = pcszSearchIn,
    972                *prc = 0;
     971    PCSZ    p = pcszSearchIn,
     972            prc = 0;
    973973    while (TRUE)
    974974    {
Note: See TracChangeset for help on using the changeset viewer.