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
f1801528
...
f18015286d1f3c768127cb6685e8167f4cf30917
authored
2002-01-06 02:33:14 +0000
by
Sam Roberts
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
lower-cased some error strings, and added str_errname() to return the
string of an error enum.
1 parent
25db453e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
8 deletions
sieve/script.c
sieve/script.c
View file @
f180152
...
...
@@ -769,22 +769,44 @@ static char *action_to_string(action_t action)
return
"Error!"
;
}
static
char
*
sieve_errstr
(
int
code
)
const
char
*
sieve_errstr
(
int
code
)
{
switch
(
code
)
{
case
SIEVE_FAIL
:
return
"
Generic E
rror"
;
case
SIEVE_NOT_FINALIZED
:
return
"
S
ieve not finalized"
;
case
SIEVE_PARSE_ERROR
:
return
"
P
arse error"
;
case
SIEVE_RUN_ERROR
:
return
"
R
un error"
;
case
SIEVE_INTERNAL_ERROR
:
return
"
Internal E
rror"
;
case
SIEVE_NOMEM
:
return
"
No memory
"
;
default:
return
"
U
nknown error"
;
case
SIEVE_FAIL
:
return
"
generic e
rror"
;
case
SIEVE_NOT_FINALIZED
:
return
"
s
ieve not finalized"
;
case
SIEVE_PARSE_ERROR
:
return
"
p
arse error"
;
case
SIEVE_RUN_ERROR
:
return
"
r
un error"
;
case
SIEVE_INTERNAL_ERROR
:
return
"
internal e
rror"
;
case
SIEVE_NOMEM
:
return
"
no memory error
"
;
default:
return
"
u
nknown error"
;
}
return
"Error!"
;
}
const
char
*
sieve_errname
(
int
e
)
{
switch
(
e
)
{
case
SIEVE_FAIL
:
return
"FAIL"
;
case
SIEVE_NOT_FINALIZED
:
return
"NOT_FINALIZED"
;
case
SIEVE_PARSE_ERROR
:
return
"PARSE_ERROR"
;
case
SIEVE_RUN_ERROR
:
return
"RUN_ERROR"
;
case
SIEVE_INTERNAL_ERROR
:
return
"INTERNAL_ERROR"
;
case
SIEVE_NOMEM
:
return
"NOMEM"
;
case
SIEVE_DONE
:
return
"DONE"
;
}
return
"UNKNOWN"
;
}
#define HASHSIZE 16
static
int
makehash
(
unsigned
char
hash
[
HASHSIZE
],
char
*
s1
,
char
*
s2
)
...
...
Please
register
or
sign in
to post a comment