Author: spetreolle
Date: Sun Jul 6 17:36:56 2014
New Revision: 63697
URL:
http://svn.reactos.org/svn/reactos?rev=63697&view=rev
Log:
[DBGPRINT]
Convert TABs to spaces.
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] Sun Jul 6
17:36:56 2014
@@ -16,109 +16,109 @@
int _tmain(int argc, TCHAR ** argv)
{
- TCHAR * buf;
- int bufsize;
- int i;
- int offset;
+ TCHAR * buf;
+ int bufsize;
+ int i;
+ int offset;
- bufsize = 0;
- for(i = 1; i < argc; i++)
- {
- bufsize += _tcslen(argv[i]) + 1;
- }
+ bufsize = 0;
+ for(i = 1; i < argc; i++)
+ {
+ bufsize += _tcslen(argv[i]) + 1;
+ }
- if (!bufsize)
- {
- return -1;
- }
+ if (!bufsize)
+ {
+ return -1;
+ }
- if (_tcsstr(argv[1], "--winetest") && (argc == 3))
- {
- char psBuffer[128];
- char psBuffer2[128];
- char *nlptr2;
- char cmd[255];
- char test[300];
- FILE *pPipe;
- FILE *pPipe2;
+ if (_tcsstr(argv[1], "--winetest") && (argc == 3))
+ {
+ char psBuffer[128];
+ char psBuffer2[128];
+ char *nlptr2;
+ char cmd[255];
+ char test[300];
+ FILE *pPipe;
+ FILE *pPipe2;
- /* get available tests */
- pPipe = _tpopen(argv[2], "r");
- if (pPipe != NULL)
- {
- while(fgets(psBuffer, 128, pPipe))
- {
- 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 = _popen(cmd, "r");
- if (pPipe2 != NULL)
- {
- while(fgets(psBuffer2, 128, pPipe2))
- {
- nlptr2 = strchr(psBuffer2, '\n');
- if (nlptr2)
- *nlptr2 = '\0';
- puts(psBuffer2);
- OutputDebugStringA(psBuffer2);
- }
- _pclose(pPipe2);
- }
- }
- }
- _pclose(pPipe);
- }
- }
- else if (_tcsstr(argv[1], "--process") && (argc == 3))
- {
- char psBuffer[128];
- FILE *pPipe;
+ /* get available tests */
+ pPipe = _tpopen(argv[2], "r");
+ if (pPipe != NULL)
+ {
+ while(fgets(psBuffer, 128, pPipe))
+ {
+ 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 = _popen(cmd, "r");
+ if (pPipe2 != NULL)
+ {
+ while(fgets(psBuffer2, 128, pPipe2))
+ {
+ nlptr2 = strchr(psBuffer2, '\n');
+ if (nlptr2)
+ *nlptr2 = '\0';
+ puts(psBuffer2);
+ OutputDebugStringA(psBuffer2);
+ }
+ _pclose(pPipe2);
+ }
+ }
+ }
+ _pclose(pPipe);
+ }
+ }
+ else if (_tcsstr(argv[1], "--process") && (argc == 3))
+ {
+ char psBuffer[128];
+ FILE *pPipe;
- pPipe = _tpopen(argv[2], "r");
- if (pPipe != NULL)
- {
- while(fgets(psBuffer, 128, pPipe))
- {
- puts(psBuffer);
- OutputDebugStringA(psBuffer);
- }
- _pclose(pPipe);
- }
- }
- else
- {
- buf = HeapAlloc(GetProcessHeap(), 0, (bufsize+1) * sizeof(TCHAR));
- if (!buf)
- {
- return -1;
- }
+ pPipe = _tpopen(argv[2], "r");
+ if (pPipe != NULL)
+ {
+ while(fgets(psBuffer, 128, pPipe))
+ {
+ puts(psBuffer);
+ OutputDebugStringA(psBuffer);
+ }
+ _pclose(pPipe);
+ }
+ }
+ else
+ {
+ buf = HeapAlloc(GetProcessHeap(), 0, (bufsize+1) * sizeof(TCHAR));
+ if (!buf)
+ {
+ return -1;
+ }
- offset = 0;
- for(i = 1; i < argc; i++)
- {
- int length = _tcslen(argv[i]);
- _tcsncpy(&buf[offset], argv[i], length);
- offset += length;
- if (i + 1 < argc)
- {
- buf[offset] = _T(' ');
- }
- else
- {
- buf[offset] = _T('\n');
- buf[offset+1] = _T('\0');
- }
- offset++;
- }
- _putts(buf);
- OutputDebugString(buf);
- HeapFree(GetProcessHeap(), 0, buf);
- }
- return 0;
+ offset = 0;
+ for(i = 1; i < argc; i++)
+ {
+ int length = _tcslen(argv[i]);
+ _tcsncpy(&buf[offset], argv[i], length);
+ offset += length;
+ if (i + 1 < argc)
+ {
+ buf[offset] = _T(' ');
+ }
+ else
+ {
+ buf[offset] = _T('\n');
+ buf[offset+1] = _T('\0');
+ }
+ offset++;
+ }
+ _putts(buf);
+ OutputDebugString(buf);
+ HeapFree(GetProcessHeap(), 0, buf);
+ }
+ return 0;
}