~ubuntu-branches/debian/jessie/tsdecrypt/jessie

« back to all changes in this revision

Viewing changes to libfuncs/io.h

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2012-04-04 09:42:43 UTC
  • Revision ID: package-import@ubuntu.com-20120404094243-qsc40h18oolnxw5r
Tags: upstream-7.0
ImportĀ upstreamĀ versionĀ 7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * UX IO functions header file
 
3
 * Copyright (C) 2006-2009 Unix Solutions Ltd.
 
4
 *
 
5
 * Released under MIT license.
 
6
 * See LICENSE-MIT.txt for license terms.
 
7
 */
 
8
 
 
9
#ifndef IO_H
 
10
# define IO_H
 
11
 
 
12
#ifdef __cplusplus
 
13
extern "C" {
 
14
#endif
 
15
 
 
16
#include <sys/socket.h>
 
17
#include <sys/types.h>
 
18
 
 
19
char * chomp(char *x);
 
20
 
 
21
ssize_t safe_read(int fd, void *buf, size_t len);
 
22
ssize_t safe_write(int fd, const void *buf, size_t len);
 
23
void shutdown_fd(int *in_fd);
 
24
 
 
25
ssize_t fdgetline(int fd, char *buf, size_t buf_size);
 
26
ssize_t fdread_ex(int fd, char *buf, size_t buf_size, int timeout, int retries, int waitfull);
 
27
ssize_t fdread(int fd, char *buf, size_t buf_size);
 
28
ssize_t fdread_nowaitfull(int fd, char *buf, size_t buf_size);
 
29
ssize_t fdwrite(int fd, char *buf, size_t buf_size);
 
30
 
 
31
int fdputs(int fd, char *msg);
 
32
int fdputsf(int fd, char *fmt, ...);
 
33
 
 
34
void set_log_io_errors(int report_io_errors);
 
35
 
 
36
void set_sock_nonblock(int sockfd);
 
37
void set_sock_block(int sockfd);
 
38
 
 
39
int do_connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen, int timeout);
 
40
 
 
41
#ifdef __cplusplus
 
42
}
 
43
#endif
 
44
 
 
45
#endif