From d537a95fdbc0b4a5f38edea8593b4c085fdd7fcb Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Fri, 14 Jul 2000 01:51:25 +0000 Subject: Use errorMsg rather than fprintf. --- miscutils/dc.c | 6 +++--- miscutils/mt.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'miscutils') diff --git a/miscutils/dc.c b/miscutils/dc.c index 5bf3bc984..7b13cb943 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c @@ -22,7 +22,7 @@ static unsigned int pointer; static void push(double a) { if (pointer >= (sizeof(stack) / sizeof(*stack))) { - fprintf(stderr, "dc: stack overflow\n"); + errorMsg("stack overflow\n"); exit(-1); } else stack[pointer++] = a; @@ -31,7 +31,7 @@ static void push(double a) static double pop() { if (pointer == 0) { - fprintf(stderr, "dc: stack underflow\n"); + errorMsg("stack underflow\n"); exit(-1); } return stack[--pointer]; @@ -132,7 +132,7 @@ static void stack_machine(const char *argument) } o++; } - fprintf(stderr, "dc: %s: syntax error.\n", argument); + errorMsg("%s: syntax error.\n", argument); exit(-1); } diff --git a/miscutils/mt.c b/miscutils/mt.c index 304d66485..4ab478270 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c @@ -81,7 +81,7 @@ extern int mt_main(int argc, char **argv) } if (code->name == 0) { - fprintf(stderr, "mt: unrecognized opcode %s.\n", argv[1]); + errorMsg("unrecognized opcode %s.\n", argv[1]); exit (FALSE); } -- cgit v1.2.3