diff --git a/CHANGES b/CHANGES index 741e81c..8b5b39b 100644 --- a/CHANGES +++ b/CHANGES @@ -1573,7 +1573,7 @@ The following are the changes from calc version 2.12.1.10 to 2.12.2: 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 + calc-contrib at asthe dot com Email address an "ifeq ($(target),YOUR_TARGET_NAME)" ... "endif" set of lines from the Makefile so that @@ -2472,7 +2472,7 @@ The following are the changes from calc version 2.11.8.0 to 2.11.8.1: and oldstd -n & newstd classic cfg default -------------------------------------------------------- epsilon 1e-20 1e-10 1e-20 1e-20 - quo 2 2 2 2 + quo 2 2 2 2 outround 2 24 2 24 leadzero 0 1 0 1 fullzero 0 1 0 0 diff --git a/HOWTO.INSTALL b/HOWTO.INSTALL index 4db34e7..9f88131 100644 --- a/HOWTO.INSTALL +++ b/HOWTO.INSTALL @@ -87,7 +87,7 @@ Installing calc from the bzip2-ed tarball in 4 easy steps: BINDIR Where to install calc binary files. LIBDIR Where to install calc link library (*.a) files. CALC_SHAREDIR Where to install calc help, .cal, startup, and - config files. + config files. You may want to change the default installation locations for these values, which are based on the 4 values listed above: @@ -108,13 +108,13 @@ Installing calc from the bzip2-ed tarball in 4 easy steps: For example, if: - BINDIR= /usr/bin + BINDIR= /usr/bin LIBDIR= /usr/lib CALC_SHAREDIR= /usr/share/calc and if: - T= /var/tmp/testing + T= /var/tmp/testing Then the installation locations will be: diff --git a/LIBRARY b/LIBRARY index 39114d3..d9e1948 100644 --- a/LIBRARY +++ b/LIBRARY @@ -216,7 +216,7 @@ Your program must handle parse/scan errors in one of two ways: /* report the parse/scan */ if (calc_use_scanerr_jmpbuf == 0) { printf("parse error: %s\n", calc_err_msg); - } + } /* initialize calc after the longjmp */ initialize(); diff --git a/Makefile b/Makefile index 236bb33..a2e9121 100644 --- a/Makefile +++ b/Makefile @@ -383,7 +383,7 @@ update_version: fi; \ ${RM} -f "$$i.tmp"; \ ${SED} -e 's/^VERSION=.*/VERSION= '"$$CALC_VERSION"'/' \ - $$i > $$i.tmp; \ + $$i > $$i.tmp; \ if ${CMP} -s "$$i" "$$i.tmp"; then \ ${RM} -f "$$i.tmp"; \ echo "versions already up to date in $$i"; \ diff --git a/Makefile.ship b/Makefile.ship index 93bef37..b51023e 100644 --- a/Makefile.ship +++ b/Makefile.ship @@ -754,9 +754,9 @@ endif # LIBDIR= ${PREFIX}/lib # CALC_SHAREDIR= ${PREFIX}/share/calc # -# NOTE: Starting with macOS El Capitan OS X 10.11, root by default -# could not mkdir under system locations, so macOS must now -# use the ${PREFIX} tree. +# NOTE: Starting with macOS El Capitan OS X 10.11, root by default +# could not mkdir under system locations, so macOS must now +# use the ${PREFIX} tree. #if 0 /* start of skip for non-Gnu makefiles */ ifeq ($(target),Darwin) @@ -955,12 +955,12 @@ CATEXT= 1 # If NROFF is non-empty, then # # ${NROFF} ${NROFF_ARG} calc.1 > ${CATDIR}/calc.${CATEXT} -# is used to build and install the cat page +# is used to build and install the cat page # # else (NROFF is empty) # # ${MANMAKE} calc.1 ${CATDIR} -# is used to build and install the cat page +# is used to build and install the cat page # else # # The cat page is not built or installed @@ -5070,7 +5070,7 @@ endif fi -${Q} if [ -f calc-static${EXT} ]; then \ if ${CMP} -s calc-static${EXT} \ - ${T}${BINDIR}/calc-static${EXT}; then \ + ${T}${BINDIR}/calc-static${EXT}; then \ ${TRUE}; \ else \ ${RM} -f ${T}${BINDIR}/calc-static.new${EXT}; \ @@ -5123,23 +5123,23 @@ endif else \ ${RM} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \ ${CP} -f libcalc${LIB_EXT_VERSION} \ - ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \ + ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \ ${CHMOD} 0644 ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \ ${MV} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new \ - ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}; \ + ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}; \ echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}"; \ ${LN} -f -s libcalc${LIB_EXT_VERSION} \ - ${T}${LIBDIR}/libcalc${LIB_EXT}; \ + ${T}${LIBDIR}/libcalc${LIB_EXT}; \ echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT}"; \ ${RM} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \ ${CP} -f custom/libcustcalc${LIB_EXT_VERSION} \ - ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \ + ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \ ${CHMOD} 0644 ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \ ${MV} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new \ - ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}; \ + ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}; \ echo "installed ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}"; \ ${LN} -f -s libcustcalc${LIB_EXT_VERSION} \ - ${T}${LIBDIR}/libcustcalc${LIB_EXT}; \ + ${T}${LIBDIR}/libcustcalc${LIB_EXT}; \ echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT}"; \ if [ -z "${T}" -o "/" = "${T}" ]; then \ if [ ! -z "${LDCONFIG}" ]; then \ @@ -5402,7 +5402,7 @@ calc-symlink: ; do \ if [ -e "${T}$$i" ]; then \ if [ ! -L "$$i" -a "${T}$$i" -ef "$$i" ]; then \ - echo "ERROR: ${T}$$i is the same as $$i" 1>&2; \ + echo "ERROR: ${T}$$i is the same as $$i" 1>&2; \ else \ if [ -e "$$i" ]; then \ echo ${RM} -f "$$i"; \ @@ -5410,7 +5410,7 @@ calc-symlink: fi; \ echo ${LN} -s "${T}$$i" "$$i"; \ ${LN} -s "${T}$$i" "$$i"; \ - fi; \ + fi; \ else \ echo "Warning: not found: ${T}$$i" 1>&2; \ fi; \ diff --git a/cal/Makefile b/cal/Makefile index 39b0106..50a3c57 100644 --- a/cal/Makefile +++ b/cal/Makefile @@ -461,7 +461,7 @@ uninstall: continue; \ fi; \ if [ -f "${T}${CALC_SHAREDIR}/$$i" ]; then \ - ${RM} -f "${T}${CALC_SHAREDIR}/$$i"; \ + ${RM} -f "${T}${CALC_SHAREDIR}/$$i"; \ if [ -f "${T}${CALC_SHAREDIR}/$$i" ]; then \ echo "cannot uninstall ${T}${CALC_SHAREDIR}/$$i"; \ else \ diff --git a/cal/alg_config.cal b/cal/alg_config.cal index e17a326..7cab146 100644 --- a/cal/alg_config.cal +++ b/cal/alg_config.cal @@ -497,7 +497,7 @@ define best_mul2() low = mid; high = mid; if (config("user_debug") > 0) { - printf("\twe are close enough to unity ratio at: %d\n", mid); + printf("\twe are close enough to unity ratio at: %d\n", mid); } break; } @@ -505,7 +505,7 @@ define best_mul2() /* bump lower range up if we went over */ if (ratio > 1.0) { if (config("user_debug") > 2) { - printf("\tmove low from %d up to %d\n", + printf("\tmove low from %d up to %d\n", low, mid); } low = mid; @@ -513,7 +513,7 @@ define best_mul2() /* drop higher range down if we went under */ } else { if (config("user_debug") > 2) { - printf("\tmove high from %d down to %d\n", + printf("\tmove high from %d down to %d\n", high, mid); } high = mid; @@ -522,7 +522,7 @@ define best_mul2() /* report on test loop progress */ if (config("user_debug") > 1) { printf("\tsetting low: %d high: %d diff: %d\n", - low, high, high-low); + low, high, high-low); } } @@ -884,7 +884,7 @@ define best_sq2() high *= expand; if (config("user_debug") > 1) { printf(" expand the next test range by a factor of %d\n", - expand); + expand); } /* @@ -979,7 +979,7 @@ define best_sq2() low = mid; high = mid; if (config("user_debug") > 0) { - printf("\twe are close enough to unity ratio at: %d\n", mid); + printf("\twe are close enough to unity ratio at: %d\n", mid); } break; } @@ -987,7 +987,7 @@ define best_sq2() /* bump lower range up if we went over */ if (ratio > 1.0) { if (config("user_debug") > 2) { - printf("\tmove low from %d up to %d\n", + printf("\tmove low from %d up to %d\n", low, mid); } low = mid; @@ -995,7 +995,7 @@ define best_sq2() /* drop higher range down if we went under */ } else { if (config("user_debug") > 2) { - printf("\tmove high from %d down to %d\n", + printf("\tmove high from %d down to %d\n", high, mid); } high = mid; @@ -1004,7 +1004,7 @@ define best_sq2() /* report on test loop progress */ if (config("user_debug") > 1) { printf("\tsetting low: %d high: %d diff: %d\n", - low, high, high-low); + low, high, high-low); } } @@ -1385,7 +1385,7 @@ define best_pow2() printf(" pmod alg1/alg2 ratio = %.3f\n", ratio); if (ratio > 1.0 && ratio <= 1.02) { printf(" while alg1 is slightly better than alg2, " - "it is not clearly better\n"); + "it is not clearly better\n"); } } } while (ratio <= 1.02); @@ -1420,7 +1420,7 @@ define best_pow2() high *= expand; if (config("user_debug") > 1) { printf(" expand the next test range by a factor of %d\n", - expand); + expand); } /* @@ -1478,7 +1478,7 @@ define best_pow2() low = mid; high = mid; if (config("user_debug") > 0) { - printf("\twe are close enough to unity ratio at: %d\n", mid); + printf("\twe are close enough to unity ratio at: %d\n", mid); } break; } @@ -1486,7 +1486,7 @@ define best_pow2() /* bump lower range up if we went over */ if (ratio > 1.0) { if (config("user_debug") > 2) { - printf("\tmove low from %d up to %d\n", + printf("\tmove low from %d up to %d\n", low, mid); } low = mid; @@ -1494,7 +1494,7 @@ define best_pow2() /* drop higher range down if we went under */ } else { if (config("user_debug") > 2) { - printf("\tmove high from %d down to %d\n", + printf("\tmove high from %d down to %d\n", high, mid); } high = mid; @@ -1503,7 +1503,7 @@ define best_pow2() /* report on test loop progress */ if (config("user_debug") > 1) { printf("\tsetting low: %d high: %d diff: %d\n", - low, high, high-low); + low, high, high-low); } } diff --git a/calc.c b/calc.c index 566f4d2..814a6be 100644 --- a/calc.c +++ b/calc.c @@ -277,14 +277,14 @@ main(int argc, char **argv) if (nextcp(&cp, &index, argc, argv, FALSE)) { fprintf(stderr, - "-D expects argument\n"); + "-D expects argument\n"); exit(5); } havearg = TRUE; if (*cp != ':') { if (*cp < '0' || *cp > '9') { fprintf(stderr, - "-D expects" + "-D expects" " integer\n"); exit(6); } @@ -296,13 +296,13 @@ main(int argc, char **argv) if (*cp != '\0' && *cp != ' ' && *cp != ':') { fprintf(stderr, - "Bad syntax im -D" + "Bad syntax im -D" " arg\n"); exit(7); } if (*cp != ':') { if (nextcp(&cp, &index, - argc, argv, + argc, argv, FALSE) || *cp != ':') break; @@ -318,7 +318,7 @@ main(int argc, char **argv) if (*cp != ':') { if (*cp < '0' || *cp > '9') { fprintf(stderr, - "-D : expects" + "-D : expects" " integer\n"); exit(9); } @@ -330,13 +330,13 @@ main(int argc, char **argv) if (*cp != '\0' && *cp != ' ' && *cp != ':') { fprintf(stderr, - "Bad syntax im -D" + "Bad syntax im -D" " : arg\n"); exit(10); } if (*cp != ':') { if (nextcp(&cp, &index, - argc, argv, + argc, argv, FALSE) || *cp != ':') { break; @@ -346,12 +346,12 @@ main(int argc, char **argv) if (nextcp(&cp, &index, argc, argv, FALSE)) { fprintf(stderr, "-D : : expects" - " argument\n"); + " argument\n"); exit(11); } if (*cp < '0' || *cp > '9') { fprintf(stderr, "-D :: expects" - " integer\n"); + " integer\n"); exit(12); } user_debug = cp; @@ -398,7 +398,7 @@ main(int argc, char **argv) if (nextcp(&cp, &index, argc, argv, haveendstr)) { fprintf(stderr, "-f -once" - " expects" + " expects" " filename\n"); exit(16); } diff --git a/cscript/Makefile b/cscript/Makefile index 2ff447c..26cb17a 100644 --- a/cscript/Makefile +++ b/cscript/Makefile @@ -497,7 +497,7 @@ uninstall: continue; \ fi; \ if [ -f "${T}${SCRIPTDIR}/$$i" ]; then \ - ${RM} -f "${T}${SCRIPTDIR}/$$i"; \ + ${RM} -f "${T}${SCRIPTDIR}/$$i"; \ if [ -f "${T}${SCRIPTDIR}/$$i" ]; then \ echo "cannot uninstall ${T}${SCRIPTDIR}/$$i"; \ else \ diff --git a/custom/Makefile b/custom/Makefile index 22a40e9..0446796 100644 --- a/custom/Makefile +++ b/custom/Makefile @@ -1708,7 +1708,7 @@ uninstall: continue; \ fi; \ if [ -f "${T}${CUSTOMHELPDIR}/$$i" ]; then \ - ${RM} -f "${T}${CUSTOMHELPDIR}/$$i"; \ + ${RM} -f "${T}${CUSTOMHELPDIR}/$$i"; \ if [ -f "${T}${CUSTOMHELPDIR}/$$i" ]; then \ echo "cannot uninstall ${T}${CUSTOMHELPDIR}/$$i"; \ else \ @@ -1721,7 +1721,7 @@ uninstall: continue; \ fi; \ if [ -f "${T}${CUSTOMCALDIR}/$$i" ]; then \ - ${RM} -f "${T}${CUSTOMCALDIR}/$$i"; \ + ${RM} -f "${T}${CUSTOMCALDIR}/$$i"; \ if [ -f "${T}${CUSTOMCALDIR}/$$i" ]; then \ echo "cannot uninstall ${T}${CUSTOMCALDIR}/$$i"; \ else \ @@ -1734,7 +1734,7 @@ uninstall: continue; \ fi; \ if [ -f "${T}${CUSTOMINCDIR}/$$i" ]; then \ - ${RM} -f "${T}${CUSTOMINCDIR}/$$i"; \ + ${RM} -f "${T}${CUSTOMINCDIR}/$$i"; \ if [ -f "${T}${CUSTOMINCDIR}/$$i" ]; then \ echo "cannot uninstall ${T}${CUSTOMINCDIR}/$$i"; \ else \ diff --git a/custom/Makefile.tail b/custom/Makefile.tail index 69d9bb2..4f9b4e2 100644 --- a/custom/Makefile.tail +++ b/custom/Makefile.tail @@ -498,7 +498,7 @@ uninstall: continue; \ fi; \ if [ -f "${T}${CUSTOMHELPDIR}/$$i" ]; then \ - ${RM} -f "${T}${CUSTOMHELPDIR}/$$i"; \ + ${RM} -f "${T}${CUSTOMHELPDIR}/$$i"; \ if [ -f "${T}${CUSTOMHELPDIR}/$$i" ]; then \ echo "cannot uninstall ${T}${CUSTOMHELPDIR}/$$i"; \ else \ @@ -511,7 +511,7 @@ uninstall: continue; \ fi; \ if [ -f "${T}${CUSTOMCALDIR}/$$i" ]; then \ - ${RM} -f "${T}${CUSTOMCALDIR}/$$i"; \ + ${RM} -f "${T}${CUSTOMCALDIR}/$$i"; \ if [ -f "${T}${CUSTOMCALDIR}/$$i" ]; then \ echo "cannot uninstall ${T}${CUSTOMCALDIR}/$$i"; \ else \ @@ -524,7 +524,7 @@ uninstall: continue; \ fi; \ if [ -f "${T}${CUSTOMINCDIR}/$$i" ]; then \ - ${RM} -f "${T}${CUSTOMINCDIR}/$$i"; \ + ${RM} -f "${T}${CUSTOMINCDIR}/$$i"; \ if [ -f "${T}${CUSTOMINCDIR}/$$i" ]; then \ echo "cannot uninstall ${T}${CUSTOMINCDIR}/$$i"; \ else \ diff --git a/file.c b/file.c index 68dc6a4..f663375 100644 --- a/file.c +++ b/file.c @@ -926,7 +926,7 @@ printid(FILEID id, int flags) if (get_open_pos(fp, &pos) < 0) { if (fileno(fp) > 2) - math_str("Error while determining file position!"); + math_str("Error while determining file position!"); math_chr(')'); return 0; } diff --git a/help/Makefile b/help/Makefile index 502ded7..306525f 100644 --- a/help/Makefile +++ b/help/Makefile @@ -894,7 +894,7 @@ uninstall: continue; \ fi; \ if [ -f "${T}${HELPDIR}/$$i" ]; then \ - ${RM} -f "${T}${HELPDIR}/$$i"; \ + ${RM} -f "${T}${HELPDIR}/$$i"; \ if [ -f "${T}${HELPDIR}/$$i" ]; then \ echo "cannot uninstall ${T}${HELPDIR}/$$i"; \ else \ diff --git a/help/jacobi b/help/jacobi index 9261bf5..8550810 100644 --- a/help/jacobi +++ b/help/jacobi @@ -75,7 +75,7 @@ DESCRIPTION jacobi(x,y) == 0 if x <= 0 jacobi(x,y) == 0 if y <= 0 - jacobi(x,y) == 0 if y is even + jacobi(x,y) == 0 if y is even jacobi(x,b) == 0 if gcd(x,b) > 1 @@ -105,7 +105,7 @@ DESCRIPTION It is also worth noting that: - jacobi(x,y) == 0 if gcd(y,x) != 1 + jacobi(x,y) == 0 if gcd(y,x) != 1 jacobi(y,y) == 0 if y > 1 Based on the generalization of the quadratic reciprocity theorem, @@ -125,8 +125,8 @@ DESCRIPTION When b is odd: - jacobi(x^2,b) == 1 if gcd(x,b) == 1 - jacobi(x,b^2) == 1 if gcd(x,b) == 1 + jacobi(x^2,b) == 1 if gcd(x,b) == 1 + jacobi(x,b^2) == 1 if gcd(x,b) == 1 jacobi(x0,b) == jacobi(x1,b) if x0 == x1 % b @@ -162,7 +162,7 @@ DESCRIPTION j = 1; while (x != 0) { while (iseven(x)) { - x = x / 2; + x = x / 2; t = b % 8; if (t == 3 || t == 5) { j = -j; @@ -170,7 +170,7 @@ DESCRIPTION } swap(x,b); if (((x % 4) == 3) && ((b % 4) == 3)) { - j = -j; + j = -j; } x = x % b; } diff --git a/help/mat b/help/mat index 1680ede..a712ec4 100644 --- a/help/mat +++ b/help/mat @@ -163,7 +163,7 @@ DESCRIPTION printf(" [%d,%d]: %e", i, j, A[i,j]); if (i != matmax(A,1)) printf("\n"); - } + } } So that when one defines a 2D matrix such as: diff --git a/help/obj.file b/help/obj.file index c9554e0..10c0425 100644 --- a/help/obj.file +++ b/help/obj.file @@ -135,7 +135,7 @@ Using objects xx_print 1 print value, default prints elements xx_one 1 multiplicative identity, default is 1 xx_test 1 logical test (false,true => 0,1), - default tests elements + default tests elements xx_add 2 xx_sub 2 xx_neg 1 negative @@ -146,10 +146,10 @@ Using objects xx_norm 1 square of absolute value xx_conj 1 conjugate xx_pow 2 integer power, default does multiply, - square, inverse + square, inverse xx_sgn 1 sign of value (-1, 0, 1) xx_cmp 2 equality (equal,nonequal => 0,1), - default tests elements + default tests elements xx_rel 2 relative order, positive for >, etc. xx_quo 3 integer quotient xx_mod 3 remainder of division diff --git a/help/statement b/help/statement index 4a98ad6..30a6d60 100644 --- a/help/statement +++ b/help/statement @@ -29,13 +29,13 @@ Statements This works as expected: - if (expr) { + if (expr) { ... } However this WILL NOT WORK AS EXPECTED: - if (expr) + if (expr) { ... } @@ -43,7 +43,7 @@ Statements because calc will parse the if being terminated by an empty statement followed by a - if (expr) ; + if (expr) ; { ... } @@ -294,7 +294,7 @@ Statements help command top level commands help expression calc expression syntax help builtin calc builtin functions - help usage how to invoke the calc command and calc -options + help usage how to invoke the calc command and calc -options You may obtain help on individual builtin functions. For example: diff --git a/quickhash.c b/quickhash.c index 5b84606..df9bdb8 100644 --- a/quickhash.c +++ b/quickhash.c @@ -96,16 +96,16 @@ S_FUNC QCKHASH blk_hash(BLOCK *blk, QCKHASH val); * the next 32 bit QCKHASH * * Example: - * QCKHASH val; - * int x; + * QCKHASH val; + * int x; * - * quasi_fnv(x, val); + * quasi_fnv(x, val); * * NOTE: The (x) argument may be an expression such as something with - * a ++ or --. The macro must only use (x) once. + * a ++ or --. The macro must only use (x) once. * * NOTE: The (val) argument just be a lvalue / something to which - * a value can be assigned. + * a value can be assigned. * * The careful observer will note that (x) need not be a simple * octet. This is not a bug, but a feature. The FNV hash was @@ -366,7 +366,7 @@ randhash(RAND *r, QCKHASH val) return V_RAND+val; } else { /* hash control values */ - val += V_RAND; + val += V_RAND; quasi_fnv(r->j, val); quasi_fnv(r->k, val); quasi_fnv(r->bits, val); diff --git a/rpm.mk b/rpm.mk index 9acce39..16e9007 100644 --- a/rpm.mk +++ b/rpm.mk @@ -49,7 +49,7 @@ # %_gpgbin /usr/bin/gpg # IMPORTANT NOTE: Unless the package redhat-rpm-config is installed, -# the calc-debuginfo rpm will not be created. +# the calc-debuginfo rpm will not be created. # # IMPORTANT NOTE: These packages are important for general # rpm processing: @@ -266,7 +266,7 @@ chkpkg: ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' for i in "$(RPM_TOP)/RPMS/$(TARCH)/$(RPMx86_64)" \ "$(RPM_TOP)/RPMS/$(TARCH)/$(DRPMx86_64)" \ - "$(RPM_TOP)/SRPMS/$(SRPM)" ; do \ + "$(RPM_TOP)/SRPMS/$(SRPM)" ; do \ echo "***** start $$i" ; \ ${RPM_TOOL} -qpi "$$"i ; \ echo "***** files $$i" ; \