From 56e85d0f5ae8b1aaec926d9fe1171d1b5d483702 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sat, 14 Nov 2015 19:42:43 +0100 Subject: Cleanup. --- source/xrmoptions.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source/xrmoptions.c') 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 ); + } + } +} -- cgit v1.2.3