1N/A/*
1N/A * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
1N/A * All rights reserved.
1N/A *
1N/A * By using this file, you agree to the terms and conditions set
1N/A * forth in the LICENSE file which can be found at the top level of
1N/A * the sendmail distribution.
1N/A *
1N/A */
1N/A
1N/A#pragma ident "%Z%%M% %I% %E% SMI"
1N/A
1N/A#include <sendmail.h>
1N/A
1N/ASM_RCSID("@(#)$Id: err.c,v 8.3 2001/01/24 01:27:30 gshapiro Exp $")
1N/A
1N/A#include <ctype.h>
1N/A
1N/A/*VARARGS1*/
1N/Avoid
1N/A#ifdef __STDC__
1N/Amessage(const char *msg, ...)
1N/A#else /* __STDC__ */
1N/Amessage(msg, va_alist)
1N/A const char *msg;
1N/A va_dcl
1N/A#endif /* __STDC__ */
1N/A{
1N/A const char *m;
1N/A SM_VA_LOCAL_DECL
1N/A
1N/A m = msg;
1N/A if (isascii(m[0]) && isdigit(m[0]) &&
1N/A isascii(m[1]) && isdigit(m[1]) &&
1N/A isascii(m[2]) && isdigit(m[2]) && m[3] == ' ')
1N/A m += 4;
1N/A SM_VA_START(ap, msg);
1N/A (void) vfprintf(stderr, m, ap);
1N/A SM_VA_END(ap);
1N/A (void) fprintf(stderr, "\n");
1N/A}
1N/A
1N/A/*VARARGS1*/
1N/Avoid
1N/A#ifdef __STDC__
1N/Asyserr(const char *msg, ...)
1N/A#else /* __STDC__ */
1N/Asyserr(msg, va_alist)
1N/A const char *msg;
1N/A va_dcl
1N/A#endif /* __STDC__ */
1N/A{
1N/A const char *m;
1N/A SM_VA_LOCAL_DECL
1N/A
1N/A m = msg;
1N/A if (isascii(m[0]) && isdigit(m[0]) &&
1N/A isascii(m[1]) && isdigit(m[1]) &&
1N/A isascii(m[2]) && isdigit(m[2]) && m[3] == ' ')
1N/A m += 4;
1N/A SM_VA_START(ap, msg);
1N/A (void) vfprintf(stderr, m, ap);
1N/A SM_VA_END(ap);
1N/A (void) fprintf(stderr, "\n");
1N/A}