// // quickie - a small fast C++ Wiki Wiki // Copyright (C) 2005 Peter Miller // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. // // MANIFEST: functions to impliment the main class // #include #include #include #include #include #include #include #include static void usage() { fprintf(stderr, "usage: %s [ [ ]]\n", progname_get()); exit(1); } int main(int argc, char **argv) { progname_set(argv[0]); input *ip = 0; output *op = 0; switch (argc) { case 1: ip = new input_stdin(); op = new output_stdout(); break; case 2: ip = new input_file(argv[1]); op = new output_stdout(); break; case 3: ip = new input_file(argv[1]); op = new output_file(argv[2]); break; default: usage(); } // // Translate the output. // wiki_to_man translator(*ip, *op); translator.translate(); delete ip; delete op; return 0; }