1 /* $Id: dbgprint.c 24720 2006-11-11 16:07:35Z janderwald $
3 * PROJECT: ReactOS DbgPrint Utility
4 * LICENSE: GPL - See COPYING in the top level directory
5 * FILE: tools/dbgprint/dbgprint.c
6 * PURPOSE: outputs a text via DbgPrint API
7 * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at)
14 int _tmain(int argc
, TCHAR
** argv
)
22 for(i
= 1; i
< argc
; i
++)
24 bufsize
+= _tcslen(argv
[i
]) + 1;
32 buf
= HeapAlloc(GetProcessHeap(), 0, (bufsize
+1) * sizeof(TCHAR
));
39 for(i
= 1; i
< argc
; i
++)
41 int length
= _tcslen(argv
[i
]);
42 _tcsncpy(&buf
[offset
], argv
[i
], length
);
46 buf
[offset
] = _T(' ');
50 buf
[offset
] = _T('\n');
51 buf
[offset
+1] = _T('\0');
55 OutputDebugString(buf
);
56 HeapFree(GetProcessHeap(), 0, buf
);