home *** CD-ROM | disk | FTP | other *** search
- /**************************************************************************
- These C++ classes are copyright 1989, 1990, 1991 by William Herrera.
- I hereby release this source code for free distrubution and use.
- If you modify it and distribute it, please indicate any changes you
- make as your own and the code as copyrighted above.
- **************************************************************************/
- #include <time.h>
- #include <stdlib.h>
- #include <dos.h>
- #include <fstream.h>
- #include <alloc.h>
-
- #include "error.hpp"
- #include "gcstring.hpp"
-
- int main(int argc, char ** argv)
- {
- if(argc != 2)
- Error("Usage: ", argv[0], " filename", -1);
- char * filename = argv[1];
- cout << farcoreleft() << "\n";
- ifstream from(filename);
- if(!from.good())
- Error("Cannot find, open or use file ", argv[1], " ", -2);
- gcstring s;
- time_t t1 = time(NULL);
- while(from.good())
- {
- gcstring s1, s2;
- from >> s1;
- from >> s2;
- s = s1.uppercase() + "\n" + s2.lowercase() + "\n";
- cout << s;
- }
- time_t t2 = time(NULL);
- cout << farcoreleft();
- cout << "\nElapsed time is " << (t2 - t1) << " sec";
- return 0;
- }
-