Compare commits

..

4 Commits

Author SHA1 Message Date
Landon Curt Noll
eaec46982d Release v2.12.9.1
The following are the changes in this release:

    Fixed a typo typo in help/Makefile that caused the build of
    2.12.9.0 to fail in a number of cases.  Thanks to a report by
    <GitHub user balducci>.

    Pass form Makefile variables ${Q}, ${S}, ${E}, ${H} and ${V} down
    to all sub-directory Makefiles from the top level Makefile.
2021-03-26 09:31:36 -07:00
Landon Curt Noll
a86d629982 Fixed a typo in help/Makefile
Fixed a typo typo in help/Makefile that caused the build of
2.12.9.0 to fail in a number of cases.  Thanks to a report by
<GitHub user balducci>.
2021-03-12 11:31:21 -08:00
Landon Curt Noll
bcbc0cb766 Merge pull request #25 from atsampson/doubleassign
Remove redundant assignments when byteswapping
2021-03-11 03:14:14 -08:00
Adam Sampson
6dc62c1ab7 Remove redundant assignments when byteswapping.
The SWAP_ macros already write the result to their destination arg, so
there's no need for an extra assignment -- and this is undefined
behaviour because there are two assignments to the same variable without
an intervening sequence point (as GCC 10 correctly warns).
2021-03-06 01:46:04 +00:00
9 changed files with 179 additions and 39 deletions

14
CHANGES
View File

@@ -1,4 +1,14 @@
The following are the changes from calc version 2.12.9.0 to date:
The following are the changes from calc version 2.12.9.1 to date:
Fixed a typo typo in help/Makefile that caused the build of
2.12.9.0 to fail in a number of cases. Thanks to a report by
<GitHub user balducci>.
Pass form Makefile variables ${Q}, ${S}, ${E}, ${H} and ${V} down
to all sub-directory Makefiles from the top level Makefile.
The following are the changes from calc version 2.12.8.2 to 2.12.9.0:
Added notes to help/unexpected about:
@@ -30,7 +40,7 @@ The following are the changes from calc version 2.12.9.0 to date:
Changed the UNUSED define in have_unused.h to be a macro with
a parameter. Changed all use of UNUSED in *.c to be UNUSED(x).
Removed need for HAVE_UNUSED in building the have_unused.h file.
Removed the need for HAVE_UNUSED in building the have_unused.h file.
CCBAN is given to ${CC} in order to control if banned.h is in effect.

View File

@@ -1149,7 +1149,7 @@ EXT=
# The default calc versions
#
VERSION= 2.12.9.0
VERSION= 2.12.9.1
# Names of shared libraries with versions
#
@@ -2106,6 +2106,7 @@ CUSTOM_PASSDOWN= \
TOP_MAKE_FILE=${MAKE_FILE} \
TOUCH=${TOUCH} \
TRUE=${TRUE} \
V=${V} \
VERSION=${VERSION} \
WNO_IMPLICT=${WNO_IMPLICT} \
WNO_ERROR_LONG_LONG=${WNO_ERROR_LONG_LONG} \
@@ -2128,6 +2129,7 @@ HELP_PASSDOWN= \
COMMON_CFLAGS="${COMMON_CFLAGS}" \
COMMON_LDFLAGS="${COMMON_LDFLAGS}" \
CP=${CP} \
E="${E}" \
EXT=${EXT} \
FMT=${FMT} \
GREP=${GREP} \
@@ -2145,13 +2147,15 @@ HELP_PASSDOWN= \
Q="${Q}" \
RM=${RM} \
RMDIR=${RMDIR} \
S="${S}" \
SCRIPTDIR="${SCRIPTDIR}" \
SED=${SED} \
SHELL=${SHELL} \
T=${T} \
TOP_MAKE_FILE=${MAKE_FILE} \
TOUCH=${TOUCH} \
TRUE=${TRUE}
TRUE=${TRUE} \
V=${V}
# The complete list of Makefile vars passed down to cal/Makefile.
#
@@ -2165,6 +2169,7 @@ CAL_PASSDOWN= \
CMP=${CMP} \
CO=${CO} \
CP=${CP} \
E="${E}" \
H="${H}" \
HELPDIR="${HELPDIR}" \
INCDIR="${INCDIR}" \
@@ -2176,12 +2181,14 @@ CAL_PASSDOWN= \
Q="${Q}" \
RM=${RM} \
RMDIR=${RMDIR} \
S="${S}" \
SCRIPTDIR="${SCRIPTDIR}" \
SHELL=${SHELL} \
T=${T} \
TOP_MAKE_FILE=${MAKE_FILE} \
TOUCH=${TOUCH} \
TRUE=${TRUE}
TRUE=${TRUE} \
V=${V}
# The complete list of Makefile vars passed down to cscript/Makefile.
#
@@ -2195,6 +2202,7 @@ CSCRIPT_PASSDOWN= \
CMP=${CMP} \
CO=${CO} \
CP=${CP} \
E="${E}" \
ECHON="${ECHON}" \
FMT=${FMT} \
H="${H}" \
@@ -2208,6 +2216,7 @@ CSCRIPT_PASSDOWN= \
Q="${Q}" \
RM=${RM} \
RMDIR=${RMDIR} \
S="${S}" \
SCRIPTDIR="${SCRIPTDIR}" \
SED=${SED} \
SHELL=${SHELL} \
@@ -2215,7 +2224,8 @@ CSCRIPT_PASSDOWN= \
T=${T} \
TOP_MAKE_FILE=${MAKE_FILE} \
TOUCH=${TOUCH} \
TRUE=${TRUE}
TRUE=${TRUE} \
V=${V}
# complete list of .h files found (but not built) in the distribution
#

View File

@@ -126,8 +126,8 @@ swap_b8_in_ZVALUE(ZVALUE *dest, ZVALUE *src, BOOL all)
* swap or copy the rest of the ZVALUE elements
*/
if (all) {
dest->len = (LEN)SWAP_B8_IN_LEN(&dest->len, &src->len);
dest->sign = (BOOL)SWAP_B8_IN_BOOL(&dest->sign, &src->sign);
SWAP_B8_IN_LEN(&dest->len, &src->len);
SWAP_B8_IN_BOOL(&dest->sign, &src->sign);
} else {
dest->len = src->len;
dest->sign = src->sign;
@@ -192,7 +192,7 @@ swap_b8_in_NUMBER(NUMBER *dest, NUMBER *src, BOOL all)
* swap or copy the rest of the NUMBER elements
*/
if (all) {
dest->links = (long)SWAP_B8_IN_LONG(&dest->links, &src->links);
SWAP_B8_IN_LONG(&dest->links, &src->links);
} else {
dest->links = src->links;
}
@@ -256,7 +256,7 @@ swap_b8_in_COMPLEX(COMPLEX *dest, COMPLEX *src, BOOL all)
* swap or copy the rest of the NUMBER elements
*/
if (all) {
dest->links = (long)SWAP_B8_IN_LONG(&dest->links, &src->links);
SWAP_B8_IN_LONG(&dest->links, &src->links);
} else {
dest->links = src->links;
}
@@ -361,8 +361,8 @@ swap_b16_in_ZVALUE(ZVALUE *dest, ZVALUE *src, BOOL all)
* swap or copy the rest of the ZVALUE elements
*/
if (all) {
dest->len = (LEN)SWAP_B16_IN_LEN(&dest->len, &src->len);
dest->sign = (BOOL)SWAP_B16_IN_BOOL(&dest->sign, &src->sign);
SWAP_B16_IN_LEN(&dest->len, &src->len);
SWAP_B16_IN_BOOL(&dest->sign, &src->sign);
} else {
dest->len = src->len;
dest->sign = src->sign;
@@ -427,7 +427,7 @@ swap_b16_in_NUMBER(NUMBER *dest, NUMBER *src, BOOL all)
* swap or copy the rest of the NUMBER elements
*/
if (all) {
dest->links = (long)SWAP_B16_IN_LONG(&dest->links, &src->links);
SWAP_B16_IN_LONG(&dest->links, &src->links);
} else {
dest->links = src->links;
}
@@ -491,7 +491,7 @@ swap_b16_in_COMPLEX(COMPLEX *dest, COMPLEX *src, BOOL all)
* swap or copy the rest of the NUMBER elements
*/
if (all) {
dest->links = (long)SWAP_B16_IN_LONG(&dest->links, &src->links);
SWAP_B16_IN_LONG(&dest->links, &src->links);
} else {
dest->links = src->links;
}
@@ -557,8 +557,8 @@ swap_HALF_in_ZVALUE(ZVALUE *dest, ZVALUE *src, BOOL all)
* swap or copy the rest of the ZVALUE elements
*/
if (all) {
dest->len = (LEN)SWAP_HALF_IN_LEN(&dest->len, &src->len);
dest->sign = (BOOL)SWAP_HALF_IN_BOOL(&dest->sign, &src->sign);
SWAP_HALF_IN_LEN(&dest->len, &src->len);
SWAP_HALF_IN_BOOL(&dest->sign, &src->sign);
} else {
dest->len = src->len;
dest->sign = src->sign;
@@ -623,7 +623,7 @@ swap_HALF_in_NUMBER(NUMBER *dest, NUMBER *src, BOOL all)
* swap or copy the rest of the NUMBER elements
*/
if (all) {
dest->links = (long)SWAP_HALF_IN_LONG(&dest->links,&src->links);
SWAP_HALF_IN_LONG(&dest->links, &src->links);
} else {
dest->links = src->links;
}
@@ -687,7 +687,7 @@ swap_HALF_in_COMPLEX(COMPLEX *dest, COMPLEX *src, BOOL all)
* swap or copy the rest of the NUMBER elements
*/
if (all) {
dest->links = (long)SWAP_HALF_IN_LONG(&dest->links,&src->links);
SWAP_HALF_IN_LONG(&dest->links, &src->links);
} else {
dest->links = src->links;
}

View File

@@ -176,11 +176,35 @@ T=
# Makefile debug
#
# Q=@ do not echo internal makefile actions (quiet mode)
# Q= echo internal makefile actions (debug / verbose mode)
# Q=@ do not echo internal Makefile actions (quiet mode)
# Q= echo internal Makefile actions (debug / verbose mode)
#
# H=@: do not report hsrc file formation progress
# H=@ do echo hsrc file formation progress
#
# S= >/dev/null 2>&1 slience ${CC} output during hsrc file formation
# S= full ${CC} output during hsrc file formation
#
# E= 2>/dev/null slience command stderr during hsrc file formation
# E= full command stderr during hsrc file formation
#
# V=@: do not echo debug statements (quiet mode)
# V=@ do echo debug statements (debug / verbose mode)
#
#Q=
Q=@
#
S= >/dev/null 2>&1
#S=
#
E= 2>/dev/null
#E=
#
#H=@:
H=@
#
V=@:
#V=@
# standard tools
#

View File

@@ -175,11 +175,35 @@ T=
# Makefile debug
#
# Q=@ do not echo internal makefile actions (quiet mode)
# Q= echo internal makefile actions (debug / verbose mode)
# Q=@ do not echo internal Makefile actions (quiet mode)
# Q= echo internal Makefile actions (debug / verbose mode)
#
# H=@: do not report hsrc file formation progress
# H=@ do echo hsrc file formation progress
#
# S= >/dev/null 2>&1 slience ${CC} output during hsrc file formation
# S= full ${CC} output during hsrc file formation
#
# E= 2>/dev/null slience command stderr during hsrc file formation
# E= full command stderr during hsrc file formation
#
# V=@: do not echo debug statements (quiet mode)
# V=@ do echo debug statements (debug / verbose mode)
#
#Q=
Q=@
#
S= >/dev/null 2>&1
#S=
#
E= 2>/dev/null
#E=
#
#H=@:
H=@
#
V=@:
#V=@
# standard tools
#

View File

@@ -155,14 +155,38 @@ CUSTOM_OBJ= c_argv.o c_devnull.o c_help.o c_sysinfo.o c_pzasusb8.o \
# Normally, the upper level makefile will set these values. We provide
# a default here just in case you want to build from this directory.
#
# Makefile debug
#
# Q=@ do not echo internal makefile actions (quiet mode)
# Q= echo internal makefile actions (debug / verbose mode)
# Q=@ do not echo internal Makefile actions (quiet mode)
# Q= echo internal Makefile actions (debug / verbose mode)
#
# H=@: do not report hsrc file formation progress
# H=@ do echo hsrc file formation progress
#
# S= >/dev/null 2>&1 slience ${CC} output during hsrc file formation
# S= full ${CC} output during hsrc file formation
#
# E= 2>/dev/null slience command stderr during hsrc file formation
# E= full command stderr during hsrc file formation
#
# V=@: do not echo debug statements (quiet mode)
# V=@ do echo debug statements (debug / verbose mode)
#
#Q=
Q=@
#
S= >/dev/null 2>&1
#S=
#
E= 2>/dev/null
#E=
#
#H=@:
H=@
#
V=@:
#V=@
####
# Normally, the upper level makefile will set these values. We provide
@@ -407,7 +431,7 @@ EXT=
# The default calc versions
#
VERSION= 2.12.9.0
VERSION= 2.12.9.1
# Names of shared libraries with versions
#

View File

@@ -155,14 +155,38 @@ CUSTOM_OBJ= c_argv.o c_devnull.o c_help.o c_sysinfo.o c_pzasusb8.o \
# Normally, the upper level makefile will set these values. We provide
# a default here just in case you want to build from this directory.
#
# Makefile debug
#
# Q=@ do not echo internal makefile actions (quiet mode)
# Q= echo internal makefile actions (debug / verbose mode)
# Q=@ do not echo internal Makefile actions (quiet mode)
# Q= echo internal Makefile actions (debug / verbose mode)
#
# H=@: do not report hsrc file formation progress
# H=@ do echo hsrc file formation progress
#
# S= >/dev/null 2>&1 slience ${CC} output during hsrc file formation
# S= full ${CC} output during hsrc file formation
#
# E= 2>/dev/null slience command stderr during hsrc file formation
# E= full command stderr during hsrc file formation
#
# V=@: do not echo debug statements (quiet mode)
# V=@ do echo debug statements (debug / verbose mode)
#
#Q=
Q=@
#
S= >/dev/null 2>&1
#S=
#
E= 2>/dev/null
#E=
#
#H=@:
H=@
#
V=@:
#V=@
####
# Normally, the upper level makefile will set these values. We provide
@@ -407,7 +431,7 @@ EXT=
# The default calc versions
#
VERSION= 2.12.9.0
VERSION= 2.12.9.1
# Names of shared libraries with versions
#

View File

@@ -176,11 +176,35 @@ T=
# Makefile debug
#
# Q=@ do not echo internal makefile actions (quiet mode)
# Q= echo internal makefile actions (debug / verbose mode)
# Q=@ do not echo internal Makefile actions (quiet mode)
# Q= echo internal Makefile actions (debug / verbose mode)
#
# H=@: do not report hsrc file formation progress
# H=@ do echo hsrc file formation progress
#
# S= >/dev/null 2>&1 slience ${CC} output during hsrc file formation
# S= full ${CC} output during hsrc file formation
#
# E= 2>/dev/null slience command stderr during hsrc file formation
# E= full command stderr during hsrc file formation
#
# V=@: do not echo debug statements (quiet mode)
# V=@ do echo debug statements (debug / verbose mode)
#
#Q=
Q=@
#
S= >/dev/null 2>&1
#S=
#
E= 2>/dev/null
#E=
#
#H=@:
H=@
#
V=@:
#V=@
# standard tools
#
@@ -252,7 +276,7 @@ BLT_HELP_FILES_13= bugs changes
STD_HELP_FILES_14= credit
BLT_HELP_FILES_14= contrib COPYING COPYING-LGPL question
BLT_HELP_FILES_14= contrib COPYING COPYING-LGPL questions
STD_HELP_FILES_15= wishlist todo
@@ -536,7 +560,7 @@ COPYING-LGPL: ../COPYING-LGPL
${TRUE}; \
fi
question: ../QUESTIONS
questions: ../QUESTIONS
${RM} -f $@
${CP} ../QUESTIONS $@
${CHMOD} 0444 $@
@@ -637,8 +661,8 @@ builtin: builtin.top builtin.end ../func.c funclist.sed
${Q} ${SED} -n -f funclist.sed ../func.c > funclist.c
${Q} ${RM} -f funclist.o funclist${EXT}
${Q} ${LCC} ${ICFLAGS} -DFUNCLIST -I/usr/include \
-I.. funclist.c -c 2>/dev/null
${Q} ${LCC} ${ILDFLAGS} funclist.o -o funclist${EXT}
-I.. funclist.c -c ${S}
${Q} ${LCC} ${ILDFLAGS} funclist.o -o funclist${EXT} ${S}
${Q} ${RM} -f builtin
${Q} ${GREP} -v '^#' builtin.top > builtin
${Q} ./funclist${EXT} | \
@@ -705,7 +729,7 @@ detail_help_list:
! -name mat ! -name obj.file ! -name operator \
! -name overview ! -name script ! -name statement \
! -name todo ! -name types ! -name unexpected \
! -name variable ! -name wishlist ! -name question \
! -name variable ! -name wishlist ! -name questions \
-print | \
while read i; do \
if [ X"$$i" != X"/dev/null" ]; then \
@@ -740,7 +764,7 @@ echo_inst_files:
clean:
${RM} -f obj mkbuiltin funclist.c funclist.o funclist${EXT}
${RM} -f COPYING COPYING-LGPL question
${RM} -f COPYING COPYING-LGPL questions
clobber: clean
${RM} -f ${BLT_HELP_FILES} full .all calc

View File

@@ -54,7 +54,7 @@ static char *program;
#define MAJOR_VER 2 /* major library version */
#define MINOR_VER 12 /* minor library version */
#define MAJOR_PATCH 9 /* major software version level */
#define MINOR_PATCH 0 /* minor software version level */
#define MINOR_PATCH 1 /* minor software version level */
/*