diff options
author | Bill Spitzak <spitzak@gmail.com> | 2014-08-08 12:59:55 -0700 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2014-08-19 12:19:17 +0300 |
commit | 5cad843989cec84a770f82fb0fdbca46dca4f017 (patch) | |
tree | 100c40769ac004c281adc13f840e21b253fb71f9 | |
parent | 6e16a556f8713ec581d1b14bd61c2adc2f289dac (diff) |
weston-terminal --help and other command-line options
Option array existed but was unused. Added --font-size.
-rw-r--r-- | clients/terminal.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clients/terminal.c b/clients/terminal.c index 0bacbe09..7c371016 100644 --- a/clients/terminal.c +++ b/clients/terminal.c @@ -3042,6 +3042,7 @@ terminal_run(struct terminal *terminal, const char *path) static const struct weston_option terminal_options[] = { { WESTON_OPTION_BOOLEAN, "fullscreen", 'f', &option_fullscreen }, { WESTON_OPTION_STRING, "font", 0, &option_font }, + { WESTON_OPTION_INTEGER, "font-size", 0, &option_font_size }, { WESTON_OPTION_STRING, "shell", 0, &option_shell }, }; @@ -3067,6 +3068,16 @@ int main(int argc, char *argv[]) weston_config_section_get_string(s, "term", &option_term, "xterm"); weston_config_destroy(config); + if (parse_options(terminal_options, + ARRAY_LENGTH(terminal_options), &argc, argv) > 1) { + printf("Usage: %s [OPTIONS]\n" + " --fullscreen or -f\n" + " --font=NAME\n" + " --font-size=SIZE\n" + " --shell=NAME\n", argv[0]); + return 1; + } + d = display_create(&argc, argv); if (d == NULL) { fprintf(stderr, "failed to create display: %m\n"); |