From e6e5c6c4ddffa8199225c76cd46e34ab58aec2ca Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 6 Jan 1999 02:44:58 +0000 Subject: More error message cleanup. svn path=/trunk/; revision=2333 --- Makefile.in | 2 +- fetchmail.c | 4 ++-- fetchmail.h | 2 +- rcfile_y.y | 4 ++-- report.c | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile.in b/Makefile.in index 0b2108b6..4ae6958e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -18,7 +18,7 @@ CC = @CC@ CFLAGS = @CFLAGS@ # CFLAGS = -g2 -5 # QNX LDFLAGS = @LDFLAGS@ -# LDLAGS = -g2 -5 # QNX +# LDFLAGS = -g2 -5 # QNX LEX = @LEX@ LEXFLAGS= YACC = @YACC@ diff --git a/fetchmail.c b/fetchmail.c index f0fd8997..7284477c 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -454,11 +454,11 @@ int main (int argc, char **argv) if (run.use_syslog) { openlog(program_name, LOG_PID, LOG_MAIL); - error_init(-1); + report_init(-1); } else #endif - error_init((run.poll_interval == 0 || nodetach) && !run.logfile); + report_init((run.poll_interval == 0 || nodetach) && !run.logfile); if (run.poll_interval) { diff --git a/fetchmail.h b/fetchmail.h index eb8bab8e..5dcd277c 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -337,7 +337,7 @@ extern const char *fetchmailhost; /* error.c: Error reporting */ #if defined(HAVE_STDARG_H) -void report_init(FILE *fp, int foreground); +void report_init(int foreground); void report (FILE *fp, int errnum, const char *format, ...); void report_build (FILE *fp, const char *format, ...); void report_complete (FILE *fp, int errnum, const char *format, ...); diff --git a/rcfile_y.y b/rcfile_y.y index 54f1b534..05084635 100644 --- a/rcfile_y.y +++ b/rcfile_y.y @@ -374,7 +374,7 @@ int prc_filecheck(const char *pathname, const flag securecheck) if (errno == ENOENT) return(PS_SUCCESS); else { - error(0, errno, "lstat: %s", pathname); + report(stderr, errno, "lstat: %s", pathname); return(PS_IOERR); } } @@ -422,7 +422,7 @@ int prc_parse_file (const char *pathname, const flag securecheck) if (strcmp(pathname, "-") == 0) yyin = stdin; else if ((yyin = fopen(pathname,"r")) == (FILE *)NULL) { - error(0, errno, "open: %s", pathname); + report(stderr, errno, "open: %s", pathname); return(PS_IOERR); } diff --git a/report.c b/report.c index be33152c..16ce4981 100644 --- a/report.c +++ b/report.c @@ -232,11 +232,11 @@ report (FILE *errfp, errnum, message, va_alist) } /* - * Calling error_init(1) causes error_build and error_complete to write + * Calling report_init(1) causes error_build and error_complete to write * to errfp without buffering. This is needed for the ticker dots to * work correctly. */ -void error_init(int mode) +void report_init(int mode) { switch(mode) { -- cgit v1.2.3