44d4804d19
Merge commit 2f57ecae4b
This is a new major release with a number of changes and extensions:
- Limited the number of temporary numbers and made the space for them
static so that allocating more space for them cannot fail.
- Allowed integers with non-zero scale to be used with power, places,
and shift operators.
- Added greatest common divisor and least common multiple to lib2.bc.
- Made bc and dc UTF-8 capable.
- Added the ability for users to have bc and dc quit on SIGINT.
- Added the ability for users to disable prompt and TTY mode by
environment variables.
- Added the ability for users to redefine keywords.
- Added dc's modular exponentiation and divmod to bc.
- Added the ability to assign strings to variables and array elements
and pass them to functions in bc.
- Added dc's asciify command and stream printing to bc.
- Added bitwise and, or, xor, left shift, right shift, reverse,
left rotate, right rotate, and mod functions to lib2.bc.
- Added the functions s2u(x) and s2un(x,n), to lib2.bc.
MFC after: 1 week
112 lines
4.0 KiB
Plaintext
112 lines
4.0 KiB
Plaintext
$ $
|
|
$ SPDX-License-Identifier: BSD-2-Clause
|
|
$ $
|
|
$ Copyright (c) 2018-2021 Gavin D. Howard and contributors.
|
|
$ $
|
|
$ Redistribution and use in source and binary forms, with or without
|
|
$ modification, are permitted provided that the following conditions are met:
|
|
$ $
|
|
$ * Redistributions of source code must retain the above copyright notice, this
|
|
$ list of conditions and the following disclaimer.
|
|
$ $
|
|
$ * Redistributions in binary form must reproduce the above copyright notice,
|
|
$ this list of conditions and the following disclaimer in the documentation
|
|
$ and/or other materials provided with the distribution.
|
|
$ $
|
|
$ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
$ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
$ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
$ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
$ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
$ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
$ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
$ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
$ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
$ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
$ POSSIBILITY OF SUCH DAMAGE.
|
|
$ $
|
|
|
|
$quote "
|
|
|
|
$ Ðàçíûå ñîîáùåíèÿ.
|
|
$set 1
|
|
|
|
1 "Ôóíêöèÿ:"
|
|
|
|
$ Òèïû îøèáîê.
|
|
$set 2
|
|
|
|
1 "Ìàòåìàòè÷åñêàÿ îøèáêà:"
|
|
2 "Îøèáêà ïðè ðàçáîðå:"
|
|
3 "Îøèáêà âûïîëíåíèÿ:"
|
|
4 "Ôàòàëüíàÿ îøèáêà:"
|
|
5 "Ïðåäóïðåæäåíèå:"
|
|
|
|
$ Ìàòåìàòè÷åñêèå îøèáêè.
|
|
$set 3
|
|
|
|
1 "îòðèöàòåëüíîå ÷èñëî"
|
|
2 "íåèíòåãðèðîâàííîå ÷èñëî"
|
|
3 "ïåðåïîëíåíèå: íîìåð íå ïîìåùàåòñÿ â àïïàðàòíûé íîìåð"
|
|
4 "äåëèòü íà 0"
|
|
|
|
$ Îøèáêè ïðè ðàçáîðå.
|
|
$set 4
|
|
|
|
1 "êîíåö ôàéëà"
|
|
2 "íåäîïóñòèìûé ñèìâîë '%c'"
|
|
3 "êîíåö ñòðîêè íå íàéäåí"
|
|
4 "êîíåö êîììåíòàðèÿ íå íàéäåí"
|
|
5 "íåäåéñòâèòåëüíûé æåòîí"
|
|
6 "íåïðàâèëüíîå âûðàæåíèå"
|
|
7 "ïóñòîå âûðàæåíèå"
|
|
8 "çàÿâëåíèå î íåäåéñòâèòåëüíîñòè ïå÷àòè èëè ïîòîêà"
|
|
9 "îïðåäåëåíèå íåäåéñòâèòåëüíîé ôóíêöèè"
|
|
10 "íåâåðíîå ïðèñâîåíèå: ëåâàÿ ñòîðîíà äîëæíà áûòü scale, ibase, obase, last, âàðîì èëè ýëåìåíòîì ìàññèâà"
|
|
11 "àâòîìàòè÷åñêàÿ ïåðåìåííàÿ íå íàéäåíà"
|
|
12 "ïàðàìåòð ôóíêöèè èëè auto \"%s%s\" óæå ñóùåñòâóåò"
|
|
13 "êîíåö áëîêà íå íàéäåí"
|
|
14 "íå ìîæåò âåðíóòü çíà÷åíèå èç ôóíêöèè void: %s()"
|
|
15 "var íå ìîæåò áûòü ññûëêîé: %s"
|
|
16 "POSIX íå äîïóñêàåò èìåí äëèííåå 1 ñèìâîëà: %s"
|
|
17 "POSIX íå äîïóñêàåò êîììåíòàðèåâ ê ñöåíàðèþ '#'"
|
|
18 "POSIX íå äîïóñêàåò ñëåäóþùåå êëþ÷åâîå ñëîâî: %s"
|
|
19 "POSIX íå äîïóñêàåò òî÷êó ('.') â êà÷åñòâå ÿðëûêà äëÿ ïîñëåäíåãî ðåçóëüòàòà"
|
|
20 "POSIX òðåáóåò ñêîáîê âîêðóã âûðàæåíèé âîçâðàòà"
|
|
21 "POSIX íå ðàçðåøàåò èñïîëüçîâàòü ñëåäóþùèé îïåðàòîð: %s"
|
|
22 "POSIX íå ðàçðåøàåò îïåðàòîðàì ñðàâíåíèÿ âûõîäèòü çà ïðåäåëû, åñëè óòâåðæäåíèÿ èëè öèêëû"
|
|
23 "POSIX òðåáóåò 0 èëè 1 îïåðàòîðà ñðàâíåíèÿ íà óñëîâèå"
|
|
24 "POSIX òðåáóåò, ÷òîáû âñå 3 ÷àñòè ïåòëè áûëè íåïóñòûìè"
|
|
25 "POSIX íå äîïóñêàåò ýêñïîíåíöèàëüíîé íîòàöèè"
|
|
26 "POSIX íå äîïóñêàåò ññûëêè íà ìàññèâ â êà÷åñòâå ïàðàìåòðîâ ôóíêöèè"
|
|
27 "POSIX òðåáóåò, ÷òîáû ëåâàÿ ñêîáêà áûëà íà òîé æå ëèíèè, ÷òî è çàãîëîâîê ôóíêöèè"
|
|
28 "POSIX íå ïîçâîëÿåò ïðèñâàèâàòü ñòðîêè ïåðåìåííûì èëè ìàññèâàì"
|
|
|
|
$ Îøèáêè âûïîëíåíèÿ.
|
|
$set 5
|
|
|
|
1 "Íåäåéñòâèòåëüíûé ibase: äîëæåí áûòü [%lu, %lu]"
|
|
2 "Íåäåéñòâèòåëüíûé obase: äîëæåí áûòü [%lu, %lu]"
|
|
3 "íåäåéñòâèòåëüíàÿ scale: äîëæíà áûòü [%lu, %lu]"
|
|
4 "íåäåéñòâèòåëüíîå âûðàæåíèå read()"
|
|
5 "ðåêóðñèâíûé âûçîâ read()"
|
|
6 "ïåðåìåííàÿ èëè ýëåìåíò ìàññèâà ÿâëÿåòñÿ íåïðàâèëüíûì òèïîì"
|
|
7 "ñòîïêà èìååò ñëèøêîì ìàëî ýëåìåíòîâ"
|
|
8 "ñòîïêà äëÿ ðåãèñòðà \"%s\" èìååò ñëèøêîì ìàëî ýëåìåíòîâ"
|
|
9 "íåïðàâèëüíîå êîëè÷åñòâî ïàðàìåòðîâ; íóæíî %zu, íóæíî %zu"
|
|
10 "íåîïðåäåëåííàÿ ôóíêöèÿ: %s()"
|
|
11 "íå ìîæåò èñïîëüçîâàòü ïóñòîå çíà÷åíèå â âûðàæåíèè"
|
|
|
|
$ Ôàòàëüíûå îøèáêè.
|
|
$set 6
|
|
|
|
1 "Íå óäàëîñü âûäåëèòü ïàìÿòü"
|
|
2 "Îøèáêà ââîäà/âûâîäà"
|
|
3 "íå ñìîã îòêðûòü ôàéë: %s"
|
|
4 "ôàéë íå ÿâëÿåòñÿ òåêñòîâûì: %s"
|
|
5 "ïóòü - ýòî êàòàëîã: %s"
|
|
6 "íåâåðíàÿ îïöèÿ êîìàíäíîé ñòðîêè: \"%s\""
|
|
7 "îïöèÿ òðåáóåò àðãóìåíòà: '%c' (\"%s\")"
|
|
8 "îïöèÿ íå ïðèíèìàåò àðãóìåíòîâ: '%c' (\"%s\")"
|
|
9 "íåâåðíûé àðãóìåíò îïöèè êîìàíäíîé ñòðîêè: \"%s\""
|