From 8a21fbf0cec3af9c9a7b957fdbffb19addb0b7df Mon Sep 17 00:00:00 2001 From: faketruth Date: Tue, 27 Dec 2011 17:59:08 +0000 Subject: I think I fixed the memory leaks in the converter Updated makefile for Unix I changed how the converter works, now you simply put the .exe in the folder you want to convert and run it, it'll output all the files in ./world git-svn-id: http://mc-server.googlecode.com/svn/trunk@132 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- converter/source/cMakeDir.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 converter/source/cMakeDir.cpp (limited to 'converter/source/cMakeDir.cpp') diff --git a/converter/source/cMakeDir.cpp b/converter/source/cMakeDir.cpp new file mode 100644 index 000000000..60817d5aa --- /dev/null +++ b/converter/source/cMakeDir.cpp @@ -0,0 +1,24 @@ +#include "cMakeDir.h" + +#ifndef _WIN32 +//#include // If something is missing, uncomment some of these! +//#include +//#include +#include // for mkdir +//#include +#else +#include +#endif + +void cMakeDir::MakeDir( const char* a_Directory ) +{ +#ifdef _WIN32 + SECURITY_ATTRIBUTES Attrib; + Attrib.nLength = sizeof(SECURITY_ATTRIBUTES); + Attrib.lpSecurityDescriptor = NULL; + Attrib.bInheritHandle = false; + ::CreateDirectory(a_Directory, &Attrib); +#else + mkdir(a_Directory, S_IRWXU | S_IRWXG | S_IRWXO); +#endif +} \ No newline at end of file -- cgit v1.2.3