ReactOS 0.4.15-dev-7958-gcd0bb1a
cc.h File Reference
#include <wdm.h>
Include dependency graph for cc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define mem_trim(_m_, _s_)   (_m_)
 
#define U16_F   "hu"
 
#define S16_F   "hd"
 
#define X16_F   "hx"
 
#define U32_F   "lu"
 
#define S32_F   "ld"
 
#define X32_F   "lx"
 
#define BYTE_ORDER   LITTLE_ENDIAN
 
#define LWIP_CHKSUM_ALGORITHM   3
 
#define LWIP_PLATFORM_DIAG(x)   (DbgPrint x)
 
#define LWIP_PLATFORM_ASSERT(x)   ASSERTMSG(x, FALSE)
 
#define SYS_ARCH_DECL_PROTECT(lev)   sys_prot_t (lev)
 
#define SYS_ARCH_PROTECT(lev)   sys_arch_protect(&(lev))
 
#define SYS_ARCH_UNPROTECT(lev)   sys_arch_unprotect(lev)
 
#define PACK_STRUCT_STRUCT
 
#define PACK_STRUCT_USE_INCLUDES
 

Typedefs

typedef unsigned char u8_t
 
typedef unsigned short u16_t
 
typedef unsigned long u32_t
 
typedef signed char s8_t
 
typedef signed short s16_t
 
typedef signed long s32_t
 
typedef ULONG_PTR mem_ptr_t
 

Functions

voidmalloc (size_t size)
 
voidcalloc (size_t count, size_t size)
 
void free (void *mem)
 
voidrealloc (void *mem, size_t size)
 

Macro Definition Documentation

◆ BYTE_ORDER

#define BYTE_ORDER   LITTLE_ENDIAN

Definition at line 44 of file cc.h.

◆ LWIP_CHKSUM_ALGORITHM

#define LWIP_CHKSUM_ALGORITHM   3

Definition at line 47 of file cc.h.

◆ LWIP_PLATFORM_ASSERT

#define LWIP_PLATFORM_ASSERT (   x)    ASSERTMSG(x, FALSE)

Definition at line 51 of file cc.h.

◆ LWIP_PLATFORM_DIAG

#define LWIP_PLATFORM_DIAG (   x)    (DbgPrint x)

Definition at line 50 of file cc.h.

◆ mem_trim

#define mem_trim (   _m_,
  _s_ 
)    (_m_)

Definition at line 20 of file cc.h.

◆ PACK_STRUCT_STRUCT

Definition at line 59 of file cc.h.

◆ PACK_STRUCT_USE_INCLUDES

#define PACK_STRUCT_USE_INCLUDES

Definition at line 60 of file cc.h.

◆ S16_F

#define S16_F   "hd"

Definition at line 37 of file cc.h.

◆ S32_F

#define S32_F   "ld"

Definition at line 40 of file cc.h.

◆ SYS_ARCH_DECL_PROTECT

#define SYS_ARCH_DECL_PROTECT (   lev)    sys_prot_t (lev)

Definition at line 54 of file cc.h.

◆ SYS_ARCH_PROTECT

#define SYS_ARCH_PROTECT (   lev)    sys_arch_protect(&(lev))

Definition at line 55 of file cc.h.

◆ SYS_ARCH_UNPROTECT

#define SYS_ARCH_UNPROTECT (   lev)    sys_arch_unprotect(lev)

Definition at line 56 of file cc.h.

◆ U16_F

#define U16_F   "hu"

Definition at line 36 of file cc.h.

◆ U32_F

#define U32_F   "lu"

Definition at line 39 of file cc.h.

◆ X16_F

#define X16_F   "hx"

Definition at line 38 of file cc.h.

◆ X32_F

#define X32_F   "lx"

Definition at line 41 of file cc.h.

Typedef Documentation

◆ mem_ptr_t

Definition at line 33 of file cc.h.

◆ s16_t

typedef signed short s16_t

Definition at line 29 of file cc.h.

◆ s32_t

typedef signed long s32_t

Definition at line 30 of file cc.h.

◆ s8_t

typedef signed char s8_t

Definition at line 28 of file cc.h.

◆ u16_t

typedef unsigned short u16_t

Definition at line 24 of file cc.h.

◆ u32_t

typedef unsigned long u32_t

Definition at line 25 of file cc.h.

◆ u8_t

typedef unsigned char u8_t

Definition at line 23 of file cc.h.

Function Documentation

◆ calloc()

void * calloc ( size_t  count,
size_t  size 
)

Definition at line 157 of file cabinet.c.

158{
159 return (void *)RtlAllocateHeap(ProcessHeap, HEAP_ZERO_MEMORY, nmemb * size);
160}
HANDLE ProcessHeap
Definition: servman.c:15
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:590
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
GLsizeiptr size
Definition: glext.h:5919

◆ free()

void free ( void mem)

Definition at line 151 of file cabinet.c.

152{
154}
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:608
static PVOID ptr
Definition: dispmode.c:27

◆ malloc()

void * malloc ( size_t  size)

Definition at line 145 of file cabinet.c.

◆ realloc()

void * realloc ( void mem,
size_t  size 
)

Definition at line 33 of file memory.c.

34{
35 void* new_mem;
36
37 /* realloc() with a NULL mem pointer acts like a call to malloc() */
38 if (mem == NULL) {
39 return malloc(size);
40 }
41
42 /* realloc() with a size 0 acts like a call to free() */
43 if (size == 0) {
44 free(mem);
45 return NULL;
46 }
47
48 /* Allocate the new buffer first */
49 new_mem = malloc(size);
50 if (new_mem == NULL) {
51 /* The old buffer is still intact */
52 return NULL;
53 }
54
55 /* Copy the data over */
56 RtlCopyMemory(new_mem, mem, size);
57
58 /* Deallocate the old buffer */
59 free(mem);
60
61 /* Return the newly allocated block */
62 return new_mem;
63}
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
Definition: mem.c:156
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263