mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
convert ASCII TABs to ASCII SPACEs
Converted all ASCII tabs to ASCII spaces using a 8 character tab stop, for all files, except for all Makefiles (plus rpm.mk). The `git diff -w` reports no changes.
This commit is contained in:
110
math_error.c
110
math_error.c
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* Calc is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
||||
* Public License for more details.
|
||||
*
|
||||
* A copy of version 2.1 of the GNU Lesser General Public License is
|
||||
@@ -17,11 +17,11 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* Under source code control: 1994/08/03 05:08:22
|
||||
* File existed as early as: 1994
|
||||
* Under source code control: 1994/08/03 05:08:22
|
||||
* File existed as early as: 1994
|
||||
*
|
||||
* chongo <was here> /\oo/\ http://www.isthe.com/chongo/
|
||||
* Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
||||
* chongo <was here> /\oo/\ http://www.isthe.com/chongo/
|
||||
* Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -39,22 +39,22 @@
|
||||
*
|
||||
* For example:
|
||||
*
|
||||
* #include <setjmp.h>
|
||||
* #include "lib_calc.h"
|
||||
* #include <setjmp.h>
|
||||
* #include "lib_calc.h"
|
||||
*
|
||||
* int error;
|
||||
* int error;
|
||||
*
|
||||
* ...
|
||||
* ...
|
||||
*
|
||||
* if ((error = setjmp(calc_matherr_jmpbuf)) != 0) {
|
||||
* if ((error = setjmp(calc_matherr_jmpbuf)) != 0) {
|
||||
*
|
||||
* (* reinitialize calc after a longjmp *)
|
||||
* reinitialize();
|
||||
* (* reinitialize calc after a longjmp *)
|
||||
* reinitialize();
|
||||
*
|
||||
* (* report the error *)
|
||||
* printf("Ouch: %s\n", calc_err_msg);
|
||||
* }
|
||||
* calc_use_matherr_jmpbuf = 1;
|
||||
* (* report the error *)
|
||||
* printf("Ouch: %s\n", calc_err_msg);
|
||||
* }
|
||||
* calc_use_matherr_jmpbuf = 1;
|
||||
*/
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
#include "lib_calc.h"
|
||||
|
||||
|
||||
#include "banned.h" /* include after system header <> includes */
|
||||
#include "banned.h" /* include after system header <> includes */
|
||||
|
||||
|
||||
/*
|
||||
@@ -74,50 +74,50 @@
|
||||
void
|
||||
math_error(char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_list ap;
|
||||
|
||||
/*
|
||||
* format the error
|
||||
*/
|
||||
/*
|
||||
* format the error
|
||||
*/
|
||||
#ifdef VARARGS
|
||||
va_start(ap);
|
||||
va_start(ap);
|
||||
#else
|
||||
va_start(ap, fmt);
|
||||
va_start(ap, fmt);
|
||||
#endif
|
||||
vsnprintf(calc_err_msg, MAXERROR, fmt, ap);
|
||||
va_end(ap);
|
||||
calc_err_msg[MAXERROR] = '\0'; /* paranoia */
|
||||
vsnprintf(calc_err_msg, MAXERROR, fmt, ap);
|
||||
va_end(ap);
|
||||
calc_err_msg[MAXERROR] = '\0'; /* paranoia */
|
||||
|
||||
/*
|
||||
* if we should longjmp, so do
|
||||
*/
|
||||
if (calc_use_matherr_jmpbuf != 0) {
|
||||
if (conf->calc_debug & CALCDBG_RUNSTATE)
|
||||
printf("math_error: longjmp calc_matherr_jmpbuf\n");
|
||||
longjmp(calc_matherr_jmpbuf, calc_use_matherr_jmpbuf);
|
||||
}
|
||||
/*
|
||||
* if we should longjmp, so do
|
||||
*/
|
||||
if (calc_use_matherr_jmpbuf != 0) {
|
||||
if (conf->calc_debug & CALCDBG_RUNSTATE)
|
||||
printf("math_error: longjmp calc_matherr_jmpbuf\n");
|
||||
longjmp(calc_matherr_jmpbuf, calc_use_matherr_jmpbuf);
|
||||
}
|
||||
|
||||
/*
|
||||
* print error message and edit
|
||||
*/
|
||||
(void) fflush(stdout);
|
||||
(void) fflush(stderr);
|
||||
fprintf(stderr, "%s\n\n", calc_err_msg);
|
||||
/*
|
||||
* print error message and edit
|
||||
*/
|
||||
(void) fflush(stdout);
|
||||
(void) fflush(stderr);
|
||||
fprintf(stderr, "%s\n\n", calc_err_msg);
|
||||
|
||||
/*
|
||||
* if interactive, return to main via longjmp()
|
||||
*/
|
||||
if (calc_use_scanerr_jmpbuf != 0) {
|
||||
if (conf->calc_debug & CALCDBG_RUNSTATE)
|
||||
printf("math_error: longjmp calc_scanerr_jmpbuf\n");
|
||||
longjmp(calc_scanerr_jmpbuf, calc_use_scanerr_jmpbuf);
|
||||
}
|
||||
/*
|
||||
* if interactive, return to main via longjmp()
|
||||
*/
|
||||
if (calc_use_scanerr_jmpbuf != 0) {
|
||||
if (conf->calc_debug & CALCDBG_RUNSTATE)
|
||||
printf("math_error: longjmp calc_scanerr_jmpbuf\n");
|
||||
longjmp(calc_scanerr_jmpbuf, calc_use_scanerr_jmpbuf);
|
||||
}
|
||||
|
||||
/*
|
||||
* exit
|
||||
*/
|
||||
if (conf->calc_debug & CALCDBG_RUNSTATE)
|
||||
printf("math_error: about to exit\n");
|
||||
libcalc_call_me_last();
|
||||
exit(40);
|
||||
/*
|
||||
* exit
|
||||
*/
|
||||
if (conf->calc_debug & CALCDBG_RUNSTATE)
|
||||
printf("math_error: about to exit\n");
|
||||
libcalc_call_me_last();
|
||||
exit(40);
|
||||
}
|
||||
|
Reference in New Issue
Block a user