ucspi-ssl
0.99e
TLS encryption for IPv6 communication
ucspi-ssl-0.99e
src
openreadclose.c
Go to the documentation of this file.
1
/* Public domain. */
2
3
#include "
error.h
"
4
#include "
open.h
"
5
#include "
readclose.h
"
6
#include "
openreadclose.h
"
7
8
int
openreadclose
(
const
char
*fn,stralloc *sa,
unsigned
int
bufsize)
9
{
10
int
fd;
11
fd =
open_read
(fn);
12
if
(fd == -1) {
13
if
(errno ==
error_noent
)
return
0;
14
return
-1;
15
}
16
if
(
readclose
(fd,sa,bufsize) == -1)
return
-1;
17
return
1;
18
}
openreadclose
int openreadclose(const char *fn, stralloc *sa, unsigned int bufsize)
Definition:
openreadclose.c:8
readclose.h
error.h
openreadclose.h
readclose
int readclose(int fd, stralloc *sa, unsigned int bufsize)
Definition:
readclose.c:19
open.h
error_noent
int error_noent
Definition:
error.c:22
open_read
int open_read(const char *)
Definition:
open_read.c:7
Generated on Wed Jul 11 2018 22:50:46 for ucspi-ssl by
1.8.13