Changeset 689


Ignore:
Timestamp:
Jun 15, 2007, 6:33:24 AM (13 years ago)
Author:
Steven Levine
Message:

Commit OpenWatcom? compatibility updates

Location:
trunk/dll
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r688 r689  
    5858#include <share.h>
    5959#include <limits.h>
     60#include <process.h>                    // _beginthread
    6061
    6162#include "fm3dll.h"
  • trunk/dll/autoview.c

    r593 r689  
    1717  15 Aug 06 SHL Use Runtime_Error more
    1818  03 Nov 06 SHL Renames
    19  30 Mar 07 GKY Remove GetPString for window class names
     19  30 Mar 07 GKY Remove GetPString for window class names
    2020
    2121***********************************************************************/
     
    3030#include <string.h>
    3131#include <ctype.h>
     32#include <process.h>                    // _beginthread
    3233
    3334#include "fm3dll.h"
  • trunk/dll/avl.c

    r618 r689  
    703703  CHAR szPCItemText[256];       // Parent or child item text
    704704  SHORT i;
    705   APIRET apiret;
    706705  BOOL fShowAll;
    707706
  • trunk/dll/avv.c

    r574 r689  
    6161{
    6262  ARCDUMP ad;
    63   FILE *fp;
    6463  ARC_TYPE *pat;
    6564
  • trunk/dll/cmdline.c

    r574 r689  
    2626#include <ctype.h>
    2727#include <share.h>
     28#include <io.h>                         // unlink
    2829
    2930#include "fm3dll.h"
  • trunk/dll/collect.c

    r688 r689  
    5454#include <share.h>
    5555#include <limits.h>
     56#include <process.h>                    // _beginthread
    5657
    5758#include "fm3dll.h"
     
    21142115          ULONG numitems;
    21152116          USHORT usOperation;
    2116                 APIRET rc;
    21172117
    21182118          pci = (PCNRITEM) ((PCNRDRAGINFO) mp2)->pRecord;
  • trunk/dll/comp.c

    r574 r689  
    3939#include <share.h>
    4040#include <io.h>
     41#include <process.h>                    // _beginthread
    4142
    4243#include "fm3dll.h"
  • trunk/dll/datamin.c

    r593 r689  
    3434#include <ctype.h>
    3535#include <limits.h>
     36#include <process.h>                    // _beginthread
    3637
    3738#include "fm3dll.h"
     
    602603          pszFSystem = "N/A";
    603604        else {
    604           pszFSystem = pDM->fsqb2.szName + pDM->fsqb2.cbName + 1;
     605          pszFSystem = (PCHAR)(pDM->fsqb2.szName) + pDM->fsqb2.cbName + 1;
    605606          pszFSystem[15] = 0;
    606607        }
  • trunk/dll/defview.c

    r630 r689  
    1414  18 Mar 07 GKY Open mp3, ogg & flac files with OS2 object default since fm2play fails
    1515  21 Apr 07 GKY Find FM2Utils by path or utils directory
     16  09 Jun 07 SHL ShowMultimedia: Initialize hwnd so that OpenObject might work
    1617
    1718***********************************************************************/
     
    5253  MMFORMATINFO mmFormatInfo;
    5354  APIRET rc, rc1;
    54   HWND hwnd;
     55  HWND hwnd = HWND_DESKTOP;
    5556  char *p;
    5657
  • trunk/dll/dircnrs.c

    r688 r689  
    4747#include "fm3str.h"
    4848#include "mle.h"
     49#include <process.h>                    // _beginthread
    4950
    5051#pragma data_seg(DATA1)
     
    10591060  DIRCNRDATA *dcd = INSTDATA(hwnd);
    10601061  DIRCNRDATA *dcdsrc;
    1061   APIRET rc;
    10621062
    10631063  switch (msg) {
     
    30133013          HWND hwndMLE;
    30143014          static CHAR szData[CCHMAXPATH];
    3015           CHAR testname[CCHMAXPATH], *p;
     3015          CHAR testname[CCHMAXPATH];
    30163016
    30173017          if (!pci && !pfi) {
  • trunk/dll/dirsize.c

    r574 r689  
    3737#include <string.h>
    3838#include <ctype.h>
     39#include <process.h>                    // _beginthread
    3940
    4041#include "fm3dll.h"
     
    886887        if (pState->working) {
    887888          pState->dying = TRUE;
    888           pState->chStopFlag = 0xff;
     889          pState->chStopFlag = (BYTE)0xff;
    889890          DosBeep(1000, 100);           // Complain?
    890891        }
     
    899900    pState = INSTDATA(hwnd);
    900901    if (pState)
    901       pState->chStopFlag = 0xff;
     902      pState->chStopFlag = (BYTE)0xff;
    902903    DosSleep(1L);
    903904    break;
     
    906907    pState = INSTDATA(hwnd);
    907908    if (pState) {
    908       pState->chStopFlag = 0xff;
     909      pState->chStopFlag = (BYTE)0xff;
    909910      if (pState->hptr)
    910911        WinDestroyPointer(pState->hptr);
  • trunk/dll/error.c

    r636 r689  
    233233  CHAR szMsg[4096];
    234234  va_list va;
    235   PSZ psz;
    236235
    237236  // Format caller's message
     
    317316{
    318317  CHAR szMsg[4096];
    319   PSZ psz;
    320   HAB hab;
    321318  va_list va;
    322319
  • trunk/dll/filldir.c

    r572 r689  
    109109  HPOINTER hptr2;
    110110  HPOINTER hptr3;
    111   LONG l;
    112111  UINT u;
    113112
     
    950949  fDummy = TRUE;
    951950  *suggest = 0;
    952   for (x = 0; x < 26; x++)
     951  for (x = 0; x < 26; x++) {
    953952    driveflags[x] &= (DRIVE_IGNORE | DRIVE_NOPRESCAN | DRIVE_NOLOADICONS |
    954953                      DRIVE_NOLOADSUBJS | DRIVE_NOLOADLONGS |
    955954                      DRIVE_INCLUDEFILES | DRIVE_SLOW | DRIVE_NOSTATS);
     955  }
    956956  memset(driveserial, -1, sizeof(driveserial));
    957957  {
     
    974974    exit(0);
    975975  }
    976   for (x = 0; x < 26; x++)
     976  for (x = 0; x < 26; x++) {
    977977    if ((ulDriveMap & (1L << x)) && !(driveflags[x] & DRIVE_IGNORE))
    978978      numtoinsert++;
    979   if (numtoinsert)
     979  }
     980  if (numtoinsert) {
    980981    pciFirst = WinSendMsg(hwndCnr,
    981982                          CM_ALLOCRECORD,
    982983                          MPFROMLONG(EXTRA_RECORD_BYTES2),
    983984                          MPFROMLONG((ULONG) numtoinsert));
     985  }
    984986  if (!pciFirst) {
    985987    Win_Error2(hwndCnr, hwndCnr, pszSrcFile, __LINE__, IDS_CMALLOCRECERRTEXT);
     
    987989  }
    988990  else {
     991
    989992    pci = pciFirst;
    990993    for (x = 0; x < 26; x++) {
    991         if ((ulDriveMap & (1L << x)) && !(driveflags[x] & DRIVE_IGNORE))
    992           {
     994      if ((ulDriveMap & (1L << x)) && !(driveflags[x] & DRIVE_IGNORE)) {
    993995        *szDrive = (CHAR) x + 'A';
    994996
     
    11421144      else if (!(ulDriveMap & (1L << x)))
    11431145        driveflags[x] |= DRIVE_INVALID;
    1144     }
     1146    } // for drives
     1147
    11451148    PostMsg(hwndMain, UM_BUILDDRIVEBAR, MPVOID, MPVOID);
    11461149    drivesbuilt = TRUE;
     
    11611164                   IDS_CMINSERTERRTEXT);
    11621165    }
     1166
    11631167    /* move cursor onto the default drive rather than the first drive */
    11641168    if (!fSwitchTree) {
     
    11811185    }
    11821186
    1183     if (hwndParent)
     1187    if (hwndParent) {
    11841188      WinSendMsg(WinWindowFromID(WinQueryWindow(hwndParent, QW_PARENT),
    11851189                                 MAIN_DRIVELIST),
    11861190                 LM_DELETEALL, MPVOID, MPVOID);
     1191    }
    11871192
    11881193    if (fShowEnv) {
     
    12641269                     CM_FREERECORD, MPFROMP(&pciParent), MPFROMSHORT(1));
    12651270      }
    1266     }
     1271    } // if show env
    12671272
    12681273    x = 0;
     
    12951300          }
    12961301        }
    1297         else
     1302        else {
    12981303          WinSendMsg(hwndCnr,
    12991304                     CM_INVALIDATERECORD,
    13001305                     MPFROMP(&pci),
    13011306                     MPFROM2SHORT(1, CMA_ERASE | CMA_REPOSITION));
     1307        }
    13021308
    13031309        WinSendMsg(WinWindowFromID(WinQueryWindow(hwndParent, QW_PARENT),
  • trunk/dll/findrec.c

    r551 r689  
    7373    pci = WinSendMsg(hwndCnr, CM_SEARCHSTRING, MPFROMP(&srch), MPFROMP(pci));
    7474  }
    75 Abort:
     75
    7676  return NULL;                          /* failure */
    7777}
  • trunk/dll/fm3dll.h

    r688 r689  
    4747  23 Apr 07 SHL Add Win_Error_NoMsgBox
    4848  12 May 07 SHL Add ulItemsToUnHilite to DIRCNRDATA, pass to Unhilite as arg
     49  05 Jun 07 SHL Update for OpenWatcom
    4950  10 Jun 07 GKY Add CheckPmDrgLimit including IsFm2Window as part of work around PM drag limit
    5051
    5152***********************************************************************/
    5253
     54#if defined(__IBMC__)
    5355#if __IBMC__ != 430
    5456#error VAC365 required for long long support
    5557#endif
    56 
    5758#if !defined(_LONG_LONG)
    5859#error Long long support not enabled
     60#endif
    5961#endif
    6062
     
    11201122MRESULT EXPENTRY SetDrvProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
    11211123
     1124#if defined(__IBMC__)
    11221125/* fsopen.c */
    11231126FILE *_fsopen(CHAR * filename, CHAR * mode, INT sharemode, ...);
     1127#endif
    11241128
    11251129/* seticon.c */
  • trunk/dll/fsopen.c

    r551 r689  
     1
     2/***********************************************************************
     3
     4  $Id$
     5
     6  _fsopen for IBMC
     7
     8  Copyright (c) 1993-98 M. Kimes
     9  Copyright (c) 2007 Steven H. Levine
     10
     11  15 Oct 02 SHL Baseline
     12  05 Jun 07 SHL Update for OpenWatcom
     13
     14***********************************************************************/
     15
     16#if defined(__IBMC__)
     17
    118#define INCL_WIN
    219#define INCL_DOS
     
    6986  return fp;
    7087}
     88
     89#endif
  • trunk/dll/grep.c

    r551 r689  
    349349        if (WinIsWindow(grep.ghab, grep.hwndFiles))
    350350          doinsertion(&grep);           /* insert any remaining objects */
    351       }
    352 
    353     ShutDownThread:                     /* kill pm connection, end thread */
     351      } // while
    354352
    355353      if (WinIsWindow(grep.ghab, grep.hwndFiles))
     
    845843      DosSleep(1L);
    846844    }
    847   }
    848 
    849 Match:
     845  } // if
    850846
    851847  if (strmatch)
     
    12571253                  if ((*r)->CRC != -1L && i->CRC != -1L &&
    12581254                      (*r)->CRC != i->CRC) {
    1259                     *r++;
     1255                    *r += 1;
    12601256                    continue;
    12611257                  }
     
    13231319          pi = strrchr(i->name, '\\');
    13241320          if (pi)
    1325             *pi++;
     1321            pi++;
    13261322          else
    13271323            pi = i->name;
  • trunk/dll/grep2.c

    r551 r689  
    3737#include <share.h>
    3838#include <limits.h>
     39#include <process.h>                    // _beginthread
    3940
    4041#include "fm3dll.h"
  • trunk/dll/info.c

    r618 r689  
    148148            if (!rc) {
    149149              pfsq = (PFSQBUFFER2) s;
    150               pfsn = pfsq->szName + pfsq->cbName + 1;
     150              pfsn = (PCHAR)(pfsq->szName) + pfsq->cbName + 1;
    151151              pfsd = pfsn + pfsq->cbFSDName + 1;
    152152              if (pfsq->cbFSAData && pfsd && *pfsd) {
  • trunk/dll/inis.c

    r618 r689  
    3333#include <ctype.h>
    3434#include <share.h>
     35#include <process.h>                    // _beginthread
    3536
    3637#include "fm3dll.h"
     
    14871488  PFNWP oldproc = (PFNWP) WinQueryWindowPtr(hwnd, QWL_USER);
    14881489  static HWND hwndPopup = (HWND) 0;
    1489   APIRET rc;
    14901490
    14911491  switch (msg) {
  • trunk/dll/init.c

    r633 r689  
    122122              pp = p;
    123123              while (*pp && *pp != '\"')
    124                 *pp++;
     124                *pp += 1;
    125125              if (*pp)
    126126                *pp = 0;
     
    255255    /* end of strings */
    256256    memset(&RGBBLACK, 0, sizeof(RGB2));
    257     RGBGREY.bRed = RGBGREY.bGreen = RGBGREY.bBlue = 204;
     257    RGBGREY.bRed = RGBGREY.bGreen = RGBGREY.bBlue = (BYTE)204;
    258258    RGBGREY.fcOptions = 0;
    259259    FM3UL = *(ULONG *) FM3Str;
     
    300300    save_tools(NULL);
    301301
     302#  ifdef __IBMC__
    302303  _fcloseall();
     304# else // __WATCOMC__
     305  fcloseall();
     306# endif
    303307
    304308  save_dir(s);
  • trunk/dll/mainwnd.c

    r688 r689  
    5353#include <ctype.h>
    5454#include <share.h>
     55#include <process.h>                    // _beginthread
    5556
    5657#include "fm3dll.h"
     
    15411542
    15421543      memset(&rgb, 0, sizeof(rgb));
    1543       rgb.bRed = 128;
     1544      rgb.bRed = (BYTE)128;
    15441545      SetPresParams(hwnd,
    15451546                    &RGBGREY, &rgb, &RGBGREY, GetPString(IDS_8HELVTEXT));
  • trunk/dll/mainwnd2.c

    r672 r689  
    3030#include <ctype.h>
    3131#include <share.h>
     32#include <process.h>                    // _beginthread
    3233
    3334#include "fm3dll.h"
  • trunk/dll/misc.c

    r688 r689  
    3838#include <ctype.h>
    3939#include <share.h>
     40#include <malloc.h>                     // headmin
    4041
    4142#include "fm3dll.h"
     
    669670      PFIELDINFO pfi = ((PCNREDITDATA) mp2)->pFieldInfo;
    670671      PCNRITEM pci = (PCNRITEM) ((PCNREDITDATA) mp2)->pRecord;
    671       CHAR szData[CCHMAXPATH], testname[CCHMAXPATH], *p;
     672      CHAR szData[CCHMAXPATH], testname[CCHMAXPATH];
    672673      HWND hwndMLE = WinWindowFromID(hwnd, CID_MLE);
    673674
  • trunk/dll/mle.c

    r578 r689  
    2626#include <ctype.h>
    2727#include <share.h>
     28#include <process.h>                    // _beginthread
    2829
    2930#include "fm3dll.h"
  • trunk/dll/notify.c

    r593 r689  
    2727#include <time.h>
    2828#include <stddef.h>
     29#include <process.h>                    // _beginthread
    2930
    3031#include "fm3dll.h"
     
    6364
    6465        memset(&rgb2F, 0, sizeof(RGB2));
    65         rgb2F.bRed = 65;
    66         rgb2.bRed = rgb2.bGreen = rgb2.bBlue = 255;
     66        rgb2F.bRed = (BYTE)65;
     67        rgb2.bRed = rgb2.bGreen = rgb2.bBlue = (BYTE)255;
    6768        rgb2.fcOptions = 0;
    6869        SetPresParams(hwnd, &rgb2, &rgb2F, &rgb2, GetPString(IDS_8HELVTEXT));
  • trunk/dll/objcnr.c

    r574 r689  
    2626#include <string.h>
    2727#include <ctype.h>
     28#include <process.h>                    // _beginthread
    2829
    2930#include "fm3dll.h"
     
    407408      if (data) {
    408409        if (data->working) {
    409           data->dying = TRUE;
    410           data->stopflag = 0xff;
     410          data->dying = (CHAR)TRUE;
     411          data->stopflag = (CHAR)0xff;
    411412          break;
    412413        }
  • trunk/dll/presparm.c

    r551 r689  
    2626#include "fm3dll.h"
    2727
    28 static PSZ pszSrcFile = __FILE__;
     28// static PSZ pszSrcFile = __FILE__;
    2929
    3030#pragma alloc_text(PRESPARAM,CopyPresParams,SetPresParams,IfNoParam)
  • trunk/dll/remap.c

    r551 r689  
    2525#include <time.h>
    2626#include <share.h>
     27#include <io.h>                         // unlink
    2728
    2829#include "fm3dll.h"
  • trunk/dll/select.c

    r672 r689  
    466466      didone = TRUE;
    467467      if (pulTotalFiles)
    468         *pulTotalFiles--;
     468        *pulTotalFiles -= 1;
    469469      if (pullTotalBytes)
    470470        *pullTotalBytes -= (pci->cbFile + pci->easize);
  • trunk/dll/timer.c

    r551 r689  
    2222#include <stdlib.h>
    2323#include <string.h>
     24#include <process.h>                    // _beginthread
    2425
    2526#include "fm3dll.h"
  • trunk/dll/treecnr.c

    r688 r689  
    4848#include <string.h>
    4949#include <ctype.h>
     50#include <process.h>                    // _beginthread
    5051
    5152#include "fm3dll.h"
  • trunk/dll/undel.c

    r551 r689  
    2525#include <time.h>
    2626#include <ctype.h>
     27#include <process.h>                    // _beginthread
    2728
    2829#include "fm3dll.h"
  • trunk/dll/valid.c

    r555 r689  
    6969
    7070  // Return filename, strip path parts
    71   // Return empty string when filename ends with \
     71  // Return empty string when filename ends with backslash
    7272
    7373  if (filename) {
     
    235235
    236236  pfsq = (PFSQBUFFER2) pvBuffer;
    237   pfsn = pfsq->szName + pfsq->cbName + 1;
     237  pfsn = (PCHAR)(pfsq->szName) + pfsq->cbName + 1;
    238238  pfsd = pfsn + pfsq->cbFSDName + 1;
    239239
  • trunk/dll/viewinf.c

    r551 r689  
    2727#include <ctype.h>
    2828#include <share.h>
     29#include <process.h>                    // _beginthread
    2930
    3031#include "fm3dll.h"
  • trunk/dll/worker.c

    r631 r689  
    3535#include <share.h>
    3636#include <time.h>
     37#include <process.h>                    // _beginthread
    3738
    3839#include "fm3dll.h"
     
    16151616            FreeList(files);
    16161617          }
    1617         Abort:
    16181618          if (WinIsWindow(hab2, wk->hwndCnr))
    16191619            PostMsg(wk->hwndCnr, UM_RESCAN, MPVOID, MPVOID);
Note: See TracChangeset for help on using the changeset viewer.