/
msvcore.cpp
349 lines (260 loc) · 7.85 KB
/
msvcore.cpp
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
/* Copyright (C) 2004-2100 Mishael Senin, aka MikelSV. All rights reserved.
Ëèöåíçèÿ ïîïóëÿðèçàöèè àâòîðà. :]
Âû íå äîëæíû èçìåíÿòü èìÿ è äðóãóþ èíôîðìàöèþ î ðàçðàáîò÷èêå è íå ïðèñâàèâàòü àâòîðñòâî ñåáå.
Íå ïðîäàâàòü è íå áðàòü äåíåã çà êîä èç äàííîé áèáëèîòåêè.
Ðàçðåøàåòñÿ ìîäèôèöèðîâàòü è äîðàáàòûâàòü.
Êîä ïðåäîñòàâëåí êàê åñòü è àâòîð íå îòâå÷àåò, äàæå åñëè âû ïîïûòàåòåñü ïðîñòðåëèòü ñåáå íîãó.
License popularizing author. [LPA]
You should not change the name and other information about the developer and not assign authorship itself.
Do not sell and do not take money for the code from this library.
Permission is granted to modify and refine.
Author bears no responsibility for any consequences of using this code.
Responsibility for shooting through your leg lies entirely on you.
* /
//>> Velcome to MSV Lib. <<
//>> New name MSV Core <<
//>> So. What you want?
//>> I included Strings for You.
//>> What can i included for you?
// !!!!!>>>>>>>>>>> Add this to general cpp: #define USEMSV_GENERALCPP
// Add to project: "..\..\opensource\msvcore\VString.cpp" "..\..\opensource\msvcore\MString.cpp"
// ----------------------------------------------------------------- Simple Variant ---------------------------
/*
#define USEMSV_GENERALCPP
#define PROJECTNAME "projectname"
#define PROJECTVER PROJECTNAME ## _versions
#include "../../opensource/msvcore/msvcore.cpp"
Versions PROJECTVER[]={
// new version to up
"0.0.0.1", "10.10.2013 21:24"
};
int main(int args, char* arg[]){
ILink link; mainp(args, arg, link);
print(PROJECTNAME, " v.", PROJECTVER[0].ver," (", PROJECTVER[0].date, ").\r\n");
return 0;
}
*/
// ----------------------------------------------------------------- End of Simple Variant -----------------------
// Extensions
// #define USEMSV_ANDOID - for android apps
// #define USEMSV_LOGPRINT - save output data to memory buffer
// #define USEMSV_FILEPRINT - save output data to file
// #define USEMSV_FLASH - use for Crossbridge compile
// Teplates:
// #define USEMSV_ITOS - use Itos templates. Deprecated! Use: SString.
// Formats:
// #define USEMSV_XDATACONT - use XDataContainer ( Parsers: XML, Json )
// #define USEMSV_AMF - use amf encoder/decoder
// #define USEMSV_NMEA - use nmea functions
// #define USEMSV_CJX - use CJX container
// Other:
// #define USEMSV_MSL_FL - use MSL Fast Line
// #define USEMSV_MSL_FV - use MSL Five
// #define USEMSV_CONFLINE - use ConfLine
// #define USEMSV_MODLINE - use ModLine
// #define USEMSV_CPPXCC - use CppXcc preprocessor
// Lists:
// #define USEMSV_ILIST - use IList template dunamic array. Vector, one resized memory block.
// #define USEMSV_MLIST - use MList template dunamic array
// #define USEMSV_OLIST - use OList template dunamic array
// #define USEMSV_ULIST - use UList template dynamic array. // defined by default
// DELETED #define USEMSV_FSTRING - use FString class // defined by default
// Server:
// #define USEMSV_STORMSERVER - use storm server
// #define USEMSV_HTTP - use http functions
// #define USEMSV_WEBSOCKETS - use WebSockets client and listen_websockets for storm
// #define USEMSV_LIGHTSERVER - use light server
// #define USEMSV_TGBOTS - use Telegram Bots
// Network
// #define USEMSV_TRAFFIX - use Traffix class
// Extensions:
// #define USEMSV_PCRE - use PCRE functions // add to include path to pcre.h and pcre.lib
// #define USEMSV_MYSQL - use MySQL // add to include path to mysql.h and mysql.lib
// #define USEMSV_OPENSSL - use openssl // add to include path: ..\..\openssl-1.0.2\include
// Console:
// #define USEMSV_CONSOLE - use console functions
// #define USEMSV_CONSOLELINE - use console windows
// Windows and graphics:
// #define USEMSV_MWND - use Mwnd Library
// #define USEMSV_HTMLRENDER - use HtmlRender class.
// #define USEMSV_GAMEBOX - use GameBox class.
// Memory:
// #define USEMSV_MEMORYCONTROL - interception malloc() & free()
// #define USEMSV_INTERCEPT_MALLOC - interception malloc() & free() // don't work
// API
// #define USEMSV_NESTAPI - use Nest API
// #define USEMSV_NESTAPI2 - use Nest API v.2
//
// #define USEMSV_UNSTABEBIGINT - unstable big int: val * 10 ^ pow.
// Special:
// #define USEMSV_BUFECHO - Input / Output buffer echo control
// #define USEMSV_TESTS - Testing
// Development.
// #define USEMSV_ASTRING_DEV - New AutoString classes.
// #define USEMSV_HASHLIST - Hash List.
// #define USEMSV_HASHTREE - Hash Tree.
#ifndef PROJECTNAME
#error Please set #define PROJECTNAME "you_project_name"
#endif
// Include Defines
#include "msvdefine.h"
// Include Virtual Strings
#include "VString.h"
// Include Real Strings
#include "MString.h"
// Include Temp or Thread String
#include "TString.h"
// Include Defines uses VString & MString
// Include Defines Mobile (???)
#include "msvdefine_m.h"
// Include 4D Strings
// #include...
#ifdef USEMSV_GENERALCPP
// MMatrix
#include "list/MMatrix.h"
#include "list/MMatrixCore.h"
#ifdef USEMSV_FLASH
#include "flash/flash.cpp"
#endif
#include "list/UList.cpp"
#include "msvdefine.cpp"
#include "crossplatform/treads.cpp"
//#include "crossplatform-filefunc.cpp"
#include "crossplatform/mscr.cpp"
#include "crossplatform/send.cpp"
//#include "msvio.h"
//#include "msvnet.h"
#include "crossplatform/msvnet.cpp"
//#include "list/FString.cpp"
//#include "list/TString.cpp" // Thread String
// Include Stack String
#include "SString.h"
#include "SString.cpp"
#ifdef USEMSV_ITOS
#include "crossplatform/itos.cpp"
#endif
#ifdef USEMSV_ASTRING_DEV
#include "list/AString.cpp"
#endif
// intercept malloc & free
#ifdef USEMSV_INTERCEPT
#include "special/asmp.h"
#include "special/interception.h"
#endif
#ifdef USEMSV_CPPXCC
#include "msl/xcc.h"
#endif
#ifdef USEMSV_INTERCEPT_MALLOC
#include "special/intercept-malloc.h"
#endif
// Inject Dll
#ifdef USEMSV_INJECTDLL
#include "crossplatform/injectdll.cpp"
#endif
#ifdef USEMSV_XDATACONT
#include "proto/xdatacont.cpp"
#endif
#ifdef USEMSV_CJX
#include "proto/cjx.cpp"
#endif
#ifdef USEMSV_MLIST
#include "list/MList.h"
#endif
#ifdef USEMSV_ILIST
#include "list/IList.h"
#endif
#ifdef USEMSV_OLIST
#include "list/OList.h"
//#include "list/OList3.h"
#endif
#ifdef USEMSV_ALIST
#include "list/AList.h"
#endif
//#ifdef USEMSV_ULIST
// #include "list/UList.h"
//#endif
#ifdef USEMSV_TRIELIST
#include "list/TrieList.h"
#endif
//#ifdef USEMSV_HASHLIST
// #include "list/HashList.h"
//#endif
//#ifdef USEMSV_HASHTREE
// #include "list/HashTree.h"
//#endif
#ifdef USEMSV_AMF
#include "proto/amf.cpp"
#endif
#ifdef USEMSV_PCRE
#include "special/pcre-include.h"
#endif
#ifdef USEMSV_CONSOLE
#include "crossplatform/console.cpp"
#endif
#ifdef USEMSV_MWND
#include "MWnd/MWndLib.h"
#endif
#ifdef USEMSV_CONSOLELINE
#include "line/consoleline.cpp"
#include "line/ConsoleWindow.cpp"
#endif
#ifdef USEMSV_OPENSSL
#include "crossplatform/openssl.cpp"
#endif
#ifdef USEMSV_MODLINE
#include "cntx/modline.cpp"
#endif
#ifdef USEMSV_WEBSOCKETS
#include "proto/websockets.cpp"
#endif
#ifdef USEMSV_MYSQL
#include "proto/mysql-con.cpp"
#endif
#ifdef USEMSV_MSL_FL
#include "msl-fl/msl-fl.h"
#endif
#ifdef USEMSV_MSL_FV
#include "msl/msl-five.h"
#endif
#ifdef USEMSV_HTTP
#include "crossplatform/iheader.cpp"
#include "crossplatform/http.cpp"
#endif
#ifdef USEMSV_CONFLINE
#include "special/confline.cpp"
#endif
#ifdef USEMSV_NESTAPI
#include "proto/nest_api.h"
#endif
#ifdef USEMSV_NESTAPI2
#include "proto/nest_api2.h"
#endif
#ifdef USEMSV_STORMSERVER
#include "server/storm/storm-include.h"
#endif
#ifdef USEMSV_LIGHTSERVER
#include "server/light/light.h"
#endif
#ifdef USEMSV_TGBOTS
#include "proto/tgbots.cpp"
#endif
#ifdef USEMSV_ANDROID
#include "android/device.cpp"
#endif
#ifdef USEMSV_TRAFFIX
#include "net/traffix.h"
#endif
#ifdef USEMSV_NMEA
#include "sat/nmea.cpp"
#endif
#ifdef USEMSV_BUFECHO
#include "special/bufecho.cpp"
#endif
#ifdef USEMSV_TESTS
#include "special/tests.cpp"
#endif
#ifdef USEMSV_UNSTABEBIGINT
#include "special/unbint.h"
#endif
#endif
// NEED