From e3f91f127cb09e16bdbb0348176833a662209f2b Mon Sep 17 00:00:00 2001 From: Sylvain Petreolle Date: Sun, 6 Jul 2014 17:36:56 +0000 Subject: [PATCH] [DBGPRINT] Convert TABs to spaces. svn path=/trunk/; revision=63697 --- .../applications/cmdutils/dbgprint/dbgprint.c | 198 +++++++++--------- 1 file changed, 99 insertions(+), 99 deletions(-) diff --git a/reactos/base/applications/cmdutils/dbgprint/dbgprint.c b/reactos/base/applications/cmdutils/dbgprint/dbgprint.c index e18088ce09b..75ab212e85e 100644 --- a/reactos/base/applications/cmdutils/dbgprint/dbgprint.c +++ b/reactos/base/applications/cmdutils/dbgprint/dbgprint.c @@ -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; }