diff options
Diffstat (limited to 'src/help.c')
| -rw-r--r-- | src/help.c | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -1,6 +1,25 @@ #include "globals.h" -void help_handler(struct player_t *player) +void print_usage(int argc, char *argv[]) { - printf("not implemented\n"); + assert(argc > 1); + + printf("Usage: %s [OPTION] [PORTFOLIO]\n", argv[0]); + printf("Runs a simulated trading session with PORTFOLIO (creating a new one by default).\n\n"); + + printf("Options:\n"); + printf(" -h, --help\tShow this help and exit\n"); + printf(" -v, --verbose\tEnable verbose operation\n"); + printf(" --version\tOutput version information and exit\n"); +} + +void print_version(void) +{ + printf("market-sim " PROGRAM_VERSION "\n"); + printf("Copyright (C) 2015 Franklin Wei.\n\n"); + printf("License GPLv2: GNU GPL version 2 <http://www.gnu.org/licenses/gpl-2.0.html>\n"); + printf("This program is distributed in the hope that it will be useful, but WITHOUT ANY\n"); + printf("WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n"); + printf("PARTICULAR PURPOSE.\n"); + printf("See the GNU General Public License version 2 for more details.\n"); } |