* Copyright (c) 1983, 1995 Eric P. Allman
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
* %sccs.include.redist.c%
static char sccsid
[] = "@(#)sysexits.c 8.3 (Berkeley) %G%";
** SYSEXITS.C -- error messages corresponding to sysexits.h
** If the first character of the string is a colon, interpolate
** the current errno after the rest of the string.
/* 64 USAGE */ " 500 Bad usage",
/* 65 DATAERR */ " 501 Data format error",
/* 66 NOINPUT */ ":550 Cannot open input",
/* 67 NOUSER */ " 550 User unknown",
/* 68 NOHOST */ " 550 Host unknown",
/* 69 UNAVAILABLE */ " 554 Service unavailable",
/* 70 SOFTWARE */ ":554 Internal error",
/* 71 OSERR */ ":451 Operating system error",
/* 72 OSFILE */ ":554 System file missing",
/* 73 CANTCREAT */ ":550 Can't create output",
/* 74 IOERR */ ":451 I/O error",
/* 75 TEMPFAIL */ " 250 Deferred",
/* 76 PROTOCOL */ " 554 Remote protocol error",
/* 77 NOPERM */ ":550 Insufficient permission",
/* 78 CONFIG */ " 554 Local configuration error",
int N_SysEx
= sizeof(SysExMsg
) / sizeof(SysExMsg
[0]);
** DSNTOEXITSTAT -- convert DSN-style error code to EX_ style.
** dsncode -- the text of the DSN-style code.
** The corresponding exit status.
/* first the easy cases.... */
/* now decode the other two field parts */
while (*dsncode
!= '\0' && *dsncode
!= '.')
/* and do a nested switch to work them out */
case 0: /* Other or Undefined status */
case 1: /* Address Status */
case 0: /* Other Address Status */
case 1: /* Bad mailbox address */
case 6: /* Mailbox has moved, No forwarding address */
case 2: /* Bad system address */
case 3: /* Bad mailbox address syntax */
case 4: /* Mailbox address ambiguous */
case 5: /* Address valid */
case 2: /* Mailbox Status */
case 0: /* Other or Undefined mailbox status */
case 1: /* Mailbox disabled, not acccepting messages */
case 2: /* Mailbox full */
case 4: /* Mailing list expansion problem */
case 3: /* Message length exceeds administrative lim */
case 3: /* System Status */
case 4: /* Network and Routing Status */
case 0: /* Other or undefined network or routing stat */
case 1: /* No answer from host */
case 3: /* Routing server failure */
case 5: /* Network congestion */
case 2: /* Bad connection */
case 4: /* Unable to route */
case 6: /* Routing loop detected */
case 7: /* Delivery time expired */
case 5: /* Protocol Status */
case 6: /* Message Content or Media Status */
case 7: /* Security Status */