History log of /freebsd-current/usr.bin/dc/inout.c
Revision Date Author Comments
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# c45e66dc 10-Aug-2023 Enji Cooper <ngie@FreeBSD.org>

Unbreak usr.bin/dc with OpenSSL 3

OpenSSL's BN_zero API has had a void return value since 1.1.x: chase the
change to unbreak the build on OpenSSL 3.x with MK_GH_BC == no.

MFC after: 2 weeks
Reviewed by: emaste, kevans
Differential Revision: https://reviews.freebsd.org/D41410


# ee4526c0 19-Sep-2018 Jung-uk Kim <jkim@FreeBSD.org>

Make dc(1) buildable.


# 95639a80 04-Dec-2017 Alan Somers <asomers@FreeBSD.org>

dc(1): fix input of non-decimal fractional numbers

Inputting fractional non-decimal numbers has never worked correctly in our
OpenBSD-derived dc(1). It truncates the input to a number of decimal places
equal to the number of hexadecimal (or whatever base) places given on the
input. That's unacceptable, because many numbers require more precision to
represent in base 10 than in their original bases.

Fix this bug by using as many decimal places as needed to represent the
input, up to the maximum of the global scale factor.

This has one mildly surprising side effect: the scale of a number entered in
non-decimal mode will no longer necessarily equal the number of hexadecimal
(or whatever base) places given on the input. I think that's an acceptable
behavior change, given that inputting fractional non-decimal numbers never
worked in the first place, and the man page doesn't specify whether trailing
zeros on the input should affect a number's scale.

PR: 206230
Reported by: nibbana@gmx.us
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D13336


# 9ccdc623 01-Dec-2017 Alan Somers <asomers@FreeBSD.org>

Reap dead code

usr.bin/dc/inout.c
Reap some dead code that was killed back in 2003 in OpenBSD, in
version 1.8 of this file.

MFC after: 3 weeks


# 63433bc9 05-Mar-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

bc/dc/patch: make some use of reallocarray(3).

reallocarray(3) is a non portable extension from OpenBSD. Given that it is
already in FreeBSD, make easier future merges by adopting in some cases
where the code has some shared heritage with OpenBSD.

Obtained from: OpenBSD


# be848c7a 16-Apr-2014 Xin LI <delphij@FreeBSD.org>

Sync with OpenBSD.

MFC after: 2 weeks


# c3761c38 30-Dec-2012 Kevin Lo <kevlo@FreeBSD.org>

- Use BN_set_negative() and BN_is_negative() instead of subtracting or
comparing to zero.
- Fix fractional number exponentiation, especially for negative exponents.

Obtained from: OpenBSD


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 7121df63 03-Feb-2010 Gabor Kovesdan <gabor@FreeBSD.org>

- style(9)

Approved by: delphij (mentor)


# fdf1f88b 20-Jan-2010 Gabor Kovesdan <gabor@FreeBSD.org>

Replace GNU bc/dc with BSDL versions ported from OpenBSD. They have a good
compatibility level with the GNU counterparts and have shown to be mature
enough. For now, the GNU versions aren't removed from the tree, just detached
from the build.

Sponsored by: Google Summer of Code 2008
Portbuild run by: erwin
Approved by: delphij