summaryrefslogtreecommitdiff
path: root/wiretap/file_wrappers.h
blob: 249de02a2efd0f9b21ee0a3a7a662ee512074c75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* file_wrappers.h
 *
 * $Id$
 *
 * Wiretap Library
 * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */

#ifndef __FILE_H__
#define __FILE_H__

extern gint64 file_seek(FILE_T stream, gint64 offset, int whence, int *err);
extern gint64 file_tell(FILE_T stream);
extern int file_error(FILE_T fh);

extern FILE_T file_open(const char *path);
extern FILE_T filed_open(int fildes);
extern int file_read(void *buf, unsigned int count, FILE_T file);
extern int file_close(FILE_T file);
extern int file_getc(FILE_T stream);
extern char *file_gets(char *buf, int len, FILE_T stream);
extern int file_eof(FILE_T stream);
extern void file_clearerr(FILE_T stream);


#endif /* __FILE_H__ */