[823] | 1 | /******************************************************************************
|
---|
| 2 | Copyright (c) 2014 Ryan Juckett
|
---|
| 3 | http://www.ryanjuckett.com/
|
---|
| 4 |
|
---|
| 5 | This software is provided 'as-is', without any express or implied
|
---|
| 6 | warranty. In no event will the authors be held liable for any damages
|
---|
| 7 | arising from the use of this software.
|
---|
| 8 |
|
---|
| 9 | Permission is granted to anyone to use this software for any purpose,
|
---|
| 10 | including commercial applications, and to alter it and redistribute it
|
---|
| 11 | freely, subject to the following restrictions:
|
---|
| 12 |
|
---|
| 13 | 1. The origin of this software must not be misrepresented; you must not
|
---|
| 14 | claim that you wrote the original software. If you use this software
|
---|
| 15 | in a product, an acknowledgment in the product documentation would be
|
---|
| 16 | appreciated but is not required.
|
---|
| 17 |
|
---|
| 18 | 2. Altered source versions must be plainly marked as such, and must not be
|
---|
| 19 | misrepresented as being the original software.
|
---|
| 20 |
|
---|
| 21 | 3. This notice may not be removed or altered from any source
|
---|
| 22 | distribution.
|
---|
| 23 | ******************************************************************************/
|
---|
| 24 |
|
---|
| 25 | #ifndef RJ__Standard_h
|
---|
| 26 | #define RJ__Standard_h
|
---|
| 27 |
|
---|
| 28 | #if defined(WIN32) || defined(WIN64)
|
---|
| 29 | #include <stdint.h>
|
---|
| 30 | #else
|
---|
| 31 | #include <inttypes.h>
|
---|
| 32 | #endif
|
---|
| 33 |
|
---|
[882] | 34 | #if defined(LINUX) || defined(__EMSCRIPTEN__) || defined(MACOS)
|
---|
[823] | 35 | #include <stddef.h>
|
---|
| 36 | #endif
|
---|
| 37 |
|
---|
| 38 | #include <assert.h>
|
---|
| 39 |
|
---|
| 40 | // Assertion macro
|
---|
| 41 | #define RJ_ASSERT(condition) assert(condition)
|
---|
| 42 |
|
---|
| 43 | // Boolean types
|
---|
| 44 | typedef bool tB;
|
---|
| 45 |
|
---|
| 46 | // Character types
|
---|
| 47 | typedef char tC8;
|
---|
| 48 |
|
---|
| 49 | // Unsigned integer types
|
---|
| 50 | typedef uint8_t tU8;
|
---|
| 51 | typedef uint16_t tU16;
|
---|
| 52 | typedef uint32_t tU32;
|
---|
| 53 | typedef uint64_t tU64;
|
---|
| 54 |
|
---|
| 55 | // Signed integer types
|
---|
| 56 | typedef int8_t tS8;
|
---|
| 57 | typedef int16_t tS16;
|
---|
| 58 | typedef int32_t tS32;
|
---|
| 59 | typedef int64_t tS64;
|
---|
| 60 |
|
---|
| 61 | // Floating point types
|
---|
| 62 | typedef float tF32;
|
---|
| 63 | typedef double tF64;
|
---|
| 64 |
|
---|
| 65 | // Size types
|
---|
| 66 | typedef size_t tSize;
|
---|
| 67 | typedef ptrdiff_t tPtrDiff;
|
---|
| 68 |
|
---|
| 69 | #endif
|
---|