home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / hl10osrc.zoo / Ascii2Libr / Ascii2Libr.h < prev    next >
Text File  |  2009-11-06  |  2KB  |  54 lines

  1. // Ascii2Libr.h - autogenerated from Ascii2Libr.arg on Sat Apr 23 11:27:14 1994
  2. // Do not edit this file!  Re-run makeargprc to re-generate
  3.  
  4. #ifndef VERSION
  5. #define VERSION "V0.0"
  6. #endif
  7.  
  8. class Ascii2Libr {
  9. public:
  10.              Ascii2Libr(int argc,char** argv);
  11.         void Usage();
  12.         char* outfile; // Output file to create
  13.         Boolean outfile_passed;
  14.         int minpages; // Minimum number of pages to create file with.
  15.         Boolean minpages_passed;
  16. };
  17.  
  18. void Ascii2Libr::Usage()
  19. {
  20.         cout << "Syntax: Ascii2Libr [opts]\n";
  21.         cout << "Program to read the ASCII text file generated by Libr2Ascii\n";
  22.         cout << "into a Librarian Card Catalog file\n";
  23.         cout << "Options:\n";
  24.         cout << "-outfile\tString Required Output file to create\n";
  25.         cout << "-minpages\tInteger Optional Minimum number of pages to create file with.\n";
  26.         cout << "\n\tVersion: " << VERSION << "\n";        cout << "\tCopyright (c) 1991,1992 Robert Heller D/B/A Deepwoods Software\n";}
  27.  
  28. Ascii2Libr::Ascii2Libr(int argc,char** argv)
  29. {
  30.         outfile_passed = false;
  31.         minpages_passed = false;
  32.         for (int iarg=1;iarg<argc;iarg++) {
  33.             if (strcmp(argv[iarg],"-?") == 0 ||
  34.                 strcmp(argv[iarg],"-U") == 0) {
  35.                 Usage(); exit(0);
  36.             } else if (strcmp(argv[iarg],"-outfile") == 0 && (iarg+1) < argc) {
  37.                 iarg++;
  38.                 outfile_passed = true;
  39.                 outfile = argv[iarg];
  40.             } else if (strcmp(argv[iarg],"-minpages") == 0 && (iarg+1) < argc) {
  41.                 iarg++;
  42.                 minpages_passed = true;
  43.                 minpages = atoi(argv[iarg]);
  44.             } else {
  45.                 cerr << "Bad option: " << argv[iarg] << "\n";
  46.                 Usage(); exit(1);
  47.             }
  48.         }
  49.         if (!outfile_passed) {
  50.             cerr << "Missing parameter: outfile\n";
  51.                 Usage(); exit(1);
  52.         }
  53. }
  54.