diff options
| author | Wiimm <wiimm@wiimm.de> | 2021-02-03 16:42:38 +0100 |
|---|---|---|
| committer | Wiimm <wiimm@wiimm.de> | 2021-02-03 16:42:38 +0100 |
| commit | 69894f75254cd630e2e4fe1422044c6b7d6adb5f (patch) | |
| tree | 139b93491a16987905c53c4e10bc8b44034de278 /project/src/ui/ui-wkmpt.c | |
| parent | a3d605bc52ba3e53720d0dee29a470661b35a1c2 (diff) | |
SZS 2.23a
Diffstat (limited to '')
| -rw-r--r-- | project/src/ui/ui-wkmpt.c | 154 |
1 files changed, 84 insertions, 70 deletions
diff --git a/project/src/ui/ui-wkmpt.c b/project/src/ui/ui-wkmpt.c index 1ce32eb..5a47964 100644 --- a/project/src/ui/ui-wkmpt.c +++ b/project/src/ui/ui-wkmpt.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> * * * *************************************************************************** * * @@ -529,6 +529,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." @@ -661,8 +668,8 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " the octree creation. The other allowed keywords are: FAST, NEW," " CENTER, ROUND, NORMALS, MTL, WIIMM, TRIANGLES, OUT-SWAP, G, USEMTL," " CLIP, IN-SWAP, AUTO, HEX4, HEX23, HEX, DROP-UNUSED, DROP-FIXED," - " DROP-INVALID, DROP, RM-FACEDOWN, RM-FACEUP, FIX-ALL, CONV-FACEUP," - " WEAK-WALLS, SORT, INPLACE, SILENT and LOG. See" + " DROP-INVALID, DROP, RM-FACEDOWN, RM-FACEUP, FIX-ALL, TINY-0 ..." + " TINY-7, CONV-FACEUP, WEAK-WALLS, SORT, INPLACE, SILENT and LOG. See" " https://szs.wiimm.de/opt/kcl for details." }, @@ -706,7 +713,7 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " WIDE, NARROW, FIX-CKPH, FIX-ENPH, FIX-ITPH, FIX-PH, FIX-CKNEXT," " FIX-CKJGPT, FIX-CK, FIX-ALL, MASK-PFLAGS, RM-LECODE, PURGE-GOBJ," " FULL-DEFOBJ, DUMP-CLASS, DUMP-ONEWAY, DUMP-ALL, 1LAP ... 9LAPS," - " MAX-LAPS, RM-EMPTY, INPLACE, SILENT and LOG. See" + " MAX-LAPS, RM-EMPTY, TINY-0 ... TINY-7, INPLACE, SILENT and LOG. See" " https://szs.wiimm.de/opt/kmp for details." }, @@ -851,7 +858,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 == 91 + {0,0,0,0,0,0,0,0,0,0} // OPT__N_TOTAL == 92 }; @@ -1132,6 +1139,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' }, @@ -1320,73 +1329,75 @@ 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_SCALE, - /* 0x08b */ OPT_SHIFT, - /* 0x08c */ OPT_XSS, - /* 0x08d */ OPT_YSS, - /* 0x08e */ OPT_ZSS, - /* 0x08f */ OPT_ROT, - /* 0x090 */ OPT_XROT, - /* 0x091 */ OPT_YROT, - /* 0x092 */ OPT_ZROT, - /* 0x093 */ OPT_YPOS, - /* 0x094 */ OPT_TRANSLATE, - /* 0x095 */ OPT_NULL, - /* 0x096 */ OPT_NEXT, - /* 0x097 */ OPT_ASCALE, - /* 0x098 */ OPT_AROT, - /* 0x099 */ OPT_TFORM_SCRIPT, - /* 0x09a */ OPT_RM_GOBJ, - /* 0x09b */ OPT_BATTLE, - /* 0x09c */ OPT_EXPORT_FLAGS, - /* 0x09d */ OPT_ROUTE_OPTIONS, - /* 0x09e */ OPT_WIM0, - /* 0x09f */ OPT_SLOT, - /* 0x0a0 */ OPT_POS_MODE, - /* 0x0a1 */ OPT_POS_FILE, - /* 0x0a2 */ OPT_PNG, - /* 0x0a3 */ OPT_LOAD_KCL, - /* 0x0a4 */ OPT_KCL, - /* 0x0a5 */ OPT_KCL_FLAG, - /* 0x0a6 */ OPT_KCL_SCRIPT, - /* 0x0a7 */ OPT_TRI_AREA, - /* 0x0a8 */ OPT_TRI_HEIGHT, - /* 0x0a9 */ OPT_FLAG_FILE, - /* 0x0aa */ OPT_XTRIDATA, - /* 0x0ab */ OPT_KMP, - /* 0x0ac */ OPT_SPEED_MOD, - /* 0x0ad */ OPT_KTPT2, - /* 0x0ae */ OPT_TFORM_KMP, - /* 0x0af */ OPT_REPAIR_XPF, - /* 0x0b0 */ OPT_GAMEMODES, - /* 0x0b1 */ OPT_ROUND, - /* 0x0b2 */ OPT_EPSILON, - /* 0x0b3 */ OPT_DIFF, - /* 0x0b4 */ OPT_NO_ECHO, - /* 0x0b5 */ OPT_UTF_8, - /* 0x0b6 */ OPT_NO_UTF_8, - /* 0x0b7 */ OPT_FORCE, - /* 0x0b8 */ OPT_REPAIR_MAGICS, - /* 0x0b9 */ OPT_TINY, - /* 0x0ba */ OPT_OLD, - /* 0x0bb */ OPT_STD, - /* 0x0bc */ OPT_NEW, - /* 0x0bd */ OPT_EXTRACT, - /* 0x0be */ OPT_NUMBER, - /* 0x0bf */ OPT_SECTIONS, - /* 0x0c0 */ 0,0,0,0, 0,0,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_CHDIR, + /* 0x08b */ OPT_SCALE, + /* 0x08c */ OPT_SHIFT, + /* 0x08d */ OPT_XSS, + /* 0x08e */ OPT_YSS, + /* 0x08f */ OPT_ZSS, + /* 0x090 */ OPT_ROT, + /* 0x091 */ OPT_XROT, + /* 0x092 */ OPT_YROT, + /* 0x093 */ OPT_ZROT, + /* 0x094 */ OPT_YPOS, + /* 0x095 */ OPT_TRANSLATE, + /* 0x096 */ OPT_NULL, + /* 0x097 */ OPT_NEXT, + /* 0x098 */ OPT_ASCALE, + /* 0x099 */ OPT_AROT, + /* 0x09a */ OPT_TFORM_SCRIPT, + /* 0x09b */ OPT_RM_GOBJ, + /* 0x09c */ OPT_BATTLE, + /* 0x09d */ OPT_EXPORT_FLAGS, + /* 0x09e */ OPT_ROUTE_OPTIONS, + /* 0x09f */ OPT_WIM0, + /* 0x0a0 */ OPT_SLOT, + /* 0x0a1 */ OPT_POS_MODE, + /* 0x0a2 */ OPT_POS_FILE, + /* 0x0a3 */ OPT_PNG, + /* 0x0a4 */ OPT_LOAD_KCL, + /* 0x0a5 */ OPT_KCL, + /* 0x0a6 */ OPT_KCL_FLAG, + /* 0x0a7 */ OPT_KCL_SCRIPT, + /* 0x0a8 */ OPT_TRI_AREA, + /* 0x0a9 */ OPT_TRI_HEIGHT, + /* 0x0aa */ OPT_FLAG_FILE, + /* 0x0ab */ OPT_XTRIDATA, + /* 0x0ac */ OPT_KMP, + /* 0x0ad */ OPT_SPEED_MOD, + /* 0x0ae */ OPT_KTPT2, + /* 0x0af */ OPT_TFORM_KMP, + /* 0x0b0 */ OPT_REPAIR_XPF, + /* 0x0b1 */ OPT_GAMEMODES, + /* 0x0b2 */ OPT_ROUND, + /* 0x0b3 */ OPT_EPSILON, + /* 0x0b4 */ OPT_DIFF, + /* 0x0b5 */ OPT_NO_ECHO, + /* 0x0b6 */ OPT_UTF_8, + /* 0x0b7 */ OPT_NO_UTF_8, + /* 0x0b8 */ OPT_FORCE, + /* 0x0b9 */ OPT_REPAIR_MAGICS, + /* 0x0ba */ OPT_TINY, + /* 0x0bb */ OPT_OLD, + /* 0x0bc */ OPT_STD, + /* 0x0bd */ OPT_NEW, + /* 0x0be */ OPT_EXTRACT, + /* 0x0bf */ OPT_NUMBER, + /* 0x0c0 */ OPT_SECTIONS, + /* 0x0c1 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0, /* 0x0d0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, /* 0x0e0 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, /* 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, }; // @@ -1582,6 +1593,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, @@ -1628,6 +1640,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 }; @@ -1789,6 +1802,7 @@ static const InfoOption_t * option_tab_cmd_STARTPOS[] = static const InfoOption_t * option_tab_cmd_OBJECTS[] = { OptionInfo + OPT_WIDTH, + OptionInfo + OPT_MAX_WIDTH, OptionInfo + OPT_NO_HEADER, &option_cmd_OBJECTS_BRIEF, &option_cmd_OBJECTS_LONG, @@ -2129,7 +2143,7 @@ static const InfoCommand_t CommandInfo[CMD__N+1] = "Wiimms KMP Tool : Analyze, modify, export and create (compile) KMP" " files.", 0, - 33, + 34, option_tab_tool, 0 }, @@ -2167,7 +2181,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 }, @@ -2395,7 +2409,7 @@ static const InfoCommand_t CommandInfo[CMD__N+1] = " object and file database. An online query is also available:" " https://szs.wiimm.de/cgi/mkw/object", 0, - 4, + 5, option_tab_cmd_OBJECTS, option_allowed_cmd_OBJECTS }, |
