-/* $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
*/
-#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
ULONG ProcessorNumber
);
+BOOLEAN
+STDCALL
+HalInitSystem (
+ ULONG BootPhase,
+ PLOADER_PARAMETER_BLOCK LoaderBlock
+ );
+
BOOLEAN
STDCALL
HalMakeBeep (
WRITE_PORT_USHORT (PUSHORT Port, USHORT Value);
-#endif /* __INCLUDE_INTERNAL_HAL_DDK_H */
+#endif /* __INCLUDE_DDK_HALDDK_H */
-# $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
#
-nostartfiles -nostdlib \
-mdll \
-o junk.tmp \
+ -Wl,--subsystem,native \
-Wl,--image-base,0xc0000000 \
-Wl,--file-alignment,0x1000 \
-Wl,--section-alignment,0x1000 \
-Wl,-T,ntoskrnl.lnk \
-mdll \
-o $(TARGETNAME).nostrip.exe \
+ -Wl,--subsystem,native \
-Wl,--image-base,0xc0000000 \
-Wl,--file-alignment,0x1000 \
-Wl,--section-alignment,0x1000 \
-nostartfiles -nostdlib \
-mdll \
-o junk.tmp \
+ -Wl,--subsystem,native \
-Wl,--image-base,0xc0000000 \
-Wl,--file-alignment,0x1000 \
-Wl,--section-alignment,0x1000 \
-nostartfiles -nostdlib \
-mdll \
-o $(TARGETNAME).exe \
+ -Wl,--subsystem,native \
-Wl,--image-base,0xc0000000 \
-Wl,--file-alignment,0x1000 \
-Wl,--section-alignment,0x1000 \
-/* $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
#include <defines.h>
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <wchar.h>
#define NDEBUG
#include <internal/debug.h>
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
-
#include <internal/debug.h>
-#include <string.h>
-#include <internal/string.h>
-#include <internal/ntoskrnl.h> /* for sprintf */
+
static PCHAR SeverityCodes[] = {"SUC", "INF", "ERR", "WRN"};
-/* $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
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
-#include <string.h>
#include <internal/kd.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ke.h>
-#include <stddef.h>
-#include <internal/string.h>
#define NDEBUG
#include <internal/debug.h>
-/* $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
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
-#include <ddk/zwtypes.h>
-#include <string.h>
#include <internal/ex.h>
#include <internal/ldr.h>
-/* $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:
#include <ddk/ntddk.h>
#include <internal/ex.h>
-#include <string.h>
#include <internal/debug.h>
#include <ddk/ntddk.h>
#include <internal/mm.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/mmhal.h>
#include <internal/i386/segment.h>
#include <internal/i386/hal.h>
+
/* TYPES ******************************************************************/
typedef struct
#ifndef __INTERNAL_DEBUG
#define __INTERNAL_DEBUG
-#include <internal/string.h>
#include <internal/ntoskrnl.h>
#define UNIMPLEMENTED do {DbgPrint("%s at %s:%d is unimplemented, have a nice day\n",__FUNCTION__,__FILE__,__LINE__); for(;;); } while(0);
#error "Unknown processor"
#endif
-BOOLEAN STDCALL HalInitSystem (ULONG BootPhase,
- PLOADER_PARAMETER_BLOCK LoaderBlock);
-
#endif
+++ /dev/null
-#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 <asm/string-486.h>
-#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<src)
-__asm__ __volatile__(
- "cld\n\t"
- "rep\n\t"
- "movsb"
- : "=&c" (d0), "=&S" (d1), "=&D" (d2)
- :"0" (n),"1" (src),"2" (dest)
- : "memory");
-else
-__asm__ __volatile__(
- "std\n\t"
- "rep\n\t"
- "movsb\n\t"
- "cld"
- : "=&c" (d0), "=&S" (d1), "=&D" (d2)
- :"0" (n),
- "1" (n-1+(const char *)src),
- "2" (n-1+(char *)dest)
- :"memory");
-return dest;
-}
-
-#define memcmp __builtin_memcmp
-
-#define __HAVE_ARCH_MEMCHR
-extern inline void * memchr(const void * cs,int c,size_t count)
-{
-int d0;
-register void * __res;
-if (!count)
- return NULL;
-__asm__ __volatile__(
- "cld\n\t"
- "repne\n\t"
- "scasb\n\t"
- "je 1f\n\t"
- "movl $1,%0\n"
- "1:\tdecl %0"
- :"=D" (__res), "=&c" (d0) : "a" (c),"0" (cs),"1" (count));
-return __res;
-}
-
-extern inline void * __memset_generic(void * s, char c,size_t count)
-{
-int d0, d1;
-__asm__ __volatile__(
- "cld\n\t"
- "rep\n\t"
- "stosb"
- : "=&c" (d0), "=&D" (d1)
- :"a" (c),"1" (s),"0" (count)
- :"memory");
-return s;
-}
-
-/* we might want to write optimized versions of these later */
-#define __constant_count_memset(s,c,count) __memset_generic((s),(c),(count))
-
-/*
- * memset(x,0,y) is a reasonably common thing to do, so we want to fill
- * things 32 bits at a time even when we don't know the size of the
- * area at compile-time..
- */
-extern inline void * __constant_c_memset(void * s, unsigned long c, size_t count)
-{
-int d0, d1;
-__asm__ __volatile__(
- "cld\n\t"
- "rep ; stosl\n\t"
- "testb $2,%b3\n\t"
- "je 1f\n\t"
- "stosw\n"
- "1:\ttestb $1,%b3\n\t"
- "je 2f\n\t"
- "stosb\n"
- "2:"
- : "=&c" (d0), "=&D" (d1)
- :"a" (c), "q" (count), "0" (count/4), "1" ((long) s)
- :"memory");
-return (s);
-}
-
-/* Added by Gertjan van Wingerde to make minix and sysv module work */
-#define __HAVE_ARCH_STRNLEN
-extern inline size_t strnlen(const char * s, size_t count)
-{
-int d0;
-register int __res;
-__asm__ __volatile__(
- "movl %2,%0\n\t"
- "jmp 2f\n"
- "1:\tcmpb $0,(%0)\n\t"
- "je 3f\n\t"
- "incl %0\n"
- "2:\tdecl %1\n\t"
- "cmpl $-1,%1\n\t"
- "jne 1b\n"
- "3:\tsubl %2,%0"
- :"=a" (__res), "=&d" (d0)
- :"c" (s),"1" (count));
-return __res;
-}
-/* end of additional stuff */
-
-/*
- * This looks horribly ugly, but the compiler can optimize it totally,
- * as we by now know that both pattern and count is constant..
- */
-extern inline void * __constant_c_and_count_memset(void * s, unsigned long pattern, size_t count)
-{
- switch (count) {
- case 0:
- return s;
- case 1:
- *(unsigned char *)s = pattern;
- return s;
- case 2:
- *(unsigned short *)s = pattern;
- return s;
- case 3:
- *(unsigned short *)s = pattern;
- *(2+(unsigned char *)s) = pattern;
- return s;
- case 4:
- *(unsigned long *)s = pattern;
- return s;
- }
-#define COMMON(x) \
-__asm__ __volatile__("cld\n\t" \
- "rep ; stosl" \
- x \
- : "=&c" (d0), "=&D" (d1) \
- : "a" (pattern),"0" (count/4),"1" ((long) s) \
- : "memory")
-{
- int d0, d1;
- switch (count % 4) {
- case 0: COMMON(""); return s;
- case 1: COMMON("\n\tstosb"); return s;
- case 2: COMMON("\n\tstosw"); return s;
- default: COMMON("\n\tstosw\n\tstosb"); return s;
- }
-}
-
-#undef COMMON
-}
-
-#define __constant_c_x_memset(s, c, count) \
-(__builtin_constant_p(count) ? \
- __constant_c_and_count_memset((s),(c),(count)) : \
- __constant_c_memset((s),(c),(count)))
-
-#define __memset(s, c, count) \
-(__builtin_constant_p(count) ? \
- __constant_count_memset((s),(c),(count)) : \
- __memset_generic((s),(c),(count)))
-
-#define __HAVE_ARCH_MEMSET
-#define memset(s, c, count) \
-(__builtin_constant_p(c) ? \
- __constant_c_x_memset((s),(0x01010101UL*(unsigned char)c),(count)) : \
- __memset((s),(c),(count)))
-
-/*
- * find the first occurrence of byte 'c', or 1 past the area if none
- */
-#define __HAVE_ARCH_MEMSCAN
-extern inline void * memscan(void * addr, int c, size_t size)
-{
- if (!size)
- return addr;
- __asm__("cld
- repnz; scasb
- jnz 1f
- dec %%edi
-1: "
- : "=D" (addr), "=c" (size)
- : "0" (addr), "1" (size), "a" (c));
- return addr;
-}
-
-#endif
-
-#endif
-#endif
CSHORT ObjectType;
CSHORT ObjectSize;
PVOID Base;
- ULONG Length;
+ ULONG Length;
unsigned int Flags;
PVOID EntryPoint;
LIST_ENTRY ListEntry;
- PWSTR Name;
+ UNICODE_STRING Name;
union
- {
+ {
struct
{
unsigned int NumberOfSyms;
+++ /dev/null
-/*
- * Some useful things
- */
-
-#ifndef _INTERNAL_STDDEF_H
-#define _INTERNAL_STDDEF_H
-
-#ifndef NULL
-#define NULL (0)
-#endif
-
-#endif
-
+++ /dev/null
-#ifndef _I386_STRING_H_
-#define _I386_STRING_H_
-
-wchar_t* wcsdup(wchar_t* src);
-
-#if 0
-
-#ifndef _LINUX_TYPES_H
-#include <internal/types.h>
-#endif
-
-#ifndef _INTERNAL_STDDEF_H
-#include <internal/stddef.h>
-#endif
-
-#include <string.h>
-
-/*
- * 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<src)
-__asm__ __volatile__(
- "cld\n\t"
- "rep\n\t"
- "movsb"
- : "=&c" (d0), "=&S" (d1), "=&D" (d2)
- :"0" (n),"1" (src),"2" (dest)
- : "memory");
-else
-__asm__ __volatile__(
- "std\n\t"
- "rep\n\t"
- "movsb\n\t"
- "cld"
- : "=&c" (d0), "=&S" (d1), "=&D" (d2)
- :"0" (n),
- "1" (n-1+(const char *)src),
- "2" (n-1+(char *)dest)
- :"memory");
-return dest;
-}
-
-#define memcmp __builtin_memcmp
-
-#define __HAVE_ARCH_MEMCHR
-extern inline void * memchr(const void * cs,int c,size_t count)
-{
-int d0;
-register void * __res;
-if (!count)
- return NULL;
-__asm__ __volatile__(
- "cld\n\t"
- "repne\n\t"
- "scasb\n\t"
- "je 1f\n\t"
- "movl $1,%0\n"
- "1:\tdecl %0"
- :"=D" (__res), "=&c" (d0) : "a" (c),"0" (cs),"1" (count));
-return __res;
-}
-
-extern inline void * __memset_generic(void * s, char c,size_t count)
-{
-int d0, d1;
-__asm__ __volatile__(
- "cld\n\t"
- "rep\n\t"
- "stosb"
- : "=&c" (d0), "=&D" (d1)
- :"a" (c),"1" (s),"0" (count)
- :"memory");
-return s;
-}
-
-/* we might want to write optimized versions of these later */
-#define __constant_count_memset(s,c,count) __memset_generic((s),(c),(count))
-
-/*
- * memset(x,0,y) is a reasonably common thing to do, so we want to fill
- * things 32 bits at a time even when we don't know the size of the
- * area at compile-time..
- */
-extern inline void * __constant_c_memset(void * s, unsigned long c, size_t count)
-{
-int d0, d1;
-__asm__ __volatile__(
- "cld\n\t"
- "rep ; stosl\n\t"
- "testb $2,%b3\n\t"
- "je 1f\n\t"
- "stosw\n"
- "1:\ttestb $1,%b3\n\t"
- "je 2f\n\t"
- "stosb\n"
- "2:"
- : "=&c" (d0), "=&D" (d1)
- :"a" (c), "q" (count), "0" (count/4), "1" ((long) s)
- :"memory");
-return (s);
-}
-
-/* Added by Gertjan van Wingerde to make minix and sysv module work */
-#define __HAVE_ARCH_STRNLEN
-extern inline size_t strnlen(const char * s, size_t count)
-{
-int d0;
-register int __res;
-__asm__ __volatile__(
- "movl %2,%0\n\t"
- "jmp 2f\n"
- "1:\tcmpb $0,(%0)\n\t"
- "je 3f\n\t"
- "incl %0\n"
- "2:\tdecl %1\n\t"
- "cmpl $-1,%1\n\t"
- "jne 1b\n"
- "3:\tsubl %2,%0"
- :"=a" (__res), "=&d" (d0)
- :"c" (s),"1" (count));
-return __res;
-}
-/* end of additional stuff */
-
-/*
- * This looks horribly ugly, but the compiler can optimize it totally,
- * as we by now know that both pattern and count is constant..
- */
-extern inline void * __constant_c_and_count_memset(void * s, unsigned long pattern, size_t count)
-{
- switch (count) {
- case 0:
- return s;
- case 1:
- *(unsigned char *)s = pattern;
- return s;
- case 2:
- *(unsigned short *)s = pattern;
- return s;
- case 3:
- *(unsigned short *)s = pattern;
- *(2+(unsigned char *)s) = pattern;
- return s;
- case 4:
- *(unsigned long *)s = pattern;
- return s;
- }
-#define COMMON(x) \
-__asm__ __volatile__("cld\n\t" \
- "rep ; stosl" \
- x \
- : "=&c" (d0), "=&D" (d1) \
- : "a" (pattern),"0" (count/4),"1" ((long) s) \
- : "memory")
-{
- int d0, d1;
- switch (count % 4) {
- case 0: COMMON(""); return s;
- case 1: COMMON("\n\tstosb"); return s;
- case 2: COMMON("\n\tstosw"); return s;
- default: COMMON("\n\tstosw\n\tstosb"); return s;
- }
-}
-
-#undef COMMON
-}
-
-#define __constant_c_x_memset(s, c, count) \
-(__builtin_constant_p(count) ? \
- __constant_c_and_count_memset((s),(c),(count)) : \
- __constant_c_memset((s),(c),(count)))
-
-#define __memset(s, c, count) \
-(__builtin_constant_p(count) ? \
- __constant_count_memset((s),(c),(count)) : \
- __memset_generic((s),(c),(count)))
-
-#define __HAVE_ARCH_MEMSET
-#define memset(s, c, count) \
-(__builtin_constant_p(c) ? \
- __constant_c_x_memset((s),(0x01010101UL*(unsigned char)c),(count)) : \
- __memset((s),(c),(count)))
-
-/*
- * find the first occurrence of byte 'c', or 1 past the area if none
- */
-#define __HAVE_ARCH_MEMSCAN
-extern inline void * memscan(void * addr, int c, size_t size)
-{
- if (!size)
- return addr;
- __asm__("cld
- repnz; scasb
- jnz 1f
- dec %%edi
-1: "
- : "=D" (addr), "=c" (size)
- : "0" (addr), "1" (size), "a" (c));
- return addr;
-}
-
-#endif
-
-#endif
#include <ddk/ntddk.h>
#include <internal/io.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/ob.h>
#include <internal/mm.h>
#include <internal/ps.h>
-/* $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
#include <internal/ob.h>
#include <internal/io.h>
#include <internal/id.h>
-#include <internal/string.h>
#define NDEBUG
#include <internal/debug.h>
}
DeviceObject = IoGetAttachedDevice(DeviceObject);
}
- RtlInitUnicodeString (
- & (FileObject->FileName),
- wcsdup (RemainingPath)
- );
+ RtlCreateUnicodeString(&(FileObject->FileName),
+ RemainingPath);
}
DPRINT(
"FileObject->FileName.Buffer %S\n",
-/* $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
/* INCLUDES ****************************************************************/
#include <ddk/ntddk.h>
-
#include <internal/io.h>
#include <internal/ob.h>
#include <internal/ldr.h>
#include <internal/id.h>
-#include <string.h>
-#include <internal/string.h>
#define NDEBUG
#include <internal/debug.h>
-/* $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
/* INCLUDES ****************************************************************/
#include <ddk/ntddk.h>
-#include <string.h>
#include <internal/io.h>
#include <internal/ps.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/io.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/ob.h>
#define NDEBUG
-/* $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
#include <limits.h>
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <wchar.h>
#define NDEBUG
#include <internal/debug.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ntoskrnl.h>
#include <internal/kd.h>
-#include <stdlib.h>
-#include <ctype.h>
/* serial debug connection */
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/i386/segment.h>
#include <internal/ps.h>
#include <internal/ke.h>
#include <ddk/ntddk.h>
#include <internal/ntoskrnl.h>
#include <internal/ps.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/hal.h>
#include <internal/i386/segment.h>
#include <internal/mmhal.h>
-/* $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
#include <internal/ntoskrnl.h>
#include <reactos/buildno.h>
#include <internal/mm.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/module.h>
#include <internal/ldr.h>
#include <internal/ex.h>
#include <internal/hal.h>
#include <internal/ke.h>
#include <internal/io.h>
-
#include <internal/mmhal.h>
#include <internal/i386/segment.h>
#include <napi/shared_data.h>
+
#define NDEBUG
#include <internal/debug.h>
-/* $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
#include <limits.h>
#include <ddk/ntddk.h>
-#include <string.h>
-#include <internal/string.h>
-#include <stdio.h>
#include <internal/ke.h>
#include <internal/id.h>
#include <internal/ps.h>
#include <internal/ntoskrnl.h>
#include <internal/ob.h>
#include <internal/ps.h>
-#include <string.h>
-#include <internal/string.h>
-#include <napi/teb.h>
#include <internal/ldr.h>
#include <napi/teb.h>
-/* $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
#include <internal/mmhal.h>
#include <internal/ob.h>
#include <internal/ps.h>
-#include <string.h>
-#include <internal/string.h>
#define NDEBUG
#include <internal/debug.h>
HANDLE DirHandle, ModuleHandle;
NTSTATUS Status;
WCHAR NameBuffer[60];
- ANSI_STRING AnsiString;
UNICODE_STRING ModuleName;
OBJECT_ATTRIBUTES ObjectAttributes;
PIMAGE_DOS_HEADER DosHeader;
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);
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 +
PMODULE_OBJECT ModuleObject;
FILE_STANDARD_INFORMATION FileStdInfo;
WCHAR NameBuffer[60];
-// PWSTR RemainingPath;
UNICODE_STRING ModuleName;
/* Check for module already loaded */
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;
-/* $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
#include <internal/ntoskrnl.h>
#include <internal/ob.h>
#include <internal/ps.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/ldr.h>
#define NDEBUG
#include <internal/ntoskrnl.h>
#include <internal/ob.h>
#include <internal/ps.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/ldr.h>
#define NDEBUG
#include <internal/ntoskrnl.h>
#include <internal/ob.h>
#include <internal/ps.h>
-#include <string.h>
-#include <internal/string.h>
#include <napi/teb.h>
#include <internal/ldr.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/port.h>
#include <internal/dbg.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/port.h>
#include <internal/dbg.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/port.h>
#include <internal/dbg.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/port.h>
#include <internal/dbg.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/port.h>
#include <internal/dbg.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/port.h>
#include <internal/dbg.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/port.h>
#include <internal/dbg.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/port.h>
#include <internal/dbg.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/port.h>
#include <internal/dbg.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/port.h>
#include <internal/dbg.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/port.h>
#include <internal/dbg.h>
/* INCLUDES ****************************************************************/
-#include <internal/stddef.h>
#include <ddk/ntddk.h>
#include <internal/mm.h>
#include <internal/mmhal.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/mm.h>
#include <internal/mmhal.h>
-#include <string.h>
#include <internal/ex.h>
#include <internal/ps.h>
-/* $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
/* INCLUDES ****************************************************************/
#include <ddk/ntddk.h>
-#include <string.h>
-#include <internal/string.h>
-#include <internal/stddef.h>
#include <internal/mm.h>
#include <internal/mmhal.h>
#include <internal/bitops.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/mm.h>
#include <internal/mmhal.h>
-#include <string.h>
#include <internal/ps.h>
#define NDEBUG
-/* $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
#include <ddk/ntddk.h>
#include <internal/i386/segment.h>
-#include <internal/stddef.h>
#include <internal/mm.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/ntoskrnl.h>
#include <internal/bitops.h>
-#include <internal/string.h>
#include <internal/io.h>
#include <internal/ps.h>
#include <internal/mmhal.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/i386/segment.h>
-#include <internal/stddef.h>
#include <internal/mm.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/ntoskrnl.h>
#include <internal/bitops.h>
-#include <internal/string.h>
#include <internal/io.h>
#include <internal/ps.h>
#include <internal/mmhal.h>
-/* $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
#include <internal/ps.h>
#include <internal/mm.h>
#include <internal/mmhal.h>
-#include <string.h>
-#include <internal/string.h>
#define NDEBUG
#include <internal/debug.h>
-/* $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
/* INCLUDES ****************************************************************/
#include <ddk/ntddk.h>
-#include <string.h>
-#include <internal/string.h>
-#include <internal/stddef.h>
#include <internal/mm.h>
#include <internal/mmhal.h>
#include <internal/bitops.h>
-/* $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
#include <internal/ke.h>
#include <internal/mm.h>
#include <internal/mmhal.h>
-#include <string.h>
-#include <internal/string.h>
#define NDEBUG
#include <internal/debug.h>
-/* $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
#include <internal/ob.h>
#include <internal/io.h>
#include <internal/ps.h>
-#include <wchar.h>
#define NDEBUG
#include <internal/debug.h>
-/* $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
#include <internal/ob.h>
#include <internal/io.h>
#include <internal/ps.h>
-#include <string.h>
-#include <internal/string.h>
#define NDEBUG
#include <internal/debug.h>
-/* $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
/* INCLUDES ***************************************************************/
-#include <wchar.h>
#include <ddk/ntddk.h>
#include <internal/ob.h>
#include <internal/io.h>
-#include <internal/string.h>
#define NDEBUG
#include <internal/debug.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/ps.h>
#define NDEBUG
/* INCLUDES ***************************************************************/
#include <limits.h>
-#include <wchar.h>
#include <ddk/ntddk.h>
#include <internal/ob.h>
#include <internal/io.h>
-#include <internal/string.h>
#define NDEBUG
#include <internal/debug.h>
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);
-/* $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
/* INCLUDES *****************************************************************/
-#include <wchar.h>
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <string.h>
#define NDEBUG
#include <internal/debug.h>
-/* $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
/* INCLUDES *****************************************************************/
-#include <wchar.h>
#include <ddk/ntddk.h>
#include <internal/ob.h>
-#include <internal/string.h>
#include <internal/ps.h>
#include <internal/id.h>
#include <internal/ke.h>
* 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
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
-
#include <internal/ob.h>
#include <internal/debug.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ke.h>
#include <internal/ob.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/hal.h>
#include <internal/ps.h>
#include <internal/ob.h>
-/* $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
#include <internal/mm.h>
#include <internal/ke.h>
#include <internal/ps.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/id.h>
#include <napi/teb.h>
#include <internal/ldr.h>
-/* $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
#include <ddk/ntddk.h>
#include <internal/ke.h>
#include <internal/ob.h>
-#include <string.h>
-#include <internal/string.h>
#include <internal/hal.h>
#include <internal/ps.h>
#include <internal/ob.h>
-/* $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
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
-#include <string.h>
-#include <internal/string.h>
#define NDEBUG
#include <internal/debug.h>
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
-#include <wchar.h>
-#include <ctype.h>
#define NDEBUG
#include <internal/debug.h>
}
-/* 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;