Changeset 1498 for trunk/dll/systemf.c


Ignore:
Timestamp:
Jan 18, 2010, 1:57:01 AM (16 years ago)
Author:
Gregg Young
Message:

Changes to get FM2 to compile with the latest watcom 1.9 beta (mostly type casts of CHAR CONSTANT * to CHAR *). Changes to get the environment settings working everywhere again (broken by the change that moved commands to the INI); Added an environment size variable (set to 2048 which was the largest I found hard coded). Still need to find everywhere the environment size is set and use this variable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/systemf.c

    r1497 r1498  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2003, 2009 Steven H.Levine
     9  Copyright (c) 2003, 2010 Steven H.Levine
    1010
    1111  21 Nov 03 SHL Comments
     
    3030  27 Dec 09 GKY Provide human readable error message when DosQueryAppType fails because it
    3131                couldn't find the exe (such as missing archivers).
     32  17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
     33  17 JAN 10 GKY Changes to environment handling in ExecuteOnList to facilitate move of commands to INI and allow
     34                the same commandline to have different environments (multiple different command titles).
     35  17 JAN 10 GKY Add ENVIRONMENT_SIZE vaiable to replace multiple (often different hard coded sizes) set to 2048
     36                (the largest value I found).
    3237
    3338***********************************************************************/
     
    648653  {
    649654    EXECARGS ex;
    650     //ULONG size;
    651655    int ret;
    652656
    653657    memset(&ex, 0, sizeof(EXECARGS));
    654     //size = sizeof(ex.environment) - 1;
    655     //PrfQueryProfileData(fmprof, FM3Str, command, ex.environment, &size);
     658    if (!environment) {
     659      ULONG size;
     660
     661      size = ENVIRONMENT_SIZE;
     662      PrfQueryProfileData(fmprof, (CHAR *) FM3Str, command, ex.environment, &size);
     663    }
     664    else
     665      strcpy(ex.environment, environment);
    656666    if (flags & PROMPT) {
    657667      /* allow editing command line */
     
    670680    else
    671681      ex.flags = flags;
    672     ex.flags &= (~PROMPT);
     682    //ex.flags &= (~PROMPT);  redundant GKY 1-9-10
    673683    //DbgMsg(pszSrcFile, __LINE__, "Inserted %s", environment);
    674684    ret = runemf2(ex.flags, hwnd, pszCallingFile, uiLineNumber, path,
    675                    environment ? environment : NULL,
     685                   *ex.environment ? ex.environment : NULL,
    676686                   "%s", commandline);
    677687    free(commandline);
Note: See TracChangeset for help on using the changeset viewer.