aboutsummaryrefslogtreecommitdiff
path: root/src/help.c
blob: 70072a8e77aecef0dec5ab7a9ebd24b95dfb06bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "globals.h"

void print_usage(int argc, char *argv[])
{
    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("Built with %s.\n", curl_version());
    printf("Build date: %s\n", __DATE__);
    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");
}