diff options
author | Dave Davenport <qball@gmpclient.org> | 2015-11-14 19:42:43 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2015-11-14 19:42:43 +0100 |
commit | 56e85d0f5ae8b1aaec926d9fe1171d1b5d483702 (patch) | |
tree | d7d6d2594a72fcd78840e8b9fe8b9541ea9f86a2 /source/xrmoptions.c | |
parent | b9d1fe6635d0790712f7b4f9a6da0152855c3e6d (diff) |
Cleanup.
Diffstat (limited to 'source/xrmoptions.c')
-rw-r--r-- | source/xrmoptions.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/xrmoptions.c b/source/xrmoptions.c index b3898df0..a382fa2c 100644 --- a/source/xrmoptions.c +++ b/source/xrmoptions.c @@ -492,3 +492,20 @@ void print_options ( void ) print_option ( &extra_options[i], is_term ); } } + +void print_help_msg ( const char *option, const char*text, const char *def, int isatty ) +{ + int l = 39 - strlen ( option ); + if ( isatty ) { + printf ( "\t%s%s%s %-*c%s\n", color_bold, option, color_reset, l, ' ', text ); + if ( def != NULL ) { + printf ( "\t\t%s%s%s\n", color_italic, def, color_reset ); + } + } + else{ + printf ( "\t%s %-*c%s\n", option, l, ' ', text ); + if ( def != NULL ) { + printf ( "\t\t%s\n", def ); + } + } +} |