mirror of
https://github.com/reactos/reactos.git
synced 2025-05-29 14:08:22 +00:00
SVN maintenance:
Add svn:eol-style = native Add svn:keywords = author date id revision svn path=/trunk/; revision=14855
This commit is contained in:
parent
32d6f2faa4
commit
cc5a10001c
5 changed files with 1335 additions and 1335 deletions
|
@ -103,7 +103,7 @@ KdpGetDebugMode(PCHAR Currentp2)
|
||||||
KdpDebugMode.Serial = TRUE;
|
KdpDebugMode.Serial = TRUE;
|
||||||
|
|
||||||
/* Set the port to use */
|
/* Set the port to use */
|
||||||
SerialPortInfo.ComPort = Value;
|
SerialPortInfo.ComPort = Value;
|
||||||
KdpPort = Value;
|
KdpPort = Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,70 +1,70 @@
|
||||||
.file "longjmp.S"
|
.file "longjmp.S"
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 1998, 1999, Jonathan S. Shapiro.
|
* Copyright (C) 1998, 1999, Jonathan S. Shapiro.
|
||||||
*
|
*
|
||||||
* This file is part of the EROS Operating System.
|
* This file is part of the EROS Operating System.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation; either version 2,
|
* as published by the Free Software Foundation; either version 2,
|
||||||
* or (at your option) any later version.
|
* or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* typedef struct {
|
* typedef struct {
|
||||||
* unsigned long ebx, esi, edi;
|
* unsigned long ebx, esi, edi;
|
||||||
* unsigned long ebp;
|
* unsigned long ebp;
|
||||||
* unsigned long sp;
|
* unsigned long sp;
|
||||||
* unsigned long pc;
|
* unsigned long pc;
|
||||||
* } jmp_buf[1];
|
* } jmp_buf[1];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On entry, the stack to longjmp looks like:
|
* On entry, the stack to longjmp looks like:
|
||||||
*
|
*
|
||||||
* value
|
* value
|
||||||
* ptr to jmp_buf
|
* ptr to jmp_buf
|
||||||
* return PC
|
* return PC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.globl _longjmp
|
.globl _longjmp
|
||||||
_longjmp:
|
_longjmp:
|
||||||
pushl %ebp
|
pushl %ebp
|
||||||
movl %esp,%ebp
|
movl %esp,%ebp
|
||||||
|
|
||||||
movl 8(%ebp),%ecx /* address of jmp_buf to ecx */
|
movl 8(%ebp),%ecx /* address of jmp_buf to ecx */
|
||||||
movl 12(%ebp),%eax /* return value to %eax */
|
movl 12(%ebp),%eax /* return value to %eax */
|
||||||
testl %eax,%eax
|
testl %eax,%eax
|
||||||
jne 1f
|
jne 1f
|
||||||
incl %eax /* return 1 if handed 0 */
|
incl %eax /* return 1 if handed 0 */
|
||||||
|
|
||||||
1:
|
1:
|
||||||
movl (%ecx),%ebx /* restore %ebx */
|
movl (%ecx),%ebx /* restore %ebx */
|
||||||
movl 4(%ecx),%esi /* restore %esi */
|
movl 4(%ecx),%esi /* restore %esi */
|
||||||
movl 8(%ecx),%edi /* restore %edi */
|
movl 8(%ecx),%edi /* restore %edi */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* From this instant on we are not running in a valid frame
|
* From this instant on we are not running in a valid frame
|
||||||
*/
|
*/
|
||||||
|
|
||||||
movl 12(%ecx),%ebp /* restore %ebp */
|
movl 12(%ecx),%ebp /* restore %ebp */
|
||||||
movl 16(%ecx),%esp /* restore %esp */
|
movl 16(%ecx),%esp /* restore %esp */
|
||||||
/* movl 20(%ecx),%eax return PC */
|
/* movl 20(%ecx),%eax return PC */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Since we are abandoning the stack in any case,
|
* Since we are abandoning the stack in any case,
|
||||||
* there isn't much point in doing the usual return
|
* there isn't much point in doing the usual return
|
||||||
* discipline.
|
* discipline.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
jmpl *20(%ecx)
|
jmpl *20(%ecx)
|
||||||
|
|
||||||
|
|
|
@ -1,59 +1,59 @@
|
||||||
.file "setjmp.S"
|
.file "setjmp.S"
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 1998, 1999, Jonathan S. Shapiro.
|
* Copyright (C) 1998, 1999, Jonathan S. Shapiro.
|
||||||
*
|
*
|
||||||
* This file is part of the EROS Operating System.
|
* This file is part of the EROS Operating System.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation; either version 2,
|
* as published by the Free Software Foundation; either version 2,
|
||||||
* or (at your option) any later version.
|
* or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* #include <eros/i486/asm.h> */
|
/* #include <eros/i486/asm.h> */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* typedef struct {
|
* typedef struct {
|
||||||
* unsigned long ebx, esi, edi;
|
* unsigned long ebx, esi, edi;
|
||||||
* unsigned long ebp;
|
* unsigned long ebp;
|
||||||
* unsigned long sp;
|
* unsigned long sp;
|
||||||
* unsigned long pc;
|
* unsigned long pc;
|
||||||
* } jmp_buf[1];
|
* } jmp_buf[1];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On entry, the stack to setjmp looks like:
|
* On entry, the stack to setjmp looks like:
|
||||||
*
|
*
|
||||||
* ptr to jmp_buf
|
* ptr to jmp_buf
|
||||||
* return PC
|
* return PC
|
||||||
*/
|
*/
|
||||||
.globl _setjmp
|
.globl _setjmp
|
||||||
_setjmp:
|
_setjmp:
|
||||||
pushl %ebp
|
pushl %ebp
|
||||||
movl %esp,%ebp
|
movl %esp,%ebp
|
||||||
|
|
||||||
movl 0x8(%ebp),%eax /* address of jmp_buf to eax */
|
movl 0x8(%ebp),%eax /* address of jmp_buf to eax */
|
||||||
movl %ebx,(%eax) /* save %ebx */
|
movl %ebx,(%eax) /* save %ebx */
|
||||||
movl %esi,4(%eax) /* save %esi */
|
movl %esi,4(%eax) /* save %esi */
|
||||||
movl %edi,8(%eax) /* save %edi */
|
movl %edi,8(%eax) /* save %edi */
|
||||||
leal 8(%ebp),%edx /* calling proc's esp, not ours! */
|
leal 8(%ebp),%edx /* calling proc's esp, not ours! */
|
||||||
movl %edx,16(%eax)
|
movl %edx,16(%eax)
|
||||||
movl 4(%ebp), %edx /* save return PC */
|
movl 4(%ebp), %edx /* save return PC */
|
||||||
movl %edx,20(%eax)
|
movl %edx,20(%eax)
|
||||||
movl 0(%ebp),%edx /* calling proc's ebp, not ours! */
|
movl 0(%ebp),%edx /* calling proc's ebp, not ours! */
|
||||||
movl %edx,12(%eax)
|
movl %edx,12(%eax)
|
||||||
|
|
||||||
xorl %eax,%eax /* return 0 the first time */
|
xorl %eax,%eax /* return 0 the first time */
|
||||||
leave
|
leave
|
||||||
ret $4
|
ret $4
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,124 +1,124 @@
|
||||||
/*
|
/*
|
||||||
* ReactOS kernel
|
* ReactOS kernel
|
||||||
* Copyright (C) 2005 ReactOS Team
|
* Copyright (C) 2005 ReactOS Team
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id$
|
/* $Id$
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: ntoskrnl/dbg/kdb_string.c
|
* FILE: ntoskrnl/dbg/kdb_string.c
|
||||||
* PURPOSE: Kernel debugger string functions
|
* PURPOSE: Kernel debugger string functions
|
||||||
* PROGRAMMER: Gregor Anich (blight@blight.eu.org)
|
* PROGRAMMER: Gregor Anich (blight@blight.eu.org)
|
||||||
* UPDATE HISTORY:
|
* UPDATE HISTORY:
|
||||||
* Created 17/01/2005
|
* Created 17/01/2005
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* INCLUDES ******************************************************************/
|
/* INCLUDES ******************************************************************/
|
||||||
#include <ntoskrnl.h>
|
#include <ntoskrnl.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
int
|
int
|
||||||
_stricmp(
|
_stricmp(
|
||||||
const char *s1,
|
const char *s1,
|
||||||
const char *s2)
|
const char *s2)
|
||||||
{
|
{
|
||||||
char c1, c2;
|
char c1, c2;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
c1 = tolower(*s1++);
|
c1 = tolower(*s1++);
|
||||||
c2 = tolower(*s2++);
|
c2 = tolower(*s2++);
|
||||||
if (c1 < c2)
|
if (c1 < c2)
|
||||||
return -1;
|
return -1;
|
||||||
else if (c1 > c2)
|
else if (c1 > c2)
|
||||||
return 1;
|
return 1;
|
||||||
if (c1 == '\0')
|
if (c1 == '\0')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* unused */
|
#endif /* unused */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convert a string to an unsigned long integer.
|
* Convert a string to an unsigned long integer.
|
||||||
*
|
*
|
||||||
* Ignores `locale' stuff. Assumes that the upper and lower case
|
* Ignores `locale' stuff. Assumes that the upper and lower case
|
||||||
* alphabets and digits are each contiguous.
|
* alphabets and digits are each contiguous.
|
||||||
*/
|
*/
|
||||||
unsigned long
|
unsigned long
|
||||||
strtoul(const char *nptr, char **endptr, int base)
|
strtoul(const char *nptr, char **endptr, int base)
|
||||||
{
|
{
|
||||||
const char *s = nptr;
|
const char *s = nptr;
|
||||||
unsigned long acc;
|
unsigned long acc;
|
||||||
int c;
|
int c;
|
||||||
unsigned long cutoff;
|
unsigned long cutoff;
|
||||||
int neg = 0, any, cutlim;
|
int neg = 0, any, cutlim;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See strtol for comments as to the logic used.
|
* See strtol for comments as to the logic used.
|
||||||
*/
|
*/
|
||||||
do {
|
do {
|
||||||
c = *s++;
|
c = *s++;
|
||||||
} while (isspace(c));
|
} while (isspace(c));
|
||||||
if (c == '-')
|
if (c == '-')
|
||||||
{
|
{
|
||||||
neg = 1;
|
neg = 1;
|
||||||
c = *s++;
|
c = *s++;
|
||||||
}
|
}
|
||||||
else if (c == '+')
|
else if (c == '+')
|
||||||
c = *s++;
|
c = *s++;
|
||||||
if ((base == 0 || base == 16) &&
|
if ((base == 0 || base == 16) &&
|
||||||
c == '0' && (*s == 'x' || *s == 'X'))
|
c == '0' && (*s == 'x' || *s == 'X'))
|
||||||
{
|
{
|
||||||
c = s[1];
|
c = s[1];
|
||||||
s += 2;
|
s += 2;
|
||||||
base = 16;
|
base = 16;
|
||||||
}
|
}
|
||||||
if (base == 0)
|
if (base == 0)
|
||||||
base = c == '0' ? 8 : 10;
|
base = c == '0' ? 8 : 10;
|
||||||
cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
|
cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
|
||||||
cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
|
cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
|
||||||
for (acc = 0, any = 0;; c = *s++)
|
for (acc = 0, any = 0;; c = *s++)
|
||||||
{
|
{
|
||||||
if (isdigit(c))
|
if (isdigit(c))
|
||||||
c -= '0';
|
c -= '0';
|
||||||
else if (isalpha(c))
|
else if (isalpha(c))
|
||||||
c -= isupper(c) ? 'A' - 10 : 'a' - 10;
|
c -= isupper(c) ? 'A' - 10 : 'a' - 10;
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
if (c >= base)
|
if (c >= base)
|
||||||
break;
|
break;
|
||||||
if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
|
if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
|
||||||
any = -1;
|
any = -1;
|
||||||
else {
|
else {
|
||||||
any = 1;
|
any = 1;
|
||||||
acc *= base;
|
acc *= base;
|
||||||
acc += c;
|
acc += c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (any < 0)
|
if (any < 0)
|
||||||
{
|
{
|
||||||
acc = ULONG_MAX;
|
acc = ULONG_MAX;
|
||||||
}
|
}
|
||||||
else if (neg)
|
else if (neg)
|
||||||
acc = -acc;
|
acc = -acc;
|
||||||
if (endptr != 0)
|
if (endptr != 0)
|
||||||
*endptr = any ? (char *)s - 1 : (char *)nptr;
|
*endptr = any ? (char *)s - 1 : (char *)nptr;
|
||||||
return acc;
|
return acc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue