Author: cwittich
Date: Thu Sep 4 05:46:18 2008
New Revision: 35929
URL:
http://svn.reactos.org/svn/reactos?rev=35929&view=rev
Log:
prettify debug output a bit
Modified:
trunk/reactos/base/applications/cmdutils/dbgprint/dbgprint.c
Modified: trunk/reactos/base/applications/cmdutils/dbgprint/dbgprint.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/dbgprint/dbgprint.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/dbgprint/dbgprint.c [iso-8859-1] Thu Sep 4
05:46:18 2008
@@ -36,6 +36,7 @@
char psBuffer[128];
char psBuffer2[128];
char cmd[255];
+ char test[300];
FILE *pPipe;
FILE *pPipe2;
@@ -45,20 +46,23 @@
{
while(fgets(psBuffer, 128, pPipe))
{
- char *nlptr = strchr(psBuffer, '\n');
- if (nlptr)
- psBuffer[*psBuffer - *nlptr - 1] = '\0';
if (psBuffer[0] == ' ')
{
strcpy(cmd, argv[2]);
strcat(cmd, " ");
strcat(cmd, psBuffer+4);
/* run the current test */
+ strcpy(test, "\n\nRunning ");
+ strcat(test, cmd);
+ OutputDebugStringA(test);
pPipe2 = _tpopen(cmd, "r");
if (pPipe2 != NULL)
{
while(fgets(psBuffer2, 128, pPipe2))
{
+ char *nlptr2 = strchr(psBuffer2, '\n');
+ if (nlptr2)
+ *nlptr2 = '\0';
OutputDebugStringA(psBuffer2);
}
_pclose(pPipe2);