aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/dc
Commit message (Collapse)AuthorAgeFilesLines
* Adjust history, info source from v1's manualsSevan Janiyan2019-09-041-2/+2
| | | | | | | | | https://www.bell-labs.com/usr/dmr/www/1stEdman.html MFC after: 5 days Notes: svn path=/head/; revision=351811
* Drop "All rights reserved" from the files I ownAlan Somers2019-03-112-2/+0
| | | | | | | | | Also, add SPDX tags where needed. MFC after: 2 weeks Notes: svn path=/head/; revision=345034
* Make dc(1) buildable.Jung-uk Kim2018-09-192-18/+20
| | | | Notes: svn path=/projects/openssl111/; revision=338784
* dc: make use of caph_enterEitan Adler2018-06-181-2/+2
| | | | | | | We already use caph library so this makes sense. Notes: svn path=/head/; revision=335312
* dc(1): fix modulo operations with fractional inputsAlan Somers2017-12-075-15/+179
| | | | | | | | | | | | | | Our dc(1) has never correctly calculated remainders with fractional inputs. Both bmod and bdivmod seem to have copy/pasted code from bdiv, which results in the remainder having the wrong output scale. PR: 162495 Reported by: anonymous Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D13390 Notes: svn path=/head/; revision=326652
* dc(1): fix input of non-decimal fractional numbersAlan Somers2017-12-058-33/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=326556
* Reap dead codeAlan Somers2017-12-021-6/+1
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=326455
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* bc/dc/patch: make some use of reallocarray(3).Pedro F. Giffuni2017-03-055-13/+13
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=314704
* dc(1): Introduce e command, equivalent to p, but writes to stderrPedro F. Giffuni2017-02-282-1/+19
| | | | | | | | Obtained from: OpenBSD MFC after: 2 weeks Notes: svn path=/head/; revision=314409
* dc(1): Merge minor changes from OpenBSD.Pedro F. Giffuni2017-02-263-43/+23
| | | | | | | | | | | | | | Prefer setvbuf() to setlinebuf() for portability. Some style(9) and redundant tests for NULL. These are only meant to ease up merging newer changes but we are skipping changes done in order to accomodate OpenBSD's pledge support. Obtained from: OpenBSD MFC after: 2 weeks Notes: svn path=/head/; revision=314321
* dc(1): Catch up with OpenBSD tag.Pedro F. Giffuni2017-02-261-1/+1
| | | | | | | | | | OpenBSD rev 1.12 corresponds to our SVN r275162. Update the tag to make easier future updates. No functional change. MFC after: 3 days Notes: svn path=/head/; revision=314316
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2016-11-131-0/+1
| | | | | | | | MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=308606
* Capsicumize some trivial stdio programsConrad Meyer2016-11-081-5/+21
| | | | | | | | | | | | Trivially capsicumize some simple programs that just interact with stdio. This list of programs uses 'pledge("stdio")' in OpenBSD. No objection from: allanjude, emaste, oshogbo Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8307 Notes: svn path=/head/; revision=308432
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-272-5/+4
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Updated dependenciesSimon J. Gerraty2014-05-161-0/+1
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Merge headSimon J. Gerraty2014-04-284-35/+40
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * \ sync from headSimon J. Gerraty2013-04-121-1/+1
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=249429
| * | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | Sync with HEAD.David E. O'Brien2013-02-083-42/+66
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | Init array field in the proper place.Kevin Lo2014-11-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=275162
* | | | | Convert to usr.bin/ to LIBADDBaptiste Daroussin2014-11-251-2/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275042
* | | | Sync with OpenBSD.Xin LI2014-04-164-35/+40
| |_|/ |/| | | | | | | | | | | | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=264573
* | | Properly handle '-h' argument.Glen Barber2013-02-281-1/+1
| |/ |/| | | | | | | | | | | | | | | PR: 176332 Reviewed by: scottl MFC after: 3 days Notes: svn path=/head/; revision=247441
* | - Use BN_set_negative() and BN_is_negative() instead of subtracting orKevin Lo2012-12-303-42/+66
|/ | | | | | | | | | comparing to zero. - Fix fractional number exponentiation, especially for negative exponents. Obtained from: OpenBSD Notes: svn path=/head/; revision=244861
* Minor mdoc nits.Joel Dahl2012-05-131-3/+3
| | | | Notes: svn path=/head/; revision=235400
* - Fix an erroneous invocation of the editline.Kevin Lo2012-03-151-1/+1
| | | | | | | | | | | - Fix wrong scaling in the bc.library. - Let length(0.000) conform to what gnu bc does. PR: bin/159227 Submitted by: AIDA Shinra <shinra at j10n dot org> Notes: svn path=/head/; revision=232994
* Remove unneeded CFLAGS.Ed Schouten2011-11-071-1/+0
| | | | | | | | | | | Such optimisations should not be performed in this Makefile. Also, uqs@ suggested they have no effect, because the checksum of the resulting binary is unchanged. Discussed with: gabor, uqs Notes: svn path=/head/; revision=227299
* Add missing static keywords to dc(1)Ed Schouten2011-11-061-2/+2
| | | | Notes: svn path=/head/; revision=227163
* Move most of the remaining USD/PSD/SMM papers into share/docUlrich Spörlein2010-12-041-753/+0
| | | | Notes: svn path=/head/; revision=216178
* - Axe out signal handling code, the shell will take care of thisGabor Kovesdan2010-06-101-10/+0
| | | | | | | | Suggested by: jilles Approved by: delphij (mentor) Notes: svn path=/head/; revision=208975
* - Fix style(9)Gabor Kovesdan2010-06-101-2/+2
| | | | | | | | Submitted by: ed Approved by: delphij (mentor) Notes: svn path=/head/; revision=208974
* - Fix signal handling in bc/dc. Now Ctrl-C terminates the execution.Gabor Kovesdan2010-06-061-17/+5
| | | | | | | | Requested by: gk (via private mail) Approved by: delphij (mentor) Notes: svn path=/head/; revision=208868
* - Fig segmentation faultGabor Kovesdan2010-06-061-1/+6
| | | | | | | Submitted by: Hizel Ildar <hizel@vyborg.ru> (via current@) Notes: svn path=/head/; revision=208867
* - style(9)Gabor Kovesdan2010-02-036-170/+165
| | | | | | | Approved by: delphij (mentor) Notes: svn path=/head/; revision=203443
* - Remove dead variable assignmentsGabor Kovesdan2010-02-032-12/+6
| | | | | | | | | | - Fix -x Submitted by: uqs Approved by: delphij (mentor) Notes: svn path=/head/; revision=203438
* - style.Makefile(5)Gabor Kovesdan2010-02-031-1/+2
| | | | | | | | Submitted by: uqs Approved by: delphij (mentor) Notes: svn path=/head/; revision=203437
* - Collapase short and long options together;Xin LI2010-01-221-15/+11
| | | | | | | | | - Use consistent marking up with bc(1)'s reference section. Reviewed by: gabor Notes: svn path=/head/; revision=202847
* Move USD documents from /usr/share/doc/papers to to /usr/share/doc/usd.Xin LI2010-01-222-18/+0
| | | | | | | Reviewed by: gabor Notes: svn path=/head/; revision=202843
* Makefile cleanups:Xin LI2010-01-211-3/+1
| | | | | | | | | | | o Enable building of USD o Remove commented out targets o Remove WARNS?=6 lines since it's the default Reviewed by: gabor Notes: svn path=/head/; revision=202761
* Replace GNU bc/dc with BSDL versions ported from OpenBSD. They have a goodGabor Kovesdan2010-01-2011-0/+4322
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 Notes: svn path=/head/; revision=202719