From nobody Mon May 27 19:36:31 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 4Vp5Vm2zxFz5Lnxv; Mon, 27 May 2024 19:36:32 +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 4Vp5Vm0fm6z4j9x; Mon, 27 May 2024 19:36:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716838592; 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=Fz/+2YUF1TTvPb6Yj0q7VLuFupz5IdmUiWCaZYFZ70g=; b=oTQ+3OyF7aH6GOwqIsDOE7k8Nviuz47dUhXVNVRWeCyFRaH47rt8JwJBogQ5D7V8Rsq6MA oNAhcyUyuPCxKFILDA2ymWU1lwlSH+RvhP+Rmg1QMWtGACdaIEHp0HAthY6CsbbTcgYwHH yF90fI413yqPKYGfYupSP7Lv4BI/HjohE/2LZKEDDUFhTUohjf7Eb5TZ4NXJ1gyhoL2J23 VKL53XumAvR+SToFp5c6EFE3uFuahhlp3CaC9DpLE4gHjroW+ucGN9lRiiG6wt0psM2MUw w97hcUhOnwUsRi5hBmrDij6xSGTDH3K9Y4fKQ/jE2WjbZGFsQFtkhaazCvqhZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716838592; a=rsa-sha256; cv=none; b=Eu8x2Nii/bQ7cf81SlrXcqwJbbohdoFgdnhROJzH1TcVGHbkUnkpWCEjW2BF16xeE2LDCI ymY3I3/B0MKyeWpUTfxg/ifxrIYYLERqTZ01rHfr2JSysCUZQpT9THB4PW532ND3cP7O7F FeexW7N7GaK5jMowNOBfJFZ2JZ/nN9OSZcCot9PDV19wAO3yZAcaw3fAwoaLxYkRhFGzSn xJ9nvrf+ap2j7IUpURow5YC7R/YKH2uYs225Zu2NM9NbB9XAthck7PFNErML83JMx+Zp9A ciXyUh/mAo9AMwMj6g21buc+XV17vmMrx55adIyzFg9dlpHJD/GlJUvRs/t7jg== 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=1716838592; 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=Fz/+2YUF1TTvPb6Yj0q7VLuFupz5IdmUiWCaZYFZ70g=; b=OOAjg32pce9t458/DmEQp3C+5N9QYttI5aeSkH1d+fRmmTU8/hdcu5y7pj8svi7m5dzRF8 S9xqnis8zYgbUowxhreuoSp+4iyIZBEVIUiD+qzt28qVGcPnu2y3Xr4Q9VG/sfFJQqDX+r qDaPguw5XIcnGqarF9RXOz78/JDCz7OPITXozX8SyEJ3DUhH7ShSJJExjduJnoRx7Gp+mV +Iu0Xr3xFuWFpImyGrm4PzJPn1E7BuTU6AQe4rG655aJ64cOXnIQuobdVXf3T0IKCekf3I 1jtl6OSywtl5lh5p9hf2TqlkrWnT7jx4zXZhV4LMRTce3MDkLOyMbypc+CSg7Q== 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 4Vp5Vl65Dbzxh9; Mon, 27 May 2024 19:36:31 +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 44RJaV3F016664; Mon, 27 May 2024 19:36:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44RJaV8e016661; Mon, 27 May 2024 19:36:31 GMT (envelope-from git) Date: Mon, 27 May 2024 19:36:31 GMT Message-Id: <202405271936.44RJaV8e016661@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: 079f60541fdb - main - contrib/bsddialog: Import version 1.0.3 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: 079f60541fdb363215beb98583e76f8c0729449d Auto-Submitted: auto-generated The branch main has been updated by asiciliano: URL: https://cgit.FreeBSD.org/src/commit/?id=079f60541fdb363215beb98583e76f8c0729449d commit 079f60541fdb363215beb98583e76f8c0729449d Merge: c52ca7dd0906 813f3dc7b302 Author: Alfonso S. Siciliano AuthorDate: 2024-05-27 19:32:01 +0000 Commit: Alfonso S. Siciliano CommitDate: 2024-05-27 19:32:01 +0000 contrib/bsddialog: Import version 1.0.3 Change --mixedform output to adapt to bsdinstall restoring dialog(1) behavior. Avoid to print the field value to output if is read-only (less than or equal to zero). This fixes passwords in wlanconfig, avoiding to print also SSID. To note --mixedform continues to print field value if is read-only. This avoids breaking netconfig and netconfig_ipv6. See /usr/src/contrib/bsddialog/CHANGELOG '2024-05-27 Version 1.0.3' for more detailed information. Reported by: garga (redo branch main moved forward) Merge commit '813f3dc7b302324a361326c2583f37b002100968' into redo-bsddialog-1.0.3 contrib/bsddialog/CHANGELOG | 9 +++++++++ contrib/bsddialog/Makefile | 2 +- contrib/bsddialog/README.md | 4 +++- contrib/bsddialog/lib/bsddialog.h | 2 +- contrib/bsddialog/utility/bsddialog.1 | 7 ++++++- contrib/bsddialog/utility/util_builders.c | 7 ++++++- 6 files changed, 26 insertions(+), 5 deletions(-) diff --cc contrib/bsddialog/Makefile index e6ec9988c59d,000000000000..f1b2da675f9e 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.2 ++export VERSION=1.0.3 +.CURDIR ?= ${CURDIR} +LIBPATH = ${.CURDIR}/lib +LIBBSDDIALOG = ${LIBPATH}/libbsddialog.so +UTILITYPATH = ${.CURDIR}/utility + +RM= rm -f +LN = ln -s -f + +### command-line options ### +# FreeBSD port Makefile: 'MAKE_ARGS = -DNORPATH' +NORPATH ?= +export DISABLERPATH=${NORPATH} +# 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 a902f7fada7a,000000000000..f984b488b232 mode 100644,000000..100644 --- a/contrib/bsddialog/README.md +++ b/contrib/bsddialog/README.md @@@ -1,140 -1,0 +1,142 @@@ - # BSDDialog 1.0.2 ++# BSDDialog 1.0.3 + +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. + - some terminal does not hide the cursor, move it bottom-right before to getch. + - 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. + - 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* ++ - check --passwordform *fieldlen* like --form and --mixedform. ++