1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
/***********************************************************************/
/* Open Visualization Data Explorer */
/* (C) Copyright IBM Corp. 1989,1999 */
/* ALL RIGHTS RESERVED */
/* This code licensed under the */
/* "IBM PUBLIC LICENSE - Open Visualization Data Explorer" */
/***********************************************************************/
#include <dxconfig.h>
#include "../base/defines.h"
#include "TutorApplication.h"
#if defined(windows) && defined(HAVE_WINSOCK_H)
#define _WINSPOOL_ //SMH prevent name clash from uneeded included inlcudes
#include <winsock.h>
#elif defined(HAVE_CYGWIN_SOCKET_H)
#include <cygwin/socket.h>
#elif defined(HAVE_SYS_SOCKET_H)
#include <sys/socket.h>
#endif
#if defined(HAVE_HCLXMINIT)
extern "C" void HCLXmInit();
#endif
//
// Used by the assert macro.
//
const char *AssertMsgString = "Internal error detected at \"%s\":%d.\n";
int main(int argc,
char** argv)
{
#if defined(HAVE_HCLXMINIT)
HCLXmInit();
#endif
#ifdef DXD_WINSOCK_SOCKETS //SMH initialize Win Sockets
{
WSADATA *wsadata = new WSADATA;
WSAStartup(0x0100,wsadata);
delete wsadata;
}
#endif
#ifdef DXD_IBM_OS2_SOCKETS
sock_init();
#endif
//
// Initialize Xt Intrinsics, build all the windows, and enter event loop.
// Note that all the windows are created elsewhere (<Application>App.C),
// and managed in the application initialization routine.
//
if (NOT theApplication)
{
theApplication = new TutorApplication("DXTutor");
}
if (!theApplication->initialize(&argc, argv))
exit(1);
theApplication->handleEvents();
delete theApplication;
#ifdef DXD_WINSOCK_SOCKETS //SMH cleanup Win Sockets
WSACleanup();
#endif
return 0;
}
|