Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

fxdefs.h
1 /********************************************************************************
2 * *
3 * FOX Definitions, Types, and Macros *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1997,2017 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXDEFS_H
22 #define FXDEFS_H
23 
24 
25 
26 /******************************** Definitions ********************************/
27 
28 // Placement new
29 #include <new>
30 
31 
32 // Path separator
33 #ifdef WIN32
34 #define PATHSEP '\\'
35 #define PATHSEPSTRING "\\"
36 #define PATHLISTSEP ';'
37 #define PATHLISTSEPSTRING ";"
38 #define ISPATHSEP(c) ((c)=='\\' || (c)=='/')
39 #else
40 #define PATHSEP '/'
41 #define PATHSEPSTRING "/"
42 #define PATHLISTSEP ':'
43 #define PATHLISTSEPSTRING ":"
44 #define ISPATHSEP(c) ((c)=='/')
45 #endif
46 
47 
48 // End Of Line
49 #ifdef WIN32
50 #define ENDLINE "\r\n"
51 #else
52 #define ENDLINE "\n"
53 #endif
54 
55 
56 // For Windows
57 #ifdef _DEBUG
58 #ifndef DEBUG
59 #define DEBUG
60 #endif
61 #endif
62 #ifdef _NDEBUG
63 #ifndef NDEBUG
64 #define NDEBUG
65 #endif
66 #endif
67 
68 
69 // Shared library support
70 #ifdef WIN32
71 #define FXLOCAL
72 #define FXEXPORT __declspec(dllexport)
73 #define FXIMPORT __declspec(dllimport)
74 #else
75 #if defined(__GNUC__) && (__GNUC__ >= 4)
76 #define FXEXPORT __attribute__((visibility("default")))
77 #define FXIMPORT
78 #else
79 #define FXEXPORT
80 #define FXIMPORT
81 #endif
82 #endif
83 
84 
85 // Define FXAPI for DLL builds
86 #ifdef FOXDLL
87 #ifdef FOXDLL_EXPORTS
88 #define FXAPI FXEXPORT
89 #define FXTEMPLATE_EXTERN
90 #else
91 #define FXAPI FXIMPORT
92 #define FXTEMPLATE_EXTERN extern
93 #endif
94 #else
95 #define FXAPI
96 #define FXTEMPLATE_EXTERN
97 #endif
98 
99 
100 // Data alignment attribute
101 #if defined(__GNUC__)
102 #define __align(x) __attribute__((aligned(x)))
103 #elif defined(_MSC_VER)
104 #define __align(x) __declspec(align(x))
105 #else
106 #define __align(x)
107 #endif
108 
109 // Get alignment of pointer p to b=2^n bytes, returning 0..b-1
110 #define __alignment(p,b) (((FXival)(p))&((b)-1))
111 
112 // Check if pointer p is aligned to b=2^n bytes
113 #define __isaligned(p,b) (__alignment(p,b)==0)
114 
115 // Align pointer to b=2^n bytes
116 #define __alignto(p,b) ((void*)((((FXival)(p))+((FXival)((b)-1)))&~((FXival)((b)-1))))
117 
118 
119 // Thread-local storage attribute
120 #if defined(__GNUC__)
121 #define __threadlocal __thread
122 #elif defined(_MSC_VER)
123 #define __threadlocal __declspec(thread)
124 #else
125 #define __threadlocal
126 #endif
127 
128 
129 // Non-returning function
130 #if defined(__GNUC__)
131 #define __noreturn __attribute__((__noreturn__))
132 #elif (_MSC_VER >= 1400)
133 #define __noreturn __declspec(noreturn)
134 #else
135 #define __noreturn
136 #endif
137 
138 // Branch prediction optimization
139 #if (__GNUC__ >= 3)
140 #define __likely(cond) __builtin_expect(!!(cond),1)
141 #define __unlikely(cond) __builtin_expect(!!(cond),0)
142 #else
143 #define __likely(cond) (!!(cond))
144 #define __unlikely(cond) (!!(cond))
145 #endif
146 
147 
148 // Prefetch address
149 #if (__GNUC__ >= 4) && (defined(__i386__) || defined(__x86_64__))
150 #define __prefetch(addr) __builtin_prefetch((addr),0)
151 #define __prefetchw(addr) __builtin_prefetch((addr),1)
152 #else
153 #define __prefetch(addr)
154 #define __prefetchw(addr)
155 #endif
156 
157 
158 // Standard call calling sequence
159 #ifdef WIN32
160 #ifndef CALLBACK
161 #define CALLBACK __stdcall
162 #endif
163 #endif
164 
165 
166 // C Language calling sequence
167 #ifdef WIN32
168 #ifndef CDECL
169 #define CDECL __cdecl
170 #endif
171 #else
172 #ifndef CDECL
173 #define CDECL
174 #endif
175 #endif
176 
177 
178 // Checking printf and scanf format strings
179 #if defined(_CC_GNU_) || defined(__GNUG__) || defined(__GNUC__)
180 #define FX_PRINTF(fmt,arg) __attribute__((format(printf,fmt,arg)))
181 #define FX_SCANF(fmt,arg) __attribute__((format(scanf,fmt,arg)))
182 #define FX_FORMAT(arg) __attribute__((format_arg(arg)))
183 #else
184 #define FX_PRINTF(fmt,arg)
185 #define FX_SCANF(fmt,arg)
186 #define FX_FORMAT(arg)
187 #endif
188 
189 
190 // Suffixes for 64-bit long constants
191 #if defined(WIN32) && !defined(__GNUC__)
192 #define FXLONG(c) c ## i64
193 #define FXULONG(c) c ## ui64
194 #else
195 #define FXLONG(c) c ## LL
196 #define FXULONG(c) c ## ULL
197 #endif
198 
199 
200 // Raw event type
201 #ifdef WIN32
202 struct tagMSG;
203 #else
204 union _XEvent;
205 #endif
206 
207 
208 namespace FX {
209 
210 
212 enum { maybe=2 };
213 
214 
216 enum FXExponent {
217  EXP_NEVER=0,
218  EXP_ALWAYS=1,
219  EXP_AUTO=2
220  };
221 
222 
224 enum {
225  SEARCH_BACKWARD = 1,
226  SEARCH_FORWARD = 2,
227  SEARCH_NOWRAP = 0,
228  SEARCH_WRAP = 4,
229  SEARCH_EXACT = 0,
230  SEARCH_IGNORECASE = 8,
231  SEARCH_REGEX = 16,
232  SEARCH_PREFIX = 32,
233  SEARCH_SUFFIX = 64
234  };
235 
236 
237 /********************************* Typedefs **********************************/
238 
239 // Forward declarations
240 class FXObject;
241 class FXStream;
242 class FXString;
243 
244 
245 // Streamable types; these are fixed size!
246 typedef char FXchar;
247 typedef signed char FXschar;
248 typedef unsigned char FXuchar;
249 typedef bool FXbool;
250 typedef unsigned short FXushort;
251 typedef short FXshort;
252 typedef unsigned int FXuint;
253 typedef int FXint;
254 typedef float FXfloat;
255 typedef double FXdouble;
256 #if defined(WIN32)
257 typedef unsigned int FXwchar;
258 #if defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED)
259 typedef unsigned short FXnchar;
260 #elif defined(__WATCOMC__) && !defined(_WCHAR_T_DEFINED)
261 typedef long char FXnchar;
262 #else
263 typedef wchar_t FXnchar;
264 #endif
265 #else
266 typedef wchar_t FXwchar;
267 typedef unsigned short FXnchar;
268 #endif
269 #if defined(__LP64__) || defined(_LP64) || (_MIPS_SZLONG == 64) || (__WORDSIZE == 64)
270 typedef unsigned long FXulong;
271 typedef long FXlong;
272 #elif defined(_MSC_VER) || (defined(__BCPLUSPLUS__) && __BORLANDC__ > 0x500) || defined(__WATCOM_INT64__)
273 typedef unsigned __int64 FXulong;
274 typedef __int64 FXlong;
275 #elif defined(__GNUG__) || defined(__GNUC__) || defined(__SUNPRO_CC) || defined(__MWERKS__) || defined(__SC__) || defined(_LONGLONG)
276 typedef unsigned long long FXulong;
277 typedef long long FXlong;
278 #else
279 #error "FXlong and FXulong not defined for this architecture!"
280 #endif
281 
282 
283 // Integral types large enough to hold value of a pointer
284 #if defined(_WIN64)
285 #if defined (_MSC_VER)
286 typedef __int64 FXival;
287 typedef unsigned __int64 FXuval;
288 #else
289 typedef long long FXival;
290 typedef unsigned long long FXuval;
291 #endif
292 #else
293 typedef long FXival;
294 typedef unsigned long FXuval;
295 #endif
296 
297 
298 // Generic void pointer
299 typedef void* FXptr;
300 
301 
302 // Handle to something in server
303 #ifdef WIN32
304 typedef void* FXID;
305 #else
306 typedef unsigned long FXID;
307 #endif
308 
309 // Time since January 1, 1970 (UTC)
310 typedef FXlong FXTime;
311 
312 // Pixel type (could be color index)
313 typedef unsigned long FXPixel;
314 
315 // RGBA pixel value
316 typedef FXuint FXColor;
317 
318 // Hot key
319 typedef FXuint FXHotKey;
320 
321 // Input source handle type
322 #ifdef WIN32
323 typedef void* FXInputHandle;
324 #else
325 typedef FXint FXInputHandle;
326 #endif
327 
328 // Thread ID type
329 #if defined(WIN32)
330 typedef void* FXThreadID;
331 #else
332 typedef unsigned long FXThreadID;
333 #endif
334 
335 // Thread-local storage key
336 typedef FXuval FXThreadStorageKey;
337 
338 // Raw event type
339 #ifdef WIN32
340 typedef tagMSG FXRawEvent;
341 #else
342 typedef _XEvent FXRawEvent;
343 #endif
344 
345 
347 #ifdef WIN32
348 typedef FXushort FXDragType;
349 #else
350 typedef FXID FXDragType;
351 #endif
352 
353 
355 const FXTime forever=FXLONG(9223372036854775807);
356 
357 
358 /********************************** Macros ***********************************/
359 
361 #define FXBIT(val,b) (((val)>>(b))&1)
362 
364 #define FXABS(val) (((val)>=0)?(val):-(val))
365 
367 #define FXSGN(val) (((val)<0)?-1:1)
368 
370 #define FXSGNZ(val) ((val)<0?-1:(val)>0?1:0)
371 
373 #define FXSGNX(x,b) (((FXint)((x)<<(32-(b))))>>(32-(b)))
374 
376 #define FXMAX(a,b) (((a)>(b))?(a):(b))
377 
379 #define FXMIN(a,b) (((a)>(b))?(b):(a))
380 
382 #define FXMIN3(x,y,z) ((x)<(y)?FXMIN(x,z):FXMIN(y,z))
383 
385 #define FXMAX3(x,y,z) ((x)>(y)?FXMAX(x,z):FXMAX(y,z))
386 
388 #define FXMIN4(x,y,z,w) (FXMIN(FXMIN(x,y),FXMIN(z,w)))
389 
391 #define FXMAX4(x,y,z,w) (FXMAX(FXMAX(x,y),FXMAX(z,w)))
392 
394 #define FXMINMAX(lo,hi,a,b) ((a)<(b)?((lo)=(a),(hi)=(b)):((lo)=(b),(hi)=(a)))
395 
397 #define FXCLAMP(lo,x,hi) ((x)<(lo)?(lo):((x)>(hi)?(hi):(x)))
398 
400 #define FXSWAP(a,b,t) ((t)=(a),(a)=(b),(b)=(t))
401 
403 #define FXLERP(a,b,f) ((a)+((b)-(a))*(f))
404 
406 #define STRUCTOFFSET(str,member) (((char *)(&(((str *)0)->member)))-((char *)0))
407 
409 #define ARRAYNUMBER(array) (sizeof(array)/sizeof(array[0]))
410 
412 #define CONTAINER(ptr,str,mem) ((str*)(((char*)(ptr))-STRUCTOFFSET(str,mem)))
413 
415 #define MKUINT(l,h) ((((FX::FXuint)(l))&0xffff) | (((FX::FXuint)(h))<<16))
416 
418 #define FXSEL(type,id) ((((FX::FXuint)(id))&0xffff) | (((FX::FXuint)(type))<<16))
419 
421 #define FXSELTYPE(s) ((FX::FXushort)(((s)>>16)&0xffff))
422 
424 #define FXSELID(s) ((FX::FXushort)((s)&0xffff))
425 
427 #define FXISUTF8(c) (((c)&0xC0)!=0x80)
428 
430 #define FXISLEADUTF8(c) (((c)&0xC0)==0xC0)
431 #define FXISFOLLOWUTF8(c) (((c)&0xC0)==0x80)
432 
434 #define FXISSEQUTF8(c) (((c)&0x80)==0x80)
435 
437 #define FXISUTF16(c) (((c)&0xFC00)!=0xDC00)
438 
440 #define FXISLEADUTF16(c) (((c)&0xFC00)==0xD800)
441 #define FXISFOLLOWUTF16(c) (((c)&0xFC00)==0xDC00)
442 
444 #define FXISSEQUTF16(c) (((c)&0xF800)==0xD800)
445 
447 #define FXISUTF32(c) ((c)<0x110000)
448 
450 #define FXAVGCOLOR(ca,cb) (((ca)&(cb))+((((ca)^(cb))&0xFEFEFEFE)>>1))
451 
452 
453 // Definitions for big-endian machines
454 #if FOX_BIGENDIAN == 1
455 
457 #define FXRGBA(r,g,b,a) (((FX::FXuint)(FX::FXuchar)(a)) | ((FX::FXuint)(FX::FXuchar)(r)<<8) | ((FX::FXuint)(FX::FXuchar)(g)<<16) | ((FX::FXuint)(FX::FXuchar)(b)<<24))
458 
460 #define FXRGB(r,g,b) (((FX::FXuint)(FX::FXuchar)(r)<<8) | ((FX::FXuint)(FX::FXuchar)(g)<<16) | ((FX::FXuint)(FX::FXuchar)(b)<<24) | 0x000000ff)
461 
463 #define FXREDVAL(rgba) ((FX::FXuchar)(((rgba)>>8)&0xff))
464 
466 #define FXGREENVAL(rgba) ((FX::FXuchar)(((rgba)>>16)&0xff))
467 
469 #define FXBLUEVAL(rgba) ((FX::FXuchar)(((rgba)>>24)&0xff))
470 
472 #define FXALPHAVAL(rgba) ((FX::FXuchar)((rgba)&0xff))
473 
475 #define FXRGBACOMPVAL(rgba,comp) ((FX::FXuchar)(((rgba)>>((comp)<<3))&0xff))
476 
478 #define FXCOLORREF2RGB(ref) (FX::FXuint)((((ref)<<8)&0xff000000) | (((ref)<<8)&0xff0000) | (((ref)<<8)&0xff00) | 0x000000ff)
479 
481 #define FXRGB2COLORREF(rgb) (FX::FXuint)((((rgb)>>8)&0xff0000) | (((rgb)>>8)&0xff00) | (((rgb)>>8)&0xff))
482 
483 #endif
484 
485 
486 // Definitions for little-endian machines
487 #if FOX_BIGENDIAN == 0
488 
490 #define FXRGBA(r,g,b,a) (((FX::FXuint)(FX::FXuchar)(a)<<24) | ((FX::FXuint)(FX::FXuchar)(r)<<16) | ((FX::FXuint)(FX::FXuchar)(g)<<8) | ((FX::FXuint)(FX::FXuchar)(b)))
491 
493 #define FXRGB(r,g,b) (((FX::FXuint)(FX::FXuchar)(r)<<16) | ((FX::FXuint)(FX::FXuchar)(g)<<8) | ((FX::FXuint)(FX::FXuchar)(b)) | 0xff000000)
494 
496 #define FXREDVAL(rgba) ((FX::FXuchar)(((rgba)>>16)&0xff))
497 
499 #define FXGREENVAL(rgba) ((FX::FXuchar)(((rgba)>>8)&0xff))
500 
502 #define FXBLUEVAL(rgba) ((FX::FXuchar)((rgba)&0xff))
503 
505 #define FXALPHAVAL(rgba) ((FX::FXuchar)(((rgba)>>24)&0xff))
506 
508 #define FXRGBACOMPVAL(rgba,comp) ((FX::FXuchar)(((rgba)>>((3-(comp))<<3))&0xff))
509 
511 #define FXCOLORREF2RGB(ref) (FX::FXuint)((((ref)>>16)&0xff) | ((ref)&0xff00) | (((ref)<<16)&0xff0000) | 0xff000000)
512 
514 #define FXRGB2COLORREF(rgb) (FX::FXuint)((((rgb)<<16)&0xff0000) | ((rgb)&0xff00) | (((rgb)>>16)&0xff))
515 
516 #endif
517 
518 
526 #ifndef NDEBUG
527 #define FXASSERT(exp) (__likely(exp)?((void)0):(void)FX::fxassert(#exp,__FILE__,__LINE__))
528 #else
529 #define FXASSERT(exp) ((void)0)
530 #endif
531 
532 
540 #ifndef NDEBUG
541 #define FXVERIFY(exp) (__likely(exp)?((void)0):(void)FX::fxverify(#exp,__FILE__,__LINE__))
542 #else
543 #define FXVERIFY(exp) ((void)(exp))
544 #endif
545 
546 
559 #ifndef NDEBUG
560 #define FXTRACE(arguments) FX::fxtrace arguments
561 #else
562 #define FXTRACE(arguments) ((void)0)
563 #endif
564 
571 #define FXMALLOC(ptr,type,no) (FX::fxmalloc((void **)(ptr),sizeof(type)*(no)))
572 
579 #define FXCALLOC(ptr,type,no) (FX::fxcalloc((void **)(ptr),sizeof(type)*(no)))
580 
590 #define FXRESIZE(ptr,type,no) (FX::fxresize((void **)(ptr),sizeof(type)*(no)))
591 
599 #define FXMEMDUP(ptr,src,type,no) (FX::fxmemdup((void **)(ptr),(const void*)(src),sizeof(type)*(no)))
600 
607 #define FXFREE(ptr) (FX::fxfree((void **)(ptr)))
608 
609 /********************************** Globals **********************************/
610 
612 extern FXAPI FXbool fxmalloc(void** ptr,FXuval size);
613 
615 extern FXAPI FXbool fxcalloc(void** ptr,FXuval size);
616 
618 extern FXAPI FXbool fxresize(void** ptr,FXuval size);
619 
621 extern FXAPI FXbool fxmemdup(void** ptr,const void* src,FXuval size);
622 
624 extern FXAPI void fxfree(void** ptr);
625 
627 extern FXAPI __noreturn void fxerror(const FXchar* format,...) FX_PRINTF(1,2) ;
628 
630 extern FXAPI void fxwarning(const FXchar* format,...) FX_PRINTF(1,2) ;
631 
633 extern FXAPI void fxmessage(const FXchar* format,...) FX_PRINTF(1,2) ;
634 
636 extern FXAPI void fxassert(const FXchar* expression,const FXchar* filename,unsigned int lineno);
637 
639 extern FXAPI void fxverify(const FXchar* expression,const FXchar* filename,unsigned int lineno);
640 
642 extern FXAPI void fxtrace(FXint level,const FXchar* format,...) FX_PRINTF(2,3) ;
643 
645 extern FXAPI FXbool fxtoDOS(FXchar*& string,FXint& len);
646 
648 extern FXAPI FXbool fxfromDOS(FXchar*& string,FXint& len);
649 
651 extern FXAPI FXchar *fxstrdup(const FXchar* str);
652 
654 extern FXAPI FXuint fxstrhash(const FXchar* str);
655 
657 extern FXAPI FXival fxstrlcpy(FXchar* dst,const FXchar* src,FXival len);
658 
660 extern FXAPI FXival fxstrlcat(FXchar* dst,const FXchar* src,FXival len);
661 
663 extern FXAPI void fxrgb_to_hsv(FXfloat& h,FXfloat& s,FXfloat& v,FXfloat r,FXfloat g,FXfloat b);
664 
666 extern FXAPI void fxhsv_to_rgb(FXfloat& r,FXfloat& g,FXfloat& b,FXfloat h,FXfloat s,FXfloat v);
667 
669 extern FXAPI void fxrgb_to_hsl(FXfloat& h,FXfloat& s,FXfloat& l,FXfloat r,FXfloat g,FXfloat b);
670 
672 extern FXAPI void fxhsl_to_rgb(FXfloat& r,FXfloat& g,FXfloat& b,FXfloat h,FXfloat s,FXfloat l);
673 
675 extern FXint fxencode64(FXchar* dst,const FXchar* src,FXint len);
676 
678 extern FXint fxdecode64(FXchar* dst,const FXchar* src,FXint len);
679 
681 extern FXAPI FXwchar fxkeysym2ucs(FXwchar sym);
682 
684 extern FXAPI FXwchar fxucs2keysym(FXwchar ucs);
685 
687 extern FXAPI FXint fxparsegeometry(const FXchar *string,FXint& x,FXint& y,FXint& w,FXint& h);
688 
690 extern FXAPI FXbool fxisconsole(const FXchar *path);
691 
693 extern FXAPI FXTime fxgetticks();
694 
696 extern FXAPI const FXuchar fxversion[3];
697 
699 extern FXAPI FXint fxTraceLevel;
700 
701 
703 extern FXAPI FXwchar wc(const FXchar *ptr);
704 
706 extern FXAPI FXwchar wc(const FXnchar *ptr);
707 
708 
710 extern FXAPI const FXchar* wcinc(const FXchar* ptr);
711 
713 extern FXAPI FXchar* wcinc(FXchar* ptr);
714 
716 extern FXAPI const FXnchar* wcinc(const FXnchar* ptr);
717 
719 extern FXAPI FXnchar* wcinc(FXnchar* ptr);
720 
722 extern FXAPI const FXchar* wcdec(const FXchar* ptr);
723 
725 extern FXAPI FXchar* wcdec(FXchar* ptr);
726 
728 extern FXAPI const FXnchar* wcdec(const FXnchar* ptr);
729 
731 extern FXAPI FXnchar* wcdec(FXnchar* ptr);
732 
734 extern FXAPI const FXchar* wcstart(const FXchar* ptr);
735 
737 extern FXAPI FXchar* wcstart(FXchar* ptr);
738 
740 extern FXAPI const FXnchar* wcstart(const FXnchar *ptr);
741 
743 extern FXAPI FXnchar* wcstart(FXnchar *ptr);
744 
746 extern FXAPI FXint wclen(const FXchar *ptr);
747 
749 extern FXAPI FXint wclen(const FXnchar *ptr);
750 
752 extern FXAPI FXint wcvalid(const FXchar* ptr);
753 
755 extern FXAPI FXint wcvalid(const FXnchar* ptr);
756 
757 
759 extern FXAPI FXint wc2utf(FXwchar w);
760 
762 extern FXAPI FXint wc2nc(FXwchar w);
763 
765 extern FXAPI FXint wcs2utf(const FXwchar* ptr,FXint len);
766 extern FXAPI FXint wcs2utf(const FXwchar* ptr);
767 
769 extern FXAPI FXint ncs2utf(const FXnchar* ptr,FXint len);
770 extern FXAPI FXint ncs2utf(const FXnchar* ptr);
771 
773 extern FXAPI FXint utf2wcs(const FXchar *ptr,FXint len);
774 extern FXAPI FXint utf2wcs(const FXchar *ptr);
775 
777 extern FXAPI FXint utf2ncs(const FXchar *ptr,FXint len);
778 extern FXAPI FXint utf2ncs(const FXchar *ptr);
779 
780 
782 extern FXAPI FXint wc2utf(FXchar *dst,FXwchar w);
783 
785 extern FXAPI FXint wc2nc(FXnchar *dst,FXwchar w);
786 
788 extern FXAPI FXint wcs2utf(FXchar *dst,const FXwchar* src,FXint dlen,FXint slen);
789 extern FXAPI FXint wcs2utf(FXchar *dst,const FXwchar* src,FXint dlen);
790 
792 extern FXAPI FXint ncs2utf(FXchar *dst,const FXnchar* src,FXint dlen,FXint slen);
793 extern FXAPI FXint ncs2utf(FXchar *dst,const FXnchar* src,FXint dlen);
794 
796 extern FXAPI FXint utf2wcs(FXwchar *dst,const FXchar* src,FXint dlen,FXint slen);
797 extern FXAPI FXint utf2wcs(FXwchar *dst,const FXchar* src,FXint dlen);
798 
800 extern FXAPI FXint utf2ncs(FXnchar *dst,const FXchar* src,FXint dlen,FXint slen);
801 extern FXAPI FXint utf2ncs(FXnchar *dst,const FXchar* src,FXint dlen);
802 
804 extern FXAPI void memswap(void* dst,void* src,FXuval n);
805 
806 }
807 
808 #endif

Copyright © 1997-2016 Jeroen van der Zijp