[ros-diffs] [cwittich] 35929: prettify debug output a bit

cwittich at svn.reactos.org cwittich at svn.reactos.org
Thu Sep 4 12:46:18 CEST 2008


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/dbgprint/dbgprint.c?rev=35929&r1=35928&r2=35929&view=diff
==============================================================================
--- 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);



More information about the Ros-diffs mailing list