defined new type "opj_bool", and new constants OPJ_FALSE and OPJ_TRUE, to avoid having to deal with "stdbool.h" (patch from Winfried)
This commit is contained in:
@@ -72,7 +72,7 @@ opj_event_mgr_t* OPJ_CALLCONV opj_set_event_mgr(opj_common_ptr cinfo, opj_event_
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) {
|
||||
opj_bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) {
|
||||
#define MSG_SIZE 512 /* 512 bytes should be more than enough for a short message */
|
||||
opj_msg_callback msg_handler = NULL;
|
||||
|
||||
@@ -92,10 +92,10 @@ bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) {
|
||||
break;
|
||||
}
|
||||
if(msg_handler == NULL) {
|
||||
return false;
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
if ((fmt != NULL) && (event_mgr != NULL)) {
|
||||
@@ -116,6 +116,6 @@ bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) {
|
||||
msg_handler(message, cinfo->client_data);
|
||||
}
|
||||
|
||||
return true;
|
||||
return OPJ_TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user