Mercurial > repos > dawe > srf2fastq
comparison srf2fastq/io_lib-1.12.2/io_lib/mach-io.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 /* | |
2 * Copyright (c) Medical Research Council 1994. All rights reserved. | |
3 * | |
4 * Permission to use, copy, modify and distribute this software and its | |
5 * documentation for any purpose is hereby granted without fee, provided that | |
6 * this copyright and notice appears in all copies. | |
7 * | |
8 * This file was written by James Bonfield, Simon Dear, Rodger Staden, | |
9 * as part of the Staden Package at the MRC Laboratory of Molecular | |
10 * Biology, Hills Road, Cambridge, CB2 2QH, United Kingdom. | |
11 * | |
12 * MRC disclaims all warranties with regard to this software. | |
13 */ | |
14 | |
15 #ifndef _mach_io_h | |
16 #define _mach_io_h | |
17 /* | |
18 * Machine independant io | |
19 * For reading and writing to big-endian and little-endian files | |
20 * | |
21 * Routines available: | |
22 * be_write_int_1() | |
23 * be_write_int_2() | |
24 * be_write_int_4() | |
25 * be_read_int_1() | |
26 * be_read_int_2() | |
27 * be_read_int_4() | |
28 * le_write_int_1() | |
29 * le_write_int_2() | |
30 * le_write_int_4() | |
31 * le_read_int_1() | |
32 * le_read_int_2() | |
33 * le_read_int_4() | |
34 * | |
35 * All routine return: | |
36 * 0 - an error has occurred during io operation | |
37 * 1 - value successfully read or written | |
38 */ | |
39 | |
40 #include <stdio.h> | |
41 #include "io_lib/os.h" | |
42 #include "io_lib/mFILE.h" | |
43 | |
44 #ifdef __cplusplus | |
45 extern "C" { | |
46 #endif | |
47 | |
48 /**********************************************************************/ | |
49 /* IO for big-endian files */ | |
50 /**********************************************************************/ | |
51 | |
52 /* | |
53 * Write a big-endian int1 | |
54 */ | |
55 extern int be_write_int_1(mFILE *fp, uint1 *i1); | |
56 | |
57 /* | |
58 * Write a big-endian int2 | |
59 */ | |
60 extern int be_write_int_2(mFILE *fp, uint2 *i2); | |
61 | |
62 /* | |
63 * Write a big-endian int4 | |
64 */ | |
65 extern int be_write_int_4(mFILE *fp, uint4 *i4); | |
66 | |
67 /* | |
68 * Write a big-endian int8 | |
69 */ | |
70 extern int be_write_int_8(mFILE *fp, uint8 *i8); | |
71 | |
72 /* | |
73 * Read a big-endian int1 | |
74 */ | |
75 extern int be_read_int_1(mFILE *fp, uint1 *i1); | |
76 | |
77 /* | |
78 * Read a big-endian int2 | |
79 */ | |
80 extern int be_read_int_2(mFILE *fp, uint2 *i2); | |
81 | |
82 /* | |
83 * Read a big-endian int4 | |
84 */ | |
85 extern int be_read_int_4(mFILE *fp, uint4 *i4); | |
86 | |
87 /* | |
88 * Read a big-endian int8 | |
89 */ | |
90 extern int be_read_int_8(mFILE *fp, uint8 *i8); | |
91 | |
92 /**********************************************************************/ | |
93 /* IO for little-endian files */ | |
94 /**********************************************************************/ | |
95 | |
96 /* | |
97 * Write a little-endian int1 | |
98 */ | |
99 extern int le_write_int_1(mFILE *fp, uint1 *i1); | |
100 | |
101 /* | |
102 * Write a little-endian int2 | |
103 */ | |
104 extern int le_write_int_2(mFILE *fp, uint2 *i2); | |
105 | |
106 /* | |
107 * Write a little-endian int4 | |
108 */ | |
109 extern int le_write_int_4(mFILE *fp, uint4 *i4); | |
110 | |
111 /* | |
112 * Write a little-endian int8 | |
113 */ | |
114 extern int le_write_int_8(mFILE *fp, uint8 *i8); | |
115 | |
116 /* | |
117 * Read a little-endian int1 | |
118 */ | |
119 extern int le_read_int_1(mFILE *fp, uint1 *i1); | |
120 | |
121 /* | |
122 * Read a little-endian int2 | |
123 */ | |
124 extern int le_read_int_2(mFILE *fp, uint2 *i2); | |
125 | |
126 /* | |
127 * Read a little-endian int4 | |
128 */ | |
129 extern int le_read_int_4(mFILE *fp, uint4 *i4); | |
130 | |
131 /* | |
132 * Read a little-endian int8 | |
133 */ | |
134 extern int le_read_int_8(mFILE *fp, uint8 *i8); | |
135 | |
136 #ifdef __cplusplus | |
137 } | |
138 #endif | |
139 | |
140 #endif /* _mach_io_h */ |