-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCHANGES
7306 lines (5085 loc) · 268 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
The following are the changes from calc version 2.12.6.1 to date:
Improved gen_v1(h,n) in lucas.cal to use an even faster search method.
Improved are checking in lucas.cal. In particular both h and n must be
integers >= 1. In the case of both rodseth_xhn(x, h, n) and gen_v1(h, n)
h must be odd.
Fixed an C code indenting issue that was reported by Thomas Walter
<th dot walter42 at gmx dot de> in zfunc.c.
The following are the changes from calc version 2.12.6.0 to 2.12.6.0:
Added the makefile variable ${COMMON_ADD} that will add flags
to all compile and link commands. The ${COMMON_ADD} flags are
appended to both ${COMMON_CFLAGS} and ${COMMON_LDFLAGS}. This
facility is available to nearly all platforms except those with
very old make commands that do not understand the += operator.
Example on macOS (Darwin), one may invoke clang's -fsanitize
facility by:
make clobber all \
COMMON_ADD='-fsanitize=undefined -fsanitize=address'
Another example. To force C warnings to be treated as errors:
make COMMON_ADD='-Werror'
Created a GitHub repository for calc:
https://github.com/lcn2/calc
NOTE: The calc GitHub repository represents the an active
development stream. While an effort will be made to keep
the master branch of the calc GitHub repository in working
order, that tree may be unstable. Those wishing for more
reliable releases use releases found at calc mirror sites:
http://www.isthe.com/chongo/tech/comp/calc/calc-mirror.html
IMPORTANT NOTE:
On 2017 June 05, the calc GitHub history was re-written.
Anyone who was tracking the calc "pre-release" on GitHub prior
to version 2.12.6.0 should do a:
git reset --hard origin/master
git cleanup -f
Or you may just want to start over:
rm -rf calc
git clone https://github.com/lcn2/calc.git
Sorry about that. The previous GitHub repository was an useful
experiment. Based on what we learned, we decided to rebuild it.
Renamed README to README.FIRST. Added README.md for the
GitHub repository.
Fixed reading from standard input (stdin) when -p is given on
the command line. This now prints hello:
echo hello | calc -p 'stdin = files(0); print fgetline(stdin);'
Added more debugging related to stdin when bit 4 of calc_debug
is set (e.g., running calc with -D16).
Updated the calc(1) man page and 'help file' to explain about
reading from standard input (stdin).
Added some clarifying remarks for 'help ptest' explaining that
the ptest builtin can return 1 is some cases where the test
value is a pseudoprime.
Removed duplicate copyright comments from the help/builtin that
is built.
Fixed a number of typos in the CHANGES file.
The following are the changes from calc version 2.12.5.4 to 2.12.5.6:
Recompile to match current RHEL7.2 libc and friends.
Added fix by Alexandre Fedotov <fedotov at mail dot desy dot de>
to prepend ${T} in front of the CALCPATH path components
${CALC_SHAREDIR} and ${CUSTOMDIR}. Add ${T} in front of ${HELPDIR}
and ${CUSTONHELPDIR} when making conf.h.
Improved the jacobi help page.
Rewrote gen_v1() in the lucas.cal resource file using the method
based on a paper:
"A note on primality tests for N = h*2^n-1", by Oystein J. Rodseth,
Department of Mathematics, University of Bergen, BIT Numerical
Mathematics. 34 (3): pp 451-454.
http://folk.uib.no/nmaoy/papers/luc.pdf
The improved gen_v1() function is capable of returning a value
for all valid values of h and n. As a result, the trial tables
used by gen_v1() have been changed to a short list of values
to try, in order ot likelyhood of success, before doing an
exhaustive search for a v1 value to return.
Removed lucas_tbl.cal calc resource file. This file was made
obsolete by the above rewrite of the lucas.cal resource file.
This file will be removed from the local cal directory and
from CALC_SHAREDIR during a 'make install', 'make clobber',
and 'make uninstall'.
Renamed gen_u0() to gen_u2() in lucas.cal. Provided a gen_u0()
stub function that calls gen_u2() for backward compatibility.
The old gen_v1() method used by the Amdahl 6 group has been
renamed legacy_gen_v1() in lucas.cal. This function is no
longer used by the lucas(h, n) function to test the primality of
h*2^n-1. It is preserved in lucas.cal for historical purposes.
The 'make clobber' rule will attempt to remove all files that
start with libcalc and start with libcustcalc.
The 'man' command is now an alias for the 'help' command.
Fixed extra /'s that were put into CALCPATH because of ${T}.
Fixed extra /'s that were compiled into HELPDIR and CUSTOMHELPDIR.
The fix in 2.12.5.4 to to prepend ${T} in front of the CALCPATH
path components ${CALC_SHAREDIR} and ${CUSTOMDIR} broke the
calc rpm build process. The check-buildroot tool discovered
that the BUILDROOT directory had been improperly put into various
paths and binaries. This has been fixed in 2.12.5.5.
Fixed a crash that showed up on macOS (Darwin) that was reported
by Richard Outerbridge <outer at interlog dot com> and
fixed by Stuart Henderson <stu at spacehopper dot org>.
Thanks goes to both!
The following are the changes from calc version 2.12.5.3 to 2.12.5.3:
Calc version 2.12.5.2 for macOS (Darwin) users, code to installed
calc under /opt/calc. Moreover the CHANGES file did not mention
/opt/calc. Sorry about that!.
A much better tree for macOS (Darwin) users would have been
to install cal under /opt/calc. This release ONLY changes the
macOS (Darwin) install tree to /usr/local.
macOS (Darwin) users who installed calc version 2.12.5.2
should, after installing version 2.12.5.3:
rm -rf /opt/calc
The following are the changes from calc version 2.12.5.1 to 2.12.5.2:
NOTE: calc version 2.12.5.2, for macOS (Darwin) users,
installed under /opt/calc. We neglected to mention this
AND /usr/local would have been a better choice. Sorry!
Fixed in calc version 2.12.5.3.
Removed rules and makefile variables associated with shortened
calc version numbers of less than 4 levels.
Under OS X (Darwin), if /usr/include is missing, warnings
are issued to help the user use xcode-select --install
so that one may properly compile C code.
Lowered REDC levels:
#define MAXREDC 256 /* number of entries in REDC cache */
#define SQ_ALG2 28 /* size for alternative squaring */
config("sq2") == 28 /* was 3388 */
#define MUL_ALG2 28 /* size for alternative multiply */
config("mul2") == 28 /* was 1780 */
#define POW_ALG2 20 /* size for using REDC for powers */
config("pow2") == 20 /* was 176 */
#define REDC_ALG2 25 /* size for using alternative REDC */
config("redc2") == 25 /* was 220 */
The alg_config.cal script appears to be not correctly finding the
best REDC values. While it has been improved, alg_config.cal still
seems to be suspect on how it attempts to find the best values.
Fixed an intro help file mistake found by Roger Hardiman
<roger at rjh dot org dot uk>.
The following are the changes from calc version 2.12.5.0 to 2.12.5.1:
Calc has a new calc-tester mailing list. This list is for those
who are using/testing calc. We also use this list to announce
new versions of calc. To subscribe to the calc-tester mailing
list, visit the following URL:
http://www.isthe.com/chongo/tech/comp/calc/calc-tester.html
This is a low volume moderated mailing list.
This mailing list replaces calc-tester at asthe dot com list.
If you need a human to help you with your mailing list subscription,
please send Email to our special:
calc-tester-maillist-help at asthe dot com
address. To be sure we see your Email asking for help with your
mailing list subscription, please use the following phase in your
Email Subject line:
calc tester mailing list help
That phrase in your subject line will help ensure your
request will get past our anti-spam filters. You may have
additional words in your subject line.
There is a new calc bug report Email address:
calc-bug-report at asthe dot com
This replaces the old calc-bugs at asthe dot com address.
To be sure we see your Email reporting a calc bug, please use the
following phase in your Email Subject line:
calc bug report
That phrase in your subject line will help ensure your
request will get past our anti-spam filters. You may have
additional words in your subject line.
However, you may find it more helpful to simply subscribe
to the calc-tester mailing list (see above) and then to
send your report to that mailing list as a wider set calc
testers may be able to help you.
The following makefile rules that were related to printing the
upper values of the calc version, rules that were made obsolete
in calc version 2.12.4.14, have been removed:
calc_vers calc_ver calc_ve
vers ver ve
Noted that the hash() builtin function, internally known as
quickhash (used for internal objects such as the associative
arrays as well as other internal processes) uses the deprecated
32-bit FNV-0 hash. The use of this deprecated hash is sufficient
for calc internal purposes. Use of FNV-1a is recommended for
a general non-cryptographic quick hash.
The following are the changes from calc version 2.12.4.14 to 2.12.5.0:
For Apple OS X / Darwin target:
MACOSX_DEPLOYMENT_TARGET is no longer defined
using clang compiler
By default, -install-name is used when forming shared libs.
To force -install-name to not be used, set SET_INSTALL_NAME=no.
The have_stdvs.c test uses <stdlib.h> and fixed va_start() test call
that didn't use last arg.
Fixed math_fmt (printf) in value.c where a LEN (SB32) be printed as %d.
Fixed a significant bug where that resulted in an incorrect
complex number comparison. Thanks goes to David Binderman
<dcb314 at hotmail dot com> for identifying the subtle typo!
Make minor fixes to the make depend rule.
Fixed places were calc defined a reserved identifier that
begin with either __ or _[A-Z]. For example, __FILE_H__ has
been replaced with INCLUDE_FILE_H.
Fixed the addall3 example in the script help file. Thanks for this
fix goes to Igor Furlan <igor dot furlan at gmail dot com>.
We made important fixes to the calc command line history:
Fixed a bug in the command line history where calc would sometimes
crash. There was code that used memcpy() instead of memmove()
that could corrupt the command line history when entering a
into into history that was similar to a previous entry. Thanks
goes to Einar Lielmanis <einars at spicausis dot lv> for first
identifying this mistake.
The calc command line history code, in general was not robust.
We made use a patch from Mathias Buhr <napcode at users dot sf
dot net>, that while it uses a bit more memory: is much more
flexible, readable and robust. This patch replaced the improper
use of memcpy() (see above) with better code. Thanks!
The alg_config.cal calc resource file has been reworked to produce
better diagnostics while attempting to determine the ideal values
for mul2, sq2, and pow2. However, it has been shown that this
code is not correct. Suggestions for a replacement are welcome!
calc -u 'read alg_config; config("user_debug", 2),; best_mul2();'
calc -u 'read alg_config; config("user_debug", 2),; best_sq2();'
calc -u 'read alg_config; config("user_debug", 2),; best_pow2();'
Fixed a number of pedantic compiler warnings.
Removed -W and -Wno-comment from the the CCWARN makefile variable.
Removed no_implicit.arg makefile rule. Removed HAVE_NO_IMPLICIT
makefile variable. Removed no_implicit.c source file.
Added WNO_IMPLICT makefile variable to hold the compiler flag
-Wno-implicit for use on selective compile lines.
Added WNO_ERROR_LONG_LONG makefile variable to hold the compiler flag
-Wno-error=long-long for use on selective compile lines.
Added WNO_LONG_LONG makefile variable to hold the compiler flag
-Wno-long-long for use on selective compile lines.
The makefile variable ${MKDIR_ARG} has been replaced with just -p.
Minor fixes were made to the calc.spec.in file.
The target rpm architecture changed from i686 to x86_64. For those
who do not run machine with x86_64, we continue to release a src
rpm. For those without the ability to process an rpm, we will always
to release src tarball.
When building the libcalc and libcustcalc shared libraries,
ONLY the .so and .so.${VERSION} files are created. The .so is
a symlink to the .so.${VERSION} file. Here ${VERSION} is the
full "w.x.y.z" calc version.
The following are the changes from calc version 2.12.4.11 to 2.12.4.13:
Fixed many typos in comments of the Makefile thanks to the review
work of Michael Somos.
Fixed typo in "help sysinfo".
The Makefile rule, debug, is now more verbose and prints more information
about the calc compiled constants.
Added a more of calc resource files by
Christoph Zurnieden <czurnieden at gmx dot de> including:
infinities.cal - handle infinities symbolically, a little helper file
intnum.cal - implementation of tanh sinh and Gauss-Legendre quadrature
smallfactors.cal - find the factors of a number < 2^32
strings.cal - implementation of isascii() and isblank()
Reformatted some calc resource files. Cleanup in comment the headers
of some calc resource files.
Minor formatting changes to a few help files.
No need to be special picky about the test8900.cal calc resource file.
Added a number of ctype-like builtins:
isalnum - whether character is alpha-numeric
isalpha - whether character is alphabetic
iscntrl - whether character is a control character
isdigit - whether character is a digit character
isgraph - whether character is a graphical character
islower - whether character is lower case
isprint - whether character is a printable
ispunct - whether character is a punctuation
isspace - whether character is a space character
isupper - whether character is upper case
isxdigit - whether character a hexadecimal digit
strcasecmp - compare two strings, case independent
strncasecmp - compare two strings up to n characters, case independent
strtolower - transform an ASCII string to lower case
strtoupper - transform an ASCII string to upper case
For details on these new builtins, see their help messages.
Thanks goes to Inge Zurnieden <inge dot zurnieden at gmx dot de> for
these new builtins.
Calc source code is now picky v2.3 clean using:
picky -s -v file file2 ..
With the exception of:
help/errorcodes.sed
cal/set8700.line
Due to the long lines in those files, we use:
picky -w -s -v help/errorcodes.sed cal/set8700.line
For more information about the picky tool, see:
http://cis.csuohio.edu/~somos/picky.html
Removed functions from strings.cal that have been replaced by
the new ctype-like builtin functions.
Fixed cal/Makefile to include missing intnum.cal file.
Added detail_help_list make target to cal/Makefile.
The detaillist make target in help/Makefile is now
called detail_help_list.
Removed requirement of gen_u0(h, n, v1) in lucas.cal that h
be odd. While still lucas(h, n) converts even h into an odd h
internally by incrementing n, gen_u0(h, n, v1) will output even
when h is even.
The following are the changes from calc version 2.12.4.6 to version 2.12.4.10:
Updated RPM build process to remove use of deprecated flags.
Applied a number of fixes to calc.spec and rpm.mk file.
See calc.spec.in for details. Changed rpm release to 2.1.
Set MACOSX_DEPLOYMENT_TARGET=10.8 as we upgraded all of
our development Mac OS X to 10.8.
Libraries are chmod-ed as 0644 to allow for building rpms
without root.
Silenced annoying warning about unused variable 'intp'
while compiling endian.c under some circumstances.
Fixed typo in redeclaration warnings. Thanks to
Christoph Zurnieden <czurnieden at gmx dot de> for this report.
Added a number of calc resource files by
Christoph Zurnieden <czurnieden at gmx dot de> including:
bernpoly.cal - Computes the nth Bernoulli polynomial at z for any n,z
brentsolve.cal - root-finder implemented with the Brent-Dekker trick
factorial.cal - product of the positive integers
factorial2.cal - variety of integer functions quasi-related to factorial
lambertw.cal - Computes Lambert's W-function at "z" at branch "branch"
lnseries.cal - Calculates a series of natural logarithms at 1,2,3,4...n
specialfunctions.cal - Calculates the value of the beta function
statistics.cal - a wide variety of statistical functions
toomcook.cal - Multiply by way of the Toom-Cook algorithm
zeta2.cal - Calculate the value of the Hurwitz Zeta function
Fixed a makefile bug that prevented the those new calc resource
files from being installed.
Improved the formatting of the output from:
help resource
We replaced COPYING-LGPL with the version that is found at
http://www.gnu.org/licenses/lgpl-2.1.txt because that version
contains some whitespace formatting cleanup. Otherwise the
license is the same.
We fixed a number of places where "the the" was used
when just "the" should be used.
NOTE: Fixes to grammar, spelling and minor formatting
problems are welcome. Please send us your patches!
With the exception of 3 source files, we became "picky" about
line lengths and other issues reported by the picky tool:
cal/test8900.cal
cal/set8700.line
help/errorcodes.sed
The above 3 files now pass picky -w (OK except for line length).
For more information about the picky tool, see:
http://cis.csuohio.edu/~somos/picky.html
The following are the changes from calc version 2.12.4.3 to 2.12.4.5:
Added gvec.cal resource script.
Added calc-symlink make rule to setup symlinks from standard locations
into a tree specified by a non-empty ${T} makefile variable. Added
calc-unsymlink to remove any symlinks that may have been created by
the calc-symlink rule.
If is OK for the calc-symlink make rule to pre-remove a symlink.
Fixed bug was uncovered in calc that caused script failures when calc
is called within a while loop in BASH if the while loop is fed from
stdin due to calc's redirection/inheritance of stdin and no option
to change this behavior. Thanks gores to David C. Rankin
<drankinatty at gmail dot com> for the bug fix and to David Haller
<dnh at opensuse dot org> for helping debug this problem.
The following are the changes from calc version 2.12.4.0 to 2.12.4.2:
Fixed a documentation bug for the sgn() builtin.
Added the 1<<8/2 evaluation example to "help unexpected". That
expression evaluates to 128, not 16 as some C programmers might expect.
Fixed a bug in solve.cal where high was not returned in some situations.
Fixed a bug reported by Paul & Karen Tomlinson (paulnkaz at pktomlinson
dot fsnet dot co dot uk) where calling log multiple times with different
values of epsilon resulted in an incorrect value.
Removed cvd rule from Makefiles.
The Makefile used in the source rpm (calc-*.src.rpm) no longer uses
the -Werror compile flag. This is to help those distributions with
compilers that make produce (hopefully) compilation warnings.
NOTE: For testing and calc build purposes will recommend and will
continue to use the -Werror flag.
Fixed a typo in the Makefile where the make variable ${SAMPLE_OBJ}
was misspelled as ${SAMPLE_OBJS}.
Added prep makefile rule to make is easier to compile calc without
an optimizer. By doing:
make clobber prep
one may build a calc binary that is easier to debug.
Fixed a bug where an certain typos (e.g., calling an unknown
function) would previously cause calc to exit.
Updated the COPYING file to reflect the new filenames associated
with the SHA1 hash function, and removed mention of files related
to the SHA (SHA0, not SHA1) and the MD5 hash functions (which is
no longer supported in calc).
Fixed a bug where a calling vsnprintf() twice created problems.
The thanks for this fix goes to Matthew Miller (mattdm at mattdm
dot org) for this patch.
Michael Penk (mpenk at wuska dot com) reported success in installs
under windoz via Cygwin by making a change to the Cygwin target.
These changes have been folded into the main calc Makefile.
The old recommendation of using 'make win32_hsrc' is no longer
required for Cygwin. See the README.WINDOWS file for details.
Added dms.cal and hms.cal resource files. The dms.cal is a more
functional version of deg.cal. It is a superset except that increment
and decrement is on the arc second level. The hms.cal is for
24-hour cycle instead of the 360 degree cycle of dms.cal.
Changed deg.cal object name from dms to deg so that the more functional
dms.cal can own the dms object name.
Updated 'help obj' to reflect changes to 'show objfunctions' and
resource file example list since 1999.
Fixed problem where CALC_BYTE_ORDER referring to CALC_BIG_ENDIAN
and CALC_LITTLE_ENDIAN instead of BIG_ENDIAN and LITTLE_ENDIAN.
The following are the changes from calc version 2.12.3.0 to 2.12.3.3:
Fixed the Jacobi function where it returned 1 when it should have
returned 0. Thanks goes to Kevin Sopp (baraclese at googlemail dot com)
for discovering the problem and suggesting the nature if the fix.
Calc versions will always be of the form x.y.z.w even when the
MINOR_PATCH (w) is 0. Thus, 2.12.3.0 will be printed as 2.12.3.0
instead of just 2.12.3.
Added MINGW32_NT-5.0 compile target based on a patch from
Brian L. Angus (angus at eng dot utah dot edu).
Removed the use of rpm.release in the Makefile.
Mac OS Darwin targets no longer attempt to use ldconfig. Under the
Darwin target, the LDCONFIG make variable is redefined to be
an empty value. Thanks goes to Ralf Trinler (art at infra dot de)
for reporting this problem.
The ${CALC_INCDIR}/custom is no longer being removed at install time
if it is empty. Now when ${ALLOW_CUSTOM} make variable is empty,
an empty ${CALC_INCDIR}/custom may be left behind.
Fixed a problem where a "make clobber" would remove custom/Makefile
and fail to rebuilt it.
The following are the changes from calc version 2.12.2.3 to 2.12.2.4:
Added OpenBSD target.
Using the -r test instead of the -e test in Makefiles because some
out of date shells still do not have the -e test.
The Makefile now avoids the use of if ! command because some out of
date shells to not support the ! construct.
The following are the changes from calc version 2.12.1.1 to 2.12.2.2:
Added an explicit Solaris target.
Fixed confusion in Makefile where some uses of ${EXT} were misnamed ${EXE}.
Added a "make strip" rule, per suggestion from Igor Furlan <primorec
at sbcglobal dot net>, to allow one to strip previously built binary
executables and libraries.
Under the Darwin / OS X target, ${DARWIN_ARCH} is left empty meaning
that calc is compiled for the native CPU type instead of Universal
Binary (Intel and PPC).
By default, the calc binary that is built for the rpm forces
${LD_SHARE} to be empty. An empty ${LD_SHARE} means that the calc
from the rpm does not set rpath. This in turn causes the default
system path to be searched when looking for libcalc and libcustcalc.
The Makefile shipped with calc still sets ${LD_SHARE} for host targets.
By default, the dynamic shared library search path for all targets
starts with the source directory. Starting the search in the source
directory is convenient for testing and debugging but is not appropriate
for installation on a production system. To get the same effect
as the calc binary in the calc rpm, try:
make clobber
make calc-dynamic-only BLD_TYPE=calc-dynamic-only LD_SHARE=
make install
The libcalc and libcustcalc shared libraries are now tied to
the 4 level calc version instead of just 3 levels. For example,
under Linux calc version 2.12.2.1 uses /usr/lib/libcalc.so.2.12.2.1
instead of just the /usr/lib/libcalc.so.2.12.2 file. This change
was made so that calc produced by 'make clobber; make all install'
is consistent with the calc rpm.
Calc is now releasing the calc-debuginfo rpm for those RPM users who
which to use non-stripped libraries and binaries for debugging
purposes. By default, the calc rpm installed stripped binaries
and libraries.
Added this high priority item to the calc help/todo list:
It is overkill to have nearly everything wind up in libcalc.
Form a libcalcmath and a libcalclang so that an application
that just wants to link with the calc math libs can use them
without dragging in all of the other calc language, I/O,
and builtin functions.
Fixed the wording for the -i flag in the calc man page.
Added some notes to the help/unexpected file regarding calc
and interactive shells.
Fixed bug where a FILEPOS was copied FPOS_POS_BITS octets instead of
FPOS_POS_LEN octets.
Split out ${READLINE_EXTRAS} Makefile variables from ${READLINE_LIB}
to better deal with Fedora rpm requirements.
Bit 8 (0x80) of calc_debug is reserved for custom debugging.
See help/config and custom/HOW_TO_ADD for details.
When the Makefile variable ${ALLOW_CUSTOM} is not defined or empty,
the libcustcalc library is not built or linked against, certain make
rules skip going into the custom sub-directory, the install
rule skips certain custom installation actions, and the common
C flags (${COMMON_CFLAGS}) is given -UCUSTOM. Other make rules such
as "make clean" and "make clobber" still work as before. Also
the Makefile.simple assumes that the Makefile variable ${ALLOW_CUSTOM}
is -DCUSTOM.
Clarified that the calc builtin functions rand() and random()
operate over a half closed interval. The help/rand and help/random
refer to the top of the interval as "beyond" instead of "max".
Releasing source tar balls using bzip2 instead of with gzip. So
what was calc-something.tar.gz is now calc-something.tar.bz2.
To "uncompress" use:
bunzip2 calc-something.tar.bz2
On some systems, one may untar directly by:
tar -jxvf calc-something.tar.bz2
The Makefile variable ${BYTE_ORDER} was replaced by ${CALC_BYTE_ORDER}.
Changed the way the Makefile can force the calc byte order. If you set
the Makefile variable ${CALC_BYTE_ORDER} to be -DCALC_BIG_ENDIAN then
endian.h will force the CPP symbol CALC_BYTE_ORDER to be BIG_ENDIAN.
If you set ${CALC_BYTE_ORDER} to be -DCALC_LITTLE_ENDIAN then endian.h
will force the CPP symbol CALC_BYTE_ORDER to be LITTLE_ENDIAN.
If the Makefile variable ${CALC_BYTE_ORDER} is empty, then the CPP
symbol CALC_BYTE_ORDER will set to the CPP symbol BYTE_ORDER as
defined by some system include file (if the Makefile can find such
an include file), or the Makefile compiling endian.c and hopefully
using that result to set CPP symbol CALC_BYTE_ORDER. Regardless of
how it happens, the CPP symbol CALC_BYTE_ORDER should end up set in
endian_calc.h include file.
The following are the changes from calc version 2.12.1.10 to 2.12.2:
Put back the missing -s flags on the cscripts: mersenne, 4dsphere,
fprodcut, plus, and powerterm. Thanks goes to Bradley Reed
<bradreed1 at gmail dot com> for discovering this problem.
All static variables are now declared with the symbol STATIC.
All extern variables are now declared with the symbol EXTERN.
All static functions are now declared with the symbol S_FUNC.
All extern functions are now declared with the symbol E_FUNC.
The include file decl.h defines these 4 symbols by default
to static, extern, static, and extern respectively. Under
Windoz, DLL is also defined according to the _EXPORTING symbol
and is prepended to the EXTERN and E_FUNC symbols. The decl.h
file has replaced the win32dll.h file.
When WITH_TLS is defined, calc attempts to compile with Thread Local
Storage. As of version 2.12.1.12 this mode is extremely experimental.
Calc may not compile when WITH_TLS defined.
Fixed E_FUNC vs EXTERN issues discovered by Mirko Viviani
<mirko at objectlab dot org>.
Removed include of <malloc.h>. The building of the include file
"have_malloc.h" has been removed from the Makefile. One some
systems such as FreeBSD, the file /usr/include/malloc.h exists
and contains an forced error saying that stdlib.h should be used
instead. The Makefile symbol HAVE_MALLOC has been removed.
Moved the sample code in the sample sub-directory up into the
main source level. The sample/many_random.c source file is
now sample_many.c. The sample/test_random.c source file is now
sample_rand.c. The sample Makefile and the sub-directory is no more.
Renamed the following source files:
math_error.h ==> lib_calc.h
string.c ==> str.c
string.h ==> str.h
Renamed the following variables related to calc error processing:
int calc_jmp ==> int calc_use_matherr_jmpbuf
jmp_buf calc_jmp_buf ==> jmp_buf calc_matherr_jmpbuf
int post_init ==> int calc_use_scanerr_jmpbuf
jmp_buf jmpbuf ==> jmpbuf calc_scanerr_jmpbuf
char *calc_error ==> char calc_err_msg[MAXERROR+1]
These values are now declared in the lib_calc.h include file.
The value MAXERROR is now defined in lib_calc.h instead of calc.h.
The calc_err_msg[] buffer is now used for math errors as well
as scan and parse errors.
Parse/scan errors will not be printed if calc_print_scanerr_msg
is zero. By default:
int calc_print_scanerr_msg = 1;
This variable is declared in the lib_calc.h include file. Storage
comes from libcalc.
Parse/scan warnings will not be printed if calc_print_scanwarn_msg
is zero. By default:
int calc_print_scanwarn_msg = 1;
This variable is declared in the lib_calc.h include file. Storage
comes from libcalc.
The last parse/scan error message is stored in the calc_err_msg[]
buffer. This happens even when calc_print_scanerr_msg is zero.
The last parse/scan warning message is stored in the calc_warn_msg[]
buffer. After each parse/scan warning condition is detected,
the value calc_warn_cnt is incremented. This happens even when
calc_print_scanwarn_msg is zero.
The calc_warn_msg[] buffer and calc_warn_cnt variables are declared
in the lib_calc.h include file. Storage comes from libcalc.
See the file, LIBRARY or use the calc command "help libcalc" for
more information on calc error processing. This file has been
updated to reflect the changes noted above in this section.
The make install rule removes std_arg.h, have_malloc.h, math_error.h,
string.h, and win32dll.h from ${INCDIR} if they exist. These calc
include files are no longer supported.
Do reduce the number of special case .o build rules, the
${ALLOW_CUSTOM} make flag is added to ${CFLAGS} by default. This means
that if ALLOW_CUSTOM= -DCUSTOM, then -DCUSTOM is given to the compile
line of most .c files.
Calc -v reports "w/custom functions" or "w/o custom functions" on
the version string depending on if calc was compiled with the
ALLOW_CUSTOM= -DCUSTOM or not.
Replaced the concept of compiler sets in the Makefile with
host target section in the Makefile. Initial host targets are:
Linux
Darwin
FreeBSD
(default) <<== Target does not match any previous target name
Simple
NOTE: If your target is not supported below and the default target
is not suitable for your needs, please send to the:
calc-contrib at asthe dot com
Email address an "ifeq ($(target),YOUR_TARGET_NAME)"
... "endif" set of lines from the Makefile so that
we can consider them for the next release.
The custom/Makefile is now constructed from 3 parts: custom/Makefile.head,
the host target section in Makefile, and the custom/Makefile.tail.
The top level Makefile and the custom/Makefile require a GNU Make
(such as gmake) or an equivalently advanced make. On many targets,
the default make is sufficient. On FreeBSD for example, one must
use gmake instead of make.
If your target system does not have GNU Make (or equivalent), then
you should try using the Makefile.simple and custom/Makefile.simple
files:
mv Makefile Makefile.gmake
cp Makefile.simple Makefile
mv custom/Makefile custom/Makefile.gmake
cp custom/Makefile.simple custom/Makefile
make all
Added the ability to build calc with dynamic libraries, static
libraries or both. Many thanks goes to Matthew Miller (mattdm
at mattdm dot org) and Mirko Viviani (mirko at objectlab dot
org) for this help, encouragement, and testing of this major change!
Added BLD_TYPE Makefile variable to control how calc is
built. The BLD_TYPE value may be one of:
BLD_TYPE= calc-dynamic-only
BLD_TYPE= calc-static-only
Each host target establishes a default BLD_TYPE value. Of course
one can override the host target BLD_TYPE on the make command line:
make clobber
make calc-dynamic-only BLD_TYPE=calc-dynamic-only
make clobber
make calc-static-only BLD_TYPE=calc-static-only
NOTE: It is a very good idea to first clobber (remove) any previously
built .o, libs and executables before switching the build
between static and dynamic.
which have the same effect as make all with a given build phase set.
For Linux and Darwin, the default BLD_TYPE is calc-dynamic-only.
For the simple case, BLD_TYPE is calc-static-only. For the
default target (the target does not match any of the previous
defined targets), BLD_TYPE is calc-static-only.
Added ${CSFLAGS} make variable to hold the {$CC} flags for compiling
without shared library. By default, ${CFLAGS} is ${CSFLAGS} with
${CC_SHARE} added to it.
Added ${CC_SHARE}, ${LIBCALC_SHLIB}, ${LIBCUSTCALC_SHLIB}, and
${LD_SHARE} to the remaining compiler sets.
Fixed make depend and make uninstall rules. Performed various
makefile syntax cleanups.
Removed ${PROGS} and ${STATIC_PROGS} Makefile variables due to
the new BLD_TYPE system (see above).
Added missing help for cp, calcpath, and stoponerror.
Noted that calc fails the regression test (and will crash at
various times) when compiled with gcc v4.1.0. This problem was
first reported under Fedora Core 5 by Christian Siebert.
Set the LESSCHARSET to iso8859 so that less will not confuse or
upset the col utility with Invalid or incomplete multi-byte or wide
characters.
Updated the Free Software Foundation postal address and updated
the COPYING-LGPL from http://www.fsf.org/licensing/licenses/lgpl.txt
on 2007-Mar-14. Calc is using the same Version 2.1 of the LGPL,
only the postal address of the Free Software Foundation has
been updated. All source files were updated to RCS level 30.
Thanks goes to Martin Buck (m at rtin-buck dor de) for this patch.
Added printf arg checking for GNU C compilers that helps check
printf-style functions in calc. Thanks goes to Martin Buck (m at
rtin-buck dor de) for this patch.
Fixed issues where the argument of a printf-like did not match the
format type.
Removed build function md5(). The MD5 hash has been compromised to
such a degree that is it no longer advisable to use this function.
Removed build function sha(). The SHA hash has been compromised to
such a degree that is it no longer advisable to use this function.
Note that the SHA-1 hash has not been compromised to the same degree
and so this hash function remains.
Renamed shs1.c to sha1.c. Renamed shs1.h to sha1.h.
Added custom registers. The custom register function:
custom("register", 3)
returns the value of custom register 3. Custom registers, initialized
with 0, may take on any calc value:
custom("register", regnum, value)
Added REGNUM_MAX to the sysinfo custom function to return the maximum
register number:
custom("sysinfo", "REGNUM_MAX")
which defaults to 31. The first custom register is 0 and thus the
default number of custom registers is 32.
Added E_OK #define in calc.h to indicate no error (0).
Renamed C function powivalue() in value.c to powvalue() because it
now handles raising NUMBER or COMPLEX to a NUMBER or COMPLEX power.
The powervalue() function in value.c may be given a NULL epsilon
which will cause to the builtin epsilon value to be used.
Calc supports both real and complex exponentiation bases and exponents.
For a ^ b and a ** b, "a" and "b" can be a real value or a complex value:
2^3 3i^4
2.5 ^ 3.5 0.5i ^ 0.25
2.5 ^ 2.718i 3.13145i ^ 0.30103i
Fixed typos in the calc man page thanks to a Debian bug report
by A. Costa <agcosta at gis dot .net> that was kindly forwarded
to us by Martin Buck <m at rtin-buck dot de>.
The following are the changes from calc version 2.12.1.8 to 2.12.1.9:
Fixed calc cscripts that contained comments that were not valid calc
comments. Improved calc comment documentation in "help unexpected"
to help other avoid similar mistakes. Calc comments are of the form:
/* c style comments */
/*
* multi-line
* comments
*/
## two or more #-signs
### in a row
### Note that # along is a calc unary and binary operator
Added "help pound" or "help #' to document the # operator, comments,
and the first line of cscript files.
Documented these help commands in "help help":
help ->
help *
help .
help %
help //
help #
The usage help file is now formed from the contents of the calc man page.
So "help usage" prints the version of the calc man page. Added ${COL}
makefile symbol to support the formation of the calc.usage file from
calc.1 via the CALCPAGER (less) or NROFF (if NROFF is non-empty).
The "help calc" command is now equivalent to "help help".
The "help define" command is now equivalent to "help command".
Fixed calc command line usage message.
Fixed missing README.src file in RPM src and tgz src tarball.
Removed HAVE_SNPRINTF test in version.c. We now assume that
all systems come with the standard snprintf() library function.