"Fossies" - the Fresh Open Source Software Archive

Member "FreeBASIC-1.07.1-source/src/compiler/fb.bi" (27 Sep 2019, 16153 Bytes) of package /linux/privat/FreeBASIC-1.07.1-source.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Visual Basic source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "fb.bi": 1.07.0_vs_1.07.1.

    1 #ifndef __FB_BI__
    2 #define __FB_BI__
    3 
    4 const FB_VER_MAJOR  = "1"
    5 const FB_VER_MINOR  = "07"
    6 const FB_VER_PATCH  = "1"
    7 const FB_VERSION    = FB_VER_MAJOR + "." + FB_VER_MINOR + "." + FB_VER_PATCH
    8 const FB_BUILD_DATE = __DATE__
    9 const FB_BUILD_DATE_ISO = __DATE_ISO__
   10 const FB_SIGN       = "FreeBASIC " + FB_VERSION
   11 
   12 #ifdef FBSHA1
   13 const FB_BUILD_SHA1 = FBSHA1
   14 #else
   15 const FB_BUILD_SHA1 = ""
   16 #endif
   17 
   18 #define QUOTE !"\""
   19 #if defined( __FB_WIN32__ ) or defined( __FB_CYGWIN__ ) or defined( __FB_DOS__ )
   20     #define NEWLINE !"\r\n"
   21 #else
   22     #define NEWLINE !"\n"
   23 #endif
   24 #define RSLASH !"\\"
   25 #define TABCHAR !"\t"
   26 #define ESCCHAR !"\27"
   27 #define LFCHAR !"\n"
   28 
   29 #include once "list.bi"
   30 #include once "hash.bi"
   31 
   32 ''
   33 const FB_MAXPATHLEN         = 260
   34 
   35 const FB_MAXINCRECLEVEL     = 16
   36 const FB_MAXARGRECLEVEL     = 8
   37 const FB_MAXPRAGMARECLEVEL  = 8
   38 const FB_MAXNAMESPCRECLEVEL = 64
   39 
   40 const FB_MAXARRAYDIMS       = 8
   41 const FB_MAXDEFINEARGS      = 32
   42 
   43 const FB_MAXNAMELEN         = 128
   44 const FB_MAXLITLEN          = 1024              '' literal strings max length
   45 const FB_MAXNUMLEN          = 64
   46 const FB_MAXOPERANDLEN      = FB_MAXNAMELEN + 2 + 16 + 2 + 1
   47 const FB_MAXDEFINELEN       = FB_MAXLITLEN*4
   48 
   49 const FB_MAXSCOPEDEPTH      = 128
   50 
   51 const FB_DEFAULT_MAXERRORS  = 10
   52 
   53 const FB_ERR_INFINITE       = &h7fffffff
   54 
   55 const INVALID               = -1
   56 
   57 '' compiler options corresponding to the FBCMMLINEOPT struct
   58 '' (for use with the public fbSet/GetOption() interface)
   59 enum FB_COMPOPT
   60     '' compiler output file type
   61     FB_COMPOPT_OUTTYPE              '' FB_OUTTYPE_*
   62     FB_COMPOPT_PPONLY               '' boolean: TRUE for preprocessor-only mode
   63 
   64     '' backend, target, code generation
   65     FB_COMPOPT_BACKEND              '' FB_BACKEND_*
   66     FB_COMPOPT_TARGET               '' FB_COMPTARGET_*
   67     FB_COMPOPT_CPUTYPE              '' FB_CPUTYPE_*
   68     FB_COMPOPT_FPUTYPE              '' FB_FPUTYPE_*
   69     FB_COMPOPT_FPMODE               '' FB_FPMODE_*
   70     FB_COMPOPT_VECTORIZE            '' FB_VECTORIZELEVEL_*
   71     FB_COMPOPT_OPTIMIZELEVEL        '' integer, for -gen gcc's gcc -O<N>
   72     FB_COMPOPT_ASMSYNTAX            '' FB_ASMSYNTAX_*, for -gen gcc
   73 
   74     '' parser -lang mode
   75     FB_COMPOPT_LANG                 '' FB_LANG_*: lang compatibility
   76     FB_COMPOPT_FORCELANG            '' boolean: TRUE if -forcelang was specified
   77 
   78     '' debugging/error checking
   79     FB_COMPOPT_DEBUG                '' boolean: enable __FB_DEBUG__ (affects code generation)
   80     FB_COMPOPT_DEBUGINFO            '' boolean: enable debugging info (affects code generation)
   81     FB_COMPOPT_ASSERTIONS           '' boolean: enable assert()
   82     FB_COMPOPT_ERRORCHECK           '' boolean: runtime error checks
   83     FB_COMPOPT_RESUMEERROR          '' boolean: RESUME support
   84     FB_COMPOPT_EXTRAERRCHECK        '' boolean: NULL pointer/array bounds checks
   85     FB_COMPOPT_ERRLOCATION          '' boolean: enable reporting of error location
   86     FB_COMPOPT_NULLPTRCHECK         '' boolean: NULL pointer
   87     FB_COMPOPT_ARRAYBOUNDCHECK      '' boolean: array bounds checks
   88     FB_COMPOPT_PROFILE              '' boolean: -profile
   89 
   90     '' error/warning reporting behaviour
   91     FB_COMPOPT_WARNINGLEVEL         '' integer
   92     FB_COMPOPT_SHOWERROR            '' boolean: show source code line containing error?
   93     FB_COMPOPT_MAXERRORS            '' -maxerr integer
   94     FB_COMPOPT_PEDANTICCHK          '' FB_PDCHECK_* flags
   95 
   96     '' the rest
   97     FB_COMPOPT_GOSUBSETJMP          '' boolean: implement GOSUB using setjmp/longjump?
   98     FB_COMPOPT_VALISTASPTR          '' boolean: implement CVA_* using pointer expressions only?
   99     FB_COMPOPT_EXPORT               '' boolean: export all symbols declared as EXPORT?
  100     FB_COMPOPT_MSBITFIELDS          '' boolean: use M$'s bitfields packing?
  101     FB_COMPOPT_MULTITHREADED        '' boolean: -mt
  102     FB_COMPOPT_GFX                  '' boolean: -gfx (whether gfxlib should be linked)
  103     FB_COMPOPT_PIC                  '' boolean: -pic (whether to use position-independent code)
  104     FB_COMPOPT_STACKSIZE            '' integer
  105     FB_COMPOPT_OBJINFO              '' boolean: write/read .fbctinf sections etc.?
  106     FB_COMPOPT_SHOWINCLUDES         '' boolean: -showincludes
  107     FB_COMPOPT_MODEVIEW             ''__FB_GUI__
  108 
  109     FB_COMPOPTIONS
  110 end enum
  111 
  112 enum FB_MODEVIEW
  113     FB_MODEVIEW_CONSOLE = 0
  114     FB_MODEVIEW_GUI
  115 end enum
  116 
  117 const FB_DEFAULT_MODEVIEW   =  FB_MODEVIEW_CONSOLE
  118 
  119 '' pedantic checks
  120 enum FB_PDCHECK
  121     FB_PDCHECK_NONE         = &h00000000
  122 
  123     FB_PDCHECK_ESCSEQ       = &h00000001
  124     FB_PDCHECK_PARAMMODE    = &h00000002
  125     FB_PDCHECK_PARAMSIZE    = &h00000004
  126     FB_PDCHECK_NEXTVAR      = &h00000008
  127     FB_PDCHECK_CASTTONONPTR = &h00000010
  128     FB_PDCHECK_SIGNEDNESS   = &h00000020
  129     FB_PDCHECK_CASTFUNCPTR  = &h00000040
  130     FB_PDCHECK_CONSTNESS    = &h00000080
  131 
  132     FB_PDCHECK_ALL          = &hffffffff
  133 
  134     FB_PDCHECK_DEFAULT      = FB_PDCHECK_ALL xor ( FB_PDCHECK_NEXTVAR or FB_PDCHECK_SIGNEDNESS or FB_PDCHECK_CASTFUNCPTR or FB_PDCHECK_CONSTNESS )
  135 end enum
  136 
  137 '' cpu types
  138 '' When changing, update fb.bas:cputypeinfo()
  139 enum FB_CPUTYPE
  140     FB_CPUTYPE_386 = 0
  141     FB_CPUTYPE_486
  142     FB_CPUTYPE_586
  143     FB_CPUTYPE_686
  144     FB_CPUTYPE_ATHLON
  145     FB_CPUTYPE_ATHLONXP
  146     FB_CPUTYPE_ATHLONFX
  147     FB_CPUTYPE_ATHLONSSE3
  148     FB_CPUTYPE_PENTIUMMMX
  149     FB_CPUTYPE_PENTIUM2
  150     FB_CPUTYPE_PENTIUM3
  151     FB_CPUTYPE_PENTIUM4
  152     FB_CPUTYPE_PENTIUMSSE3
  153     FB_CPUTYPE_X86_64
  154     FB_CPUTYPE_ARMV6
  155     FB_CPUTYPE_ARMV7A
  156     FB_CPUTYPE_AARCH64
  157     FB_CPUTYPE__COUNT
  158 end enum
  159 
  160 enum
  161     FB_CPUFAMILY_X86 = 0
  162     FB_CPUFAMILY_X86_64
  163     FB_CPUFAMILY_ARM
  164     FB_CPUFAMILY_AARCH64
  165     FB_CPUFAMILY__COUNT
  166 end enum
  167 
  168 '' fpu types
  169 enum FB_FPUTYPE
  170     FB_FPUTYPE_FPU
  171     FB_FPUTYPE_SSE
  172 end enum
  173 
  174 '' floating-point modes
  175 enum FB_FPMODE
  176     FB_FPMODE_PRECISE
  177     FB_FPMODE_FAST
  178 end enum
  179 
  180 const FB_DEFAULT_FPMODE     = FB_FPMODE_PRECISE
  181 const FB_DEFAULT_FPUTYPE        = FB_FPUTYPE_FPU
  182 
  183 enum FB_VECTORIZELEVEL
  184     FB_VECTORIZE_NONE               '' no vectorization
  185     FB_VECTORIZE_NORMAL             '' complete expression merging
  186     FB_VECTORIZE_INTRATREE          '' intra-expression merging
  187     FB_VECTORIZE_SUBEXPRESSION      '' sub-expression merging (not implemented yet)
  188 end enum
  189 
  190 const FB_DEFAULT_VECTORIZELEVEL    = FB_VECTORIZE_NONE
  191 
  192 '' output file type
  193 enum FB_OUTTYPE
  194     FB_OUTTYPE_EXECUTABLE
  195     FB_OUTTYPE_STATICLIB
  196     FB_OUTTYPE_DYNAMICLIB
  197     FB_OUTTYPE_OBJECT
  198 end enum
  199 
  200 const FB_DEFAULT_OUTTYPE    = FB_OUTTYPE_EXECUTABLE
  201 
  202 '' target platform
  203 enum FB_COMPTARGET
  204     FB_COMPTARGET_WIN32
  205     FB_COMPTARGET_CYGWIN
  206     FB_COMPTARGET_LINUX
  207     FB_COMPTARGET_DOS
  208     FB_COMPTARGET_XBOX
  209     FB_COMPTARGET_FREEBSD
  210     FB_COMPTARGET_OPENBSD
  211     FB_COMPTARGET_DARWIN
  212     FB_COMPTARGET_NETBSD
  213     FB_COMPTARGETS
  214 end enum
  215 
  216 '' languages (update the fb.bas::langTb() array when changing this list)
  217 enum FB_LANG
  218     FB_LANG_INVALID = -1
  219 
  220     FB_LANG_FB = 0
  221     FB_LANG_FB_DEPRECATED
  222     FB_LANG_FB_FBLITE
  223     FB_LANG_QB
  224 
  225     FB_LANGS
  226 end enum
  227 
  228 const FB_DEFAULT_LANG = FB_LANG_FB
  229 
  230 ''
  231 enum FB_BACKEND
  232     FB_BACKEND_GAS
  233     FB_BACKEND_GCC
  234     FB_BACKEND_LLVM
  235 
  236     FB_BACKENDS
  237 end enum
  238 
  239 enum FB_ASMSYNTAX
  240     FB_ASMSYNTAX_INTEL = 0
  241     FB_ASMSYNTAX_ATT
  242 end enum
  243 
  244 '' Compiler internal settings, same order as FB_COMPOPT_*
  245 type FBCMMLINEOPT
  246     '' compiler output file type
  247     outtype         as FB_OUTTYPE
  248     pponly          as integer              '' TRUE for preprocessor-only mode
  249 
  250     '' backend, target, code generation
  251     backend         as FB_BACKEND           '' backend (-gen gas/gcc)
  252     target          as FB_COMPTARGET        '' target platform
  253     cputype         as FB_CPUTYPE           '' target CPU architecture
  254     fputype         as FB_FPUTYPE           '' target FPU
  255     fpmode          as FB_FPMODE            '' precise or fast fp mode (SSE+ only)
  256     vectorize       as FB_VECTORIZELEVEL    '' enable automatic vectorization
  257     optlevel        as integer              '' -gen gcc optimization level (gcc -O<N>)
  258     asmsyntax       as FB_ASMSYNTAX         '' asm syntax mode for -gen gcc
  259 
  260     '' parser -lang mode
  261     lang            as FB_LANG              '' lang compatibility
  262     forcelang       as integer              '' TRUE if -forcelang was specified
  263 
  264     '' debugging/error checking
  265     debug           as integer              '' true = enable __FB_DEBUG__ (default = false)
  266     debuginfo       as integer              '' true = add debug info (default = false)
  267     assertions      as integer              '' true = enable assert() (default = false)
  268     errorcheck      as integer              '' enable runtime error checks?
  269     resumeerr       as integer              '' enable RESUME support?
  270     extraerrchk     as integer              '' enable NULL pointer/array bounds checks?
  271     errlocation     as integer              '' enable reporting of error location (default = false)
  272     arrayboundchk   as integer              '' enable array bounds checks?
  273     nullptrchk      as integer              '' enable NULL pointer checks?
  274     profile         as integer              '' build profiling code (default = false)
  275 
  276     '' error/warning reporting behaviour
  277     warninglevel    as integer              '' (default = FB_WARNINGMSGS_DEFAULT_LEVEL)
  278     showerror       as integer              '' show line giving error (default = true)
  279     maxerrors       as integer              '' max number errors the parser will show
  280     pdcheckopt      as FB_PDCHECK           '' pedantic checks
  281 
  282     '' the rest
  283     gosubsetjmp     as integer              '' implement GOSUB using setjmp/longjump? (default = false)
  284     valistasptr     as integer              '' implement CVA_* using pointer expressions only?
  285     export          as integer              '' export all symbols declared as EXPORT (default = true)
  286     msbitfields     as integer              '' use M$'s bitfields packing
  287     multithreaded   as integer              '' link against thread-safe runtime library (default = false)
  288     gfx             as integer              '' Link against gfx library (default = false)
  289     pic             as integer              '' Whether to use position-independent code (default = false)
  290     stacksize       as integer
  291     objinfo         as integer
  292     showincludes    as integer
  293     modeview        as FB_MODEVIEW
  294 end type
  295 
  296 '' features allowed in the selected language
  297 enum FB_LANG_OPT
  298     FB_LANG_OPT_MT          = &h00000001
  299     FB_LANG_OPT_SCOPE       = &h00000002
  300     FB_LANG_OPT_NAMESPC     = &h00000004
  301     FB_LANG_OPT_EXTERN      = &h00000008
  302     FB_LANG_OPT_FUNCOVL     = &h00000010
  303     FB_LANG_OPT_OPEROVL     = &h00000020
  304     FB_LANG_OPT_CLASS       = &h00000040
  305     FB_LANG_OPT_INITIALIZER = &h00000080
  306     FB_LANG_OPT_SINGERRLINE = &h00000100
  307 
  308     FB_LANG_OPT_ALWAYSOVL   = &h00000400
  309     FB_LANG_OPT_AUTOVAR     = &h00000800
  310 
  311     FB_LANG_OPT_GOSUB       = &h00010000
  312     FB_LANG_OPT_CALL        = &h00020000
  313     FB_LANG_OPT_LET         = &h00040000
  314     FB_LANG_OPT_PERIODS     = &h00080000
  315     FB_LANG_OPT_NUMLABEL    = &h00100000
  316     FB_LANG_OPT_IMPLICIT    = &h00200000
  317     FB_LANG_OPT_DEFTYPE     = &h00400000
  318     FB_LANG_OPT_SUFFIX      = &h00800000
  319     FB_LANG_OPT_METACMD     = &h01000000
  320     FB_LANG_OPT_OPTION      = &h02000000
  321 
  322     FB_LANG_OPT_ONERROR     = &h08000000
  323 
  324     FB_LANG_OPT_QUIRKFUNC   = &h20000000
  325 end enum
  326 
  327 #if defined(__FB_WIN32__)
  328 const FB_HOST_EXEEXT        = ".exe"
  329 const FB_HOST_PATHDIV       = RSLASH
  330 const FB_DEFAULT_TARGET     = FB_COMPTARGET_WIN32
  331 #elseif defined(__FB_CYGWIN__)
  332 const FB_HOST_EXEEXT        = ".exe"
  333 const FB_HOST_PATHDIV       = "/"
  334 const FB_DEFAULT_TARGET     = FB_COMPTARGET_CYGWIN
  335 #elseif defined(__FB_LINUX__)
  336 const FB_HOST_EXEEXT        = ""
  337 const FB_HOST_PATHDIV       = "/"
  338 const FB_DEFAULT_TARGET     = FB_COMPTARGET_LINUX
  339 #elseif defined(__FB_DOS__)
  340 const FB_HOST_EXEEXT        = ".exe"
  341 const FB_HOST_PATHDIV       = RSLASH
  342 const FB_DEFAULT_TARGET     = FB_COMPTARGET_DOS
  343 #elseif defined(__FB_FREEBSD__)
  344 const FB_HOST_EXEEXT        = ""
  345 const FB_HOST_PATHDIV       = "/"
  346 const FB_DEFAULT_TARGET     = FB_COMPTARGET_FREEBSD
  347 #elseif defined(__FB_OPENBSD__)
  348 const FB_HOST_EXEEXT        = ""
  349 const FB_HOST_PATHDIV       = "/"
  350 const FB_DEFAULT_TARGET     = FB_COMPTARGET_OPENBSD
  351 #elseif defined(__FB_DARWIN__)
  352 const FB_HOST_EXEEXT        = ""
  353 const FB_HOST_PATHDIV       = "/"
  354 const FB_DEFAULT_TARGET     = FB_COMPTARGET_DARWIN
  355 #elseif defined(__FB_NETBSD__)
  356 const FB_HOST_EXEEXT        = ""
  357 const FB_HOST_PATHDIV       = "/"
  358 const FB_DEFAULT_TARGET     = FB_COMPTARGET_NETBSD
  359 #else
  360 #error Unsupported host
  361 #endif
  362 
  363 const FB_DEFAULT_CPUTYPE_X86     = FB_CPUTYPE_486
  364 const FB_DEFAULT_CPUTYPE_X86_64  = FB_CPUTYPE_X86_64
  365 const FB_DEFAULT_CPUTYPE_ARM     = FB_CPUTYPE_ARMV7A
  366 const FB_DEFAULT_CPUTYPE_AARCH64 = FB_CPUTYPE_AARCH64
  367 
  368 #ifdef __FB_ARM__
  369     const FB_DEFAULT_CPUTYPE32 = FB_DEFAULT_CPUTYPE_ARM
  370     const FB_DEFAULT_CPUTYPE64 = FB_DEFAULT_CPUTYPE_AARCH64
  371 #else
  372     const FB_DEFAULT_CPUTYPE32 = FB_DEFAULT_CPUTYPE_X86
  373     const FB_DEFAULT_CPUTYPE64 = FB_DEFAULT_CPUTYPE_X86_64
  374 #endif
  375 
  376 #if defined( __FB_64BIT__ ) or defined( __FB_ARM__ )
  377     const FB_DEFAULT_BACKEND = FB_BACKEND_GCC
  378 #else
  379     const FB_DEFAULT_BACKEND = FB_BACKEND_GAS
  380 #endif
  381 
  382 #ifdef __FB_64BIT__
  383     const FB_DEFAULT_CPUTYPE = FB_DEFAULT_CPUTYPE64
  384 #else
  385     const FB_DEFAULT_CPUTYPE = FB_DEFAULT_CPUTYPE32
  386 #endif
  387 
  388 '' info section
  389 const FB_INFOSEC_NAME = "fbctinf"
  390 const FB_INFOSEC_OBJNAME = "__fb_ct.inf"
  391 #ifdef __FB_DOS__
  392     const FB_INFOSEC_BASNAME = "__fb_ct.bas"
  393 #else
  394     const FB_INFOSEC_BASNAME = "__fb_ct.inf.bas"
  395 #endif
  396 
  397 #include once "error.bi"
  398 
  399 declare sub fbInit(byval ismain as integer, byval restarts as integer)
  400 declare sub fbEnd()
  401 
  402 declare sub fbCompile _
  403     ( _
  404         byval infname as zstring ptr, _
  405         byval outfname as zstring ptr, _
  406         byref pponlyfile as string, _
  407         byval ismain as integer _
  408     )
  409 
  410 declare function fbShouldRestart() as integer
  411 declare function fbShouldContinue() as integer
  412 
  413 declare sub fbGlobalInit()
  414 declare sub fbAddIncludePath(byref path as string)
  415 declare sub fbAddPreDefine(byref def as string)
  416 declare sub fbAddPreInclude(byref file as string)
  417 
  418 declare sub fbSetOption( byval opt as integer, byval value as integer )
  419 declare function fbGetOption( byval opt as integer ) as integer
  420 
  421 declare sub fbChangeOption(byval opt as integer, byval value as integer)
  422 declare sub fbSetLibs(byval libs as TSTRSET ptr, byval libpaths as TSTRSET ptr)
  423 declare sub fbGetLibs(byval libs as TSTRSET ptr, byval libpaths as TSTRSET ptr)
  424 declare sub fbPragmaOnce()
  425 declare sub fbIncludeFile(byval filename as zstring ptr, byval isonce as integer)
  426 declare sub fbOverrideFilename(byval filename as zstring ptr)
  427 
  428 declare function fbGetTargetId( ) as string
  429 declare function fbGetHostId( ) as string
  430 declare function fbIdentifyOs( byref osid as string ) as integer
  431 declare function fbIdentifyCpuFamily( byref osid as string ) as integer
  432 declare function fbCpuTypeFromCpuFamilyId( byref cpufamilyid as string ) as integer
  433 declare function fbGetGccArch( ) as zstring ptr
  434 declare function fbGetFbcArch( ) as zstring ptr
  435 declare function fbIs64Bit( ) as integer
  436 declare function fbGetBits( ) as integer
  437 declare function fbGetHostBits( ) as integer
  438 declare function fbGetCpuFamily( ) as integer
  439 declare function fbIdentifyFbcArch( byref fbcarch as string ) as integer
  440 declare function fbTargetSupportsELF( ) as integer
  441 declare function fbTargetSupportsCOFF( ) as integer
  442 
  443 declare function fbGetEntryPoint _
  444     ( _
  445     ) as string
  446 
  447 declare function fbGetModuleEntry _
  448     ( _
  449     ) as string
  450 
  451 declare function fbIsCrossComp _
  452     ( _
  453     ) as integer
  454 
  455 declare sub fbGetDefaultLibs _
  456     ( _
  457         byval dstlist as TLIST ptr, _
  458         byval dsthash as THASH ptr _
  459     )
  460 
  461 declare sub fbMainBegin _
  462     ( _
  463     )
  464 
  465 declare sub fbMainEnd _
  466     ( _
  467     )
  468 
  469 declare function fbGetLangOptions _
  470     ( _
  471         byval lang as FB_LANG _
  472     ) as FB_LANG_OPT
  473 
  474 declare function fbGetLangName _
  475     ( _
  476         byval lang as FB_LANG _
  477     ) as string
  478 
  479 declare function fbGetLangId _
  480     ( _
  481         byval txt as zstring ptr _
  482     ) as FB_LANG
  483 
  484 enum FB_CVA_LIST_TYPEDEF
  485     FB_CVA_LIST_NONE = 0
  486     FB_CVA_LIST_POINTER
  487     FB_CVA_LIST_BUILTIN_POINTER
  488     FB_CVA_LIST_BUILTIN_C_STD
  489     FB_CVA_LIST_BUILTIN_AARCH64
  490 end enum
  491 
  492 declare function fbGetBackendValistType () as FB_CVA_LIST_TYPEDEF
  493 
  494 ''
  495 '' macros
  496 ''
  497 
  498 #define fbLangOptIsSet( op ) ((env.lang.opt and (op)) <> 0)
  499 
  500 #define fbLangIsSet( op ) (env.clopt.lang = op)
  501 
  502 #define fbPdCheckIsSet( op ) ((env.clopt.pdcheckopt and (op)) <> 0)
  503 
  504 
  505 ''
  506 '' new implementation
  507 ''
  508 
  509 '' !!!TODO!!! - remove when 1.05 or later is released
  510 #ifndef cbool
  511     #define cbool(x_) iif((x_),-1,0)
  512     #define INT_BOOL_TO_STR(y_) *iif(y_,@"true",@"false")
  513     #define INT_BOOL_TO_WSTR(y_) *iif(y_,@wstr("true"),@wstr("false"))
  514 #else
  515     #define INT_BOOL_TO_STR(y_) str(y_)
  516     #define INT_BOOL_TO_WSTR(y_) wstr(y_)
  517 #endif
  518 
  519 #endif '' __FB_BI__