Changeset 985 for trunk/dll/avv.c


Ignore:
Timestamp:
Mar 1, 2008, 2:37:14 AM (17 years ago)
Author:
Gregg Young
Message:

Update sizes dialog (ticket 44); Make max command line length user settable (ticket 199); use xfree for free in most cases (ticket 212); initial code to check for valid ini file (ticket 102); Some additional refactoring and structure rework; Some documentation updates;

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/avv.c

    r959 r985  
    2424  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
    2525  06 Jan 08 GKY Use NormalizeCmdLine to check program strings on entry
     26  29 Feb 08 GKY Changes to enable user settable command line length
    2627
    2728***********************************************************************/
     
    9394static PSZ free_and_strdup_quoted_from_window(HWND hwnd, USHORT id, PSZ pszDest)
    9495{ // fixme for command line limit
    95   CHAR szCmdLine[MAXCOMLINESTRG];
    96 
     96  CHAR *szCmdLine;
     97
     98  szCmdLine = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__);
     99        if (!szCmdLine)
     100          return NULL; //already complained
    97101  xfree(pszDest);
    98102  WinQueryDlgItemText(hwnd, id, sizeof(szCmdLine), szCmdLine);
    99103  if (*szCmdLine){
    100104    PSZ pszWorkBuf;
    101     pszWorkBuf = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__);
     105    pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__);
    102106    if (pszWorkBuf) {
    103107      NormalizeCmdLine(pszWorkBuf, szCmdLine);
     
    110114  else
    111115    pszDest = NULL;
     116  xfree(szCmdLine);
    112117  return pszDest;
    113118}
Note: See TracChangeset for help on using the changeset viewer.