v0.4.1
Fast, portable C library for geometry input/output
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules
error.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** Copyright (c) 2017, Fougue Ltd. <http://www.fougue.pro>
3 ** All rights reserved.
4 **
5 ** Redistribution and use in source and binary forms, with or without
6 ** modification, are permitted provided that the following conditions
7 ** are met:
8 **
9 ** 1. Redistributions of source code must retain the above copyright
10 ** notice, this list of conditions and the following disclaimer.
11 **
12 ** 2. Redistributions in binary form must reproduce the above
13 ** copyright notice, this list of conditions and the following
14 ** disclaimer in the documentation and/or other materials provided
15 ** with the distribution.
16 **
17 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 ****************************************************************************/
29 
37 #pragma once
38 
39 #include "global.h"
40 
54 {
57 
60 
63 
66 
69 
72 
75 
79 
83 
86 
87  /* zlib */
90 
93 
96 
99 
102 
106 
109 
113 
116 
119 
120  /* ZIP */
123 
127 };
128 
131 enum { GMIO_CORE_ERROR_TAG = 0x00 };
132 
135 { return code == GMIO_ERROR_OK ? true : false; }
136 
138 GMIO_INLINE bool gmio_error(int code)
139 { return code != GMIO_ERROR_OK ? true : false; }
140 
gmio_error
Common errors.
Definition: error.h:53
All input to be deflated(compressed) was not processed.
Definition: error.h:115
An error occured after a call to a function.
Definition: error.h:82
No error occurred, success.
Definition: error.h:56
#define GMIO_INLINE
Expands to the C compiler specific inline keyword (if any)
Definition: global.h:178
See Z_DATA_ERROR.
Definition: error.h:95
Unknown error.
Definition: error.h:59
See Z_STREAM_ERROR.
Definition: error.h:92
Fundamental global declarations, included by almost all other header/source files.
The size of some ZIP file entry exceeds 32b limit and so requires Zip64 format.
Definition: error.h:126
Invalid compression memory usage, see gmio_zlib_compress_options::memory_usage.
Definition: error.h:112
Checking of LC_NUMERIC failed(should be "C" or "POSIX")
Definition: error.h:85
See Z_VERSION_ERROR (zlib library version is incompatible with the version assumed by the caller) ...
Definition: error.h:105
See Z_BUF_ERROR.
Definition: error.h:101
Pointer on argument memory block is NULL.
Definition: error.h:62
Zip64 format requires the compiler to provide a 64b integer type.
Definition: error.h:122
Task was stopped by user, that is to say gmio_task_iface::func_is_stop_requested() returned true...
Definition: error.h:78
Provided gmio_stream is NULL.
Definition: error.h:68
Argument size for the memory block is too small.
Definition: error.h:65
An error occurred with gmio_stream.
Definition: error.h:71
Deflate failure to flush pending output.
Definition: error.h:118
See Z_ERRNO (file operation error)
Definition: error.h:89
bool gmio_no_error(int code)
Returns true if code == GMIO_NO_ERROR
Definition: error.h:134
Definition: error.h:131
Some required gmio_stream function pointer is NULL.
Definition: error.h:74
See Z_MEM_ERROR (not enough memory)
Definition: error.h:98
Invalid compression level, see gmio_zlib_compress_options::level.
Definition: error.h:108
Fougue © 2017