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
2f48aee1
...
2f48aee1dc1182e00a078f2f2ada22a0de6de9d2
authored
2003-08-28 19:59:02 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(stream_get_fd2): New function.
(stream_set_fd): Changed type of the second arg.
1 parent
e0622312
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
include/mailutils/stream.h
mailbox/stream.c
include/mailutils/stream.h
View file @
2f48aee
...
...
@@ -62,7 +62,8 @@ extern void stream_destroy __P ((stream_t *, void *owner));
extern
int
stream_open
__P
((
stream_t
));
extern
int
stream_close
__P
((
stream_t
));
extern
int
stream_is_seekable
__P
((
stream_t
));
extern
int
stream_get_fd
__P
((
stream_t
,
int
*
));
extern
int
stream_get_fd
__P
((
stream_t
,
int
*
));
extern
int
stream_get_fd2
__P
((
stream_t
,
int
*
,
int
*
));
extern
int
stream_read
__P
((
stream_t
,
char
*
,
size_t
,
off_t
,
size_t
*
));
extern
int
stream_readline
__P
((
stream_t
,
char
*
,
size_t
,
off_t
,
...
...
@@ -105,7 +106,7 @@ extern int stream_set_close __P ((stream_t,
int
(
*
_close
)
__PMT
((
stream_t
)),
void
*
owner
));
extern
int
stream_set_fd
__P
((
stream_t
,
int
(
*
_get_fd
)
__PMT
((
stream_t
,
int
*
)),
void
*
owner
));
int
(
*
_get_fd
)
__PMT
((
stream_t
,
int
*
,
int
*
)),
void
*
owner
));
extern
int
stream_set_read
__P
((
stream_t
,
int
(
*
_read
)
__PMT
((
stream_t
,
char
*
,
size_t
,
off_t
,
size_t
*
)),
...
...
mailbox/stream.c
View file @
2f48aee
...
...
@@ -427,7 +427,15 @@ stream_get_fd (stream_t stream, int *pfd)
{
if
(
stream
==
NULL
||
stream
->
_get_fd
==
NULL
)
return
EINVAL
;
return
stream
->
_get_fd
(
stream
,
pfd
);
return
stream
->
_get_fd
(
stream
,
pfd
,
NULL
);
}
int
stream_get_fd2
(
stream_t
stream
,
int
*
pfd1
,
int
*
pfd2
)
{
if
(
stream
==
NULL
||
stream
->
_get_fd
==
NULL
)
return
EINVAL
;
return
stream
->
_get_fd
(
stream
,
pfd1
,
pfd2
);
}
int
...
...
@@ -544,7 +552,8 @@ stream_set_close (stream_t stream, int (*_close) (stream_t), void *owner)
}
int
stream_set_fd
(
stream_t
stream
,
int
(
*
_get_fd
)
(
stream_t
,
int
*
),
void
*
owner
)
stream_set_fd
(
stream_t
stream
,
int
(
*
_get_fd
)
(
stream_t
,
int
*
,
int
*
),
void
*
owner
)
{
if
(
stream
==
NULL
)
return
EINVAL
;
...
...
Please
register
or
sign in
to post a comment