SVN maintenance:

Add svn:eol-style = native
Add svn:keywords = author date id revision

svn path=/trunk/; revision=14855
This commit is contained in:
Hervé Poussineau 2005-04-28 23:14:54 +00:00
parent 32d6f2faa4
commit cc5a10001c
5 changed files with 1335 additions and 1335 deletions

View file

@ -103,7 +103,7 @@ KdpGetDebugMode(PCHAR Currentp2)
KdpDebugMode.Serial = TRUE;
/* Set the port to use */
SerialPortInfo.ComPort = Value;
SerialPortInfo.ComPort = Value;
KdpPort = Value;
}
}

View file

@ -1,70 +1,70 @@
.file "longjmp.S"
/*
* Copyright (C) 1998, 1999, Jonathan S. Shapiro.
*
* This file is part of the EROS Operating System.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*
* typedef struct {
* unsigned long ebx, esi, edi;
* unsigned long ebp;
* unsigned long sp;
* unsigned long pc;
* } jmp_buf[1];
*/
/*
* On entry, the stack to longjmp looks like:
*
* value
* ptr to jmp_buf
* return PC
*/
.globl _longjmp
_longjmp:
pushl %ebp
movl %esp,%ebp
movl 8(%ebp),%ecx /* address of jmp_buf to ecx */
movl 12(%ebp),%eax /* return value to %eax */
testl %eax,%eax
jne 1f
incl %eax /* return 1 if handed 0 */
1:
movl (%ecx),%ebx /* restore %ebx */
movl 4(%ecx),%esi /* restore %esi */
movl 8(%ecx),%edi /* restore %edi */
/*
* From this instant on we are not running in a valid frame
*/
movl 12(%ecx),%ebp /* restore %ebp */
movl 16(%ecx),%esp /* restore %esp */
/* movl 20(%ecx),%eax return PC */
/*
* Since we are abandoning the stack in any case,
* there isn't much point in doing the usual return
* discipline.
*/
jmpl *20(%ecx)
.file "longjmp.S"
/*
* Copyright (C) 1998, 1999, Jonathan S. Shapiro.
*
* This file is part of the EROS Operating System.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*
* typedef struct {
* unsigned long ebx, esi, edi;
* unsigned long ebp;
* unsigned long sp;
* unsigned long pc;
* } jmp_buf[1];
*/
/*
* On entry, the stack to longjmp looks like:
*
* value
* ptr to jmp_buf
* return PC
*/
.globl _longjmp
_longjmp:
pushl %ebp
movl %esp,%ebp
movl 8(%ebp),%ecx /* address of jmp_buf to ecx */
movl 12(%ebp),%eax /* return value to %eax */
testl %eax,%eax
jne 1f
incl %eax /* return 1 if handed 0 */
1:
movl (%ecx),%ebx /* restore %ebx */
movl 4(%ecx),%esi /* restore %esi */
movl 8(%ecx),%edi /* restore %edi */
/*
* From this instant on we are not running in a valid frame
*/
movl 12(%ecx),%ebp /* restore %ebp */
movl 16(%ecx),%esp /* restore %esp */
/* movl 20(%ecx),%eax return PC */
/*
* Since we are abandoning the stack in any case,
* there isn't much point in doing the usual return
* discipline.
*/
jmpl *20(%ecx)

View file

@ -1,59 +1,59 @@
.file "setjmp.S"
/*
* Copyright (C) 1998, 1999, Jonathan S. Shapiro.
*
* This file is part of the EROS Operating System.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* #include <eros/i486/asm.h> */
/*
* typedef struct {
* unsigned long ebx, esi, edi;
* unsigned long ebp;
* unsigned long sp;
* unsigned long pc;
* } jmp_buf[1];
*/
/*
* On entry, the stack to setjmp looks like:
*
* ptr to jmp_buf
* return PC
*/
.globl _setjmp
_setjmp:
pushl %ebp
movl %esp,%ebp
movl 0x8(%ebp),%eax /* address of jmp_buf to eax */
movl %ebx,(%eax) /* save %ebx */
movl %esi,4(%eax) /* save %esi */
movl %edi,8(%eax) /* save %edi */
leal 8(%ebp),%edx /* calling proc's esp, not ours! */
movl %edx,16(%eax)
movl 4(%ebp), %edx /* save return PC */
movl %edx,20(%eax)
movl 0(%ebp),%edx /* calling proc's ebp, not ours! */
movl %edx,12(%eax)
xorl %eax,%eax /* return 0 the first time */
leave
ret $4
.file "setjmp.S"
/*
* Copyright (C) 1998, 1999, Jonathan S. Shapiro.
*
* This file is part of the EROS Operating System.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* #include <eros/i486/asm.h> */
/*
* typedef struct {
* unsigned long ebx, esi, edi;
* unsigned long ebp;
* unsigned long sp;
* unsigned long pc;
* } jmp_buf[1];
*/
/*
* On entry, the stack to setjmp looks like:
*
* ptr to jmp_buf
* return PC
*/
.globl _setjmp
_setjmp:
pushl %ebp
movl %esp,%ebp
movl 0x8(%ebp),%eax /* address of jmp_buf to eax */
movl %ebx,(%eax) /* save %ebx */
movl %esi,4(%eax) /* save %esi */
movl %edi,8(%eax) /* save %edi */
leal 8(%ebp),%edx /* calling proc's esp, not ours! */
movl %edx,16(%eax)
movl 4(%ebp), %edx /* save return PC */
movl %edx,20(%eax)
movl 0(%ebp),%edx /* calling proc's ebp, not ours! */
movl %edx,12(%eax)
xorl %eax,%eax /* return 0 the first time */
leave
ret $4

File diff suppressed because it is too large Load diff

View file

@ -1,124 +1,124 @@
/*
* ReactOS kernel
* Copyright (C) 2005 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/dbg/kdb_string.c
* PURPOSE: Kernel debugger string functions
* PROGRAMMER: Gregor Anich (blight@blight.eu.org)
* UPDATE HISTORY:
* Created 17/01/2005
*/
/* INCLUDES ******************************************************************/
#include <ntoskrnl.h>
#include <ctype.h>
/* FUNCTIONS *****************************************************************/
#if 0
int
_stricmp(
const char *s1,
const char *s2)
{
char c1, c2;
for (;;)
{
c1 = tolower(*s1++);
c2 = tolower(*s2++);
if (c1 < c2)
return -1;
else if (c1 > c2)
return 1;
if (c1 == '\0')
break;
}
return 0;
}
#endif /* unused */
/*
* Convert a string to an unsigned long integer.
*
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
unsigned long
strtoul(const char *nptr, char **endptr, int base)
{
const char *s = nptr;
unsigned long acc;
int c;
unsigned long cutoff;
int neg = 0, any, cutlim;
/*
* See strtol for comments as to the logic used.
*/
do {
c = *s++;
} while (isspace(c));
if (c == '-')
{
neg = 1;
c = *s++;
}
else if (c == '+')
c = *s++;
if ((base == 0 || base == 16) &&
c == '0' && (*s == 'x' || *s == 'X'))
{
c = s[1];
s += 2;
base = 16;
}
if (base == 0)
base = c == '0' ? 8 : 10;
cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
for (acc = 0, any = 0;; c = *s++)
{
if (isdigit(c))
c -= '0';
else if (isalpha(c))
c -= isupper(c) ? 'A' - 10 : 'a' - 10;
else
break;
if (c >= base)
break;
if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
any = -1;
else {
any = 1;
acc *= base;
acc += c;
}
}
if (any < 0)
{
acc = ULONG_MAX;
}
else if (neg)
acc = -acc;
if (endptr != 0)
*endptr = any ? (char *)s - 1 : (char *)nptr;
return acc;
}
/*
* ReactOS kernel
* Copyright (C) 2005 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id$
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/dbg/kdb_string.c
* PURPOSE: Kernel debugger string functions
* PROGRAMMER: Gregor Anich (blight@blight.eu.org)
* UPDATE HISTORY:
* Created 17/01/2005
*/
/* INCLUDES ******************************************************************/
#include <ntoskrnl.h>
#include <ctype.h>
/* FUNCTIONS *****************************************************************/
#if 0
int
_stricmp(
const char *s1,
const char *s2)
{
char c1, c2;
for (;;)
{
c1 = tolower(*s1++);
c2 = tolower(*s2++);
if (c1 < c2)
return -1;
else if (c1 > c2)
return 1;
if (c1 == '\0')
break;
}
return 0;
}
#endif /* unused */
/*
* Convert a string to an unsigned long integer.
*
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
unsigned long
strtoul(const char *nptr, char **endptr, int base)
{
const char *s = nptr;
unsigned long acc;
int c;
unsigned long cutoff;
int neg = 0, any, cutlim;
/*
* See strtol for comments as to the logic used.
*/
do {
c = *s++;
} while (isspace(c));
if (c == '-')
{
neg = 1;
c = *s++;
}
else if (c == '+')
c = *s++;
if ((base == 0 || base == 16) &&
c == '0' && (*s == 'x' || *s == 'X'))
{
c = s[1];
s += 2;
base = 16;
}
if (base == 0)
base = c == '0' ? 8 : 10;
cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
for (acc = 0, any = 0;; c = *s++)
{
if (isdigit(c))
c -= '0';
else if (isalpha(c))
c -= isupper(c) ? 'A' - 10 : 'a' - 10;
else
break;
if (c >= base)
break;
if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
any = -1;
else {
any = 1;
acc *= base;
acc += c;
}
}
if (any < 0)
{
acc = ULONG_MAX;
}
else if (neg)
acc = -acc;
if (endptr != 0)
*endptr = any ? (char *)s - 1 : (char *)nptr;
return acc;
}