12025-06-22 Version 1.0.5 2 3 Manual: 4 * fix: "User-friendly documentation for alternate screen" 5 https://bugs.freebsd.org/285459. 6 Improve bsddialog.1: --alternate-screen and --normal-screen. 7 8 NetBSD (tested on amd64) refactoring, no function changes: 9 * https://gitlab.com/alfix/bsddialog/-/merge_requests/4 10 lib: include <stdarg.h> in lib_util.c. 11 * https://gitlab.com/alfix/bsddialog/-/merge_requests/5 12 a call to curses' refresh() is performed, while a local 13 variable is also called refresh. 14 * Makefiles: add install and uninstall targets (both GND and BSD) 15 https://gitlab.com/alfix/bsddialog/-/merge_requests/3 16 17 MacOS (tested on amd64) refactoring, no function changes: 18 * https://gitlab.com/alfix/bsddialog/-/merge_requests/6 19 utility: replace u_int with unsigned int. 20 21 Library: 22 * fix: useless refreshes, https://gitlab.com/alfix/bsddialog/-/issues/8: 23 "It takes lot of time when running over a 115200 UART". 24 Not fixed for bsddialog_gauge() because it has to be rewritten. 25 * change: bsddialog_backtitle() does not update the screen so the 26 backtitle is not printed. To use if a dialog is built later. 27 Rationale: see "115200 UART" problem above. 28 * add: bsddialog_backtitle_rf() to print a top title refreshing the 29 screen like bsddialog_backtitle() was previously. 30 * change: forms, ENTER is also a navigation keys in forms fields. 31 Request: https://bugs.freebsd.org/287592 32 If conf.button.always_active is true the form is closes immediatly. 33 34 Library and implicitly utility: 35 * fix: textbox buttons returned values (was always OK). 36 Thanks to https://reviews.freebsd.org/D48668. 37 * change: TAB is a navigation keys in forms. Previously it directly 38 switched form-fields <-> buttons. 39 Request: https://bugs.freebsd.org/287592 40 41 Utility: 42 * change: forms, ENTER is a also navigation keys in forms fields. 43 Previously it directly closed the form except with --switch-buttons 44 Request: https://bugs.freebsd.org/287592 45 46 472024-07-01 Version 1.0.4 48 49 Utility internal refactoring (no functional change): 50 * change: rename an internal constant to avoid a future conflict 51 because FreeBSD is changing headers files for _FORTIFY_SOURCE. 52 Reported and fixed by Kyle Evans. 53 542024-05-27 Version 1.0.3 55 56 Utility: 57 change: --form and --mixedform do not print field value to output fd if 58 <fieldlen> is <= 0 (readonly). To note --mixedgauge continues 59 to print field value if <flag> = 2 (readonly) unless <fieldlen> 60 is <= 0 (as described previously). 61 62 632024-04-11 Version 1.0.2 64 65 Utility: 66 improvements and changes for --form and --mixedform: 67 * add: <maxletters> 0 sets <maxletters> like <fieldlen>. 68 * add: <fieldlen> 0 sets <fieldlen> like <init> width and readonly. 69 * change: <maxletters> 0 was an error (remains error in lib). 70 * change: <fieldlen> 0 was an error (remains error in lib) 71 (<fieldlen> 0 and <init> "" is still an error.). 72 73 Library and implicitly utility: 74 * add: Ctrl-l to redraw dialog. 75 Request stable@freebsd.org January 2024. 76 * add: -, +, Ctrl-p, Ctrl-n for several dialogs. 77 +, - request for menus, private feature request. 78 Ctrl-p, Ctrl-n for menu, request hackers@freebsd.org February 2024. 79 * fix: escaped text ending with an escape symbol. 80 * change: truncate mixedgauge long (over the screen/minibars) 81 minilabels adding "...". As a result, avoid check-size error. 82 https://gitlab.com/alfix/bsddialog/-/issues/6. 83 * change: invert UP/DOWN keys to set a rangebox value. 84 85 862023-11-16 Version 1.0.1 87 88 Library Internal Refactoring: 89 * add: arrow macro handlers. 90 * change: Box-drawing characters, from utf8 to wide chars to avoid to 91 handle "env NCURSES_NO_UTF8_ACS=1". 92 Request https://bugs.freebsd.org/274472, 93 Rationale https://reviews.freebsd.org/D42380. 94 952023-08-01 Version 1.0 96 97 Utility: 98 * add: comments to --save-theme output file. 99 * add: blink, halfbright, highlight to --save-theme and --load-theme. 100 * add: theme.menu.[f_]prefixcolor to --save-theme and --load-theme. 101 * add: --datebox-format <d/m/y|m/d/y|y/m/d> to set --datebox UI. 102 * add: --help-print-items (--help-status becomes alias). 103 * add: --text-escape (--colors becomes alias). 104 * add: new escapes \Zd, \Zk, \Zs, \ZD, \ZK, \ZS, for --text-escape. 105 * add: env NO_COLOR, to set blackwhite theme. 106 * add: $HOME/.bsddialog.conf startup theme file. 107 * add: env BSDDIALOG_THEMEFILE startup theme file. 108 * add: --left1-button <label>. 109 * add: --left2-button <label>. 110 * add: --left3-button <label>. 111 * add: --right1-button <label>. 112 * add: --right2-button <label>. 113 * add: --right3-button <label>. 114 * add: dynamic exit codes. 115 - add: --error-exit-code. 116 - add: --ok-exit-code. 117 - add: --cancel-exit-code. 118 - add: --help-exit-code. 119 - add: --extra-exit-code. 120 - add: --timeout-exit-code. 121 - add: --esc-exit-code. 122 - add: --left1-exit-code. 123 - add: --left2-exit-code. 124 - add: --left3-exit-code. 125 - add: --right1-exit-code. 126 - add: --right2-exit-code. 127 - add: --right3-exit-code. 128 - add: env BSDDIALOG_ERROR. 129 - add: env BSDDIALOG_OK. 130 - add: env BSDDIALOG_CANCEL. 131 - add: env BSDDIALOG_HELP. 132 - add: env BSDDIALOG_EXTRA. 133 - add: env BSDDIALOG_TIMEOUT. 134 - add: env BSDDIALOG_ESC. 135 - add: env BSDDIALOG_LEFT1. 136 - add: env BSDDIALOG_LEFT2. 137 - add: env BSDDIALOG_LEFT3. 138 - add: env BSDDIALOG_RIGHT1. 139 - add: env BSDDIALOG_RIGHT2. 140 - add: env BSDDIALOG_RIGHT3. 141 * add: undocumented envs for bsdconfig(8) compatibility. 142 - env BSDDIALOG_COMPATRC for use_shadow setting. 143 - env BSDDIALOG_ITEM_HELP to add/set exit code. 144 * change: rename themes --theme <3d|blackwhite|flat>. 145 * change: --no-names and --no-descriptions mutually exclusive (via lia). 146 * change: quote only checklist output items if necessary. Previously 147 also radiolist item. 148 * change: dialogs with user input print always values except with ERROR, 149 ESC, Cancel. Previously the situation was quite heterogeneous. 150 * improve: DIAGNOSTIC messages adding fmt string errors. 151 * improve: disable theme setting (opt and env) with no-color terminals. 152 * improve: menus on|off status (strcasecmp, diagnostic, real off check). 153 * improve: --bikeshed with button delimiter and --date-format. 154 * improve: --textbox accepts button options. 155 * improve: Forms with Help button. 156 - print "HELP" (like menus). 157 - accept --help-list-items. 158 - accept --help-print-name. 159 * fix: --load-theme attributes. 160 * fix: --clear-screen with --and-dialog. 161 * delete: --theme <bsddialog> (partially implemented). 162 * delete: --esc-return-cancel (replaced by new env and option). 163 * delete: --generic-button1 (replaced by --right1-button). 164 * delete: --generic-button2 (replaced by --right2-button). 165 * refactor: modularize in more files (main, cli, builders, theme). 166 167 Library: 168 * add: bsddialog_inmode(). 169 * add: bsddialog_clear(y) for utility --clear-screen. 170 * add: bsddialog_refresh() for utility terminal mode options. 171 * add: conf.date.format="d/m/y"|"m/d/y"|"y/m/d" to customize 172 bsddialog_datebox() UI (boxes) with a date format. 173 * add: 'const char *end' to bsddialog_gauge(). 174 * add: draw focus on the shortcut-key-selected button at exit. 175 * add: escapes for conf.text.highlight \Zd, \Zk, \Zs, \ZD, \ZK, \ZS. 176 * add: other theme flags. 177 - BSDDIALOG_BLINK. 178 - BSDDIALOG_HALFBRIGHT. 179 - BSDDIALOG_HIGHLIGHT. 180 * add: generic buttons. 181 - conf.button.left1_label, BSDDIALOG_LEFT1 return value. 182 - conf.button.left2_label, BSDDIALOG_LEFT2 return value. 183 - conf.button.left3_label, BSDDIALOG_LEFT3 return value. 184 - conf.button.right1.label, BSDDIALOG_RIGHT1 return value. 185 - conf.button.right2.label, BSDDIALOG_RIGHT2 return value. 186 - conf.button.right3.label, BSDDIALOG_RIGHT3 return value. 187 * add: unused bsddialog_menugroup.min_on for future features. 188 * add: theme.menu.f_prefixcolor and theme.menu.prefixcolor. 189 * improve: check (when possible) API pointers. 190 * improve: circolar buttons with left and right keys for msgbox, yesno, 191 menus, rangebox and pause. 192 * improve: bsddialog_textbox() handles conf.buttons. 193 * improve: bsddialog_datebox() a box change affects the others as well. 194 * improve: bsddialog_geterror() with fmt strings. 195 * change: API NULL strings handled like "", except gauge *sep and *end. 196 * change: menus and form less restrictive with text, hide text with 197 little screens (same behavior as other dialogs). 198 * change: mixedgauge BSDDIALOG_MG_BLANK does not draw minibar but prints 199 minilabel. The change allows mixedgauge to add sections. To restore 200 the previous behavior setting minilabel to "". 201 * change: check/set bsddialog_gauge() perc max 100. 202 * change: check/set bsddialog_mixedgauge() mainperc max 100. 203 * change: conf.menu.no_name and conf.menu.no_desc mutually exclusive. 204 * change: bsddialog_pause() sec -> *sec to know remaining time at exit. 205 * change: add *focusitem to bsddialog_form() like menus. 206 * change: "pointer" values are always set except when BSDDIALOG_ERROR 207 occurs. Examples *yy/*mm/*ss, rangebox *value. 208 - delete conf.menu.on_without_ok. 209 - delete conf.form.value_without_ok. 210 * rename: conf.text.highlight -> conf.text.escape. 211 * rename: theme.menu.namesepcolor -> theme.menu.sepnamecolor. 212 * rename: theme.menu.descsepcolor -> theme.menu.sepdesccolor. 213 * fix: bsddialog_pause() elevation bar after resize. 214 * fix: bsddialog_textbox() key '0'. 215 * fix: timebox.c checksize (boxes width). 216 * fix: extend menurows after shrink and enlarge. 217 * fix: menu pad and form pad "re-expansion" after shrink and enlarge. 218 * fix: shadow top-left corner (trick wresize() before wmove()). 219 * fix: increment bsddialog_total_progview size for more general use. 220 * delete: BSDDIALOG_THEME_BSDDIALOG (partially implemented). 221 * delete: conf.button.generic1_label (for new conf.button.right1_label). 222 * delete: BSDDIALOG_GENERIC1 return value (new BSDDIALOG_RIGHT1). 223 * delete: conf.button.generic2_label (for new conf.button.right2_label). 224 * delete: BSDDIALOG_GENERIC2 return value (new BSDDIALOG_RIGHT2). 225 * delete: bsddialog_clearterminal(), replaced by bsddialog_clear(y). 226 * refactor: internal implementation. 227 - add: internal structures to represent components. 228 - merge: (when possible) dialogs autosize. 229 - merge: (when possible) dialogs checksize. 230 - merge: for each dialog "build" with "update" -> <dialog>_redraw(). 231 - merge: new_dialog() with update_dialog() -> draw_dialog(). 232 - merge: infobox.c with messagebox.c (delete infobox.c) 233 - merge: bsddialog_datebox() + bsddialog_calendar() -> datebox.c 234 - change: flat and blackwhite real themes, 3d adapted from flat. 235 - improve: replace wrefresh() -> wnoutrefresh()/doupdate(). 236 - improve: replace prefresh() -> pnoutrefresh()/doupdate(). 237 - improve: menu split code to build private items. 238 - improve: form split code to build private items. 239 - delete: -Wno-implicit-fallthrough. 240 241 2422023-06-12 Version 0.4.2 243 244 Library: 245 * fix: compile error with aarch64-gcc12 for "\Z[0-7]" check; 246 https://gitlab.com/alfix/bsddialog/-/issues/5. 247 * fix: BSDDIALOG_FIELDCURSOREND with multiple items 248 (warning aarch64-gcc12). 249 250 2512023-01-02 Version 0.4.1 252 253 Utility: 254 * fix: default space separator menus output, except if --separator " ". 255 * rename: GNUMakefile to GNUmakefile to simplify linux build. 256 Thanks to https://gitlab.com/alfix/bsddialog/-/merge_requests/2. 257 258 Library: 259 * fix: t.dialog.linelowercolor no bold-black, some terminal draws grey. 260 * fix: text wrapping (actual string length) with --colors. 261 * rename: GNUMakefile to GNUmakefile to simplify linux build. 262 Thanks to https://gitlab.com/alfix/bsddialog/-/merge_requests/2. 263 264 2652022-09-24 Version 0.4 266 267 Utility: 268 * add: --normal-screen to set normal mode. 269 * add: --alternate-screen to set alternate mode. 270 * add: --keep-tite as --alternate-screen alias. 271 * add: --and-dialog to build other dialogs. 272 * add: --and-widget as --and-dialog alias. 273 * add: --no-names (--no-tags becomes alias). 274 * add: --no-descriptions (--no-items becomes alias). 275 * add: --help-print-name (--help-tags becomes alias). 276 * add: --item-bottom-desc (--item-help becomes alias). 277 * add: --cr-wrap (was partially implemented) to keep '\n' with "\n". 278 * add: --text-unchanged to avoid default modification. 279 * add: --tab-escape to enable "\t" in text. 280 * add: --clear-screen to clear the screen. 281 * add: --clear-dialog to clear the dialog (was --clear). 282 * add: --calendar dialog to select a date. 283 * add: DIAGNOSTICS messages for bad arguments number. 284 * add: DIAGNOSTICS messages for missing and unexpected options. 285 * change: --clear becomes alias for --clear-screen. 286 * change: --print-maxsize format output. 287 * change: --menu, --radiolist, --checklist and --treeview output. 288 - no printed items with Cancel or ESC. 289 - --separator prints <sepstr> before each item except HELP. 290 - --separator and --separate-output print <sepstr> after each item. 291 - quoted item name/desc only when needed. 292 - --menu avoids to print selected item after focused HELP item. 293 * change: text default modification. 294 - without a "\n": '\t' -> space, '\n' -> '\n', trim spaces. 295 - with a "\n": '\t' -> space, '\n' -> space, "\n" -> '\n', no trim. 296 - delete '\n' after "\n" (also with --cr-wrap). 297 * change: --datebox input and output format yy/mm/dd -> dd/mm/yy. 298 * delete: --no-collapse (partially implemented). 299 * delete: --no-nl-expand (partially implemented). 300 * delete: --trim (partially implemented). 301 302 Library: 303 * add: bsddialog_msgbox() HOME, END, PPAGE and NPAGE keys. 304 * add: bsddialog_yesno() HOME, END, PPAGE and NPAGE keys. 305 * add: bsddialog_menu() SPACE key (equivalent to ENTER). 306 * add: bsddialog_calendar() to select a date. 307 * change: rename enum bsddialog_grouptype -> enum bsddialog_menutype. 308 * change: fixed-menurows becomes at most menurows (depending on text). 309 * change: fixed-rows becomes at most rows, min(rows, screenH - shadow). 310 * change: fixed-cols becomes at most cols, min(cols, screenW - shadow). 311 * delete: undocumented internal bsddialog_menuitem.depth factor (was 2). 312 313 3142022-08-29 Version 0.3 315 316 Utility: 317 * add: --textbox accepts options for the first button. 318 * add: --columns-per-row for text autosizing. 319 * add: --load-theme to read and set a custom theme at runtime. 320 * add: --save-theme to save current theme. 321 * add: --bikeshed for random settings. 322 * add: --switch-buttons to enable buttons/input widgets focus switching. 323 Available for: --form, --inputbox, --mixedform, --passwordform, 324 --passwordbox, --timebox and --datebox. 325 * change: rename --esc-cancelvalue to --esc-return-cancel. 326 * change: form field value is printed like multibyte charachter string, 327 previously widechar string. 328 * change: --timebox output with zero padding. 329 * change: --datebox output mm and dd with zero padding. 330 * fix: --hline with empty string. 331 * fix: avoid to overlay the backtitle by setting a top margin. 332 * fix: avoid to overlay down shadow with menus and forms bottomdesc 333 by setting a down margin. 334 * fix: --form read-only flag with multiple fields. 335 336 Library: 337 * add: conf.auto_topmargin and conf.auto_downmargin. 338 * add: bsddialog_textbox() accepts conf.button.* for the first button. 339 * add: bsddialog_textbox() arrows and percentage. 340 * add: conf.text.cols_per_row to set a ratio for text autosizing. 341 * add: timebox and datebox arrows and focus background for boxes. 342 * add: timebox and datebox UP key to switch focus. 343 * add: bsddialog_init_notheme() in bsddialog.h. 344 * add: bsddialog_hascolors() in bsddialog_theme.h. 345 * add: theme.form.bottomdesccolor and theme.menu.bottomdesccolor. 346 * add: conf.button.always_active to disable buttons/input-boxes switch. 347 * add: dynamic buttons margin. 348 - add: theme.button.minmargin and theme.button.maxmargin. 349 - delete: theme.button.hmargin. 350 * add: Unicode. 351 - UI handles multicolumn charachters: backtitle, title, 352 text (word wrapping, autosizing), menus (shortcuts, name, desc), 353 forms (label, field), textbox, mixedgauge (minilabel), 354 buttons (label, shortcuts), bottomtitle. 355 - API handles char* arguments like multibyte charachter string, 356 depending on the current locale. 357 - Internally wide charachters are used to get input from keyboard 358 and to adapt word wrapping and dynamic text autosizing to 359 muticolumn charachters. 360 * refactoring: (rewrite) form.c. 361 - delete: libformw dep implementing its features from scratch. 362 - delete: maxvaluelen >= valuelen constraint. 363 - delete: conf.form.enable_wchar, get always unicode (wchar) input. 364 - add: KEY_HOME, KEY_END, KEY_PPAGE, KEY_NPAGE keys in field. 365 - add: KEY_UP can move focus from buttons to fields. 366 - add: KEY_DOWN can move focus from item to buttons, if nitem is 1. 367 - add: conf.form.securembch secure multibyte charachter. 368 - add: BSDDIALOG_FIELDNOCOLOR for formitem.flags. 369 - add: BSDDIALOG_FIELDCURSOREND for formitem.flags. 370 - add: BSDDIALOG_FIELDEXTEND for formitem.flags. 371 - add: BSDDIALOG_FIELDSINGLEBYTE for formitem.flags. 372 - add: resizing and refresh after KEY_RESIZE (SIGWINCH). 373 - add: items scrolling. 374 - add: conf.form.value_wchar, value is wchar_t* instead of MB-char*. 375 - add: formheight autosizing. 376 - add: dynamic item position. 377 * fix: bsddialog_gauge() with fd < 0. 378 * fix: bsddialog_gauge() refresh new text. 379 * fix: internal segmentation fault with disabled shadow. 380 * fix: center position without shadow. 381 * fix: bsddialog_infobox() with zero text length. 382 * fix: text wrapping with more than 1024 words. 383 * fix: rename theme.shadow.h to theme.shadow.y. 384 * fix: rename theme.shadow.w to theme.shadow.x. 385 * fix: menurows autosize with fixed rows improving text_size(). 386 * fix: messagebox.c scrolling and checksize without text. 387 388 3892022-03-02 Version 0.2 390 391 Utility: 392 * add: (this) CHANGELOG. 393 * add: "menus" print item with focus (except with OK and ERROR). 394 * add: pause.sh example. 395 * add: timebox.sh example. 396 * change: --theme name "default" -> "flat". 397 * delete: treeview.sh example. 398 * fix: --separate-output does not quote (except with --quoted). 399 * fix: --datebox and --date-format month in output. 400 * improve: examples handle exit status. 401 402 Library: 403 * add: conf.form.enable_wchar for wide characters in bsddialog_form(). 404 * add: theme.menu.f_selectorcolor. 405 * add: formw.c example. 406 * change: move conf.f1_file and conf.f1_message in conf.key. 407 * change: theme.button.[left|right]ch -> theme.button.[left|right]delim. 408 * change: theme.button.space -> theme.button.hmargin. 409 * change: theme.menu.arrowcolor -> theme.dialog.arrowcolor. 410 * change: internal bsddialog_menuitem.depth factor 4 -> 2. 411 * fix: disable HOME, PPAGE, END and NPAGE keys in bsddialog_form(). 412 * fix: visible cursor for timebox.c and form.c in VM VirtualBox. 413 * fix: mixedlist, center position of separator with big pad. 414 * fix: timebox and datebox set values only with BSDDIALOG_OK. 415 * fix: menurows autosize with fullscreen. 416 * fix: bar color with 0%. 417 * fix: bar label position. 418 * improve: timebox and datebox navigation (keys, buttons and shortcuts). 419 * improve: "menus" colors for accessibility. 420 421 4222022-01-27 Version 0.1 423 424 * Options: --ascii-lines, --backtitle <backtitle>, --begin-x <x>, 425 --begin-y <y>, --cancel-label <label>, --clear, --colors, --cr-wrap, 426 --date-format <format>, --defaultno, --default-button <label>, 427 --default-no, --default-item <name>, --disable-esc, 428 --esc-cancelvalue, --exit-label <label>, --extra-button, 429 --extra-label <label>, --generic-button1 <label>, 430 --generic-button2 <label>, --help, --help-button, 431 --help-label <label>, --help-status, --help-tags, 432 --hfile <filename>, --hline <string>, --hmsg <string>, --ignore, 433 --insecure, --item-depth, --item-help, --items-prefix, 434 --max-input <size>, --no-cancel, --nocancel, --no-collapse, 435 --no-items, --no-label <label>, --no-lines, --no-nl-expand, 436 --no-ok, --nook, --no-shadow, --no-tags, --ok-label <label>, 437 --output-fd <fd>, --output-separator <sep>, --print-maxsize, 438 --print-size, --print-version, --quoted, --separate-output, 439 --separator <sep>, --shadow, --single-quoted, --sleep <secs>, 440 --stderr, --stdout, --tab-len <spaces>, 441 --theme <blackwhite|bsddialog|default|dialog>, 442 --time-format <format>, --title <title>, --trim, --version, 443 --yes-label <label>. 444 * Dialogs: --checklist, --datebox, --form, --gauge, --infobox, 445 --inputbox, --menu, --mixedform, --mixedgauge, --msgbox, 446 --passwordbox, --passwordform, --pause, --radiolist, --rangebox, 447 --textbox, --timebox, --treeview, --yesno. 448 * Manuals: bsddialog.1, bsddialog.3. 449