Fix #1192.
[lilypond/mpolesky.git] / flower / include / file-cookie.hh
blobab2558fd14730d34adb1508d62fe51f5d66d116f
1 #ifdef __cplusplus
2 extern "C" {
3 #endif
5 #include <unistd.h>
7 #include <cstdio>
8 using namespace std;
11 #if (! defined (__off64_t) && ! defined (__off64_t_defined)) || ! defined (__cplusplus)
12 #define off64_t unsigned long long
13 #endif
15 typedef struct
17 ssize_t (*read) (void *, char *, size_t);
18 ssize_t (*write) (void *, char const *, size_t);
19 int (*seek) (void *, off64_t *, int);
20 int (*close) (void *);
21 } lily_cookie_io_functions_t;
23 void *lily_fopencookie (void *cookie, char const *modes,
24 lily_cookie_io_functions_t io_funcs);
26 int lily_cookie_fclose (void *);
27 int lily_cookie_fprintf (void *file, char const *format, ...)
28 __attribute__ ((format (printf, 2, 3)));
29 int lily_cookie_putc (int c, void *file);
31 #ifdef __cplusplus
32 } /* extern "C" */
33 #endif