1 /* $NetBSD: mystrerror.c,v 1.2 2025/02/25 19:15:52 christos Exp $ */ 2 3 /*++ 4 /* NAME 5 /* mystrerror 3 6 /* SUMMARY 7 /* convert error number to string 8 /* SYNOPSIS 9 /* #include <stringops.h> 10 /* 11 /* const char *mystrerror() 12 /* int errnum) 13 /* DESCRIPTION 14 /* mystrerror() maps an error number to string. Unlike strerror(3) 15 /* it returns "Application error" instead of "Success". 16 /* LICENSE 17 /* .ad 18 /* .fi 19 /* The Secure Mailer license must be distributed with this software. 20 /* AUTHOR(S) 21 /* Wietse Venema 22 /* porcupine.org 23 /*--*/ 24 25 /* 26 * System library. 27 */ 28 #include <sys_defs.h> 29 #include <string.h> 30 31 /* 32 * Utility library. 33 */ 34 #include <stringops.h> 35 36 /* mystrerror - convert error number to string */ 37 38 const char *mystrerror(int errnum) 39 { 40 return (errnum ? strerror(errnum) : "Application error"); 41 } 42