diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-21 13:47:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-21 13:47:30 +0400 |
commit | c250ab893c0b0086011d44848b66e53adcff8cad (patch) | |
tree | 0131eb22eb0726c995a4ecf6c6fa2022f7846cd9 /extern/libopenjpeg/event.c | |
parent | 11cb213d4509b6a2733210fce934395a86543bae (diff) |
update libopenjpeg from 1.3 to 1.5, since 1.3 has a bug saving alpha channels.
the patches/ dir is NOT applied but perhaps we can get OSX and BSD working using the opj_config.h
Diffstat (limited to 'extern/libopenjpeg/event.c')
-rw-r--r-- | extern/libopenjpeg/event.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/extern/libopenjpeg/event.c b/extern/libopenjpeg/event.c index fe46e423552..0dc22f12549 100644 --- a/extern/libopenjpeg/event.c +++ b/extern/libopenjpeg/event.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * Copyright (c) 2005, Herve Drolon, FreeImage Team * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,8 +29,9 @@ /* ========================================================== Utility functions ==========================================================*/ -#if 0 -#if !defined(_MSC_VER) && !defined(__MINGW32__) + +#ifdef OPJ_CODE_NOT_USED +#ifndef _WIN32 static char* i2a(unsigned i, char *a, unsigned r) { if (i/r > 0) a = i2a(i/r,a,r); @@ -57,8 +58,8 @@ _itoa(int i, char *a, int r) { return a; } -#endif /* !WIN32 */ -#endif /* unused - campbell */ +#endif /* !_WIN32 */ +#endif /* ----------------------------------------------------------------------- */ opj_event_mgr_t* OPJ_CALLCONV opj_set_event_mgr(opj_common_ptr cinfo, opj_event_mgr_t *event_mgr, void *context) { @@ -72,7 +73,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 +93,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 +117,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; } |