ReactOS  0.4.13-dev-257-gfabbd7c
compat.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define offsetof(x, y)   FIELD_OFFSET(x,y)
 
#define nil   (0)
 
#define nelem(arr)   (sizeof((arr)[0]) / sizeof((arr)))
 
#define werrstr(str, ...)   DPRINT(str "\n" ,##__VA_ARGS__)
 
#define malloc(x)   RosSymAllocMem(x)
 
#define mallocz(x, y)   RosSymAllocMemZero(x,y)
 
#define free(x)   xfree(x)
 
#define USED(x)   (*((char *)&(x)) ^= 0)
 
#define memset(x, y, z)   RtlZeroMemory(x,z)
 

Typedefs

typedef signed char schar
 
typedef unsigned char uchar
 
typedef unsigned int uint
 
typedef unsigned long ulong
 
typedef unsigned long long uvlong
 
typedef unsigned short u16int
 
typedef short s16int
 
typedef unsigned int u32int
 
typedef int s32int
 
typedef unsigned long long u64int
 
typedef long long s64int
 
typedef ulong size_t
 

Functions

int readn (void *fd, char *buf, ulong len)
 
int seek (void *fd, ulong off, int mode)
 
voidRosSymAllocMemZero (ulong num, ulong size)
 
voidRosSymRealloc (void *mem, ulong newsize)
 
void xfree (void *v)
 

Macro Definition Documentation

◆ free

#define free (   x)    xfree(x)

Definition at line 37 of file compat.h.

◆ malloc

#define malloc (   x)    RosSymAllocMem(x)

Definition at line 35 of file compat.h.

◆ mallocz

#define mallocz (   x,
  y 
)    RosSymAllocMemZero(x,y)

Definition at line 36 of file compat.h.

◆ memset

#define memset (   x,
  y,
  z 
)    RtlZeroMemory(x,z)

Definition at line 39 of file compat.h.

◆ nelem

#define nelem (   arr)    (sizeof((arr)[0]) / sizeof((arr)))

Definition at line 25 of file compat.h.

◆ nil

#define nil   (0)

Definition at line 23 of file compat.h.

◆ offsetof

#define offsetof (   x,
  y 
)    FIELD_OFFSET(x,y)

Definition at line 22 of file compat.h.

◆ USED

#define USED (   x)    (*((char *)&(x)) ^= 0)

Definition at line 38 of file compat.h.

◆ werrstr

#define werrstr (   str,
  ... 
)    DPRINT(str "\n" ,##__VA_ARGS__)

Definition at line 34 of file compat.h.

Typedef Documentation

◆ s16int

typedef short s16int

Definition at line 12 of file compat.h.

◆ s32int

typedef int s32int

Definition at line 14 of file compat.h.

◆ s64int

typedef long long s64int

Definition at line 16 of file compat.h.

◆ schar

typedef signed char schar

Definition at line 5 of file compat.h.

◆ size_t

typedef ulong size_t

Definition at line 19 of file compat.h.

◆ u16int

typedef unsigned short u16int

Definition at line 11 of file compat.h.

◆ u32int

typedef unsigned int u32int

Definition at line 13 of file compat.h.

◆ u64int

typedef unsigned long long u64int

Definition at line 15 of file compat.h.

◆ uchar

typedef unsigned char uchar

Definition at line 6 of file compat.h.

◆ uint

typedef unsigned int uint

Definition at line 7 of file compat.h.

◆ ulong

typedef unsigned long ulong

Definition at line 8 of file compat.h.

◆ uvlong

typedef unsigned long long uvlong

Definition at line 9 of file compat.h.

Function Documentation

◆ readn()

int readn ( void fd,
char buf,
ulong  len 
)

Definition at line 47 of file pe.c.

47  {
48  return RosSymReadFile(filectx, buffer, size);
49 }
#define RosSymReadFile(FileContext, Buffer, Size)
Definition: rossympriv.h:23
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919

◆ RosSymAllocMemZero()

void* RosSymAllocMemZero ( ulong  num,
ulong  size 
)

Definition at line 97 of file pe.c.

97  {
98  void *res = RosSymAllocMem(size * count);
99  if (res) memset(res, 0, size * count);
100  return res;
101 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define RosSymAllocMem(Size)
Definition: rossympriv.h:21
GLsizeiptr size
Definition: glext.h:5919
GLuint res
Definition: glext.h:9613
#define memset(x, y, z)
Definition: compat.h:39

◆ RosSymRealloc()

void* RosSymRealloc ( void mem,
ulong  newsize 
)

◆ seek()

int seek ( void fd,
ulong  off,
int  mode 
)

Definition at line 51 of file pe.c.

51  {
52  assert(origin == 0);
53  return RosSymSeekFile(filectx, position);
54 }
#define assert(x)
Definition: debug.h:53
voidpf uLong int origin
Definition: ioapi.h:142
#define RosSymSeekFile(FileContext, Position)
Definition: rossympriv.h:24

Referenced by all_renderers_seek(), BmpDecoder_ReadHeaders(), check_bom(), ConvertFromREFTIME(), ConvertToREFTIME(), fdi_decomp(), found_getposition(), found_setposition(), FoundCapabilities(), FoundDuration(), GdipLoadImageFromStream(), get_decoder_info(), GifDecoder_Initialize(), has_png_transparency_chunk(), IcoDecoder_GetFrame(), IcoDecoder_Initialize(), ImagingFactory_CreateDecoderFromStream(), load_emf(), load_wmf(), MCICDA_Seek(), MediaSeekingPassThru_CheckCapabilities(), MediaSeekingPassThru_ConvertTimeFormat(), MediaSeekingPassThru_GetAvailable(), MediaSeekingPassThru_GetCapabilities(), MediaSeekingPassThru_GetCurrentPosition(), MediaSeekingPassThru_GetDuration(), MediaSeekingPassThru_GetPositions(), MediaSeekingPassThru_GetPreroll(), MediaSeekingPassThru_GetRate(), MediaSeekingPassThru_GetStopPosition(), MediaSeekingPassThru_GetTimeFormat(), MediaSeekingPassThru_IsFormatSupported(), MediaSeekingPassThru_IsUsingTimeFormat(), MediaSeekingPassThru_QueryPreferredFormat(), MediaSeekingPassThru_SetPositions(), MediaSeekingPassThru_SetRate(), MediaSeekingPassThru_SetTimeFormat(), PropertyStorage_ReadFromStream(), PropertyStorage_WriteDictionaryToStream(), PropertyStorage_WriteHeadersToStream(), PropertyStorage_WritePropertyToStream(), PropertyStorage_WriteToStream(), ReadIcoDib(), TgaDecoder_Frame_CopyPalette(), TgaDecoder_Initialize(), and TgaDecoder_ReadImage().

◆ xfree()

void xfree ( void v)

Definition at line 758 of file uimain.c.

759 {
760  if (in != 0)
761  {
762  free(in);
763  }
764 }
#define free
Definition: debug_ros.c:5
GLuint in
Definition: glext.h:9616