/***********************************************************************

  Copyright by Telelogic AB 1998

  This Program is owned by Telelogic and is protected by national
  copyright laws and international copyright treaties. Telelogic grants
  you the right to use this Program on one computer or in one local
  computer network at any one time.

  Under this License you may only modify the source code for the purpose
  of adapting it to your environment. You must reproduce and include any
  copyright and trademark notices on all copies of the source code.  You
  may not use, copy, merge, modify or transfer the Program except as
  provided in this License.

  Telelogic does not warrant that the Program will meet your
  requirements or that the operation of the Program will be
  uninterrupted and error free. You are solely responsible that the
  selection of the Program and the modification of the source code will
  achieve your intended results and that the results are actually
  obtained.

************************************************************************/

#include "stlmini.h"

#include "omaccess.h"

#ifndef EXIT_SUCCESS    
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
#endif

main (int argc, char **argv) {
  if (argc != 2) {
    cout << "Usage: " << argv[0] << " <filename>" << endl;
    return EXIT_FAILURE;
  }

  OMModule omModule;
  
  string status;
  if (!GetFile(argv[1], &omModule, &status))
  {
    cout << "Error: " << status << endl;
    return EXIT_FAILURE;
  }
  
  TraceModule(omModule, cout);
  return EXIT_SUCCESS;
}
