clang: adjust formatting rules (#1015)

This commit is contained in:
ReenigneArcher
2023-03-27 21:45:29 -04:00
committed by GitHub
parent 79cf382cd9
commit 21eb4eb6dd
103 changed files with 26883 additions and 25173 deletions

View File

@@ -91,7 +91,7 @@
*/
#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
#define KHRONOS_STATIC 1
#define KHRONOS_STATIC 1
#endif
/*-------------------------------------------------------------------------
@@ -100,17 +100,17 @@
* This precedes the return type of the function in the function prototype.
*/
#if defined(KHRONOS_STATIC)
/* If the preprocessor constant KHRONOS_STATIC is defined, make the
/* If the preprocessor constant KHRONOS_STATIC is defined, make the
* header compatible with static linking. */
#define KHRONOS_APICALL
#define KHRONOS_APICALL
#elif defined(_WIN32)
#define KHRONOS_APICALL __declspec(dllimport)
#define KHRONOS_APICALL __declspec(dllimport)
#elif defined(__SYMBIAN32__)
#define KHRONOS_APICALL IMPORT_C
#define KHRONOS_APICALL IMPORT_C
#elif defined(__ANDROID__)
#define KHRONOS_APICALL __attribute__((visibility("default")))
#define KHRONOS_APICALL __attribute__((visibility("default")))
#else
#define KHRONOS_APICALL
#define KHRONOS_APICALL
#endif
/*-------------------------------------------------------------------------
@@ -120,10 +120,10 @@
* name in the function prototype.
*/
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
/* Win32 but not WinCE */
#define KHRONOS_APIENTRY __stdcall
/* Win32 but not WinCE */
#define KHRONOS_APIENTRY __stdcall
#else
#define KHRONOS_APIENTRY
#define KHRONOS_APIENTRY
#endif
/*-------------------------------------------------------------------------
@@ -132,40 +132,39 @@
* This follows the closing parenthesis of the function prototype arguments.
*/
#if defined(__ARMCC_2__)
#define KHRONOS_APIATTRIBUTES __softfp
#define KHRONOS_APIATTRIBUTES __softfp
#else
#define KHRONOS_APIATTRIBUTES
#define KHRONOS_APIATTRIBUTES
#endif
/*-------------------------------------------------------------------------
* basic type definitions
*-----------------------------------------------------------------------*/
#if(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
/*
/*
* Using <stdint.h>
*/
#include <stdint.h>
#include <stdint.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif defined(__VMS) || defined(__sgi)
/*
/*
* Using <inttypes.h>
*/
#include <inttypes.h>
#include <inttypes.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
@@ -176,8 +175,8 @@ typedef __int32 khronos_int32_t;
typedef unsigned __int32 khronos_uint32_t;
typedef __int64 khronos_int64_t;
typedef unsigned __int64 khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif defined(__sun__) || defined(__digital__)
@@ -186,15 +185,15 @@ typedef unsigned __int64 khronos_uint64_t;
*/
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
#if defined(__arch64__) || defined(_LP64)
#if defined(__arch64__) || defined(_LP64)
typedef long int khronos_int64_t;
typedef unsigned long int khronos_uint64_t;
#else
#else
typedef long long int khronos_int64_t;
typedef unsigned long long int khronos_uint64_t;
#endif /* __arch64__ */
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#endif /* __arch64__ */
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif 0
@@ -203,25 +202,24 @@ typedef unsigned long long int khronos_uint64_t;
*/
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
#define KHRONOS_SUPPORT_INT64 0
#define KHRONOS_SUPPORT_FLOAT 0
#define KHRONOS_SUPPORT_INT64 0
#define KHRONOS_SUPPORT_FLOAT 0
#else
/*
/*
* Generic fallback
*/
#include <stdint.h>
#include <stdint.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#endif
/*
* Types that are (so far) the same on all platforms
*/
@@ -272,7 +270,7 @@ typedef khronos_int64_t khronos_stime_nanoseconds_t;
* Dummy value used to pad enum types to 32 bits.
*/
#ifndef KHRONOS_MAX_ENUM
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
#endif
/*
@@ -282,8 +280,8 @@ typedef khronos_int64_t khronos_stime_nanoseconds_t;
* comparisons should not be made against KHRONOS_TRUE.
*/
typedef enum {
KHRONOS_FALSE = 0,
KHRONOS_TRUE = 1,
KHRONOS_FALSE = 0,
KHRONOS_TRUE = 1,
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
} khronos_boolean_enum_t;