Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
c003ad7d
...
c003ad7d755d3a4212148bf509d4b6325bd699f1
authored
2002-02-26 04:19:52 +0000
by
Sam Roberts
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added muerrno.c to the build, added locker error numbers.
1 parent
9cd66f11
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
9 deletions
include/mailutils/errno.h
mailbox/Makefile.am
mailbox/muerrno.c
include/mailutils/errno.h
View file @
c003ad7
...
...
@@ -45,8 +45,14 @@ extern "C" {
#define MU_ERR_BAD_822_FORMAT (MU_ERR_BASE | 0x006)
#define MU_ERR_EMPTY_ADDRESS (MU_ERR_BASE | 0x007)
#define MU_ERR_LOCKER_NULL (MU_ERR_BASE | 0x008)
#define MU_ERR_LOCK_CONFLICT (MU_ERR_BASE | 0x009)
#define MU_ERR_LOCK_BAD_LOCK (MU_ERR_BASE | 0x00a)
#define MU_ERR_LOCK_BAD_FILE (MU_ERR_BASE | 0x00b)
#define MU_ERR_LOCK_NOT_HELD (MU_ERR_BASE | 0x00c)
const
char
*
mu_errname
__P
((
int
e
));
const
char
*
mu_errstr
__P
((
int
e
));
const
char
*
mu_errstr
ing
__P
((
int
e
));
#ifdef __cplusplus
}
...
...
mailbox/Makefile.am
View file @
c003ad7
...
...
@@ -48,6 +48,7 @@ mime.c \
monitor.c
\
mutil.c
\
muerror.c
\
muerrno.c
\
observer.c
\
parse822.c
\
property.c
\
...
...
mailbox/muerrno.c
View file @
c003ad7
...
...
@@ -19,10 +19,15 @@
# include <config.h>
#endif
#include <errno.h>
#include <string.h>
#include <mailutils/errno.h>
#ifndef EOK
# define EOK 0
#endif
const
char
*
mu_errname
(
int
e
)
{
...
...
@@ -42,26 +47,48 @@ mu_errname (int e)
EN
(
MU_ERR_NO_HANDLER
)
EN
(
MU_ERR_EMPTY_VFN
)
EN
(
MU_ERR_NO_PTR
)
EN
(
MU_ERR_OUT_NULL
)
EN
(
MU_ERR_OUT_PTR_NULL
)
EN
(
MU_ERR_MBX_NULL
)
EN
(
MU_ERR_MBX_PTR_NULL
)
EN
(
MU_ERR_BAD_822_FORMAT
)
EN
(
MU_ERR_EMPTY_ADDRESS
)
EN
(
MU_ERR_LOCKER_NULL
)
EN
(
MU_ERR_LOCK_CONFLICT
)
EN
(
MU_ERR_LOCK_BAD_LOCK
)
EN
(
MU_ERR_LOCK_BAD_FILE
)
EN
(
MU_ERR_LOCK_NOT_HELD
)
}
return
"SYSTEM ERROR"
;
}
const
char
*
mu_errstr
(
int
e
)
const
char
*
mu_errstr
ing
(
int
e
)
{
switch
(
e
)
{
#define ES(x, d) case x: return d;
ES
(
MU_ERR_NO_HANDLER
,
"No registered handler"
)
ES
(
MU_ERR_EMPTY_VFN
,
"Empty virtual function"
)
ES
(
MU_ERR_NO_PTR
,
"No pointer"
)
ES
(
EOK
,
"Success"
)
ES
(
MU_ERR_NO_HANDLER
,
"No registered handler"
)
ES
(
MU_ERR_EMPTY_VFN
,
"Empty virtual function"
)
ES
(
MU_ERR_OUT_NULL
,
"Pointer to output null"
)
ES
(
MU_ERR_OUT_PTR_NULL
,
"Pointer to output pointer null"
)
ES
(
MU_ERR_MBX_NULL
,
"Mailbox null"
)
ES
(
MU_ERR_BAD_822_FORMAT
,
"Format of RFC822 object is bad"
)
ES
(
MU_ERR_EMPTY_ADDRESS
,
"Address contains no addr specs"
)
ES
(
MU_ERR_MBX_NULL
,
"Mailbox null"
)
ES
(
MU_ERR_MBX_PTR_NULL
,
"Mailbox pointer null"
)
ES
(
MU_ERR_LOCKER_NULL
,
"Locker null"
)
ES
(
MU_ERR_LOCK_CONFLICT
,
"Conflict with previous locker"
)
ES
(
MU_ERR_LOCK_BAD_LOCK
,
"Lock file check failed"
)
ES
(
MU_ERR_LOCK_BAD_FILE
,
"File check failed"
)
ES
(
MU_ERR_LOCK_NOT_HELD
,
"Lock not held on file"
)
}
return
strerror
(
e
);
...
...
Please
register
or
sign in
to post a comment