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.
 
 
 
 
 

112 lines
4.1 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 "ÎÅÐÒÁ×ÉÌØÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÐÁÒÁÍÅÔÒÏ×; ÎÕÖÎÏ %zu, ÎÕÖÎÏ %zu"
9 "ÎÅÏÐÒÅÄÅÌÅÎÎÁÑ ÆÕÎËÃÉÑ: %s()"
10 "ÎÅ ÍÏÖÅÔ ÉÓÐÏÌØÚÏ×ÁÔØ ÐÕÓÔÏÅ ÚÎÁÞÅÎÉÅ × ×ÙÒÁÖÅÎÉÉ"
$ æÁÔÁÌØÎÙÅ ÏÛÉÂËÉ.
$set 6
1 "îÅ ÕÄÁÌÏÓØ ×ÙÄÅÌÉÔØ ÐÁÍÑÔØ"
2 "ïÛÉÂËÁ ××ÏÄÁ/×Ù×ÏÄÁ"
3 "ÎÅ ÓÍÏÇ ÏÔËÒÙÔØ ÆÁÊÌ: %s"
4 "ÆÁÊÌ ÎÅ Ñ×ÌÑÅÔÓÑ ÔÅËÓÔÏ×ÙÍ: %s"
5 "ÐÕÔØ - ÜÔÏ ËÁÔÁÌÏÇ: %s"
6 "ÎÅ×ÅÒÎÁÑ ÏÐÃÉÑ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÉ: \"%s\""
7 "ÏÐÃÉÑ ÔÒÅÂÕÅÔ ÁÒÇÕÍÅÎÔÁ: '%c' (\"%s\")"
8 "ÏÐÃÉÑ ÎÅ ÐÒÉÎÉÍÁÅÔ ÁÒÇÕÍÅÎÔÏ×: '%c' (\"%s\")"
9 "ÎÅ×ÅÒÎÙÊ ÁÒÇÕÍÅÎÔ ÏÐÃÉÉ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÉ: \"%s\""