Squash  0.7.0
squash.h
1 /* Copyright (c) 2013 The Squash Authors
2  *
3  * Permission is hereby granted, free of charge, to any person
4  * obtaining a copy of this software and associated documentation
5  * files (the "Software"), to deal in the Software without
6  * restriction, including without limitation the rights to use, copy,
7  * modify, merge, publish, distribute, sublicense, and/or sell copies
8  * of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be
12  * included in all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
18  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21  * SOFTWARE.
22  *
23  * Authors:
24  * Evan Nemerson <evan@nemerson.com>
25  */
26 
27 #ifndef SQUASH_H
28 #define SQUASH_H
29 
30 #define SQUASH_H_INSIDE
31 
32 #include <stddef.h>
33 #include <stdint.h>
34 #include <assert.h>
35 
36 #ifdef __cplusplus
37 # define SQUASH_BEGIN_DECLS extern "C" {
38 # define SQUASH_END_DECLS }
39 #else
40 # define SQUASH_BEGIN_DECLS
41 # define SQUASH_END_DECLS
42 #endif
43 
44 #ifndef SQUASH_API
45 # define SQUASH_API extern
46 #endif
47 
48 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
49 # define SQUASH_ARRAY_PARAM(name) name
50 #else
51 # define SQUASH_ARRAY_PARAM(name)
52 #endif
53 
54 #if defined(__GNUC__)
55 # define squash_assert_unreachable() do { assert(false); __builtin_unreachable(); } while(0)
56 #else
57 # define squash_assert_unreachable() assert(false)
58 #endif
59 
60 #include <squash/version.h>
61 
62 #include "status.h"
63 #include "types.h"
64 #include "object.h"
65 #include "options.h"
66 #include "stream.h"
67 #include "file.h"
68 #include "license.h"
69 #include "codec.h"
70 #include "plugin.h"
71 #include "context.h"
72 
73 #undef SQUASH_H_INSIDE
74 
75 #endif /* SQUASH_H */