From nobody Thu Jul 11 06:19:59 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 4WKPhw0qDsz5QN5q; Thu, 11 Jul 2024 06:20:00 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WKPhv5VR5z47dk; Thu, 11 Jul 2024 06:19:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720678799; 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=jNBSXoHIGGZzwIbbboVzUMqzXI5asLGPMFp9gHJzy18=; b=t80obvU/aQQwijhKshewnJd3FFTiKRcBKXCa0+ikdmXUqb9KrYPiuJyxlXNLOzgTferft2 27+W9Jqzjk87+MXyGpnOIozpBMHtBioUR8qsE2eq97pKFHCbP2DkJCN4KWTkiyalo2ZvSa RSAo1ssPfC1u64zXerJLEJRDEK8nxUAX8/q88gD+C/JPB5g3ZOrDbMmZL7tnFfxMqeO4ix aFV5PLsCEvX8lZzX4SNirIiFfkcbG5rwsmGUmTfi66rxWr557A5uAqFgE3Fy6VSFDHcwwP tTJMgFl8KDqrnNnWhz0FflkeEUcpxTvH/t1ZIdO5nfnyTBljMBwiZ3e1c5IK3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720678799; a=rsa-sha256; cv=none; b=ldrRZA/gJQl9EXvfohX530mVNj+NBPKEHiac5VRdnsP4SRnhEBq4LV47ON0gjCcOy5efba Hxfy13KxHxX4g3rau1/1eSHVMYDIrU8qVBDZ4tb7DgRaIXbyucQ1niWAV7Kucup6GJe7gv yDaGCTGAXbnv95HwZF58HVyrPnfl8yPIBKtJvNHbIntWqHLJJX2/BD2oVD99QRjwdag5Is IAjje7qjGqXLxGoLx5AwriSEZBAYhW+LlVU8TV4kDn78UC9sK1myqbs9yRmsKE8SCZ/tVz jvEog3S8Z4IEz+RbRiJO/GaRAWr+yg5hHPdnCRkDC2Gjgya/OZGW06pfHSTn9Q== 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=1720678799; 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=jNBSXoHIGGZzwIbbboVzUMqzXI5asLGPMFp9gHJzy18=; b=Y1eggoCR4BPkfIMyLIBR9LSJQqn0I6J26ErInnumYfzuTQzHOtz+RF4I/0jPiW/SYHOPoj EdIUpQRZLuWsDXwbuWTzRQeL9Hful30qNNzxkMFm48ou6vsZ1fU+l++nrE0KjMX+U/CN6R 2sG2eUYgDGkVPl0m9RlWVB8AOCJ6amhHFxwCp3LZ9xDhHsnAdgmL/DEbXWKLGEbxGU7ePS YDQB+iHZcL6C2KI32lOFB+V2cuviSnXCJxsXHSI6vXlMIlwxqYX+zzFQbFVFOnxqvt54Dk 1UKSSPklhp2sWtmY8FUlJQNgXmeWEOvlWAoONcgg+hjsnr1Ck/xPN3ECkhTB+A== 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 4WKPhv4TMqzq5q; Thu, 11 Jul 2024 06:19:59 +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 46B6JxOt014119; Thu, 11 Jul 2024 06:19:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46B6JxgU014116; Thu, 11 Jul 2024 06:19:59 GMT (envelope-from git) Date: Thu, 11 Jul 2024 06:19:59 GMT Message-Id: <202407110619.46B6JxgU014116@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: d4ca00154434 - main - Import bsddialog 1.0.4 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4ca001544347e217e2ab023cca88b30637def98 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=d4ca001544347e217e2ab023cca88b30637def98 commit d4ca001544347e217e2ab023cca88b30637def98 Merge: 7bbcbd43c53b 7f3a903b679f Author: Kyle Evans AuthorDate: 2024-07-11 06:17:23 +0000 Commit: Kyle Evans CommitDate: 2024-07-11 06:17:23 +0000 Import bsddialog 1.0.4 This fixes a future conflict with _FORTIFY_SOURCE, where includes and causes a conflict with `MAX_INPUT` defined in the enum here. Sponsored by: Klara, Inc. Sponsored by: Stormshield contrib/bsddialog/CHANGELOG | 7 +++++++ contrib/bsddialog/Makefile | 2 +- contrib/bsddialog/README.md | 2 +- contrib/bsddialog/lib/bsddialog.h | 2 +- contrib/bsddialog/utility/util_cli.c | 6 +++--- 5 files changed, 13 insertions(+), 6 deletions(-) diff --cc contrib/bsddialog/Makefile index f1b2da675f9e,000000000000..a6af8813a48e 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.3 ++export VERSION=1.0.4 +.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 f984b488b232,000000000000..7b9b6cf8e84d mode 100644,000000..100644 --- a/contrib/bsddialog/README.md +++ b/contrib/bsddialog/README.md @@@ -1,142 -1,0 +1,142 @@@ - # BSDDialog 1.0.3 ++# BSDDialog 1.0.4 + +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. +