- changed InitializeObjectAttributes() from a function to a macro

- fixed STDCALL more issues
- changed some RtlLargeIntegerXxx functions to macros

svn path=/trunk/; revision=801
This commit is contained in:
Eric Kohl 1999-11-27 03:32:55 +00:00
parent c18e7f06ce
commit 8b829113cb
10 changed files with 529 additions and 612 deletions

View file

@ -1,4 +1,4 @@
/* $Id: rtl.h,v 1.18 1999/11/20 21:44:09 ekohl Exp $
/* $Id: rtl.h,v 1.19 1999/11/27 03:29:20 ekohl Exp $
*
*/
@ -122,6 +122,15 @@ extern BOOLEAN NLS_MB_OEM_CODE_PAGE_TAG;
/*
* VOID
* InitializeObjectAttributes (
* POBJECT_ATTRIBUTES InitializedAttributes,
* PUNICODE_STRING ObjectName,
* ULONG Attributes,
* HANDLE RootDirectory,
* PSECURITY_DESCRIPTOR SecurityDescriptor
* );
*
* FUNCTION: Sets up a parameter of type OBJECT_ATTRIBUTES for a
* subsequent call to ZwCreateXXX or ZwOpenXXX
* ARGUMENTS:
@ -132,14 +141,17 @@ extern BOOLEAN NLS_MB_OEM_CODE_PAGE_TAG;
* RootDirectory = Where the object should be placed or NULL
* SecurityDescriptor = Ignored
*/
VOID
InitializeObjectAttributes (
POBJECT_ATTRIBUTES InitializedAttributes,
PUNICODE_STRING ObjectName,
ULONG Attributes,
HANDLE RootDirectory,
PSECURITY_DESCRIPTOR SecurityDescriptor
);
#define InitializeObjectAttributes(p,n,a,r,s) \
{ \
(p)->Length = sizeof(OBJECT_ATTRIBUTES); \
(p)->ObjectName = n; \
(p)->Attributes = a; \
(p)->RootDirectory = r; \
(p)->SecurityDescriptor = s; \
(p)->SecurityQualityOfService = NULL; \
}
VOID
InitializeListHead (
@ -226,7 +238,7 @@ RtlAppendAsciizToString(
NTSTATUS
STDCALL
RtlAppendStringToString(
RtlAppendStringToString (
PSTRING Destination,
PSTRING Source
);
@ -285,11 +297,13 @@ RtlCompareUnicodeString (
);
LARGE_INTEGER
STDCALL
RtlConvertLongToLargeInteger (
LONG SignedInteger
);
LARGE_INTEGER
STDCALL
RtlConvertUlongToLargeInteger (
ULONG UnsignedInteger
);
@ -366,12 +380,14 @@ RtlDowncaseUnicodeString (
);
LARGE_INTEGER
STDCALL
RtlEnlargedIntegerMultiply (
LONG Multiplicand,
LONG Multiplier
);
ULONG
STDCALL
RtlEnlargedUnsignedDivide (
ULARGE_INTEGER Dividend,
ULONG Divisor,
@ -379,6 +395,7 @@ RtlEnlargedUnsignedDivide (
);
LARGE_INTEGER
STDCALL
RtlEnlargedUnsignedMultiply (
ULONG Multiplicand,
ULONG Multiplier
@ -408,12 +425,14 @@ RtlEraseUnicodeString (
);
LARGE_INTEGER
STDCALL
RtlExtendedIntegerMultiply (
LARGE_INTEGER Multiplicand,
LONG Multiplier
);
LARGE_INTEGER
STDCALL
RtlExtendedLargeIntegerDivide (
LARGE_INTEGER Dividend,
ULONG Divisor,
@ -421,6 +440,7 @@ RtlExtendedLargeIntegerDivide (
);
LARGE_INTEGER
STDCALL
RtlExtendedMagicDivide (
LARGE_INTEGER Dividend,
LARGE_INTEGER MagicDivisor,
@ -475,6 +495,16 @@ RtlInitAnsiString (
PCSZ SourceString
);
NTSTATUS
STDCALL
RtlInitializeContext (
IN HANDLE ProcessHandle,
IN PCONTEXT Context,
IN PVOID Parameter,
IN PTHREAD_START_ROUTINE StartAddress,
IN OUT PINITIAL_TEB InitialTeb
);
VOID
STDCALL
RtlInitString (
@ -507,115 +537,182 @@ RtlIntegerToUnicodeString (
);
LARGE_INTEGER
STDCALL
RtlLargeIntegerAdd (
LARGE_INTEGER Addend1,
LARGE_INTEGER Addend2
);
#define RtlLargeIntegerAnd(Result, Source, Mask) \
{ \
Result.HighPart = Source.HighPart & Mask.HighPart; \
Result.LowPart = Source.LowPart & Mask.LowPart; \
}
/*
VOID
RtlLargeIntegerAnd (
PLARGE_INTEGER Result,
LARGE_INTEGER Source,
LARGE_INTEGER Mask
);
*/
LARGE_INTEGER
STDCALL
RtlLargeIntegerArithmeticShift (
LARGE_INTEGER LargeInteger,
CCHAR ShiftCount
);
LARGE_INTEGER
STDCALL
RtlLargeIntegerDivide (
LARGE_INTEGER Dividend,
LARGE_INTEGER Divisor,
PLARGE_INTEGER Remainder
);
#define RtlLargeIntegerEqualTo(X,Y) \
(!(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
/*
BOOLEAN
RtlLargeIntegerEqualTo (
LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2
);
*/
#define RtlLargeIntegerEqualToZero(X) \
(!((X).LowPart | (X).HighPart))
/*
BOOLEAN
RtlLargeIntegerEqualToZero (
LARGE_INTEGER Operand
);
*/
#define RtlLargeIntegerGreaterThan(X,Y) \
((((X).HighPart == (Y).HighPart) && ((X).LowPart > (Y).LowPart)) || \
((X).HighPart > (Y).HighPart))
/*
BOOLEAN
RtlLargeIntegerGreaterThan (
LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2
);
*/
#define RtlLargeIntegerGreaterThanOrEqualTo(X,Y) \
((((X).HighPart == (Y).HighPart) && ((X).LowPart >= (Y).LowPart)) || \
((X).HighPart > (Y).HighPart))
/*
BOOLEAN
RtlLargeIntegerGreaterThanOrEqualTo (
LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2
);
*/
#define RtlLargeIntegerGreaterOrEqualToZero(X) \
((X).HighPart >= 0)
/*
BOOLEAN
RtlLargeIntegerGreaterThanOrEqualToZero (
LARGE_INTEGER Operand1
);
*/
#define RtlLargeIntegerGreaterThanZero(X) \
((((X).HighPart == 0) && ((X).LowPart > 0)) || \
((X).HighPart > 0 ))
/*
BOOLEAN
RtlLargeIntegerGreaterThanZero (
LARGE_INTEGER Operand1
);
*/
#define RtlLargeIntegerLessThan(X,Y) \
((((X).HighPart == (Y).HighPart) && ((X).LowPart < (Y).LowPart)) || \
((X).HighPart < (Y).HighPart))
/*
BOOLEAN
RtlLargeIntegerLessThan (
LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2
);
*/
#define RtlLargeIntegerLessThanOrEqualTo(X,Y) \
((((X).HighPart == (Y).HighPart) && ((X).LowPart <= (Y).LowPart)) || \
((X).HighPart < (Y).HighPart))
/*
BOOLEAN
RtlLargeIntegerLessThanOrEqualTo (
LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2
);
*/
#define RtlLargeIntegerLessOrEqualToZero(X) \
(((X).HighPart < 0) || !((X).LowPart | (X).HighPart))
/*
BOOLEAN
RtlLargeIntegerLessThanOrEqualToZero (
LARGE_INTEGER Operand
);
*/
#define RtlLargeIntegerLessThanZero(X) \
(((X).HighPart < 0))
/*
BOOLEAN
RtlLargeIntegerLessThanZero (
LARGE_INTEGER Operand
);
*/
LARGE_INTEGER
STDCALL
RtlLargeIntegerNegate (
LARGE_INTEGER Subtrahend
);
#define RtlLargeIntegerNotEqualTo(X,Y) \
((((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
/*
BOOLEAN
RtlLargeIntegerNotEqualTo (
LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2
);
*/
#define RtlLargeIntegerNotEqualToZero(X) \
(((X).LowPart | (X).HighPart))
/*
BOOLEAN
RtlLargeIntegerNotEqualToZero (
LARGE_INTEGER Operand
);
*/
LARGE_INTEGER
STDCALL
RtlLargeIntegerShiftLeft (
LARGE_INTEGER LargeInteger,
CCHAR ShiftCount
);
LARGE_INTEGER
STDCALL
RtlLargeIntegerShiftRight (
LARGE_INTEGER LargeInteger,
CCHAR ShiftCount
);
LARGE_INTEGER
STDCALL
RtlLargeIntegerSubtract (
LARGE_INTEGER Minuend,
LARGE_INTEGER Subtrahend
@ -934,7 +1031,7 @@ RtlNtStatusToDosError (
BOOL
WINAPI
STDCALL
RtlDestroyHeap (
HANDLE hheap
);
@ -949,11 +1046,11 @@ RtlReAllocateHeap (
);
HANDLE
WINAPI
STDCALL
RtlGetProcessHeap (VOID);
BOOL
WINAPI
STDCALL
RtlLockHeap (
HANDLE hheap
);
@ -987,6 +1084,31 @@ RtlValidateHeap (
PVOID pmem
);
ULONG
STDCALL
RtlxAnsiStringToUnicodeSize (
IN PANSI_STRING AnsiString
);
ULONG
STDCALL
RtlxOemStringToUnicodeSize (
IN POEM_STRING OemString
);
ULONG
STDCALL
RtlxUnicodeStringToAnsiSize (
IN PUNICODE_STRING UnicodeString
);
ULONG
STDCALL
RtlxUnicodeStringToOemSize (
IN PUNICODE_STRING UnicodeString
);
/* NtProcessStartup */
VOID
@ -1001,14 +1123,6 @@ RtlDenormalizeProcessParams (
);
NTSTATUS STDCALL
RtlInitializeContext(
IN HANDLE ProcessHandle,
IN PCONTEXT Context,
IN PVOID Parameter,
IN PTHREAD_START_ROUTINE StartAddress,
IN OUT PINITIAL_TEB InitialTeb
);
NTSTATUS STDCALL

View file

@ -1,11 +1,10 @@
; $Id: ntdll.def,v 1.24 1999/11/25 23:45:29 ekohl Exp $
; $Id: ntdll.def,v 1.25 1999/11/27 03:32:17 ekohl Exp $
;
; ReactOS Operating System
;
LIBRARY ntdll.dll
EXPORTS
InitializeObjectAttributes
NlsAnsiCodePage
NlsMbCodePageTag
NlsMbOemCodePageTag
@ -446,21 +445,21 @@ RtlCreateUserThread@40
RtlCompactHeap@8
RtlCompareString@12
RtlCompareUnicodeString@12
RtlConvertLongToLargeInteger
RtlConvertUlongToLargeInteger
RtlConvertLongToLargeInteger@4
RtlConvertUlongToLargeInteger@4
RtlCopyString@8
RtlCopyUnicodeString@8
RtlDestroyHeap@4
RtlDowncaseUnicodeString@12
RtlEnlargedIntegerMultiply
RtlEnlargedUnsignedDivide
RtlEnlargedUnsignedMultiply
RtlEnlargedIntegerMultiply@8
RtlEnlargedUnsignedDivide@16
RtlEnlargedUnsignedMultiply@8
RtlEqualString@12
RtlEqualUnicodeString@12
RtlEraseUnicodeString@4
RtlExtendedIntegerMultiply
RtlExtendedLargeIntegerDivide
RtlExtendedMagicDivide
RtlExtendedIntegerMultiply@12
RtlExtendedLargeIntegerDivide@16
RtlExtendedMagicDivide@20
RtlFillMemory@12
RtlFreeAnsiString@4
RtlFreeHeap@12
@ -473,13 +472,13 @@ RtlInitString@8
RtlInitUnicodeString@8
RtlIntegerToChar@16
RtlIntegerToUnicodeString@12
RtlLargeIntegerAdd
RtlLargeIntegerArithmeticShift
RtlLargeIntegerDivide
RtlLargeIntegerNegate
RtlLargeIntegerShiftLeft
RtlLargeIntegerShiftRight
RtlLargeIntegerSubtract
RtlLargeIntegerAdd@16
RtlLargeIntegerArithmeticShift@12
RtlLargeIntegerDivide@20
RtlLargeIntegerNegate@8
RtlLargeIntegerShiftLeft@12
RtlLargeIntegerShiftRight@12
RtlLargeIntegerSubtract@16
RtlLengthSecurityDescriptor
RtlLockHeap@4
RtlMoveMemory@12

View file

@ -1,11 +1,10 @@
; $Id: ntdll.edf,v 1.14 1999/11/25 23:45:30 ekohl Exp $
; $Id: ntdll.edf,v 1.15 1999/11/27 03:32:17 ekohl Exp $
;
; ReactOS Operating System
;
LIBRARY ntdll.dll
EXPORTS
InitializeObjectAttributes
NlsAnsiCodePage
NlsMbCodePageTag
NlsMbOemCodePageTag
@ -444,21 +443,21 @@ RtlCreateUserThread=RtlCreateUserThread@40
RtlCompactHeap=RtlCompactHeap@8
RtlCompareString=RtlCompareString@12
RtlCompareUnicodeString=RtlCompareUnicodeString@12
RtlConvertLongToLargeInteger
RtlConvertUlongToLargeInteger
RtlConvertLongToLargeInteger=RtlConvertLongToLargeInteger@4
RtlConvertUlongToLargeInteger=RtlConvertUlongToLargeInteger@4
RtlCopyString=RtlCopyString@8
RtlCopyUnicodeString=RtlCopyUnicodeString@8
RtlDestroyHeap=RtlDestroyHeap@4
RtlDowncaseUnicodeString=RtlDowncaseUnicodeString@12
RtlEnlargedIntegerMultiply
RtlEnlargedUnsignedDivide
RtlEnlargedUnsignedMultiply
RtlEnlargedIntegerMultiply=RtlEnlargedIntegerMultiply@8
RtlEnlargedUnsignedDivide=RtlEnlargedUnsignedDivide@16
RtlEnlargedUnsignedMultiply=RtlEnlargedUnsignedMultiply@8
RtlEqualString=RtlEqualString@12
RtlEqualUnicodeString=RtlEqualUnicodeString@12
RtlEraseUnicodeString=RtlEraseUnicodeString@4
RtlExtendedIntegerMultiply
RtlExtendedLargeIntegerDivide
RtlExtendedMagicDivide
RtlExtendedIntegerMultiply=RtlExtendedIntegerMultiply@12
RtlExtendedLargeIntegerDivide=RtlExtendedLargeIntegerDivide@16
RtlExtendedMagicDivide=RtlExtendedMagicDivide@20
RtlFillMemory=RtlFillMemory@12
RtlFreeAnsiString=RtlFreeAnsiString@4
RtlFreeHeap=RtlFreeHeap@12
@ -470,13 +469,13 @@ RtlInitString=RtlInitString@8
RtlInitUnicodeString=RtlInitUnicodeString@8
RtlIntegerToChar=RtlIntegerToChar@16
RtlIntegerToUnicodeString=RtlIntegerToUnicodeString@12
RtlLargeIntegerAdd
RtlLargeIntegerArithmeticShift
RtlLargeIntegerDivide
RtlLargeIntegerNegate
RtlLargeIntegerShiftLeft
RtlLargeIntegerShiftRight
RtlLargeIntegerSubtract
RtlLargeIntegerAdd=RtlLargeIntegerAdd@16
RtlLargeIntegerArithmeticShift=RtlLargeIntegerArithmeticShift@12
RtlLargeIntegerDivide=RtlLargeIntegerDivide@20
RtlLargeIntegerNegate=RtlLargeIntegerNegate@8
RtlLargeIntegerShiftLeft=RtlLargeIntegerShiftLeft@12
RtlLargeIntegerShiftRight=RtlLargeIntegerShiftRight@12
RtlLargeIntegerSubtract=RtlLargeIntegerSubtract@16
RtlLengthSecurityDescriptor
RtlLockHeap=RtlLockHeap@4
RtlMoveMemory=RtlMoveMemory@12

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.26 1999/11/15 15:57:27 ekohl Exp $
# $Id: makefile,v 1.27 1999/11/27 03:31:43 ekohl Exp $
#
# ReactOS Operating System
#
@ -24,8 +24,8 @@ endif
all: $(DLLTARGET)
RTL_OBJECTS = rtl/critical.o rtl/error.o rtl/heap.o rtl/largeint.o \
rtl/mem.o rtl/namespc.o rtl/security.o rtl/unicode.o \
rtl/thread.o rtl/process.o rtl/nls.o
rtl/mem.o rtl/nls.o rtl/process.o rtl/security.o \
rtl/thread.o rtl/unicode.o
STDLIB_OBJECTS = stdlib/atoi.o stdlib/atol.o stdlib/splitp.o \
stdlib/strtol.o stdlib/strtoul.o

View file

@ -1,4 +1,4 @@
/* $Id: largeint.c,v 1.6 1999/11/15 16:00:19 ekohl Exp $
/* $Id: largeint.c,v 1.7 1999/11/27 03:32:55 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -20,7 +20,10 @@
/* FUNCTIONS *****************************************************************/
LARGE_INTEGER
RtlConvertLongToLargeInteger(LONG SignedInteger)
STDCALL
RtlConvertLongToLargeInteger (
LONG SignedInteger
)
{
LARGE_INTEGER RC;
@ -30,7 +33,10 @@ RtlConvertLongToLargeInteger(LONG SignedInteger)
}
LARGE_INTEGER
RtlConvertUlongToLargeInteger(ULONG UnsignedInteger)
STDCALL
RtlConvertUlongToLargeInteger (
ULONG UnsignedInteger
)
{
LARGE_INTEGER RC;
@ -40,8 +46,11 @@ RtlConvertUlongToLargeInteger(ULONG UnsignedInteger)
}
LARGE_INTEGER
RtlEnlargedIntegerMultiply(LONG Multiplicand,
LONG Multiplier)
STDCALL
RtlEnlargedIntegerMultiply (
LONG Multiplicand,
LONG Multiplier
)
{
LARGE_INTEGER RC;
@ -51,9 +60,12 @@ RtlEnlargedIntegerMultiply(LONG Multiplicand,
}
ULONG
RtlEnlargedUnsignedDivide(ULARGE_INTEGER Dividend,
STDCALL
RtlEnlargedUnsignedDivide (
ULARGE_INTEGER Dividend,
ULONG Divisor,
PULONG Remainder)
PULONG Remainder
)
{
if (Remainder)
*Remainder = Dividend.QuadPart % Divisor;
@ -62,8 +74,11 @@ RtlEnlargedUnsignedDivide(ULARGE_INTEGER Dividend,
}
LARGE_INTEGER
RtlEnlargedUnsignedMultiply(ULONG Multiplicand,
ULONG Multiplier)
STDCALL
RtlEnlargedUnsignedMultiply (
ULONG Multiplicand,
ULONG Multiplier
)
{
LARGE_INTEGER RC;
@ -73,8 +88,11 @@ RtlEnlargedUnsignedMultiply(ULONG Multiplicand,
}
LARGE_INTEGER
RtlExtendedIntegerMultiply(LARGE_INTEGER Multiplicand,
LONG Multiplier)
STDCALL
RtlExtendedIntegerMultiply (
LARGE_INTEGER Multiplicand,
LONG Multiplier
)
{
LARGE_INTEGER RC;
@ -84,9 +102,12 @@ RtlExtendedIntegerMultiply(LARGE_INTEGER Multiplicand,
}
LARGE_INTEGER
RtlExtendedLargeIntegerDivide(LARGE_INTEGER Dividend,
STDCALL
RtlExtendedLargeIntegerDivide (
LARGE_INTEGER Dividend,
ULONG Divisor,
PULONG Remainder)
PULONG Remainder
)
{
LARGE_INTEGER RC;
@ -99,16 +120,22 @@ RtlExtendedLargeIntegerDivide(LARGE_INTEGER Dividend,
}
LARGE_INTEGER
RtlExtendedMagicDivide(LARGE_INTEGER Dividend,
STDCALL
RtlExtendedMagicDivide (
LARGE_INTEGER Dividend,
LARGE_INTEGER MagicDivisor,
CCHAR ShiftCount)
CCHAR ShiftCount
)
{
UNIMPLEMENTED;
}
LARGE_INTEGER
RtlLargeIntegerAdd(LARGE_INTEGER Addend1,
LARGE_INTEGER Addend2)
STDCALL
RtlLargeIntegerAdd (
LARGE_INTEGER Addend1,
LARGE_INTEGER Addend2
)
{
LARGE_INTEGER RC;
@ -117,17 +144,12 @@ RtlLargeIntegerAdd(LARGE_INTEGER Addend1,
return RC;
}
VOID
RtlLargeIntegerAnd(PLARGE_INTEGER Result,
LARGE_INTEGER Source,
LARGE_INTEGER Mask)
{
Result->QuadPart = Source.QuadPart & Mask.QuadPart;
}
LARGE_INTEGER
RtlLargeIntegerArithmeticShift(LARGE_INTEGER LargeInteger,
CCHAR ShiftCount)
STDCALL
RtlLargeIntegerArithmeticShift (
LARGE_INTEGER LargeInteger,
CCHAR ShiftCount
)
{
LARGE_INTEGER RC;
CHAR Shift;
@ -149,88 +171,28 @@ RtlLargeIntegerArithmeticShift(LARGE_INTEGER LargeInteger,
}
LARGE_INTEGER
RtlLargeIntegerDivide(LARGE_INTEGER Dividend,
STDCALL
RtlLargeIntegerDivide (
LARGE_INTEGER Dividend,
LARGE_INTEGER Divisor,
PLARGE_INTEGER Remainder)
PLARGE_INTEGER Remainder
)
{
LARGE_INTEGER RC;
if (Remainder)
Remainder->QuadPart = Dividend.QuadPart % Divisor.QuadPart;
RC.QuadPart = Dividend.QuadPart / Divisor.QuadPart;
return RC;
}
BOOLEAN
RtlLargeIntegerEqualTo(LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2)
{
return Operand1.QuadPart == Operand2.QuadPart;
}
BOOLEAN
RtlLargeIntegerEqualToZero(LARGE_INTEGER Operand)
{
return Operand.QuadPart == 0 ;
}
BOOLEAN
RtlLargeIntegerGreaterThan(LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2)
{
return Operand1.QuadPart > Operand2.QuadPart;
}
BOOLEAN
RtlLargeIntegerGreaterThanOrEqualTo(LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2)
{
return Operand1.QuadPart >= Operand2.QuadPart;
}
BOOLEAN
RtlLargeIntegerGreaterThanOrEqualToZero(LARGE_INTEGER Operand1)
{
return Operand1.QuadPart > 0;
}
BOOLEAN
RtlLargeIntegerGreaterThanZero(LARGE_INTEGER Operand1)
{
return Operand1.QuadPart >= 0;
}
BOOLEAN
RtlLargeIntegerLessThan(LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2)
{
return Operand1.QuadPart < Operand2.QuadPart;
}
BOOLEAN
RtlLargeIntegerLessThanOrEqualTo(LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2)
{
return Operand1.QuadPart <= Operand2.QuadPart;
}
BOOLEAN
RtlLargeIntegerLessThanOrEqualToZero(LARGE_INTEGER Operand)
{
return Operand.QuadPart <= 0;
}
BOOLEAN
RtlLargeIntegerLessThanZero(LARGE_INTEGER Operand)
{
return Operand.QuadPart < 0;
}
LARGE_INTEGER
RtlLargeIntegerNegate(LARGE_INTEGER Subtrahend)
STDCALL
RtlLargeIntegerNegate (
LARGE_INTEGER Subtrahend
)
{
LARGE_INTEGER RC;
@ -239,50 +201,44 @@ RtlLargeIntegerNegate(LARGE_INTEGER Subtrahend)
return RC;
}
BOOLEAN
RtlLargeIntegerNotEqualTo(LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2)
{
return Operand1.QuadPart != Operand2.QuadPart;
}
BOOLEAN
RtlLargeIntegerNotEqualToZero(LARGE_INTEGER Operand)
{
return Operand.QuadPart != 0;
}
LARGE_INTEGER
RtlLargeIntegerShiftLeft(LARGE_INTEGER LargeInteger,
CCHAR ShiftCount)
STDCALL
RtlLargeIntegerShiftLeft (
LARGE_INTEGER LargeInteger,
CCHAR ShiftCount
)
{
LARGE_INTEGER RC;
CCHAR Shift;
Shift = ShiftCount % 64;
RC.QuadPart = LargeInteger.QuadPart << Shift;
return RC;
}
LARGE_INTEGER
RtlLargeIntegerShiftRight(LARGE_INTEGER LargeInteger,
CCHAR ShiftCount)
STDCALL
RtlLargeIntegerShiftRight (
LARGE_INTEGER LargeInteger,
CCHAR ShiftCount
)
{
LARGE_INTEGER RC;
CCHAR Shift;
Shift = ShiftCount % 64;
RC.QuadPart = LargeInteger.QuadPart >> Shift;
return RC;
}
LARGE_INTEGER
RtlLargeIntegerSubtract(LARGE_INTEGER Minuend,
LARGE_INTEGER Subtrahend)
STDCALL
RtlLargeIntegerSubtract (
LARGE_INTEGER Minuend,
LARGE_INTEGER Subtrahend
)
{
LARGE_INTEGER RC;

View file

@ -1,47 +0,0 @@
/* $Id: namespc.c,v 1.2 1999/09/29 23:10:25 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/lib/ntdll/namespc.c
* PURPOSE: Manages the system namespace
* PROGRAMMER: David Welch (welch@mcmail.com)
* UPDATE HISTORY:
* 24/12/98: Created
*/
/* INCLUDES ***************************************************************/
#include <ddk/ntddk.h>
/* FUNCTIONS **************************************************************/
VOID InitializeObjectAttributes(POBJECT_ATTRIBUTES InitializedAttributes,
PUNICODE_STRING ObjectName,
ULONG Attributes,
HANDLE RootDirectory,
PSECURITY_DESCRIPTOR SecurityDescriptor)
/*
* FUNCTION: Sets up a parameter of type OBJECT_ATTRIBUTES for a
* subsequent call to ZwCreateXXX or ZwOpenXXX
* ARGUMENTS:
* InitializedAttributes (OUT) = Caller supplied storage for the
* object attributes
* ObjectName = Full path name for object
* Attributes = Attributes for the object
* RootDirectory = Where the object should be placed or NULL
* SecurityDescriptor = Ignored
*
* NOTE:
* Either ObjectName is a fully qualified pathname or a path relative
* to RootDirectory
*/
{
InitializedAttributes->Length=sizeof(OBJECT_ATTRIBUTES);
InitializedAttributes->RootDirectory=RootDirectory;
InitializedAttributes->ObjectName=ObjectName;
InitializedAttributes->Attributes=Attributes;
InitializedAttributes->SecurityDescriptor=SecurityDescriptor;
InitializedAttributes->SecurityQualityOfService=NULL;
}
/* EOF */

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.def,v 1.28 1999/11/25 23:35:24 ekohl Exp $
; $Id: ntoskrnl.def,v 1.29 1999/11/27 03:29:46 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -74,7 +74,7 @@ ExReleaseResourceForThreadLite
ExSystemTimeToLocalTime
ExTryToAcquireResourceExclusiveLite
HalRegisterServiceTable
InitializeObjectAttributes
;InitializeObjectAttributes
IoAllocateController
IoAttachDeviceToDeviceStack
IoBuildSynchronousFsdRequest
@ -185,21 +185,21 @@ RtlCharToInteger@12
RtlCompareMemory@12
RtlCompareString@12
RtlCompareUnicodeString@12
RtlConvertLongToLargeInteger
RtlConvertUlongToLargeInteger
RtlConvertLongToLargeInteger@4
RtlConvertUlongToLargeInteger@4
RtlCopyMemory
RtlCopyString@8
RtlCopyUnicodeString@8
RtlCreateUnicodeString@8
RtlDowncaseUnicodeString@12
RtlEnlargedIntegerMultiply
RtlEnlargedUnsignedDivide
RtlEnlargedUnsignedMultiply
RtlEnlargedIntegerMultiply@8
RtlEnlargedUnsignedDivide@16
RtlEnlargedUnsignedMultiply@8
RtlEqualString@12
RtlEqualUnicodeString@12
RtlExtendedIntegerMultiply
RtlExtendedLargeIntegerDivide
RtlExtendedMagicDivide
RtlExtendedIntegerMultiply@12
RtlExtendedLargeIntegerDivide@16
RtlExtendedMagicDivide@20
RtlFillMemory@12
RtlFillMemoryUlong@12
RtlFreeAnsiString@4
@ -211,13 +211,13 @@ RtlInitString@8
RtlInitUnicodeString@8
RtlIntegerToChar@16
RtlIntegerToUnicodeString@12
RtlLargeIntegerAdd
RtlLargeIntegerArithmeticShift
RtlLargeIntegerDivide
RtlLargeIntegerNegate
RtlLargeIntegerShiftLeft
RtlLargeIntegerShiftRight
RtlLargeIntegerSubtract
RtlLargeIntegerAdd@16
RtlLargeIntegerArithmeticShift@12
RtlLargeIntegerDivide@20
RtlLargeIntegerNegate@8
RtlLargeIntegerShiftLeft@12
RtlLargeIntegerShiftRight@12
RtlLargeIntegerSubtract@16
RtlMoveMemory@12
RtlMultiByteToUnicodeN@20
RtlMultiByteToUnicodeSize@12
@ -359,8 +359,8 @@ _wcsnicmp
_wcsnset
_wcsrev
_wcsupr
;atoi
;atol
atoi
atol
isdigit
islower
isprint

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.edf,v 1.15 1999/11/25 23:35:24 ekohl Exp $
; $Id: ntoskrnl.edf,v 1.16 1999/11/27 03:29:46 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -74,7 +74,7 @@ ExReleaseResourceForThreadLite
ExSystemTimeToLocalTime
ExTryToAcquireResourceExclusiveLite
HalRegisterServiceTable
InitializeObjectAttributes
;InitializeObjectAttributes
IoAllocateController
IoAttachDeviceToDeviceStack
IoBuildSynchronousFsdRequest
@ -185,21 +185,21 @@ RtlCharToInteger=RtlCharToInteger@12
RtlCompareMemory=RtlCompareMemory@12
RtlCompareString=RtlCompareString@12
RtlCompareUnicodeString=RtlCompareUnicodeString@12
RtlConvertLongToLargeInteger
RtlConvertUlongToLargeInteger
RtlConvertLongToLargeInteger=RtlConvertLongToLargeInteger@4
RtlConvertUlongToLargeInteger=RtlConvertUlongToLargeInteger@4
RtlCopyMemory
RtlCopyString=RtlCopyString@8
RtlCopyUnicodeString=RtlCopyUnicodeString@8
RtlCreateUnicodeString=RtlCreateUnicodeString@8
RtlDowncaseUnicodeString=RtlDowncaseUnicodeString@12
RtlEnlargedIntegerMultiply
RtlEnlargedUnsignedDivide
RtlEnlargedUnsignedMultiply
RtlEnlargedIntegerMultiply=RtlEnlargedIntegerMultiply@8
RtlEnlargedUnsignedDivide=RtlEnlargedUnsignedDivide@16
RtlEnlargedUnsignedMultiply=RtlEnlargedUnsignedMultiply@8
RtlEqualString=RtlEqualString@12
RtlEqualUnicodeString=RtlEqualUnicodeString@12
RtlExtendedIntegerMultiply
RtlExtendedLargeIntegerDivide
RtlExtendedMagicDivide
RtlExtendedIntegerMultiply=RtlExtendedIntegerMultiply@12
RtlExtendedLargeIntegerDivide=RtlExtendedLargeIntegerDivide@16
RtlExtendedMagicDivide=RtlExtendedMagicDivide@20
RtlFillMemory=RtlFillMemory@12
RtlFillMemoryUlong=RtlFillMemoryUlong@12
RtlFreeAnsiString=RtlFreeAnsiString@4
@ -211,13 +211,13 @@ RtlInitString=RtlInitString@8
RtlInitUnicodeString=RtlInitUnicodeString@8
RtlIntegerToChar=RtlIntegerToChar@16
RtlIntegerToUnicodeString=RtlIntegerToUnicodeString@12
RtlLargeIntegerAdd
RtlLargeIntegerArithmeticShift
RtlLargeIntegerDivide
RtlLargeIntegerNegate
RtlLargeIntegerShiftLeft
RtlLargeIntegerShiftRight
RtlLargeIntegerSubtract
RtlLargeIntegerAdd=RtlLargeIntegerAdd@16
RtlLargeIntegerArithmeticShift=RtlLargeIntegerArithmeticShift@12
RtlLargeIntegerDivide=RtlLargeIntegerDivide@20
RtlLargeIntegerNegate=RtlLargeIntegerNegate@8
RtlLargeIntegerShiftLeft=RtlLargeIntegerShiftLeft@12
RtlLargeIntegerShiftRight=RtlLargeIntegerShiftRight@12
RtlLargeIntegerSubtract=RtlLargeIntegerSubtract@16
RtlMoveMemory=RtlMoveMemory@12
RtlMultiByteToUnicodeN=RtlMultiByteToUnicodeN@20
RtlMultiByteToUnicodeSize=RtlMultiByteToUnicodeSize@12
@ -357,8 +357,8 @@ _wcsnicmp
_wcsnset
_wcsrev
_wcsupr
;atoi
;atol
atoi
atol
isdigit
islower
isprint

View file

@ -1,4 +1,4 @@
/* $Id: dirobj.c,v 1.5 1999/08/29 06:59:10 ea Exp $
/* $Id: dirobj.c,v 1.6 1999/11/27 03:31:08 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -295,65 +295,4 @@ NtCreateDirectoryObject (
return STATUS_SUCCESS;
}
/**********************************************************************
* NAME (MACRO in DDK)
* InitializeObjectAttributes
*
* DESCRIPTION
* Sets up a parameter of type OBJECT_ATTRIBUTES for a
* subsequent call to ZwCreateXXX or ZwOpenXXX.
*
* ARGUMENTS
* InitializedAttributes (OUT)
* Caller supplied storage for the object attributes.
*
* ObjectName
* Full path name for object.
*
* Attributes
* Attributes for the object.
*
* RootDirectory
* Where the object should be placed or NULL.
*
* SecurityDescriptor
* Ignored.
*
* NOTE
* Either ObjectName is a fully qualified pathname or a path
* relative to RootDirectory.
*/
VOID
InitializeObjectAttributes (
POBJECT_ATTRIBUTES InitializedAttributes,
PUNICODE_STRING ObjectName,
ULONG Attributes,
HANDLE RootDirectory,
PSECURITY_DESCRIPTOR SecurityDescriptor
)
{
DPRINT(
"InitializeObjectAttributes(InitializedAttributes %x "
"ObjectName %x Attributes %x RootDirectory %x)\n",
InitializedAttributes,
ObjectName,
Attributes,
RootDirectory
);
InitializedAttributes->Length =
sizeof (OBJECT_ATTRIBUTES);
InitializedAttributes->RootDirectory =
RootDirectory;
InitializedAttributes->ObjectName =
ObjectName;
InitializedAttributes->Attributes =
Attributes;
InitializedAttributes->SecurityDescriptor =
SecurityDescriptor;
InitializedAttributes->SecurityQualityOfService =
NULL;
}
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: largeint.c,v 1.8 1999/11/09 18:01:43 ekohl Exp $
/* $Id: largeint.c,v 1.9 1999/11/27 03:31:20 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -20,7 +20,10 @@
/* FUNCTIONS *****************************************************************/
LARGE_INTEGER
RtlConvertLongToLargeInteger(LONG SignedInteger)
STDCALL
RtlConvertLongToLargeInteger (
LONG SignedInteger
)
{
LARGE_INTEGER RC;
@ -30,7 +33,10 @@ RtlConvertLongToLargeInteger(LONG SignedInteger)
}
LARGE_INTEGER
RtlConvertUlongToLargeInteger(ULONG UnsignedInteger)
STDCALL
RtlConvertUlongToLargeInteger (
ULONG UnsignedInteger
)
{
LARGE_INTEGER RC;
@ -40,8 +46,11 @@ RtlConvertUlongToLargeInteger(ULONG UnsignedInteger)
}
LARGE_INTEGER
RtlEnlargedIntegerMultiply(LONG Multiplicand,
LONG Multiplier)
STDCALL
RtlEnlargedIntegerMultiply (
LONG Multiplicand,
LONG Multiplier
)
{
LARGE_INTEGER RC;
@ -51,9 +60,12 @@ RtlEnlargedIntegerMultiply(LONG Multiplicand,
}
ULONG
RtlEnlargedUnsignedDivide(ULARGE_INTEGER Dividend,
STDCALL
RtlEnlargedUnsignedDivide (
ULARGE_INTEGER Dividend,
ULONG Divisor,
PULONG Remainder)
PULONG Remainder
)
{
if (Remainder)
*Remainder = Dividend.QuadPart % Divisor;
@ -62,8 +74,11 @@ RtlEnlargedUnsignedDivide(ULARGE_INTEGER Dividend,
}
LARGE_INTEGER
RtlEnlargedUnsignedMultiply(ULONG Multiplicand,
ULONG Multiplier)
STDCALL
RtlEnlargedUnsignedMultiply (
ULONG Multiplicand,
ULONG Multiplier
)
{
LARGE_INTEGER RC;
@ -73,8 +88,11 @@ RtlEnlargedUnsignedMultiply(ULONG Multiplicand,
}
LARGE_INTEGER
RtlExtendedIntegerMultiply(LARGE_INTEGER Multiplicand,
LONG Multiplier)
STDCALL
RtlExtendedIntegerMultiply (
LARGE_INTEGER Multiplicand,
LONG Multiplier
)
{
LARGE_INTEGER RC;
@ -84,9 +102,12 @@ RtlExtendedIntegerMultiply(LARGE_INTEGER Multiplicand,
}
LARGE_INTEGER
RtlExtendedLargeIntegerDivide(LARGE_INTEGER Dividend,
STDCALL
RtlExtendedLargeIntegerDivide (
LARGE_INTEGER Dividend,
ULONG Divisor,
PULONG Remainder)
PULONG Remainder
)
{
LARGE_INTEGER RC;
@ -99,16 +120,22 @@ RtlExtendedLargeIntegerDivide(LARGE_INTEGER Dividend,
}
LARGE_INTEGER
RtlExtendedMagicDivide(LARGE_INTEGER Dividend,
STDCALL
RtlExtendedMagicDivide (
LARGE_INTEGER Dividend,
LARGE_INTEGER MagicDivisor,
CCHAR ShiftCount)
CCHAR ShiftCount
)
{
UNIMPLEMENTED;
}
LARGE_INTEGER
RtlLargeIntegerAdd(LARGE_INTEGER Addend1,
LARGE_INTEGER Addend2)
STDCALL
RtlLargeIntegerAdd (
LARGE_INTEGER Addend1,
LARGE_INTEGER Addend2
)
{
LARGE_INTEGER RC;
@ -117,17 +144,12 @@ RtlLargeIntegerAdd(LARGE_INTEGER Addend1,
return RC;
}
VOID
RtlLargeIntegerAnd(PLARGE_INTEGER Result,
LARGE_INTEGER Source,
LARGE_INTEGER Mask)
{
Result->QuadPart = Source.QuadPart & Mask.QuadPart;
}
LARGE_INTEGER
RtlLargeIntegerArithmeticShift(LARGE_INTEGER LargeInteger,
CCHAR ShiftCount)
STDCALL
RtlLargeIntegerArithmeticShift (
LARGE_INTEGER LargeInteger,
CCHAR ShiftCount
)
{
LARGE_INTEGER RC;
CHAR Shift;
@ -149,9 +171,12 @@ RtlLargeIntegerArithmeticShift(LARGE_INTEGER LargeInteger,
}
LARGE_INTEGER
RtlLargeIntegerDivide(LARGE_INTEGER Dividend,
STDCALL
RtlLargeIntegerDivide (
LARGE_INTEGER Dividend,
LARGE_INTEGER Divisor,
PLARGE_INTEGER Remainder)
PLARGE_INTEGER Remainder
)
{
LARGE_INTEGER RC;
@ -163,73 +188,11 @@ RtlLargeIntegerDivide(LARGE_INTEGER Dividend,
return RC;
}
BOOLEAN
RtlLargeIntegerEqualTo(LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2)
{
return Operand1.QuadPart == Operand2.QuadPart;
}
BOOLEAN
RtlLargeIntegerEqualToZero(LARGE_INTEGER Operand)
{
return Operand.QuadPart == 0 ;
}
BOOLEAN
RtlLargeIntegerGreaterThan(LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2)
{
return Operand1.QuadPart > Operand2.QuadPart;
}
BOOLEAN
RtlLargeIntegerGreaterThanOrEqualTo(LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2)
{
return Operand1.QuadPart >= Operand2.QuadPart;
}
BOOLEAN
RtlLargeIntegerGreaterThanOrEqualToZero(LARGE_INTEGER Operand1)
{
return Operand1.QuadPart >= 0;
}
BOOLEAN
RtlLargeIntegerGreaterThanZero(LARGE_INTEGER Operand1)
{
return Operand1.QuadPart > 0;
}
BOOLEAN
RtlLargeIntegerLessThan(LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2)
{
return Operand1.QuadPart < Operand2.QuadPart;
}
BOOLEAN
RtlLargeIntegerLessThanOrEqualTo(LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2)
{
return Operand1.QuadPart <= Operand2.QuadPart;
}
BOOLEAN
RtlLargeIntegerLessThanOrEqualToZero(LARGE_INTEGER Operand)
{
return Operand.QuadPart <= 0;
}
BOOLEAN
RtlLargeIntegerLessThanZero(LARGE_INTEGER Operand)
{
return Operand.QuadPart < 0;
}
LARGE_INTEGER
RtlLargeIntegerNegate(LARGE_INTEGER Subtrahend)
STDCALL
RtlLargeIntegerNegate (
LARGE_INTEGER Subtrahend
)
{
LARGE_INTEGER RC;
@ -238,50 +201,44 @@ RtlLargeIntegerNegate(LARGE_INTEGER Subtrahend)
return RC;
}
BOOLEAN
RtlLargeIntegerNotEqualTo(LARGE_INTEGER Operand1,
LARGE_INTEGER Operand2)
{
return Operand1.QuadPart != Operand2.QuadPart;
}
BOOLEAN
RtlLargeIntegerNotEqualToZero(LARGE_INTEGER Operand)
{
return Operand.QuadPart != 0;
}
LARGE_INTEGER
RtlLargeIntegerShiftLeft(LARGE_INTEGER LargeInteger,
CCHAR ShiftCount)
STDCALL
RtlLargeIntegerShiftLeft (
LARGE_INTEGER LargeInteger,
CCHAR ShiftCount
)
{
LARGE_INTEGER RC;
CHAR Shift;
Shift = ShiftCount % 64;
RC.QuadPart = LargeInteger.QuadPart << Shift;
return RC;
}
LARGE_INTEGER
RtlLargeIntegerShiftRight(LARGE_INTEGER LargeInteger,
CCHAR ShiftCount)
STDCALL
RtlLargeIntegerShiftRight (
LARGE_INTEGER LargeInteger,
CCHAR ShiftCount
)
{
LARGE_INTEGER RC;
CHAR Shift;
Shift = ShiftCount % 64;
RC.QuadPart = LargeInteger.QuadPart >> ShiftCount;
return RC;
}
LARGE_INTEGER
RtlLargeIntegerSubtract(LARGE_INTEGER Minuend,
LARGE_INTEGER Subtrahend)
STDCALL
RtlLargeIntegerSubtract (
LARGE_INTEGER Minuend,
LARGE_INTEGER Subtrahend
)
{
LARGE_INTEGER RC;