diff --git a/reactos/include/ddk/halddk.h b/reactos/include/ddk/halddk.h index b047c9208c4..9c4dc56eebb 100644 --- a/reactos/include/ddk/halddk.h +++ b/reactos/include/ddk/halddk.h @@ -1,4 +1,4 @@ -/* $Id: halddk.h,v 1.5 2000/07/24 23:48:24 ekohl Exp $ +/* $Id: halddk.h,v 1.6 2000/10/22 16:34:38 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -10,8 +10,8 @@ */ -#ifndef __INCLUDE_INTERNAL_HAL_DDK_H -#define __INCLUDE_INTERNAL_HAL_DDK_H +#ifndef __INCLUDE_DDK_HALDDK_H +#define __INCLUDE_DDK_HALDDK_H /* HalReturnToFirmware */ #define FIRMWARE_HALT 1 @@ -461,6 +461,13 @@ HalInitializeProcessor ( ULONG ProcessorNumber ); +BOOLEAN +STDCALL +HalInitSystem ( + ULONG BootPhase, + PLOADER_PARAMETER_BLOCK LoaderBlock + ); + BOOLEAN STDCALL HalMakeBeep ( @@ -684,4 +691,4 @@ STDCALL WRITE_PORT_USHORT (PUSHORT Port, USHORT Value); -#endif /* __INCLUDE_INTERNAL_HAL_DDK_H */ +#endif /* __INCLUDE_DDK_HALDDK_H */ diff --git a/reactos/ntoskrnl/Makefile b/reactos/ntoskrnl/Makefile index ee264dec954..a58115f92b9 100644 --- a/reactos/ntoskrnl/Makefile +++ b/reactos/ntoskrnl/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.2 2000/10/08 12:43:56 ekohl Exp $ +# $Id: Makefile,v 1.3 2000/10/22 16:36:48 ekohl Exp $ # # ReactOS Operating System # @@ -450,6 +450,7 @@ $(TARGETNAME).nostrip.exe: $(TARGETNAME).o $(TARGETNAME).a $(IE_DATA) -nostartfiles -nostdlib \ -mdll \ -o junk.tmp \ + -Wl,--subsystem,native \ -Wl,--image-base,0xc0000000 \ -Wl,--file-alignment,0x1000 \ -Wl,--section-alignment,0x1000 \ @@ -468,6 +469,7 @@ $(TARGETNAME).nostrip.exe: $(TARGETNAME).o $(TARGETNAME).a $(IE_DATA) -Wl,-T,ntoskrnl.lnk \ -mdll \ -o $(TARGETNAME).nostrip.exe \ + -Wl,--subsystem,native \ -Wl,--image-base,0xc0000000 \ -Wl,--file-alignment,0x1000 \ -Wl,--section-alignment,0x1000 \ @@ -484,6 +486,7 @@ $(TARGETNAME).exe: $(TARGETNAME).o $(TARGETNAME).a -nostartfiles -nostdlib \ -mdll \ -o junk.tmp \ + -Wl,--subsystem,native \ -Wl,--image-base,0xc0000000 \ -Wl,--file-alignment,0x1000 \ -Wl,--section-alignment,0x1000 \ @@ -502,6 +505,7 @@ $(TARGETNAME).exe: $(TARGETNAME).o $(TARGETNAME).a -nostartfiles -nostdlib \ -mdll \ -o $(TARGETNAME).exe \ + -Wl,--subsystem,native \ -Wl,--image-base,0xc0000000 \ -Wl,--file-alignment,0x1000 \ -Wl,--section-alignment,0x1000 \ diff --git a/reactos/ntoskrnl/cm/registry.c b/reactos/ntoskrnl/cm/registry.c index a7ef99dd091..0c7a5d85ebb 100644 --- a/reactos/ntoskrnl/cm/registry.c +++ b/reactos/ntoskrnl/cm/registry.c @@ -1,4 +1,4 @@ -/* $Id: registry.c,v 1.45 2000/10/16 15:22:45 jean Exp $ +/* $Id: registry.c,v 1.46 2000/10/22 16:36:48 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -16,7 +16,6 @@ #include #include #include -#include #define NDEBUG #include diff --git a/reactos/ntoskrnl/dbg/errinfo.c b/reactos/ntoskrnl/dbg/errinfo.c index 5c09457fa9c..b234d66cdb5 100644 --- a/reactos/ntoskrnl/dbg/errinfo.c +++ b/reactos/ntoskrnl/dbg/errinfo.c @@ -11,11 +11,8 @@ /* INCLUDES *****************************************************************/ #include - #include -#include -#include -#include /* for sprintf */ + static PCHAR SeverityCodes[] = {"SUC", "INF", "ERR", "WRN"}; diff --git a/reactos/ntoskrnl/dbg/print.c b/reactos/ntoskrnl/dbg/print.c index 3c2be93e63a..7342708a943 100644 --- a/reactos/ntoskrnl/dbg/print.c +++ b/reactos/ntoskrnl/dbg/print.c @@ -1,4 +1,4 @@ -/* $Id: print.c,v 1.9 2000/05/25 15:55:08 ekohl Exp $ +/* $Id: print.c,v 1.10 2000/10/22 16:36:49 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -12,7 +12,6 @@ /* INCLUDES *****************************************************************/ #include -#include #include diff --git a/reactos/ntoskrnl/ex/resource.c b/reactos/ntoskrnl/ex/resource.c index f40d3276049..5af8a6aa4d5 100644 --- a/reactos/ntoskrnl/ex/resource.c +++ b/reactos/ntoskrnl/ex/resource.c @@ -1,4 +1,4 @@ -/* $Id: resource.c,v 1.14 2000/07/04 01:27:58 ekohl Exp $ +/* $Id: resource.c,v 1.15 2000/10/22 16:36:49 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -40,8 +40,6 @@ #include #include -#include -#include #define NDEBUG #include diff --git a/reactos/ntoskrnl/ex/sysinfo.c b/reactos/ntoskrnl/ex/sysinfo.c index 31b64f6d9df..903c24512c1 100644 --- a/reactos/ntoskrnl/ex/sysinfo.c +++ b/reactos/ntoskrnl/ex/sysinfo.c @@ -1,4 +1,4 @@ -/* $Id: sysinfo.c,v 1.6 2000/08/26 16:19:40 ekohl Exp $ +/* $Id: sysinfo.c,v 1.7 2000/10/22 16:36:49 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -12,8 +12,6 @@ /* INCLUDES *****************************************************************/ #include -#include -#include #include #include diff --git a/reactos/ntoskrnl/ex/time.c b/reactos/ntoskrnl/ex/time.c index c3addfbaf5e..b593bbe6c4a 100644 --- a/reactos/ntoskrnl/ex/time.c +++ b/reactos/ntoskrnl/ex/time.c @@ -1,8 +1,8 @@ -/* $Id: time.c,v 1.10 2000/06/07 13:04:34 ekohl Exp $ +/* $Id: time.c,v 1.11 2000/10/22 16:36:49 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: kernel/excutive/time.c + * FILE: ntoskrnl/ex/time.c * PURPOSE: Time * PROGRAMMER: David Welch (welch@mcmail.com) * UPDATE HISTORY: @@ -13,7 +13,6 @@ #include #include -#include #include diff --git a/reactos/ntoskrnl/hal/x86/bios32.c b/reactos/ntoskrnl/hal/x86/bios32.c index 2f265a33387..9af615ca63d 100644 --- a/reactos/ntoskrnl/hal/x86/bios32.c +++ b/reactos/ntoskrnl/hal/x86/bios32.c @@ -16,12 +16,11 @@ #include #include -#include -#include #include #include #include + /* TYPES ******************************************************************/ typedef struct diff --git a/reactos/ntoskrnl/include/internal/debug.h b/reactos/ntoskrnl/include/internal/debug.h index 4638156d791..51484cd5dad 100644 --- a/reactos/ntoskrnl/include/internal/debug.h +++ b/reactos/ntoskrnl/include/internal/debug.h @@ -16,7 +16,6 @@ #ifndef __INTERNAL_DEBUG #define __INTERNAL_DEBUG -#include #include #define UNIMPLEMENTED do {DbgPrint("%s at %s:%d is unimplemented, have a nice day\n",__FUNCTION__,__FILE__,__LINE__); for(;;); } while(0); diff --git a/reactos/ntoskrnl/include/internal/hal.h b/reactos/ntoskrnl/include/internal/hal.h index 3119c204898..5218b7dd302 100644 --- a/reactos/ntoskrnl/include/internal/hal.h +++ b/reactos/ntoskrnl/include/internal/hal.h @@ -7,7 +7,4 @@ #error "Unknown processor" #endif -BOOLEAN STDCALL HalInitSystem (ULONG BootPhase, - PLOADER_PARAMETER_BLOCK LoaderBlock); - #endif diff --git a/reactos/ntoskrnl/include/internal/i386/string.h b/reactos/ntoskrnl/include/internal/i386/string.h deleted file mode 100644 index 71ecaa50ee4..00000000000 --- a/reactos/ntoskrnl/include/internal/i386/string.h +++ /dev/null @@ -1,491 +0,0 @@ -#ifndef _I386_STRING_H_ -#define _I386_STRING_H_ - -#if 0 - -/* - * On a 486 or Pentium, we are better off not using the - * byte string operations. But on a 386 or a PPro the - * byte string ops are faster than doing it by hand - * (MUCH faster on a Pentium). - * - * Also, the byte strings actually work correctly. Forget - * the i486 routines for now as they may be broken.. - */ -#if FIXED_486_STRING && (CPU == 486 || CPU == 586) -#include -#else - -/* - * This string-include defines all string functions as inline - * functions. Use gcc. It also assumes ds=es=data space, this should be - * normal. Most of the string-functions are rather heavily hand-optimized, - * see especially strtok,strstr,str[c]spn. They should work, but are not - * very easy to understand. Everything is done entirely within the register - * set, making the functions fast and clean. String instructions have been - * used through-out, making for "slightly" unclear code :-) - * - * NO Copyright (C) 1991, 1992 Linus Torvalds, - * consider these trivial functions to be PD. - */ - -#define __HAVE_ARCH_STRCPY -extern inline char * strcpy(char * dest,const char *src) -{ -int d0, d1, d2; -__asm__ __volatile__( - "cld\n" - "1:\tlodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b" - : "=&S" (d0), "=&D" (d1), "=&a" (d2) - :"0" (src),"1" (dest) : "memory"); -return dest; -} - -#define __HAVE_ARCH_STRNCPY -extern inline char * strncpy(char * dest,const char *src,size_t count) -{ -int d0, d1, d2, d3; -__asm__ __volatile__( - "cld\n" - "1:\tdecl %2\n\t" - "js 2f\n\t" - "lodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n\t" - "rep\n\t" - "stosb\n" - "2:" - : "=&S" (d0), "=&D" (d1), "=&c" (d2), "=&a" (d3) - :"0" (src),"1" (dest),"2" (count) : "memory"); -return dest; -} - -#define __HAVE_ARCH_STRCAT -extern inline char * strcat(char * dest,const char * src) -{ -int d0, d1, d2, d3; -__asm__ __volatile__( - "cld\n\t" - "repne\n\t" - "scasb\n\t" - "decl %1\n" - "1:\tlodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b" - : "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3) - : "0" (src), "1" (dest), "2" (0), "3" (0xffffffff):"memory"); -return dest; -} - -#define __HAVE_ARCH_STRNCAT -extern inline char * strncat(char * dest,const char * src,size_t count) -{ -int d0, d1, d2, d3; -__asm__ __volatile__( - "cld\n\t" - "repne\n\t" - "scasb\n\t" - "decl %1\n\t" - "movl %8,%3\n" - "1:\tdecl %3\n\t" - "js 2f\n\t" - "lodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n" - "2:\txorl %2,%2\n\t" - "stosb" - : "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3) - : "0" (src),"1" (dest),"2" (0),"3" (0xffffffff), "g" (count) - : "memory"); -return dest; -} - -#define __HAVE_ARCH_STRCMP -extern inline int strcmp(const char * cs,const char * ct) -{ -int d0, d1; -register int __res; -__asm__ __volatile__( - "cld\n" - "1:\tlodsb\n\t" - "scasb\n\t" - "jne 2f\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n\t" - "xorl %%eax,%%eax\n\t" - "jmp 3f\n" - "2:\tsbbl %%eax,%%eax\n\t" - "orb $1,%%al\n" - "3:" - :"=a" (__res), "=&S" (d0), "=&D" (d1) - :"1" (cs),"2" (ct)); -return __res; -} - -#define __HAVE_ARCH_STRNCMP -extern inline int strncmp(const char * cs,const char * ct,size_t count) -{ -register int __res; -int d0, d1, d2; -__asm__ __volatile__( - "cld\n" - "1:\tdecl %3\n\t" - "js 2f\n\t" - "lodsb\n\t" - "scasb\n\t" - "jne 3f\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n" - "2:\txorl %%eax,%%eax\n\t" - "jmp 4f\n" - "3:\tsbbl %%eax,%%eax\n\t" - "orb $1,%%al\n" - "4:" - :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2) - :"1" (cs),"2" (ct),"3" (count)); -return __res; -} - -#define __HAVE_ARCH_STRCHR -extern inline char * strchr(const char * s, int c) -{ -int d0; -register char * __res; -__asm__ __volatile__( - "cld\n\t" - "movb %%al,%%ah\n" - "1:\tlodsb\n\t" - "cmpb %%ah,%%al\n\t" - "je 2f\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n\t" - "movl $1,%1\n" - "2:\tmovl %1,%0\n\t" - "decl %0" - :"=a" (__res), "=&S" (d0) : "1" (s),"0" (c)); -return __res; -} - -#define __HAVE_ARCH_STRRCHR -extern inline char * strrchr(const char * s, int c) -{ -int d0, d1; -register char * __res; -__asm__ __volatile__( - "cld\n\t" - "movb %%al,%%ah\n" - "1:\tlodsb\n\t" - "cmpb %%ah,%%al\n\t" - "jne 2f\n\t" - "leal -1(%%esi),%0\n" - "2:\ttestb %%al,%%al\n\t" - "jne 1b" - :"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c)); -return __res; -} - -#define __HAVE_ARCH_STRLEN -extern inline size_t strlen(const char * s) -{ -int d0; -register int __res; -__asm__ __volatile__( - "cld\n\t" - "repne\n\t" - "scasb\n\t" - "notl %0\n\t" - "decl %0" - :"=c" (__res), "=&D" (d0) :"1" (s),"a" (0), "0" (0xffffffff)); -return __res; -} - -extern inline void * __memcpy(void * to, const void * from, size_t n) -{ -int d0, d1, d2; -__asm__ __volatile__( - "cld\n\t" - "rep ; movsl\n\t" - "testb $2,%b4\n\t" - "je 1f\n\t" - "movsw\n" - "1:\ttestb $1,%b4\n\t" - "je 2f\n\t" - "movsb\n" - "2:" - : "=&c" (d0), "=&D" (d1), "=&S" (d2) - :"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from) - : "memory"); -return (to); -} - -/* - * This looks horribly ugly, but the compiler can optimize it totally, - * as the count is constant. - */ -extern inline void * __constant_memcpy(void * to, const void * from, size_t n) -{ - switch (n) { - case 0: - return to; - case 1: - *(unsigned char *)to = *(const unsigned char *)from; - return to; - case 2: - *(unsigned short *)to = *(const unsigned short *)from; - return to; - case 3: - *(unsigned short *)to = *(const unsigned short *)from; - *(2+(unsigned char *)to) = *(2+(const unsigned char *)from); - return to; - case 4: - *(unsigned long *)to = *(const unsigned long *)from; - return to; - case 6: /* for Ethernet addresses */ - *(unsigned long *)to = *(const unsigned long *)from; - *(2+(unsigned short *)to) = *(2+(const unsigned short *)from); - return to; - case 8: - *(unsigned long *)to = *(const unsigned long *)from; - *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); - return to; - case 12: - *(unsigned long *)to = *(const unsigned long *)from; - *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); - *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); - return to; - case 16: - *(unsigned long *)to = *(const unsigned long *)from; - *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); - *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); - *(3+(unsigned long *)to) = *(3+(const unsigned long *)from); - return to; - case 20: - *(unsigned long *)to = *(const unsigned long *)from; - *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); - *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); - *(3+(unsigned long *)to) = *(3+(const unsigned long *)from); - *(4+(unsigned long *)to) = *(4+(const unsigned long *)from); - return to; - } -#define COMMON(x) \ -__asm__ __volatile__( \ - "cld\n\t" \ - "rep ; movsl" \ - x \ - : "=&c" (d0), "=&D" (d1), "=&S" (d2) \ - : "0" (n/4),"1" ((long) to),"2" ((long) from) \ - : "memory"); -{ - int d0, d1, d2; - switch (n % 4) { - case 0: COMMON(""); return to; - case 1: COMMON("\n\tmovsb"); return to; - case 2: COMMON("\n\tmovsw"); return to; - default: COMMON("\n\tmovsw\n\tmovsb"); return to; - } -} - -#undef COMMON -} - -#define __HAVE_ARCH_MEMCPY -#define memcpy(t, f, n) \ -(__builtin_constant_p(n) ? \ - __constant_memcpy((t),(f),(n)) : \ - __memcpy((t),(f),(n))) - -#define __HAVE_ARCH_MEMMOVE -extern inline void * memmove(void * dest,const void * src, size_t n) -{ -int d0, d1, d2; -if (dest -#endif - -#ifndef _INTERNAL_STDDEF_H -#include -#endif - -#include - -/* - * This string-include defines all string functions as inline - * functions. Use gcc. It also assumes ds=es=data space, this should be - * normal. Most of the string-functions are rather heavily hand-optimized, - * see especially strtok,strstr,str[c]spn. They should work, but are not - * very easy to understand. Everything is done entirely within the register - * set, making the functions fast and clean. String instructions have been - * used through-out, making for "slightly" unclear code :-) - * - * NO Copyright (C) 1991, 1992 Linus Torvalds, - * consider these trivial functions to be PD. - */ - -#define __HAVE_ARCH_STRCPY -extern inline char * strcpy(char * dest,const char *src) -{ -int d0, d1, d2; -__asm__ __volatile__( - "cld\n" - "1:\tlodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b" - : "=&S" (d0), "=&D" (d1), "=&a" (d2) - :"0" (src),"1" (dest) : "memory"); -return dest; -} - -#define __HAVE_ARCH_STRNCPY -extern inline char * strncpy(char * dest,const char *src,size_t count) -{ -int d0, d1, d2, d3; -__asm__ __volatile__( - "cld\n" - "1:\tdecl %2\n\t" - "js 2f\n\t" - "lodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n\t" - "rep\n\t" - "stosb\n" - "2:" - : "=&S" (d0), "=&D" (d1), "=&c" (d2), "=&a" (d3) - :"0" (src),"1" (dest),"2" (count) : "memory"); -return dest; -} - -#define __HAVE_ARCH_STRCAT -extern inline char * strcat(char * dest,const char * src) -{ -int d0, d1, d2, d3; -__asm__ __volatile__( - "cld\n\t" - "repne\n\t" - "scasb\n\t" - "decl %1\n" - "1:\tlodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b" - : "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3) - : "0" (src), "1" (dest), "2" (0), "3" (0xffffffff):"memory"); -return dest; -} - -#define __HAVE_ARCH_STRNCAT -extern inline char * strncat(char * dest,const char * src,size_t count) -{ -int d0, d1, d2, d3; -__asm__ __volatile__( - "cld\n\t" - "repne\n\t" - "scasb\n\t" - "decl %1\n\t" - "movl %8,%3\n" - "1:\tdecl %3\n\t" - "js 2f\n\t" - "lodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n" - "2:\txorl %2,%2\n\t" - "stosb" - : "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3) - : "0" (src),"1" (dest),"2" (0),"3" (0xffffffff), "g" (count) - : "memory"); -return dest; -} - -#define __HAVE_ARCH_STRCMP -extern inline int strcmp(const char * cs,const char * ct) -{ -int d0, d1; -register int __res; -__asm__ __volatile__( - "cld\n" - "1:\tlodsb\n\t" - "scasb\n\t" - "jne 2f\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n\t" - "xorl %%eax,%%eax\n\t" - "jmp 3f\n" - "2:\tsbbl %%eax,%%eax\n\t" - "orb $1,%%al\n" - "3:" - :"=a" (__res), "=&S" (d0), "=&D" (d1) - :"1" (cs),"2" (ct)); -return __res; -} - -#define __HAVE_ARCH_STRNCMP -extern inline int strncmp(const char * cs,const char * ct,size_t count) -{ -register int __res; -int d0, d1, d2; -__asm__ __volatile__( - "cld\n" - "1:\tdecl %3\n\t" - "js 2f\n\t" - "lodsb\n\t" - "scasb\n\t" - "jne 3f\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n" - "2:\txorl %%eax,%%eax\n\t" - "jmp 4f\n" - "3:\tsbbl %%eax,%%eax\n\t" - "orb $1,%%al\n" - "4:" - :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2) - :"1" (cs),"2" (ct),"3" (count)); -return __res; -} - -#define __HAVE_ARCH_STRCHR -extern inline char * strchr(const char * s, int c) -{ -int d0; -register char * __res; -__asm__ __volatile__( - "cld\n\t" - "movb %%al,%%ah\n" - "1:\tlodsb\n\t" - "cmpb %%ah,%%al\n\t" - "je 2f\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n\t" - "movl $1,%1\n" - "2:\tmovl %1,%0\n\t" - "decl %0" - :"=a" (__res), "=&S" (d0) : "1" (s),"0" (c)); -return __res; -} - -#define __HAVE_ARCH_STRRCHR -extern inline char * strrchr(const char * s, int c) -{ -int d0, d1; -register char * __res; -__asm__ __volatile__( - "cld\n\t" - "movb %%al,%%ah\n" - "1:\tlodsb\n\t" - "cmpb %%ah,%%al\n\t" - "jne 2f\n\t" - "leal -1(%%esi),%0\n" - "2:\ttestb %%al,%%al\n\t" - "jne 1b" - :"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c)); -return __res; -} - -#define __HAVE_ARCH_STRLEN -extern inline size_t strlen(const char * s) -{ -int d0; -register int __res; -__asm__ __volatile__( - "cld\n\t" - "repne\n\t" - "scasb\n\t" - "notl %0\n\t" - "decl %0" - :"=c" (__res), "=&D" (d0) :"1" (s),"a" (0), "0" (0xffffffff)); -return __res; -} - -extern inline void * __memcpy(void * to, const void * from, size_t n) -{ -int d0, d1, d2; -__asm__ __volatile__( - "cld\n\t" - "rep ; movsl\n\t" - "testb $2,%b4\n\t" - "je 1f\n\t" - "movsw\n" - "1:\ttestb $1,%b4\n\t" - "je 2f\n\t" - "movsb\n" - "2:" - : "=&c" (d0), "=&D" (d1), "=&S" (d2) - :"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from) - : "memory"); -return (to); -} - -/* - * This looks horribly ugly, but the compiler can optimize it totally, - * as the count is constant. - */ -extern inline void * __constant_memcpy(void * to, const void * from, size_t n) -{ - switch (n) { - case 0: - return to; - case 1: - *(unsigned char *)to = *(const unsigned char *)from; - return to; - case 2: - *(unsigned short *)to = *(const unsigned short *)from; - return to; - case 3: - *(unsigned short *)to = *(const unsigned short *)from; - *(2+(unsigned char *)to) = *(2+(const unsigned char *)from); - return to; - case 4: - *(unsigned long *)to = *(const unsigned long *)from; - return to; - case 6: /* for Ethernet addresses */ - *(unsigned long *)to = *(const unsigned long *)from; - *(2+(unsigned short *)to) = *(2+(const unsigned short *)from); - return to; - case 8: - *(unsigned long *)to = *(const unsigned long *)from; - *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); - return to; - case 12: - *(unsigned long *)to = *(const unsigned long *)from; - *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); - *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); - return to; - case 16: - *(unsigned long *)to = *(const unsigned long *)from; - *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); - *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); - *(3+(unsigned long *)to) = *(3+(const unsigned long *)from); - return to; - case 20: - *(unsigned long *)to = *(const unsigned long *)from; - *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); - *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); - *(3+(unsigned long *)to) = *(3+(const unsigned long *)from); - *(4+(unsigned long *)to) = *(4+(const unsigned long *)from); - return to; - } -#define COMMON(x) \ -__asm__ __volatile__( \ - "cld\n\t" \ - "rep ; movsl" \ - x \ - : "=&c" (d0), "=&D" (d1), "=&S" (d2) \ - : "0" (n/4),"1" ((long) to),"2" ((long) from) \ - : "memory"); -{ - int d0, d1, d2; - switch (n % 4) { - case 0: COMMON(""); return to; - case 1: COMMON("\n\tmovsb"); return to; - case 2: COMMON("\n\tmovsw"); return to; - default: COMMON("\n\tmovsw\n\tmovsb"); return to; - } -} - -#undef COMMON -} - -#define __HAVE_ARCH_MEMCPY -#define memcpy(t, f, n) \ -(__builtin_constant_p(n) ? \ - __constant_memcpy((t),(f),(n)) : \ - __memcpy((t),(f),(n))) - -#define __HAVE_ARCH_MEMMOVE -extern inline void * memmove(void * dest,const void * src, size_t n) -{ -int d0, d1, d2; -if (dest #include -#include -#include #include #include #include diff --git a/reactos/ntoskrnl/io/create.c b/reactos/ntoskrnl/io/create.c index af075c11915..a43ed4b28b3 100644 --- a/reactos/ntoskrnl/io/create.c +++ b/reactos/ntoskrnl/io/create.c @@ -1,4 +1,4 @@ -/* $Id: create.c,v 1.32 2000/10/07 13:41:51 dwelch Exp $ +/* $Id: create.c,v 1.33 2000/10/22 16:36:50 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -15,7 +15,6 @@ #include #include #include -#include #define NDEBUG #include @@ -137,10 +136,8 @@ IopCreateFile ( } DeviceObject = IoGetAttachedDevice(DeviceObject); } - RtlInitUnicodeString ( - & (FileObject->FileName), - wcsdup (RemainingPath) - ); + RtlCreateUnicodeString(&(FileObject->FileName), + RemainingPath); } DPRINT( "FileObject->FileName.Buffer %S\n", diff --git a/reactos/ntoskrnl/io/device.c b/reactos/ntoskrnl/io/device.c index 0fc96c5409b..06e2930b42d 100644 --- a/reactos/ntoskrnl/io/device.c +++ b/reactos/ntoskrnl/io/device.c @@ -1,4 +1,4 @@ -/* $Id: device.c,v 1.22 2000/09/12 10:12:11 jean Exp $ +/* $Id: device.c,v 1.23 2000/10/22 16:36:50 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -12,13 +12,10 @@ /* INCLUDES ****************************************************************/ #include - #include #include #include #include -#include -#include #define NDEBUG #include diff --git a/reactos/ntoskrnl/io/irp.c b/reactos/ntoskrnl/io/irp.c index 63218463e04..2fadb346220 100644 --- a/reactos/ntoskrnl/io/irp.c +++ b/reactos/ntoskrnl/io/irp.c @@ -1,4 +1,4 @@ -/* $Id: irp.c,v 1.30 2000/10/11 20:50:34 dwelch Exp $ +/* $Id: irp.c,v 1.31 2000/10/22 16:36:50 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -31,7 +31,6 @@ /* INCLUDES ****************************************************************/ #include -#include #include #include diff --git a/reactos/ntoskrnl/io/rw.c b/reactos/ntoskrnl/io/rw.c index 3390372996e..4aef0c06924 100644 --- a/reactos/ntoskrnl/io/rw.c +++ b/reactos/ntoskrnl/io/rw.c @@ -1,4 +1,4 @@ -/* $Id: rw.c,v 1.32 2000/10/11 20:50:34 dwelch Exp $ +/* $Id: rw.c,v 1.33 2000/10/22 16:36:50 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,8 +13,6 @@ #include #include -#include -#include #include #define NDEBUG diff --git a/reactos/ntoskrnl/io/symlink.c b/reactos/ntoskrnl/io/symlink.c index 443809d7502..4a7fe5a5b0f 100644 --- a/reactos/ntoskrnl/io/symlink.c +++ b/reactos/ntoskrnl/io/symlink.c @@ -1,4 +1,4 @@ -/* $Id: symlink.c,v 1.16 2000/08/24 19:09:12 ekohl Exp $ +/* $Id: symlink.c,v 1.17 2000/10/22 16:36:50 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -14,7 +14,6 @@ #include #include #include -#include #define NDEBUG #include diff --git a/reactos/ntoskrnl/kd/kdebug.c b/reactos/ntoskrnl/kd/kdebug.c index add9f80fdd8..4460def6783 100644 --- a/reactos/ntoskrnl/kd/kdebug.c +++ b/reactos/ntoskrnl/kd/kdebug.c @@ -1,4 +1,4 @@ -/* $Id: kdebug.c,v 1.15 2000/10/07 13:41:51 dwelch Exp $ +/* $Id: kdebug.c,v 1.16 2000/10/22 16:36:50 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -12,8 +12,6 @@ #include #include #include -#include -#include /* serial debug connection */ diff --git a/reactos/ntoskrnl/ke/apc.c b/reactos/ntoskrnl/ke/apc.c index 32e66f07a40..5d7065dc202 100644 --- a/reactos/ntoskrnl/ke/apc.c +++ b/reactos/ntoskrnl/ke/apc.c @@ -12,8 +12,6 @@ /* INCLUDES *****************************************************************/ #include -#include -#include #include #include #include diff --git a/reactos/ntoskrnl/ke/i386/thread.c b/reactos/ntoskrnl/ke/i386/thread.c index 110ce2407a9..4c9c4c34142 100644 --- a/reactos/ntoskrnl/ke/i386/thread.c +++ b/reactos/ntoskrnl/ke/i386/thread.c @@ -13,8 +13,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/reactos/ntoskrnl/ke/main.c b/reactos/ntoskrnl/ke/main.c index 52d4c442051..7ec915e463b 100644 --- a/reactos/ntoskrnl/ke/main.c +++ b/reactos/ntoskrnl/ke/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.65 2000/10/07 20:55:15 ekohl Exp $ +/* $Id: main.c,v 1.66 2000/10/22 16:36:50 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -15,8 +15,6 @@ #include #include #include -#include -#include #include #include #include @@ -24,11 +22,11 @@ #include #include #include - #include #include #include + #define NDEBUG #include diff --git a/reactos/ntoskrnl/ke/timer.c b/reactos/ntoskrnl/ke/timer.c index 54d3c4f5dc6..18a12a46626 100644 --- a/reactos/ntoskrnl/ke/timer.c +++ b/reactos/ntoskrnl/ke/timer.c @@ -1,4 +1,4 @@ -/* $Id: timer.c,v 1.35 2000/10/07 13:41:52 dwelch Exp $ +/* $Id: timer.c,v 1.36 2000/10/22 16:36:50 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -19,9 +19,6 @@ #include #include -#include -#include -#include #include #include #include diff --git a/reactos/ntoskrnl/ldr/init.c b/reactos/ntoskrnl/ldr/init.c index 2dbf9eb8f12..8d7960c1f78 100644 --- a/reactos/ntoskrnl/ldr/init.c +++ b/reactos/ntoskrnl/ldr/init.c @@ -24,9 +24,6 @@ #include #include #include -#include -#include -#include #include #include diff --git a/reactos/ntoskrnl/ldr/loader.c b/reactos/ntoskrnl/ldr/loader.c index 55e7fbc4dfd..c9cdb669ea1 100644 --- a/reactos/ntoskrnl/ldr/loader.c +++ b/reactos/ntoskrnl/ldr/loader.c @@ -1,4 +1,4 @@ -/* $Id: loader.c,v 1.64 2000/10/08 16:32:53 dwelch Exp $ +/* $Id: loader.c,v 1.65 2000/10/22 16:36:51 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -28,8 +28,6 @@ #include #include #include -#include -#include #define NDEBUG #include @@ -79,7 +77,6 @@ VOID LdrInitModuleManagement(VOID) HANDLE DirHandle, ModuleHandle; NTSTATUS Status; WCHAR NameBuffer[60]; - ANSI_STRING AnsiString; UNICODE_STRING ModuleName; OBJECT_ATTRIBUTES ObjectAttributes; PIMAGE_DOS_HEADER DosHeader; @@ -102,8 +99,7 @@ VOID LdrInitModuleManagement(VOID) IoDriverObjectType->QueryName = NULL; IoDriverObjectType->OkayToClose = NULL; IoDriverObjectType->Create = LdrCreateModule; - RtlInitAnsiString(&AnsiString, "Module"); - RtlAnsiStringToUnicodeString(&IoDriverObjectType->TypeName, &AnsiString, TRUE); + RtlInitUnicodeString(&IoDriverObjectType->TypeName, L"Module"); /* Create Modules object directory */ wcscpy(NameBuffer, MODULE_ROOT_NAME); @@ -145,7 +141,8 @@ VOID LdrInitModuleManagement(VOID) ModuleObject->Base = (PVOID) KERNEL_BASE; ModuleObject->Flags = MODULE_FLAG_PE; InsertTailList(&ModuleListHead, &ModuleObject->ListEntry); - ModuleObject->Name = wcsdup(L"ntoskrnl.exe"); + RtlCreateUnicodeString(&ModuleObject->Name, + L"ntoskrnl.exe"); DosHeader = (PIMAGE_DOS_HEADER) KERNEL_BASE; ModuleObject->Image.PE.FileHeader = (PIMAGE_FILE_HEADER) ((DWORD) ModuleObject->Base + @@ -300,7 +297,6 @@ LdrLoadModule(PUNICODE_STRING Filename) PMODULE_OBJECT ModuleObject; FILE_STANDARD_INFORMATION FileStdInfo; WCHAR NameBuffer[60]; -// PWSTR RemainingPath; UNICODE_STRING ModuleName; /* Check for module already loaded */ @@ -816,7 +812,7 @@ LdrPEProcessModule(PVOID ModuleLoadBase, PUNICODE_STRING pModuleName) ModuleObject->Base = DriverBase; ModuleObject->Flags = MODULE_FLAG_PE; InsertTailList(&ModuleListHead, &ModuleObject->ListEntry); - ModuleObject->Name = wcsdup(NameBuffer); + RtlCreateUnicodeString(&ModuleObject->Name, NameBuffer); ModuleObject->EntryPoint = (PVOID) ((DWORD)DriverBase + PEOptionalHeader->AddressOfEntryPoint); ModuleObject->Length = DriverSize; diff --git a/reactos/ntoskrnl/ldr/rtl.c b/reactos/ntoskrnl/ldr/rtl.c index 89fb78e83c9..e649c988766 100644 --- a/reactos/ntoskrnl/ldr/rtl.c +++ b/reactos/ntoskrnl/ldr/rtl.c @@ -1,4 +1,4 @@ -/* $Id: rtl.c,v 1.10 2000/08/28 21:49:11 ekohl Exp $ +/* $Id: rtl.c,v 1.11 2000/10/22 16:36:51 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -15,8 +15,6 @@ #include #include #include -#include -#include #include #define NDEBUG diff --git a/reactos/ntoskrnl/ldr/sysdll.c b/reactos/ntoskrnl/ldr/sysdll.c index b29e8595e3c..f503df9335b 100644 --- a/reactos/ntoskrnl/ldr/sysdll.c +++ b/reactos/ntoskrnl/ldr/sysdll.c @@ -16,8 +16,6 @@ #include #include #include -#include -#include #include #define NDEBUG diff --git a/reactos/ntoskrnl/ldr/userldr.c b/reactos/ntoskrnl/ldr/userldr.c index 322b1f9e70b..09e4e20b0af 100644 --- a/reactos/ntoskrnl/ldr/userldr.c +++ b/reactos/ntoskrnl/ldr/userldr.c @@ -16,8 +16,6 @@ #include #include #include -#include -#include #include #include diff --git a/reactos/ntoskrnl/lpc/close.c b/reactos/ntoskrnl/lpc/close.c index 99c81791fde..cdbfb621a51 100644 --- a/reactos/ntoskrnl/lpc/close.c +++ b/reactos/ntoskrnl/lpc/close.c @@ -1,4 +1,4 @@ -/* $Id: close.c,v 1.1 2000/06/04 17:27:39 ea Exp $ +/* $Id: close.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,8 +13,6 @@ #include #include -#include -#include #include #include diff --git a/reactos/ntoskrnl/lpc/complete.c b/reactos/ntoskrnl/lpc/complete.c index 43ac0430bb6..86f537759c1 100644 --- a/reactos/ntoskrnl/lpc/complete.c +++ b/reactos/ntoskrnl/lpc/complete.c @@ -1,4 +1,4 @@ -/* $Id: complete.c,v 1.1 2000/06/04 17:27:39 ea Exp $ +/* $Id: complete.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,8 +13,6 @@ #include #include -#include -#include #include #include diff --git a/reactos/ntoskrnl/lpc/connect.c b/reactos/ntoskrnl/lpc/connect.c index fe525e3492c..d4cb034fce4 100644 --- a/reactos/ntoskrnl/lpc/connect.c +++ b/reactos/ntoskrnl/lpc/connect.c @@ -1,4 +1,4 @@ -/* $Id: connect.c,v 1.1 2000/06/04 17:27:39 ea Exp $ +/* $Id: connect.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,8 +13,6 @@ #include #include -#include -#include #include #include diff --git a/reactos/ntoskrnl/lpc/create.c b/reactos/ntoskrnl/lpc/create.c index 230b1893d3e..1ffb5fc1d51 100644 --- a/reactos/ntoskrnl/lpc/create.c +++ b/reactos/ntoskrnl/lpc/create.c @@ -1,4 +1,4 @@ -/* $Id: create.c,v 1.1 2000/06/04 17:27:39 ea Exp $ +/* $Id: create.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,8 +13,6 @@ #include #include -#include -#include #include #include diff --git a/reactos/ntoskrnl/lpc/listen.c b/reactos/ntoskrnl/lpc/listen.c index da11ee223e6..bcd8bda0db5 100644 --- a/reactos/ntoskrnl/lpc/listen.c +++ b/reactos/ntoskrnl/lpc/listen.c @@ -1,4 +1,4 @@ -/* $Id: listen.c,v 1.1 2000/06/04 17:27:39 ea Exp $ +/* $Id: listen.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,8 +13,6 @@ #include #include -#include -#include #include #include diff --git a/reactos/ntoskrnl/lpc/port.c b/reactos/ntoskrnl/lpc/port.c index 257119b220f..d1d33f1cf67 100644 --- a/reactos/ntoskrnl/lpc/port.c +++ b/reactos/ntoskrnl/lpc/port.c @@ -1,4 +1,4 @@ -/* $Id: port.c,v 1.2 2000/06/29 23:35:40 dwelch Exp $ +/* $Id: port.c,v 1.3 2000/10/22 16:36:51 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -18,8 +18,6 @@ #include #include -#include -#include #include #include diff --git a/reactos/ntoskrnl/lpc/query.c b/reactos/ntoskrnl/lpc/query.c index aeeb37f79a7..e4769d1626c 100644 --- a/reactos/ntoskrnl/lpc/query.c +++ b/reactos/ntoskrnl/lpc/query.c @@ -1,4 +1,4 @@ -/* $Id: query.c,v 1.1 2000/06/04 17:27:39 ea Exp $ +/* $Id: query.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,8 +13,6 @@ #include #include -#include -#include #include #include diff --git a/reactos/ntoskrnl/lpc/queue.c b/reactos/ntoskrnl/lpc/queue.c index 0f00913ba84..bb408690c07 100644 --- a/reactos/ntoskrnl/lpc/queue.c +++ b/reactos/ntoskrnl/lpc/queue.c @@ -1,4 +1,4 @@ -/* $Id: queue.c,v 1.1 2000/06/04 17:27:39 ea Exp $ +/* $Id: queue.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,8 +13,6 @@ #include #include -#include -#include #include #include diff --git a/reactos/ntoskrnl/lpc/receive.c b/reactos/ntoskrnl/lpc/receive.c index 0abb46e98a8..377d9e4c94b 100644 --- a/reactos/ntoskrnl/lpc/receive.c +++ b/reactos/ntoskrnl/lpc/receive.c @@ -1,4 +1,4 @@ -/* $Id: receive.c,v 1.1 2000/06/04 17:27:39 ea Exp $ +/* $Id: receive.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,8 +13,6 @@ #include #include -#include -#include #include #include diff --git a/reactos/ntoskrnl/lpc/reply.c b/reactos/ntoskrnl/lpc/reply.c index 3ea03b617d1..8d002a770f0 100644 --- a/reactos/ntoskrnl/lpc/reply.c +++ b/reactos/ntoskrnl/lpc/reply.c @@ -1,4 +1,4 @@ -/* $Id: reply.c,v 1.1 2000/06/04 17:27:39 ea Exp $ +/* $Id: reply.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,8 +13,6 @@ #include #include -#include -#include #include #include diff --git a/reactos/ntoskrnl/lpc/send.c b/reactos/ntoskrnl/lpc/send.c index 903b15b14bc..781217ce22c 100644 --- a/reactos/ntoskrnl/lpc/send.c +++ b/reactos/ntoskrnl/lpc/send.c @@ -1,4 +1,4 @@ -/* $Id: send.c,v 1.2 2000/06/29 23:35:40 dwelch Exp $ +/* $Id: send.c,v 1.3 2000/10/22 16:36:51 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,8 +13,6 @@ #include #include -#include -#include #include #include diff --git a/reactos/ntoskrnl/mm/freelist.c b/reactos/ntoskrnl/mm/freelist.c index b20919eb1e4..12f0eb49cde 100644 --- a/reactos/ntoskrnl/mm/freelist.c +++ b/reactos/ntoskrnl/mm/freelist.c @@ -11,7 +11,6 @@ /* INCLUDES ****************************************************************/ -#include #include #include #include diff --git a/reactos/ntoskrnl/mm/i386/page.c b/reactos/ntoskrnl/mm/i386/page.c index b82276d7e6a..e8f0003147d 100644 --- a/reactos/ntoskrnl/mm/i386/page.c +++ b/reactos/ntoskrnl/mm/i386/page.c @@ -1,4 +1,4 @@ -/* $Id: page.c,v 1.15 2000/10/07 13:41:53 dwelch Exp $ +/* $Id: page.c,v 1.16 2000/10/22 16:36:52 ekohl Exp $ * * COPYRIGHT: See COPYING in the top directory * PROJECT: ReactOS kernel @@ -14,7 +14,6 @@ #include #include #include -#include #include #include diff --git a/reactos/ntoskrnl/mm/kmap.c b/reactos/ntoskrnl/mm/kmap.c index 0270ec6dc87..367fdd97ea0 100644 --- a/reactos/ntoskrnl/mm/kmap.c +++ b/reactos/ntoskrnl/mm/kmap.c @@ -1,4 +1,4 @@ -/* $Id: kmap.c,v 1.3 2000/08/20 17:02:08 dwelch Exp $ +/* $Id: kmap.c,v 1.4 2000/10/22 16:36:51 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -10,9 +10,6 @@ /* INCLUDES ****************************************************************/ #include -#include -#include -#include #include #include #include diff --git a/reactos/ntoskrnl/mm/mdl.c b/reactos/ntoskrnl/mm/mdl.c index f322c995fce..d6efd569fd2 100644 --- a/reactos/ntoskrnl/mm/mdl.c +++ b/reactos/ntoskrnl/mm/mdl.c @@ -1,4 +1,4 @@ -/* $Id: mdl.c,v 1.25 2000/08/20 17:02:08 dwelch Exp $ +/* $Id: mdl.c,v 1.26 2000/10/22 16:36:51 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -14,7 +14,6 @@ #include #include #include -#include #include #define NDEBUG diff --git a/reactos/ntoskrnl/mm/mm.c b/reactos/ntoskrnl/mm/mm.c index 3ae890f16ad..670fb0f9477 100644 --- a/reactos/ntoskrnl/mm/mm.c +++ b/reactos/ntoskrnl/mm/mm.c @@ -1,4 +1,4 @@ -/* $Id: mm.c,v 1.38 2000/10/22 13:28:20 ekohl Exp $ +/* $Id: mm.c,v 1.39 2000/10/22 16:36:52 ekohl Exp $ * * COPYRIGHT: See COPYING in the top directory * PROJECT: ReactOS kernel @@ -13,13 +13,9 @@ #include #include -#include #include -#include -#include #include #include -#include #include #include #include diff --git a/reactos/ntoskrnl/mm/mminit.c b/reactos/ntoskrnl/mm/mminit.c index 379a8ee42f4..488d88eefc7 100644 --- a/reactos/ntoskrnl/mm/mminit.c +++ b/reactos/ntoskrnl/mm/mminit.c @@ -1,4 +1,4 @@ -/* $Id: mminit.c,v 1.9 2000/10/22 13:28:20 ekohl Exp $ +/* $Id: mminit.c,v 1.10 2000/10/22 16:36:52 ekohl Exp $ * * COPYRIGHT: See COPYING in the top directory * PROJECT: ReactOS kernel @@ -13,13 +13,9 @@ #include #include -#include #include -#include -#include #include #include -#include #include #include #include diff --git a/reactos/ntoskrnl/mm/mpw.c b/reactos/ntoskrnl/mm/mpw.c index 73f2dd892eb..e3da8ec6afa 100644 --- a/reactos/ntoskrnl/mm/mpw.c +++ b/reactos/ntoskrnl/mm/mpw.c @@ -1,4 +1,4 @@ -/* $Id: mpw.c,v 1.3 2000/08/18 22:27:03 dwelch Exp $ +/* $Id: mpw.c,v 1.4 2000/10/22 16:36:52 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -16,8 +16,6 @@ #include #include #include -#include -#include #define NDEBUG #include diff --git a/reactos/ntoskrnl/mm/npool.c b/reactos/ntoskrnl/mm/npool.c index d4ec69e725e..bc721490e01 100644 --- a/reactos/ntoskrnl/mm/npool.c +++ b/reactos/ntoskrnl/mm/npool.c @@ -1,4 +1,4 @@ -/* $Id: npool.c,v 1.31 2000/08/20 17:02:08 dwelch Exp $ +/* $Id: npool.c,v 1.32 2000/10/22 16:36:52 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -17,9 +17,6 @@ /* INCLUDES ****************************************************************/ #include -#include -#include -#include #include #include #include diff --git a/reactos/ntoskrnl/mm/pager.c b/reactos/ntoskrnl/mm/pager.c index 014ce006d01..e046be10c74 100644 --- a/reactos/ntoskrnl/mm/pager.c +++ b/reactos/ntoskrnl/mm/pager.c @@ -1,4 +1,4 @@ -/* $Id: pager.c,v 1.4 2000/07/19 14:18:19 dwelch Exp $ +/* $Id: pager.c,v 1.5 2000/10/22 16:36:52 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -16,8 +16,6 @@ #include #include #include -#include -#include #define NDEBUG #include diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 1dcd750d3e1..e7200114403 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -1,4 +1,4 @@ -/* $Id: section.c,v 1.38 2000/08/20 17:02:08 dwelch Exp $ +/* $Id: section.c,v 1.39 2000/10/22 16:36:52 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -17,7 +17,6 @@ #include #include #include -#include #define NDEBUG #include diff --git a/reactos/ntoskrnl/mm/virtual.c b/reactos/ntoskrnl/mm/virtual.c index dfa01a3a34d..cfbbd4a390f 100644 --- a/reactos/ntoskrnl/mm/virtual.c +++ b/reactos/ntoskrnl/mm/virtual.c @@ -1,4 +1,4 @@ -/* $Id: virtual.c,v 1.34 2000/08/20 17:02:09 dwelch Exp $ +/* $Id: virtual.c,v 1.35 2000/10/22 16:36:52 ekohl Exp $ * * COPYRIGHT: See COPYING in the top directory * PROJECT: ReactOS kernel @@ -19,8 +19,6 @@ #include #include #include -#include -#include #define NDEBUG #include diff --git a/reactos/ntoskrnl/ob/dirobj.c b/reactos/ntoskrnl/ob/dirobj.c index ddcec8e6c6a..78606ac54b7 100644 --- a/reactos/ntoskrnl/ob/dirobj.c +++ b/reactos/ntoskrnl/ob/dirobj.c @@ -1,4 +1,4 @@ -/* $Id: dirobj.c,v 1.8 2000/03/26 22:00:09 dwelch Exp $ +/* $Id: dirobj.c,v 1.9 2000/10/22 16:36:52 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -11,11 +11,9 @@ /* INCLUDES ***************************************************************/ -#include #include #include #include -#include #define NDEBUG #include diff --git a/reactos/ntoskrnl/ob/handle.c b/reactos/ntoskrnl/ob/handle.c index 32331c1cfcb..53d773be8f0 100644 --- a/reactos/ntoskrnl/ob/handle.c +++ b/reactos/ntoskrnl/ob/handle.c @@ -1,4 +1,4 @@ -/* $Id: handle.c,v 1.24 2000/08/19 01:21:17 ekohl Exp $ +/* $Id: handle.c,v 1.25 2000/10/22 16:36:53 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -13,8 +13,6 @@ #include #include -#include -#include #include #define NDEBUG diff --git a/reactos/ntoskrnl/ob/namespc.c b/reactos/ntoskrnl/ob/namespc.c index e6e4584c845..151618d47d1 100644 --- a/reactos/ntoskrnl/ob/namespc.c +++ b/reactos/ntoskrnl/ob/namespc.c @@ -11,11 +11,9 @@ /* INCLUDES ***************************************************************/ #include -#include #include #include #include -#include #define NDEBUG #include @@ -82,7 +80,7 @@ VOID STDCALL ObAddEntryDirectory(PDIRECTORY_OBJECT Parent, KIRQL oldlvl; POBJECT_HEADER Header = BODY_TO_HEADER(Object); - RtlInitUnicodeString(&Header->Name, wcsdup(Name)); + RtlCreateUnicodeString(&Header->Name, Name); Header->Parent = Parent; KeAcquireSpinLock(&Parent->Lock, &oldlvl); diff --git a/reactos/ntoskrnl/ob/ntobj.c b/reactos/ntoskrnl/ob/ntobj.c index 685fd050af5..8a771b7bfe9 100644 --- a/reactos/ntoskrnl/ob/ntobj.c +++ b/reactos/ntoskrnl/ob/ntobj.c @@ -1,4 +1,4 @@ -/* $Id: ntobj.c,v 1.6 2000/05/09 21:30:06 ekohl Exp $ +/* $Id: ntobj.c,v 1.7 2000/10/22 16:36:53 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -11,10 +11,8 @@ /* INCLUDES *****************************************************************/ -#include #include #include -#include #define NDEBUG #include diff --git a/reactos/ntoskrnl/ob/object.c b/reactos/ntoskrnl/ob/object.c index be575512667..792e514353d 100644 --- a/reactos/ntoskrnl/ob/object.c +++ b/reactos/ntoskrnl/ob/object.c @@ -1,4 +1,4 @@ -/* $Id: object.c,v 1.28 2000/10/07 13:41:53 dwelch Exp $ +/* $Id: object.c,v 1.29 2000/10/22 16:36:53 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -11,10 +11,8 @@ /* INCLUDES *****************************************************************/ -#include #include #include -#include #include #include #include diff --git a/reactos/ntoskrnl/ob/security.c b/reactos/ntoskrnl/ob/security.c index 65256f0dfe2..cee86ef9270 100644 --- a/reactos/ntoskrnl/ob/security.c +++ b/reactos/ntoskrnl/ob/security.c @@ -2,7 +2,7 @@ * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: Security manager - * FILE: kernel/ob/object.c + * FILE: ntoskrnl/ob/security.c * PROGRAMER: ? * REVISION HISTORY: * 26/07/98: Added stubs for security functions @@ -11,7 +11,6 @@ /* INCLUDES *****************************************************************/ #include - #include #include diff --git a/reactos/ntoskrnl/ps/create.c b/reactos/ntoskrnl/ps/create.c index 27f990120fd..1f0fbb3794a 100644 --- a/reactos/ntoskrnl/ps/create.c +++ b/reactos/ntoskrnl/ps/create.c @@ -1,4 +1,4 @@ -/* $Id: create.c,v 1.23 2000/10/07 13:41:54 dwelch Exp $ +/* $Id: create.c,v 1.24 2000/10/22 16:36:53 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index 96f25f36298..99b5b8b55ce 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -1,4 +1,4 @@ -/* $Id: process.c,v 1.53 2000/10/07 13:41:54 dwelch Exp $ +/* $Id: process.c,v 1.54 2000/10/22 16:36:53 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/reactos/ntoskrnl/ps/thread.c b/reactos/ntoskrnl/ps/thread.c index 124f326c3e2..887543959d4 100644 --- a/reactos/ntoskrnl/ps/thread.c +++ b/reactos/ntoskrnl/ps/thread.c @@ -1,4 +1,4 @@ -/* $Id: thread.c,v 1.58 2000/10/11 20:50:35 dwelch Exp $ +/* $Id: thread.c,v 1.59 2000/10/22 16:36:53 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/reactos/ntoskrnl/rtl/mem.c b/reactos/ntoskrnl/rtl/mem.c index 537e9a1ba5d..fc4f24cdf82 100644 --- a/reactos/ntoskrnl/rtl/mem.c +++ b/reactos/ntoskrnl/rtl/mem.c @@ -1,4 +1,4 @@ -/* $Id: mem.c,v 1.8 2000/02/21 22:41:45 ekohl Exp $ +/* $Id: mem.c,v 1.9 2000/10/22 16:36:53 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -12,8 +12,6 @@ /* INCLUDES *****************************************************************/ #include -#include -#include #define NDEBUG #include diff --git a/reactos/ntoskrnl/rtl/wstring.c b/reactos/ntoskrnl/rtl/wstring.c index c0abdb6ade0..ee59a519641 100644 --- a/reactos/ntoskrnl/rtl/wstring.c +++ b/reactos/ntoskrnl/rtl/wstring.c @@ -13,8 +13,6 @@ /* INCLUDES *****************************************************************/ #include -#include -#include #define NDEBUG #include @@ -180,17 +178,6 @@ size_t wcscspn(const wchar_t *str,const wchar_t *reject) } -/* this function is NOT exported */ -wchar_t* wcsdup(wchar_t* src) -{ - wchar_t* dest; - - dest = ExAllocatePool (NonPagedPool, (wcslen (src)+1)*2); - wcscpy (dest,src); - return (dest); -} - - size_t wcslen(const wchar_t *s) { unsigned int len = 0;