Changeset 920 for trunk/dll/command.c


Ignore:
Timestamp:
Jan 13, 2008, 2:18:17 AM (18 years ago)
Author:
Gregg Young
Message:

Cleanup of NormalizeCmdLine moved to pathutil.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/command.c

    r918 r920  
    2121  19 Apr 07 SHL Sync with AcceptOneDrop GetOneDrop mods
    2222  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
    23   06 Jan 08 GKY Use CheckApp_QuoteAddExe to check program strings on entry
     23  06 Jan 08 GKY Use NormalizeCmdLine to check program strings on entry
    2424
    2525***********************************************************************/
     
    4040#include "strutil.h"                    // GetPString
    4141#include "fm3dll.h"
    42 
     42#include "pathutil.h"                   // NormalizeCmdLine
    4343
    4444typedef struct
     
    621621      {
    622622        COMMAND temp;
    623         PSZ psz;
     623        PSZ pszWorkBuf;
    624624        APIRET ret;
    625625
    626         psz = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__);
     626        pszWorkBuf = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__);
    627627        memset(&temp, 0, sizeof(COMMAND));
    628628        WinQueryDlgItemText(hwnd, CMD_CL, sizeof(temp.cl), temp.cl);
    629         CheckApp_QuoteAddExe(psz, temp.cl);
    630         memcpy(temp.cl, psz, strlen(psz) + 1);
     629        NormalizeCmdLine(pszWorkBuf, temp.cl);
     630        memcpy(temp.cl, pszWorkBuf, strlen(pszWorkBuf) + 1);
    631631        if (!strchr(temp.cl, '%')){
    632632          ret = saymsg(MB_YESNO,
     
    716716      {
    717717        COMMAND temp;
    718         PSZ psz;
     718        PSZ pszWorkBuf;
    719719        APIRET ret;
    720720
    721         psz = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__);
     721        pszWorkBuf = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__);
    722722        memset(&temp, 0, sizeof(COMMAND));
    723723        WinQueryDlgItemText(hwnd, CMD_CL, sizeof(temp.cl), temp.cl);
    724         CheckApp_QuoteAddExe(psz, temp.cl);
    725         memcpy(temp.cl, psz, strlen(psz) + 1);
     724        NormalizeCmdLine(pszWorkBuf, temp.cl);
     725        memcpy(temp.cl, pszWorkBuf, strlen(pszWorkBuf) + 1);
    726726        if (!strchr(temp.cl, '%')){
    727727          ret = saymsg(MB_YESNO,
     
    816816    case CMD_REPLACE:
    817817      { //Delete first
    818         PSZ psz;
     818        PSZ pszWorkBuf;
    819819        COMMAND temp;
    820820        APIRET ret;
    821821
    822         psz = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__);
     822        pszWorkBuf = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__);
    823823        memset(&temp, 0, sizeof(COMMAND));
    824824        WinQueryDlgItemText(hwnd, CMD_CL, sizeof(temp.cl), temp.cl);
    825         CheckApp_QuoteAddExe(psz, temp.cl);
    826         memcpy(temp.cl, psz, strlen(psz) + 1);
     825        NormalizeCmdLine(pszWorkBuf, temp.cl);
     826        memcpy(temp.cl, pszWorkBuf, strlen(pszWorkBuf) + 1);
    827827        if (fCancelAction){
    828828          fCancelAction = FALSE;
Note: See TracChangeset for help on using the changeset viewer.