Changeset 1519


Ignore:
Timestamp:
May 1, 2010, 9:39:04 PM (15 years ago)
Author:
Gregg Young
Message:

Add ENVIRONMENT_SIZE variable to standardize this size everywhere. Changes to move environment storage to INI file. The environment changes still don't actually get loaded in the new/child process (of course they never did).

Location:
trunk/dll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/assoc.c

    r1498 r1519  
    2222  15 Nov 09 GKY Add check for attempt to open zero byte file (avoids MMPM trying to play them)
    2323  21 Dec 09 GKY Added CheckExecutibleFlags to streamline code in command.c assoc.c & cmdline.c
    24   17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
     24  17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10).
     25                Mostly cast CHAR CONSTANT * as CHAR *.
     26  01 May 10 GKY Add ENVIRONMENT_SIZE variable to standardize this size everywhere.
     27  01 May 10 GKY Changes to move environment storage to INI file
    2528
    2629**************************************************************************************/
     
    7073  CHAR mask[CCHMAXPATH];
    7174  CHAR sig[CCHMAXPATH];
     75  CHAR env[ENVIRONMENT_SIZE];
    7276}
    7377ASSOC;
     
    7882  PSZ pszCmdLine;
    7983  CHAR *sig;
     84  CHAR *env;
    8085  LONG offset;
    8186  ULONG flags;
     
    163168  CHAR offset[72];
    164169  CHAR flags[72];
     170  CHAR env[ENVIRONMENT_SIZE];
     171  CHAR key[CCHMAXPATH];
    165172
    166173  if (asshead)
     
    196203      bstripcr(flags);
    197204      if (!*pszCmdLine)
    198         continue;
     205        continue;
     206      sprintf(key, "ASSOC.%senv", pszCmdLine);
     207      PrfQueryProfileString(fmprof, FM3Str, key, NullStr, env, sizeof(env));
    199208      info = xmallocz(sizeof(LINKASSOC), pszSrcFile, __LINE__);
    200209      if (info) {
     
    204213          info->sig = xstrdup(sig, pszSrcFile, __LINE__);
    205214        info->offset = atol(offset);
    206         info->flags = atol(flags);
     215        info->flags = atol(flags);
     216        if (env != NullStr)
     217          info->env = xstrdup(env, pszSrcFile, __LINE__);
    207218        if (!info->pszCmdLine || !info->mask) {
    208219          xfree(info->pszCmdLine, pszSrcFile, __LINE__);
    209           xfree(info->mask, pszSrcFile, __LINE__);
     220          xfree(info->mask, pszSrcFile, __LINE__);
     221          xfree(info->env, pszSrcFile, __LINE__);
    210222          free(info);
    211223          break;
     
    227239VOID display_associations(HWND hwnd, ASSOC *temp, LINKASSOC *info)
    228240{
    229   CHAR szEnviroment[2048];
     241  //CHAR szEnviroment[ENVIRONMENT_SIZE];
    230242  PSZ pszDisplayStr;
    231243  SHORT x;
    232244
    233   *szEnviroment = 0;
    234   WinQueryDlgItemText(hwnd, ASS_ENVIRON, 2048, szEnviroment);
    235   bstripcr(szEnviroment);
    236   if (*szEnviroment)
    237     PrfWriteProfileString(fmprof, (CHAR *) FM3Str, temp->pszCmdLine, szEnviroment);
     245  //*szEnviroment = 0;
     246  //WinQueryDlgItemText(hwnd, ASS_ENVIRON, ENVIRONMENT_SIZE - 1, szEnviroment);
     247  //bstripcr(szEnviroment);
     248  //if (*szEnviroment)
     249  //  PrfWriteProfileString(fmprof, FM3Str, temp->pszCmdLine, szEnviroment);
    238250  pszDisplayStr = xmallocz((CCHMAXPATH * 2) + MaxComLineStrg + 6,
    239251                           pszSrcFile, __LINE__);
     
    304316              info->pszCmdLine,
    305317              CCHMAXPATH,
    306               (info->sig) ? info->sig : NullStr, info->offset, info->flags);
     318              (info->sig) ? info->sig : NullStr, info->offset, info->flags);
     319      if (info->env[0] != 0) {
     320        CHAR key[CCHMAXPATH];
     321
     322        sprintf(key, "ASSOC.%senv", info->pszCmdLine);
     323        PrfWriteProfileString(fmprof, FM3Str, key, info->env);
     324      }
     325      else {
     326        CHAR key[CCHMAXPATH];
     327
     328        sprintf(key, "ASSOC.%senv", info->pszCmdLine);
     329        PrfWriteProfileString(fmprof, FM3Str, key, NULL);
     330      }
     331
    307332      info = info->next;
    308333    }
     
    334359          info->offset = addme->offset;
    335360        if (addme->flags)
    336           info->flags = addme->flags;
     361          info->flags = addme->flags;
     362        if (addme->env != NullStr)
     363          info->env = xstrdup(addme->env, pszSrcFile, __LINE__);
    337364        if (!info->pszCmdLine || !info->mask) {
    338365          xfree(info->pszCmdLine, pszSrcFile, __LINE__);
     
    501528        if (flags & DIEAFTER)
    502529          dieafter = TRUE;
    503         flags &= (~DIEAFTER);
     530        flags &= (~DIEAFTER);
     531        DbgMsg(pszSrcFile, __LINE__, "env %s", info->env);
    504532        rc = ExecOnList(hwnd,
    505533                        info->pszCmdLine,
    506534                        flags, NULL,
    507                         NULL, list, GetPString(IDS_EXECASSOCTITLETEXT),
     535                        info->env != NullStr ? info->env : NULL,
     536                        list,
     537                        GetPString(IDS_EXECASSOCTITLETEXT),
    508538                        pszSrcFile, __LINE__);
    509539        if (rc != -1 && dieafter)
     
    529559                      MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
    530560    WinSendDlgItemMsg(hwnd, ASS_CL, EM_SETTEXTLIMIT,
    531                       MPFROM2SHORT(1000, 0), MPVOID);
     561                      MPFROM2SHORT(MaxComLineStrg - 1, 0), MPVOID);
     562    WinSendDlgItemMsg(hwnd, ASS_ENVIRON, EM_SETTEXTLIMIT,
     563                      MPFROM2SHORT(ENVIRONMENT_SIZE - 1, 0), MPVOID);
    532564    WinSendDlgItemMsg(hwnd, ASS_SIG, EM_SETTEXTLIMIT,
    533565                      MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
     
    633665          WinCheckButton(hwnd, ASS_PROMPT, ((info->flags & PROMPT) != 0));
    634666          {
    635             CHAR env[1002];
    636             ULONG size;
     667            CHAR env[ENVIRONMENT_SIZE];
     668            //ULONG size;
     669            CHAR key[CCHMAXPATH];
    637670
    638671            *env = 0;
    639             size = sizeof(env) - 1;
    640             if (PrfQueryProfileData(fmprof,
    641                                     (CHAR *) FM3Str, info->pszCmdLine, env, &size) && *env)
     672            //size = sizeof(env) - 1;
     673            sprintf(key, "ASSOC.%senv", info->pszCmdLine);
     674            if (PrfQueryProfileString(fmprof, FM3Str, key, NullStr, env, sizeof(env)) &&
     675                env != NullStr)
    642676              WinSetDlgItemText(hwnd, ASS_ENVIRON, env);
    643677            else
     
    759793        bstrip(temp.pszCmdLine);
    760794        temp.flags = CheckExecutibleFlags(hwnd, 1);
    761         /*if (WinQueryButtonCheckstate(hwnd, ASS_DEFAULT))
    762           temp.flags = 0;
    763         else if (WinQueryButtonCheckstate(hwnd, ASS_FULLSCREEN))
    764           temp.flags = FULLSCREEN;
    765         else if (WinQueryButtonCheckstate(hwnd, ASS_MINIMIZED))
    766           temp.flags = MINIMIZED;
    767         else if (WinQueryButtonCheckstate(hwnd, ASS_MAXIMIZED))
    768           temp.flags = MAXIMIZED;
    769         else if (WinQueryButtonCheckstate(hwnd, ASS_INVISIBLE))
    770           temp.flags = INVISIBLE;
    771         if (WinQueryButtonCheckstate(hwnd, ASS_KEEP))
    772           temp.flags |= KEEP;
    773         if (WinQueryButtonCheckstate(hwnd, ASS_DIEAFTER))
    774           temp.flags |= DIEAFTER;
    775         if (WinQueryButtonCheckstate(hwnd, ASS_PROMPT))
    776           temp.flags |= PROMPT;*/
    777795        if (fCancelAction){
    778796          fCancelAction = FALSE;
     
    835853        bstrip(temp.pszCmdLine);
    836854        temp.flags = CheckExecutibleFlags(hwnd, 1);
    837         /*if (WinQueryButtonCheckstate(hwnd, ASS_DEFAULT))
    838           temp.flags = 0;
    839         else if (WinQueryButtonCheckstate(hwnd, ASS_FULLSCREEN))
    840           temp.flags = FULLSCREEN;
    841         else if (WinQueryButtonCheckstate(hwnd, ASS_MINIMIZED))
    842           temp.flags = MINIMIZED;
    843         else if (WinQueryButtonCheckstate(hwnd, ASS_MAXIMIZED))
    844           temp.flags = MAXIMIZED;
    845         else if (WinQueryButtonCheckstate(hwnd, ASS_INVISIBLE))
    846           temp.flags = INVISIBLE;
    847         if (WinQueryButtonCheckstate(hwnd, ASS_KEEP))
    848           temp.flags |= KEEP;
    849         if (WinQueryButtonCheckstate(hwnd, ASS_DIEAFTER))
    850           temp.flags |= DIEAFTER;
    851         if (WinQueryButtonCheckstate(hwnd, ASS_PROMPT))
    852           temp.flags |= PROMPT;*/
    853855        if (fCancelAction){
    854856          fCancelAction = FALSE;
     
    870872      {
    871873        ASSOC temp;
    872         CHAR dummy[34];
     874        CHAR dummy[34];
     875        CHAR key[CCHMAXPATH];
    873876
    874877        memset(&temp, 0, sizeof(ASSOC));
     
    883886          temp.offset = atol(dummy);
    884887        }
    885         bstrip(temp.mask);
    886         PrfWriteProfileData(fmprof, (CHAR *) FM3Str, temp.mask, NULL, 0L);
     888        //bstrip(temp.mask);
     889        sprintf(key, "ASSOC.%senv", temp.pszCmdLine);
     890        PrfWriteProfileString(fmprof, FM3Str, key, NULL);
    887891        if (kill_association(&temp)) {
    888892          x = (SHORT) WinSendDlgItemMsg(hwnd,
     
    907911      {
    908912        ASSOC temp;
    909         CHAR dummy[34];
     913        CHAR dummy[34];
    910914        PSZ pszWorkBuf;
    911915        replace = TRUE;
     
    939943        bstrip(temp.mask);
    940944        bstrip(temp.pszCmdLine);
     945        WinQueryDlgItemText(hwnd, ASS_ENVIRON, sizeof(temp.env), temp.env);
     946        bstrip(temp.env);
    941947        temp.flags = CheckExecutibleFlags(hwnd, 1);
    942         /*if (WinQueryButtonCheckstate(hwnd, ASS_DEFAULT))
    943           temp.flags = 0;
    944         else if (WinQueryButtonCheckstate(hwnd, ASS_FULLSCREEN))
    945           temp.flags = FULLSCREEN;
    946         else if (WinQueryButtonCheckstate(hwnd, ASS_MINIMIZED))
    947           temp.flags = MINIMIZED;
    948         else if (WinQueryButtonCheckstate(hwnd, ASS_MAXIMIZED))
    949           temp.flags = MAXIMIZED;
    950         else if (WinQueryButtonCheckstate(hwnd, ASS_INVISIBLE))
    951           temp.flags = INVISIBLE;
    952         if (WinQueryButtonCheckstate(hwnd, ASS_KEEP))
    953           temp.flags |= KEEP;
    954         if (WinQueryButtonCheckstate(hwnd, ASS_DIEAFTER))
    955           temp.flags |= DIEAFTER;
    956         if (WinQueryButtonCheckstate(hwnd, ASS_PROMPT))
    957           temp.flags |= PROMPT;*/
    958948        if (fCancelAction){
    959949          fCancelAction = FALSE;
     
    971961      {
    972962        ASSOC temp;
    973         CHAR dummy[34];
     963        CHAR dummy[34];
     964        CHAR key[CCHMAXPATH];
    974965
    975966        temp.pszCmdLine = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__);
     
    989980          temp.offset = atol(dummy);
    990981        }
    991         bstrip(temp.mask);
    992         PrfWriteProfileData(fmprof, (CHAR *) FM3Str, temp.mask, NULL, 0L);
     982        //bstrip(temp.mask);
     983        sprintf(key, "ASSOC.%senv", temp.pszCmdLine);
     984        PrfWriteProfileString(fmprof, FM3Str, key, NULL);
    993985        if (!kill_association(&temp))
    994986          Runtime_Error(pszSrcFile, __LINE__, "kill_association");
  • trunk/dll/command.c

    r1498 r1519  
    3636  27 Dec 09 GKY Added QueryCommandSettings to streamline code
    3737  27 Dec 09 GKY Made command hotkeys user selectable.
    38   17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
     38  17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10).
     39                Mostly cast CHAR CONSTANT * as CHAR *.
     40  01 May 10 GKY Add ENVIRONMENT_SIZE variable to standardize this size everywhere.
     41  01 May 10 GKY Changes to move environment storage to INI file
    3942
    4043***********************************************************************/
     
    7780  PSZ pszCmdLine;
    7881  CHAR title[100];
    79   CHAR env[1002];
     82  CHAR env[ENVIRONMENT_SIZE];
    8083  ULONG flags;
    8184  ULONG ID;
     
    375378
    376379  size = sizeof(BOOL) * 300;
    377   PrfQueryProfileData(fmprof, (CHAR *) FM3Str, "COMMANDS.UsedCommandIDs", &UsedCommandIDs,
     380  PrfQueryProfileData(fmprof, FM3Str, "COMMANDS.UsedCommandIDs", &UsedCommandIDs,
    378381                      &size);
    379382  size = sizeof(BOOL) * 40;
    380   PrfQueryProfileData(fmprof, (CHAR *) FM3Str, "COMMANDS.UsedHotKeyIDs", &UsedHotKeyIDs,
     383  PrfQueryProfileData(fmprof, FM3Str, "COMMANDS.UsedHotKeyIDs", &UsedHotKeyIDs,
    381384                        &size); size = sizeof(BOOL);
    382   PrfQueryProfileData(fmprof, (CHAR *) FM3Str, "COMMANDS.LoadCommandsFromINI",
     385  PrfQueryProfileData(fmprof, FM3Str, "COMMANDS.LoadCommandsFromINI",
    383386                      &fLoadCommandsFromINI, &size);
    384387  if (!fLoadCommandsFromINI) {
     
    463466  ULONG ID = 0;
    464467  ULONG HotKeyID = 0;
    465   CHAR env[1002];
     468  CHAR env[ENVIRONMENT_SIZE];
    466469  CHAR key[120];
    467470  CHAR szTitle[100];
     
    481484      cmdloaded = TRUE;
    482485      size = sizeof(ULONG);
    483       PrfQueryProfileData(fmprof, (CHAR *) FM3Str, "COMMANDS.SizeSortOrder",
     486      PrfQueryProfileData(fmprof, FM3Str, "COMMANDS.SizeSortOrder",
    484487                          &ulSizeCommandsList, &size);
    485488      pszCommandsList = xmallocz(ulSizeCommandsList, pszSrcFile, __LINE__);
    486489      if (pszCommandsList) {
    487         PrfQueryProfileString(fmprof, (CHAR *) FM3Str, "COMMANDS.SortOrder",
     490        PrfQueryProfileString(fmprof, FM3Str, "COMMANDS.SortOrder",
    488491                              NullStr, pszCommandsList, ulSizeCommandsList);
    489492        p = pszCommandsList;
     
    502505            sprintf(key, "COMMAND.%sID", szTitle);
    503506            size = sizeof(ULONG);
    504             PrfQueryProfileData(fmprof, (CHAR *) FM3Str, key, &ID, &size);
     507            PrfQueryProfileData(fmprof, FM3Str, key, &ID, &size);
    505508            sprintf(key, "COMMAND.%sHotKeyID", szTitle);
    506509            size = sizeof(ULONG);
    507             PrfQueryProfileData(fmprof, (CHAR *) FM3Str, key, &HotKeyID, &size);
     510            PrfQueryProfileData(fmprof, FM3Str, key, &HotKeyID, &size);
    508511            sprintf(key, "COMMAND.%sflags", szTitle);
    509512            size = sizeof(ULONG);
    510             PrfQueryProfileData(fmprof, (CHAR *) FM3Str, key, &flags, &size);
     513            PrfQueryProfileData(fmprof, FM3Str, key, &flags, &size);
    511514            sprintf(key, "COMMAND.%senv", szTitle);
    512             PrfQueryProfileString(fmprof, (CHAR *) FM3Str, key, NullStr, env, sizeof(env));
     515            PrfQueryProfileString(fmprof, FM3Str, key, NullStr, env, sizeof(env));
    513516            sprintf(key, "COMMAND.%sCmdLine", szTitle);
    514             PrfQueryProfileString(fmprof, (CHAR *) FM3Str, key, NullStr, pszCmdLine, MaxComLineStrg);
     517            PrfQueryProfileString(fmprof, FM3Str, key, NullStr, pszCmdLine, MaxComLineStrg);
    515518          }
    516519          info = xmallocz(sizeof(LINKCMDS), pszSrcFile, __LINE__);
     
    551554        sprintf(key, "COMMAND.%sID", info->title);
    552555        size = sizeof(ULONG);
    553         PrfQueryProfileData(fmprof, (CHAR *) FM3Str, key, &ID, &size);
     556        PrfQueryProfileData(fmprof, FM3Str, key, &ID, &size);
    554557        sprintf(key, "COMMAND.%sHotKeyID", info->title);
    555558        size = sizeof(ULONG);
    556         PrfQueryProfileData(fmprof, (CHAR *) FM3Str, key, &HotKeyID, &size);
     559        PrfQueryProfileData(fmprof, FM3Str, key, &HotKeyID, &size);
    557560        sprintf(key, "COMMAND.%senv", info->title);
    558         PrfQueryProfileString(fmprof, (CHAR *) FM3Str, key, NullStr, env, sizeof(env));
     561        PrfQueryProfileString(fmprof, FM3Str, key, NullStr, env, sizeof(env));
    559562        if (ID != 0) {
    560563          if (env != NullStr)
     
    585588                     GetPString(IDS_COMMANDSLIMITREACHEDTEXT ));
    586589          }
    587           PrfQueryProfileString(fmprof, (CHAR *) FM3Str, info->pszCmdLine, NullStr, env, sizeof(env));
     590          PrfQueryProfileString(fmprof, FM3Str, info->pszCmdLine, NullStr, env, sizeof(env));
    588591          info->env = xstrdup(env, pszSrcFile, __LINE__);
    589592        }
     
    611614    while (info) {
    612615      sprintf(key, "COMMAND.%sflags", info->title);
    613       PrfWriteProfileData(fmprof, (CHAR *) FM3Str, key, &info->flags, sizeof(ULONG));
     616      PrfWriteProfileData(fmprof, FM3Str, key, &info->flags, sizeof(ULONG));
    614617      sprintf(key, "COMMAND.%sCmdLine", info->title);
    615       PrfWriteProfileString(fmprof, (CHAR *) FM3Str, key, info->pszCmdLine);
     618      PrfWriteProfileString(fmprof, FM3Str, key, info->pszCmdLine);
    616619      bstripcr(info->title);
    617620      sprintf(key, "COMMAND.%sID", info->title);
    618       PrfWriteProfileData(fmprof, (CHAR *) FM3Str, key, &info->ID, sizeof(INT));
     621      PrfWriteProfileData(fmprof, FM3Str, key, &info->ID, sizeof(INT));
    619622      sprintf(key, "COMMAND.%sHotKeyID", info->title);
    620       PrfWriteProfileData(fmprof, (CHAR *) FM3Str, key, &info->HotKeyID, sizeof(INT));
     623      PrfWriteProfileData(fmprof, FM3Str, key, &info->HotKeyID, sizeof(INT));
    621624      if (info->env != NullStr) {
    622625        sprintf(key, "COMMAND.%senv", info->title);
    623         PrfWriteProfileString(fmprof, (CHAR *) FM3Str, key, info->env);
     626        PrfWriteProfileString(fmprof, FM3Str, key, info->env);
    624627      }
    625628      if ((strlen(pszCommandsList) + strlen(info->title) + 1) > ulSizeCommandsList)
     
    631634      info = info->next;
    632635    } // while info
    633     PrfWriteProfileData(fmprof, (CHAR *) FM3Str, "COMMANDS.UsedCommandIDs", &UsedCommandIDs,
     636    PrfWriteProfileData(fmprof, FM3Str, "COMMANDS.UsedCommandIDs", &UsedCommandIDs,
    634637                        sizeof(BOOL) * 300);
    635     PrfWriteProfileData(fmprof, (CHAR *) FM3Str, "COMMANDS.UsedHotKeyIDs", &UsedHotKeyIDs,
     638    PrfWriteProfileData(fmprof, FM3Str, "COMMANDS.UsedHotKeyIDs", &UsedHotKeyIDs,
    636639                        sizeof(BOOL) * 40);
    637640    ulSizeCommandsList = strlen(pszCommandsList) + 1;
    638     PrfWriteProfileData(fmprof, (CHAR *) FM3Str, "COMMANDS.SizeSortOrder",
     641    PrfWriteProfileData(fmprof, FM3Str, "COMMANDS.SizeSortOrder",
    639642                        &ulSizeCommandsList, sizeof(ULONG));
    640     PrfWriteProfileString(fmprof, (CHAR *) FM3Str, "COMMANDS.SortOrder", pszCommandsList);
    641     PrfWriteProfileData(fmprof, (CHAR *) FM3Str, "COMMANDS.LoadCommandsFromINI",
     643    PrfWriteProfileString(fmprof, FM3Str, "COMMANDS.SortOrder", pszCommandsList);
     644    PrfWriteProfileData(fmprof, FM3Str, "COMMANDS.LoadCommandsFromINI",
    642645                        &fLoadCommandsFromINI, sizeof(BOOL));
    643646}
     
    748751    pszCommandsList = xmallocz(ulSizeCommandsList, pszSrcFile, __LINE__);
    749752    if (pszCommandsList)
    750       PrfQueryProfileString(fmprof, (CHAR *) FM3Str, "COMMANDS.SortOrder",
     753      PrfQueryProfileString(fmprof, FM3Str, "COMMANDS.SortOrder",
    751754                            NullStr, pszCommandsList, ulSizeCommandsList);
    752755    return 0;
     
    798801   PSZ pszWorkBuf;
    799802   APIRET ret;
    800    CHAR env[1002];
     803   CHAR env[ENVIRONMENT_SIZE];
    801804   INT x;
    802805
     
    825828   temp->flags = CheckExecutibleFlags(hwnd, 3);
    826829   *env = 0;
    827    WinQueryDlgItemText(hwnd, CMD_ENVIRON, 1000, env);
     830   WinQueryDlgItemText(hwnd, CMD_ENVIRON, ENVIRONMENT_SIZE - 1, env);
    828831   bstripcr(env);
    829832   if (*env)
     
    11031106          sprintf(keyHotKeyID, "COMMAND.%sHotKeyID", temp);
    11041107          sprintf(keyenv, "COMMAND.%senv", temp);
    1105           PrfWriteProfileData(fmprof, (CHAR *) FM3Str, keyID, NULL, 0);
    1106           PrfWriteProfileData(fmprof, (CHAR *) FM3Str, keyHotKeyID, NULL, 0);
    1107           PrfWriteProfileString(fmprof, (CHAR *) FM3Str, keyenv, NULL);
     1108          PrfWriteProfileData(fmprof, FM3Str, keyID, NULL, 0);
     1109          PrfWriteProfileData(fmprof, FM3Str, keyHotKeyID, NULL, 0);
     1110          PrfWriteProfileString(fmprof, FM3Str, keyenv, NULL);
    11081111          x = (SHORT) WinSendDlgItemMsg(hwnd,
    11091112                                        CMD_LISTBOX,
     
    11581161        sprintf(keyHotKeyID, "COMMAND.%sHotKeyID", temp->title);
    11591162        sprintf(keyenv, "COMMAND.%senv", temp->title);
    1160         PrfQueryProfileData(fmprof, (CHAR *) FM3Str, keyID, &ID, &size);
    1161         PrfQueryProfileData(fmprof, (CHAR *) FM3Str, keyHotKeyID, &HotKeyID, &size);
     1163        PrfQueryProfileData(fmprof, FM3Str, keyID, &ID, &size);
     1164        PrfQueryProfileData(fmprof, FM3Str, keyHotKeyID, &HotKeyID, &size);
    11621165        temp->ID = ID;
    11631166        if (temp->HotKeyID == HotKeyID || temp->HotKeyID == 0)
    11641167          fDontCheckHotKey = TRUE;
    11651168        if (kill_command(temp->title)) {
    1166           PrfWriteProfileData(fmprof, (CHAR *) FM3Str, keyID, NULL, 0);
    1167           PrfWriteProfileData(fmprof, (CHAR *) FM3Str, keyHotKeyID, NULL, 0);
    1168           PrfWriteProfileString(fmprof, (CHAR *) FM3Str, keyenv, NULL);
     1169          PrfWriteProfileData(fmprof, FM3Str, keyID, NULL, 0);
     1170          PrfWriteProfileData(fmprof, FM3Str, keyHotKeyID, NULL, 0);
     1171          PrfWriteProfileString(fmprof, FM3Str, keyenv, NULL);
    11691172          x = (SHORT) WinSendDlgItemMsg(hwnd,
    11701173                                        CMD_LISTBOX,
Note: See TracChangeset for help on using the changeset viewer.