Ignore:
Timestamp:
Feb 4, 2002, 6:32:38 PM (24 years ago)
Author:
umoeller
Message:

Buncha fixes, and fixes for fixes.

File:
1 edited

Legend:

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

    r132 r137  
    478478PXSTRING xstrCreate(ULONG ulPreAllocate)
    479479{
    480     PXSTRING pxstr = (PXSTRING)malloc(sizeof(XSTRING));
    481     if (pxstr)
     480    PXSTRING pxstr;
     481    if (pxstr = (PXSTRING)malloc(sizeof(XSTRING)))
    482482        xstrInit(pxstr, ulPreAllocate);
    483483
     
    14041404 *@@added V0.9.9 (2001-02-28) [umoeller]
    14051405 *@@changed V0.9.9 (2001-03-06) [lafaix]: removed memory allocation
    1406  */
    1407 
    1408 ULONG xstrDecode(PXSTRING pxstr)       // in/out: string to be decoded
     1406 *@@changed V0.9.16 (2002-02-02) [umoeller]: added cKey
     1407 */
     1408
     1409ULONG xstrDecode2(PXSTRING pxstr,       // in/out: string to be decoded
     1410                  CHAR cKey)            // in: encoding key (normally '%')
    14091411{
    14101412    ULONG   ulrc = 0;
     
    14231425            // pSource points to next char now
    14241426
    1425             if (c == '%')
     1427            if (c == cKey)
    14261428            {
    14271429                static char ach[] = "0123456789ABCDEF";
     
    14531455
    14541456            // not encoding, or null after '%', or invalid encoding:
    1455             // just copy this
     1457            // just leave thisalone
    14561458            *pDest++ = c;
    14571459        } // while ((ch = *pSource++))
     
    14651467
    14661468    return (ulrc);
     1469}
     1470
     1471/*
     1472 *@@ xstrDecode:
     1473 *      added for compatibility with exports.
     1474 *
     1475 *@@added V0.9.16 (2002-02-02) [umoeller]
     1476 */
     1477
     1478ULONG xstrDecode(PXSTRING pxstr)
     1479{
     1480    return (xstrDecode2(pxstr, '%'));
    14671481}
    14681482
Note: See TracChangeset for help on using the changeset viewer.