cctools
copy_stream.h
1 /*
2 Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
3 Copyright (C) 2005- The University of Notre Dame
4 This software is distributed under the GNU General Public License.
5 See the file COPYING for details.
6 */
7 
8 #ifndef COPY_STREAM_H
9 #define COPY_STREAM_H
10 
11 #include <stdint.h>
12 #include <stdio.h>
13 #include <stdlib.h>
14 
15 int64_t copy_fd_to_fd(int in, int out);
16 int64_t copy_fd_to_stream(int fd, FILE *output);
17 
18 int64_t copy_file_to_file(const char *input, const char *output);
19 int64_t copy_file_to_buffer(const char *path, char **buffer, size_t *len);
20 
21 int64_t copy_stream_to_buffer(FILE *input, char **buffer, size_t *len);
22 int64_t copy_stream_to_fd(FILE *input, int fd);
23 int64_t copy_stream_to_stream(FILE *input, FILE *output);
24 
25 #endif
Definition: buffer.h:26