aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_bio_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_bio_lib.h')
-rw-r--r--src/include/gnunet_bio_lib.h66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/include/gnunet_bio_lib.h b/src/include/gnunet_bio_lib.h
index e90e85832..a1fd0e6ac 100644
--- a/src/include/gnunet_bio_lib.h
+++ b/src/include/gnunet_bio_lib.h
@@ -11,12 +11,12 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
18 SPDX-License-Identifier: AGPL3.0-or-later 18 SPDX-License-Identifier: AGPL3.0-or-later
19*/ 19 */
20 20
21/** 21/**
22 * @author Christian Grothoff 22 * @author Christian Grothoff
@@ -55,7 +55,7 @@ struct GNUNET_BIO_ReadHandle;
55 * @return IO handle on success, NULL on error 55 * @return IO handle on success, NULL on error
56 */ 56 */
57struct GNUNET_BIO_ReadHandle * 57struct GNUNET_BIO_ReadHandle *
58GNUNET_BIO_read_open (const char *fn); 58GNUNET_BIO_read_open(const char *fn);
59 59
60 60
61/** 61/**
@@ -67,7 +67,7 @@ GNUNET_BIO_read_open (const char *fn);
67 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise 67 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
68 */ 68 */
69int 69int
70GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg); 70GNUNET_BIO_read_close(struct GNUNET_BIO_ReadHandle *h, char **emsg);
71 71
72 72
73/** 73/**
@@ -80,8 +80,8 @@ GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg);
80 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure 80 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
81 */ 81 */
82int 82int
83GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, const char *what, 83GNUNET_BIO_read(struct GNUNET_BIO_ReadHandle *h, const char *what,
84 void *result, size_t len); 84 void *result, size_t len);
85 85
86 86
87/** 87/**
@@ -95,9 +95,9 @@ GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, const char *what,
95 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure 95 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
96 */ 96 */
97int 97int
98GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, 98GNUNET_BIO_read_fn(struct GNUNET_BIO_ReadHandle *h,
99 const char *file, int line, 99 const char *file, int line,
100 void *result, size_t len); 100 void *result, size_t len);
101 101
102/** 102/**
103 * Read 0-terminated string from a file. 103 * Read 0-terminated string from a file.
@@ -110,8 +110,8 @@ GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h,
110 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure 110 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
111 */ 111 */
112int 112int
113GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what, 113GNUNET_BIO_read_string(struct GNUNET_BIO_ReadHandle *h, const char *what,
114 char **result, size_t max_length); 114 char **result, size_t max_length);
115 115
116 116
117/** 117/**
@@ -123,8 +123,8 @@ GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what,
123 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure 123 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
124 */ 124 */
125int 125int
126GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, const char *what, 126GNUNET_BIO_read_meta_data(struct GNUNET_BIO_ReadHandle *h, const char *what,
127 struct GNUNET_CONTAINER_MetaData **result); 127 struct GNUNET_CONTAINER_MetaData **result);
128 128
129 129
130/** 130/**
@@ -133,7 +133,7 @@ GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, const char *what,
133 * @param h hande to open file 133 * @param h hande to open file
134 * @param f address of float to read 134 * @param f address of float to read
135 */ 135 */
136#define GNUNET_BIO_read_float(h, f) (GNUNET_BIO_read_fn (h, __FILE__, __LINE__, f, sizeof(float))) 136#define GNUNET_BIO_read_float(h, f) (GNUNET_BIO_read_fn(h, __FILE__, __LINE__, f, sizeof(float)))
137 137
138 138
139 139
@@ -143,7 +143,7 @@ GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, const char *what,
143 * @param h hande to open file 143 * @param h hande to open file
144 * @param f address of double to read 144 * @param f address of double to read
145 */ 145 */
146#define GNUNET_BIO_read_double(h, f) (GNUNET_BIO_read_fn (h, __FILE__, __LINE__, f, sizeof(double))) 146#define GNUNET_BIO_read_double(h, f) (GNUNET_BIO_read_fn(h, __FILE__, __LINE__, f, sizeof(double)))
147 147
148 148
149/** 149/**
@@ -156,8 +156,8 @@ GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, const char *what,
156 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 156 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
157 */ 157 */
158int 158int
159GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file, 159GNUNET_BIO_read_int32__(struct GNUNET_BIO_ReadHandle *h, const char *file,
160 int line, int32_t * i); 160 int line, int32_t * i);
161 161
162 162
163/** 163/**
@@ -166,7 +166,7 @@ GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
166 * @param h hande to open file 166 * @param h hande to open file
167 * @param i address of 32-bit integer to read 167 * @param i address of 32-bit integer to read
168 */ 168 */
169#define GNUNET_BIO_read_int32(h, i) GNUNET_BIO_read_int32__ (h, __FILE__, __LINE__, (int32_t*) i) 169#define GNUNET_BIO_read_int32(h, i) GNUNET_BIO_read_int32__(h, __FILE__, __LINE__, (int32_t*)i)
170 170
171 171
172/** 172/**
@@ -179,8 +179,8 @@ GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
179 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 179 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
180 */ 180 */
181int 181int
182GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h, const char *file, 182GNUNET_BIO_read_int64__(struct GNUNET_BIO_ReadHandle *h, const char *file,
183 int line, int64_t * i); 183 int line, int64_t * i);
184 184
185 185
186/** 186/**
@@ -189,7 +189,7 @@ GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
189 * @param h hande to open file 189 * @param h hande to open file
190 * @param i address of 64-bit integer to read 190 * @param i address of 64-bit integer to read
191 */ 191 */
192#define GNUNET_BIO_read_int64(h, i) GNUNET_BIO_read_int64__ (h, __FILE__, __LINE__, (int64_t*) i) 192#define GNUNET_BIO_read_int64(h, i) GNUNET_BIO_read_int64__(h, __FILE__, __LINE__, (int64_t*)i)
193 193
194 194
195/** 195/**
@@ -204,7 +204,7 @@ struct GNUNET_BIO_WriteHandle;
204 * @return IO handle on success, NULL on error 204 * @return IO handle on success, NULL on error
205 */ 205 */
206struct GNUNET_BIO_WriteHandle * 206struct GNUNET_BIO_WriteHandle *
207GNUNET_BIO_write_open (const char *fn); 207GNUNET_BIO_write_open(const char *fn);
208 208
209 209
210/** 210/**
@@ -214,7 +214,7 @@ GNUNET_BIO_write_open (const char *fn);
214 * @return GNUNET_OK on success, GNUNET_SYSERR otherwise 214 * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
215 */ 215 */
216int 216int
217GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h); 217GNUNET_BIO_write_close(struct GNUNET_BIO_WriteHandle *h);
218 218
219 219
220/** 220/**
@@ -226,8 +226,8 @@ GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h);
226 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 226 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
227 */ 227 */
228int 228int
229GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer, 229GNUNET_BIO_write(struct GNUNET_BIO_WriteHandle *h, const void *buffer,
230 size_t n); 230 size_t n);
231 231
232 232
233/** 233/**
@@ -238,7 +238,7 @@ GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer,
238 * the file is closed 238 * the file is closed
239 */ 239 */
240int 240int
241GNUNET_BIO_flush (struct GNUNET_BIO_WriteHandle *h); 241GNUNET_BIO_flush(struct GNUNET_BIO_WriteHandle *h);
242 242
243 243
244/** 244/**
@@ -249,7 +249,7 @@ GNUNET_BIO_flush (struct GNUNET_BIO_WriteHandle *h);
249 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 249 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
250 */ 250 */
251int 251int
252GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, const char *s); 252GNUNET_BIO_write_string(struct GNUNET_BIO_WriteHandle *h, const char *s);
253 253
254 254
255/** 255/**
@@ -260,8 +260,8 @@ GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, const char *s);
260 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 260 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
261 */ 261 */
262int 262int
263GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h, 263GNUNET_BIO_write_meta_data(struct GNUNET_BIO_WriteHandle *h,
264 const struct GNUNET_CONTAINER_MetaData *m); 264 const struct GNUNET_CONTAINER_MetaData *m);
265 265
266 266
267 267
@@ -271,7 +271,7 @@ GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
271 * @param h hande to open file 271 * @param h hande to open file
272 * @param f float to write (must be a variable) 272 * @param f float to write (must be a variable)
273 */ 273 */
274#define GNUNET_BIO_write_float(h, f) GNUNET_BIO_write (h, &f, sizeof(float)) 274#define GNUNET_BIO_write_float(h, f) GNUNET_BIO_write(h, &f, sizeof(float))
275 275
276 276
277 277
@@ -281,7 +281,7 @@ GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
281 * @param h hande to open file 281 * @param h hande to open file
282 * @param f double to write (must be a variable) 282 * @param f double to write (must be a variable)
283 */ 283 */
284#define GNUNET_BIO_write_double(h, f) GNUNET_BIO_write (h, &f, sizeof(double)) 284#define GNUNET_BIO_write_double(h, f) GNUNET_BIO_write(h, &f, sizeof(double))
285 285
286 286
287/** 287/**
@@ -292,7 +292,7 @@ GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
292 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 292 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
293 */ 293 */
294int 294int
295GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, int32_t i); 295GNUNET_BIO_write_int32(struct GNUNET_BIO_WriteHandle *h, int32_t i);
296 296
297 297
298/** 298/**
@@ -303,7 +303,7 @@ GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, int32_t i);
303 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 303 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
304 */ 304 */
305int 305int
306GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, int64_t i); 306GNUNET_BIO_write_int64(struct GNUNET_BIO_WriteHandle *h, int64_t i);
307 307
308 308
309#if 0 /* keep Emacsens' auto-indent happy */ 309#if 0 /* keep Emacsens' auto-indent happy */