From 4900a6f2814af73dd797f04fb683fb00d8b949e1 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Sun, 1 Jun 2003 19:18:09 +0000 Subject: [PATCH] - Removed some files which are replaced by the string library. svn path=/trunk/; revision=4817 --- reactos/ntoskrnl/Makefile | 5 +--- reactos/ntoskrnl/rtl/memchr.c | 42 ------------------------------ reactos/ntoskrnl/rtl/memcmp.c | 47 ---------------------------------- reactos/ntoskrnl/rtl/memmove.c | 35 ------------------------- 4 files changed, 1 insertion(+), 128 deletions(-) delete mode 100644 reactos/ntoskrnl/rtl/memchr.c delete mode 100644 reactos/ntoskrnl/rtl/memcmp.c delete mode 100644 reactos/ntoskrnl/rtl/memmove.c diff --git a/reactos/ntoskrnl/Makefile b/reactos/ntoskrnl/Makefile index c9f4265f1a3..59c9253a4d6 100644 --- a/reactos/ntoskrnl/Makefile +++ b/reactos/ntoskrnl/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.96 2003/05/27 19:21:14 hbirr Exp $ +# $Id: Makefile,v 1.97 2003/06/01 19:18:09 hbirr Exp $ # # ReactOS Operating System # @@ -91,8 +91,6 @@ OBJECTS_RTL = \ rtl/largeint.o \ rtl/math.o \ rtl/mem.o \ - rtl/memchr.o \ - rtl/memmove.o \ rtl/message.o \ rtl/nls.o \ rtl/purecall.o \ @@ -106,7 +104,6 @@ OBJECTS_RTL = \ rtl/timezone.o \ rtl/unicode.o \ rtl/wstring.o \ - rtl/memcmp.o \ rtl/capture.o OBJECTS_RTL := $(filter-out $(RTL_EXCLUDE_FILTER), $(OBJECTS_RTL)) diff --git a/reactos/ntoskrnl/rtl/memchr.c b/reactos/ntoskrnl/rtl/memchr.c deleted file mode 100644 index dd8e58c8e9f..00000000000 --- a/reactos/ntoskrnl/rtl/memchr.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * ReactOS kernel - * Copyright (C) 2000 David Welch - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* - * FILE: ntoskrnl/rtl/memchr.c - * PURPOSE: Implements memchr function - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 - */ - - -#include - -void *memchr(const void *s, int c, size_t n) -{ - while (n > 0) - { - if ((*((const unsigned char *)s)) == (unsigned char)c) - { - return((void *)s); - } - s++; - n--; - } - return(NULL); -} diff --git a/reactos/ntoskrnl/rtl/memcmp.c b/reactos/ntoskrnl/rtl/memcmp.c deleted file mode 100644 index ed1b796dff4..00000000000 --- a/reactos/ntoskrnl/rtl/memcmp.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * ReactOS kernel - * Copyright (C) 2000 David Welch - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* - * FILE: ntoskrnl/rtl/memcmp.c - * PURPOSE: Implements memcmp function - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 01/10/00 - */ - -#include - -int memcmp(const void* _s1, const void* _s2, size_t n) -{ - unsigned int i; - const char* s1; - const char* s2; - - s1 = (const char *)_s1; - s2 = (const char *)_s2; - for (i = 0; i < n; i++) - { - if ((*s1) != (*s2)) - { - return((*s1) - (*s2)); - } - s1++; - s2++; - } - return(0); -} diff --git a/reactos/ntoskrnl/rtl/memmove.c b/reactos/ntoskrnl/rtl/memmove.c deleted file mode 100644 index f15f6bb58b5..00000000000 --- a/reactos/ntoskrnl/rtl/memmove.c +++ /dev/null @@ -1,35 +0,0 @@ -#include - -void * memmove(void *dest,const void *src,size_t count) -{ - char *char_dest = (char *)dest; - char *char_src = (char *)src; - - if ((char_dest <= char_src) || (char_dest >= (char_src+count))) - { - /* non-overlapping buffers */ - while(count > 0) - { - *char_dest = *char_src; - char_dest++; - char_src++; - count--; - } - } - else - { - /* overlaping buffers */ - char_dest = (char *)dest + count - 1; - char_src = (char *)src + count - 1; - - while(count > 0) - { - *char_dest = *char_src; - char_dest--; - char_src--; - count--; - } - } - - return dest; -}