]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/file-cookie.hh
Add a comment about grand-replace.sh.
[lilypond.git] / flower / include / file-cookie.hh
index f523c897da0be3c0102cc927f91b765d6f9a86d9..ab2558fd14730d34adb1508d62fe51f5d66d116f 100644 (file)
@@ -2,28 +2,30 @@
 extern "C" {
 #endif
 
-
-#include <stdio.h>
 #include <unistd.h>
 
+#include <cstdio>
+using namespace std;
+
+
 #if (! defined (__off64_t) && ! defined (__off64_t_defined)) || ! defined (__cplusplus)
 #define off64_t unsigned long long
 #endif
+
   typedef struct
   {
-    int (*read) (void *, char *, size_t);
-    int (*write) (void *, char const *, size_t);
+    ssize_t (*read) (void *, char *, size_t);
+    ssize_t (*write) (void *, char const *, size_t);
     int (*seek) (void *, off64_t *, int);
     int (*close) (void *);
   } lily_cookie_io_functions_t;
 
-
   void *lily_fopencookie (void *cookie, char const *modes,
                          lily_cookie_io_functions_t io_funcs);
 
   int lily_cookie_fclose (void *);
-  int lily_cookie_fprintf (void *file, char const *format, ...);
+  int lily_cookie_fprintf (void *file, char const *format, ...)
+    __attribute__ ((format (printf, 2, 3)));
   int lily_cookie_putc (int c, void *file);
 
 #ifdef __cplusplus