Compare commits

...

12 Commits

Author SHA1 Message Date
Landon Curt Noll
a547c36f0a prep CHANGES for the next release of calc 2024-05-27 18:47:41 -07:00
Landon Curt Noll
1e2698b42d Merge pull request #149 from bambooleafz/master
this should fixes issue #148
2024-05-27 18:36:31 -07:00
bambooleafz
33815f49e6 Update qfunc.c
the previous `*qlog2 = utoq(log2)` may be incorrect. under that case, `qlog2` actually points to `_qone_` and causes `_qone_` changed
2024-05-27 19:40:59 +08:00
Landon Curt Noll
732279bcc3 Merge pull request #147 from fruityloops1/master 2024-05-13 11:52:00 -07:00
fruityloops1
7f4e1eb68d Fix help page typo 2024-05-13 20:43:41 +02:00
Landon Curt Noll
1232b59949 Merge pull request #144 from coreysciuto-toast/patch-1
Fix Manpage typo
2024-02-12 14:39:23 -08:00
Corey Sciuto
90feefc622 Fix Manpage typo 2024-02-12 16:59:15 -05:00
Landon Curt Noll
c97ee188ad Release v2.15.0.6
The following are the changes in this release:

     Thanks to GitHub user @ashamedbit, a long standing memory leak in
     zrandom.c has been fixed.
2024-02-09 08:28:56 -08:00
Landon Curt Noll
ae85846839 improve useful strings produced by update_ver 2024-02-09 08:27:02 -08:00
Landon Curt Noll
e096bd9ad8 credit @ashamedbit a memory leak fix in zrandom.c 2024-02-09 08:02:50 -08:00
Landon Curt Noll
884b1bc81b Merge pull request #142 from ashamedbit/fix-memory-leak
Fix memory leak in zrandom.c
2024-02-09 07:53:47 -08:00
ashamedbit
a30a518ba7 Fix memory leak in zrandom.c 2024-02-09 03:48:11 -05:00
8 changed files with 47 additions and 9 deletions

13
CHANGES
View File

@@ -1,3 +1,16 @@
The following are the changes from calc version 2.15.0.6 to 2.15.0.7:
Thanks to GitHub user @bambooleafz a critical bug (GitHub issue
#148 - https://github.com/lcn2/calc/issues/148) they identified
was fixed.
The following are the changes from calc version 2.15.0.5 to 2.15.0.6:
Thanks to GitHub user @ashamedbit, a long standing memory leak in
zrandom.c has been fixed.
The following are the changes from calc version 2.15.0.4 to 2.15.0.5: The following are the changes from calc version 2.15.0.4 to 2.15.0.5:
make clobber now removes the legacy files: have_fpos.h, help/man, make clobber now removes the legacy files: have_fpos.h, help/man,

View File

@@ -1243,7 +1243,7 @@ EXT=
# The calc version in the form of x.y.z.w # The calc version in the form of x.y.z.w
# #
VERSION= 2.15.0.5 VERSION= 2.15.0.7
# The calc major version in the form of x.y.z # The calc major version in the form of x.y.z
# #

View File

@@ -1512,7 +1512,7 @@ the following GitHub repo:
https://github.com/lcn2/calc https://github.com/lcn2/calc
.in -0.5i .in -0.5i
.sp .sp
The very latest calc souece is found at the top master branch. The very latest calc source is found at the top master branch.
.PP .PP

View File

@@ -13,7 +13,7 @@ following topics:
config configuration parameters config configuration parameters
custom information about the custom builtin interface custom information about the custom builtin interface
define how to define functions define how to define functions
environment how environment variables effect calc environment how environment variables affect calc
errorcodes calc generated error codes errorcodes calc generated error codes
expression expression sequences expression expression sequences
file using files file using files

View File

@@ -1953,7 +1953,7 @@ qispowerof2(NUMBER *q, NUMBER **qlog2)
* Set *qlog2 to base 2 logarithm of q, which will be a negative value, * Set *qlog2 to base 2 logarithm of q, which will be a negative value,
* and return true. * and return true.
*/ */
*qlog2 = utoq(log2); **qlog2 = *utoq(log2);
(*qlog2)->num.sign = !(*qlog2)->num.sign; /* set *qlog2 to -log2 */ (*qlog2)->num.sign = !(*qlog2)->num.sign; /* set *qlog2 to -log2 */
return true; return true;
} }

View File

@@ -169,6 +169,7 @@ for i in $MK_SET1; do
echo "$i: $VER_STRING" echo "$i: $VER_STRING"
fi fi
done done
echo
if [[ -n $VER_ERR ]]; then if [[ -n $VER_ERR ]]; then
echo "$0: FATAL: error in finding calc major version string" echo "$0: FATAL: error in finding calc major version string"
echo "$0: FATAL: exit 10" echo "$0: FATAL: exit 10"
@@ -177,15 +178,36 @@ fi
# print other useful calc strings # print other useful calc strings
# #
export VER_CALC_OUTPUT=$(./ver_calc)
echo 'Begin text strings used to produce this release:'
echo 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv'
echo echo
echo "calc $(./ver_calc) release"
echo echo
echo 'calc-*'$(./ver_calc)'*'
echo echo
echo "Release v$(./ver_calc)" echo "$VER_CALC_OUTPUT"
echo
echo "v$VER_CALC_OUTPUT"
echo
echo "Release v$VER_CALC_OUTPUT"
echo
echo "calc $VER_CALC_OUTPUT release"
echo
echo 'For use with sourceforge.net:'
echo
echo 'cd /home/pfs/project/calc/calc'
echo "mkdir $VER_CALC_OUTPUT"
echo "cd $VER_CALC_OUTPUT"
echo 'mput calc-*'"$VER_CALC_OUTPUT"'*'
echo 'put /home/chongo/tmp/README.txt'
echo 'ls'
echo
echo
echo
echo '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^'
echo 'End text strings used to produce this release:'
echo
# All Done!!! -- Jessica Noll, Age 2 # All Done!!! -- Jessica Noll, Age 2
# #
echo
echo "VERSION in Makefile.config is up to date" echo "VERSION in Makefile.config is up to date"
exit 0 exit 0

View File

@@ -64,7 +64,7 @@
#define MAJOR_VER 2 /* level 1: major library version */ #define MAJOR_VER 2 /* level 1: major library version */
#define MINOR_VER 15 /* level 2: minor library version */ #define MINOR_VER 15 /* level 2: minor library version */
#define MAJOR_PATCH 0 /* level 3: major software version level */ #define MAJOR_PATCH 0 /* level 3: major software version level */
#define MINOR_PATCH 5 /* level 4: minor software version level */ #define MINOR_PATCH 7 /* level 4: minor software version level */
#endif /* !INCLUDE_VERSION_H*/ #endif /* !INCLUDE_VERSION_H*/

View File

@@ -2679,6 +2679,9 @@ zsetrandom(CONST RANDOM *state)
*/ */
if (state != NULL) { if (state != NULL) {
p_blum = randomcopy(state); p_blum = randomcopy(state);
if (blum_initialized == true) {
randomfree(&blum);
}
blum = *p_blum; blum = *p_blum;
free(p_blum); free(p_blum);
} }