Mercurial > repos > dawe > srf2fastq
comparison srf2fastq/io_lib-1.12.2/io_lib/mFILE.h @ 0:d901c9f41a6a default tip
Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
author | dawe |
---|---|
date | Tue, 07 Jun 2011 17:48:05 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d901c9f41a6a |
---|---|
1 #ifndef _MFILE_H_ | |
2 #define _MFILE_H_ | |
3 | |
4 #include <stdio.h> | |
5 | |
6 #ifdef __cplusplus | |
7 extern "C" { | |
8 #endif | |
9 | |
10 typedef struct { | |
11 FILE *fp; | |
12 char *data; | |
13 size_t alloced; | |
14 int eof; | |
15 int mode; /* open mode in MF_?? define bit pattern */ | |
16 size_t size; | |
17 size_t offset; | |
18 size_t flush_pos; | |
19 } mFILE; | |
20 | |
21 #define MF_READ 1 | |
22 #define MF_WRITE 2 | |
23 #define MF_APPEND 4 | |
24 #define MF_BINARY 8 | |
25 #define MF_TRUNC 16 | |
26 #define MF_MODEX 32 | |
27 | |
28 mFILE *mfreopen(const char *path, const char *mode, FILE *fp); | |
29 mFILE *mfopen(const char *path, const char *mode); | |
30 int mfdetach(mFILE *mf); | |
31 int mfclose(mFILE *mf); | |
32 int mfdestroy(mFILE *mf); | |
33 int mfseek(mFILE *mf, long offset, int whence); | |
34 long mftell(mFILE *mf); | |
35 void mrewind(mFILE *mf); | |
36 void mftruncate(mFILE *mf, long offset); | |
37 int mfeof(mFILE *mf); | |
38 size_t mfread(void *ptr, size_t size, size_t nmemb, mFILE *mf); | |
39 size_t mfwrite(void *ptr, size_t size, size_t nmemb, mFILE *mf); | |
40 int mfgetc(mFILE *mf); | |
41 int mungetc(int c, mFILE *mf); | |
42 mFILE *mfcreate(char *data, int size); | |
43 mFILE *mfcreate_from(const char *path, const char *mode_str, FILE *fp); | |
44 void mfrecreate(mFILE *mf, char *data, int size); | |
45 char *mfgets(char *s, int size, mFILE *mf); | |
46 int mfflush(mFILE *mf); | |
47 int mfprintf(mFILE *mf, char *fmt, ...); | |
48 mFILE *mstdin(void); | |
49 mFILE *mstdout(void); | |
50 mFILE *mstderr(void); | |
51 void mfascii(mFILE *mf); | |
52 | |
53 #ifdef __cplusplus | |
54 } | |
55 #endif | |
56 | |
57 #endif /* _MFILE_H_ */ |