As usual a bit of cleanup while there...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if !defined(MISC_H_INCLUDED)
#define MISC_H_INCLUDED
#if !defined(MISC_H_INCLUDED)
#define MISC_H_INCLUDED
-
-////
-//// Includes
-////
-
-#include <fstream>
#include <string>
#include "types.h"
#include <string>
#include "types.h"
-////
-//// Macros
-////
-
-#define Min(x, y) (((x) < (y))? (x) : (y))
-#define Max(x, y) (((x) < (y))? (y) : (x))
-
-
-////
-//// Prototypes
-////
-
extern const std::string engine_name();
extern const std::string engine_author();
extern int get_system_time();
extern const std::string engine_name();
extern const std::string engine_author();
extern int get_system_time();
extern void prefetch(char* addr);
extern void prefetchPawn(Key, int);
extern void prefetch(char* addr);
extern void prefetchPawn(Key, int);
-
-////
-//// Debug
-////
-
extern bool dbg_show_mean;
extern bool dbg_show_hit_rate;
extern bool dbg_show_mean;
extern bool dbg_show_hit_rate;
extern void dbg_hit_on(bool b);
extern void dbg_hit_on_c(bool c, bool b);
extern void dbg_before();
extern void dbg_hit_on(bool b);
extern void dbg_hit_on_c(bool c, bool b);
extern void dbg_before();
#if !defined(TYPES_H_INCLUDED)
#define TYPES_H_INCLUDED
#if !defined(TYPES_H_INCLUDED)
#define TYPES_H_INCLUDED
-#if !defined(_MSC_VER)
-
-#include <inttypes.h>
// Disable some silly and noisy warning from MSVC compiler
#pragma warning(disable: 4800) // Forcing value to bool 'true' or 'false'
#pragma warning(disable: 4127) // Conditional expression is constant
// Disable some silly and noisy warning from MSVC compiler
#pragma warning(disable: 4800) // Forcing value to bool 'true' or 'false'
#pragma warning(disable: 4127) // Conditional expression is constant
+// MSVC does not support <inttypes.h>
typedef signed __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef signed __int16 int16_t;
typedef signed __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef signed __int16 int16_t;
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
-#endif // !defined(_MSC_VER)
+#else
+
+#include <inttypes.h>
-// Hash keys
-typedef uint64_t Key;
+// Our hash key and bitboard types
+typedef uint64_t Key;
typedef uint64_t Bitboard;
typedef uint64_t Bitboard;
+#define Min(x, y) (((x) < (y)) ? (x) : (y))
+#define Max(x, y) (((x) < (y)) ? (y) : (x))