summaryrefslogtreecommitdiff
path: root/examples/addr.c
diff options
context:
space:
mode:
authorSam Roberts <sroberts@uniserve.com>2002-02-26 04:40:20 +0000
committerSam Roberts <sroberts@uniserve.com>2002-02-26 04:40:20 +0000
commitd55106d93b386f3d7bb1870875d8fc8227ee5a07 (patch)
tree08ae2959d051e30b028be6f572a413d4aef1b0cc /examples/addr.c
parentc003ad7d755d3a4212148bf509d4b6325bd699f1 (diff)
downloadmailutils-d55106d93b386f3d7bb1870875d8fc8227ee5a07.tar.gz
mailutils-d55106d93b386f3d7bb1870875d8fc8227ee5a07.tar.bz2
Replaced strerror() with mu_errstring().
Diffstat (limited to 'examples/addr.c')
-rw-r--r--examples/addr.c31
1 files changed, 1 insertions, 30 deletions
diff --git a/examples/addr.c b/examples/addr.c
index 60b92be8d..0832a5032 100644
--- a/examples/addr.c
+++ b/examples/addr.c
@@ -4,35 +4,6 @@
#define EPARSE ENOENT
-static const char *
-err_name (int e)
-{
- struct
- {
- int e;
- const char *s;
- }
- map[] =
- {
-#define E(e) { e, #e },
- E (EPARSE) E (EINVAL) E (ENOMEM)
-#undef E
- {
- 0, NULL}
- };
- static char s[sizeof (int) * 8 + 3];
- int i;
-
- for (i = 0; map[i].s; i++)
- {
- if (map[i].e == e)
- return map[i].s;
- }
- sprintf (s, "[%d]", e);
-
- return s;
-}
-
static int
parse (const char *str)
{
@@ -50,7 +21,7 @@ parse (const char *str)
if (status)
{
- printf ("%s=> error %s\n\n", str, err_name (status));
+ printf ("%s=> error %s\n\n", str, mu_errname (status));
return 0;
}
else

Return to:

Send suggestions and report system problems to the System administrator.