]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/types.h
MdeModulePkg/BrotliCustomDecompressLib: Make brotli a submodule
[mirror_edk2.git] / MdeModulePkg / Library / BrotliCustomDecompressLib / brotli / types.h
diff --git a/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/types.h b/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/types.h
deleted file mode 100644 (file)
index 35c9569..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Copyright 2013 Google Inc. All Rights Reserved.\r
-\r
-   Distributed under MIT license.\r
-   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT\r
-*/\r
-\r
-/**\r
- * @file\r
- * Common types used in decoder and encoder API.\r
- */\r
-\r
-#ifndef BROTLI_COMMON_TYPES_H_\r
-#define BROTLI_COMMON_TYPES_H_\r
-\r
-//#include <stddef.h>  /* for size_t */\r
-typedef UINTN size_t;\r
-\r
-#if defined(_MSC_VER) && (_MSC_VER < 1600)\r
-typedef __int8 int8_t;\r
-typedef unsigned __int8 uint8_t;\r
-typedef __int16 int16_t;\r
-typedef unsigned __int16 uint16_t;\r
-typedef __int32 int32_t;\r
-typedef unsigned __int32 uint32_t;\r
-typedef unsigned __int64 uint64_t;\r
-typedef __int64 int64_t;\r
-#else\r
-//#include <stdint.h>\r
-typedef INT8     int8_t;\r
-typedef INT16    int16_t;\r
-typedef INT32    int32_t;\r
-typedef INT64    int64_t;\r
-typedef UINT8    uint8_t;\r
-typedef UINT16   uint16_t;\r
-typedef UINT32   uint32_t;\r
-typedef UINT64   uint64_t;\r
-#endif  /* defined(_MSC_VER) && (_MSC_VER < 1600) */\r
-\r
-/**\r
- * A portable @c bool replacement.\r
- *\r
- * ::BROTLI_BOOL is a "documentation" type: actually it is @c int, but in API it\r
- * denotes a type, whose only values are ::BROTLI_TRUE and ::BROTLI_FALSE.\r
- *\r
- * ::BROTLI_BOOL values passed to Brotli should either be ::BROTLI_TRUE or\r
- * ::BROTLI_FALSE, or be a result of ::TO_BROTLI_BOOL macros.\r
- *\r
- * ::BROTLI_BOOL values returned by Brotli should not be tested for equality\r
- * with @c true, @c false, ::BROTLI_TRUE, ::BROTLI_FALSE, but rather should be\r
- * evaluated, for example: @code{.cpp}\r
- * if (SomeBrotliFunction(encoder, BROTLI_TRUE) &&\r
- *     !OtherBrotliFunction(decoder, BROTLI_FALSE)) {\r
- *   bool x = !!YetAnotherBrotliFunction(encoder, TO_BROLTI_BOOL(2 * 2 == 4));\r
- *   DoSomething(x);\r
- * }\r
- * @endcode\r
- */\r
-#define BROTLI_BOOL int\r
-/** Portable @c true replacement. */\r
-#define BROTLI_TRUE 1\r
-/** Portable @c false replacement. */\r
-#define BROTLI_FALSE 0\r
-/** @c bool to ::BROTLI_BOOL conversion macros. */\r
-#define TO_BROTLI_BOOL(X) (!!(X) ? BROTLI_TRUE : BROTLI_FALSE)\r
-\r
-#define BROTLI_MAKE_UINT64_T(high, low) ((((uint64_t)(high)) << 32) | low)\r
-\r
-#define BROTLI_UINT32_MAX (~((uint32_t)0))\r
-#define BROTLI_SIZE_MAX (~((size_t)0))\r
-\r
-/**\r
- * Allocating function pointer type.\r
- *\r
- * @param opaque custom memory manager handle provided by client\r
- * @param size requested memory region size; can not be @c 0\r
- * @returns @c 0 in the case of failure\r
- * @returns a valid pointer to a memory region of at least @p size bytes\r
- *          long otherwise\r
- */\r
-typedef void* (*brotli_alloc_func)(void* opaque, size_t size);\r
-\r
-/**\r
- * Deallocating function pointer type.\r
- *\r
- * This function @b SHOULD do nothing if @p address is @c 0.\r
- *\r
- * @param opaque custom memory manager handle provided by client\r
- * @param address memory region pointer returned by ::brotli_alloc_func, or @c 0\r
- */\r
-typedef void (*brotli_free_func)(void* opaque, void* address);\r
-\r
-#endif  /* BROTLI_COMMON_TYPES_H_ */\r