From 9386772560dd772934398ffe64e52f85db3483e7 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 14 Dec 2019 18:34:03 +0100 Subject: [PATCH 1/2] Fix --help option --- options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options.c b/options.c index 4734639..52e70b3 100644 --- a/options.c +++ b/options.c @@ -44,7 +44,7 @@ static struct option spd_long_options[] = { {"dont-init-tables", 0, 0, 't'}, {"probe", 0, 0, 'p'}, {"version", 0, 0, 'v'}, - {"help", 0, 0, 0}, + {"help", 0, 0, 'h'}, {0, 0, 0, 0} }; From 7c312184cf9457c19ceb42e9ad7d75a56ee653a0 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 14 Dec 2019 18:34:20 +0100 Subject: [PATCH 2/2] Generate manpage from help --- Makefile.am | 5 +++++ options.c | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Makefile.am b/Makefile.am index a0b240c..71ea4aa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,4 +19,9 @@ dist_sysconf_DATA = speechd-up.conf info_TEXINFOS = speechd-up.texi speechd_up_TEXINFOS = gpl.texi fdl.texi +speechd-up.1: speechd-up + help2man -n "Interface between Speech Dispatcher and SpeakUp" --output=$@ ./$< + +man1_MANS = speechd-up.1 + EXTRA_DIST = build.sh diff --git a/options.c b/options.c index 52e70b3..394a311 100644 --- a/options.c +++ b/options.c @@ -68,18 +68,18 @@ void options_print_help(char *argv[]) argv[0]); printf ("SpeechD-Up -- Interface between Speech Dispatcher and SpeakUp (GNU GPL)\n\n"); - printf("-d, --run-daemon - Run as a daemon\n" - "-s, --run-single - Run as single application\n" - "-l, --log-level - Set log level (1..5)\n" - "-L, --log-file - Set log file to path\n" - "-D, --device - Specify the device name of Speakup software synthesis\n" - "-i, --language - Set default language for speech output\n" - "-c, --coding - Specify the default encoding to use\n" - "-t, --dont-init-tables - Don't rewrite /proc tables for optimal software synthesis\n" - "-p, --probe - Initialize everything and try to say some message\n" - " but don't connect to SpeakUp. For testing purposes.\n" - "-v, --version - Report version of this program\n" - "-h, --help - Print this info\n\n" + printf("\t-d, --run-daemon Run as a daemon\n" + "\t-s, --run-single Run as single application\n" + "\t-l, --log-level Set log level (1..5)\n" + "\t-L, --log-file Set log file to path\n" + "\t-D, --device Specify the device name of Speakup software synthesis\n" + "\t-i, --language Set default language for speech output\n" + "\t-c, --coding Specify the default encoding to use\n" + "\t-t, --dont-init-tables Don't rewrite /proc tables for optimal software synthesis\n" + "\t-p, --probe Initialize everything and try to say some message\n" + "\t but don't connect to SpeakUp. For testing purposes.\n" + "\t-v, --version Report version of this program\n" + "\t-h, --help Print this info\n\n" "Copyright (C) 2003,2005 Brailcom, o.p.s.\n" "This is free software; you can redistribute it and/or modify it\n" "under the terms of the GNU General Public License as published by\n"