-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirth_config.h
80 lines (63 loc) · 1.64 KB
/
firth_config.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#pragma once
// redefine this to a value that makes sense for your platform
#ifndef FTH_UNDEFINED
# define FTH_UNDEFINED 0xCDCDCDCD
#endif
// Firth is case insensitive by default
#ifndef FTH_CASE_SENSITIVE
# define FTH_CASE_SENSITIVE 0
#endif
#ifndef FTH_DIR_SEPARATOR
#ifdef WIN32
# define FTH_DIR_SEPARATOR '\\'
#else
# define FTH_DIR_SEPARATOR '/'
#endif
#endif
#ifndef FTH_MAX_PATH
#ifdef _MAX_PATH
# define FTH_MAX_PATH _MAX_PATH
#else
# define FTH_MAX_PATH 260
#endif
#endif
// Set this to zero to remove all float support
#ifndef FTH_INCLUDE_FLOAT
# define FTH_INCLUDE_FLOAT 1
#endif
// Sets the limit for the length of a word name
const int FTH_MAX_WORD_NAME = 256;
// Sets the default size reserved for variables
const int FTH_DEFAULT_DATA_SEGMENT_SIZE = 1024;
// Sets the limit for the length of a firth_printf result
const int FTH_MAX_PRINTF_SIZE = 512;
// Defines the underlying type for a Number
typedef int FirthNumber;
// Defines the underlying type for a float Number
#if FTH_INCLUDE_FLOAT == 1
typedef float FirthFloat;
#endif
// Defines epsilon for floating point precision
const FirthFloat FTH_EPSILON = 1e-5f;
// Enables Firth modern syntax
#ifndef FTH_FIRTH_SYNTAX
# define FTH_FIRTH_SYNTAX 1
#endif
#if FTH_FIRTH_SYNTAX == 1
// Enable fn as colon synonym
#ifndef FTH_I_LIKE_RUST
#define FTH_I_LIKE_RUST 1
#endif
// Enable func as colon synonym
#ifndef FTH_I_LIKE_SWIFT
#define FTH_I_LIKE_SWIFT 1
#endif
// Enable function as colon synonym
#ifndef FTH_I_LIKE_JAVASCRIPT
#define FTH_I_LIKE_JAVASCRIPT 1
#endif
// Enable def as colon synonym
#ifndef FTH_I_LIKE_PYTHON
#define FTH_I_LIKE_PYTHON 1
#endif
#endif