Author: cwittich
Date: Tue Sep 4 18:28:29 2007
New Revision: 28845
URL:
http://svn.reactos.org/svn/reactos?rev=28845&view=rev
Log:
re-add dbgprint - now as win32 module
Added:
trunk/reactos/base/applications/cmdutils/dbgprint/
trunk/reactos/base/applications/cmdutils/dbgprint/dbgprint.c (with props)
trunk/reactos/base/applications/cmdutils/dbgprint/dbgprint.rbuild
Added: 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 (added)
+++ trunk/reactos/base/applications/cmdutils/dbgprint/dbgprint.c Tue Sep 4 18:28:29 2007
@@ -1,0 +1,58 @@
+/* $Id: dbgprint.c 24720 2006-11-11 16:07:35Z janderwald $
+ *
+ * PROJECT: ReactOS DbgPrint Utility
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: tools/dbgprint/dbgprint.c
+ * PURPOSE: outputs a text via DbgPrint API
+ * PROGRAMMERS: Johannes Anderwald (johannes.anderwald(a)student.tugraz.at)
+ */
+
+#include <windows.h>
+#include <tchar.h>
+#include <debug.h>
+
+int _tmain(int argc, TCHAR ** argv)
+{
+ TCHAR * buf;
+ int bufsize;
+ int i;
+ int offset;
+
+ bufsize = 0;
+ for(i = 1; i < argc; i++)
+ {
+ bufsize += _tcslen(argv[i]) + 1;
+ }
+
+ if (!bufsize)
+ {
+ return -1;
+ }
+
+ 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++;
+ }
+ DbgPrint(buf);
+ HeapFree(GetProcessHeap(), 0, buf);
+ return 0;
+}
Propchange: trunk/reactos/base/applications/cmdutils/dbgprint/dbgprint.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/dbgprint/dbgprint.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/dbgprint/dbgprint.rbuild (added)
+++ trunk/reactos/base/applications/cmdutils/dbgprint/dbgprint.rbuild Tue Sep 4 18:28:29
2007
@@ -1,0 +1,8 @@
+<module name="dbgprint" type="win32cui"
installbase="system32" installname="dbgprint.exe">
+ <define name="__USE_W32API" />
+ <define name="_WIN32_IE">0x0501</define>
+ <define name="_WIN32_WINNT">0x0501</define>
+ <library>kernel32</library>
+ <library>ntdll</library>
+ <file>dbgprint.c</file>
+</module>