fix debug output
remove my '!' code - don't know how I thought this was valid
restore part of code I removed previously that was breaking 'not' cases that need to execute and the right half of the == was longer than then left
Modified: trunk/reactos/subsys/system/cmd/if.c

Modified: trunk/reactos/subsys/system/cmd/if.c
--- trunk/reactos/subsys/system/cmd/if.c	2005-09-21 01:23:44 UTC (rev 17956)
+++ trunk/reactos/subsys/system/cmd/if.c	2005-09-21 01:25:58 UTC (rev 17957)
@@ -43,7 +43,7 @@
 	LPTSTR pp;
 
 #ifdef _DEBUG
-	DebugPrintf (_T("cmd_if: (\'%S\', \'%S\')\n"), cmd, param);
+	DebugPrintf (_T("cmd_if: (\'%s\', \'%s\')\n"), cmd, param);
 #endif
 
 	if (!_tcsncmp (param, _T("/?"), 2))
@@ -52,16 +52,9 @@
 		return 0;
 	}
 
-	/* First check if param string begins with '!' or 'not' */
-	if ( param[0] == _T('!') )
+	/* First check if param string begins with 'not' */
+	if (!_tcsnicmp (param, _T("not"), 3) && _istspace (*(param + 3)))
 	{
-		x_flag = X_EXEC;            /* Remember '!' */
-		++param;                    /* Step over '!' */
-		while (_istspace (*param))  /* And subsequent spaces */
-			param++;
-	}
-	else if (!_tcsnicmp (param, _T("not"), 3) && _istspace (*(param + 3)))
-	{
 		x_flag = X_EXEC;            /* Remember 'NOT' */
 		param += 3;                 /* Step over 'NOT' */
 		while (_istspace (*param))  /* And subsequent spaces */
@@ -190,7 +183,11 @@
 		pp += p1len;
 
 		if ( x_flag )
+		{
+			while (*pp && !_istspace (*pp))  /* Find first space, */
+				pp++;
 			x_flag |= X_EMPTY;
+		}
 	}
 
 	if (x_flag & X_EMPTY)