diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-08 12:31:36 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-08 12:31:36 -0600 |
commit | d796c9dd933ab96ec83b9a634feedd5d32e1ba3f (patch) | |
tree | 6e3dcca4f77e20ec8966c666aac7c35bd4704053 /src/3rdparty/libmng/libmng_error.h | |
download | tqt3-d796c9dd933ab96ec83b9a634feedd5d32e1ba3f.tar.gz tqt3-d796c9dd933ab96ec83b9a634feedd5d32e1ba3f.zip |
Test conversion to TQt3 from Qt3 8c6fc1f8e35fd264dd01c582ca5e7549b32ab731
Diffstat (limited to 'src/3rdparty/libmng/libmng_error.h')
-rw-r--r-- | src/3rdparty/libmng/libmng_error.h | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/src/3rdparty/libmng/libmng_error.h b/src/3rdparty/libmng/libmng_error.h new file mode 100644 index 000000000..9ea9316c7 --- /dev/null +++ b/src/3rdparty/libmng/libmng_error.h @@ -0,0 +1,109 @@ +/* ************************************************************************** */ +/* * For conditions of distribution and use, * */ +/* * see copyright notice in libmng.h * */ +/* ************************************************************************** */ +/* * * */ +/* * project : libmng * */ +/* * file : libmng_error.h copyright (c) 2000 G.Juyn * */ +/* * version : 1.0.0 * */ +/* * * */ +/* * purpose : Error functions (definition) * */ +/* * * */ +/* * author : G.Juyn * */ +/* * web : http://www.3-t.com * */ +/* * email : mailto:info@3-t.com * */ +/* * * */ +/* * comment : Definition of the generic error-codes and functions * */ +/* * * */ +/* * changes : 0.5.1 - 05/06/2000 - G.Juyn * */ +/* * - added some errorcodes * */ +/* * 0.5.1 - 05/08/2000 - G.Juyn * */ +/* * - added some errorcodes * */ +/* * - changed strict-ANSI stuff * */ +/* * 0.5.1 - 05/11/2000 - G.Juyn * */ +/* * - added application errorcodes (used with callbacks) * */ +/* * - moved chunk-access errorcodes to severity 5 * */ +/* * * */ +/* * 0.5.2 - 05/20/2000 - G.Juyn * */ +/* * - added JNG errorcodes * */ +/* * 0.5.2 - 05/23/2000 - G.Juyn * */ +/* * - added error tell-tale definition * */ +/* * 0.5.2 - 05/30/2000 - G.Juyn * */ +/* * - added errorcodes for delta-image processing * */ +/* * 0.5.2 - 06/06/2000 - G.Juyn * */ +/* * - added errorcode for delayed buffer-processing * */ +/* * - moved errorcodes to "libmng.h" * */ +/* * * */ +/* * 0.9.1 - 07/15/2000 - G.Juyn * */ +/* * - added macro + routine to set returncode without * */ +/* * calling error callback * */ +/* * * */ +/* * 0.9.2 - 08/05/2000 - G.Juyn * */ +/* * - changed file-prefixes * */ +/* * * */ +/* ************************************************************************** */ + +#if defined(__BORLANDC__) && defined(MNG_STRICT_ANSI) +#pragma option -A /* force ANSI-C */ +#endif + +#ifndef _libmng_error_h_ +#define _libmng_error_h_ + +/* ************************************************************************** */ +/* * * */ +/* * Default error routines * */ +/* * * */ +/* ************************************************************************** */ + +mng_bool mng_store_error (mng_datap pData, + mng_retcode iError, + mng_retcode iExtra1, + mng_retcode iExtra2); + +mng_bool mng_process_error (mng_datap pData, + mng_retcode iError, + mng_retcode iExtra1, + mng_retcode iExtra2); + +/* ************************************************************************** */ +/* * * */ +/* * Error handling macros * */ +/* * * */ +/* ************************************************************************** */ + +#define MNG_ERROR(D,C) { mng_process_error (D, C, 0, 0); return C; } +#define MNG_ERRORZ(D,Z) { mng_process_error (D, MNG_ZLIBERROR, Z, 0); return MNG_ZLIBERROR; } +#define MNG_ERRORJ(D,J) { mng_process_error (D, MNG_JPEGERROR, J, 0); return MNG_JPEGERROR; } +#define MNG_ERRORL(D,L) { mng_process_error (D, MNG_LCMSERROR, L, 0); return MNG_LCMSERROR; } + +#define MNG_RETURN(D,C) { mng_store_error (D, C, 0, 0); return C; } + +#define MNG_WARNING(D,C) { if (!mng_process_error (D, C, 0, 0)) return C; } + +#define MNG_VALIDHANDLE(H) { if ((H == 0) || (((mng_datap)H)->iMagic != MNG_MAGIC)) \ + return MNG_INVALIDHANDLE; } +#define MNG_VALIDHANDLEX(H) { if ((H == 0) || (((mng_datap)H)->iMagic != MNG_MAGIC)) \ + return 0; } +#define MNG_VALIDCB(D,C) { if (!((mng_datap)D)->C) \ + MNG_ERROR (((mng_datap)D), MNG_NOCALLBACK) } + +/* ************************************************************************** */ +/* * * */ +/* * Error string-table entry * */ +/* * * */ +/* ************************************************************************** */ + +typedef struct { + mng_retcode iError; + mng_pchar zErrortext; + } mng_error_entry; +typedef mng_error_entry * mng_error_entryp; + +/* ************************************************************************** */ + +#endif /* _libmng_error_h_ */ + +/* ************************************************************************** */ +/* * end of file * */ +/* ************************************************************************** */ |