diff options
Diffstat (limited to 'project/src/ui/ui-wimgt.c')
| -rw-r--r-- | project/src/ui/ui-wimgt.c | 75 |
1 files changed, 44 insertions, 31 deletions
diff --git a/project/src/ui/ui-wimgt.c b/project/src/ui/ui-wimgt.c index 0788b7f..0fae748 100644 --- a/project/src/ui/ui-wimgt.c +++ b/project/src/ui/ui-wimgt.c @@ -16,7 +16,7 @@ * This file is part of the SZS project. * * Visit https://szs.wiimm.de/ for project details and sources. * * * - * Copyright (c) 2011-2020 by Dirk Clemens <wiimm@wiimm.de> * + * Copyright (c) 2011-2021 by Dirk Clemens <wiimm@wiimm.de> * * * *************************************************************************** * * @@ -300,6 +300,13 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " messages and disable the automatic detection of the terminal width." }, + { OPT_MAX_WIDTH, false, false, false, true, false, 0, "max-width", + "maxwidth", + "Define the maximum terminal width (number of columns) for help and" + " some other messages and disable the automatic detection of the" + " terminal width. This option is ignored if --width is set." + }, + { OPT_QUIET, false, false, false, false, false, 'q', "quiet", 0, "Be quiet and print only error messages. Multiple usage is possible." @@ -466,7 +473,7 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " helper option." }, - {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 54 + {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 55 }; @@ -582,6 +589,8 @@ static const struct option OptionLong[] = { "allowall", 0, 0, GO_ALLOW_ALL }, { "compatible", 1, 0, GO_COMPATIBLE }, { "width", 1, 0, GO_WIDTH }, + { "max-width", 1, 0, GO_MAX_WIDTH }, + { "maxwidth", 1, 0, GO_MAX_WIDTH }, { "quiet", 0, 0, 'q' }, { "verbose", 0, 0, 'v' }, { "logging", 0, 0, 'L' }, @@ -719,32 +728,33 @@ static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] = /* 0x081 */ OPT_ALLOW_ALL, /* 0x082 */ OPT_COMPATIBLE, /* 0x083 */ OPT_WIDTH, - /* 0x084 */ OPT_DE, - /* 0x085 */ OPT_COLORS, - /* 0x086 */ OPT_NO_COLORS, - /* 0x087 */ OPT_CT_CODE, - /* 0x088 */ OPT_LE_CODE, - /* 0x089 */ OPT_CHDIR, - /* 0x08a */ OPT_UTF_8, - /* 0x08b */ OPT_NO_UTF_8, - /* 0x08c */ OPT_FORCE, - /* 0x08d */ OPT_REPAIR_MAGICS, - /* 0x08e */ OPT_OLD, - /* 0x08f */ OPT_STD, - /* 0x090 */ OPT_NEW, - /* 0x091 */ OPT_EXTRACT, - /* 0x092 */ OPT_NUMBER, - /* 0x093 */ OPT_MIPMAPS, - /* 0x094 */ OPT_NO_MIPMAPS, - /* 0x095 */ OPT_N_MIPMAPS, - /* 0x096 */ OPT_MAX_MIPMAPS, - /* 0x097 */ OPT_MIPMAP_SIZE, - /* 0x098 */ OPT_FAST_MIPMAPS, - /* 0x099 */ OPT_CMPR_DEFAULT, - /* 0x09a */ OPT_PRE_CONVERT, - /* 0x09b */ OPT_STRIP, - /* 0x09c */ OPT_SECTIONS, - /* 0x09d */ 0,0,0, + /* 0x084 */ OPT_MAX_WIDTH, + /* 0x085 */ OPT_DE, + /* 0x086 */ OPT_COLORS, + /* 0x087 */ OPT_NO_COLORS, + /* 0x088 */ OPT_CT_CODE, + /* 0x089 */ OPT_LE_CODE, + /* 0x08a */ OPT_CHDIR, + /* 0x08b */ OPT_UTF_8, + /* 0x08c */ OPT_NO_UTF_8, + /* 0x08d */ OPT_FORCE, + /* 0x08e */ OPT_REPAIR_MAGICS, + /* 0x08f */ OPT_OLD, + /* 0x090 */ OPT_STD, + /* 0x091 */ OPT_NEW, + /* 0x092 */ OPT_EXTRACT, + /* 0x093 */ OPT_NUMBER, + /* 0x094 */ OPT_MIPMAPS, + /* 0x095 */ OPT_NO_MIPMAPS, + /* 0x096 */ OPT_N_MIPMAPS, + /* 0x097 */ OPT_MAX_MIPMAPS, + /* 0x098 */ OPT_MIPMAP_SIZE, + /* 0x099 */ OPT_FAST_MIPMAPS, + /* 0x09a */ OPT_CMPR_DEFAULT, + /* 0x09b */ OPT_PRE_CONVERT, + /* 0x09c */ OPT_STRIP, + /* 0x09d */ OPT_SECTIONS, + /* 0x09e */ 0,0, /* 0x0a0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, /* 0x0b0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, /* 0x0c0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, @@ -753,7 +763,8 @@ static const OptionIndex_t OptionIndex[UIOPT_INDEX_SIZE] = /* 0x0f0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, /* 0x100 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, /* 0x110 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, - /* 0x120 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, + /* 0x120 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, + /* 0x130 */ 0,0,0,0, 0,0, }; // @@ -850,6 +861,7 @@ static const InfoOption_t * option_tab_tool[] = OptionInfo + OPT_ALLOW_ALL, OptionInfo + OPT_COMPATIBLE, OptionInfo + OPT_WIDTH, + OptionInfo + OPT_MAX_WIDTH, OptionInfo + OPT_QUIET, OptionInfo + OPT_VERBOSE, OptionInfo + OPT_LOGGING, @@ -883,6 +895,7 @@ static const InfoOption_t * option_tab_cmd_VERSION[] = static const InfoOption_t * option_tab_cmd_HELP[] = { OptionInfo + OPT_WIDTH, + OptionInfo + OPT_MAX_WIDTH, 0 }; @@ -1122,7 +1135,7 @@ static const InfoCommand_t CommandInfo[CMD__N+1] = "Wiimms Image Tool : Extract and convert graphic images. The file" " formats TPL, TEX, BTI, BREFT and PNG are supported.", 0, - 20, + 21, option_tab_tool, 0 }, @@ -1160,7 +1173,7 @@ static const InfoCommand_t CommandInfo[CMD__N+1] = " The third variant (with a valid command name) prints details about" " the declared command. The fourth variant prints an overview about" " all commands and all global options.", - 1, + 2, option_tab_cmd_HELP, option_allowed_cmd_HELP }, |
