Remove garbage added by me.

This commit is contained in:
Peter Sunde 2013-02-27 08:50:12 +01:00
parent 8aa7662093
commit 4bdd7b32b5
3 changed files with 3 additions and 31 deletions

View File

@ -75,28 +75,12 @@ std::wstring to_wstring(const std::string& s)
}
#include "../shared/DebugClient.h"
#include "../shared/AgentMsg.h"
#include "../shared/Buffer.h"
#include "../shared/c99_snprintf.h"
void traceFile(const char *format ...) {
std::wofstream logFile;
char message[1024];
va_list ap;
va_start(ap, format);
c99_vsnprintf(message, sizeof(message), format, ap);
message[sizeof(message) - 1] = '\0';
va_end(ap);
logFile.open("C:\\Users\\peters\\Documents\\Visual Studio 2012\\Projects\\AwesomeTerm\\thirdparty\\winpty\\Default\\demo.log", std::ios::out | std::ios::binary || std::ios::app);
logFile << message;
logFile.close();
}
// TODO: Error handling, handle out-of-memory.
#define AGENT_EXE L"winpty-agent.exe"
@ -258,7 +242,6 @@ static BackgroundDesktop setupBackgroundDesktop()
assert(ret.desktop != NULL);
ret.desktopName =
getObjectName(ret.station) + L"\\" + getObjectName(ret.desktop);
std::wcout << ret.desktopName;
return ret;
}
@ -481,8 +464,6 @@ WINPTY_API int winpty_start_process(winpty_t *pc,
const wchar_t *env)
{
traceFile("Recieved handle: %d", pc->controlPipe);
WriteBuffer packet;
packet.putInt(AgentMsg::StartProcess);
packet.putWString(appname ? appname : L"");

View File

@ -24,10 +24,6 @@
#include <string.h>
#include "c99_snprintf.h"
#if _MSC_VER
#define snprintf _snprintf
#endif
char *tracingConfig;
static void sendToDebugServer(const char *message)
@ -95,12 +91,7 @@ void trace(const char *format, ...)
baseName = (baseName != NULL) ? baseName + 1 : moduleName;
char fullMessage[1024];
<<<<<<< HEAD
c99_snprintf(fullMessage, sizeof(fullMessage),
=======
snprintf(fullMessage, sizeof(fullMessage),
>>>>>>> 964f5a63f88d9503f4fc33c54d1e608b9d6e2eab
"[%05d.%03d %s,p%04d,t%04d]: %s",
currentTime / 1000, currentTime % 1000,
baseName, (int)GetCurrentProcessId(), (int)GetCurrentThreadId(),
@ -108,4 +99,4 @@ void trace(const char *format, ...)
fullMessage[sizeof(fullMessage) - 1] = '\0';
sendToDebugServer(fullMessage);
}
}

View File

@ -45,4 +45,4 @@
],
},
],
}
}