From nobody Thu Oct 9 15:41:07 2025 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 4cjDcM495zz6Bdm5; Thu, 09 Oct 2025 15:41:07 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cjDcM3MDLz3vg1; Thu, 09 Oct 2025 15:41:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760024467; 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=UbUJYAJ93DcW8+2Wcxz9Zw9GRkQbQ8zwVzWG8gpVg2c=; b=Y6ZXWHyMyUeGiQ+rnO+l49/0JIgTln8xOx4Fv+DR/Aa64Rt9iwYKV7Hp7w6ppuvJURnZYW UY+7+tsRatUu/dkA2JB9bW7ufXqFt6DnjfG0tZkVKMFF4dCayWdOgXicyGoQonuelTbxD/ Ww9pswPNrD46VLWiED5pisA37HS0+5oWdaohzpSTD08RDoKTQibPcKnLIeDaFLDTeCHHoD Et/aqZjyjimxT4bY65Ib1mT3Ufa2VmaGndtl0qEg7XQ/087ixtfQ9qXmX3C0xOZ4dSEOl/ OS1CFGHUDU3+P6Za26z3acfmGFEC5Doekd1DPSSUO+QxAh9UmjIrcRp71rNZGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760024467; 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=UbUJYAJ93DcW8+2Wcxz9Zw9GRkQbQ8zwVzWG8gpVg2c=; b=jE6/7xnlZx8qRGT5ehFyWUeysvLrp60tEYg7I+lEj1vYk40Ce7Lb960VyRFZXqRzgcslPr IfP+eHHKJ6gSVFQoXQHVwJk8B9uZEJxxBptd8EcgsuQ4dFCKra3Hqhg5RASQMHmkE5uymq Ikr3Q+ZgCxSW0LXr/saaBOv6A3v9SYDe5lMGS4IRuGHQM+i3Jyb6F/Z5sei/bSlnIwri09 XQ1BYLPwC8gsrELrvkV8jv6pJOFKchOS8qkh5LRiY4U8/Q5QaPV9z3yNAwl5enb092ySTK wUyhrym60H4tcUlsZ6A9oONPdePAmc9l0fUqulsIaVBRwe/a0iOA3ulRm6f5fA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760024467; a=rsa-sha256; cv=none; b=wY/k6arO9ntSkGYIQLzCbHXuuWZnhLTAJnSqr1lhBoeW+ZfD2YOV9fdwuRx9GjokMsEa6q WSgA8c1FFSRghcFZGFUZdJI/Vu6u7NdF1eZg1Gdsf8hwu78gy9PgYhiMh2Z86UostWliGw +4cvzJFlfJcSrEN9Og9p9qTmXgMz4WfJj5jzFl4Z8suhuWN3eP/87xrgL5VHpvkiTFZtWa jFbENdTPqFaB49D/OQDCLfu9KmSXUzsGomPGNfWlCFMslvnGP3K3VZtpdVh9SVQC3ZlDBC uHRXEl0pboLa6yM45Kra26bHnVB4GfOuhKBLniOWZzemaZ5EAsyTQbWiZfM58A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cjDcM2pPBz83n; Thu, 09 Oct 2025 15:41:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 599Ff7H5026384; Thu, 9 Oct 2025 15:41:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 599Ff7oF026380; Thu, 9 Oct 2025 15:41:07 GMT (envelope-from git) Date: Thu, 9 Oct 2025 15:41:07 GMT Message-Id: <202510091541.599Ff7oF026380@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: 3e42d7194bdc - main - contrib/bsddialog: Import version 1.0.5 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: 3e42d7194bdcd4fbfd781518258f919d6ac803d3 Auto-Submitted: auto-generated The branch main has been updated by asiciliano: URL: https://cgit.FreeBSD.org/src/commit/?id=3e42d7194bdcd4fbfd781518258f919d6ac803d3 commit 3e42d7194bdcd4fbfd781518258f919d6ac803d3 Merge: a28b44ddc348 653f765f05b8 Author: Alfonso S. Siciliano AuthorDate: 2025-10-09 15:39:10 +0000 Commit: Alfonso S. Siciliano CommitDate: 2025-10-09 15:39:10 +0000 contrib/bsddialog: Import version 1.0.5 Version for change and feature requests. * Improve documentation for --alternate-screen and --normal-screen. Request: https://bugs.freebsd.org/285459. (This PR is not about bsddialog itself but is used as an example for an official FreeBSD documentation request.) * Reduce the number of screen refreshes to improve performance over a 115200 UART connection. Request: https://gitlab.com/alfix/bsddialog/-/issues/8. * Change textbox buttons to return distinct values (previously always returned OK). Request: https://reviews.freebsd.org/D48668; already committed in contrib/ 96a241a35905078bdc5d20bf25943cdb67758dea * Change forms navigation key behavior for ENTER and TAB. Request: https://bugs.freebsd.org/287592. Refer to /usr/src/contrib/bsddialog/CHANGELOG to know more. PR: 287592 Reported by: adrian Sponsored by: The FreeBSD Foundation Merge commit '653f765f05b8c7e3908ae92e9bf61522a50cefc9' into YYY contrib/bsddialog/.gitignore | 1 + contrib/bsddialog/CHANGELOG | 50 ++++++++++++++++++++- contrib/bsddialog/LICENSE | 2 +- contrib/bsddialog/Makefile | 13 +++++- contrib/bsddialog/README.md | 5 +-- contrib/bsddialog/examples_library/compile | 8 ++-- contrib/bsddialog/examples_library/textbox.c | 38 ++++++++++++++++ contrib/bsddialog/lib/GNUmakefile | 19 +++++++- contrib/bsddialog/lib/Makefile | 21 ++++++++- contrib/bsddialog/lib/barbox.c | 37 ++++++++-------- contrib/bsddialog/lib/bsddialog.3 | 16 +++++-- contrib/bsddialog/lib/bsddialog.h | 5 ++- contrib/bsddialog/lib/bsddialog_theme.h | 2 +- contrib/bsddialog/lib/datebox.c | 28 ++++++------ contrib/bsddialog/lib/formbox.c | 48 ++++++++++++++------ contrib/bsddialog/lib/lib_util.c | 3 +- contrib/bsddialog/lib/lib_util.h | 4 +- contrib/bsddialog/lib/libbsddialog.c | 14 +++++- contrib/bsddialog/lib/menubox.c | 18 ++++---- contrib/bsddialog/lib/messagebox.c | 16 +++---- contrib/bsddialog/lib/textbox.c | 16 +++---- contrib/bsddialog/lib/theme.c | 6 +-- contrib/bsddialog/lib/timebox.c | 16 +++---- contrib/bsddialog/utility/GNUmakefile | 11 ++++- contrib/bsddialog/utility/Makefile | 11 ++++- contrib/bsddialog/utility/bsddialog.1 | 21 ++++++--- contrib/bsddialog/utility/bsddialog.c | 2 +- contrib/bsddialog/utility/util.h | 2 +- contrib/bsddialog/utility/util_builders.c | 66 ++++++++++++++-------------- contrib/bsddialog/utility/util_cli.c | 2 +- contrib/bsddialog/utility/util_theme.c | 4 +- 31 files changed, 353 insertions(+), 152 deletions(-) diff --cc contrib/bsddialog/.gitignore index c8fc68ed8a0e,000000000000..c9613d477f7f mode 100644,000000..100644 --- a/contrib/bsddialog/.gitignore +++ b/contrib/bsddialog/.gitignore @@@ -1,26 -1,0 +1,27 @@@ +bsddialog +.depend* +*.o +*.so* +*.a +*.gz +*.core +*~ +BSDDIALOG.geany +BSDDIALOG.tags +examples_library/calendar +examples_library/checklist +examples_library/datebox +examples_library/form +examples_library/gauge +examples_library/infobox +examples_library/menu +examples_library/mixedgauge +examples_library/mixedlist +examples_library/msgbox +examples_library/pause +examples_library/radiolist +examples_library/rangebox ++examples_library/textbox +examples_library/theme +examples_library/timebox +examples_library/yesno diff --cc contrib/bsddialog/Makefile index a6af8813a48e,000000000000..335b693470e6 mode 100644,000000..100644 --- a/contrib/bsddialog/Makefile +++ b/contrib/bsddialog/Makefile @@@ -1,38 -1,0 +1,47 @@@ +# PUBLIC DOMAIN - NO WARRANTY, see: +# +# +# Written in 2023 by Alfonso Sabato Siciliano + +OUTPUT = bsddialog - export VERSION=1.0.4 ++export VERSION=1.0.5 +.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} ++all: ${OUTPUT} ++ ++install: all ++ ${MAKE} -C ${LIBPATH} install ++ ${MAKE} -C ${UTILITYPATH} install ++ ++uninstall: ++ ${MAKE} -C ${UTILITYPATH} uninstall ++ ${MAKE} -C ${LIBPATH} uninstall + +${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 + ++.PHONY: all install uninstall clean diff --cc contrib/bsddialog/README.md index 7b9b6cf8e84d,000000000000..5a25109775fe mode 100644,000000..100644 --- a/contrib/bsddialog/README.md +++ b/contrib/bsddialog/README.md @@@ -1,142 -1,0 +1,141 @@@ - # BSDDialog 1.0.4 ++# BSDDialog 1.0.5 + +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. - ++ - add manuals to Makefiles installe and uninstall targets. diff --cc contrib/bsddialog/examples_library/textbox.c index 000000000000,2e76cbb97891..2e76cbb97891 mode 000000,100644..100644 --- a/contrib/bsddialog/examples_library/textbox.c +++ b/contrib/bsddialog/examples_library/textbox.c diff --cc contrib/bsddialog/lib/Makefile index 252b33f79848,000000000000..c728541a9f7a mode 100644,000000..100644 --- a/contrib/bsddialog/lib/Makefile +++ b/contrib/bsddialog/lib/Makefile @@@ -1,44 -1,0 +1,63 @@@ +# PUBLIC DOMAIN - NO WARRANTY, see: +# +# +# Written in 2021 by Alfonso Sabato Siciliano + +LIBRARY = bsddialog +LIBRARY_SO = lib${LIBRARY:=.so} +LIBRARY_A = lib${LIBRARY:=.a} +HEADERS = bsddialog.h bsddialog_theme.h bsddialog_progressview.h +SOURCES = barbox.c datebox.c formbox.c libbsddialog.c lib_util.c \ + menubox.c messagebox.c textbox.c theme.c timebox.c +OBJECTS = ${SOURCES:.c=.o} ++PREFIX = /usr/local + +.if defined(DEBUG) +CFLAGS += -g +.endif +CFLAGS += -D_XOPEN_SOURCE_EXTENDED -fPIC -Wall -Wextra -std=gnu99 \ + -fstack-protector-strong +LDFLAGS += -fstack-protector-strong -shared -Wl,-x -Wl,--fatal-warnings \ + -Wl,--warn-shared-textrel -Wl,-soname,${LIBRARY_SO}.${VERSION} \ + -L/usr/lib -lncursesw -ltinfow + +LN = ln -s -f +RM = rm -f + - all : ${LIBRARY} ++all: ${LIBRARY} ++ ++install: all ++ ${INSTALL} -m 0644 bsddialog.h ${DESTDIR}${PREFIX}/include/bsddialog.h ++ ${INSTALL} -m 0644 bsddialog_progressview.h ${DESTDIR}${PREFIX}/include/bsddialog_progressview.h ++ ${INSTALL} -m 0644 bsddialog_theme.h ${DESTDIR}${PREFIX}/include/bsddialog_theme.h ++ ${INSTALL} -m 0644 ${LIBRARY_A} ${DESTDIR}${PREFIX}/lib/${LIBRARY_A} ++ ${INSTALL} -m 0755 ${LIBRARY_SO}.${VERSION} ${DESTDIR}${PREFIX}/lib/${LIBRARY_SO}.${VERSION} ++ ${LN} ${LIBRARY_SO}.${VERSION} ${DESTDIR}${PREFIX}/lib/${LIBRARY_SO} ++ ++uninstall: ++ ${RM} ${DESTDIR}${PREFIX}/include/bsddialog.h ++ ${RM} ${DESTDIR}${PREFIX}/include/bsddialog_progressview.h ++ ${RM} ${DESTDIR}${PREFIX}/include/bsddialog_theme.h ++ ${RM} ${DESTDIR}${PREFIX}/lib/${LIBRARY_A} ++ ${RM} ${DESTDIR}${PREFIX}/lib/${LIBRARY_SO}.${VERSION} ++ ${RM} ${DESTDIR}${PREFIX}/lib/${LIBRARY_SO} + +${LIBRARY}: ${LIBRARY_SO} ${LIBRARY_A} + +${LIBRARY_SO}.${VERSION}: ${OBJECTS} + ${CC} ${LDFLAGS} ${.ALLSRC} -o ${LIBRARY_SO}.${VERSION} + +${LIBRARY_SO}: ${LIBRARY_SO}.${VERSION} + ${LN} ${LIBRARY_SO}.${VERSION} ${LIBRARY_SO} + +${LIBRARY_A}: ${OBJECTS} + ${AR} cr ${.TARGET} ${OBJECTS} + ${RANLIB} ${.TARGET} + +.c.o: + ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} + +clean: + ${RM} ${LIBRARY_SO}* *.o *~ *.gz ${LIBRARY_A} ++ ++.PHONY: all install uninstall ${LIBRARY} clean