CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Han-Wen Nienhuys <[EMAIL PROTECTED]>    05/06/06 14:27:42

Modified files:
        .              : ChangeLog 
        flower         : libc-extension.cc memory-stream.cc 
        flower/include : libc-extension.hh memory-stream.hh 
        lily           : GNUmakefile pfb.cc 
        scripts        : midi2ly.py 
        ttftool        : ps.c ttfps.c util.c 
        ttftool/include: proto.h ttftool.h 
Added files:
        flower         : file-cookie.cc 
        flower/include : file-cookie.hh 

Log message:
        * flower/memory-stream.cc (Memory_out_stream): remove fopencookie 
support.
        
        * ttftool/ttfps.c: use lily_cookie functions everywhere.
        
        * flower/include/file-cookie.hh: new file. lily_cookie extension
        
        * flower/file-cookie.cc: new file. lily_cookie extension.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3718&tr2=1.3719&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/flower/file-cookie.cc?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/flower/libc-extension.cc.diff?tr1=1.35&tr2=1.36&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/flower/memory-stream.cc.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/flower/include/file-cookie.hh?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/flower/include/libc-extension.hh.diff?tr1=1.31&tr2=1.32&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/flower/include/memory-stream.hh.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/GNUmakefile.diff?tr1=1.51&tr2=1.52&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/pfb.cc.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scripts/midi2ly.py.diff?tr1=1.32&tr2=1.33&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ttftool/ps.c.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ttftool/ttfps.c.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ttftool/util.c.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ttftool/include/proto.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ttftool/include/ttftool.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3718 lilypond/ChangeLog:1.3719
--- lilypond/ChangeLog:1.3718   Mon Jun  6 07:57:06 2005
+++ lilypond/ChangeLog  Mon Jun  6 14:27:42 2005
@@ -1,3 +1,13 @@
+2005-06-06  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
+
+       * flower/memory-stream.cc (Memory_out_stream): remove fopencookie 
support.
+
+       * ttftool/ttfps.c: use lily_cookie functions everywhere. 
+
+       * flower/include/file-cookie.hh: new file. lily_cookie extension 
+
+       * flower/file-cookie.cc: new file. lily_cookie extension.
+
 2005-06-06  Jan Nieuwenhuizen  <[EMAIL PROTECTED]>
 
        * scm/editor.scm (editor-command-template-alist): Add syn
@@ -28,7 +38,7 @@
 2005-06-03  Jan Nieuwenhuizen  <[EMAIL PROTECTED]>
 
        * scm/editor.scm (editor-command-template-alist): Start emacs if
-       emaclient fails.
+       emacslient fails.
 
        * lily/main.cc (setup_localisation): Listen to LILYPOND_LOCALEDIR.
 
Index: lilypond/flower/include/libc-extension.hh
diff -u lilypond/flower/include/libc-extension.hh:1.31 
lilypond/flower/include/libc-extension.hh:1.32
--- lilypond/flower/include/libc-extension.hh:1.31      Mon May  2 12:39:28 2005
+++ lilypond/flower/include/libc-extension.hh   Mon Jun  6 14:27:42 2005
@@ -36,76 +36,6 @@
 #endif
 #endif
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if ! HAVE_FOPENCOOKIE          /* GNU extension. */
-
-#include <stdio.h>
-#include <unistd.h>
-
-#if (! defined (__off64_t) && ! defined (__off64_t_defined)) || ! defined 
(__cplusplus)
-#define off64_t unsigned long long
-#endif
-
-#if HAVE_LIBIO_H
-#include <libio.h>
-#else
-
-#if 1 //! HAVE_FUNOPEN
-
-#define cookie_io_functions_t le_cookie_io_functions_t
-  typedef struct
-  {
-    ssize_t (*read) (void *, char *, size_t);
-    ssize_t (*write) (void *, char const *, size_t);
-    int (*seek) (void *, off64_t *, int);
-    int (*close) (void *);
-  } cookie_io_functions_t;
-
-#else
-
-  typedef struct
-  {
-    int (*read) (void *, char *, int);
-    int (*write) (void *, char const *, int);
-    fpos_t (*seek) (void *, fpos_t, int);
-    int (*close) (void *);
-  } cookie_io_functions_t;
-
-#endif /* ! HAVE_FUNOPEN */
-#endif /* ! HAVE_LIBIO_H */
-
-  FILE *fopencookie (void *cookie, char const *modes,
-                    cookie_io_functions_t io_funcs);
-
-#if ! HAVE_FUNOPEN
-
-  int handle_cookie_io_fclose (FILE *);
-  int handle_cookie_io_fprintf (FILE *file, char const *format, ...);
-  int handle_cookie_io_putc (int c, FILE *file);
-
-  /* FIXME: ttftool uses fclose fopencookie fprintf and putc only.  if
-     ALIAS_FILE_TO_FILECOOKIE, blondly redefine those functions
-     to wrappers that check for and handle Memory_out_stream.  */
-#ifdef ALIAS_FILE_TO_FILECOOKIE
-
-#define fclose handle_cookie_io_fclose
-#define fprintf handle_cookie_io_fprintf
-#ifdef putc
-#define std_putc putc
-#undef putc
-#endif
-#define putc handle_cookie_io_putc
-
-#endif /* ALIAS_FILE_TO_FILECOOKIE */
-#endif /* ! HAVE_FUNOPEN */
-#endif /* ! HAVE_FOPENCOOKIE */
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
 
 #if ! HAVE_MEMRCHR
 unsigned char *memrchr (unsigned char const *p, int n, char c);
Index: lilypond/flower/include/memory-stream.hh
diff -u lilypond/flower/include/memory-stream.hh:1.4 
lilypond/flower/include/memory-stream.hh:1.5
--- lilypond/flower/include/memory-stream.hh:1.4        Thu Mar 10 14:36:16 2005
+++ lilypond/flower/include/memory-stream.hh    Mon Jun  6 14:27:42 2005
@@ -13,6 +13,7 @@
 #include <unistd.h>
 
 #include "libc-extension.hh"
+#include "file-cookie.hh"
 
 class Memory_out_stream
 {
@@ -21,7 +22,7 @@
   int buffer_blocks_;
   FILE *file_;
 
-  static cookie_io_functions_t functions_;
+  static lily_cookie_io_functions_t functions_;
   static const int block_size_;
 
 public:
Index: lilypond/flower/libc-extension.cc
diff -u lilypond/flower/libc-extension.cc:1.35 
lilypond/flower/libc-extension.cc:1.36
--- lilypond/flower/libc-extension.cc:1.35      Sun May 15 23:44:06 2005
+++ lilypond/flower/libc-extension.cc   Mon Jun  6 14:27:42 2005
@@ -157,90 +157,3 @@
 }
 #endif
 
-#include <assert.h>
-
-extern "C" {
-
-#if ! HAVE_FOPENCOOKIE
-#if HAVE_FUNOPEN
-
-  FILE *
-  fopencookie (void *cookie, char const *mode, cookie_io_functions_t fun)
-  {
-    (void) mode;
-#if 0
-    return funopen (cookie, fun.read, fun.write, fun.seek, fun.close);
-#else
-    return funopen (cookie,
-                   (int (*) (void *, char *, int)) fun.read,
-                   (int (*) (void *, char const *, int)) fun.write,
-                   (fpos_t (*) (void *, fpos_t, int)) fun.seek,
-                   (int (*) (void *)) fun.close);
-#endif
-  }
-
-#else /* ! HAVE_FUNOPEN */
-
-#include <cstdio>
-#include "memory-stream.hh"
-
-  static bool
-  is_memory_stream (void *foo)
-  {
-    Memory_out_stream *cookie = (Memory_out_stream *) foo;
-    return dynamic_cast<Memory_out_stream *> (cookie);
-  }
-
-  FILE *
-  fopencookie (void *cookie, char const *modes, cookie_io_functions_t io_funcs)
-  {
-    (void) cookie;
-    (void) modes;
-    (void) io_funcs;
-    if (is_memory_stream (cookie))
-      return (FILE *) cookie;
-    assert (false);
-    return 0;
-  }
-
-  int
-  handle_cookie_io_fclose (FILE *file)
-  {
-    if (is_memory_stream (file))
-      return Memory_out_stream::cleaner (file);
-    return fclose (file);
-  }
-
-  int
-  handle_cookie_io_fprintf (FILE *file, char const *format, ...)
-  {
-    va_list ap;
-    va_start (ap, format);
-    if (is_memory_stream (file))
-      {
-       static char buf[65536];
-       int i = vsnprintf (buf, sizeof (buf), format, ap);
-       if (i == -1 || (unsigned) i > sizeof (buf))
-         assert (false);
-       return Memory_out_stream::writer (file, buf, i);
-      }
-    int i = vfprintf (file, format, ap);
-    va_end (ap);
-    return i;
-  }
-
-  int
-  handle_cookie_io_putc (int c, FILE *file)
-  {
-    if (is_memory_stream (file))
-      {
-       char buf[1];
-       buf[0] = (char) c;
-       return Memory_out_stream::writer (file, buf, 1);
-      }
-    return putc (c, file);
-  }
-
-#endif /* ! HAVE_FUNOPEN */
-#endif /* ! HAVE_FOPENCOOKIE */
-} /* extern C */
Index: lilypond/flower/memory-stream.cc
diff -u lilypond/flower/memory-stream.cc:1.7 
lilypond/flower/memory-stream.cc:1.8
--- lilypond/flower/memory-stream.cc:1.7        Thu Mar 10 14:36:16 2005
+++ lilypond/flower/memory-stream.cc    Mon Jun  6 14:27:42 2005
@@ -17,7 +17,7 @@
 */
 const int Memory_out_stream::block_size_ = 1024;
 
-cookie_io_functions_t
+lily_cookie_io_functions_t
 Memory_out_stream::functions_
 = {
   Memory_out_stream::reader,
@@ -40,7 +40,11 @@
   size_ = 0;
   buffer_ = 0;
   buffer_blocks_ = 0;
+  file_ = 0;
+
+#if 0
   file_ = fopencookie ((void *) this, "w", functions_);
+#endif
 }
 
 Memory_out_stream::~Memory_out_stream ()
Index: lilypond/lily/GNUmakefile
diff -u lilypond/lily/GNUmakefile:1.51 lilypond/lily/GNUmakefile:1.52
--- lilypond/lily/GNUmakefile:1.51      Sat May 28 22:05:01 2005
+++ lilypond/lily/GNUmakefile   Mon Jun  6 14:27:42 2005
@@ -4,7 +4,7 @@
 NAME = lilypond
 SUBDIRS = include
 
-MODULE_LIBS= $(depth)/flower  $(depth)/ttftool $(depth)/kpath-guile 
+MODULE_LIBS= $(depth)/ttftool $(depth)/flower   $(depth)/kpath-guile 
 MODULE_INCLUDES= $(depth)/flower/include $(depth)/ttftool/include 
 MODULE_CXXFLAGS=
 
Index: lilypond/lily/pfb.cc
diff -u lilypond/lily/pfb.cc:1.14 lilypond/lily/pfb.cc:1.15
--- lilypond/lily/pfb.cc:1.14   Tue May 31 13:37:37 2005
+++ lilypond/lily/pfb.cc        Mon Jun  6 14:27:42 2005
@@ -111,7 +111,7 @@
   
   
   Memory_out_stream stream;
-  create_type42 (file_name.to_str0 (), stream.get_file ());
+  create_type42 (file_name.to_str0 (), (void*) &stream);
   SCM asscm = scm_from_locale_stringn (stream.get_string (),
                                       stream.get_length ());
 
Index: lilypond/scripts/midi2ly.py
diff -u lilypond/scripts/midi2ly.py:1.32 lilypond/scripts/midi2ly.py:1.33
--- lilypond/scripts/midi2ly.py:1.32    Thu Mar 17 23:13:45 2005
+++ lilypond/scripts/midi2ly.py Mon Jun  6 14:27:42 2005
@@ -11,7 +11,6 @@
 '''
 TODO:
    * test on weird and unquantised midi input (lily-devel)
-   * drop c++ midi2ly
    * update doc and manpage
 
    * simply insert clef changes whenever too many ledger lines
Index: lilypond/ttftool/include/proto.h
diff -u lilypond/ttftool/include/proto.h:1.1 
lilypond/ttftool/include/proto.h:1.2
--- lilypond/ttftool/include/proto.h:1.1        Sun Feb 20 18:11:20 2005
+++ lilypond/ttftool/include/proto.h    Mon Jun  6 14:27:42 2005
@@ -14,15 +14,16 @@
 struct HheaTable *readHheaTable (int fd);
 int readKernTable (int fd, int **nke, struct KernEntry0 ***ke);
 
-void printPSFont (FILE * out, struct HeadTable *ht,
+void printPSFont (void * out, struct HeadTable *ht,
                  char **strings, int nglyphs, int postType,
                  struct PostTable *pt, struct GlyphName *gnt, int fd);
 
-void printPSHeader (FILE * out, struct HeadTable *ht,
+void printPSHeader (void * out, struct HeadTable *ht,
                    char **strings, struct PostTable *pt);
-void printPSData (FILE * out, int fd);
-void printPSTrailer (FILE * out, int nglyphs,
+void printPSData (void * out, int fd);
+void printPSTrailer (void * out, int nglyphs,
                     int postType, struct GlyphName *gnt);
+
 void printAFM (FILE * afm, struct HeadTable *ht,
               char **strings, int nglyphs, int postType,
               struct PostTable *pt, struct GlyphName *gnt,
@@ -53,7 +54,7 @@
 void syserror (char *string);
 ssize_t surely_read (int fildes, void *buf, size_t nbyte);
 char *unistrncpy (char *dst, char *str, size_t length);
-void fputpss (char *s, FILE * stream);
+void fputpss (char *s, void * stream);
 off_t surely_lseek (int fildes, off_t offset, int whence);
 unsigned hash (char *string);
 struct hashtable *make_hashtable (int size);
Index: lilypond/ttftool/include/ttftool.h
diff -u lilypond/ttftool/include/ttftool.h:1.1 
lilypond/ttftool/include/ttftool.h:1.2
--- lilypond/ttftool/include/ttftool.h:1.1      Sun Feb 20 18:11:20 2005
+++ lilypond/ttftool/include/ttftool.h  Mon Jun  6 14:27:42 2005
@@ -4,7 +4,7 @@
 #endif
 
 
-  void create_type42 (char const *, FILE *);
+  void create_type42 (char const *, void *);
 
 #ifdef __cplusplus
 }
Index: lilypond/ttftool/ps.c
diff -u lilypond/ttftool/ps.c:1.5 lilypond/ttftool/ps.c:1.6
--- lilypond/ttftool/ps.c:1.5   Tue Apr 19 12:48:41 2005
+++ lilypond/ttftool/ps.c       Mon Jun  6 14:27:42 2005
@@ -24,7 +24,7 @@
 
 
 void
-printPSFont (FILE * out, struct HeadTable *ht,
+printPSFont (void *out, struct HeadTable *ht,
             char **strings, int nglyphs, int postType,
             struct PostTable *pt, struct GlyphName *gnt, int fd)
 {
@@ -34,55 +34,55 @@
 }
 
 void
-printPSHeader (FILE * out, struct HeadTable *ht,
+printPSHeader (void *out, struct HeadTable *ht,
               char **strings, struct PostTable *pt)
 {
-  fprintf (out, "%%!PS-TrueTypeFont\n");
+  lily_cookie_fprintf (out, "%%!PS-TrueTypeFont\n");
   if (pt->maxMemType42)
-    fprintf (out, "%%%%VMUsage: %ld %ld\n", pt->minMemType42,
+    lily_cookie_fprintf (out, "%%%%VMUsage: %ld %ld\n", pt->minMemType42,
             pt->maxMemType42);
-  fprintf (out, "%d dict begin\n", 11);
-  fprintf (out, "/FontName /%s def\n", strings[6] ? strings[6] : "Unknown");
-  fprintf (out, "/Encoding StandardEncoding def\n");
-  fprintf (out, "/PaintType 0 def\n/FontMatrix [1 0 0 1 0 0] def\n");
-  fprintf (out, "/FontBBox [%ld %ld %ld %ld] def\n",
+  lily_cookie_fprintf (out, "%d dict begin\n", 11);
+  lily_cookie_fprintf (out, "/FontName /%s def\n", strings[6] ? strings[6] : 
"Unknown");
+  lily_cookie_fprintf (out, "/Encoding StandardEncoding def\n");
+  lily_cookie_fprintf (out, "/PaintType 0 def\n/FontMatrix [1 0 0 1 0 0] 
def\n");
+  lily_cookie_fprintf (out, "/FontBBox [%ld %ld %ld %ld] def\n",
           ht->xMin * 1000L / ht->unitsPerEm,
           ht->yMin * 1000L / ht->unitsPerEm,
           ht->xMax * 1000L / ht->unitsPerEm,
           ht->yMax * 1000L / ht->unitsPerEm);
-  fprintf (out, "/FontType 42 def\n");
-  fprintf (out, "/FontInfo 8 dict dup begin\n");
-  fprintf (out, "/version (%d.%d) def\n",
+  lily_cookie_fprintf (out, "/FontType 42 def\n");
+  lily_cookie_fprintf (out, "/FontInfo 8 dict dup begin\n");
+  lily_cookie_fprintf (out, "/version (%d.%d) def\n",
           ht->fontRevision.mantissa, ht->fontRevision.fraction);
   if (strings[0])
     {
-      fprintf (out, "/Notice (");
+      lily_cookie_fprintf (out, "/Notice (");
       fputpss (strings[0], out);
-      fprintf (out, ") def\n");
+      lily_cookie_fprintf (out, ") def\n");
     }
   if (strings[4])
     {
-      fprintf (out, "/FullName (");
+      lily_cookie_fprintf (out, "/FullName (");
       fputpss (strings[4], out);
-      fprintf (out, ") def\n");
+      lily_cookie_fprintf (out, ") def\n");
     }
   if (strings[1])
     {
-      fprintf (out, "/FamilyName (");
+      lily_cookie_fprintf (out, "/FamilyName (");
       fputpss (strings[1], out);
-      fprintf (out, ") def\n");
+      lily_cookie_fprintf (out, ") def\n");
     }
-  fprintf (out, "/isFixedPitch %s def\n",
+  lily_cookie_fprintf (out, "/isFixedPitch %s def\n",
           pt->isFixedPitch ? "true" : "false");
-  fprintf (out, "/UnderlinePosition %ld def\n",
+  lily_cookie_fprintf (out, "/UnderlinePosition %ld def\n",
           pt->underlinePosition * 1000L / ht->unitsPerEm);
-  fprintf (out, "/UnderlineThickness %ld def\n",
+  lily_cookie_fprintf (out, "/UnderlineThickness %ld def\n",
           pt->underlineThickness * 1000L / ht->unitsPerEm);
-  fprintf (out, "end readonly def\n");
+  lily_cookie_fprintf (out, "end readonly def\n");
 }
 
 void
-printPSData (FILE * out, int fd)
+printPSData (void *out, int fd)
 {
   static char xdigits[] = "0123456789ABCDEF";
 
@@ -93,47 +93,47 @@
 
   buffer = mymalloc (CHUNKSIZE);
 
-  fprintf (out, "/sfnts [");
+  lily_cookie_fprintf (out, "/sfnts [");
   for (;;)
     {
       i = read (fd, buffer, CHUNKSIZE);
       if (i == 0)
        break;
-      fprintf (out, "\n<");
+      lily_cookie_fprintf (out, "\n<");
       for (j = 0; j < i; j++)
        {
          if (j != 0 && j % 36 == 0)
-           putc ('\n', out);
-         /* fprintf(out,"%02X",(int)buffer[j]) is too slow */
-         putc (xdigits[(buffer[j] & 0xF0) >> 4], out);
-         putc (xdigits[buffer[j] & 0x0F], out);
+           lily_cookie_putc ('\n', out);
+         /* lily_cookie_fprintf (out,"%02X",(int)buffer[j]) is too slow */
+         lily_cookie_putc (xdigits[(buffer[j] & 0xF0) >> 4], out);
+         lily_cookie_putc (xdigits[buffer[j] & 0x0F], out);
        }
-      fprintf (out, "00>");    /* Adobe bug? */
+      lily_cookie_fprintf (out, "00>");        /* Adobe bug? */
       if (i < CHUNKSIZE)
        break;
     }
-  fprintf (out, "\n] def\n");
+  lily_cookie_fprintf (out, "\n] def\n");
   free (buffer);
 }
 
 void
-printPSTrailer (FILE * out, int nglyphs, int postType, struct GlyphName *gnt)
+printPSTrailer (void *out, int nglyphs, int postType, struct GlyphName *gnt)
 {
   int i, n;
   char *name;
 
-  fprintf (out, "/CharStrings %d dict dup begin\n", nglyphs);
+  lily_cookie_fprintf (out, "/CharStrings %d dict dup begin\n", nglyphs);
   switch (postType)
     {
     case 2:
       for (n = i = 0; i < nglyphs; i++)
        {
          if (n != 0 && n % 4 == 0)
-           fprintf (out, "\n");
+           lily_cookie_fprintf (out, "\n");
          name = NAMEOF (i);
          if (name)
            {
-             fprintf (out, "/%s %d def ", name, i);
+             lily_cookie_fprintf (out, "/%s %d def ", name, i);
              n++;
            }
        }
@@ -147,12 +147,12 @@
        }
       for (i = 0; i < 258 && i < nglyphs; i++)
        {
-         fprintf (out, "/%s %d def ", macGlyphEncoding[i], i);
+         lily_cookie_fprintf (out, "/%s %d def ", macGlyphEncoding[i], i);
          if (i != 0 && i % 4 == 0)
-           fprintf (out, "\n");
+           lily_cookie_fprintf (out, "\n");
        }
       break;
     }
-  fprintf (out, "end readonly def\n");
-  fprintf (out, "FontName currentdict end definefont pop\n");
+  lily_cookie_fprintf (out, "end readonly def\n");
+  lily_cookie_fprintf (out, "FontName currentdict end definefont pop\n");
 }
Index: lilypond/ttftool/ttfps.c
diff -u lilypond/ttftool/ttfps.c:1.4 lilypond/ttftool/ttfps.c:1.5
--- lilypond/ttftool/ttfps.c:1.4        Sat Feb 26 11:20:36 2005
+++ lilypond/ttftool/ttfps.c    Mon Jun  6 14:27:42 2005
@@ -8,16 +8,15 @@
 #include "types.h"
 #include "proto.h"
 
-#define ALIAS_FILE_TO_FILECOOKIE
-#include "libc-extension.hh"
-
+#include "file-cookie.hh"
+ 
 static void endianness_test (void);
 static void usage (char *);
 
 int verbosity = 0;
 
 void
-create_type42 (const char *infile, FILE * out)
+create_type42 (const char *infile, void *out)
 {
   int fd, i;
   struct OffsetTable ot;
@@ -118,7 +117,7 @@
   if (verbosity >= 1)
     fprintf (stderr, "Generating PS file\n");
   printPSFont (out, ht, strings, nglyphs, postType, pt, gnt, fd);
-  fclose (out);
+  lily_cookie_fclose (out);
   if (verbosity >= 1)
     fprintf (stderr, "Done.\n");
   close (fd);
Index: lilypond/ttftool/util.c
diff -u lilypond/ttftool/util.c:1.4 lilypond/ttftool/util.c:1.5
--- lilypond/ttftool/util.c:1.4 Tue Apr 19 12:48:41 2005
+++ lilypond/ttftool/util.c     Mon Jun  6 14:27:42 2005
@@ -84,14 +84,14 @@
 }
 
 void
-fputpss (char *s, FILE * stream)
+fputpss (char *s, void *stream)
 {
   while (*s)
     {
       if ((*s & 0200) == 0 && *s >= 040 && *s != '(' && *s != ')')
-       putc (*s, stream);
+       lily_cookie_putc (*s, stream);
       else
-       fprintf (stream, "\\%03o", (unsigned char) *s);
+       lily_cookie_fprintf (stream, "\\%03o", (unsigned char) *s);
       s++;
     }
 }


_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to