home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
APPS
/
hl10osrc.lzh
/
EditLibr
/
EditLibr.h
< prev
next >
Wrap
Text File
|
1994-04-23
|
2KB
|
54 lines
// EditLibr.h - autogenerated from EditLibr.arg on Sat Apr 23 13:16:29 1994
// Do not edit this file! Re-run makeargprc to re-generate
#ifndef VERSION
#define VERSION "V0.0"
#endif
class EditLibr {
public:
EditLibr(int argc,char** argv);
void Usage();
char* editfile; // The name of the file to edit
Boolean editfile_passed;
int minpages; // The minimum # of pages to set aside when creating a new file
Boolean minpages_passed;
};
void EditLibr::Usage()
{
cout << "Syntax: EditLibr [opts]\n";
cout << "Librarian Card Catalog file editor\n";
cout << "This program is used to edit and maintain Card Catalog Files\n";
cout << "Options:\n";
cout << "-editfile\tString Required The name of the file to edit\n";
cout << "-minpages\tInteger Optional The minimum # of pages to set aside when creating a new file\n";
cout << "\n\tVersion: " << VERSION << "\n"; cout << "\tCopyright (c) 1991,1992 Robert Heller D/B/A Deepwoods Software\n";}
EditLibr::EditLibr(int argc,char** argv)
{
editfile_passed = false;
minpages_passed = false;
for (int iarg=1;iarg<argc;iarg++) {
if (strcmp(argv[iarg],"-?") == 0 ||
strcmp(argv[iarg],"-U") == 0) {
Usage(); exit(0);
} else if (strcmp(argv[iarg],"-editfile") == 0 && (iarg+1) < argc) {
iarg++;
editfile_passed = true;
editfile = argv[iarg];
} else if (strcmp(argv[iarg],"-minpages") == 0 && (iarg+1) < argc) {
iarg++;
minpages_passed = true;
minpages = atoi(argv[iarg]);
} else {
cerr << "Bad option: " << argv[iarg] << "\n";
Usage(); exit(1);
}
}
if (!editfile_passed) {
cerr << "Missing parameter: editfile\n";
Usage(); exit(1);
}
}