Skip to content

Commit 4717329

Browse files
committed
bc-1.06
1 parent 79517fd commit 4717329

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+10734
-5087
lines changed

AUTHORS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Phil Nelson <[email protected]> wrote bc, including the number.c
1+
Phil Nelson <[email protected]> wrote bc, including the number.c
22
source in the "lib" directory.
33

44
Ken Pizzini wrote dc.

COPYING

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
21
GNU GENERAL PUBLIC LICENSE
32
Version 2, June 1991
43

54
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
6-
675 Mass Ave, Cambridge, MA 02139, USA
5+
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
76
Everyone is permitted to copy and distribute verbatim copies
87
of this license document, but changing it is not allowed.
98

@@ -280,7 +279,7 @@ POSSIBILITY OF SUCH DAMAGES.
280279

281280
END OF TERMS AND CONDITIONS
282281

283-
Appendix: How to Apply These Terms to Your New Programs
282+
How to Apply These Terms to Your New Programs
284283

285284
If you develop a new program, and you want it to be of the greatest
286285
possible use to the public, the best way to achieve this is to make it
@@ -292,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
292291
the "copyright" line and a pointer to where the full notice is found.
293292

294293
<one line to give the program's name and a brief idea of what it does.>
295-
Copyright (C) 19yy <name of author>
294+
Copyright (C) <year> <name of author>
296295

297296
This program is free software; you can redistribute it and/or modify
298297
it under the terms of the GNU General Public License as published by
@@ -306,14 +305,15 @@ the "copyright" line and a pointer to where the full notice is found.
306305

307306
You should have received a copy of the GNU General Public License
308307
along with this program; if not, write to the Free Software
309-
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
308+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
309+
310310

311311
Also add information on how to contact you by electronic and paper mail.
312312

313313
If the program is interactive, make it output a short notice like this
314314
when it starts in an interactive mode:
315315

316-
Gnomovision version 69, Copyright (C) 19yy name of author
316+
Gnomovision version 69, Copyright (C) year name of author
317317
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318318
This is free software, and you are welcome to redistribute it
319319
under certain conditions; type `show c' for details.
@@ -338,4 +338,3 @@ proprietary programs. If your program is a subroutine library, you may
338338
consider it more useful to permit linking proprietary applications with the
339339
library. If this is what you want to do, use the GNU Library General
340340
Public License instead of this License.
341-

COPYING.LIB

+515
Large diffs are not rendered by default.

ChangeLog

+221-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,224 @@
1+
Wed Sep 27 17:19:48 2000 Phil Nelson <[email protected]>
2+
3+
* doc/bc.texi: Added new file. Mainly translated from bc.1
4+
by Brian Youmans.
5+
doc/bc.1: Minor changes made as part of reviewing bc.texi.
6+
7+
Wed Sep 20 11:45:00 2000 Phil Nelson <[email protected]>
8+
9+
* bc/bc.y: Added a comment on the meanings of lvals.
10+
11+
Wed Sep 13 11:40:24 2000 Phil Nelson <[email protected]>
12+
13+
* bc/main.c: add --interactive to long options.
14+
bc/bc.1: add -i/--interactive to doc.
15+
MANY: Update FSF address and Phil's e-mail.
16+
17+
Tue Sep 12 13:58:16 2000 Phil Nelson <[email protected]>
18+
19+
* NEWS: update for recent changes.
20+
bc/bc.y: remove required parens around return expression.
21+
doc/bc.1: update for recent changes.
22+
23+
Fri Sep 8 10:20:01 2000 Phil Nelson <[email protected]>
24+
25+
* bc/Makefile.am, dc/Makefile.am, lib/Makefile.am:
26+
Compile with unsigned characters.
27+
bc/main.c: Add --help option.
28+
bc/scan.l: Print illegal, non-printable characters in octal.
29+
30+
Fri Sep 8 09:36:54 2000 Phil Nelson <[email protected]>
31+
32+
* bc/bc.y: Allow more newlines in function definitions.
33+
bc/proto.h: Don't prototype main.
34+
35+
Fri Sep 1 16:09:50 2000 Phil Nelson <[email protected]>
36+
37+
* bc/bc.y: Spelling correction
38+
bc/execute.c: Correct expressions for multi-byte names.
39+
bc/load.c: Add parens for correct casting.
40+
doc/bc.1: Typos.
41+
Above fixes pointed out by [email protected] (Karl Heuer).
42+
43+
Tue Aug 29 23:03:30 PDT 2000 Phil Nelson <[email protected]>
44+
45+
* lib/testmul.c: #ifdef out a declaration matching #ifdef out
46+
code.
47+
48+
Mon Jul 31 07:01:42 2000 Ken Pizzini <[email protected]>
49+
50+
* dc/numeric.c: use of the "n" command can cause a number to be printed
51+
without a trailing newline, which would cause the column counter to
52+
fail to be reset and result in inappropriately wrapped numeric outputs.
53+
Fixed by always clearing the column counter before outputting each number.
54+
55+
* dc/stack.c: if a stack is used without ever using the correspondingly
56+
named register, it is perfectly legitimate for the register to be
57+
uninitialized; added an "else if" to handle this case without aborting.
58+
59+
* dc/eval.c: updated the comment explaining the restrictions
60+
on the | command to better reflect reality.
61+
62+
* doc/dc.texi: update the FSF office address in the copyright notice
63+
64+
Thu Jul 13 18:13:00 2000 Phil Nelson <[email protected]>
65+
66+
* README: note --with-libedit configure parameter.
67+
68+
Tue Jun 20 22:52:10 2000 Phil Nelson <[email protected]>
69+
70+
* bc/bcdefs.h: Include <readline/history.h> to quiet warnings.
71+
72+
* configure.in: make --with-readline and --with-libedit work correctly.
73+
74+
* Makefile.am: use $(MAKE) instead of directly calling make.
75+
76+
* lib/testmul.c: Update to use bc_ on all number.c routines.
77+
78+
Sat Jun 10 22:44:29 2000 Phil Nelson <[email protected]>
79+
80+
* bc/Makefile.am: Add scan.c to maintainer-clean target.
81+
82+
* acconfig.h configure.in stamp-h.in bc/Makefile.am bc/execute.c
83+
bc/fix-libmath_h bc/global.c bc/load.c bc/main.c bc/storage.c:
84+
Remove long string for libmath. Clean up for compiler errors.
85+
86+
* dc/numeric.c: Correct parameter name.
87+
88+
Wed May 10 15:51:16 2000 Phil Nelson <[email protected]>
89+
90+
* {bc,doc,dc,lib}/Makefile.am: Add Makefile.in to maintainer-clean.
91+
92+
* bootstrap.sh: Added script to run the auto* tools.
93+
94+
* Imported all into CVS tree.
95+
96+
Sun 2000-05-07 Phil Nelson <[email protected]>
97+
98+
* bc/Makefile.am, dc/Makefile.am, lib/Makefile.am: Add -Wall to CFLAGS.
99+
100+
* bc/{execute.c,proto.h,storage.c,util.c}, dc/numeric.c: Changes for
101+
-Wall and for name changes in lib/number.c. (Added bc_ to several
102+
routine. Updated copyright notice.)
103+
104+
* h/number.h, lib/number.c: Now comes from bcmath library which is
105+
distributed in a different place.
106+
107+
Wed Mar 29 17:47:34 2000 Phil Nelson <[email protected]>
108+
109+
* bc/{bc.y,bcdefs.h,global.h,main.c,proto.h,scan.l,storage.c}:
110+
Added BSD libedit support. Generic support for both where possible.
111+
Fixed bugs in readline support noticed during libedit addition.
112+
Works with NetBSD-1.4.1 libedit.
113+
* doc/bc.1: Documented libedit addition.
114+
115+
Wed Mar 29 10:20:18 2000 Phil Nelson <[email protected]>
116+
117+
* FAQ: Added this file.
118+
* Makfile.am: Added FAQ to distribution
119+
120+
Tue Mar 28 13:52:35 2000 Phil Nelson <[email protected]>
121+
122+
* lib/number.c, h/number.h: Moved definitions so
123+
number.c/number.h is a stand-alone "library".
124+
Changed definition of out_num to not reference a global.
125+
* lib/testmul.c: updated #includes for number.h changes.
126+
* h/{bcdefs.h,const.h,global.h,proto.h} moved to
127+
bc where they really belong.
128+
* bc/execute.c: Changed calls to out_num for correctness.
129+
* dc/numeric.c: Changed calls to out_num for correctness,
130+
include only number.h now and not all the other junk.
131+
* configure.in, acconfig.h: Start of support for BSD libedit,
132+
added --with-pkg for NetBSD /usr/pkg tree.
133+
134+
Tue Mar 28 11:20:00 2000 Phil Nelson <[email protected]>
135+
136+
* Test/{exp.b,fact.b,jn.b,mul.b,raise.b}: Tweeks on the tests
137+
run to do more computation and test the recursive multiply.
138+
* bc/scan.l: Removed a printf('\r') that was unneeded.
139+
140+
Mon Mar 27 14:00:00 2000 Phil Nelson <[email protected]>
141+
142+
* NEWS: Updated for 1.06.
143+
* lib/number.c, h/number.h: Fixed bugs in recursive multiply.
144+
Changed these files to be under the LGPL.
145+
* Tests/jn.b: Added more tests.
146+
* lib/Makefile.am: Only generate a timed version of number.o if
147+
requested.
148+
* README: Updated with information on how to generate a timed
149+
version of number.o.
150+
* h/version.h: Updated copyright and version number for dc.
151+
152+
Thu Mar 16 14:01:45 2000 Phil Nelson <[email protected]>
153+
154+
* doc/bc.1, doc/dc.1, doc/dc.texi: Changed bug reporting address
155+
to [email protected] to update with what we hope will be reality.
156+
157+
Tue Feb 8 08:54:19 2000 Phil Nelson <[email protected]>
158+
159+
* doc/bc.1, bc/util.c: Removed "multiply digits"
160+
limit due to new recursive algorithm that doesn't
161+
have those limits.
162+
163+
Tue Feb 8 08:47:05 2000 Phil Nelson <[email protected]>
164+
165+
* lib/Makefile.am, lib/testmul.c, lib/number.c, Makefile.am:
166+
Finally got a resonable version of the program
167+
to test the crossover between non-recursive and
168+
recursive multiply algorithms. Added to distribution
169+
and build process. Does increase build time by
170+
about 10 minutes.
171+
172+
Wed Oct 6 13:28:59 1999 Phil Nelson <[email protected]>
173+
174+
* lib/Makefile.am: Added rules to allow DEFSADD definitions.
175+
176+
Sat Oct 2 19:59:51 1999 Phil Nelson <[email protected]>
177+
178+
* bc/libmath.b: Correctly do the cosine accuracy.
179+
180+
Fri Oct 1 12:41:51 1999 Phil Nelson <[email protected]>
181+
182+
* lib/number.c: Increase accuracy of computing raise.
183+
Also turn off use of recursive multiply routines
184+
until furthur testing.
185+
* bc/libmath.b: Increase accuracy of cosine.
186+
* bc/Makefile.am: Remove -lfl from items to make.
187+
188+
Wed Jul 28 10:29:28 1999 Phil Nelson <[email protected]>
189+
190+
* bc/scan.l: rl_len from char to int. (From FreeBSD
191+
bug tracking system and Nick Hibma <[email protected]>)
192+
193+
Tue Jun 22 08:00:28 1999 Phil Nelson <[email protected]>
194+
195+
* lib/number.c: Rewrote bc_multiply to use a faster
196+
algorithm. Old code not removed yet.
197+
198+
Mon Jun 21 03:08:02 1999 Phil Nelson <[email protected]>
199+
200+
* h/version.h: Updated version number to 1.06.
201+
bc/bc.y: Corrected bug in for statement, not popping.
202+
bc/execute.c: Improved stack dump/instruction tracing.
203+
204+
Tue Jun 15 22:30:42 1999 Phil Nelson <[email protected]>
205+
206+
* configure.in: Updated bc version to 1.06.
207+
208+
Tue Jun 15 22:27:44 1999 Phil Nelson <[email protected]>
209+
210+
* h/bcdefs.h, h/const.h, bc/execute.c, bc/load.c, bc/storage.c,
211+
bc/util.c: Removed segmented function storaged. Now
212+
dynamically expands (by doubling, starting at 1024 bytes)
213+
to allow arbitrary sized functions.
214+
215+
Thu Jun 10 22:33:44 1999 Phil Nelson <[email protected]>
216+
217+
* bc/libmath.b: change scaling in computation of j(n,x) so
218+
it correctly computes the value.
219+
220+
Wed Jun 10 10:10:10 1998 Release of bc-1.05a.
221+
1222
Fri Apr 17 10:40:59 1998 Phil Nelson <[email protected]>
2223

3224
* bc/main.c: Enable readline only if interactive.
@@ -820,4 +1041,3 @@ Tue Oct 29 10:06:32 1991 Phil Nelson (phil at cs.wwu.edu)
8201041
* Called current version 1.00.
8211042

8221043
* Submitted GNU bc-1.00 to comp.sources.reviewed
823-

FAQ

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Because of frequent questions ....... here is the BC FAQ
2+
3+
4+
1) Why does BC have its own arbitrary precision number routines
5+
(found in lib/number.c) rather than using GMP?
6+
7+
GMP has "integers" (no digits after a decimal), "rational numbers"
8+
(stored as 2 integers) and "floats". None of these will correctly
9+
represent a POSIX BC number. Floats are the closest, but will not
10+
behave correctly for many computations. For example, BC numbers have
11+
a "scale" that represent the number of digits to represent after the
12+
decimal point. The multiplying two of these numbers requires one to
13+
calculate an exact number of digits after the decimal point regardless
14+
of the number of digits in the integer part. GMP floats have a
15+
"fixed, but arbitrary" mantissa and so multiplying two floats will end
16+
up dropping digits BC must calculate.
17+

Makefile.am

+9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
## Process this file with automake to produce Makefile.in
2+
23
SUBDIRS = lib bc dc doc
34

5+
MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in \
6+
$(distdir).tar.gz h/number.h
7+
48
dist-hook:
59
mkdir $(distdir)/h $(distdir)/Examples $(distdir)/Test
610
cp -p $(srcdir)/h/*.h $(distdir)/h
711
cp -p $(srcdir)/Examples/*.b $(distdir)/Examples
812
cp -p $(srcdir)/Test/*.b $(srcdir)/Test/*.bc $(distdir)/Test
913
cp -p $(srcdir)/Test/signum $(srcdir)/Test/timetest $(distdir)/Test
14+
cp -p $(srcdir)/lib/testmul.c $(distdir)/lib
15+
cp -p $(srcdir)/FAQ $(distdir)
16+
17+
timetest:
18+
(cd lib; $(MAKE) specialnumber)

0 commit comments

Comments
 (0)