/****************************************************************************
	Kalkulon - A programmable calculator for programmers

	This file is part of the Kalkulon core.
	
	If you find this source code useful, your are encouraged to use it in your own projects.
	Please give me credit!

	COPYRIGHT by Juergen Holetzeck 2003 - 2008
	e-mail:		contact@kalkulon.de
	homepage:	www.kalkulon.de
****************************************************************************/

// this header is included in every cpp file (normally used by MSC for pre-compiled headers)

#if !defined(AFX_STDAFX_H__F57A2220_BB78_11D6_BEF2_E23F3DCEFF7E__INCLUDED_)
#define AFX_STDAFX_H__F57A2220_BB78_11D6_BEF2_E23F3DCEFF7E__INCLUDED_


#ifdef _MSC_VER
 #if _MSC_VER > 1000
 #pragma once
 #endif // _MSC_VER > 1000

 #if _MSC_VER < 1310
 #pragma warning( disable : 4786 ) // too long template names for debugger
 #endif
#endif




// decide which platform we want to compile for
#ifndef _MANAGED 
 #ifdef _WIN32
  #define USE_WIN32 _WIN32
 #endif
#else
 #define USE_MANAGED _MANAGED
#endif


// configure here which non-standard libraries to use
// #define USE_READLINE

// define if GLIBC is available
#define USE_GLIBC __GLIBC__


// some standard includes
#include <stdlib.h>
#ifdef _MSC_VER
 // enable memory leak detection
 #ifdef _DEBUG
 #define _CRTDBG_MAP_ALLOC
 #include <crtdbg.h>
 #ifndef DBG_NEW
 #define DBG_NEW new ( _NORMAL_BLOCK , __FILE__ , __LINE__ )
 #define new DBG_NEW
 #endif
 #endif  // _DEBUG
#endif



#ifdef USE_WIN32
#include <windows.h>
// #define USE_WIN32_LIB @@bug(?) doesn't work when linked with Qt
#endif

#include <ctype.h>
#include <stdio.h>
#include <assert.h>


// if your compiler doesn't support some kind of snprintf:
// #define SNPRINTF sprintf and delete the second argument (strbuf_size) in every call :-(
#if _MSC_VER >= 1400
	#if !_DEBUG
		#pragma warning( disable : 4996 ) //warning C4996: '_snprintf': This function or variable may be unsafe.		
	#endif
	#define SNPRINTF _snprintf
	// doesn't truncate but terminate app #define SNPRINTF sprintf_s
#elif _MSC_VER >= 1200
	#define SNPRINTF _snprintf
#else
	#define SNPRINTF snprintf
#endif

// noexcept not implemented for VC++2013
#ifndef _MSC_VER
    #define NOEXCEPT noexcept
#else
    #define NOEXCEPT
#endif


// my assert
#define KALKULON_ASSERT(assertion) assert(assertion)

// if your compiler doesn't support some kind of itoa:
#ifndef _MSC_VER
 #include "itoa.h"
#endif



#endif // !defined(AFX_STDAFX_H__F57A2220_BB78_11D6_BEF2_E23F3DCEFF7E__INCLUDED_)
