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
48cdb820
...
48cdb82036a77da6d594f4a03018937198586773
authored
2003-01-13 15:08:21 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(mh_decode_rcpt_flag,builtin_rcpt): New functions.
1 parent
b9330033
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
mh/mh_format.c
mh/mh_format.c
View file @
48cdb82
...
...
@@ -1613,6 +1613,33 @@ builtin_unre (struct mh_machine *mach)
}
}
int
mh_decode_rcpt_flag
(
const
char
*
arg
)
{
if
(
strcmp
(
arg
,
"to"
)
==
0
)
return
RCPT_TO
;
else
if
(
strcmp
(
arg
,
"cc"
)
==
0
)
return
RCPT_CC
;
else
if
(
strcmp
(
arg
,
"me"
)
==
0
)
return
RCPT_ME
;
else
if
(
strcmp
(
arg
,
"all"
)
==
0
)
return
RCPT_ALL
;
return
RCPT_NONE
;
}
static
void
builtin_rcpt
(
struct
mh_machine
*
mach
)
{
int
rc
=
mh_decode_rcpt_flag
(
strobj_ptr
(
&
mach
->
arg_str
));
if
(
rc
==
RCPT_NONE
)
{
mh_error
(
_
(
"Invalid recipient mask"
));
/* try to continue anyway */
}
mach
->
arg_num
=
rc
&
rcpt_mask
;
}
/* Builtin function table */
mh_builtin_t
builtin_tab
[]
=
{
...
...
@@ -1689,6 +1716,7 @@ mh_builtin_t builtin_tab[] = {
{
"formataddr"
,
builtin_formataddr
,
mhtype_none
,
mhtype_str
,
1
},
{
"putaddr"
,
builtin_putaddr
,
mhtype_none
,
mhtype_str
},
{
"unre"
,
builtin_unre
,
mhtype_str
,
mhtype_str
},
{
"rcpt"
,
builtin_rcpt
,
mhtype_num
,
mhtype_str
},
{
0
}
};
...
...
Please
register
or
sign in
to post a comment