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

/home/jeroen/FOX/fox/fox-1.7.33/include/fxdefs.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                     FOX Definitions, Types, and Macros                        *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1997,2012 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (at your option) any later version.                                           *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 ********************************************************************************/
00021 #ifndef FXDEFS_H
00022 #define FXDEFS_H
00023 
00024 
00025 
00026 /********************************  Definitions  ********************************/
00027 
00028 // Placement new
00029 #include <new>
00030 
00031 // Truth values
00032 #ifndef TRUE
00033 #define TRUE 1
00034 #endif
00035 #ifndef FALSE
00036 #define FALSE 0
00037 #endif
00038 #ifndef MAYBE
00039 #define MAYBE 2
00040 #endif
00041 #ifndef NULL
00042 #define NULL 0
00043 #endif
00044 
00045 // Path separator
00046 #ifdef WIN32
00047 #define PATHSEP '\\'
00048 #define PATHSEPSTRING "\\"
00049 #define PATHLISTSEP ';'
00050 #define PATHLISTSEPSTRING ";"
00051 #define ISPATHSEP(c) ((c)=='\\' || (c)=='/')
00052 #else
00053 #define PATHSEP '/'
00054 #define PATHSEPSTRING "/"
00055 #define PATHLISTSEP ':'
00056 #define PATHLISTSEPSTRING ":"
00057 #define ISPATHSEP(c) ((c)=='/')
00058 #endif
00059 
00060 // End Of Line
00061 #ifdef WIN32
00062 #define ENDLINE "\r\n"
00063 #else
00064 #define ENDLINE "\n"
00065 #endif
00066 
00067 
00068 // For Windows
00069 #ifdef _DEBUG
00070 #ifndef DEBUG
00071 #define DEBUG
00072 #endif
00073 #endif
00074 #ifdef _NDEBUG
00075 #ifndef NDEBUG
00076 #define NDEBUG
00077 #endif
00078 #endif
00079 
00080 
00081 // Shared library support
00082 #ifdef WIN32
00083 #define FXLOCAL
00084 #define FXEXPORT __declspec(dllexport)
00085 #define FXIMPORT __declspec(dllimport)
00086 #else
00087 #if defined(__GNUC__) && (__GNUC__ >= 4)
00088 #define FXEXPORT __attribute__((visibility("default")))
00089 #define FXIMPORT
00090 #else
00091 #define FXEXPORT
00092 #define FXIMPORT
00093 #endif
00094 #endif
00095 
00096 
00097 // Define FXAPI for DLL builds
00098 #ifdef FOXDLL
00099 #ifdef FOXDLL_EXPORTS
00100 #define FXAPI FXEXPORT
00101 #define FXTEMPLATE_EXTERN
00102 #else
00103 #define FXAPI FXIMPORT
00104 #define FXTEMPLATE_EXTERN extern
00105 #endif
00106 #else
00107 #define FXAPI
00108 #define FXTEMPLATE_EXTERN
00109 #endif
00110 
00111 
00112 // Data alignment attribute
00113 #if defined(__GNUC__)
00114 #define __align(x)    __attribute__((aligned(x)))
00115 #elif defined(_MSC_VER)
00116 #define __align(x)    __declspec(align(x))
00117 #else
00118 #define __align(x)
00119 #endif
00120 
00121 // Thread-local storage attribute
00122 #if defined(__GNUC__)
00123 #define __threadlocal   __thread
00124 #elif defined(_MSC_VER)
00125 #define __threadlocal   __declspec(thread)
00126 #else
00127 #define __threadlocal
00128 #endif
00129 
00130 // Branch prediction optimization
00131 #if (__GNUC__ >= 3)
00132 #define __likely(cond)    __builtin_expect(!!(cond),1)
00133 #define __unlikely(cond)  __builtin_expect(!!(cond),0)
00134 #else
00135 #define __likely(cond)    (!!(cond))
00136 #define __unlikely(cond)  (!!(cond))
00137 #endif
00138 
00139 // Prefetch address
00140 #if (__GNUC__ >= 4) && (defined(__i386__) || defined(__x86_64__))
00141 #define __prefetch(addr)   __builtin_prefetch((addr),0)
00142 #define __prefetchw(addr)  __builtin_prefetch((addr),1)
00143 #else
00144 #define __prefetch(addr)
00145 #define __prefetchw(addr)
00146 #endif
00147 
00148 // Callback
00149 #ifdef WIN32
00150 #ifndef CALLBACK
00151 #define CALLBACK __stdcall
00152 #endif
00153 #endif
00154 
00155 
00156 // Disable some warnings in VC++
00157 #ifdef _MSC_VER
00158 #pragma warning(disable: 4251)
00159 #pragma warning(disable: 4231)
00160 #pragma warning(disable: 4244)
00161 #endif
00162 
00163 
00164 // Checking printf and scanf format strings
00165 #if defined(_CC_GNU_) || defined(__GNUG__) || defined(__GNUC__)
00166 #define FX_PRINTF(fmt,arg) __attribute__((format(printf,fmt,arg)))
00167 #define FX_SCANF(fmt,arg)  __attribute__((format(scanf,fmt,arg)))
00168 #define FX_FORMAT(arg) __attribute__((format_arg(arg)))
00169 #else
00170 #define FX_PRINTF(fmt,arg)
00171 #define FX_SCANF(fmt,arg)
00172 #define FX_FORMAT(arg)
00173 #endif
00174 
00175 // Raw event type
00176 #ifdef WIN32
00177 struct tagMSG;
00178 #else
00179 union _XEvent;
00180 #endif
00181 
00182 
00183 namespace FX {
00184 
00185 
00187 enum FXExponent {
00188   EXP_NEVER=FALSE,                  
00189   EXP_ALWAYS=TRUE,                  
00190   EXP_AUTO=MAYBE                    
00191   };
00192 
00193 
00195 enum {
00196   SEARCH_FORWARD    = 0,                            
00197   SEARCH_BACKWARD   = 1,                            
00198   SEARCH_NOWRAP     = 0,                            
00199   SEARCH_WRAP       = 2,                            
00200   SEARCH_EXACT      = 0,                            
00201   SEARCH_IGNORECASE = 4,                            
00202   SEARCH_REGEX      = 8,                            
00203   SEARCH_PREFIX     = 16,                           
00204   SEARCH_SUFFIX     = 32,                           
00205   SEARCH_CONTAINS   = (SEARCH_PREFIX|SEARCH_SUFFIX) 
00206   };
00207 
00208 
00209 /*********************************  Typedefs  **********************************/
00210 
00211 // Forward declarations
00212 class                          FXObject;
00213 class                          FXStream;
00214 class                          FXString;
00215 
00216 
00217 // Streamable types; these are fixed size!
00218 typedef char                   FXchar;
00219 typedef signed char            FXschar;
00220 typedef unsigned char          FXuchar;
00221 typedef bool                   FXbool;
00222 typedef unsigned short         FXushort;
00223 typedef short                  FXshort;
00224 typedef unsigned int           FXuint;
00225 typedef int                    FXint;
00226 typedef float                  FXfloat;
00227 typedef double                 FXdouble;
00228 #if defined(WIN32)
00229 typedef unsigned int           FXwchar;
00230 #if defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED)
00231 typedef unsigned short         FXnchar;
00232 #elif defined(__WATCOMC__) && !defined(_WCHAR_T_DEFINED)
00233 typedef long char              FXnchar;
00234 #else
00235 typedef wchar_t                FXnchar;
00236 #endif
00237 #else
00238 typedef wchar_t                FXwchar;
00239 typedef unsigned short         FXnchar;
00240 #endif
00241 #if defined(__LP64__) || defined(_LP64) || (_MIPS_SZLONG == 64) || (__WORDSIZE == 64)
00242 typedef unsigned long          FXulong;
00243 typedef long                   FXlong;
00244 #elif defined(_MSC_VER) || (defined(__BCPLUSPLUS__) && __BORLANDC__ > 0x500) || defined(__WATCOM_INT64__)
00245 typedef unsigned __int64       FXulong;
00246 typedef __int64                FXlong;
00247 #elif defined(__GNUG__) || defined(__GNUC__) || defined(__SUNPRO_CC) || defined(__MWERKS__) || defined(__SC__) || defined(_LONGLONG)
00248 typedef unsigned long long     FXulong;
00249 typedef long long              FXlong;
00250 #else
00251 #error "FXlong and FXulong not defined for this architecture!"
00252 #endif
00253 
00254 
00255 // Integral types large enough to hold value of a pointer
00256 #if defined(_MSC_VER) && defined(_WIN64)
00257 typedef __int64                FXival;
00258 typedef unsigned __int64       FXuval;
00259 #else
00260 typedef long                   FXival;
00261 typedef unsigned long          FXuval;
00262 #endif
00263 
00264 
00265 // Suffixes for 64-bit long constants
00266 #if defined(WIN32) && !defined(__GNUC__)
00267 #define FXLONG(c)  c ## i64
00268 #define FXULONG(c) c ## ui64
00269 #else
00270 #define FXLONG(c)  c ## LL
00271 #define FXULONG(c) c ## ULL
00272 #endif
00273 
00274 
00275 // Handle to something in server
00276 #ifdef WIN32
00277 typedef void*                  FXID;
00278 #else
00279 typedef unsigned long          FXID;
00280 #endif
00281 
00282 // Time since January 1, 1970 (UTC)
00283 typedef FXlong                 FXTime;
00284 
00285 // Pixel type (could be color index)
00286 typedef unsigned long          FXPixel;
00287 
00288 // RGBA pixel value
00289 typedef FXuint                 FXColor;
00290 
00291 // Hot key
00292 typedef FXuint                 FXHotKey;
00293 
00294 // Input source handle type
00295 #ifdef WIN32
00296 typedef void*                  FXInputHandle;
00297 #else
00298 typedef FXint                  FXInputHandle;
00299 #endif
00300 
00301 // Thread ID type
00302 #if defined(WIN32)
00303 typedef void*                  FXThreadID;
00304 #else
00305 typedef unsigned long          FXThreadID;
00306 #endif
00307 
00308 // Thread-local storage key
00309 typedef FXuval                 FXThreadStorageKey;
00310 
00311 // Raw event type
00312 #ifdef WIN32
00313 typedef tagMSG    FXRawEvent;
00314 #else
00315 typedef _XEvent   FXRawEvent;
00316 #endif
00317 
00318 
00320 #ifdef WIN32
00321 typedef FXushort  FXDragType;
00322 #else
00323 typedef FXID      FXDragType;
00324 #endif
00325 
00326 
00328 const FXdouble PI=3.1415926535897932384626433833;
00329 
00331 const FXdouble EULER=2.7182818284590452353602874713;
00332 
00334 const FXdouble DTOR=0.0174532925199432957692369077;
00335 
00337 const FXdouble RTOD=57.295779513082320876798154814;
00338 
00340 const FXTime forever=FXLONG(9223372036854775807);
00341 
00342 
00343 /**********************************  Macros  ***********************************/
00344 
00346 #define FXBIT(val,b)       (((val)>>(b))&1)
00347 
00349 #define FXABS(val)         (((val)>=0)?(val):-(val))
00350 
00352 #define FXSGN(val)         (((val)<0)?-1:1)
00353 
00355 #define FXSGNZ(val)        ((val)<0?-1:(val)>0?1:0)
00356 
00358 #define FXMAX(a,b)         (((a)>(b))?(a):(b))
00359 
00361 #define FXMIN(a,b)         (((a)>(b))?(b):(a))
00362 
00364 #define FXMIN3(x,y,z)      ((x)<(y)?FXMIN(x,z):FXMIN(y,z))
00365 
00367 #define FXMAX3(x,y,z)      ((x)>(y)?FXMAX(x,z):FXMAX(y,z))
00368 
00370 #define FXMIN4(x,y,z,w)    (FXMIN(FXMIN(x,y),FXMIN(z,w)))
00371 
00373 #define FXMAX4(x,y,z,w)    (FXMAX(FXMAX(x,y),FXMAX(z,w)))
00374 
00376 #define FXMINMAX(lo,hi,a,b) ((a)<(b)?((lo)=(a),(hi)=(b)):((lo)=(b),(hi)=(a)))
00377 
00379 #define FXCLAMP(lo,x,hi)   ((x)<(lo)?(lo):((x)>(hi)?(hi):(x)))
00380 
00382 #define FXSWAP(a,b,t)      ((t)=(a),(a)=(b),(b)=(t))
00383 
00385 #define FXLERP(a,b,f)      ((a)+((b)-(a))*(f))
00386 
00388 #define STRUCTOFFSET(str,member) (((char *)(&(((str *)0)->member)))-((char *)0))
00389 
00391 #define ARRAYNUMBER(array) (sizeof(array)/sizeof(array[0]))
00392 
00394 #define CONTAINER(ptr,str,mem) ((str*)(((char*)(ptr))-STRUCTOFFSET(str,mem)))
00395 
00397 #define MKUINT(l,h)        ((((FX::FXuint)(l))&0xffff) | (((FX::FXuint)(h))<<16))
00398 
00400 #define FXSEL(type,id)     ((((FX::FXuint)(id))&0xffff) | (((FX::FXuint)(type))<<16))
00401 
00403 #define FXSELTYPE(s)       ((FX::FXushort)(((s)>>16)&0xffff))
00404 
00406 #define FXSELID(s)         ((FX::FXushort)((s)&0xffff))
00407 
00409 #define FXISUTF8(c)        (((c)&0xC0)!=0x80)
00410 
00412 #define FXISLEADUTF8(c)    (((c)&0xC0)==0xC0)
00413 #define FXISFOLLOWUTF8(c)  (((c)&0xC0)==0x80)
00414 
00416 #define FXISSEQUTF8(c)     (((c)&0x80)==0x80)
00417 
00419 #define FXISUTF16(c)       (((c)&0xFC00)!=0xDC00)
00420 
00422 #define FXISLEADUTF16(c)   (((c)&0xFC00)==0xD800)
00423 #define FXISFOLLOWUTF16(c) (((c)&0xFC00)==0xDC00)
00424 
00426 #define FXISSEQUTF16(c)    (((c)&0xF800)==0xD800)
00427 
00429 #define FXISUTF32(c)       ((c)<0x110000)
00430 
00432 #define FXAVGCOLOR(ca,cb)  (((ca)&(cb))+((((ca)^(cb))&0xFEFEFEFE)>>1))
00433 
00434 
00435 // Definitions for big-endian machines
00436 #if FOX_BIGENDIAN == 1
00437 
00439 #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))
00440 
00442 #define FXRGB(r,g,b)       (((FX::FXuint)(FX::FXuchar)(r)<<8) | ((FX::FXuint)(FX::FXuchar)(g)<<16) | ((FX::FXuint)(FX::FXuchar)(b)<<24) | 0x000000ff)
00443 
00445 #define FXREDVAL(rgba)     ((FX::FXuchar)(((rgba)>>8)&0xff))
00446 
00448 #define FXGREENVAL(rgba)   ((FX::FXuchar)(((rgba)>>16)&0xff))
00449 
00451 #define FXBLUEVAL(rgba)    ((FX::FXuchar)(((rgba)>>24)&0xff))
00452 
00454 #define FXALPHAVAL(rgba)   ((FX::FXuchar)((rgba)&0xff))
00455 
00457 #define FXRGBACOMPVAL(rgba,comp) ((FX::FXuchar)(((rgba)>>((comp)<<3))&0xff))
00458 
00459 #endif
00460 
00461 
00462 // Definitions for little-endian machines
00463 #if FOX_BIGENDIAN == 0
00464 
00466 #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)))
00467 
00469 #define FXRGB(r,g,b)       (((FX::FXuint)(FX::FXuchar)(r)<<16) | ((FX::FXuint)(FX::FXuchar)(g)<<8) | ((FX::FXuint)(FX::FXuchar)(b)) | 0xff000000)
00470 
00472 #define FXREDVAL(rgba)     ((FX::FXuchar)(((rgba)>>16)&0xff))
00473 
00475 #define FXGREENVAL(rgba)   ((FX::FXuchar)(((rgba)>>8)&0xff))
00476 
00478 #define FXBLUEVAL(rgba)    ((FX::FXuchar)((rgba)&0xff))
00479 
00481 #define FXALPHAVAL(rgba)   ((FX::FXuchar)(((rgba)>>24)&0xff))
00482 
00484 #define FXRGBACOMPVAL(rgba,comp) ((FX::FXuchar)(((rgba)>>((3-(comp))<<3))&0xff))
00485 
00486 #endif
00487 
00488 
00496 #ifndef NDEBUG
00497 #define FXASSERT(exp) (__likely(exp)?((void)0):(void)FX::fxassert(#exp,__FILE__,__LINE__))
00498 #else
00499 #define FXASSERT(exp) ((void)0)
00500 #endif
00501 
00502 
00510 #ifndef NDEBUG
00511 #define FXVERIFY(exp) (__likely(exp)?((void)0):(void)FX::fxverify(#exp,__FILE__,__LINE__))
00512 #else
00513 #define FXVERIFY(exp) ((void)(exp))
00514 #endif
00515 
00516 
00529 #ifndef NDEBUG
00530 #define FXTRACE(arguments) FX::fxtrace arguments
00531 #else
00532 #define FXTRACE(arguments) ((void)0)
00533 #endif
00534 
00541 #define FXMALLOC(ptr,type,no)     (FX::fxmalloc((void **)(ptr),sizeof(type)*(no)))
00542 
00549 #define FXCALLOC(ptr,type,no)     (FX::fxcalloc((void **)(ptr),sizeof(type)*(no)))
00550 
00560 #define FXRESIZE(ptr,type,no)     (FX::fxresize((void **)(ptr),sizeof(type)*(no)))
00561 
00569 #define FXMEMDUP(ptr,src,type,no) (FX::fxmemdup((void **)(ptr),(const void*)(src),sizeof(type)*(no)))
00570 
00577 #define FXFREE(ptr)               (FX::fxfree((void **)(ptr)))
00578 
00579 
00588 #ifdef __OpenBSD__
00589 #define FLOAT_MATH_FUNCTIONS
00590 #endif
00591 #ifndef FLOAT_MATH_FUNCTIONS
00592 #ifndef __USE_ISOC99
00593 #ifndef __APPLE__
00594 #define fabsf(x)    ((float)fabs((double)(x)))
00595 #define ceilf(x)    ((float)ceil((double)(x)))
00596 #define floorf(x)   ((float)floor((double)(x)))
00597 #define fmodf(x,y)  ((float)fmod((double)(x),(double)(y)))
00598 #endif
00599 #define sqrtf(x)    ((float)sqrt((double)(x)))
00600 #define sinf(x)     ((float)sin((double)(x)))
00601 #define cosf(x)     ((float)cos((double)(x)))
00602 #define tanf(x)     ((float)tan((double)(x)))
00603 #define asinf(x)    ((float)asin((double)(x)))
00604 #define acosf(x)    ((float)acos((double)(x)))
00605 #define atanf(x)    ((float)atan((double)(x)))
00606 #define atan2f(y,x) ((float)atan2((double)(y),(double)(x)))
00607 #define powf(x,y)   ((float)pow((double)(x),(double)(y)))
00608 #define expf(x)     ((float)exp((double)(x)))
00609 #define logf(x)     ((float)log((double)(x)))
00610 #define log10f(x)   ((float)log10((double)(x)))
00611 #endif
00612 #endif
00613 
00614 
00615 /**********************************  Globals  **********************************/
00616 
00618 extern FXAPI FXuint fxrandom(FXuint& seed);
00619 
00621 extern FXAPI FXbool fxmalloc(void** ptr,unsigned long size);
00622 
00624 extern FXAPI FXbool fxcalloc(void** ptr,unsigned long size);
00625 
00627 extern FXAPI FXbool fxresize(void** ptr,unsigned long size);
00628 
00630 extern FXAPI FXbool fxmemdup(void** ptr,const void* src,unsigned long size);
00631 
00633 extern FXAPI void fxfree(void** ptr);
00634 
00636 extern FXAPI void fxerror(const FXchar* format,...) FX_PRINTF(1,2) ;
00637 
00639 extern FXAPI void fxwarning(const FXchar* format,...) FX_PRINTF(1,2) ;
00640 
00642 extern FXAPI void fxmessage(const FXchar* format,...) FX_PRINTF(1,2) ;
00643 
00645 extern FXAPI void fxassert(const FXchar* expression,const FXchar* filename,unsigned int lineno);
00646 
00648 extern FXAPI void fxverify(const FXchar* expression,const FXchar* filename,unsigned int lineno);
00649 
00651 extern FXAPI void fxtrace(FXint level,const FXchar* format,...) FX_PRINTF(2,3) ;
00652 
00654 extern FXAPI void fxsleep(FXuint n);
00655 
00657 extern FXAPI FXbool fxtoDOS(FXchar*& string,FXint& len);
00658 
00660 extern FXAPI FXbool fxfromDOS(FXchar*& string,FXint& len);
00661 
00663 extern FXAPI FXchar *fxstrdup(const FXchar* str);
00664 
00666 extern FXAPI FXuint fxstrhash(const FXchar* str);
00667 
00669 extern FXAPI void fxrgb_to_hsv(FXfloat& h,FXfloat& s,FXfloat& v,FXfloat r,FXfloat g,FXfloat b);
00670 
00672 extern FXAPI void fxhsv_to_rgb(FXfloat& r,FXfloat& g,FXfloat& b,FXfloat h,FXfloat s,FXfloat v);
00673 
00675 extern FXAPI void fxrgb_to_hsl(FXfloat& h,FXfloat& s,FXfloat& l,FXfloat r,FXfloat g,FXfloat b);
00676 
00678 extern FXAPI void fxhsl_to_rgb(FXfloat& r,FXfloat& g,FXfloat& b,FXfloat h,FXfloat s,FXfloat l);
00679 
00681 extern FXAPI FXint fxieeefloatclass(FXfloat number);
00682 
00684 extern FXAPI FXint fxieeedoubleclass(FXdouble number);
00685 
00687 extern FXAPI FXbool fxIsFinite(FXfloat number);
00688 
00690 extern FXAPI FXbool fxIsFinite(FXdouble number);
00691 
00693 extern FXAPI FXbool fxIsInf(FXfloat number);
00694 
00696 extern FXAPI FXbool fxIsInf(FXdouble number);
00697 
00699 extern FXAPI FXbool fxIsNan(FXfloat number);
00700 
00702 extern FXAPI FXbool fxIsNan(FXdouble number);
00703 
00705 extern FXAPI FXdouble fxtenToThe(FXint e);
00706 
00708 extern FXAPI FXwchar fxkeysym2ucs(FXwchar sym);
00709 
00711 extern FXAPI FXwchar fxucs2keysym(FXwchar ucs);
00712 
00714 extern FXAPI FXint fxparsegeometry(const FXchar *string,FXint& x,FXint& y,FXint& w,FXint& h);
00715 
00717 extern FXAPI FXbool fxisconsole(const FXchar *path);
00718 
00720 extern FXAPI FXTime fxgetticks();
00721 
00723 extern FXAPI const FXuchar fxversion[3];
00724 
00726 extern FXAPI FXint fxTraceLevel;
00727 
00728 
00730 extern FXAPI FXwchar wc(const FXchar *ptr);
00731 
00733 extern FXAPI FXwchar wc(const FXnchar *ptr);
00734 
00735 
00737 extern FXAPI const FXchar* wcinc(const FXchar* ptr);
00738 
00740 extern FXAPI FXchar* wcinc(FXchar* ptr);
00741 
00743 extern FXAPI const FXnchar* wcinc(const FXnchar* ptr);
00744 
00746 extern FXAPI FXnchar* wcinc(FXnchar* ptr);
00747 
00749 extern FXAPI const FXchar* wcdec(const FXchar* ptr);
00750 
00752 extern FXAPI FXchar* wcdec(FXchar* ptr);
00753 
00755 extern FXAPI const FXnchar* wcdec(const FXnchar* ptr);
00756 
00758 extern FXAPI FXnchar* wcdec(FXnchar* ptr);
00759 
00761 extern FXAPI const FXchar* wcstart(const FXchar* ptr);
00762 
00764 extern FXAPI FXchar* wcstart(FXchar* ptr);
00765 
00767 extern FXAPI const FXnchar* wcstart(const FXnchar *ptr);
00768 
00770 extern FXAPI FXnchar* wcstart(FXnchar *ptr);
00771 
00773 extern FXAPI FXint wclen(const FXchar *ptr);
00774 
00776 extern FXAPI FXint wclen(const FXnchar *ptr);
00777 
00779 extern FXAPI FXint wcvalid(const FXchar* ptr);
00780 
00782 extern FXAPI FXint wcvalid(const FXnchar* ptr);
00783 
00784 
00786 extern FXAPI FXint wc2utf(FXwchar w);
00787 
00789 extern FXAPI FXint wc2nc(FXwchar w);
00790 
00792 extern FXAPI FXint wcs2utf(const FXwchar* ptr,FXint len);
00793 extern FXAPI FXint wcs2utf(const FXwchar* ptr);
00794 
00796 extern FXAPI FXint ncs2utf(const FXnchar* ptr,FXint len);
00797 extern FXAPI FXint ncs2utf(const FXnchar* ptr);
00798 
00800 extern FXAPI FXint utf2wcs(const FXchar *ptr,FXint len);
00801 extern FXAPI FXint utf2wcs(const FXchar *ptr);
00802 
00804 extern FXAPI FXint utf2ncs(const FXchar *ptr,FXint len);
00805 extern FXAPI FXint utf2ncs(const FXchar *ptr);
00806 
00807 
00809 extern FXAPI FXint wc2utf(FXchar *dst,FXwchar w);
00810 
00812 extern FXAPI FXint wc2nc(FXnchar *dst,FXwchar w);
00813 
00815 extern FXAPI FXint wcs2utf(FXchar *dst,const FXwchar* src,FXint dlen,FXint slen);
00816 extern FXAPI FXint wcs2utf(FXchar *dst,const FXwchar* src,FXint dlen);
00817 
00819 extern FXAPI FXint ncs2utf(FXchar *dst,const FXnchar* src,FXint dlen,FXint slen);
00820 extern FXAPI FXint ncs2utf(FXchar *dst,const FXnchar* src,FXint dlen);
00821 
00823 extern FXAPI FXint utf2wcs(FXwchar *dst,const FXchar* src,FXint dlen,FXint slen);
00824 extern FXAPI FXint utf2wcs(FXwchar *dst,const FXchar* src,FXint dlen);
00825 
00827 extern FXAPI FXint utf2ncs(FXnchar *dst,const FXchar* src,FXint dlen,FXint slen);
00828 extern FXAPI FXint utf2ncs(FXnchar *dst,const FXchar* src,FXint dlen);
00829 
00830 }
00831 
00832 #endif

Copyright © 1997-2011 Jeroen van der Zijp