-#define FORMAT_STRING " %s --%s%s%s%s%s%s%s "
- /* short option ------' | | | | | | |
- * option name ------------' | | | | | |
- * <bra ---------------------' | | | | |
- * option type or "" ----------' | | | |
- * ket> -------------------------' | | |
- * padding spaces -----------------' | |
- * comment --------------------------' |
- * comment suffix ---------------------'
- *
- * The purpose of having bra and ket is that we might i18n them as well.
- */
-
-#define COLOR_FORMAT_STRING (WHITE" %s --%s"YELLOW"%s%s%s%s%s%s "GRAY)
-#define COLOR_FORMAT_STRING_BOOL (WHITE" %s --%s%s%s%s%s%s%s "GRAY)
-
-#define LINE_START 8
-#define PADDING_SPACES 25
-#ifdef WIN32
-# define OPTION_VALUE_SEP "="
-#else
-# define OPTION_VALUE_SEP " "
-#endif
- char psz_spaces_text[PADDING_SPACES+LINE_START+1];
- char psz_spaces_longtext[LINE_START+3];
- char psz_format[sizeof(COLOR_FORMAT_STRING)];
- char psz_format_bool[sizeof(COLOR_FORMAT_STRING_BOOL)];
- char psz_buffer[10000];
- char psz_short[4];
- int i_width = ConsoleWidth() - (PADDING_SPACES+LINE_START+1);
- int i_width_description = i_width + PADDING_SPACES - 1;
- bool b_advanced = var_InheritBool( p_this, "advanced" );
- bool b_description = var_InheritBool( p_this, "help-verbose" );
- bool b_description_hack;
- bool b_color = var_InheritBool( p_this, "color" );
- bool b_has_advanced = false;
- bool b_found = false;
- unsigned i_only_advanced = 0; /* Number of modules ignored because they
- * only have advanced options */
- bool b_strict = psz_search && *psz_search == '=';
- if( b_strict ) psz_search++;
-
- memset( psz_spaces_text, ' ', PADDING_SPACES+LINE_START );
- psz_spaces_text[PADDING_SPACES+LINE_START] = '\0';
- memset( psz_spaces_longtext, ' ', LINE_START+2 );
- psz_spaces_longtext[LINE_START+2] = '\0';
-#ifndef WIN32
- if( !isatty( 1 ) )
-#endif
- b_color = false; // don't put color control codes in a .txt file