Author: fireball
Date: Thu Nov 8 15:15:39 2007
New Revision: 30267
URL:
http://svn.reactos.org/svn/reactos?rev=30267&view=rev
Log:
- Move ctype into strings.
- Separate msvcrt-specific exception handling routine into prolog.s file.
- Move bsearch to the search directory.
Added:
trunk/reactos/lib/sdk/crt/except/i386/prolog.s (with props)
trunk/reactos/lib/sdk/crt/search/bsearch.c
- copied unchanged from r30266, trunk/reactos/lib/sdk/crt/math/bsearch.c
trunk/reactos/lib/sdk/crt/string/ctype.c
- copied unchanged from r30261, trunk/reactos/lib/sdk/crt/ctype/ctype.c
Removed:
trunk/reactos/lib/sdk/crt/ctype/
trunk/reactos/lib/sdk/crt/math/bsearch.c
Modified:
trunk/reactos/lib/sdk/crt/crt.rbuild
trunk/reactos/lib/sdk/crt/except/i386/seh.s
Modified: trunk/reactos/lib/sdk/crt/crt.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/crt.rbuild?rev…
==============================================================================
--- trunk/reactos/lib/sdk/crt/crt.rbuild (original)
+++ trunk/reactos/lib/sdk/crt/crt.rbuild Thu Nov 8 15:15:39 2007
@@ -23,9 +23,6 @@
<file>putch.c</file>
<file>ungetch.c</file>
</directory>
- <directory name="ctype">
- <file>ctype.c</file>
- </directory>
<directory name="direct">
<file>chdir.c</file>
<file>chdrive.c</file>
@@ -47,6 +44,7 @@
<file>matherr.c</file>
<if property="ARCH" value="i386">
<directory name="i386">
+ <file>prolog.s</file>
<file>seh.s</file>
<file>unwind.c</file>
</directory>
@@ -413,6 +411,7 @@
<file>wcsrchr.c</file>
</ifnot>
<file>atof.c</file>
+ <file>ctype.c</file>
<file>lasttok.c</file>
<file>strcoll.c</file>
<file>strdup.c</file>
Added: trunk/reactos/lib/sdk/crt/except/i386/prolog.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/except/i386/pr…
==============================================================================
--- trunk/reactos/lib/sdk/crt/except/i386/prolog.s (added)
+++ trunk/reactos/lib/sdk/crt/except/i386/prolog.s Thu Nov 8 15:15:39 2007
@@ -1,0 +1,27 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS CRT
+ * FILE: lib/crt/misc/i386/prolog.s
+ * PURPOSE: SEH Support for the CRT
+ * PROGRAMMERS: Wine Development Team
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/asm.h>
+
+/* GLOBALS *******************************************************************/
+
+.globl __EH_prolog
+
+// Copied from Wine.
+__EH_prolog:
+ pushl $-1
+ pushl %eax
+ pushl %fs:0
+ movl %esp, %fs:0
+ movl 12(%esp), %eax
+ movl %ebp, 12(%esp)
+ leal 12(%esp), %ebp
+ pushl %eax
+ ret
Propchange: trunk/reactos/lib/sdk/crt/except/i386/prolog.s
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/lib/sdk/crt/except/i386/seh.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/except/i386/se…
==============================================================================
--- trunk/reactos/lib/sdk/crt/except/i386/seh.s (original)
+++ trunk/reactos/lib/sdk/crt/except/i386/seh.s Thu Nov 8 15:15:39 2007
@@ -56,7 +56,6 @@
.globl __local_unwind2
.globl __except_handler3
-.globl __EH_prolog
// EAX = value to print
_do_debug:
@@ -366,15 +365,3 @@
// We should never get here
ret
-
-// Copied from Wine.
-__EH_prolog:
- pushl $-1
- pushl %eax
- pushl %fs:0
- movl %esp, %fs:0
- movl 12(%esp), %eax
- movl %ebp, 12(%esp)
- leal 12(%esp), %ebp
- pushl %eax
- ret
Removed: trunk/reactos/lib/sdk/crt/math/bsearch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/bsearch.c…
==============================================================================
--- trunk/reactos/lib/sdk/crt/math/bsearch.c (original)
+++ trunk/reactos/lib/sdk/crt/math/bsearch.c (removed)
@@ -1,28 +1,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <stdlib.h>
-
-/*
- * @implemented
- */
-void *
-bsearch(const void *key, const void *base0, size_t nelem,
- size_t size, int (*cmp)(const void *ck, const void *ce))
-{
- char *base = (char *)base0;
- int lim, cmpval;
- void *p;
-
- for (lim = nelem; lim != 0; lim >>= 1)
- {
- p = base + (lim >> 1) * size;
- cmpval = (*cmp)(key, p);
- if (cmpval == 0)
- return p;
- if (cmpval > 0)
- { /* key > p: move right */
- base = (char *)p + size;
- lim--;
- } /* else move left */
- }
- return 0;
-}