ReactOS  0.4.13-dev-563-g0561610
tools.h File Reference
#include <ntddk.h>
Include dependency graph for tools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  _FOUR_BYTE
 

Macros

#define FOUR_BYTE_DEFINED
 
#define WHICH_BIT(Data, Bit)
 
#define PAGE_MASK   (PAGE_SIZE-1)
 
#define ntohs(x)   ( (((USHORT)x[0])<<8) | x[1] )
 
#define PLAY_ACTIVE(DeviceExtension)   (((PCDROM_DATA)(DeviceExtension + 1))->PlayActive)
 
#define MSF_TO_LBA(Minutes, Seconds, Frames)   (ULONG)((60 * 75 * (Minutes)) + (75 * (Seconds)) + ((Frames) - 150))
 
#define LBA_TO_MSF(Lba, Minutes, Seconds, Frames)
 
#define DEC_TO_BCD(x)   (((x / 10) << 4) + (x % 10))
 
#define KdDump(a, b)   {}
 
#define DbgDumpRegTranslation(chan, idx)   {}
 
#define DbgAllocatePool(x, y)   ExAllocatePool(x,y)
 
#define DbgFreePool(x)   ExFreePool(x)
 
#define DbgAllocatePoolWithTag(a, b, c)   ExAllocatePoolWithTag(a,b,c)
 
#define BrutePoint()   {}
 
#define WAIT_FOR_XXX_EMU_DELAY   DEF_I64(5000000)
 
#define max(a, b)   (((a) > (b)) ? (a) : (b))
 
#define min(a, b)   (((a) < (b)) ? (a) : (b))
 
#define PtrOffset(BASE, OFFSET)   ((ULONG)((ULONG)(OFFSET) - (ULONG)(BASE)))
 
#define offsetof(type, field)   (ULONG)&(((type *)0)->field)
 

Typedefs

typedef struct _FOUR_BYTE FOUR_BYTE
 
typedef struct _FOUR_BYTEPFOUR_BYTE
 

Functions

__inline ULONG CountOfSetBitsUChar (UCHAR _X)
 
__inline ULONG CountOfSetBitsULong (ULONG _X)
 

Variables

UNICODE_STRING SavedSPString
 

Macro Definition Documentation

◆ BrutePoint

#define BrutePoint ( )    {}

Definition at line 141 of file tools.h.

◆ DbgAllocatePool

#define DbgAllocatePool (   x,
  y 
)    ExAllocatePool(x,y)

Definition at line 137 of file tools.h.

◆ DbgAllocatePoolWithTag

#define DbgAllocatePoolWithTag (   a,
  b,
  c 
)    ExAllocatePoolWithTag(a,b,c)

Definition at line 139 of file tools.h.

◆ DbgDumpRegTranslation

#define DbgDumpRegTranslation (   chan,
  idx 
)    {}

Definition at line 135 of file tools.h.

◆ DbgFreePool

#define DbgFreePool (   x)    ExFreePool(x)

Definition at line 138 of file tools.h.

◆ DEC_TO_BCD

#define DEC_TO_BCD (   x)    (((x / 10) << 4) + (x % 10))

Definition at line 100 of file tools.h.

◆ FOUR_BYTE_DEFINED

#define FOUR_BYTE_DEFINED

Definition at line 55 of file tools.h.

◆ KdDump

#define KdDump (   a,
  b 
)    {}

Definition at line 133 of file tools.h.

◆ LBA_TO_MSF

#define LBA_TO_MSF (   Lba,
  Minutes,
  Seconds,
  Frames 
)
Value:
{ \
(Minutes) = (UCHAR)(Lba / (60 * 75)); \
(Seconds) = (UCHAR)((Lba % (60 * 75)) / 75); \
(Frames) = (UCHAR)((Lba % (60 * 75)) % 75); \
}
unsigned char UCHAR
Definition: xmlstorage.h:181

Definition at line 94 of file tools.h.

◆ max

#define max (   a,
  b 
)    (((a) > (b)) ? (a) : (b))

Definition at line 156 of file tools.h.

◆ min

#define min (   a,
  b 
)    (((a) < (b)) ? (a) : (b))

Definition at line 160 of file tools.h.

◆ MSF_TO_LBA

#define MSF_TO_LBA (   Minutes,
  Seconds,
  Frames 
)    (ULONG)((60 * 75 * (Minutes)) + (75 * (Seconds)) + ((Frames) - 150))

Definition at line 92 of file tools.h.

◆ ntohs

#define ntohs (   x)    ( (((USHORT)x[0])<<8) | x[1] )

Definition at line 90 of file tools.h.

◆ offsetof

#define offsetof (   type,
  field 
)    (ULONG)&(((type *)0)->field)

Definition at line 198 of file tools.h.

◆ PAGE_MASK

#define PAGE_MASK   (PAGE_SIZE-1)

Definition at line 88 of file tools.h.

◆ PLAY_ACTIVE

#define PLAY_ACTIVE (   DeviceExtension)    (((PCDROM_DATA)(DeviceExtension + 1))->PlayActive)

Definition at line 91 of file tools.h.

◆ PtrOffset

#define PtrOffset (   BASE,
  OFFSET 
)    ((ULONG)((ULONG)(OFFSET) - (ULONG)(BASE)))

Definition at line 195 of file tools.h.

◆ WAIT_FOR_XXX_EMU_DELAY

#define WAIT_FOR_XXX_EMU_DELAY   DEF_I64(5000000)

Definition at line 147 of file tools.h.

◆ WHICH_BIT

#define WHICH_BIT (   Data,
  Bit 
)
Value:
{ \
for (Bit = 0; Bit < 32; Bit++) { \
if ((Data >> Bit) == 1) { \
break; \
} \
} \
}

Definition at line 80 of file tools.h.

Typedef Documentation

◆ FOUR_BYTE

◆ PFOUR_BYTE

Function Documentation

◆ CountOfSetBitsUChar()

__inline ULONG CountOfSetBitsUChar ( UCHAR  _X)

Definition at line 150 of file tools.h.

151 { ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define _X(x)
Definition: CString.cpp:210
unsigned int ULONG
Definition: retypes.h:1

Referenced by CdRomDeviceControlDispatch(), and ClasspInitializeGesn().

◆ CountOfSetBitsULong()

__inline ULONG CountOfSetBitsULong ( ULONG  _X)

Definition at line 152 of file tools.h.

153 { ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define _X(x)
Definition: CString.cpp:210
unsigned int ULONG
Definition: retypes.h:1

Variable Documentation

◆ SavedSPString

UNICODE_STRING SavedSPString