Ignore:
Timestamp:
Sep 12, 2000, 6:29:59 AM (25 years ago)
Author:
bird
Message:

Command line string rewrite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/winexepeldr.cpp

    r3501 r4236  
    1 /* $Id: winexepeldr.cpp,v 1.9 2000-05-09 18:56:09 sandervl Exp $ */
     1/* $Id: winexepeldr.cpp,v 1.10 2000-09-12 04:29:59 bird Exp $ */
    22
    33/*
     
    4747//Called by ring 3 pe loader to create win32 executable
    4848//******************************************************************************
    49 BOOL WIN32API CreateWin32PeLdrExe(char *szFileName, char *szCmdLine, ULONG reservedMem) 
     49BOOL WIN32API CreateWin32PeLdrExe(char *szFileName, char *szCmdLine, ULONG reservedMem)
    5050{
    5151 APIRET  rc;
     
    6767  }
    6868
    69   //exe length + space + (possibly) 2x'"' + cmd line length + 0 terminator
    70   szFullCmdLine = (char *)malloc(strlen(szFileName) + 3 + strlen(szCmdLine) + 1);
    71   //Enclose executable name in quotes if it (or it's directory) contains spaces
    72   if(strchr(szFileName, ' ') != NULL) {
    73         sprintf(szFullCmdLine, "\"%s\"", szFileName);
    74   }
    75   else  strcpy(szFullCmdLine, szFileName);
    76   strcat(szFullCmdLine, " ");
    77   strcat(szFullCmdLine, szCmdLine);
    78   WinExe->setCommandLine(szFullCmdLine);
    79   dprintf(("Cmd line: %s", szFullCmdLine));
    80   free(szFullCmdLine);
     69  /* Initiate the commandline.
     70   * (Since PE.EXE takes no options we'll currently just skip the
     71   * first parameter and used the passed in executable name.)
     72   */
     73  szCmdLine = szCmdLine; /* ignored */
     74  InitCommandLine(szFileName);
    8175
    8276  if(getenv("WIN32_IOPL2")) {
     
    9589        return FALSE;
    9690  }
     91
    9792  OS2UnsetExceptionHandler(&exceptFrame);
    9893  if(WinExe->isConsoleApp()) {
     
    112107//******************************************************************************
    113108//******************************************************************************
    114 Win32PeLdrExe::Win32PeLdrExe(char *szFileName) : 
    115                    Win32ImageBase(-1), 
     109Win32PeLdrExe::Win32PeLdrExe(char *szFileName) :
     110                   Win32ImageBase(-1),
    116111                   Win32ExeBase(-1),
    117112                   Win32PeLdrImage(szFileName, TRUE)
Note: See TracChangeset for help on using the changeset viewer.