]> git.imager.perl.org - imager.git/blobdiff - iolayert.h
fix an unsigned comparison when converting character code to a glyph index with a...
[imager.git] / iolayert.h
index 167ef30fb8d4ada945fc746b03e81e2ab1e27221..8d19451cec635dfffe4d14f956f769695f7671c7 100644 (file)
@@ -70,6 +70,8 @@ struct i_io_glue_t {
 
   /* if non-zero we do write buffering (enabled by default) */
   int buffered;
+
+  im_context_t context;
 };
 
 #define I_IO_DUMP_CALLBACKS 1
@@ -88,6 +90,10 @@ struct i_io_glue_t {
   ((ig)->read_ptr < (ig)->read_end ? \
      *((ig)->read_ptr++) : \
      i_io_getc_imp(ig))
+#define i_io_nextc(ig) \
+  ((void)((ig)->read_ptr < (ig)->read_end ?    \
+         ((ig)->read_ptr++, 0) :               \
+         i_io_getc_imp(ig)))
 #define i_io_peekc(ig) \
   ((ig)->read_ptr < (ig)->read_end ? \
    *((ig)->read_ptr) :              \