mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 06:27:38 +00:00
command line parse changed to not stop after first instance of each argument found
svn path=/trunk/; revision=1993
This commit is contained in:
parent
5efafbf03e
commit
9a56bea334
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: kdebug.c,v 1.26 2001/05/05 19:13:09 chorns Exp $
|
/* $Id: kdebug.c,v 1.27 2001/06/21 04:12:19 rex Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -94,8 +94,8 @@ KdInitSystem (
|
||||||
if (!_strnicmp (p2, "DEBUGPORT", 9))
|
if (!_strnicmp (p2, "DEBUGPORT", 9))
|
||||||
{
|
{
|
||||||
p2 += 9;
|
p2 += 9;
|
||||||
if (*p2 != '=')
|
if (*p2 == '=')
|
||||||
break;
|
{
|
||||||
p2++;
|
p2++;
|
||||||
if (!_strnicmp (p2, "SCREEN", 6))
|
if (!_strnicmp (p2, "SCREEN", 6))
|
||||||
{
|
{
|
||||||
|
@ -120,23 +120,34 @@ KdInitSystem (
|
||||||
PortInfo.ComPort = Value;
|
PortInfo.ComPort = Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
p1 = p2;
|
|
||||||
}
|
}
|
||||||
|
else if (!_strnicmp (p2, "DEBUG", 5))
|
||||||
|
|
||||||
|
|
||||||
/* check for 'BAUDRATE' */
|
|
||||||
p1 = (PCHAR)LoaderBlock->CommandLine;
|
|
||||||
while (p1 && (p2 = strchr (p1, '/')))
|
|
||||||
{
|
{
|
||||||
p2++;
|
p2 += 5;
|
||||||
if (!_strnicmp (p2, "BAUDRATE", 8))
|
KdDebuggerEnabled = TRUE;
|
||||||
|
KdpDebugType = KdpDebugType | SerialDebug;
|
||||||
|
}
|
||||||
|
else if (!_strnicmp (p2, "NODEBUG", 7))
|
||||||
|
{
|
||||||
|
p2 += 7;
|
||||||
|
KdDebuggerEnabled = FALSE;
|
||||||
|
}
|
||||||
|
else if (!_strnicmp (p2, "CRASHDEBUG", 10))
|
||||||
|
{
|
||||||
|
p2 += 10;
|
||||||
|
KdDebuggerEnabled = FALSE;
|
||||||
|
}
|
||||||
|
else if (!_strnicmp (p2, "BREAK", 5))
|
||||||
|
{
|
||||||
|
p2 += 7;
|
||||||
|
KdpBreakPending = TRUE;
|
||||||
|
}
|
||||||
|
else if (!_strnicmp (p2, "BAUDRATE", 8))
|
||||||
{
|
{
|
||||||
p2 += 8;
|
p2 += 8;
|
||||||
if (*p2 != '=')
|
if (*p2 != '=')
|
||||||
break;
|
{
|
||||||
p2++;
|
p2++;
|
||||||
Value = (ULONG)atol (p2);
|
Value = (ULONG)atol (p2);
|
||||||
if (Value > 0)
|
if (Value > 0)
|
||||||
|
@ -145,65 +156,7 @@ KdInitSystem (
|
||||||
KdpDebugType = KdpDebugType | SerialDebug;
|
KdpDebugType = KdpDebugType | SerialDebug;
|
||||||
PortInfo.BaudRate = Value;
|
PortInfo.BaudRate = Value;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
p1 = p2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check for 'DEBUG'. Dont' accept 'DEBUGPORT'!*/
|
|
||||||
p1 = (PCHAR)LoaderBlock->CommandLine;
|
|
||||||
while (p1 && (p2 = strchr (p1, '/')))
|
|
||||||
{
|
|
||||||
p2++;
|
|
||||||
if (!_strnicmp (p2, "DEBUG", 5) &&
|
|
||||||
_strnicmp (p2, "DEBUGPORT", 9))
|
|
||||||
{
|
|
||||||
p2 += 5;
|
|
||||||
KdDebuggerEnabled = TRUE;
|
|
||||||
KdpDebugType = KdpDebugType | SerialDebug;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
p1 = p2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check for 'NODEBUG' */
|
|
||||||
p1 = (PCHAR)LoaderBlock->CommandLine;
|
|
||||||
while (p1 && (p2 = strchr (p1, '/')))
|
|
||||||
{
|
|
||||||
p2++;
|
|
||||||
if (!_strnicmp (p2, "NODEBUG", 7))
|
|
||||||
{
|
|
||||||
p2 += 7;
|
|
||||||
KdDebuggerEnabled = FALSE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
p1 = p2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check for 'CRASHDEBUG' */
|
|
||||||
p1 = (PCHAR)LoaderBlock->CommandLine;
|
|
||||||
while (p1 && (p2 = strchr (p1, '/')))
|
|
||||||
{
|
|
||||||
p2++;
|
|
||||||
if (!_strnicmp (p2, "CRASHDEBUG", 10))
|
|
||||||
{
|
|
||||||
p2 += 10;
|
|
||||||
KdDebuggerEnabled = FALSE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
p1 = p2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check for 'BREAK' */
|
|
||||||
p1 = (PCHAR)LoaderBlock->CommandLine;
|
|
||||||
while (p1 && (p2 = strchr (p1, '/')))
|
|
||||||
{
|
|
||||||
p2++;
|
|
||||||
if (!_strnicmp (p2, "BREAK", 5))
|
|
||||||
{
|
|
||||||
p2 += 7;
|
|
||||||
KdpBreakPending = TRUE;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
p1 = p2;
|
p1 = p2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue