#include "show.rh"


#ifdef __DLL__

// *** 4 DLL 16/32 ***
extern "C"
{
  POINT        far* PP         =NULL;
  unsigned int      Count      =1;
  unsigned int      Frequency  =100;
  BOOL              Stop       =FALSE;
  int               PenWidth   =2;
  DWORD             PenColor[3]={PALETTEINDEX(1), PALETTEINDEX(2), PALETTEINDEX(4)};
  char         far* Name       ="LCard Test Window";
  BOOL        (far* MakeData)()=MyData;
};
extern "C"
{
  HWND              hWnd;
  MSG               Msg;
  unsigned int far* PD;
  unsigned int      MaxX;
  unsigned int      MaxY;
  HINSTANCE         hInstanceDLL;
  WNDCLASS          WClass;
  void WINAPI       InstallShow(HINSTANCE hInst, int nCmdShow);
};

#else

// *** 4 ALL ***
  int   Usil;
  WORD  Channel;
  int   Rate;
  int   Npoint;
  WORD  Channels[16];
  int   Nch;
  WORD  Data[MyX*MyN];
  POINT Point[MyX*MyN];
  unsigned int   PointNumber[MyN];


#ifdef __BORLANDC__
#ifdef WIN32

// *** 4 BC 4.5 32 ***
  extern "C" HWND           _import hWnd;
  extern "C" MSG            _import Msg;
  extern "C" POINT        * _import PP;
  extern "C" unsigned int * _import PD;
  extern "C" unsigned int   _import Count;
  extern "C" unsigned int   _import MaxX;
  extern "C" unsigned int   _import MaxY;
  extern "C" unsigned int   _import Frequency;
  extern "C" HINSTANCE      _import hInstanceDLL;
  extern "C" BOOL           _import Stop;
  extern "C" int            _import PenWidth;
  extern "C" DWORD          _import PenColor[3];
  extern "C" WNDCLASS       _import WClass;
  extern "C" char         * _import Name;
  extern "C" BOOL        (* _import MakeData)();
  extern "C" void WINAPI    _import InstallShow(HINSTANCE hInst, int nCmdShow);

  #define TMyMakeData BOOL

#else

// *** 4 BC 4.5 16 ***
  extern "C" HWND              far hWnd;
  extern "C" MSG               far Msg;
  extern "C" POINT        far* far PP;
  extern "C" unsigned int far* far PD;
  extern "C" unsigned int      far Count;
  extern "C" unsigned int      far MaxX;
  extern "C" unsigned int      far MaxY;
  extern "C" unsigned int      far Frequency;
  extern "C" HINSTANCE         far hInstanceDLL;
  extern "C" BOOL              far Stop;
  extern "C" int               far PenWidth;
  extern "C" DWORD             far PenColor[3];
  extern "C" WNDCLASS          far WClass;
  extern "C" char         far* far Name;
  extern "C" BOOL        (far* far MakeData)();
  extern "C" void WINAPI           InstallShow(HINSTANCE hInst, int nCmdShow);

  #define TMyMakeData BOOL __far __loadds

#endif
#endif


#ifdef _MSC_VER
#ifdef WIN32

// *** 4 MSVC 4.1 32 ***
  extern "C" HWND         _declspec(dllimport)    hWnd;
  extern "C" MSG          _declspec(dllimport)    Msg;
  extern "C" POINT        _declspec(dllimport)  * PP;
  extern "C" unsigned int _declspec(dllimport)  * PD;
  extern "C" unsigned int _declspec(dllimport)    Count;
  extern "C" unsigned int _declspec(dllimport)    MaxX;
  extern "C" unsigned int _declspec(dllimport)    MaxY;
  extern "C" unsigned int _declspec(dllimport)    Frequency;
  extern "C" HINSTANCE    _declspec(dllimport)    hInstanceDLL;
  extern "C" BOOL         _declspec(dllimport)    Stop;
  extern "C" int          _declspec(dllimport)    PenWidth;
  extern "C" DWORD        _declspec(dllimport)    PenColor[3];
  extern "C" WNDCLASS     _declspec(dllimport)    WClass;
  extern "C" char         _declspec(dllimport)  * Name;
  extern "C" BOOL         _declspec(dllimport) (* MakeData)();
  extern "C" void         _declspec(dllimport)    WINAPI InstallShow(HINSTANCE hInst, int nCmdShow);

  #define TMyMakeData BOOL

#else

// *** 4 MSVC 1.52 16 ***
  extern "C" HWND              far hWnd;
  extern "C" MSG               far Msg;
  extern "C" POINT        far* far PP;
  extern "C" unsigned int far* far PD;
  extern "C" unsigned int      far Count;
  extern "C" unsigned int      far MaxX;
  extern "C" unsigned int      far MaxY;
  extern "C" unsigned int      far Frequency;
  extern "C" HINSTANCE         far hInstanceDLL;
  extern "C" BOOL              far Stop;
  extern "C" int               far PenWidth;
  extern "C" DWORD             far PenColor[3];
  extern "C" WNDCLASS          far WClass;
  extern "C" char         far* far Name;
  extern "C" BOOL        (far* far MakeData)();
  extern "C" void WINAPI           InstallShow(HINSTANCE hInst, int nCmdShow);

  #define TMyMakeData BOOL __far __export

#endif
#endif


#ifdef __WATCOMC__
#ifdef WIN32

// *** 4 WATCOM 10.5 32 ***
  extern "C" void WINAPI _hWnd();
  extern "C" void WINAPI _Msg();
  extern "C" void WINAPI _PP();
  extern "C" void WINAPI _PD();
  extern "C" void WINAPI _Count();
  extern "C" void WINAPI _MaxX();
  extern "C" void WINAPI _MaxY();
  extern "C" void WINAPI _Frequency();
  extern "C" void WINAPI _hInstanceDLL();
  extern "C" void WINAPI _Stop();
  extern "C" void WINAPI _PenWidth();
  extern "C" void WINAPI _PenColor();
  extern "C" void WINAPI _WClass();
  extern "C" void WINAPI _Name();
  extern "C" void WINAPI _MakeData();
  typedef BOOL (* TMakeData)();
  extern "C" void WINAPI InstallShow(HINSTANCE hInst, int nCmdShow);

  HWND          & hWnd=((HWND&)(*(int*)(*(int*)(*(int*)((WORD*)_hWnd+1)))));
  MSG           & Msg=((MSG&)(*(int*)(*(int*)(*(int*)((WORD*)_Msg+1)))));
  POINT        *& PP=((POINT*&)(*(int*)(*(int*)(*(int*)((WORD*)_PP+1)))));
  unsigned int *& PD=((unsigned int*&)(*(int*)(*(int*)(*(int*)((WORD*)_PD+1)))));
  unsigned int  & Count=((unsigned int&)(*(int*)(*(int*)(*(int*)((WORD*)_Count+1)))));
  unsigned int  & MaxX=((unsigned int&)(*(int*)(*(int*)(*(int*)((WORD*)_MaxX+1)))));
  unsigned int  & MaxY=((unsigned int&)(*(int*)(*(int*)(*(int*)((WORD*)_MaxY+1)))));
  unsigned int  & Frequency=((unsigned int&)(*(int*)(*(int*)(*(int*)((WORD*)_Frequency+1)))));
  HINSTANCE     & hInstanceDLL=((HINSTANCE&)(*(int*)(*(int*)(*(int*)((WORD*)_hInstanceDLL+1)))));
  BOOL          & Stop=((BOOL&)(*(int*)(*(int*)(*(int*)((WORD*)_Stop+1)))));
  int           & PenWidth=((int&)(*(int*)(*(int*)(*(int*)((WORD *)_PenWidth+1)))));
  DWORD        *& PenColor=((DWORD*&)(*(int*)(*(int*)(*(int*)((WORD*)_PenColor+1)))));
  WNDCLASS      & WClass=((WNDCLASS&)(*(int*)(*(int*)(*(int*)((WORD*)_WClass+1)))));
  char         *& Name=((char*&)(*(int*)(*(int*)(*(int*)((WORD*)_Name+1)))));
  TMakeData     & MakeData=((TMakeData&)(*(int*)(*(int*)(*(int*)((WORD*)_MakeData+1)))));

//BOOL (*& MakeData_)()=((BOOL (*&)())(*(int*)(*(int*)(*(int*)((WORD*)_MakeData+1)))));

  #define TMyMakeData BOOL

#else

// *** 4 WATCOM 10.5 16 ***
  extern "C" HWND              far hWnd;
  extern "C" MSG               far Msg;
  extern "C" POINT        far* far PP;
  extern "C" unsigned int far* far PD;
  extern "C" unsigned int      far Count;
  extern "C" unsigned int      far MaxX;
  extern "C" unsigned int      far MaxY;
  extern "C" unsigned int      far Frequency;
  extern "C" HINSTANCE         far hInstanceDLL;
  extern "C" BOOL              far Stop;
  extern "C" int               far PenWidth;
  extern "C" DWORD             far PenColor[3];
  extern "C" WNDCLASS          far WClass;
  extern "C" char         far* far Name;
  extern "C" BOOL        (far* far MakeData)();
  extern "C" void WINAPI           InstallShow(HINSTANCE hInst, int nCmdShow);

  #define TMyMakeData BOOL __far __loadds

#endif
#endif
#endif

