Mercurial > repos > dawe > srf2fastq
comparison srf2fastq/io_lib-1.12.2/io_lib/stdio_hack.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 _STDIO_HACK_H_ | |
2 #define _STDIO_HACK_H_ | |
3 | |
4 #include <stdio.h> | |
5 #include "io_lib/mFILE.h" | |
6 | |
7 #ifdef __cplusplus | |
8 extern "C" { | |
9 #endif | |
10 | |
11 /* | |
12 * This file will define many of the stdio functions to use the | |
13 * in-memory versions here. These are sufficient to allow the abi, | |
14 * scf, etc reading code (but not writing) to transparently operate by | |
15 * loading the entire file into memory and then doing in-memory | |
16 * manipulation instead of on-disk manipulation. | |
17 * | |
18 * The key use for this though is to allow generation of fake FILE pointers | |
19 * so that reading from tar files does not requiring writing to disk and | |
20 * reading back again. | |
21 */ | |
22 | |
23 #define FILE mFILE | |
24 #define fopen mfopen | |
25 #define fclose mfclose | |
26 #define fseek mfseek | |
27 #define ftell mftell | |
28 #define rewind mrewind | |
29 #ifdef feof | |
30 # undef feof | |
31 #endif | |
32 #define feof mfeof | |
33 #define fread mfread | |
34 #define fwrite mfwrite | |
35 #define fgetc mfgetc | |
36 #define ungetc mungetc | |
37 #define fgets mfgets | |
38 #define fflush mfflush | |
39 #define fprintf mfprintf | |
40 | |
41 #ifdef stdin | |
42 # undef stdin | |
43 # undef stdout | |
44 # undef stderr | |
45 #endif | |
46 #define stdin mstdin() | |
47 #define stdout mstdout() | |
48 #define stderr mstderr() | |
49 | |
50 #define fread_abi mfread_abi | |
51 #define fwrite_abi mfwrite_abi | |
52 #define fread_alf mfread_alf | |
53 #define fwrite_alf mfwrite_alf | |
54 #define fread_ctf mfread_ctf | |
55 #define fwrite_ctf mfwrite_ctf | |
56 #define fread_pln mfread_pln | |
57 #define fwrite_pln mfwrite_pln | |
58 #define fread_scf mfread_scf | |
59 #define fwrite_scf mfwrite_scf | |
60 #define fread_ztr mfread_ztr | |
61 #define fwrite_ztr mfwrite_ztr | |
62 | |
63 #define exp_fread_info exp_mfread_info | |
64 #define exp_print_file exp_print_mfile | |
65 | |
66 #define open_trace_file open_trace_mfile | |
67 #define fread_reading mfread_reading | |
68 #define fwrite_reading mfwrite_reading | |
69 | |
70 #ifdef __cplusplus | |
71 } | |
72 #endif | |
73 | |
74 #endif /* _STDIO_HACK_H_ */ |