From nobody Thu May 16 13:35:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VgB184XjVz5LH44; Thu, 16 May 2024 13:35:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VgB1843t8z3xFK; Thu, 16 May 2024 13:35:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715866524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aHhQPGRf/ZDCjy/JvkR7xH2g0RTbivq31BfTQK6FdSY=; b=JUHGG31JkH+dgtLmty4aEaY6K9Cmvdo9VoXeJ/Wl1EaKj0UMldLIytrX2iPIBCCKigx9iB CWRfDZtQl2LCH06dma/BVFeI8Cq/yBLVf3Eg6idWNQ3TvUf7gEApnnoZAaymIq/N5ccr8+ 6s0WBo+lPT7IVAdVP1qo8BIrvIbfLpn6TUO1Q9pBNUstRv4DsxR8CdsjBNEp1M6K+E8dsA lFVSq31yaTyRXcHYqGASr7iPqrQGwCzuXHhu87BGLrHRnxbvHQwzcCSqBZyYxEYmORa0qX B1i7h7yX1u4EEVp9bQidzvi9sW7D+t+ITvQteWw0RIhGZTKjo6QbJYsxZDbcCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715866524; a=rsa-sha256; cv=none; b=lwa5BSFa341uhTfhnKkJoVGZPN6GcPTVGcbGAA1MpNo1pEu1nykcCNmc9xfeBTdhbS4duo KG86GCbtjrXrUlfK8WNZeqL1yA7FZEHfmkqNaVApd/9PMatTFPg7eAsAzd5/Zqz/VqGqg+ Ax9B3n3KsVFIwiGRebDz1LZBpoubOj/CQZlkkIDcXLCnTwb4brulzx27QB3tQjYZQKxUyY owxoQR0asFk74TffuZlzJehw0QLx/1/saIyUZM5GQrPRIJGc8chOJkqtFMxQiFkag4Twih LVkE0kWR7TSSkvbtQMn7BYcdxM1MP5zl3o4oDtDaJOGqn6TzrNzhCE/AZn7uxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715866524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aHhQPGRf/ZDCjy/JvkR7xH2g0RTbivq31BfTQK6FdSY=; b=x17ap7CdIvOUSCXknRqjU2TfHTWaukYXOPTsSREpNY3tWWUohWTgN6BCxNFdlRQoKZt0B1 RR8vFiXEIUatSX/vruRCYMDD6m7iAoepHeAG7BoXPbp63b/WO0UQp9RoGERYBTj1hEAfpt zfehPtxzpZvi18VQ0CLcvZxbU2GbHVkJmjYw3Vs5I6/3+bi2UQahSWLGrW1FYGGjVLVc6/ MULHWkwWkbq14Z1OuqOUBXD5rPbP2Ik5DRmjMfjvkbgeQNuuesJQFPGyioUxwA7foy9+43 kesxthFaXo6riw+71Bpnon40k2aPXR7J3e4ogoashGsHBj7vDLqhlbsgYk2BXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VgB183gD1z11Rd; Thu, 16 May 2024 13:35:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44GDZOon063475; Thu, 16 May 2024 13:35:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44GDZOqh063472; Thu, 16 May 2024 13:35:24 GMT (envelope-from git) Date: Thu, 16 May 2024 13:35:24 GMT Message-Id: <202405161335.44GDZOqh063472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfonso S. Siciliano" Subject: git: a6d8be451f62 - main - contrib/bsddialog: Import version 1.0.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asiciliano X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a6d8be451f62d425b71a4874f7d4e133b9fb393c Auto-Submitted: auto-generated The branch main has been updated by asiciliano: URL: https://cgit.FreeBSD.org/src/commit/?id=a6d8be451f62d425b71a4874f7d4e133b9fb393c commit a6d8be451f62d425b71a4874f7d4e133b9fb393c Merge: abb1a1340e3f be8846bd9e06 Author: Alfonso S. Siciliano AuthorDate: 2024-05-16 13:32:56 +0000 Commit: Alfonso S. Siciliano CommitDate: 2024-05-16 13:32:56 +0000 contrib/bsddialog: Import version 1.0.2 Implicitly import also 1.0.1, both versions are for fixing and feature requests. Fixing: Change --mixedform behavior to fix a bsdinstall fault avoiding to change the command line in wlanconfig. Feature requests: * Add keys to navigate menus. * Add key to redraw dialogs. * Avoid to handle env NCURSES_NO_UTF8_ACS in PuTTY. See '2024-04-11 Version 1.0.2' and '2023-11-16 Version 1.0.1' in /usr/src/contrib/bsddialog/CHANGELOG for more detailed information. PR: 274472 Differential Revision: D42380 Merge commit 'be8846bd9e069f4a6bea3d769005bea96cf43990' contrib/bsddialog/CHANGELOG | 32 +++++++ contrib/bsddialog/LICENSE | 2 +- contrib/bsddialog/Makefile | 12 +-- contrib/bsddialog/README.md | 27 ++++-- contrib/bsddialog/examples_library/gauge.c | 2 +- contrib/bsddialog/examples_library/mixedgauge.c | 2 +- contrib/bsddialog/lib/barbox.c | 86 ++++++++++++++---- contrib/bsddialog/lib/bsddialog.3 | 37 +++++--- contrib/bsddialog/lib/bsddialog.h | 4 +- contrib/bsddialog/lib/datebox.c | 53 ++++++++--- contrib/bsddialog/lib/formbox.c | 43 ++++----- contrib/bsddialog/lib/lib_util.c | 111 +++++++++++++----------- contrib/bsddialog/lib/lib_util.h | 9 +- contrib/bsddialog/lib/libbsddialog.c | 9 +- contrib/bsddialog/lib/menubox.c | 25 +++--- contrib/bsddialog/lib/messagebox.c | 15 ++-- contrib/bsddialog/lib/textbox.c | 34 ++++---- contrib/bsddialog/lib/timebox.c | 17 +++- contrib/bsddialog/utility/bsddialog.1 | 83 ++++++++++++------ contrib/bsddialog/utility/bsddialog.c | 6 +- contrib/bsddialog/utility/util_builders.c | 72 +++++++++++---- contrib/bsddialog/utility/util_theme.c | 12 +-- 22 files changed, 469 insertions(+), 224 deletions(-) diff --cc contrib/bsddialog/Makefile index 884cfa1b3e60,000000000000..e6ec9988c59d mode 100644,000000..100644 --- a/contrib/bsddialog/Makefile +++ b/contrib/bsddialog/Makefile @@@ -1,38 -1,0 +1,38 @@@ +# PUBLIC DOMAIN - NO WARRANTY, see: +# +# +# Written in 2023 by Alfonso Sabato Siciliano + - OUTPUT = bsddialog - export VERSION=1.0 ++OUTPUT = bsddialog ++export VERSION=1.0.2 +.CURDIR ?= ${CURDIR} +LIBPATH = ${.CURDIR}/lib +LIBBSDDIALOG = ${LIBPATH}/libbsddialog.so +UTILITYPATH = ${.CURDIR}/utility + +RM= rm -f +LN = ln -s -f + - ### cli options ### - # port/pkg Makefile: 'MAKE_ARGS = -DNORPATH' ++### command-line options ### ++# FreeBSD port Makefile: 'MAKE_ARGS = -DNORPATH' +NORPATH ?= +export DISABLERPATH=${NORPATH} - # `make -DDEBUG` - # `gmake DEBUG=1` ++# Debug: `make -DDEBUG` or `gmake DEBUG=1` +DEBUG ?= +export ENABLEDEBUG=${DEBUG} ++################### + +all : ${OUTPUT} + +${OUTPUT}: ${LIBBSDDIALOG} + ${MAKE} -C ${UTILITYPATH} LIBPATH=${LIBPATH} + ${LN} ${UTILITYPATH}/${OUTPUT} ${.CURDIR}/${OUTPUT} + +${LIBBSDDIALOG}: + ${MAKE} -C ${LIBPATH} + +clean: + ${MAKE} -C ${LIBPATH} clean + ${MAKE} -C ${UTILITYPATH} clean + ${RM} ${OUTPUT} *.core + diff --cc contrib/bsddialog/README.md index f4846ec07745,000000000000..a902f7fada7a mode 100644,000000..100644 --- a/contrib/bsddialog/README.md +++ b/contrib/bsddialog/README.md @@@ -1,131 -1,0 +1,140 @@@ - # BSDDialog 1.0 ++# BSDDialog 1.0.2 + +This project provides **bsddialog** and **libbsddialog**, an utility +and a library to build scripts and tools with TUI dialogs and widgets. + + +## Demo + +[Screenshots](https://www.flickr.com/photos/alfonsosiciliano/albums/72157720215006074). + + +## Getting Started + +FreeBSD and Linux: + +``` +% git clone https://gitlab.com/alfix/bsddialog.git +% cd bsddialog +% make +% ./bsddialog --msgbox "Hello World!" 8 20 +``` + +Output: + +![screenshot](screenshot.png) + + +## Utility + +**Dialogs:** + +--calendar, --checklist, --datebox, --form, --gauge, --infobox, --inputbox, +--menu, --mixedform, --mixedgauge, --msgbox, --passwordbox, --passwordform, +--pause, --radiolist, --rangebox, --textbox, --timebox, --treeview, --yesno. + +**Manual** + + - [bsddialog(1)](https://alfonsosiciliano.gitlab.io/posts/2022-01-26-manual-bsddialog.html) + + +**Examples**: + +``` +% ./bsddialog --backtitle "TITLE" --title msgbox --msgbox "Hello World!" 5 30 +% ./bsddialog --theme blackwhite --title msgbox --msgbox "Hello World!" 5 30 +% ./bsddialog --begin-y 2 --default-no --title yesno --yesno "Hello World!" 5 30 +% ./bsddialog --ascii-lines --pause "Hello World!" 8 50 10 +% ./bsddialog --checklist "Space to select" 0 0 0 Name1 Desc1 off Name2 Desc2 on +% ./bsddialog --title yesno --hline "bsddialog" --yesno "Hello World!" 5 25 +% ./bsddialog --extra-button --help-button --yesno "Hello World!" 0 0 +``` + +and [Examples](https://gitlab.com/alfix/bsddialog/-/tree/main/examples_utility) +in the _Public Domain_ to build new projects: +``` +% sh ./examples_utility/calendar.sh +% sh ./examples_utility/checklist.sh +% sh ./examples_utility/datebox.sh +% sh ./examples_utility/form.sh +% sh ./examples_utility/gauge.sh +% sh ./examples_utility/infobox.sh +% sh ./examples_utility/inputbox.sh +% sh ./examples_utility/menu.sh +% sh ./examples_utility/mixedform.sh +% sh ./examples_utility/mixedgauge.sh +% sh ./examples_utility/msgbox.sh +% sh ./examples_utility/passwordbox.sh +% sh ./examples_utility/passwordform.sh +% sh ./examples_utility/pause.sh +% sh ./examples_utility/radiolist.sh +% sh ./examples_utility/rangebox.sh +% sh ./examples_utility/timebox.sh +% sh ./examples_utility/yesno.sh +``` + +## Library + +**API** + + - [bsddialog.h](https://gitlab.com/alfix/bsddialog/-/blob/main/lib/bsddialog.h) + - [bsddialog\_theme.h](https://gitlab.com/alfix/bsddialog/-/blob/main/lib/bsddialog_theme.h) + + +**Manual** + + - [bsddialog(3)](https://alfonsosiciliano.gitlab.io/posts/2022-01-15-manual-libbsddialog.html) + + +**Examples**: + +[Examples](https://gitlab.com/alfix/bsddialog/-/tree/main/examples_library) +in the _Public Domain_ to build new projects: +``` +% cd examples_library +% sh compile +% ./calendar +% ./checklist +% ./datebox +% ./form +% ./gauge +% ./infobox +% ./menu +% ./mixedgauge +% ./mixedlist +% ./msgbox +% ./pause +% ./radiolist +% ./rangebox +% ./theme +% ./timebox +% ./yesno +``` + + +## TODO and Ideas + - - menubar feature - - key callback - - Right-To-Left text ++ - menubar feature. ++ - key callback. ++ - Right-To-Left text. + - some terminal does not hide the cursor, move it bottom-right before to getch. - - refactor backtitle: multiline, conf.backtitle, WINDOW \*dialog.backtitle. - - refactor bottomdesc: WINDOW \*dialog.bottomdesc -> fix expandig screen. - - accessibility https://wiki.freebsd.org/Accessibility/Wishlist/Base ++ - refactor backtitle: add WINDOW \*dialog.backtitle for multiline and fix expanding screen. ++ - refactor bottomdesc: add WINDOW \*dialog.bottomdesc to fix expandig screen. ++ - accessibility https://wiki.freebsd.org/Accessibility/Wishlist/Base. + - add bool conf.menu.depthlines. + - implement custom getopt\_long(). + - refactor/redesign gauge(). + - improve grey lines expanding terminal (maybe redrawwin() in hide\_dialog()). + - more restrictive strtol() and strtoul(). + - implement global buttons handler. - - add/move external tutorial. - - implement menutype.min_on. ++ - doc: external tutorial, theming guide. ++ - implement menutype.min\_on. ++ - improve refresh at startup, avoid dialog refresh before drawing text. ++ - add debug API: bsddialog\_debug(y,x,refresh,"fmt",...). ++ - add mouse support. ++ - use alarm(2) for bsddialog\_pause. ++ - delete form fieldlen constraint, hide or truncate long field in little screens. ++ - improve --inputbox autosizing, consider also input length. ++ - fix --form "" 0 0 0 Label 1 0 Init 1 12 0 0 (with 0 editable field). ++ - fix --mixedform "" 0 0 0 Label 1 0 Init 1 12 0 0 2 (with 0 editable field). ++ - add *text* customization to --hmsg *help-message*