mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
- Use inlined functions like MSDDK.
svn path=/trunk/; revision=17688
This commit is contained in:
parent
66711d6344
commit
28ab27fe87
1 changed files with 47 additions and 21 deletions
|
@ -906,6 +906,7 @@ RtlOemToUnicodeN(
|
||||||
/*
|
/*
|
||||||
* Ansi->Unicode String Functions
|
* Ansi->Unicode String Functions
|
||||||
*/
|
*/
|
||||||
|
NTSYSAPI
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
RtlAnsiStringToUnicodeString(
|
RtlAnsiStringToUnicodeString(
|
||||||
|
@ -975,6 +976,7 @@ RtlCreateUnicodeString(
|
||||||
PCWSTR SourceString
|
PCWSTR SourceString
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#ifdef NTOS_MODE_USER
|
||||||
NTSYSAPI
|
NTSYSAPI
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
|
@ -983,6 +985,7 @@ RtlDowncaseUnicodeString(
|
||||||
IN PCUNICODE_STRING UniSource,
|
IN PCUNICODE_STRING UniSource,
|
||||||
IN BOOLEAN AllocateDestinationString
|
IN BOOLEAN AllocateDestinationString
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
NTSYSAPI
|
NTSYSAPI
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
|
@ -1869,39 +1872,62 @@ RtlResetRtlTranslations(IN PNLSTABLEINFO NlsTable);
|
||||||
/*
|
/*
|
||||||
* Misc conversion functions
|
* Misc conversion functions
|
||||||
*/
|
*/
|
||||||
/* FIXME: Use inline */
|
#if defined(NTOS_MODE_USER) && !defined(NO_RTL_INLINES)
|
||||||
NTSYSAPI
|
static __inline
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
NTAPI
|
NTAPI_INLINE
|
||||||
RtlConvertLongToLargeInteger(IN LONG SignedInteger);
|
RtlConvertLongToLargeInteger(LONG SignedInteger)
|
||||||
|
{
|
||||||
|
LARGE_INTEGER Result;
|
||||||
|
|
||||||
/* FIXME: Use inline */
|
Result.QuadPart = SignedInteger;
|
||||||
NTSYSAPI
|
return Result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
NTAPI
|
NTAPI_INLINE
|
||||||
RtlEnlargedIntegerMultiply(
|
RtlEnlargedIntegerMultiply(
|
||||||
LONG Multiplicand,
|
LONG Multiplicand,
|
||||||
LONG Multiplier
|
LONG Multiplier)
|
||||||
);
|
{
|
||||||
|
LARGE_INTEGER Product;
|
||||||
|
|
||||||
/* FIXME: Use inline */
|
Product.QuadPart = (LONGLONG)Multiplicand * (ULONGLONG)Multiplier;
|
||||||
NTSYSAPI
|
return Product;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline
|
||||||
ULONG
|
ULONG
|
||||||
NTAPI
|
NTAPI_INLINE
|
||||||
RtlEnlargedUnsignedDivide(
|
RtlEnlargedUnsignedDivide(
|
||||||
ULARGE_INTEGER Dividend,
|
IN ULARGE_INTEGER Dividend,
|
||||||
ULONG Divisor,
|
IN ULONG Divisor,
|
||||||
PULONG Remainder
|
IN PULONG Remainder OPTIONAL)
|
||||||
);
|
{
|
||||||
|
ULONG Quotient;
|
||||||
|
|
||||||
/* FIXME: Use inline */
|
Quotient = (ULONG)(Dividend.QuadPart / Divisor);
|
||||||
NTSYSAPI
|
if (Remainder) {
|
||||||
|
*Remainder = (ULONG)(Dividend.QuadPart % Divisor);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Quotient;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline
|
||||||
LARGE_INTEGER
|
LARGE_INTEGER
|
||||||
NTAPI
|
NTAPI_INLINE
|
||||||
RtlEnlargedUnsignedMultiply(
|
RtlEnlargedUnsignedMultiply(
|
||||||
ULONG Multiplicand,
|
ULONG Multiplicand,
|
||||||
ULONG Multiplier
|
ULONG Multiplier)
|
||||||
);
|
{
|
||||||
|
LARGE_INTEGER Product;
|
||||||
|
|
||||||
|
Product.QuadPart = (ULONGLONG)Multiplicand * (ULONGLONG)Multiplier;
|
||||||
|
return Product;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
NTSYSAPI
|
NTSYSAPI
|
||||||
ULONG
|
ULONG
|
||||||
|
|
Loading…
Reference in a new issue