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.
The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.
Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.
Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D19982
2020-06-27 12:02:01 +00:00
|
|
|
|
|
|
|
.include <src.opts.mk>
|
|
|
|
|
|
|
|
PROG= gh-bc
|
|
|
|
PROGNAME= bc
|
|
|
|
|
|
|
|
BCDIR= ${SRCTOP}/contrib/${PROGNAME}
|
|
|
|
|
usr.bin/ghä-bc, contrib/bc: update to version 5.0.0
Merge commit 2f57ecae4b98e76e5d675563785a7e6c59c868c4
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
2021-08-10 08:42:54 +00:00
|
|
|
SRCS= args.c bc.c bc_lex.c bc_parse.c data.c dc.c dc_lex.c dc_parse.c file.c history.c
|
|
|
|
SRCS+= lang.c lex.c main.c num.c opt.c parse.c program.c rand.c read.c vector.c vm.c
|
|
|
|
SRCS+= bc_help.c dc_help.c lib.c lib2.c
|
|
|
|
|
2022-06-11 11:03:06 +00:00
|
|
|
LIBADD= edit
|
|
|
|
|
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.
The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.
Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.
Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D19982
2020-06-27 12:02:01 +00:00
|
|
|
MAN= bc.1 dc.1
|
|
|
|
|
|
|
|
LINKS= ${BINDIR}/bc ${BINDIR}/dc
|
|
|
|
|
|
|
|
.PATH: ${BCDIR}/src ${BCDIR}/gen ${BCDIR}/manuals ${.OBJDIR}
|
|
|
|
|
|
|
|
CATALOGS= en_US.UTF-8
|
|
|
|
CATALOGS+= de_DE.UTF-8 de_DE.ISO8859-1
|
2020-07-07 07:51:09 +00:00
|
|
|
CATALOGS+= es_ES.UTF-8 es_ES.ISO8859-1
|
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.
The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.
Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.
Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D19982
2020-06-27 12:02:01 +00:00
|
|
|
CATALOGS+= fr_FR.UTF-8 fr_FR.ISO8859-1
|
|
|
|
CATALOGS+= ja_JP.UTF-8 ja_JP.eucJP
|
|
|
|
CATALOGS+= nl_NL.UTF-8 nl_NL.ISO8859-1
|
|
|
|
CATALOGS+= pl_PL.UTF-8 pl_PL.ISO8859-2
|
|
|
|
CATALOGS+= pt_PT.UTF-8 pt_PT.ISO8859-1
|
|
|
|
CATALOGS+= ru_RU.UTF-8 ru_RU.ISO8859-5 ru_RU.CP1251 ru_RU.CP866 ru_RU.KOI8-R
|
|
|
|
CATALOGS+= zh_CN.UTF-8 zh_CN.eucCN zh_CN.GB18030 zh_CN.GB2312 zh_CN.GBK
|
|
|
|
|
|
|
|
NLSNAME= bc
|
|
|
|
NLSSRCDIR= ${BCDIR}/locales
|
|
|
|
|
usr.bin/ghä-bc, contrib/bc: update to version 5.0.0
Merge commit 2f57ecae4b98e76e5d675563785a7e6c59c868c4
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
2021-08-10 08:42:54 +00:00
|
|
|
CFLAGS+= -DBC_DEFAULT_BANNER=0
|
2023-01-28 22:48:34 +00:00
|
|
|
CFLAGS+= -DBC_DEFAULT_DIGIT_CLAMP=0
|
|
|
|
CFLAGS+= -DBC_DEFAULT_EXPR_EXIT=1
|
usr.bin/ghä-bc, contrib/bc: update to version 5.0.0
Merge commit 2f57ecae4b98e76e5d675563785a7e6c59c868c4
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
2021-08-10 08:42:54 +00:00
|
|
|
CFLAGS+= -DBC_DEFAULT_PROMPT=0
|
2023-01-28 22:48:34 +00:00
|
|
|
CFLAGS+= -DBC_DEFAULT_SIGINT_RESET=1
|
|
|
|
CFLAGS+= -DBC_DEFAULT_TTY_MODE=1
|
|
|
|
CFLAGS+= -DBC_ENABLED=1
|
|
|
|
CFLAGS+= -DBC_ENABLE_AFL=0
|
|
|
|
CFLAGS+= -DBC_ENABLE_EDITLINE=1
|
|
|
|
CFLAGS+= -DBC_ENABLE_EXTRA_MATH=1
|
|
|
|
CFLAGS+= -DBC_ENABLE_HISTORY=1
|
usr.bin/ghä-bc, contrib/bc: update to version 5.0.0
Merge commit 2f57ecae4b98e76e5d675563785a7e6c59c868c4
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
2021-08-10 08:42:54 +00:00
|
|
|
CFLAGS+= -DBC_ENABLE_LIBRARY=0
|
2023-01-28 22:48:34 +00:00
|
|
|
CFLAGS+= -DBC_ENABLE_MEMCHECK=0
|
|
|
|
CFLAGS+= -DBC_EXCLUDE_EXTRA_MATH=0
|
|
|
|
|
|
|
|
CFLAGS+= -DDC_DEFAULT_DIGIT_CLAMP=0
|
|
|
|
CFLAGS+= -DDC_DEFAULT_EXPR_EXIT=1
|
usr.bin/ghä-bc, contrib/bc: update to version 5.0.0
Merge commit 2f57ecae4b98e76e5d675563785a7e6c59c868c4
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
2021-08-10 08:42:54 +00:00
|
|
|
CFLAGS+= -DDC_DEFAULT_PROMPT=0
|
2023-01-28 22:48:34 +00:00
|
|
|
CFLAGS+= -DDC_DEFAULT_SIGINT_RESET=1
|
usr.bin/ghä-bc, contrib/bc: update to version 5.0.0
Merge commit 2f57ecae4b98e76e5d675563785a7e6c59c868c4
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
2021-08-10 08:42:54 +00:00
|
|
|
CFLAGS+= -DDC_DEFAULT_TTY_MODE=0
|
2023-01-28 22:48:34 +00:00
|
|
|
CFLAGS+= -DDC_ENABLED=1
|
|
|
|
|
|
|
|
CFLAGS+= -DBUILD_TYPE=A
|
|
|
|
CFLAGS+= -DMAINEXEC=${PROGNAME}
|
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.
The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.
Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.
Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D19982
2020-06-27 12:02:01 +00:00
|
|
|
CFLAGS+= -DNDEBUG
|
2023-01-28 22:48:34 +00:00
|
|
|
CFLAGS+= -DNLSPATH=/usr/share/nls/%L/%N.cat
|
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.
The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.
Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.
Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D19982
2020-06-27 12:02:01 +00:00
|
|
|
CFLAGS+= -I${BCDIR}/include
|
|
|
|
|
2023-07-29 18:52:53 +00:00
|
|
|
# prevent floating point incompatibilities caused by -flto on some architectures
|
|
|
|
.if ${MACHINE_ARCH} != riscv64
|
|
|
|
CFLAGS+= -flto
|
|
|
|
.endif
|
|
|
|
|
|
|
|
HAS_TESTS= yes
|
|
|
|
SUBDIR.${MK_TESTS}+= tests
|
|
|
|
|
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.
The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.
Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.
Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D19982
2020-06-27 12:02:01 +00:00
|
|
|
.if ${MK_NLS_CATALOGS} == "no"
|
|
|
|
CFLAGS+= -DBC_ENABLE_NLS=0
|
2020-07-07 07:51:09 +00:00
|
|
|
MAN_SRC_BC= bc/N.1
|
|
|
|
MAN_SRC_DC= dc/N.1
|
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.
The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.
Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.
Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D19982
2020-06-27 12:02:01 +00:00
|
|
|
.else
|
|
|
|
CFLAGS+= -DBC_ENABLE_NLS=1
|
2020-07-07 07:51:09 +00:00
|
|
|
MAN_SRC_BC= bc/A.1
|
|
|
|
MAN_SRC_DC= dc/A.1
|
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.
The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.
Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.
Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D19982
2020-06-27 12:02:01 +00:00
|
|
|
|
|
|
|
.for catalog in ${CATALOGS}
|
|
|
|
NLS+= ${catalog:C/.*://}
|
|
|
|
NLSSRCFILES_${catalog:C/.*://}= ${catalog:C/.*://}.msg
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
NLSLINKS_en_US.UTF-8+= en_AU.UTF-8 en_CA.UTF-8 en_GB.UTF-8 en_IE.UTF-8 \
|
|
|
|
en_NZ.UTF-8 C
|
|
|
|
NLSLINKS_en_US.UTF-8+= en_AU.US-ASCII en_CA.US-ASCII en_GB.US-ASCII \
|
|
|
|
en_NZ.US-ASCII
|
|
|
|
NLSLINKS_en_US.UTF-8+= en_AU.ISO8859-1 en_CA.ISO8859-1 en_GB.ISO8859-1 \
|
|
|
|
en_NZ.ISO8859-1 en_US.ISO8859-1
|
|
|
|
NLSLINKS_en_US.UTF-8+= en_AU.ISO8859-15 en_CA.ISO8859-15 en_GB.ISO8859-15 \
|
|
|
|
en_NZ.ISO8859-15 en_US.ISO8859-15
|
|
|
|
|
|
|
|
NLSLINKS_de_DE.UTF-8+= de_AT.UTF-8 de_CH.UTF-8
|
|
|
|
NLSLINKS_de_DE.ISO8859-1+= de_AT.ISO8859-1 de_CH.ISO8859-1
|
|
|
|
NLSLINKS_de_DE.ISO8859-1+= de_AT.ISO8859-15 de_CH.ISO8859-15 de_DE.ISO8859-15
|
|
|
|
|
2020-07-07 07:51:09 +00:00
|
|
|
NLSLINKS_es_ES.ISO8859-1+= es_ES.ISO8859-15
|
|
|
|
|
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.
The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.
Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.
Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D19982
2020-06-27 12:02:01 +00:00
|
|
|
NLSLINKS_fr_FR.UTF-8+= fr_BE.UTF-8 fr_CA.UTF-8 fr_CH.UTF-8
|
|
|
|
NLSLINKS_fr_FR.ISO8859-1+= fr_BE.ISO8859-1 fr_CA.ISO8859-1 fr_CH.ISO8859-1
|
|
|
|
NLSLINKS_fr_FR.ISO8859-1+= fr_BE.ISO8859-15 fr_CA.ISO8859-15 fr_CH.ISO8859-15 \
|
|
|
|
fr_FR.ISO8859-15
|
|
|
|
|
|
|
|
NLSLINKS_nl_NL.ISO8859-1+= nl_BE.ISO8859-1
|
|
|
|
NLSLINKS_nl_NL.ISO8859-1+= nl_BE.ISO8859-15 nl_NL.ISO8859-15
|
|
|
|
|
|
|
|
NLSLINKS_pt_PT.UTF-8+= pt_BR.UTF-8
|
|
|
|
NLSLINKS_pt_PT.ISO8859-1+= pt_BR.ISO8859-1
|
|
|
|
NLSLINKS_pt_PT.ISO8859-1+= pt_PT.ISO8859-15
|
|
|
|
.endif
|
|
|
|
|
2020-11-27 09:00:21 +00:00
|
|
|
lib.c: lib.bc Makefile
|
2023-02-24 23:07:25 +00:00
|
|
|
cd ${BCDIR} && sh gen/strgen.sh gen/lib.bc ${.OBJDIR}/lib.c 0 bc_lib bc_lib_name "" 1
|
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.
The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.
Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.
Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D19982
2020-06-27 12:02:01 +00:00
|
|
|
|
2020-11-27 09:00:21 +00:00
|
|
|
lib2.c: lib2.bc Makefile
|
2023-02-24 23:07:25 +00:00
|
|
|
cd ${BCDIR} && sh gen/strgen.sh gen/lib2.bc ${.OBJDIR}/lib2.c 0 bc_lib2 bc_lib2_name "" 1
|
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.
The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.
Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.
Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D19982
2020-06-27 12:02:01 +00:00
|
|
|
|
2020-11-27 09:00:21 +00:00
|
|
|
bc_help.c: bc_help.txt Makefile
|
2023-02-06 21:33:56 +00:00
|
|
|
cd ${BCDIR} && sh gen/strgen.sh gen/bc_help.txt ${.OBJDIR}/bc_help.c 0 bc_help "" 1 0
|
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.
The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.
Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.
Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D19982
2020-06-27 12:02:01 +00:00
|
|
|
|
2020-11-27 09:00:21 +00:00
|
|
|
dc_help.c: dc_help.txt Makefile
|
2023-02-06 21:33:56 +00:00
|
|
|
cd ${BCDIR} && sh gen/strgen.sh gen/dc_help.txt ${.OBJDIR}/dc_help.c 0 dc_help "" 1 0
|
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.
The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.
Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.
Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D19982
2020-06-27 12:02:01 +00:00
|
|
|
|
2020-07-07 07:51:09 +00:00
|
|
|
bc.1:
|
|
|
|
${CP} ${BCDIR}/manuals/${MAN_SRC_BC} ${.OBJDIR}/bc.1
|
|
|
|
|
|
|
|
dc.1:
|
|
|
|
${CP} ${BCDIR}/manuals/${MAN_SRC_DC} ${.OBJDIR}/dc.1
|
|
|
|
|
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.
The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.
Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.
Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D19982
2020-06-27 12:02:01 +00:00
|
|
|
.include <bsd.prog.mk>
|