version 1.3, 1997/07/25 21:05:41 |
version 1.4, 2002/02/19 19:39:39 |
|
|
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
#include <stdarg.h> |
|
|
#include "defs.h" |
#include "defs.h" |
#include "extern.h" |
#include "extern.h" |
|
|
return (oe); |
return (oe); |
} |
} |
|
|
#ifdef __STDC__ |
|
#include <stdarg.h> |
|
#else |
|
#include <varargs.h> |
|
#endif |
|
/* |
/* |
* Error reporting function |
* Error reporting function |
*/ |
*/ |
void |
void |
#ifdef __STDC__ |
|
err(int severity, const char *fmt, ...) |
err(int severity, const char *fmt, ...) |
#else |
|
err(severity, fmt, va_alist) |
|
int severity; |
|
char *fmt; |
|
va_dcl |
|
#endif |
|
{ |
{ |
va_list ap; |
va_list ap; |
#ifdef __STDC__ |
|
va_start(ap, fmt); |
va_start(ap, fmt); |
#else |
|
va_start(ap); |
|
#endif |
|
(void)fprintf(stderr, "sed: "); |
(void)fprintf(stderr, "sed: "); |
switch (severity) { |
switch (severity) { |
case WARNING: |
case WARNING: |