home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / som / somk / c / tp / main.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-24  |  920 b   |  42 lines

  1. #ifndef lint
  2. static char *sccsid = "%Z% %I% %W% %G% %U% [%H% %T%] (c)IBM Corp. 1992";
  3. #endif
  4.  
  5. /*
  6.  * Adapted from the book
  7.  *   Class Construction in C and C++, Object Oriented Fundamentals
  8.  *   by Roger Sessions, Copyright (c) 1992 Prentice Hall.
  9.  * Reprinted with permission.
  10.  */
  11.  
  12. #if defined(_WIN32)
  13. #include "statcls.h"
  14. #endif
  15.  
  16. #include <stdlib.h>
  17. #include "suep.h"
  18.  
  19. void main(int argc, char *argv[])
  20. {
  21.     setUpEnvProcessor *nextEnv;
  22.     fileMgr *myFile;
  23.     page *myPage;
  24.     char *inputFile;
  25.  
  26.     somEnvironmentNew();
  27.     SOM_TraceLevel = (argc > 2 ? 1 : 0);
  28.     inputFile = (argc > 1 ? argv[1] : "test.dat");
  29.  
  30.     nextEnv = setUpEnvProcessorNew();
  31.     myFile = fileMgrNew();
  32.     myPage = pageNew();
  33.     _fmInit(myFile, inputFile);
  34.  
  35.     _epSetPage(nextEnv, myPage);
  36.     _epSetFileMgr(nextEnv, myFile);
  37.     _suProcessOptions(nextEnv);
  38.  
  39.     _somFree(nextEnv);
  40.     exit(0);
  41. }
  42.