2020-02-23 21:26:51 +01:00
|
|
|
//
|
|
|
|
// Platform.h.h
|
|
|
|
// cpp_tests
|
|
|
|
//
|
|
|
|
// Created by jief on 23.02.20.
|
|
|
|
// Copyright © 2020 JF Knudsen. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef Platform_h_h
|
|
|
|
#define Platform_h_h
|
|
|
|
|
|
|
|
#include <limits.h>
|
|
|
|
#include <stdarg.h>
|
2020-03-11 15:23:58 +01:00
|
|
|
#include <stdint.h>
|
2020-03-13 14:11:58 +01:00
|
|
|
#include <string.h>
|
2020-02-23 21:26:51 +01:00
|
|
|
|
2020-03-04 14:37:39 +01:00
|
|
|
#define UINTN unsigned long long
|
2020-02-23 21:26:51 +01:00
|
|
|
#define MAX_UINTN ULONG_MAX
|
|
|
|
#define BOOLEAN bool
|
2020-03-11 15:23:58 +01:00
|
|
|
#define INTN int32_t
|
2020-03-04 14:37:39 +01:00
|
|
|
#define CHAR8 unsigned char
|
2020-02-24 14:07:59 +01:00
|
|
|
#define CHAR16 char16_t
|
2020-02-23 21:26:51 +01:00
|
|
|
|
2020-03-11 15:23:58 +01:00
|
|
|
#define UINT8 uint8_t
|
|
|
|
#define UINT16 uint16_t
|
|
|
|
#define UINT32 uint32_t
|
|
|
|
#define UINT64 uint64_t
|
|
|
|
#define INT8 int8_t
|
|
|
|
#define INT16 int16_t
|
|
|
|
#define INT32 int32_t
|
|
|
|
#define INT64 int64_t
|
|
|
|
|
|
|
|
#define MAX_INT8 ((INT8)0x7F)
|
|
|
|
#define MAX_UINT8 ((UINT8)0xFF)
|
|
|
|
#define MAX_INT16 ((INT16)0x7FFF)
|
|
|
|
#define MAX_UINT16 ((UINT16)0xFFFF)
|
|
|
|
#define MAX_INT32 ((INT32)0x7FFFFFFF)
|
|
|
|
#define MAX_UINT32 ((UINT32)0xFFFFFFFF)
|
|
|
|
#define MAX_INT64 ((INT64)0x7FFFFFFFFFFFFFFFULL)
|
|
|
|
#define MAX_UINT64 ((UINT64)0xFFFFFFFFFFFFFFFFULL)
|
|
|
|
|
|
|
|
|
2020-02-23 21:26:51 +01:00
|
|
|
#define IN
|
|
|
|
|
|
|
|
#define VA_LIST va_list
|
|
|
|
#define VA_START va_start
|
|
|
|
#define VA_END va_end
|
|
|
|
#define VA_ARG va_arg
|
2020-03-04 14:37:39 +01:00
|
|
|
#define VOID void
|
|
|
|
#define EFIAPI
|
|
|
|
#define CONST const
|
2020-02-23 21:26:51 +01:00
|
|
|
|
|
|
|
void CpuDeadLoop(void);
|
|
|
|
void DebugLog(int DebugMode, const char *FormatString, ...);
|
|
|
|
|
|
|
|
void* AllocatePool(UINTN AllocationSize);
|
|
|
|
void* ReallocatePool(UINTN OldSize, UINTN NewSize, void* OldBuffer);
|
|
|
|
void FreePool(const void* Buffer);
|
|
|
|
void CopyMem(void *Destination, void *Source, UINTN Length);
|
|
|
|
void PauseForKey(const wchar_t* msg);
|
|
|
|
int StrCmp(const wchar_t* FirstString, const wchar_t* SecondString);
|
|
|
|
int StrnCmp(const wchar_t* FirstString, const wchar_t* SecondString, UINTN Length);
|
2020-03-11 15:23:58 +01:00
|
|
|
UINTN StrLen(const wchar_t* String);
|
|
|
|
UINTN AsciiStrLen(const char* String);
|
2020-03-12 15:40:38 +01:00
|
|
|
INTN AsciiStrCmp (const char *FirstString,const char *SecondString);
|
2020-02-24 14:07:59 +01:00
|
|
|
|
2020-02-23 21:26:51 +01:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* Platform_h_h */
|