TianoCore EDK2 master
Loading...
Searching...
No Matches
OnigurumaUefiPort.h File Reference

Go to the source code of this file.

Macros

#define ONIG_NO_STANDARD_C_HEADERS
 
#define ONIG_NO_PRINT
 
#define P_(args)   args
 
#define INT_MAX   0x7FFFFFFF
 
#define LONG_MAX   0x7FFFFFFF
 
#define UINT_MAX   0xFFFFFFFF
 
#define ULONG_MAX   0xFFFFFFFF
 
#define SIZEOF_LONG   4
 
#define SIZEOF_LONG_LONG   8
 
#define offsetof   OFFSET_OF
 
#define SIZEOF_VOIDP   8
 
#define calloc(n, s)   AllocateZeroPool((n)*(s))
 
#define xmemmove(Dest, Src, Length)   CopyMem(Dest,Src,Length)
 
#define xmemcpy(Dest, Src, Length)   CopyMem(Dest,Src,Length)
 
#define xmemset(Buffer, Value, Length)   SetMem(Buffer,Length,Value)
 
#define va_init_list(a, b)   VA_START(a,b)
 
#define va_list   VA_LIST
 
#define va_arg(a, b)   VA_ARG(a,b)
 
#define va_end(a)   VA_END(a)
 
#define va_start   VA_START
 
#define FILE   VOID
 
#define stdout   NULL
 
#define fprintf(...)
 
#define fputs(a, b)
 
#define vsnprintf   (int)AsciiVSPrint
 
#define _vsnprintf   vsnprintf
 
#define xsnprintf   sprintf_s
 
#define xvsnprintf   vsnprintf
 
#define alloca   malloc
 
#define setlocale(a, b)
 
#define LC_ALL   0
 
#define UCHAR_MAX   255
 
#define MAX_STRING_SIZE   0x1000
 
#define strlen_s(String, MaxSize)   AsciiStrnLenS (String, MaxSize)
 
#define xstrncpy(Dest, Src, MaxSize)   strcat_s(Dest,MaxSize,Src)
 
#define xstrcat(Dest, Src, MaxSize)   strcat(Dest,Src,MaxSize)
 
#define strcat(Dest, Src, MaxSize)   strcat_s(Dest,MaxSize,Src)
 
#define strcat_s(Dest, MaxSize, Src)   AsciiStrCatS (Dest, MaxSize, Src)
 
#define strncpy_s(Dest, MaxSize, Src, Length)   AsciiStrnCpyS (Dest, MaxSize, Src, Length)
 
#define strcmp   OnigStrCmp
 
#define exit(n)   ASSERT(FALSE);
 

Typedefs

typedef UINTN size_t
 
typedef UINT32 uint32_t
 
typedef INTN intptr_t
 

Functions

int OnigStrCmp (const char *Str1, const char *Str2)
 
int EFIAPI sprintf_s (char *str, size_t sizeOfBuffer, char const *fmt,...)
 
int strlen (const char *str)
 
void * malloc (size_t size)
 
void * realloc (void *ptr, size_t size)
 
void * memcpy (void *dest, const void *src, unsigned int count)
 
void * memset (void *dest, int ch, unsigned int count)
 
void free (void *ptr)
 

Detailed Description

Module to rewrite stdlib references within Oniguruma

(C) Copyright 2014-2021 Hewlett Packard Enterprise Development LP
Copyright (c) 2020, Intel Corporation. All rights reserved.
Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file OnigurumaUefiPort.h.

Macro Definition Documentation

◆ _vsnprintf

#define _vsnprintf   vsnprintf

Definition at line 62 of file OnigurumaUefiPort.h.

◆ alloca

#define alloca   malloc

Definition at line 65 of file OnigurumaUefiPort.h.

◆ calloc

#define calloc (   n,
 
)    AllocateZeroPool((n)*(s))

Definition at line 46 of file OnigurumaUefiPort.h.

◆ exit

#define exit (   n)    ASSERT(FALSE);

Definition at line 132 of file OnigurumaUefiPort.h.

◆ FILE

#define FILE   VOID

Definition at line 57 of file OnigurumaUefiPort.h.

◆ fprintf

#define fprintf (   ...)

Definition at line 59 of file OnigurumaUefiPort.h.

◆ fputs

#define fputs (   a,
 
)

Definition at line 60 of file OnigurumaUefiPort.h.

◆ INT_MAX

#define INT_MAX   0x7FFFFFFF

Definition at line 25 of file OnigurumaUefiPort.h.

◆ LC_ALL

#define LC_ALL   0

Definition at line 68 of file OnigurumaUefiPort.h.

◆ LONG_MAX

#define LONG_MAX   0x7FFFFFFF

Definition at line 26 of file OnigurumaUefiPort.h.

◆ MAX_STRING_SIZE

#define MAX_STRING_SIZE   0x1000

Definition at line 71 of file OnigurumaUefiPort.h.

◆ offsetof

#define offsetof   OFFSET_OF

Definition at line 37 of file OnigurumaUefiPort.h.

◆ ONIG_NO_PRINT

#define ONIG_NO_PRINT

Definition at line 22 of file OnigurumaUefiPort.h.

◆ ONIG_NO_STANDARD_C_HEADERS

#define ONIG_NO_STANDARD_C_HEADERS

Definition at line 21 of file OnigurumaUefiPort.h.

◆ P_

#define P_ (   args)    args

Definition at line 23 of file OnigurumaUefiPort.h.

◆ setlocale

#define setlocale (   a,
 
)

Definition at line 67 of file OnigurumaUefiPort.h.

◆ SIZEOF_LONG

#define SIZEOF_LONG   4

Definition at line 30 of file OnigurumaUefiPort.h.

◆ SIZEOF_LONG_LONG

#define SIZEOF_LONG_LONG   8

Definition at line 31 of file OnigurumaUefiPort.h.

◆ SIZEOF_VOIDP

#define SIZEOF_VOIDP   8

Definition at line 43 of file OnigurumaUefiPort.h.

◆ stdout

#define stdout   NULL

Definition at line 58 of file OnigurumaUefiPort.h.

◆ strcat

#define strcat (   Dest,
  Src,
  MaxSize 
)    strcat_s(Dest,MaxSize,Src)

Definition at line 75 of file OnigurumaUefiPort.h.

◆ strcat_s

#define strcat_s (   Dest,
  MaxSize,
  Src 
)    AsciiStrCatS (Dest, MaxSize, Src)

Definition at line 76 of file OnigurumaUefiPort.h.

◆ strcmp

#define strcmp   OnigStrCmp

Definition at line 78 of file OnigurumaUefiPort.h.

◆ strlen_s

#define strlen_s (   String,
  MaxSize 
)    AsciiStrnLenS (String, MaxSize)

Definition at line 72 of file OnigurumaUefiPort.h.

◆ strncpy_s

#define strncpy_s (   Dest,
  MaxSize,
  Src,
  Length 
)    AsciiStrnCpyS (Dest, MaxSize, Src, Length)

Definition at line 77 of file OnigurumaUefiPort.h.

◆ UCHAR_MAX

#define UCHAR_MAX   255

Definition at line 70 of file OnigurumaUefiPort.h.

◆ UINT_MAX

#define UINT_MAX   0xFFFFFFFF

Definition at line 27 of file OnigurumaUefiPort.h.

◆ ULONG_MAX

#define ULONG_MAX   0xFFFFFFFF

Definition at line 28 of file OnigurumaUefiPort.h.

◆ va_arg

#define va_arg (   a,
 
)    VA_ARG(a,b)

Definition at line 53 of file OnigurumaUefiPort.h.

◆ va_end

#define va_end (   a)    VA_END(a)

Definition at line 54 of file OnigurumaUefiPort.h.

◆ va_init_list

#define va_init_list (   a,
 
)    VA_START(a,b)

Definition at line 51 of file OnigurumaUefiPort.h.

◆ va_list

#define va_list   VA_LIST

Definition at line 52 of file OnigurumaUefiPort.h.

◆ va_start

#define va_start   VA_START

Definition at line 55 of file OnigurumaUefiPort.h.

◆ vsnprintf

#define vsnprintf   (int)AsciiVSPrint

Definition at line 61 of file OnigurumaUefiPort.h.

◆ xmemcpy

#define xmemcpy (   Dest,
  Src,
  Length 
)    CopyMem(Dest,Src,Length)

Definition at line 48 of file OnigurumaUefiPort.h.

◆ xmemmove

#define xmemmove (   Dest,
  Src,
  Length 
)    CopyMem(Dest,Src,Length)

Definition at line 47 of file OnigurumaUefiPort.h.

◆ xmemset

#define xmemset (   Buffer,
  Value,
  Length 
)    SetMem(Buffer,Length,Value)

Definition at line 49 of file OnigurumaUefiPort.h.

◆ xsnprintf

#define xsnprintf   sprintf_s

Definition at line 63 of file OnigurumaUefiPort.h.

◆ xstrcat

#define xstrcat (   Dest,
  Src,
  MaxSize 
)    strcat(Dest,Src,MaxSize)

Definition at line 74 of file OnigurumaUefiPort.h.

◆ xstrncpy

#define xstrncpy (   Dest,
  Src,
  MaxSize 
)    strcat_s(Dest,MaxSize,Src)

Definition at line 73 of file OnigurumaUefiPort.h.

◆ xvsnprintf

#define xvsnprintf   vsnprintf

Definition at line 64 of file OnigurumaUefiPort.h.

Typedef Documentation

◆ intptr_t

typedef INTN intptr_t

Definition at line 34 of file OnigurumaUefiPort.h.

◆ size_t

typedef UINTN size_t

Definition at line 32 of file OnigurumaUefiPort.h.

◆ uint32_t

typedef UINT32 uint32_t

Definition at line 33 of file OnigurumaUefiPort.h.

Function Documentation

◆ free()

void free ( void *  ptr)

De-allocates or frees a memory block

Definition at line 107 of file BaseMemAllocation.c.

◆ malloc()

void * malloc ( size_t  size)

Allocates memory blocks.

Allocates memory blocks

Definition at line 31 of file BaseMemAllocation.c.

◆ memcpy()

void * memcpy ( void *  dest,
const void *  src,
unsigned int  count 
)

Definition at line 38 of file CopyMem.c.

◆ memset()

void * memset ( void *  dest,
int  ch,
unsigned int  count 
)

Definition at line 127 of file OnigurumaUefiPort.c.

◆ OnigStrCmp()

int OnigStrCmp ( const char *  Str1,
const char *  Str2 
)

Definition at line 41 of file OnigurumaUefiPort.c.

◆ realloc()

void * realloc ( void *  ptr,
size_t  size 
)

Definition at line 64 of file BaseMemAllocation.c.

◆ sprintf_s()

int EFIAPI sprintf_s ( char *  str,
size_t  sizeOfBuffer,
char const *  fmt,
  ... 
)

Definition at line 23 of file OnigurumaUefiPort.c.

◆ strlen()

int strlen ( const char *  str)

Definition at line 50 of file OnigurumaUefiPort.c.