mirror of
https://github.com/reactos/reactos.git
synced 2024-09-15 23:28:15 +00:00
- remove dbgprint from tools
- dbgprint needs to be win32 application and must be moved svn path=/trunk/; revision=28843
This commit is contained in:
parent
79f383df0b
commit
53fd100f02
|
@ -1,58 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* 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@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;
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
DBGPRINT_BASE = $(TOOLS_BASE)$(SEP)dbgprint
|
||||
DBGPRINT_BASE_ = $(DBGPRINT_BASE)$(SEP)
|
||||
DBGPRINT_INT = $(INTERMEDIATE_)$(DBGPRINT_BASE)
|
||||
DBGPRINT_INT_ = $(DBGPRINT_INT)$(SEP)
|
||||
DBGPRINT_OUT = $(OUTPUT_)$(DBGPRINT_BASE)
|
||||
DBGPRINT_OUT_ = $(DBGPRINT_OUT)$(SEP)
|
||||
|
||||
$(DBGPRINT_INT): | $(TOOLS_INT)
|
||||
$(ECHO_MKDIR)
|
||||
${mkdir} $@
|
||||
|
||||
ifneq ($(INTERMEDIATE),$(OUTPUT))
|
||||
$(DBGPRINT_OUT): | $(TOOLS_OUT)
|
||||
$(ECHO_MKDIR)
|
||||
${mkdir} $@
|
||||
endif
|
||||
|
||||
DBGPRINT_TARGET = \
|
||||
$(EXEPREFIX)$(DBGPRINT_OUT_)dbgprint$(EXEPOSTFIX)
|
||||
|
||||
DBGPRINT_SOURCES = $(addprefix $(DBGPRINT_BASE_), \
|
||||
dbgprint.c \
|
||||
)
|
||||
|
||||
DBGPRINT_OBJECTS = \
|
||||
$(addprefix $(INTERMEDIATE_), $(DBGPRINT_SOURCES:.c=.o))
|
||||
|
||||
DBGPRINT_HOST_CFLAGS = $(TOOLS_CFLAGS) -D__USE_W32API -Iinclude -Iinclude/reactos -Iinclude/psdk -Iinclude$(SEP)crt -Iinclude/reactos/libs -I$(INTERMEDIATE_)$(SEP)include$(SEP)psdk
|
||||
|
||||
DBGPRINT_HOST_LFLAGS = $(TOOLS_LFLAGS) -lntdll
|
||||
|
||||
.PHONY: DBGPRINT
|
||||
DBGPRINT: $(DBGPRINT_TARGET)
|
||||
|
||||
$(DBGPRINT_TARGET): $(DBGPRINT_OBJECTS) | $(DBGPRINT_OUT)
|
||||
$(ECHO_LD)
|
||||
${host_gcc} $(DBGPRINT_OBJECTS) $(DBGPRINT_HOST_LFLAGS) -o $@
|
||||
|
||||
$(DBGPRINT_INT_)dbgprint.o: $(DBGPRINT_BASE_)dbgprint.c | $(DBGPRINT_INT)
|
||||
$(ECHO_CC)
|
||||
${host_gcc} $(DBGPRINT_HOST_CFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: DBGPRINT_clean
|
||||
DBGPRINT_clean:
|
||||
-@$(rm) $(DBGPRINT_TARGET) $(DBGPRINT_OBJECTS) 2>$(NUL)
|
||||
clean: DBGPRINT_clean
|
|
@ -49,7 +49,6 @@ include tools/bin2res/bin2res.mak
|
|||
include tools/buildno/buildno.mak
|
||||
include tools/cabman/cabman.mak
|
||||
include tools/cdmake/cdmake.mak
|
||||
include tools/dbgprint/dbgprint.mak
|
||||
include tools/gendib/gendib.mak
|
||||
include tools/ofw_interface/ofw_interface.mak
|
||||
include tools/mkhive/mkhive.mak
|
||||
|
|
Loading…
Reference in a new issue