More runtime functions

svn path=/trunk/; revision=796
This commit is contained in:
Eric Kohl 1999-11-25 23:35:24 +00:00
parent 9b614b887d
commit 05a567fce3
4 changed files with 66 additions and 16 deletions

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.def,v 1.27 1999/11/24 11:51:46 dwelch Exp $
; $Id: ntoskrnl.def,v 1.28 1999/11/25 23:35:24 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -247,6 +247,10 @@ RtlUpcaseUnicodeToOemN@20
RtlUpperChar@4
RtlUpperString@8
RtlZeroMemory@8
RtlxAnsiStringToUnicodeSize@4
RtlxOemStringToUnicodeSize@4
RtlxUnicodeStringToAnsiSize@4
RtlxUnicodeStringToOemSize@4
ZwAccessCheckAndAuditAlarm@44
ZwAlertThread@4
ZwAllocateVirtualMemory@24
@ -336,7 +340,7 @@ ZwYieldExecution@0
;_aullshr
;_except_handler2
;_global_unwind2
;_itoa
_itoa
;_local_unwind2
;_purecall
;_snprintf

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.edf,v 1.14 1999/11/24 11:51:46 dwelch Exp $
; $Id: ntoskrnl.edf,v 1.15 1999/11/25 23:35:24 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -245,6 +245,10 @@ RtlUpcaseUnicodeToOemN=RtlUpcaseUnicodeToOemN@20
RtlUpperChar=RtlUpperChar@4
RtlUpperString=RtlUpperString@8
RtlZeroMemory=RtlZeroMemory@8
RtlxAnsiStringToUnicodeSize=RtlxAnsiStringToUnicodeSize@4
RtlxOemStringToUnicodeSize=RtlxOemStringToUnicodeSize@4
RtlxUnicodeStringToAnsiSize=RtlxUnicodeStringToAnsiSize@4
RtlxUnicodeStringToOemSize=RtlxUnicodeStringToOemSize@4
ZwAccessCheckAndAuditAlarm=ZwAccessCheckAndAuditAlarm@44
ZwAlertThread=ZwAlertThread@4
ZwAllocateVirtualMemory=ZwAllocateVirtualMemory@24
@ -334,7 +338,7 @@ ZwYieldExecution=ZwYieldExecution@0
;_aullshr
;_except_handler2
;_global_unwind2
;_itoa
_itoa
;_local_unwind2
;_purecall
;_snprintf

View file

@ -22,37 +22,38 @@ static unsigned long long next = 0;
#if 0
int atoi(const char *str)
{
return (int)strtol(str, 0, 10);
return (int)atol (str);
}
long atol(const char *str)
{
return strtol(str, 0, 10);
}
#endif
char *_itoa(int value, char *string, int radix)
/*
* NOTE: no radix range check (valid range: 2 - 36)
*/
char *_itoa (int value, char *string, int radix)
{
char tmp[33];
char *tp = tmp;
int i;
unsigned v;
int sign;
char *sp;
char *sp = NULL;
if (string == 0)
if (string == NULL)
return NULL;
if (radix > 36 || radix <= 1)
{
__set_errno(EDOM);
return 0;
}
sign = (radix == 10 && value < 0);
if (sign)
v = -value;
else
v = (unsigned)value;
while (v || tp == tmp)
{
i = v % radix;
@ -65,12 +66,13 @@ char *_itoa(int value, char *string, int radix)
if (sign)
*sp++ = '-';
while (tp > tmp)
*sp++ = *--tp;
*sp = 0;
return string;
}
#endif
int rand(void)

View file

@ -1,4 +1,4 @@
/* $Id: unicode.c,v 1.9 1999/11/20 21:45:20 ekohl Exp $
/* $Id: unicode.c,v 1.10 1999/11/25 23:34:43 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -1341,4 +1341,44 @@ RtlUpperString(PSTRING DestinationString, PSTRING SourceString)
DestinationString->Length = SourceString->Length;
}
ULONG
STDCALL
RtlxAnsiStringToUnicodeSize (
IN PANSI_STRING AnsiString
)
{
return RtlAnsiStringToUnicodeSize (AnsiString);
}
ULONG
STDCALL
RtlxOemStringToUnicodeSize (
IN POEM_STRING OemString
)
{
return RtlAnsiStringToUnicodeSize ((PANSI_STRING)OemString);
}
ULONG
STDCALL
RtlxUnicodeStringToAnsiSize (
IN PUNICODE_STRING UnicodeString
)
{
return RtlUnicodeStringToAnsiSize (UnicodeString);
}
ULONG
STDCALL
RtlxUnicodeStringToOemSize (
IN PUNICODE_STRING UnicodeString
)
{
return RtlUnicodeStringToAnsiSize (UnicodeString);
}
/* EOF */