]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/file-cookie.hh
f523c897da0be3c0102cc927f91b765d6f9a86d9
[lilypond.git] / flower / include / file-cookie.hh
1 #ifdef __cplusplus
2 extern "C" {
3 #endif
4
5
6 #include <stdio.h>
7 #include <unistd.h>
8
9 #if (! defined (__off64_t) && ! defined (__off64_t_defined)) || ! defined (__cplusplus)
10 #define off64_t unsigned long long
11 #endif
12  
13   typedef struct
14   {
15     int (*read) (void *, char *, size_t);
16     int (*write) (void *, char const *, size_t);
17     int (*seek) (void *, off64_t *, int);
18     int (*close) (void *);
19   } lily_cookie_io_functions_t;
20
21
22   void *lily_fopencookie (void *cookie, char const *modes,
23                           lily_cookie_io_functions_t io_funcs);
24
25   int lily_cookie_fclose (void *);
26   int lily_cookie_fprintf (void *file, char const *format, ...);
27   int lily_cookie_putc (int c, void *file);
28
29 #ifdef __cplusplus
30 } /* extern "C" */
31 #endif