Remove unnecessary spaces inbetween or next to tabs

This commit is contained in:
Landon Curt Noll
2021-12-01 23:25:49 -08:00
parent bb041098bc
commit ef00e00328
19 changed files with 78 additions and 78 deletions

View File

@@ -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

View File

@@ -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:

View File

@@ -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();

View File

@@ -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"; \

View File

@@ -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; \

View File

@@ -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 \

View File

@@ -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);
}
}

20
calc.c
View File

@@ -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);
}

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

2
file.c
View File

@@ -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;
}

View File

@@ -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 \

View File

@@ -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;
}

View File

@@ -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:

View 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

View File

@@ -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:

View File

@@ -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);

4
rpm.mk
View File

@@ -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" ; \