Improve output of 'fltk-options -h' and '-L*'
This commit includes minor code formatting w/o semantic changes and fixes some typos.
This commit is contained in:
parent
801125b9a4
commit
d3d051483a
@ -68,7 +68,7 @@ typedef enum {
|
||||
FO_USER
|
||||
} Fo_Context;
|
||||
|
||||
// Avalable option types.
|
||||
// Available option types.
|
||||
// We can add more types later as needed.
|
||||
// See: Fl_Group* add_option( Fo_Option_Descr* opt)
|
||||
// See: Fl_Group* add_option_bool(Fo_Option_Descr* opt)
|
||||
@ -170,9 +170,9 @@ Fo_Option_Descr g_option_list[] = {
|
||||
"If disabled, the zoom-in operation requires the shift key to be pressed also "
|
||||
"with such a keyboard." },
|
||||
// -- When adding new options here, please make sure that you also update
|
||||
// -- documentation.src/fltk-options.dox
|
||||
// -- documentation/src/fltk-options.dox
|
||||
// -- and
|
||||
// -- documentation.src/fltk-options.man
|
||||
// -- documentation/src/fltk-options.man
|
||||
{ FO_END_OF_LIST }
|
||||
};
|
||||
|
||||
@ -228,7 +228,7 @@ void clear_option(Fo_Context ctx, const char *name) {
|
||||
}
|
||||
|
||||
/** Print the Usage: text and list all system and user options.
|
||||
\param[in] argv application name when called from the shell
|
||||
\param[in] argv0 application name when called from the shell
|
||||
*/
|
||||
void print_usage(const char *argv0) {
|
||||
const char *app_name = NULL;
|
||||
@ -253,7 +253,7 @@ void print_usage(const char *argv0) {
|
||||
for (opt = g_option_list; opt->type != FO_END_OF_LIST; ++opt) {
|
||||
if (opt->name) {
|
||||
if (opt->brief)
|
||||
fprintf(stdout, " %-24s %s\n", opt->name, opt->brief);
|
||||
fprintf(stdout, " %-28s %s\n", opt->name, opt->brief);
|
||||
else
|
||||
fprintf(stdout, " %s\n", opt->name);
|
||||
}
|
||||
@ -261,8 +261,8 @@ void print_usage(const char *argv0) {
|
||||
fprintf(stdout, "\n Calling %s without options will launch %s interactive mode.\n", app_name, app_name);
|
||||
}
|
||||
|
||||
/** Print more information for a given options.
|
||||
\param[in] options the name of the option, case insensitive
|
||||
/** Print more information for a given option.
|
||||
\param[in] option the name of the option, case insensitive
|
||||
*/
|
||||
void print_info(const char *option) {
|
||||
Fo_Option_Descr *opt;
|
||||
@ -308,7 +308,7 @@ void list_options(char cmd) {
|
||||
/** Handle a commmand line argument for system or user options.
|
||||
\param[in] ctx settings context
|
||||
\param[in] name the name of the option
|
||||
\param ival 0 or 1 to set, -1 to reset to default, and FO_PRINT_VALUE to
|
||||
\param[in] ival 0 or 1 to set, -1 to reset to default, and FO_PRINT_VALUE to
|
||||
print the current value
|
||||
*/
|
||||
void handle_option(Fo_Context ctx, const char *name, int ival) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user