aboutsummaryrefslogtreecommitdiff
path: root/project/src/ui/ui-wctct.c
diff options
context:
space:
mode:
authorWiimm <wiimm@wiimm.de>2021-02-03 16:42:38 +0100
committerWiimm <wiimm@wiimm.de>2021-02-03 16:42:38 +0100
commit69894f75254cd630e2e4fe1422044c6b7d6adb5f (patch)
tree139b93491a16987905c53c4e10bc8b44034de278 /project/src/ui/ui-wctct.c
parenta3d605bc52ba3e53720d0dee29a470661b35a1c2 (diff)
SZS 2.23a
Diffstat (limited to '')
-rw-r--r--project/src/ui/ui-wctct.c125
1 files changed, 69 insertions, 56 deletions
diff --git a/project/src/ui/ui-wctct.c b/project/src/ui/ui-wctct.c
index d106ed3..8569f2c 100644
--- a/project/src/ui/ui-wctct.c
+++ b/project/src/ui/ui-wctct.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> *
* *
***************************************************************************
* *
@@ -437,6 +437,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."
@@ -646,7 +653,7 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] =
" 0x3b:0x41 and 0x44:0xfe."
},
- {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 80
+ {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 81
};
@@ -832,6 +839,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' },
@@ -1012,64 +1021,66 @@ 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_OLD_SPINY,
- /* 0x08a */ OPT_CRS1,
- /* 0x08b */ OPT_CHDIR,
- /* 0x08c */ OPT_ROUND,
- /* 0x08d */ OPT_RAW,
- /* 0x08e */ OPT_BMG_ENDIAN,
- /* 0x08f */ OPT_BMG_ENCODING,
- /* 0x090 */ OPT_BMG_INF_SIZE,
- /* 0x091 */ OPT_BMG_MID,
- /* 0x092 */ OPT_FORCE_ATTRIB,
- /* 0x093 */ OPT_DEF_ATTRIB,
- /* 0x094 */ OPT_NO_ATTRIB,
- /* 0x095 */ OPT_X_ESCAPES,
- /* 0x096 */ OPT_OLD_ESCAPES,
- /* 0x097 */ OPT_NO_BMG_COLORS,
- /* 0x098 */ OPT_BMG_COLORS,
- /* 0x099 */ OPT_NO_BMG_INLINE,
- /* 0x09a */ OPT_NO_ECHO,
- /* 0x09b */ OPT_UTF_8,
- /* 0x09c */ OPT_NO_UTF_8,
- /* 0x09d */ OPT_FORCE,
- /* 0x09e */ OPT_REPAIR_MAGICS,
- /* 0x09f */ OPT_OLD,
- /* 0x0a0 */ OPT_STD,
- /* 0x0a1 */ OPT_NEW,
- /* 0x0a2 */ OPT_EXTRACT,
- /* 0x0a3 */ OPT_LIST,
- /* 0x0a4 */ OPT_REF,
- /* 0x0a5 */ OPT_FULL,
- /* 0x0a6 */ OPT_HEX,
- /* 0x0a7 */ OPT_CT_DIR,
- /* 0x0a8 */ OPT_CT_LOG,
- /* 0x0a9 */ OPT_ALLOW_SLOTS,
- /* 0x0aa */ OPT_IMAGES,
- /* 0x0ab */ OPT_LOAD_BMG,
- /* 0x0ac */ OPT_PATCH_BMG,
- /* 0x0ad */ OPT_MACRO_BMG,
- /* 0x0ae */ OPT_FILTER_BMG,
- /* 0x0af */ OPT_PATCH_NAMES,
- /* 0x0b0 */ OPT_ORDER_BY,
- /* 0x0b1 */ OPT_ORDER_ALL,
- /* 0x0b2 */ OPT_DYNAMIC,
- /* 0x0b3 */ OPT_WRITE_TRACKS,
- /* 0x0b4 */ OPT_NUMBER,
- /* 0x0b5 */ OPT_SECTIONS,
- /* 0x0b6 */ 0,0,0,0, 0,0,0,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_OLD_SPINY,
+ /* 0x08b */ OPT_CRS1,
+ /* 0x08c */ OPT_CHDIR,
+ /* 0x08d */ OPT_ROUND,
+ /* 0x08e */ OPT_RAW,
+ /* 0x08f */ OPT_BMG_ENDIAN,
+ /* 0x090 */ OPT_BMG_ENCODING,
+ /* 0x091 */ OPT_BMG_INF_SIZE,
+ /* 0x092 */ OPT_BMG_MID,
+ /* 0x093 */ OPT_FORCE_ATTRIB,
+ /* 0x094 */ OPT_DEF_ATTRIB,
+ /* 0x095 */ OPT_NO_ATTRIB,
+ /* 0x096 */ OPT_X_ESCAPES,
+ /* 0x097 */ OPT_OLD_ESCAPES,
+ /* 0x098 */ OPT_NO_BMG_COLORS,
+ /* 0x099 */ OPT_BMG_COLORS,
+ /* 0x09a */ OPT_NO_BMG_INLINE,
+ /* 0x09b */ OP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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,
};
//
@@ -1217,6 +1228,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,
@@ -1258,6 +1270,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
};
@@ -1588,7 +1601,7 @@ static const InfoCommand_t CommandInfo[CMD__N+1] =
"Wiimms CT-CODE Tool : Manage the CT-CODE extension. BRRES, TEX0,"
" CT-CODE, CT-TEXT and LE-BIN files are accepted as input.",
0,
- 25,
+ 26,
option_tab_tool,
0
},
@@ -1626,7 +1639,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
},