Ignore:
Timestamp:
Nov 4, 2000, 8:55:45 PM (25 years ago)
Author:
umoeller
Message:

Updated string helpers.

File:
1 edited

Legend:

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

    r11 r12  
    23682368    // XXX.CMD file as executable:
    23692369    // fix args to /C XXX.CMD
    2370     PSZ pszNewParams = strdup("/C ");
    2371     xstrcat(&pszNewParams, pProgDetails->pszExecutable);
     2370    XSTRING strNewParams;
     2371    xstrInit(&strNewParams, 200);
     2372    xstrcpy(&strNewParams, "/C ");
     2373    xstrcat(&strNewParams, pProgDetails->pszExecutable);
    23722374    if (*ppszParams)
    23732375    {
    23742376        // append old params
    2375         xstrcat(&pszNewParams, " ");
    2376         xstrcat(&pszNewParams, *ppszParams);
     2377        xstrcat(&strNewParams, " ");
     2378        xstrcat(&strNewParams, *ppszParams);
    23772379        free(*ppszParams);
    23782380    }
    2379     *ppszParams = pszNewParams;
     2381    *ppszParams = strNewParams.psz;
    23802382            // freed by caller
    23812383
     
    24932495        {
    24942496            // enhanced Win-OS/2 session:
    2495             PSZ psz2 = strdup("/3 ");
     2497            XSTRING str2;
     2498            xstrInit(&str2, 200);
     2499            xstrcpy(&str2, "/3 ");
    24962500            if (pszParamsPatched)
    24972501            {
    24982502                // append existing params
    2499                 xstrcat(&psz2, pszParamsPatched);
     2503                xstrcat(&str2, pszParamsPatched);
    25002504                free(pszParamsPatched);
    25012505            }
    25022506
    2503             pszParamsPatched = psz2;
     2507            pszParamsPatched = str2.psz;
    25042508        }
    25052509
     
    29752979    if (pszText)
    29762980    {
    2977         if (xstrrpl(&pszText, 0, pszSearch, pszReplaceWith, 0) > 0)
     2981        if (strhrpl(&pszText, 0, pszSearch, pszReplaceWith, 0) > 0)
    29782982        {
    29792983            WinSetWindowText(hwnd, pszText);
Note: See TracChangeset for help on using the changeset viewer.