Changeset 1498 for trunk/dll/inis.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/inis.c

    r1454 r1498  
    55
    66  Copyright (c) 1993-98 M. Kimes
    7   Copyright (c) 2004, 2008 Steven H. Levine
     7  Copyright (c) 2004, 2010 Steven H. Levine
    88
    99  01 Aug 04 SHL Rework lstrip/rstrip usage
     
    3636  14 Mar 09 GKY Additional strings move to PCSZs
    3737  12 Sep 09 GKY Add FM3.INI User ini and system ini to submenu for view ini
     38  17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
    3839
    3940***********************************************************************/
     
    670671      if (SHORT2FROMMP(mp1) == EN_SETFOCUS)
    671672        WinSetDlgItemText(hwnd,
    672                           IAF_HELP, GetPString(IDS_MASKLISTNAMEHELPTEXT));
     673                          IAF_HELP, (CHAR *) GetPString(IDS_MASKLISTNAMEHELPTEXT));
    673674      break;
    674675
     
    678679      if (SHORT2FROMMP(mp1) == LN_SETFOCUS)
    679680        WinSetDlgItemText(hwnd,
    680                           IAF_HELP, GetPString(IDS_MASKLISTFILESHELPTEXT));
     681                          IAF_HELP, (CHAR *) GetPString(IDS_MASKLISTFILESHELPTEXT));
    681682      else if (SHORT2FROMMP(mp1) == LN_ENTER)
    682683        PostMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IAF_LOAD, 0), MPVOID);
     
    688689      if (SHORT2FROMMP(mp1) == MLN_SETFOCUS)
    689690        WinSetDlgItemText(hwnd,
    690                           IAF_HELP, GetPString(IDS_MASKLISTMASKSHELPTEXT));
     691                          IAF_HELP, (CHAR *) GetPString(IDS_MASKLISTMASKSHELPTEXT));
    691692      break;
    692693    }
     
    736737        else {
    737738          WinSetPointer(HWND_DESKTOP, hptrBusy);
    738           WinSetDlgItemText(hwnd, IAF_HELP, GetPString(IDS_FILTERINGTEXT));
     739          WinSetDlgItemText(hwnd, IAF_HELP, (CHAR *) GetPString(IDS_FILTERINGTEXT));
    739740          sSelect = 0;
    740741          while (numitems) {
     
    902903      switch (inirec->action) {
    903904      case IDM_MOVE:
    904         WinSetWindowText(hwnd, GetPString(IDS_INIRENAMEAPPTITLETEXT));
     905        WinSetWindowText(hwnd, (CHAR *) GetPString(IDS_INIRENAMEAPPTITLETEXT));
    905906        break;
    906907      case IDM_COPY:
    907         WinSetWindowText(hwnd, GetPString(IDS_INICOPYAPPTITLETEXT));
     908        WinSetWindowText(hwnd, (CHAR *) GetPString(IDS_INICOPYAPPTITLETEXT));
    908909        break;
    909910      }
     
    922923      switch (inirec->action) {
    923924      case IDM_MOVE:
    924         WinSetWindowText(hwnd, GetPString(IDS_INIRENAMEKEYTITLETEXT));
     925        WinSetWindowText(hwnd, (CHAR *) GetPString(IDS_INIRENAMEKEYTITLETEXT));
    925926        break;
    926927      case IDM_COPY:
    927         WinSetWindowText(hwnd, GetPString(IDS_INICOPYKEYTITLETEXT));
     928        WinSetWindowText(hwnd, (CHAR *) GetPString(IDS_INICOPYKEYTITLETEXT));
    928929        break;
    929930      }
     
    10901091                      INIR_SYSTEMPROFILE,
    10911092                      EM_SETTEXTLIMIT, MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
    1092     WinSetWindowText(hwnd, GetPString(IDS_INISWAPOS2INISTITLETEXT));
     1093    WinSetWindowText(hwnd, (CHAR *) GetPString(IDS_INISWAPOS2INISTITLETEXT));
    10931094    break;
    10941095
     
    13331334    inidata = (INIDATA *) mp2;
    13341335    if (inidata->edit)
    1335       WinSetWindowText(hwnd, GetPString(IDS_INIEDITINITITLETEXT));
     1336      WinSetWindowText(hwnd, (CHAR *) GetPString(IDS_INIEDITINITITLETEXT));
    13361337    WinSetWindowPtr(hwnd, QWL_USER, (PVOID) mp2);
    13371338    WinSendDlgItemMsg(hwnd,
     
    15491550                                 0,
    15501551                                 &flFrameFlags,
    1551                                  WC_INIEDITOR,
     1552                                 (CHAR *) WC_INIEDITOR,
    15521553                                 NullStr,
    15531554                                 fwsAnimate,
     
    15641565    }
    15651566    else if (ParentIsDesktop(hwndFrame, hwnd)) {
    1566       if (!WinRestoreWindowPos(FM2Str, "INIWindowPos", hwndFrame)) {
     1567      if (!WinRestoreWindowPos((CHAR *) FM2Str, "INIWindowPos", hwndFrame)) {
    15671568
    15681569        ULONG fl = SWP_MOVE | SWP_SIZE;
     
    17001701        pDItem = DrgQueryDragitemPtr(pDInfo,0);
    17011702        /* Check valid rendering mechanisms and data */
    1702         if (DrgVerifyRMF(pDItem, DRM_OS2FILE, NULL)) {
     1703        if (DrgVerifyRMF(pDItem, (CHAR *) DRM_OS2FILE, NULL)) {
    17031704          DrgFreeDraginfo(pDInfo);
    17041705          return (MRFROM2SHORT(DOR_DROP, DO_LINK));     /* OK to drop */
    17051706        }
    1706         else if (DrgVerifyRMF(pDItem, DRM_FM2INIRECORD, DRF_FM2INI)) {
     1707        else if (DrgVerifyRMF(pDItem, (CHAR *) DRM_FM2INIRECORD, (CHAR *) DRF_FM2INI)) {
    17071708          if (WinQueryWindow(pDInfo->hwndSource, QW_PARENT) !=
    17081709              WinQueryWindow(hwnd, QW_PARENT))
     
    17401741      for (curitem = 0; curitem < numitems; curitem++) {
    17411742        pDItem = DrgQueryDragitemPtr(pDInfo, curitem);
    1742         if (DrgVerifyRMF(pDItem, DRM_OS2FILE, NULL)) {
     1743        if (DrgVerifyRMF(pDItem, (CHAR *) DRM_OS2FILE, NULL)) {
    17431744          if (pDItem->fsControl & DC_PREPARE)
    17441745            DrgSendTransferMsg(pDItem->hwndItem,
     
    17571758          }
    17581759        }
    1759         else if (DrgVerifyRMF(pDItem, DRM_FM2INIRECORD, DRF_FM2INI)) {
     1760        else if (DrgVerifyRMF(pDItem, (CHAR *) DRM_FM2INIRECORD, (CHAR *) DRF_FM2INI)) {
    17601761          *szDir = *szFrom = *szTemp = 0;
    17611762          len = DrgQueryStrName(pDItem->hstrContainerName, CCHMAXPATH, szDir);
     
    18841885    if (!WinCreateWindow(hwnd,
    18851886                         WC_STATIC,
    1886                          GetPString(IDS_APPLICATIONSTITLETEXT),
     1887                         (CHAR *) GetPString(IDS_APPLICATIONSTITLETEXT),
    18871888                         WS_VISIBLE | SS_TEXT |
    18881889                         DT_CENTER | DT_VCENTER,
     
    18941895    if (!WinCreateWindow(hwnd,
    18951896                         WC_STATIC,
    1896                          GetPString(IDS_KEYWORDSTITLETEXT),
     1897                         (CHAR *) GetPString(IDS_KEYWORDSTITLETEXT),
    18971898                         WS_VISIBLE | SS_TEXT |
    18981899                         DT_CENTER | DT_VCENTER,
     
    19041905    if (!WinCreateWindow(hwnd,
    19051906                         WC_STATIC,
    1906                          GetPString(IDS_DATABYTESTITLETEXT),
     1907                         (CHAR *) GetPString(IDS_DATABYTESTITLETEXT),
    19071908                         WS_VISIBLE | SS_TEXT |
    19081909                         DT_CENTER | DT_VCENTER,
     
    19411942      else if (hwndStatus) {
    19421943        if (*inidata->ininame) {
    1943           WinSetWindowText(hwndStatus, GetPString(IDS_INTERNALINIVIEWERTEXT));
     1944          WinSetWindowText(hwndStatus, (CHAR *) GetPString(IDS_INTERNALINIVIEWERTEXT));
    19441945          if (hwndStatus2)
    19451946            WinSetWindowText(hwndStatus2, inidata->ininame);
     
    22942295                                  QW_PARENT))) {
    22952296          if (hwndStatus)
    2296             WinSetWindowText(hwndStatus,
    2297                              GetPString(IDS_INTERNALINIVIEWERTEXT));
     2297            WinSetWindowText(hwndStatus, (CHAR *) GetPString(IDS_INTERNALINIVIEWERTEXT));
    22982298          if (hwndStatus2)
    22992299            WinSetWindowText(hwndStatus2, inidata->ininame);
     
    28342834      WinQueryWindowPos(WinQueryWindow(hwnd, QW_PARENT), &swp);
    28352835      if (!(swp.fl & (SWP_HIDE | SWP_MINIMIZE)))
    2836         WinStoreWindowPos(FM2Str,
     2836        WinStoreWindowPos((CHAR *) FM2Str,
    28372837                          "INIWindowPos", WinQueryWindow(hwnd, QW_PARENT));
    28382838      // inidata = WinQueryWindowPtr(hwnd, QWL_USER);   // 09 Jan 08 SHL
Note: See TracChangeset for help on using the changeset viewer.