From nobody Thu Feb 9 21:35:08 2023 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 4PCVWx4LvHz3nmd0; Thu, 9 Feb 2023 21:35:09 +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 4PCVWx1b6Kz4FYW; Thu, 9 Feb 2023 21:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675978509; 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=PB/Gz0pFgJlsO3OUfBrsKbDX5A8WJfpaMveAWkKkmeo=; b=yDbdp+0yyLJmcG87tZ5y3mM8JC6XB1ekblb6FAkiBLuRzKX7Ssc3IfFhfBdKS7y8pnnO+b ruhZ8/PbJhQcsKy3FeGNvpmC814hh0tXSgyao0LtY9jzCHfNRXxUqWp6yJXOsQOyOeZCz7 jyc1Zay312ZxykfIyOzQGgcfJSXI85eawiqkYBfDJ51+dDZ0UC8dJUudU/lOLY1ovNemcs 9EEaOMURME8NpAzb8y8cxbyaYGiytECOL80KRcWgIq2w5hyy2k1QO7f8mxpqp19q0tRl8w JeQ/EIaVasYxYAJsXYkoDOavlY8+S44xg1lgEHidVYZwZFi6ae5D24XBUeAdrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675978509; 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=PB/Gz0pFgJlsO3OUfBrsKbDX5A8WJfpaMveAWkKkmeo=; b=gmGFlHxgGTC/v8G2pUBS8Op/Y8pb78jHYtZHHwqspCNi2bJqvBB49EKR+a1bZ++kdvgxNV es34pqjxU6a1yiqaf3Lu5djBfVF55O4CJYCh6ceTxwJ8Lce7nXHsiXgpoBlt2UE58Vnlo6 yCrywBMj/xSIsRb28v9LWZ9JLdbpVt4ARQaBH9W9U89yqzcYzWC9eXia3Ra/hjnoX4FWL6 ABVWYIwrIqJ5+R5AudHjUFBpUIyDyske9RbrQaA4+PcSkFMcQx2p2z/V2F9tvi+tNqpBzU hWmOBuPhjiaIeIMBz2yHcnwWqf6RT4umfAa5d6D9hpc14fPqssnZv+GCIWH1bQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675978509; a=rsa-sha256; cv=none; b=slMpyWKnAzxs560Plmp9pfG1xRldlbx65i/7ncCVoRK76o+Ui6yI9OYco1cp0fR82L6bwn uXgob6fLrd2A1ELmpoR3qpi/3QzvnNTZG8qndujMxpLy3s2GIyXdY+yHi9POlktjTOQxaA JDa8u08tgTkXeiJXKTVDijyPvyRIuwOTMIOA2r+6DPSakBs2xIes+PVDiMZOd+xaAlLCbD FlBzTt9qUrvaTv7c4AmZh3StVI2VrihgTjKi3xW4A4mtQ+wPf0BZ6uIAKDyXNlodWKnUKq e9zI3s+NE2tbi6zYjPwljdEuxG8KayDDJxZ5pGUETIcKLdSo1cvdIDSJa3l+qQ== 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 4PCVWx0grkzt0p; Thu, 9 Feb 2023 21:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 319LZ9Es072260; Thu, 9 Feb 2023 21:35:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 319LZ8kw072259; Thu, 9 Feb 2023 21:35:08 GMT (envelope-from git) Date: Thu, 9 Feb 2023 21:35:08 GMT Message-Id: <202302092135.319LZ8kw072259@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Stefan=20E=C3=9Fer?= Subject: git: 9b7787294c58 - stable/13 - contrib/bc: update to version 6.2.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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9b7787294c581d160304d5bc7450cf33421a3e19 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=9b7787294c581d160304d5bc7450cf33421a3e19 commit 9b7787294c581d160304d5bc7450cf33421a3e19 Author: Stefan Eßer AuthorDate: 2023-02-06 21:33:56 +0000 Commit: Stefan Eßer CommitDate: 2023-02-09 21:34:55 +0000 contrib/bc: update to version 6.2.4 This update contains only documentation changes (new main repository URL and changed mail address of the program author) and changes to the build system that do not affect the FreeBSD base system build. MFC after: 3 days (cherry picked from commit 4fca8e0f65a8bbbd1242c1f7d8e33b77c479f5de) --- contrib/bc/LICENSE.md | 6 +-- contrib/bc/NEWS.md | 18 ++++++++ contrib/bc/README.md | 22 ++++++---- contrib/bc/gen/bc_help.txt | 2 +- contrib/bc/gen/dc_help.txt | 2 +- contrib/bc/gen/strgen.sh | 16 ++++++- contrib/bc/include/version.h | 2 +- contrib/bc/manuals/bc/A.1 | 4 +- contrib/bc/manuals/bc/A.1.md | 4 +- contrib/bc/manuals/bc/E.1 | 4 +- contrib/bc/manuals/bc/E.1.md | 4 +- contrib/bc/manuals/bc/EH.1 | 4 +- contrib/bc/manuals/bc/EH.1.md | 4 +- contrib/bc/manuals/bc/EHN.1 | 4 +- contrib/bc/manuals/bc/EHN.1.md | 4 +- contrib/bc/manuals/bc/EN.1 | 4 +- contrib/bc/manuals/bc/EN.1.md | 4 +- contrib/bc/manuals/bc/H.1 | 4 +- contrib/bc/manuals/bc/H.1.md | 4 +- contrib/bc/manuals/bc/HN.1 | 4 +- contrib/bc/manuals/bc/HN.1.md | 4 +- contrib/bc/manuals/bc/N.1 | 4 +- contrib/bc/manuals/bc/N.1.md | 4 +- contrib/bc/manuals/bcl.3 | 4 +- contrib/bc/manuals/bcl.3.md | 4 +- contrib/bc/manuals/build.md | 2 +- contrib/bc/manuals/dc/A.1 | 4 +- contrib/bc/manuals/dc/A.1.md | 4 +- contrib/bc/manuals/dc/E.1 | 4 +- contrib/bc/manuals/dc/E.1.md | 4 +- contrib/bc/manuals/dc/EH.1 | 4 +- contrib/bc/manuals/dc/EH.1.md | 4 +- contrib/bc/manuals/dc/EHN.1 | 4 +- contrib/bc/manuals/dc/EHN.1.md | 4 +- contrib/bc/manuals/dc/EN.1 | 4 +- contrib/bc/manuals/dc/EN.1.md | 4 +- contrib/bc/manuals/dc/H.1 | 4 +- contrib/bc/manuals/dc/H.1.md | 4 +- contrib/bc/manuals/dc/HN.1 | 4 +- contrib/bc/manuals/dc/HN.1.md | 4 +- contrib/bc/manuals/dc/N.1 | 4 +- contrib/bc/manuals/dc/N.1.md | 4 +- contrib/bc/scripts/functions.sh | 82 +++++++++++++++++++++++++++++++++++ contrib/bc/scripts/locale_install.sh | 11 ++++- contrib/bc/src/data.c | 2 +- contrib/bc/tests/all.sh | 27 +++++++++++- contrib/bc/tests/bc/timeconst.sh | 18 +++++++- contrib/bc/tests/dc/scripts/easter.sh | 50 ++++++++++++++++++++- contrib/bc/tests/error.sh | 21 ++++++--- contrib/bc/tests/errors.sh | 17 +++++++- contrib/bc/tests/history.py | 2 +- contrib/bc/tests/history.sh | 18 +++++++- contrib/bc/tests/other.sh | 17 +++++++- contrib/bc/tests/read.sh | 19 ++++++-- contrib/bc/tests/script.sh | 29 +++++++++++-- contrib/bc/tests/scripts.sh | 25 ++++++++++- contrib/bc/tests/stdin.sh | 17 +++++++- contrib/bc/tests/test.sh | 23 +++++++++- usr.bin/gh-bc/Makefile | 4 +- 59 files changed, 471 insertions(+), 117 deletions(-) diff --git a/contrib/bc/LICENSE.md b/contrib/bc/LICENSE.md index 8e6b7e0b9051..b65095edc26c 100644 --- a/contrib/bc/LICENSE.md +++ b/contrib/bc/LICENSE.md @@ -1,6 +1,6 @@ # License -Copyright (c) 2018-2023 Gavin D. Howard +Copyright (c) 2018-2023 Gavin D. Howard Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -31,7 +31,7 @@ copyrights and license: Copyright (c) 2010-2014, Salvatore Sanfilippo
Copyright (c) 2010-2013, Pieter Noordhuis
Copyright (c) 2018 rain-1
-Copyright (c) 2018-2023, Gavin D. Howard +Copyright (c) 2018-2023, Gavin D. Howard Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -60,7 +60,7 @@ The files `src/rand.c` and `include/rand.h` are under the following copyrights and license: Copyright (c) 2014-2017 Melissa O'Neill and PCG Project contributors -Copyright (c) 2018-2023 Gavin D. Howard +Copyright (c) 2018-2023 Gavin D. Howard Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/contrib/bc/NEWS.md b/contrib/bc/NEWS.md index 36952fdaf582..4601db456f86 100644 --- a/contrib/bc/NEWS.md +++ b/contrib/bc/NEWS.md @@ -1,5 +1,23 @@ # News +## 6.2.4 + +This is a production release that fixes a test failure that happens when +`tests/bc/scripts/timeconst.bc` doesn't exist. This should only affect +packagers. + +This bug happened because I forgot something I added in the previous release: +better error checking in tests to help packagers. Unfortunately, I was too +zealous with the error checking. + +## 6.2.3 + +This is a production release that moves `bc` to . + +That's all it does: update links. Users do ***NOT*** need to upgrade; there are +redirects that will stay in place indefinitely. This release is only for new +users. + ## 6.2.2 This is a production release that fixes a bug. diff --git a/contrib/bc/README.md b/contrib/bc/README.md index 438cab0d1694..9d395f747185 100644 --- a/contrib/bc/README.md +++ b/contrib/bc/README.md @@ -1,12 +1,12 @@ # `bc` -***WARNING: New user registration for https://git.yzena.com/ is disabled because -of spam. If you need to report a bug with `bc`, email gavin at this site minus -the `git.` part for an account, and I will create one for you. Or you can report -an issue at [GitHub][29].*** +***WARNING: New user registration for is disabled +because of spam. If you need to report a bug with `bc`, email gavin at this site +minus the `git.` part for an account, and I will create one for you. Or you can +report an issue at [GitHub][29].*** -***WARNING: This project has moved to [https://git.yzena.com/][20] for [these -reasons][21], though GitHub will remain a mirror.*** +***WARNING: This project has moved to [https://git.gavinhoward.com/][20] for +[these reasons][21], though GitHub will remain a mirror.*** This is an implementation of the [POSIX `bc` calculator][12] that implements [GNU `bc`][1] extensions, as well as the period (`.`) extension for the BSD @@ -443,6 +443,10 @@ This `bc` uses the commit message guidelines laid out in [this blog post][10]. This `bc` uses [semantic versioning][11]. +## AI-Free + +This repository is 100% AI-Free code. + ## Contents Items labeled with `(maintainer use only)` are not included in release source @@ -481,10 +485,10 @@ Folders: [10]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html [11]: http://semver.org/ [12]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html -[17]: https://git.yzena.com/gavin/vim-bc -[18]: https://git.yzena.com/gavin/bc_libs +[17]: https://git.gavinhoward.com/gavin/vim-bc +[18]: https://git.gavinhoward.com/gavin/bc_libs [19]: ./manuals/benchmarks.md -[20]: https://git.yzena.com/gavin/bc +[20]: https://git.gavinhoward.com/gavin/bc [21]: https://gavinhoward.com/2020/04/i-am-moving-away-from-github/ [22]: https://www.deepl.com/translator [23]: https://cgit.freebsd.org/src/tree/contrib/bc diff --git a/contrib/bc/gen/bc_help.txt b/contrib/bc/gen/bc_help.txt index f78ba9e71dd3..c51ba186db15 100644 --- a/contrib/bc/gen/bc_help.txt +++ b/contrib/bc/gen/bc_help.txt @@ -37,7 +37,7 @@ usage: %s [options] [file...] bc is a command-line, arbitrary-precision calculator with a Turing-complete language. For details, use `man %s` or see the online documentation at -https://git.yzena.com/gavin/bc/src/tag/%s/manuals/bc/%s.1.md. +https://git.gavinhoward.com/gavin/bc/src/tag/%s/manuals/bc/%s.1.md. This bc is compatible with both the GNU bc and the POSIX bc spec. See the GNU bc manual (https://www.gnu.org/software/bc/manual/bc.html) and bc spec diff --git a/contrib/bc/gen/dc_help.txt b/contrib/bc/gen/dc_help.txt index 8b313f8d9e07..7d9e7ec28d25 100644 --- a/contrib/bc/gen/dc_help.txt +++ b/contrib/bc/gen/dc_help.txt @@ -37,7 +37,7 @@ usage: %s [options] [file...] dc is a reverse-polish notation command-line calculator which supports unlimited precision arithmetic. For details, use `man %s` or see the online documentation -at https://git.yzena.com/gavin/bc/src/tag/%s/manuals/bc/%s.1.md. +at https://git.gavinhoward.com/gavin/bc/src/tag/%s/manuals/bc/%s.1.md. This dc is (mostly) compatible with the OpenBSD dc and the GNU dc. See the OpenBSD man page (http://man.openbsd.org/OpenBSD-current/man1/dc.1) and the GNU diff --git a/contrib/bc/gen/strgen.sh b/contrib/bc/gen/strgen.sh index 5ef66fb2d8c8..a65e221ad0b4 100755 --- a/contrib/bc/gen/strgen.sh +++ b/contrib/bc/gen/strgen.sh @@ -36,21 +36,33 @@ script="$0" scriptdir=$(dirname "$script") . "$scriptdir/../scripts/functions.sh" +# Just print the usage and exit with an error. This can receive a message to +# print. +# @param 1 A message to print. +usage() { + if [ $# -eq 1 ]; then + printf '%s\n\n' "$1" + fi + printf 'usage: %s input output exclude name [label [define [remove_tabs]]]\n' "$progname" + exit 1 +} + # See strgen.c comment on main() for what these mean. Note, however, that this # script generates a string literal, not a char array. To understand the # consequences of that, see manuals/development.md#strgenc. if [ $# -lt 3 ]; then - echo "usage: $progname input output exclude name [label [define [remove_tabs]]]" - exit 1 + usage "Not enough arguments" fi input="$1" +check_file_arg "$input" output="$2" exclude="$3" name="$4" label="$5" define="$6" remove_tabs="$7" +check_bool_arg "$remove_tabs" tmpinput=$(mktemp -t "${input##*/}_XXXXXX") diff --git a/contrib/bc/include/version.h b/contrib/bc/include/version.h index e1b72de90eef..6d8ddfea0940 100644 --- a/contrib/bc/include/version.h +++ b/contrib/bc/include/version.h @@ -37,6 +37,6 @@ #define BC_VERSION_H /// The current version. -#define VERSION 6.2.2 +#define VERSION 6.2.4 #endif // BC_VERSION_H diff --git a/contrib/bc/manuals/bc/A.1 b/contrib/bc/manuals/bc/A.1 index 629cc32c4c69..b1996a1f282e 100644 --- a/contrib/bc/manuals/bc/A.1 +++ b/contrib/bc/manuals/bc/A.1 @@ -2977,8 +2977,8 @@ Before version \f[B]6.1.0\f[R], this bc(1) had incorrect behavior for the \f[B]quit\f[R] statement. .PP No other bugs are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHORS .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/bc/A.1.md b/contrib/bc/manuals/bc/A.1.md index 40cfa5fcdad6..e7b4c8212190 100644 --- a/contrib/bc/manuals/bc/A.1.md +++ b/contrib/bc/manuals/bc/A.1.md @@ -2498,8 +2498,8 @@ This bc(1) supports error messages for different locales, and thus, it supports Before version **6.1.0**, this bc(1) had incorrect behavior for the **quit** statement. -No other bugs are known. Report bugs at https://git.yzena.com/gavin/bc . +No other bugs are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHORS -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/bc/E.1 b/contrib/bc/manuals/bc/E.1 index 89f95ef81cfa..fea1cecdc4c5 100644 --- a/contrib/bc/manuals/bc/E.1 +++ b/contrib/bc/manuals/bc/E.1 @@ -1810,8 +1810,8 @@ Before version \f[B]6.1.0\f[R], this bc(1) had incorrect behavior for the \f[B]quit\f[R] statement. .PP No other bugs are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHORS .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/bc/E.1.md b/contrib/bc/manuals/bc/E.1.md index 30451dabd64b..3631267f2dc9 100644 --- a/contrib/bc/manuals/bc/E.1.md +++ b/contrib/bc/manuals/bc/E.1.md @@ -1506,8 +1506,8 @@ This bc(1) supports error messages for different locales, and thus, it supports Before version **6.1.0**, this bc(1) had incorrect behavior for the **quit** statement. -No other bugs are known. Report bugs at https://git.yzena.com/gavin/bc . +No other bugs are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHORS -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/bc/EH.1 b/contrib/bc/manuals/bc/EH.1 index e006a5c41c84..2a36cab7f778 100644 --- a/contrib/bc/manuals/bc/EH.1 +++ b/contrib/bc/manuals/bc/EH.1 @@ -1781,8 +1781,8 @@ Before version \f[B]6.1.0\f[R], this bc(1) had incorrect behavior for the \f[B]quit\f[R] statement. .PP No other bugs are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHORS .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/bc/EH.1.md b/contrib/bc/manuals/bc/EH.1.md index 28f874c36ebe..f2f49ea76944 100644 --- a/contrib/bc/manuals/bc/EH.1.md +++ b/contrib/bc/manuals/bc/EH.1.md @@ -1480,8 +1480,8 @@ This bc(1) supports error messages for different locales, and thus, it supports Before version **6.1.0**, this bc(1) had incorrect behavior for the **quit** statement. -No other bugs are known. Report bugs at https://git.yzena.com/gavin/bc . +No other bugs are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHORS -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/bc/EHN.1 b/contrib/bc/manuals/bc/EHN.1 index e77148710255..75768a03c141 100644 --- a/contrib/bc/manuals/bc/EHN.1 +++ b/contrib/bc/manuals/bc/EHN.1 @@ -1774,8 +1774,8 @@ Before version \f[B]6.1.0\f[R], this bc(1) had incorrect behavior for the \f[B]quit\f[R] statement. .PP No other bugs are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHORS .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/bc/EHN.1.md b/contrib/bc/manuals/bc/EHN.1.md index 09288c577a5c..a38503cc8a24 100644 --- a/contrib/bc/manuals/bc/EHN.1.md +++ b/contrib/bc/manuals/bc/EHN.1.md @@ -1472,8 +1472,8 @@ use a period (**.**) as a radix point, regardless of the value of Before version **6.1.0**, this bc(1) had incorrect behavior for the **quit** statement. -No other bugs are known. Report bugs at https://git.yzena.com/gavin/bc . +No other bugs are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHORS -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/bc/EN.1 b/contrib/bc/manuals/bc/EN.1 index 99ecfd2056e2..9c0158583199 100644 --- a/contrib/bc/manuals/bc/EN.1 +++ b/contrib/bc/manuals/bc/EN.1 @@ -1803,8 +1803,8 @@ Before version \f[B]6.1.0\f[R], this bc(1) had incorrect behavior for the \f[B]quit\f[R] statement. .PP No other bugs are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHORS .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/bc/EN.1.md b/contrib/bc/manuals/bc/EN.1.md index 52bacfa5df63..28b558d8b21d 100644 --- a/contrib/bc/manuals/bc/EN.1.md +++ b/contrib/bc/manuals/bc/EN.1.md @@ -1498,8 +1498,8 @@ use a period (**.**) as a radix point, regardless of the value of Before version **6.1.0**, this bc(1) had incorrect behavior for the **quit** statement. -No other bugs are known. Report bugs at https://git.yzena.com/gavin/bc . +No other bugs are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHORS -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/bc/H.1 b/contrib/bc/manuals/bc/H.1 index 856d2c604dee..cbd93da0df81 100644 --- a/contrib/bc/manuals/bc/H.1 +++ b/contrib/bc/manuals/bc/H.1 @@ -2948,8 +2948,8 @@ Before version \f[B]6.1.0\f[R], this bc(1) had incorrect behavior for the \f[B]quit\f[R] statement. .PP No other bugs are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHORS .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/bc/H.1.md b/contrib/bc/manuals/bc/H.1.md index 4a1278dbec86..ac35def9019f 100644 --- a/contrib/bc/manuals/bc/H.1.md +++ b/contrib/bc/manuals/bc/H.1.md @@ -2472,8 +2472,8 @@ This bc(1) supports error messages for different locales, and thus, it supports Before version **6.1.0**, this bc(1) had incorrect behavior for the **quit** statement. -No other bugs are known. Report bugs at https://git.yzena.com/gavin/bc . +No other bugs are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHORS -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/bc/HN.1 b/contrib/bc/manuals/bc/HN.1 index 5356950aa68c..5893d2a7f9a9 100644 --- a/contrib/bc/manuals/bc/HN.1 +++ b/contrib/bc/manuals/bc/HN.1 @@ -2941,8 +2941,8 @@ Before version \f[B]6.1.0\f[R], this bc(1) had incorrect behavior for the \f[B]quit\f[R] statement. .PP No other bugs are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHORS .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/bc/HN.1.md b/contrib/bc/manuals/bc/HN.1.md index 8dd0674512ac..82a99addd344 100644 --- a/contrib/bc/manuals/bc/HN.1.md +++ b/contrib/bc/manuals/bc/HN.1.md @@ -2464,8 +2464,8 @@ use a period (**.**) as a radix point, regardless of the value of Before version **6.1.0**, this bc(1) had incorrect behavior for the **quit** statement. -No other bugs are known. Report bugs at https://git.yzena.com/gavin/bc . +No other bugs are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHORS -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/bc/N.1 b/contrib/bc/manuals/bc/N.1 index 517e403aa6ca..791f47407001 100644 --- a/contrib/bc/manuals/bc/N.1 +++ b/contrib/bc/manuals/bc/N.1 @@ -2970,8 +2970,8 @@ Before version \f[B]6.1.0\f[R], this bc(1) had incorrect behavior for the \f[B]quit\f[R] statement. .PP No other bugs are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHORS .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/bc/N.1.md b/contrib/bc/manuals/bc/N.1.md index 2c85180f670f..b8339ea31a5e 100644 --- a/contrib/bc/manuals/bc/N.1.md +++ b/contrib/bc/manuals/bc/N.1.md @@ -2490,8 +2490,8 @@ use a period (**.**) as a radix point, regardless of the value of Before version **6.1.0**, this bc(1) had incorrect behavior for the **quit** statement. -No other bugs are known. Report bugs at https://git.yzena.com/gavin/bc . +No other bugs are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHORS -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/bcl.3 b/contrib/bc/manuals/bcl.3 index e066103d02f4..6bebaa8f02cd 100644 --- a/contrib/bc/manuals/bcl.3 +++ b/contrib/bc/manuals/bcl.3 @@ -1446,8 +1446,8 @@ This is also true of bcl(3). .SH BUGS .PP None are known. -Report bugs at https://git.yzena.com/gavin/bc. +Report bugs at https://git.gavinhoward.com/gavin/bc. .SH AUTHORS .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/bcl.3.md b/contrib/bc/manuals/bcl.3.md index e2d92866ddbe..6c6967b44770 100644 --- a/contrib/bc/manuals/bcl.3.md +++ b/contrib/bc/manuals/bcl.3.md @@ -1230,8 +1230,8 @@ use a period (**.**) as a radix point, regardless of the value of # BUGS -None are known. Report bugs at https://git.yzena.com/gavin/bc. +None are known. Report bugs at https://git.gavinhoward.com/gavin/bc. # AUTHORS -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/build.md b/contrib/bc/manuals/build.md index 5cec45f596b4..d9c46ae22602 100644 --- a/contrib/bc/manuals/build.md +++ b/contrib/bc/manuals/build.md @@ -40,7 +40,7 @@ accepted build options. ## Windows For releases, Windows builds of `bc`, `dc`, and `bcl` are available for download -from and GitHub. +from and GitHub. However, if you wish to build it yourself, this `bc` can be built using Visual Studio or MSBuild. diff --git a/contrib/bc/manuals/dc/A.1 b/contrib/bc/manuals/dc/A.1 index 6500bf9129e2..13ed8c4cf808 100644 --- a/contrib/bc/manuals/dc/A.1 +++ b/contrib/bc/manuals/dc/A.1 @@ -1718,8 +1718,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . .SH BUGS .PP None are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHOR .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/dc/A.1.md b/contrib/bc/manuals/dc/A.1.md index 4c40e38dcee8..b656650cb820 100644 --- a/contrib/bc/manuals/dc/A.1.md +++ b/contrib/bc/manuals/dc/A.1.md @@ -1517,8 +1517,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . # BUGS -None are known. Report bugs at https://git.yzena.com/gavin/bc . +None are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHOR -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/dc/E.1 b/contrib/bc/manuals/dc/E.1 index 7f2477f10772..3fb69dfe70da 100644 --- a/contrib/bc/manuals/dc/E.1 +++ b/contrib/bc/manuals/dc/E.1 @@ -1496,8 +1496,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . .SH BUGS .PP None are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHOR .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/dc/E.1.md b/contrib/bc/manuals/dc/E.1.md index 437fc645937a..0bbe97612889 100644 --- a/contrib/bc/manuals/dc/E.1.md +++ b/contrib/bc/manuals/dc/E.1.md @@ -1341,8 +1341,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . # BUGS -None are known. Report bugs at https://git.yzena.com/gavin/bc . +None are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHOR -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/dc/EH.1 b/contrib/bc/manuals/dc/EH.1 index ba4e67507028..da7776edd538 100644 --- a/contrib/bc/manuals/dc/EH.1 +++ b/contrib/bc/manuals/dc/EH.1 @@ -1470,8 +1470,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . .SH BUGS .PP None are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHOR .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/dc/EH.1.md b/contrib/bc/manuals/dc/EH.1.md index 6d1dd78985b2..0751d3f78d21 100644 --- a/contrib/bc/manuals/dc/EH.1.md +++ b/contrib/bc/manuals/dc/EH.1.md @@ -1318,8 +1318,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . # BUGS -None are known. Report bugs at https://git.yzena.com/gavin/bc . +None are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHOR -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/dc/EHN.1 b/contrib/bc/manuals/dc/EHN.1 index 5f454d01cc2e..10ef283ea056 100644 --- a/contrib/bc/manuals/dc/EHN.1 +++ b/contrib/bc/manuals/dc/EHN.1 @@ -1466,8 +1466,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . .SH BUGS .PP None are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHOR .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/dc/EHN.1.md b/contrib/bc/manuals/dc/EHN.1.md index e3786886a035..9ba7fe13e0ad 100644 --- a/contrib/bc/manuals/dc/EHN.1.md +++ b/contrib/bc/manuals/dc/EHN.1.md @@ -1313,8 +1313,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . # BUGS -None are known. Report bugs at https://git.yzena.com/gavin/bc . +None are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHOR -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/dc/EN.1 b/contrib/bc/manuals/dc/EN.1 index 6f08fc8d3c0c..abdcbe8c63f8 100644 --- a/contrib/bc/manuals/dc/EN.1 +++ b/contrib/bc/manuals/dc/EN.1 @@ -1492,8 +1492,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . .SH BUGS .PP None are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHOR .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/dc/EN.1.md b/contrib/bc/manuals/dc/EN.1.md index b97e121e2226..5c0590c53aee 100644 --- a/contrib/bc/manuals/dc/EN.1.md +++ b/contrib/bc/manuals/dc/EN.1.md @@ -1336,8 +1336,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . # BUGS -None are known. Report bugs at https://git.yzena.com/gavin/bc . +None are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHOR -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/dc/H.1 b/contrib/bc/manuals/dc/H.1 index cc2f156205e6..c96100e51bc5 100644 --- a/contrib/bc/manuals/dc/H.1 +++ b/contrib/bc/manuals/dc/H.1 @@ -1692,8 +1692,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . .SH BUGS .PP None are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHOR .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/dc/H.1.md b/contrib/bc/manuals/dc/H.1.md index b8ad29b28a85..0dddf66d700a 100644 --- a/contrib/bc/manuals/dc/H.1.md +++ b/contrib/bc/manuals/dc/H.1.md @@ -1494,8 +1494,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . # BUGS -None are known. Report bugs at https://git.yzena.com/gavin/bc . +None are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHOR -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/dc/HN.1 b/contrib/bc/manuals/dc/HN.1 index 8d16b10a23de..a6644ecd575b 100644 --- a/contrib/bc/manuals/dc/HN.1 +++ b/contrib/bc/manuals/dc/HN.1 @@ -1688,8 +1688,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . .SH BUGS .PP None are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHOR .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/dc/HN.1.md b/contrib/bc/manuals/dc/HN.1.md index d658409b8362..d39a7497d3ac 100644 --- a/contrib/bc/manuals/dc/HN.1.md +++ b/contrib/bc/manuals/dc/HN.1.md @@ -1489,8 +1489,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . # BUGS -None are known. Report bugs at https://git.yzena.com/gavin/bc . +None are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHOR -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/manuals/dc/N.1 b/contrib/bc/manuals/dc/N.1 index 54fbadeed09c..f9aeb1acfb6c 100644 --- a/contrib/bc/manuals/dc/N.1 +++ b/contrib/bc/manuals/dc/N.1 @@ -1714,8 +1714,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . .SH BUGS .PP None are known. -Report bugs at https://git.yzena.com/gavin/bc . +Report bugs at https://git.gavinhoward.com/gavin/bc . .SH AUTHOR .PP Gavin D. -Howard and contributors. +Howard and contributors. diff --git a/contrib/bc/manuals/dc/N.1.md b/contrib/bc/manuals/dc/N.1.md index 35573c49da90..3c36661d3902 100644 --- a/contrib/bc/manuals/dc/N.1.md +++ b/contrib/bc/manuals/dc/N.1.md @@ -1512,8 +1512,8 @@ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . # BUGS -None are known. Report bugs at https://git.yzena.com/gavin/bc . +None are known. Report bugs at https://git.gavinhoward.com/gavin/bc . # AUTHOR -Gavin D. Howard and contributors. +Gavin D. Howard and contributors. diff --git a/contrib/bc/scripts/functions.sh b/contrib/bc/scripts/functions.sh index 98cb5cf7aae0..8ae765859e51 100755 --- a/contrib/bc/scripts/functions.sh +++ b/contrib/bc/scripts/functions.sh @@ -71,6 +71,88 @@ err_exit() { exit "$2" } +# Function for checking the "d"/"dir" argument of scripts. This function expects +# a usage() function to exist in the caller. +# @param 1 The argument to check. +check_d_arg() { + + if [ "$#" -ne 1 ]; then + printf 'Invalid number of args to check_d_arg\n' + exit 1 + fi + + _check_d_arg_arg="$1" + shift + + if [ "$_check_d_arg_arg" != "bc" ] && [ "$_check_d_arg_arg" != "dc" ]; then + _check_d_arg_msg=$(printf 'Invalid d arg: %s\nMust be either "bc" or "dc".\n\n' \ + "$_check_d_arg_arg") + usage "$_check_d_arg_msg" + fi +} + +# Function for checking the boolean arguments of scripts. This function expects +# a usage() function to exist in the caller. +# @param 1 The argument to check. +check_bool_arg() { + + if [ "$#" -ne 1 ]; then + printf 'Invalid number of args to check_bool_arg\n' + exit 1 + fi + + _check_bool_arg_arg="$1" + shift + + if [ "$_check_bool_arg_arg" != "0" ] && [ "$_check_bool_arg_arg" != "1" ]; then + _check_bool_arg_msg=$(printf 'Invalid bool arg: %s\nMust be either "0" or "1".\n\n' \ + "$_check_bool_arg_arg") + usage "$_check_bool_arg_msg" + fi +} + +# Function for checking the executable arguments of scripts. This function +# expects a usage() function to exist in the caller. +# @param 1 The argument to check. +check_exec_arg() { + + if [ "$#" -ne 1 ]; then + printf 'Invalid number of args to check_exec_arg\n' + exit 1 + fi + + _check_exec_arg_arg="$1" + shift + + if [ ! -x "$_check_exec_arg_arg" ]; then + if ! command -v "$_check_exec_arg_arg" >/dev/null 2>&1; then + _check_exec_arg_msg=$(printf 'Invalid exec arg: %s\nMust be an executable file.\n\n' \ + "$_check_exec_arg_arg") + usage "$_check_exec_arg_msg" + fi + fi +} + +# Function for checking the file arguments of scripts. This function expects a +# usage() function to exist in the caller. +# @param 1 The argument to check. +check_file_arg() { + + if [ "$#" -ne 1 ]; then + printf 'Invalid number of args to check_file_arg\n' + exit 1 + fi + + _check_file_arg_arg="$1" + shift + + if [ ! -f "$_check_file_arg_arg" ]; then + _check_file_arg_msg=$(printf 'Invalid file arg: %s\nMust be a file.\n\n' \ + "$_check_file_arg_arg") + usage "$_check_file_arg_msg" + fi +} + # Check the return code on a test and exit with a fail if it's non-zero. # @param d The calculator under test. # @param err The return code. diff --git a/contrib/bc/scripts/locale_install.sh b/contrib/bc/scripts/locale_install.sh index a2d9ccda7ade..75534a735cdb 100755 --- a/contrib/bc/scripts/locale_install.sh +++ b/contrib/bc/scripts/locale_install.sh @@ -28,6 +28,7 @@ # # Just print the usage and exit with an error. +# @param 1 A message to print. usage() { if [ $# -eq 1 ]; then printf '%s\n' "$1" @@ -189,7 +190,7 @@ while getopts "l" opt; do done -test "$#" -ge 2 || usage +test "$#" -ge 2 || usage "Must have at least two arguments" nlspath="$1" shift @@ -240,11 +241,15 @@ for file in $locales_dir/*.msg; do continue fi + printf 'Installing %s...' "$locale" + # Generate the proper location for the cat file. loc=$(gen_nlspath "$destdir/$nlspath" "$locale" "$main_exec") gencatfile "$loc" "$file" + printf 'done\n' + done # Now that we have done the non-symlinks, it's time to do the symlinks. Think @@ -275,6 +280,8 @@ for file in $locales_dir/*.msg; do # Make sure to skip non-symlinks; they are already done. if [ -L "$file" ]; then + printf 'Linking %s...' "$locale" + # This song and dance is because we want to generate relative symlinks. # They take less space, but also, they are more resilient to being # moved. @@ -294,6 +301,8 @@ for file in $locales_dir/*.msg; do # Finally, symlink to the install of the generated cat file that # corresponds to the correct msg file. ln -fs "$rel" "$loc" + + printf 'done\n' fi done diff --git a/contrib/bc/src/data.c b/contrib/bc/src/data.c index 1694bb684718..284d3de7b642 100644 --- a/contrib/bc/src/data.c +++ b/contrib/bc/src/data.c @@ -71,7 +71,7 @@ const uchar dc_sig_msg_len = (uchar) (sizeof(dc_sig_msg) - 1); /// The copyright banner. const char bc_copyright[] = "Copyright (c) 2018-2023 Gavin D. Howard and contributors\n" - "Report bugs at: https://git.yzena.com/gavin/bc\n\n" + "Report bugs at: https://git.gavinhoward.com/gavin/bc\n\n" "This is free software with ABSOLUTELY NO WARRANTY.\n"; // clang-format on diff --git a/contrib/bc/tests/all.sh b/contrib/bc/tests/all.sh index 0ef8ae6cb49b..099804777c13 100755 --- a/contrib/bc/tests/all.sh +++ b/contrib/bc/tests/all.sh @@ -32,6 +32,18 @@ testdir=$(dirname "$script") . "$testdir/../scripts/functions.sh" +# Just print the usage and exit with an error. This can receive a message to +# print. +# @param 1 A message to print. +usage() { + if [ $# -eq 1 ]; then + printf '%s\n\n' "$1" + fi + print 'usage: %s [-n] dir [run_extra_tests] [run_stack_tests] [gen_tests] [run_problematic_tests] [time_tests] [exec args...]\n' \ + "$script" + exit 1 +} + # We need to figure out if we should run stuff in parallel. pll=1 @@ -48,50 +60,63 @@ done if [ "$#" -ge 1 ]; then d="$1" shift + check_d_arg "$d" else - err_exit "usage: $script [-n] dir [run_extra_tests] [run_stack_tests] [gen_tests] [run_problematic_tests] [time_tests] [exec args...]" 1 + usage "Not enough arguments" fi if [ "$#" -lt 1 ]; then extra=1 + check_bool_arg "$extra" else extra="$1" *** 699 LINES SKIPPED ***