static char tmacs_id[] = "$Header: /u/oreilly/rov/tmacs/RCS/tmacs.cc,v 1.21 1998/05/18 20:20:27 oreilly Exp $";


/*
$Log: tmacs.cc,v $
Revision 1.21  1998/05/18 20:20:27  oreilly
*** empty log message ***

Revision 1.20  1998/03/18 17:17:52  oreilly
*** empty log message ***

Revision 1.19  1998/03/12 20:37:46  oreilly
incremented version

Revision 1.18  1998/02/23 17:30:54  oreilly
Incremented version number

Revision 1.17  1998/02/23 16:14:03  oreilly
*** empty log message ***

Revision 1.16  1997/11/20 08:22:36  oreilly
*** empty log message ***

Revision 1.15  97/10/03  09:21:35  09:21:35  oreilly (Thomas C. O'Reilly)
New version number

Revision 1.14  97/09/10  08:54:47  08:54:47  oreilly (Thomas C. O'Reilly)
*** empty log message ***

Revision 1.13  97/08/15  08:07:20  08:07:20  oreilly (Thomas C. O'Reilly)
*** empty log message ***

Revision 1.12  97/08/12  15:02:50  15:02:50  oreilly (Thomas C. O'Reilly)
*** empty log message ***

Revision 1.11  97/06/16  16:02:36  16:02:36  oreilly (Thomas C. O'Reilly)
*** empty log message ***

Revision 1.10  97/05/07  14:54:39  14:54:39  oreilly (Thomas C. O'Reilly)
*** empty log message ***

Revision 1.9  97/05/06  18:53:43  18:53:43  oreilly (Thomas C. O'Reilly)
*** empty log message ***

Revision 1.8  97/05/06  16:33:43  16:33:43  oreilly (Thomas C. O'Reilly)
*** empty log message ***

Revision 1.7  97/04/30  20:09:44  20:09:44  oreilly (Thomas C. O'Reilly)
*** empty log message ***

Revision 1.6  97/04/09  14:38:53  14:38:53  oreilly (Thomas C. O'Reilly)
New tmacs version

Revision 1.5  97/03/25  15:47:37  15:47:37  oreilly (Thomas C. O'Reilly)
*** empty log message ***

Revision 1.4  97/03/20  13:00:31  13:00:31  oreilly (Thomas C. O'Reilly)
Version 2.8

Revision 1.3  97/03/20  12:32:23  12:32:23  oreilly (Thomas C. O'Reilly)
..

Revision 1.2  96/10/28  09:13:06  09:13:06  oreilly (Thomas C. O'Reilly)
*** empty log message ***

Revision 1.1  96/07/22  10:42:36  10:42:36  oreilly (Thomas C. O'Reilly)
First external release

*/
#include <Vk/VkApp.h>
#include "TiburonApp.h"
#include "RovMainWindow.h"

void errorHandler(String message);

void main(int argc, char **argv)
{
  MBool debug = FALSE;

  TiburonApp *app = new TiburonApp("Tmacs", &argc, argv);

  app->setVersionString("TMACS 3.5");
  
  fprintf(stderr, "Creating GUI...\n");
  
  app->createRovMainWindow();

  app->rovMainWindow()->createGui();

  fprintf(stderr, "Done.\n");

  char errorBuf[512];
  if (app->loadPreferences(errorBuf) == -1)
  {
    fprintf(stderr, "%s\n", errorBuf);
  }

  app->rovMainWindow()->show();
  
  // Start handlers to read Data Manager
  app->startTelemetryHandlers();

  XtAppSetErrorHandler(app->appContext(), errorHandler);
  
  // Enter X event loop
  app->run();
}



void errorHandler(String message)
{
  fprintf(stderr, "tmacs errorHandler():\n");
  fprintf(stderr, "%s\n", message);

  exit(1);
}
