-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.h
55 lines (42 loc) · 931 Bytes
/
header.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once
#include <assert.h>
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _WIN32
#include <Windows.h>
#endif
#ifndef SF_API
#define SF_API
#endif
typedef char *sf_charptr;
typedef int sf_int;
typedef double sf_float;
// FILE *SF_DEBUG_DUMP;
#define SF_DISABLE_THIS
#ifdef __cplusplus
extern "C"
{
#endif
#if !defined (SF_NODEBUG)
SF_API FILE *sf_dbg_get_filedump ();
#endif
#ifdef __cplusplus
}
#endif
#if !defined(SF_NODEBUG)
#define e_printf(...) fprintf (sf_dbg_get_filedump (), __VA_ARGS__)
#else
#define e_printf(...)
#endif
#define here printf ("%s (%s): %d\n", __FILE__, __FUNCTION__, __LINE__);
// This is how they are to be written in code
#define SF_BOOL_TRUE_REPR "true"
#define SF_BOOL_FALSE_REPR "false"
#define SF_DTYPE_NONE_REPR "none"
#define SF_OP_OVRLD_PLUS ("operator+")
#ifndef max
#define max(a, b) (((a) > (b)) ? (a) : (b))
#endif