From 92c59963f82f81aa3202657e7fdbb2592924ede3 Mon Sep 17 00:00:00 2001 From: "cedeel@gmail.com" Date: Thu, 14 Jun 2012 13:06:06 +0000 Subject: Attempt to bring sanity to newlines across systems. git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- converter/source/MemoryLeak.h | 36 ++++++++++++++++----------------- converter/source/cDeNotch.cpp | 8 ++++---- converter/source/cMakeDir.cpp | 46 +++++++++++++++++++++---------------------- converter/source/cMakeDir.h | 12 +++++------ converter/source/main.cpp | 8 ++++---- 5 files changed, 55 insertions(+), 55 deletions(-) (limited to 'converter/source') diff --git a/converter/source/MemoryLeak.h b/converter/source/MemoryLeak.h index 6ac06a302..2d62f2a4b 100644 --- a/converter/source/MemoryLeak.h +++ b/converter/source/MemoryLeak.h @@ -1,18 +1,18 @@ -#pragma once - -#ifdef _WIN32 - -#ifdef _DEBUG - -#define _CRTDBG_MAP_ALLOC -#include -#include - -#ifndef DEBUG_NEW -#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__) -#define new DEBUG_NEW -#endif - -#endif - -#endif +#pragma once + +#ifdef _WIN32 + +#ifdef _DEBUG + +#define _CRTDBG_MAP_ALLOC +#include +#include + +#ifndef DEBUG_NEW +#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__) +#define new DEBUG_NEW +#endif + +#endif + +#endif diff --git a/converter/source/cDeNotch.cpp b/converter/source/cDeNotch.cpp index 89075a92e..75d4ffa9d 100644 --- a/converter/source/cDeNotch.cpp +++ b/converter/source/cDeNotch.cpp @@ -25,10 +25,10 @@ inline bool fOpenFile( FILE*& a_hFile, const char* a_FileName, const char* a_Mode ) { -#ifdef _WIN32 - return fopen_s(&a_hFile, a_FileName, a_Mode ) == 0; -#else - return (a_hFile = fopen(a_FileName, a_Mode )) != 0; +#ifdef _WIN32 + return fopen_s(&a_hFile, a_FileName, a_Mode ) == 0; +#else + return (a_hFile = fopen(a_FileName, a_Mode )) != 0; #endif } diff --git a/converter/source/cMakeDir.cpp b/converter/source/cMakeDir.cpp index 60817d5aa..579d39359 100644 --- a/converter/source/cMakeDir.cpp +++ b/converter/source/cMakeDir.cpp @@ -1,24 +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 +#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 diff --git a/converter/source/cMakeDir.h b/converter/source/cMakeDir.h index 378df2a36..240b76507 100644 --- a/converter/source/cMakeDir.h +++ b/converter/source/cMakeDir.h @@ -1,7 +1,7 @@ -#pragma once - -class cMakeDir -{ -public: - static void MakeDir( const char* a_Directory ); +#pragma once + +class cMakeDir +{ +public: + static void MakeDir( const char* a_Directory ); }; \ No newline at end of file diff --git a/converter/source/main.cpp b/converter/source/main.cpp index 6239cbd43..5df378cd6 100644 --- a/converter/source/main.cpp +++ b/converter/source/main.cpp @@ -14,8 +14,8 @@ int main () { -#ifdef _DEBUG - _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); +#ifdef _DEBUG + _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); #endif cTimer Timer; @@ -63,8 +63,8 @@ int main () clock_t progEnd = clock(); //end main program timer std::cout << "Time to complete converter: " << double(Timer.diffclock(progEnd,progBegin)) << " Seconds"<< std::endl; -#ifdef _DEBUG - _CrtDumpMemoryLeaks(); +#ifdef _DEBUG + _CrtDumpMemoryLeaks(); #endif #ifdef _WIN32 -- cgit v1.2.3