Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

localrtl.c File Reference

#include <nt.h>
#include "localrtl.h"

Go to the source code of this file.

Defines

#define PATTERN   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define PATTERN_SIZE   (sizeof(PATTERN) - 1)

Functions

VOID FillPattern (PUCHAR To, ULONG Length)
ULONG LocalCompareMemory (PVOID Source1, PVOID Source2, ULONG Length)
ULONG LocalCompareMemoryUlong (PVOID Source, ULONG Length, ULONG Pattern)
VOID LocalMoveMemory (PVOID Destination, PVOID Source, ULONG Length)
VOID LocalFillMemory (PVOID Destination, ULONG Length, UCHAR Fill)
VOID LocalFillMemoryUlong (PVOID Destination, ULONG Length, ULONG Pattern)
VOID LocalZeroMemory (PVOID Destination, ULONG Length)

Variables

UCHAR Pattern [] = PATTERN


Define Documentation

#define PATTERN   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
 

Definition at line 30 of file localrtl.c.

Referenced by InnerGrayStringAorW().

#define PATTERN_SIZE   (sizeof(PATTERN) - 1)
 

Definition at line 31 of file localrtl.c.

Referenced by FillPattern().


Function Documentation

VOID FillPattern PUCHAR  To,
ULONG  Length
 

Definition at line 35 of file localrtl.c.

References Index, Pattern, and PATTERN_SIZE.

Referenced by main().

00036 { 00037 ULONG Index; 00038 ULONG Rotor = 0; 00039 00040 for (Index = 0; Index < Length; Index += 1) { 00041 To[Index] = Pattern[Rotor]; 00042 Rotor += 1; 00043 if (Rotor == PATTERN_SIZE) { 00044 Rotor = 0; 00045 } 00046 } 00047 }

ULONG LocalCompareMemory PVOID  Source1,
PVOID  Source2,
ULONG  Length
 

Definition at line 55 of file localrtl.c.

References Index, Source1, and Source2.

Referenced by main().

00060 { 00061 ULONG Index; 00062 PUCHAR Left = Source1; 00063 ULONG Match; 00064 PUCHAR Right = Source2; 00065 00066 Match = 0; 00067 for (Index = 0; Index < Length; Index += 1) { 00068 if (Left[Index] != Right[Index]) { 00069 break; 00070 } 00071 Match += 1; 00072 } 00073 return Match; 00074 }

ULONG LocalCompareMemoryUlong PVOID  Source,
ULONG  Length,
ULONG  Pattern
 

Definition at line 77 of file localrtl.c.

References Index, and Pattern.

00082 { 00083 PULONG From = Source; 00084 ULONG Index; 00085 ULONG Match; 00086 00087 Match = 0; 00088 for (Index = 0; Index < Length / sizeof(ULONG); Index += 1) { 00089 if (From[Index] != Pattern) { 00090 break; 00091 } 00092 Match += sizeof(ULONG); 00093 } 00094 return Match; 00095 }

VOID LocalFillMemory PVOID  Destination,
ULONG  Length,
UCHAR  Fill
 

Definition at line 119 of file localrtl.c.

References Index.

Referenced by main().

00124 { 00125 ULONG Index; 00126 PUCHAR To = Destination; 00127 00128 for (Index = 0; Index < Length; Index += 1) { 00129 To[Index] = Fill; 00130 } 00131 }

VOID LocalFillMemoryUlong PVOID  Destination,
ULONG  Length,
ULONG  Pattern
 

Definition at line 134 of file localrtl.c.

References Index, and Pattern.

00139 { 00140 ULONG Index; 00141 PULONG To = Destination; 00142 00143 for (Index = 0; Index < Length / sizeof(ULONG); Index += 1) { 00144 To[Index] = Pattern; 00145 } 00146 }

VOID LocalMoveMemory PVOID  Destination,
PVOID  Source,
ULONG  Length
 

Definition at line 98 of file localrtl.c.

References Index.

00103 { 00104 PUCHAR From = Source; 00105 ULONG Index; 00106 PUCHAR To = Destination; 00107 00108 for (Index = 0; Index < Length; Index += 1) { 00109 if (To <= From) { 00110 To[Index] = From[Index]; 00111 00112 } else { 00113 To[Length - 1 - Index] = From[Length - 1 - Index]; 00114 } 00115 } 00116 }

VOID LocalZeroMemory PVOID  Destination,
ULONG  Length
 

Definition at line 149 of file localrtl.c.

References Index.

Referenced by main().

00153 { 00154 ULONG Index; 00155 PUCHAR To = Destination; 00156 00157 for (Index = 0; Index < Length; Index += 1) { 00158 To[Index] = 0; 00159 } 00160 }


Variable Documentation

UCHAR Pattern[] = PATTERN
 

Definition at line 32 of file localrtl.c.

Referenced by CmpFindPattern(), FillPattern(), KdpSearchMemory(), LocalCompareMemoryUlong(), LocalFillMemoryUlong(), and RtlCompareMemoryUlong().


Generated on Sat May 15 19:44:33 2004 for test by doxygen 1.3.7