rllib  1
rldefine.h
Go to the documentation of this file.
1 /***************************************************************************
2  rldefine.h - description
3  -------------------
4  begin : Wed Dec 04 2002
5  copyright : (C) 2001 by R. Lehrig
6  email : lehrig@t-online.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as *
13  * published by the Free Software Foundation *
14  * *
15  ***************************************************************************/
19 #ifndef _RL_DEFINE_H_
20 #define _RL_DEFINE_H_
21 
22 // CPP Standard
23 #if __cplusplus >= 199711L
24 #define RLCPP98
25 #endif
26 
27 #if __cplusplus >= 201103L
28 #define RLCPP11
29 #endif
30 
31 #if __cplusplus >= 201402L
32 #define RLCPP14
33 #endif
34 
35 #if __cplusplus >= 201703L
36 #define RLCPP17
37 #endif
38 
39 
40 // define WIN
41 #ifdef _WIN32
42 #define RLWIN32
43 #include <winsock2.h>
44 #include <windows.h>
45 #define WTHREAD_GNUC0 ( __GNUC__ * 1000 ) + __GNUC_MINOR__
46 #if WTHREAD_GNUC0 >= 4008
47 #endif
48 #endif
49 
50 // we always use this and are very lazy
51 #include <stdio.h>
52 #include <stdlib.h>
53 #include <string.h>
54 
55 // define unix if not already defined
56 #ifdef __unix__
57 #ifndef unix
58 #define unix
59 #endif
60 #endif
61 #ifdef unix
62 #define RLUNIX
63 #endif
64 
65 #if defined(__APPLE__) && defined(__MACH__)
66 #ifndef RLUNIX
67 #define RLUNIX
68 #endif
69 #endif
70 
71 #define rl_PRINTF_LENGTH 4096
72 #define rl_PRINTF_LENGTH_SPREADSHEET 4096
73 
74 #define BIT0 1
75 #define BIT1 2
76 #define BIT2 4
77 #define BIT3 8
78 #define BIT4 16
79 #define BIT5 32
80 #define BIT6 64
81 #define BIT7 128
82 #define BIT8 256*1
83 #define BIT9 256*2
84 #define BIT10 256*4
85 #define BIT11 256*8
86 #define BIT12 256*16
87 #define BIT13 256*32
88 #define BIT14 256*64
89 #define BIT15 256*128
90 #define BIT16 256*256*1
91 #define BIT17 256*256*2
92 #define BIT18 256*256*4
93 #define BIT19 256*256*8
94 #define BIT20 256*256*16
95 #define BIT21 256*256*32
96 #define BIT22 256*256*64
97 #define BIT23 256*256*128
98 #define BIT24 256*256*256*1
99 #define BIT25 256*256*256*2
100 #define BIT26 256*256*256*4
101 #define BIT27 256*256*256*8
102 #define BIT28 256*256*256*16
103 #define BIT29 256*256*256*32
104 #define BIT30 256*256*256*64
105 #define BIT31 256*256*256*128
106 
107 #define RLCRLF "\r\n"
108 
109 #endif