00001 #include "config.h"
00002
00003 #include <iostream>
00004 #include <string>
00005
00006 #include "asserts.h"
00007 #include "error.h"
00008 #include "help.h"
00009
00010 void print_help(void)
00011 {
00012 std::string text;
00013 std::string bumper;
00014
00015 TRY_nomem(text = "Usage: ");
00016 TRY_nomem(text += PACKAGE);
00017 TRY_nomem(text += " ");
00018
00019 while (bumper.length() < text.length()) {
00020 bumper += " ";
00021 }
00022
00023 TRY_nomem(text += "[ --archive | --relink | --help | --version | ");
00024 TRY_nomem(text += "--check-config ]");
00025 TRY_nomem(text += "\n");
00026
00027 TRY_nomem(text += bumper);
00028 TRY_nomem(text += "[ --timestamp <timestamp> ]");
00029 TRY_nomem(text += "\n");
00030
00031 TRY_nomem(text += bumper);
00032 TRY_nomem(text += "[ --no-default-config ]");
00033 TRY_nomem(text += "\n");
00034
00035 TRY_nomem(text += bumper);
00036 TRY_nomem(text += "[[ --config <config-file> ] ...]");
00037 TRY_nomem(text += "\n");
00038
00039 TRY_nomem(text += bumper);
00040 TRY_nomem(text += "[[ --job <job-file> ] ...]");
00041 TRY_nomem(text += "\n");
00042
00043 print_version();
00044 std::cout << text << std::endl;
00045 }
00046
00047 void print_version(void)
00048 {
00049 std::cout << PACKAGE << " version " << VERSION << std::endl;
00050 }
00051