2020-07-07 07:02:33 +00:00
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
2021-01-31 19:56:48 +00:00
$ Copyright (c) 2018-2021 Gavin D. Howard and contributors.
2020-07-07 07:02:33 +00:00
$ $
$ 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.
$ $
Import new 2-clause BSD licenced implementation of the bc and dc commands
These implementations of the bc and dc programs offer a number of advantages
compared to the current implementations in the FreeBSD base system:
- They do not depend on external large number functions (i.e. no dependency
on OpenSSL or any other large number library)
- They implements all features found in GNU bc/dc (with the exception of
the forking of sub-processes, which the author of this version considers
as a security issue).
- They are significantly faster than the current code in base (more than
2 orders of magnitude in some of my tests, e.g. for 12345^100000).
- They should be fully compatible with all features and the behavior of the
current implementations in FreeBSD (not formally verified).
- They support POSIX message catalogs and come with localized messages in
Chinese, Dutch, English, French, German, Japanese, Polish, Portugueze,
and Russian.
- They offer very detailed man-pages that provide far more information than
the current ones.
Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
Differential Revision: https://reviews.freebsd.org/D19982
2020-06-27 15:03:19 +00:00
$quote "
$ <20> <> <EFBFBD> <EFBFBD> ¾<EFBFBD> Υ <EFBFBD> <CEA5> å<EFBFBD> <C3A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
$set 1
1 "<22> ؿ<EFBFBD> <D8BF> <EFBFBD> "
$ <20> <> <EFBFBD> 顼<EFBFBD> μ<EFBFBD> <CEBC> ࡣ
$set 2
1 "<22> <> <EFBFBD> ؤΥ <D8A4> <CEA5> 顼<EFBFBD> <E9A1BC> "
2 "<22> ѡ <EFBFBD> <D1A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 顼<EFBFBD> <E9A1BC> "
3 "<22> <> <EFBFBD> <EFBFBD> <F3A5BFA5> २<EFBFBD> 顼<EFBFBD> <E9A1BC> "
4 "<22> <> ̿Ū<CCBF> ʥ<EFBFBD> <CAA5> 顼<EFBFBD> <E9A1BC> "
5 "<22> ٹ<EFBFBD> <D9B9> <EFBFBD> "
$ <20> <> <EFBFBD> ؤΥ <D8A4> <CEA5> 顼<EFBFBD> Ǥ<EFBFBD> <C7A4> <EFBFBD>
$set 3
1 "<22> <> <EFBFBD> ο <EFBFBD> "
2 "<22> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> "
3 "<22> <> <EFBFBD> <EFBFBD> <EFBFBD> С <EFBFBD> <D0A1> ե<EFBFBD> <D5A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϡ<EFBFBD> <CFA1> ɥ<EFB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FBD> <EFBFBD> <EFBFBD> <EFBFBD> Ȥ<F3BBB2BE> <C8A4> <EFBFBD> <EFBFBD> Ĥ<EFBFBD> <C4A4> ޤ<EFBFBD> <DEA4> <EFBFBD> <EFBFBD> <EFBFBD> "
27 "POSIX<49> Ǥϡ<C7A4> <CFA1> ؿ<EFBFBD> <D8BF> إå<D8A5> <C3A5> <EFBFBD> Ʊ<EFBFBD> <C6B1> <EFBFBD> Ԥ˺<D4A4> <CBBA> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ̤<EFBFBD> <CCA4> <EFBFBD> <EFBFBD> 뤳<EFBFBD> Ȥ<EFBFBD> ɬ<EFBFBD> פǤ<D7A4> <C7A4> <EFBFBD> "
$ <20> <> <EFBFBD> <EFBFBD> <F3A5BFA5> २<EFBFBD> 顼<EFBFBD> <E9A1BC>
$set 5
1 "̵<> <CCB5> <EFBFBD> <EFBFBD> ibase<73> <65> <EFBFBD> <EFBFBD> [<5B> <> lu<6C> <75> <EFBFBD> <EFBFBD> lu]<5D> Ǥʤ<C7A4> <CAA4> <EFBFBD> <EFBFBD> Фʤ<D0A4> <CAA4> ޤ<EFBFBD> <DEA4> <EFBFBD> "
2 "̵<> <CCB5> <EFBFBD> <EFBFBD> obase<73> <65> <EFBFBD> <EFBFBD> [<5B> <> lu<6C> <75> <EFBFBD> <EFBFBD> lu]<5D> Ǥʤ<C7A4> <CAA4> <EFBFBD> <EFBFBD> Фʤ<D0A4> <CAA4> ޤ<EFBFBD> <DEA4> <EFBFBD> "
3 "̵<> <CCB5> <EFBFBD> <EFBFBD> scale<6C> <65> <EFBFBD> <EFBFBD> [<5B> <> lu<6C> <75> <EFBFBD> <EFBFBD> lu]<5D> Ǥʤ<C7A4> <CAA4> <EFBFBD> <EFBFBD> Фʤ<D0A4> <CAA4> ޤ<EFBFBD> <DEA4> <EFBFBD> "
4 "<22> <> <EFBFBD> <EFBFBD> ̵<EFBFBD> <CCB5> read()"
5 "<22> Ƶ<EFBFBD> Ū<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