An implementation of Unix dc and POSIX bc with GNU and BSD extensions. Finished, but well-maintained.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

113 lines
4.2 KiB

$ $
$ 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 íå ðàçðåøàåò ôóíêöèè ïóñòîòû"
29 "POSIX òðåáóåò, ÷òîáû ëåâàÿ ñêîáêà áûëà íà òîé æå ëèíèè, ÷òî è çàãîëîâîê ôóíêöèè"
30 "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\""