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
63da744b
...
63da744b73377343e558605c55df112312e69fd5
authored
2001-08-05 13:51:48 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added mu-mailbox-get-port.
1 parent
3f27d460
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletions
libmu_scm/mu_mailbox.c
libmu_scm/mu_mailbox.c
View file @
63da744
...
...
@@ -93,7 +93,7 @@ mu_scm_is_mailbox (SCM scm)
return
SCM_NIMP
(
scm
)
&&
SCM_CAR
(
scm
)
==
mailbox_tag
;
}
/* *************************************************************************
*
*/
/* ************************************************************************* */
/* Guile primitives */
SCM_DEFINE
(
mu_mailbox_open
,
"mu-mailbox-open"
,
2
,
0
,
0
,
...
...
@@ -171,6 +171,28 @@ SCM_DEFINE (mu_mailbox_get_url, "mu-mailbox-get-url", 1, 0, 0,
}
#undef FUNC_NAME
SCM_DEFINE
(
mu_mailbox_get_port
,
"mu-mailbox-get-port"
,
2
,
0
,
0
,
(
SCM
MBOX
,
SCM
MODE
),
"Returns a port associated with the contents of the MBOX.
\n
"
"MODE is a string defining operation mode of the stream. It may
\n
"
"contain any of the two characters:
\"
r
\"
for reading,
\"
w
\"
for
\n
"
"writing.
\n
"
)
#define FUNC_NAME s_mu_mailbox_get_port
{
struct
mu_mailbox
*
mum
;
stream_t
stream
;
SCM_ASSERT
(
mu_scm_is_mailbox
(
MBOX
),
MBOX
,
SCM_ARG1
,
FUNC_NAME
);
SCM_ASSERT
(
SCM_NIMP
(
MODE
)
&&
SCM_STRINGP
(
MODE
),
MODE
,
SCM_ARG2
,
FUNC_NAME
);
mum
=
(
struct
mu_mailbox
*
)
SCM_CDR
(
MBOX
);
if
(
mailbox_get_stream
(
mum
->
mbox
,
&
stream
))
return
SCM_BOOL_F
;
return
mu_port_make_from_stream
(
MBOX
,
stream
,
scm_mode_bits
(
SCM_CHARS
(
MODE
)));
}
#undef FUNC_NAME
SCM_DEFINE
(
mu_mailbox_get_message
,
"mu-mailbox-get-message"
,
2
,
0
,
0
,
(
SCM
MBOX
,
SCM
MSGNO
),
"Retrieve from MBOX message # MSGNO."
)
#define FUNC_NAME s_mu_mailbox_get_message
...
...
Please
register
or
sign in
to post a comment