defined new type "opj_bool", and new constants OPJ_FALSE and OPJ_TRUE, to avoid havin...
[openjpeg.git] / libopenjpeg / cio.c
index 2ac262a1f6b54013165218e2bd1a6e2d6d53f36b..3b0f816f254b8f827e31c9127f8f86b1bdb2842c 100644 (file)
@@ -126,13 +126,13 @@ unsigned char *cio_getbp(opj_cio_t *cio) {
 /*
  * Write a byte.
  */
-bool cio_byteout(opj_cio_t *cio, unsigned char v) {
+opj_bool cio_byteout(opj_cio_t *cio, unsigned char v) {
        if (cio->bp >= cio->end) {
                opj_event_msg(cio->cinfo, EVT_ERROR, "write error\n");
-               return false;
+               return OPJ_FALSE;
        }
        *cio->bp++ = v;
-       return true;
+       return OPJ_TRUE;
 }
 
 /*