chcp.o cls.o cmdinput.o cmdtable.o color.o console.o copy.o date.o \
del.o dir.o dirstack.o echo.o error.o filecomp.o for.o goto.o \
history.o if.o internal.o label.o locale.o misc.o move.o path.o \
- pause.o prompt.o redir.o ren.o set.o shift.o time.o title.o type.o \
+ pause.o prompt.o redir.o ren.o ros.o set.o shift.o time.o title.o type.o \
ver.o verify.o vol.o where.o
-LIBS= ../../lib/kernel32/kernel32.a ../../lib/crtdll/crtdll.a
+LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a
CLEAN_FILES = cmd.o attrib.o alias.o batch.o beep.o call.o \
chcp.o cls.o cmdinput.o cmdtable.o color.o console.o copy.o date.o \
+#include "config.h"
+
#ifdef __REACTOS__
#include <windows.h>
#include <stdlib.h>
#include <string.h>
-//#include <types.h>
-//#include <ddk/ntddk.h>
+
void* malloc(size_t _size)
{
_size));
}
+
void free(void* _ptr)
{
HeapFree(GetProcessHeap(),
_ptr);
}
-#if 0
-void* calloc(size_t _nmemb, size_t _size)
-{
- return(HeapAlloc(GetProcessHeap(),
- HEAP_ZERO_MEMORY,
- _nmemb*_size));
-}
-#endif
void* realloc(void* _ptr, size_t _size)
{
_size));
}
-char *
-_strdup(const char *_s)
+
+char *_strdup(const char *_s)
{
char *rv;
if (_s == 0)
return rv;
}
-size_t
-strlen(const char *str)
-{
- const char *s;
- if (str == 0)
- return 0;
- for (s = str; *s; ++s);
- return s-str;
-}
-
-
-void
-_makepath( char *path, const char *drive, const char *dir, const char *fname, const char *ext )
+void _makepath( char *path, const char *drive, const char *dir, const char *fname, const char *ext )
{
int dir_len;
if ( drive != NULL ) {
}
}
-#endif
\ No newline at end of file
+#endif
;DisconnectNamedPipe@4
;DosDateTimeToFileTime@12
;DuplicateConsoleHandle@16
-;DuplicateHandle@28
+DuplicateHandle@28
+DuplicateHandle = DuplicateHandle@28
;EndUpdateResourceA@8
;EndUpdateResourceW@8
;EnterCriticalSection@4
;FileTimeToDosDateTime@12
;FileTimeToLocalFileTime@8
;FileTimeToSystemTime@8
-;FillConsoleOutputAttribute@20
-;FillConsoleOutputCharacterA@20
+FillConsoleOutputAttribute@20
+FillConsoleOutputAttribute = FillConsoleOutputAttribute@20
+FillConsoleOutputCharacterA@20
+FillConsoleOutputCharacterA = FillConsoleOutputCharacterA@20
;FillConsoleOutputCharacterW@20
;FindAtomA@4
;FindAtomW@4
;FoldStringW@20
;FormatMessageA@28
;FormatMessageW@28
-;FreeConsole@0
-;FreeEnvironmentStringsA@4
+FreeConsole@0
+FreeConsole = FreeConsole@0
+FreeEnvironmentStringsA@4
+FreeEnvironmentStringsA = FreeEnvironmentStringsA@4
;FreeEnvironmentStringsW@4
FreeLibrary@4
FreeLibrary = FreeLibrary@4
;GetConsoleAliasesLengthA@4
;GetConsoleAliasesLengthW@4
;GetConsoleAliasesW@12
-;GetConsoleCP@0
+GetConsoleCP@0
+GetConsoleCP = GetConsoleCP@0
;GetConsoleCommandHistoryA@12
;GetConsoleCommandHistoryLengthA@4
;GetConsoleCommandHistoryLengthW@4
;GetConsoleFontSize@8
;GetConsoleHardwareState@12
;GetConsoleInputWaitHandle@0
-;GetConsoleMode@8
-;GetConsoleOutputCP@0
-;GetConsoleScreenBufferInfo@8
+GetConsoleMode@8
+GetConsoleMode = GetConsoleMode@8
+GetConsoleOutputCP@0
+GetConsoleOutputCP = GetConsoleOutputCP@0
+GetConsoleScreenBufferInfo@8
+GetConsoleScreenBufferInfo = GetConsoleScreenBufferInfo@8
;GetConsoleTitleA@8
;GetConsoleTitleW@8
;GetCurrencyFormatA@24
;GetLargestConsoleWindowSize@4
GetLastError@0
GetLastError = GetLastError@0
-;GetLocalTime@4
+GetLocalTime@4
+GetLocalTime = GetLocalTime@4
;GetLocaleInfoA@16
;GetLocaleInfoW@16
;GetLogicalDriveStringsA@8
;GetVDMCurrentDirectories@8
GetVersion@0
GetVersion = GetVersion@0
-;GetVersionExA@4
-;GetVersionExW@4
-;GetVolumeInformationA@32
-;GetVolumeInformationW@32
+GetVersionExA@4
+GetVersionExA = GetVersionExA@4
+GetVersionExW@4
+GetVersionExW = GetVersionExW@4
+GetVolumeInformationA@32
+GetVolumeInformationA = GetVolumeInformationA@32
+GetVolumeInformationW@32
+GetVolumeInformationW = GetVolumeInformationW@32
;GetWindowsDirectoryA@8
;GetWindowsDirectoryW@8
;GlobalAddAtomA@4
;RaiseException@16
ReadConsoleA@20
ReadConsoleA = ReadConsoleA@20
-;ReadConsoleInputA@16
+ReadConsoleInputA@16
+ReadConsoleInputA = ReadConsoleInputA@16
;ReadConsoleInputW@16
;ReadConsoleOutputA@20
;ReadConsoleOutputAttribute@20
;SetComputerNameA@4
;SetComputerNameW@4
;SetConsoleActiveScreenBuffer@4
-;SetConsoleCP@4
+SetConsoleCP@4
+SetConsoleCP = SetConsoleCP@4
;SetConsoleCommandHistoryMode@4
;SetConsoleCtrlHandler@8
;SetConsoleCursor@8
;SetConsoleCursorInfo@8
-;SetConsoleCursorPosition@8
+SetConsoleCursorPosition@8
+SetConsoleCursorPosition = SetConsoleCursorPosition@8
;SetConsoleDisplayMode@12
;SetConsoleFont@8
;SetConsoleHardwareState@12
;SetConsoleKeyShortcuts@16
;SetConsoleMaximumWindowSize@8
;SetConsoleMenuClose@4
-;SetConsoleMode@8
+SetConsoleMode@8
+SetConsoleMode = SetConsoleMode@8
;SetConsoleNumberOfCommandsA@8
;SetConsoleNumberOfCommandsW@8
-;SetConsoleOutputCP@4
+SetConsoleOutputCP@4
+SetConsoleOutputCP = SetConsoleOutputCP@4
;SetConsolePalette@12
;SetConsoleScreenBufferSize@8
-;SetConsoleTextAttribute@8
-;SetConsoleTitleA@4
+SetConsoleTextAttribute@8
+SetConsoleTextAttribute = SetConsoleTextAttribute@8
+SetConsoleTitleA@4
+SetConsoleTitleA = SetConsoleTitleA@4
;SetConsoleTitleW@4
;SetConsoleWindowInfo@12
SetCurrentDirectoryA@4
SetFileAttributesA = SetFileAttributesA@8
SetFileAttributesW@8
SetFileAttributesW = SetFileAttributesW@8
-;SetFilePointer@16
+SetFilePointer@16
+SetFilePointer = SetFilePointer@16
SetFileTime@16
SetFileTime = SetFileTime@16
;SetHandleCount@4
;SetHandleInformation@12
;SetLastConsoleEventActive@0
;SetLastError@4
-;SetLocalTime@4
+SetLocalTime@4
+SetLocalTime = SetLocalTime@4
;SetLocaleInfoA@12
;SetLocaleInfoW@12
;SetMailslotInfo@8
;SetPriorityClass@8
;SetProcessShutdownParameters@8
;SetProcessWorkingSetSize@12
-;SetStdHandle@8
+SetStdHandle@8
+SetStdHandle = SetStdHandle@8
;SetSystemPowerState@8
;SetSystemTime@4
;SetSystemTimeAdjustment@8
SetUnhandledExceptionFilter@4
SetUnhandledExceptionFilter = SetUnhandledExceptionFilter@4
;SetVDMCurrentDirectories@8
-;SetVolumeLabelA@8
+SetVolumeLabelA@8
+SetVolumeLabelA = SetVolumeLabelA@8
;SetVolumeLabelW@8
;SetupComm@12
;ShowConsoleCursor@8
OBJECTS = $(MISC_OBJECTS) $(FILE_OBJECTS) $(THREAD_OBJECTS) \
$(PROCESS_OBJECTS) $(STRING_OBJECTS) $(MEM_OBJECTS) \
- $(INTERNAL_OBJECTS) $(SYNCH_OBJECTS) $(EXCEPT_OBJECTS)
+ $(INTERNAL_OBJECTS) $(SYNCH_OBJECTS) $(EXCEPT_OBJECTS)
ifeq ($(DOSCLI),yes)
CLEAN_FILES = except\*.o file\*.o internal\*.o mem\*.o misc\*.o nls\*.o \
LPCSTR lpString2
)
{
- return stricmp(lpString1,lpString2);
+ return _stricmp(lpString1,lpString2);
}
LPSTR
STDCALL
RtlEnlargedIntegerMultiply
RtlEnlargedUnsignedMultiply
RtlExtendedIntegerMultiply
+_splitpath
+_strcmpi
+_stricmp
+_strnicmp
+_strupr
+atoi
+atol
isalpha
+isalnum
+iscntrl
+isdigit
+isgraph
+isprint
+ispunct
+isspace
+isupper
iswlower
memcpy
+memmove
memset
+sprintf
strcat
+strchr
strcmp
-stricmp
strcpy
+strcspn
+strncat
+strncmp
strncpy
strlen
strrchr
+strstr
+strtol
+strtoul
+tolower
toupper
towupper
-wcscpy
-wcschr
wcscat
+wcschr
wcscmp
+wcscpy
wcsncpy
wcslen
wcsrchr
all: $(DLLTARGET)
+STDLIB_OBJECTS = stdlib/atoi.o stdlib/atol.o stdlib/splitp.o \
+ stdlib/strtol.o stdlib/strtoul.o
+
+STRING_OBJECTS = string/ctype.o string/memcpy.o string/memmove.o \
+ string/memset.o string/strcat.o string/strchr.o \
+ string/strcmp.o string/strcspn.o \
+ string/strcpy.o string/stricmp.o string/strlen.o \
+ string/strncat.o string/strncmp.o string/strncpy.o \
+ string/strnicmp.o string/strnlen.o string/strrchr.o \
+ string/strstr.o string/strupr.o string/wstring.o
+
OBJECTS = napi.o ldr/startup.o rtl/largeint.o rtl/namespc.o rtl/unicode.o \
- stdio/vsprintf.o string/ctype.o string/memcpy.o string/memset.o \
- string/strcat.o string/strcmp.o string/strcpy.o string/stricmp.o \
- string/strlen.o string/strncmp.o string/strncpy.o string/strnlen.o \
- string/strrchr.o string/wstring.o stubs/stubs.o rtl/heap.o \
- rtl/critical.o rtl/mem.o ldr/utils.o
+ stdio/vsprintf.o $(STDLIB_OBJECTS) $(STRING_OBJECTS) \
+ stubs/stubs.o rtl/heap.o rtl/critical.o rtl/mem.o \
+ ldr/utils.o
+
ifeq ($(DOSCLI),yes)
CLEAN_FILES = napi.o ldr\*.o rtl\*.o stdio\*.o string\*.o stubs\*.o ntdll.a \
main\dllmain.o ntdll.o ntdll.dll junk.tmp base.tmp temp.exp ntdll.sym
--- /dev/null
+/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
+#include <stdlib.h>
+
+int
+atoi(const char *str)
+{
+ return (int)strtol(str, 0, 10);
+}
--- /dev/null
+/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
+#include <stdlib.h>
+
+long
+atol(const char *str)
+{
+ return strtol(str, 0, 10);
+}
--- /dev/null
+#include <stdlib.h>
+#include <string.h>
+
+void _splitpath( const char *path, char *drive, char *dir, char *fname, char *ext )
+{
+ char *tmp_drive;
+ char *tmp_dir;
+ char *tmp_ext;
+
+ tmp_drive = (char *)strchr(path,':');
+ if ( tmp_drive != (char *)NULL ) {
+ strncpy(drive,tmp_drive-1,1);
+ *(drive+1) = 0;
+ }
+ else {
+ *drive = 0;
+ tmp_drive = (char *)path;
+ }
+
+ tmp_dir = (char *)strrchr(path,'\\');
+ if( tmp_dir != NULL && tmp_dir != tmp_drive + 1 ) {
+ strncpy(dir,tmp_drive+1,tmp_dir - tmp_drive);
+ *(dir + (tmp_dir - tmp_drive)) = 0;
+ }
+ else
+ *dir =0;
+
+ tmp_ext = ( char *)strrchr(path,'.');
+ if ( tmp_ext != NULL ) {
+ strcpy(ext,tmp_ext);
+ }
+ else
+ *ext = 0;
+ if ( tmp_dir != NULL ) {
+ strncpy(fname,tmp_dir+1,tmp_ext - tmp_dir - 1);
+ *(fname + (tmp_ext - tmp_dir -1)) = 0;
+ }
+ else
+ strncpy(fname,path,tmp_ext - path);
+
+}
+
--- /dev/null
+/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
+#include <limits.h>
+#include <ctype.h>
+#include <errno.h>
+#include <stdlib.h>
+//#include <crtdll/internal/file.h>
+
+long
+strtol(const char *nptr, char **endptr, int base)
+{
+ const char *s = nptr;
+ unsigned long acc;
+ int c;
+ unsigned long cutoff;
+ int neg = 0, any, cutlim;
+
+ /*
+ * Skip white space and pick up leading +/- sign if any.
+ * If base is 0, allow 0x for hex and 0 for octal, else
+ * assume decimal; if base is already 16, allow 0x.
+ */
+ do {
+ c = *s++;
+ } while (isspace(c));
+ if (c == '-')
+ {
+ neg = 1;
+ c = *s++;
+ }
+ else if (c == '+')
+ c = *s++;
+ if ((base == 0 || base == 16) &&
+ c == '0' && (*s == 'x' || *s == 'X'))
+ {
+ c = s[1];
+ s += 2;
+ base = 16;
+ }
+ if (base == 0)
+ base = c == '0' ? 8 : 10;
+
+ /*
+ * Compute the cutoff value between legal numbers and illegal
+ * numbers. That is the largest legal value, divided by the
+ * base. An input number that is greater than this value, if
+ * followed by a legal input character, is too big. One that
+ * is equal to this value may be valid or not; the limit
+ * between valid and invalid numbers is then based on the last
+ * digit. For instance, if the range for longs is
+ * [-2147483648..2147483647] and the input base is 10,
+ * cutoff will be set to 214748364 and cutlim to either
+ * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated
+ * a value > 214748364, or equal but the next digit is > 7 (or 8),
+ * the number is too big, and we will return a range error.
+ *
+ * Set any if any `digits' consumed; make it negative to indicate
+ * overflow.
+ */
+ cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX;
+ cutlim = cutoff % (unsigned long)base;
+ cutoff /= (unsigned long)base;
+ for (acc = 0, any = 0;; c = *s++)
+ {
+ if (isdigit(c))
+ c -= '0';
+ else if (isalpha(c))
+ c -= isupper(c) ? 'A' - 10 : 'a' - 10;
+ else
+ break;
+ if (c >= base)
+ break;
+ if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
+ any = -1;
+ else
+ {
+ any = 1;
+ acc *= base;
+ acc += c;
+ }
+ }
+ if (any < 0)
+ {
+ acc = neg ? LONG_MIN : LONG_MAX;
+// __set_errno(ERANGE);
+ }
+ else if (neg)
+ acc = -acc;
+ if (endptr != 0)
+ *endptr = any ? (char *)s - 1 : (char *)nptr;
+ return acc;
+}
--- /dev/null
+/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
+#include <limits.h>
+#include <ctype.h>
+#include <errno.h>
+#include <stdlib.h>
+//#include <internal/file.h>
+
+
+/*
+ * Convert a string to an unsigned long integer.
+ *
+ * Ignores `locale' stuff. Assumes that the upper and lower case
+ * alphabets and digits are each contiguous.
+ */
+unsigned long
+strtoul(const char *nptr, char **endptr, int base)
+{
+ const char *s = nptr;
+ unsigned long acc;
+ int c;
+ unsigned long cutoff;
+ int neg = 0, any, cutlim;
+
+ /*
+ * See strtol for comments as to the logic used.
+ */
+ do {
+ c = *s++;
+ } while (isspace(c));
+ if (c == '-')
+ {
+ neg = 1;
+ c = *s++;
+ }
+ else if (c == '+')
+ c = *s++;
+ if ((base == 0 || base == 16) &&
+ c == '0' && (*s == 'x' || *s == 'X'))
+ {
+ c = s[1];
+ s += 2;
+ base = 16;
+ }
+ if (base == 0)
+ base = c == '0' ? 8 : 10;
+ cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
+ cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
+ for (acc = 0, any = 0;; c = *s++)
+ {
+ if (isdigit(c))
+ c -= '0';
+ else if (isalpha(c))
+ c -= isupper(c) ? 'A' - 10 : 'a' - 10;
+ else
+ break;
+ if (c >= base)
+ break;
+ if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
+ any = -1;
+ else {
+ any = 1;
+ acc *= base;
+ acc += c;
+ }
+ }
+ if (any < 0)
+ {
+ acc = ULONG_MAX;
+// __set_errno(ERANGE);
+ }
+ else if (neg)
+ acc = -acc;
+ if (endptr != 0)
+ *endptr = any ? (char *)s - 1 : (char *)nptr;
+ return acc;
+}
return(((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')));
}
-int isspace(char c)
+int isalnum(char c)
{
- return(c==' '||c=='\t');
+ return(isalpha(c)||isdigit(c));
}
-char toupper(char c)
+int iscntrl(char c)
{
- if ((c>='a') && (c<='z')) return (c+upalpha);
- return(c);
+ return((c >=0x00 && c <= 0x1f) || c == 0x7f);
}
-char tolower(char c)
+int isdigit(char c)
{
- if (c>='A' && c <= 'Z')
- return (c - upalpha);
- return(c);
+ return((c>='0') && (c<='9'));
+}
+
+int isgraph(char c)
+{
+ return(c>=0x21 && c<=0x7e);
}
int islower(char c)
{
- if ((c>='a') && (c<='z')) return 1;
- return 0;
+ return((c>='a') && (c<='z'));
}
-int isdigit(char c)
+int isprint(char c)
{
- if ((c>='0') && (c<='9')) return 1;
- return 0;
+ return(c>=0x20 && c<=0x7e);
+}
+
+int ispunct(char c)
+{
+ return((c>=0x21 && c<=0x2f)||(c>=0x3a && c<=0x40)||(c>=0x5b && c<=0x60));
+}
+
+int isspace(char c)
+{
+ return(c==' '||c=='\t');
+}
+
+int isupper(char c)
+{
+ return((c>='A') && (c<='Z'));
}
int isxdigit(char c)
{
- if (((c>='0') && (c<='9')) || ((toupper(c)>='A') && (toupper(c)<='Z')))
- {
- return 1;
- }
- return 0;
+ return(((c>='0') && (c<='9')) || ((toupper(c)>='A') && (toupper(c)<='Z')));
}
-int iscntrl(char c)
+
+char tolower(char c)
{
- if ((c >=0x00 && c <= 0x1f) || c == 0x7f);
- return 1;
- return 0;
+ if (c>='A' && c <= 'Z')
+ return (c - upalpha);
+ return(c);
}
+char toupper(char c)
+{
+ if ((c>='a') && (c<='z'))
+ return (c+upalpha);
+ return(c);
+}
--- /dev/null
+#include <string.h>
+
+
+void * memmove(void *dest,const void *src,size_t count)
+{
+ char *char_dest = (char *)dest;
+ char *char_src = (char *)src;
+
+ while(count > 0 )
+ {
+ *char_dest = *char_src;
+ char_dest++;
+ char_src++;
+ count--;
+ }
+
+ return dest;
+}
--- /dev/null
+/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
+/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
+
+
+
+char *strchr(const char *s, int c);
+
+char *strchr(const char *s, int c)
+{
+ char cc = c;
+ while (*s)
+ {
+ if (*s == cc)
+ return (char *)s;
+ s++;
+ }
+ if (cc == 0)
+ return (char *)s;
+ return 0;
+}
+
--- /dev/null
+/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
+#include <string.h>
+
+size_t
+strcspn(const char *s1, const char *s2)
+{
+ const char *p, *spanp;
+ char c, sc;
+
+ for (p = s1;;)
+ {
+ c = *p++;
+ spanp = s2;
+ do {
+ if ((sc = *spanp++) == c)
+ return p - 1 - s1;
+ } while (sc != 0);
+ }
+ /* NOTREACHED */
+}
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <string.h>
-#include <ctype.h>
+#include <crtdll/string.h>
+#include <crtdll/ctype.h>
int
-stricmp(const char *s1, const char *s2)
+_stricmp(const char *s1, const char *s2)
{
while (toupper(*s1) == toupper(*s2))
{
}
return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)(s2));
}
+
+int
+_strcmpi(const char *s1, const char *s2)
+{
+ return _stricmp(s1,s2);
+}
--- /dev/null
+/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
+#include <string.h>
+
+char *
+strncat(char *dst, const char *src, size_t n)
+{
+ if (n != 0)
+ {
+ char *d = dst;
+ const char *s = src;
+
+ while (*d != 0)
+ d++;
+ do {
+ if ((*d = *s++) == 0)
+ break;
+ d++;
+ } while (--n != 0);
+ *d = 0;
+ }
+ return dst;
+}
--- /dev/null
+/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
+#include <string.h>
+#include <ctype.h>
+
+int _strnicmp(const char *s1, const char *s2, size_t n)
+{
+
+ if (n == 0)
+ return 0;
+ do {
+ if (toupper(*s1) != toupper(*s2++))
+ return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)--s2);
+ if (*s1++ == 0)
+ break;
+ } while (--n != 0);
+ return 0;
+}
--- /dev/null
+/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
+#include <string.h>
+//#include <unconst.h>
+
+char *
+strstr(const char *s, const char *find)
+{
+ char c, sc;
+ size_t len;
+
+ if ((c = *find++) != 0)
+ {
+ len = strlen(find);
+ do {
+ do {
+ if ((sc = *s++) == 0)
+ return 0;
+ } while (sc != c);
+ } while (strncmp(s, find, len) != 0);
+ s--;
+ }
+ return (char *)s;
+}
--- /dev/null
+/*
+ * The C RunTime DLL
+ *
+ * Implements C run-time functionality as known from UNIX.
+ *
+ * Copyright 1996,1998 Marcus Meissner
+ * Copyright 1996 Jukka Iivonen
+ * Copyright 1997 Uwe Bonnes
+ */
+
+
+#include <string.h>
+#include <ctype.h>
+
+char *_strupr(char *x)
+{
+ char *y=x;
+
+ while (*y) {
+ *y=toupper(*y);
+ y++;
+ }
+ return x;
+}
STUB(_memicmp)
STUB(_snprintf)
STUB(_snwprintf)
-STUB(_splitpath)
-STUB(_strcmpi)
-STUB(_stricmp)
STUB(_strlwr)
-STUB(_strnicmp)
-STUB(_strupr)
STUB(_tolower)
STUB(_toupper)
STUB(_ultoa)
STUB(_wtol)
STUB(abs)
STUB(atan)
-STUB(atoi)
-STUB(atol)
STUB(ceil)
STUB(cos)
STUB(fabs)
STUB(floor)
-STUB(isalnum)
-STUB(isgraph)
-STUB(isprint)
-STUB(ispunct)
-STUB(isupper)
STUB(iswalpha)
STUB(iswctype)
STUB(labs)
STUB(mbstowcs)
STUB(memchr)
STUB(memcmp)
-STUB(memmove)
STUB(pow)
STUB(qsort)
STUB(sin)
STUB(sqrt)
STUB(sscanf)
-STUB(strchr)
-STUB(strcspn)
-STUB(strncat)
STUB(strpbrk)
STUB(strspn)
-STUB(strstr)
-STUB(strtol)
-STUB(strtoul)
STUB(swprintf)
STUB(tan)
chcp.o cls.o cmdinput.o cmdtable.o color.o console.o copy.o date.o \
del.o dir.o dirstack.o echo.o error.o filecomp.o for.o goto.o \
history.o if.o internal.o label.o locale.o misc.o move.o path.o \
- pause.o prompt.o redir.o ren.o set.o shift.o time.o title.o type.o \
+ pause.o prompt.o redir.o ren.o ros.o set.o shift.o time.o title.o type.o \
ver.o verify.o vol.o where.o
-LIBS= ../../lib/kernel32/kernel32.a ../../lib/crtdll/crtdll.a
+LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a
CLEAN_FILES = cmd.o attrib.o alias.o batch.o beep.o call.o \
chcp.o cls.o cmdinput.o cmdtable.o color.o console.o copy.o date.o \
+#include "config.h"
+
#ifdef __REACTOS__
#include <windows.h>
#include <stdlib.h>
#include <string.h>
-//#include <types.h>
-//#include <ddk/ntddk.h>
+
void* malloc(size_t _size)
{
_size));
}
+
void free(void* _ptr)
{
HeapFree(GetProcessHeap(),
_ptr);
}
-#if 0
-void* calloc(size_t _nmemb, size_t _size)
-{
- return(HeapAlloc(GetProcessHeap(),
- HEAP_ZERO_MEMORY,
- _nmemb*_size));
-}
-#endif
void* realloc(void* _ptr, size_t _size)
{
_size));
}
-char *
-_strdup(const char *_s)
+
+char *_strdup(const char *_s)
{
char *rv;
if (_s == 0)
return rv;
}
-size_t
-strlen(const char *str)
-{
- const char *s;
- if (str == 0)
- return 0;
- for (s = str; *s; ++s);
- return s-str;
-}
-
-
-void
-_makepath( char *path, const char *drive, const char *dir, const char *fname, const char *ext )
+void _makepath( char *path, const char *drive, const char *dir, const char *fname, const char *ext )
{
int dir_len;
if ( drive != NULL ) {
}
}
-#endif
\ No newline at end of file
+#endif