#define PROF         2   // (Middle edition for 98/Me) in string table
                         // (Evaluation copy) (Light edition)
#define TR           1   // Menu Tools

#define CONSOLE      0
#define UNIX         0
#define QT_GRAPHIC   0   // CONSOLE<=UNIX<=QT_GRAPHIC
#define MY_SQL       0   // CONSOLE<=UNIX<=MY_SQL
#define PLUG_IN      0
#define SHAREWARE    0
#define EVAL_PERIOD  31  // 3*31
#define OLD_TERMS    1

#if PROF
#define BUFFERS      (long)8192
#define L_BUFER      (long)49150  // 3*light, for string2, atom_buf - maximal string in Str.Store //32 for test
#define MAX_ARGUMENTS 4096
/* MAX_VARS is maximum substitusions in one unification or maximum variabels in the atom and in the head */
// MAX_VARS has to be < 32,000 because has to be < S_MASKA-TT_START
#define MAX_VARS     (long)16384   /* Change MAX_VARS here */

#else
#define BUFFERS      (long)2048
#define L_BUFER      (long)16382  // -2 for +2
#define MAX_ARGUMENTS 1024
#define MAX_VARS     (long)4096
#endif // PROF

#define AND_OR              32 // Maximum 32x32 bit=1024 arguments
#define FIRST_ROWS          10
#define LAST_COLOR          14
#define CHAR_SETS           26
#define LISTS_INCREASE      256
#define INCREASE_C          2048

#define K_SP_TYPES          5
#if OLD_TERMS
#define TT_ADD               0
#define TT_START           256
#define TT_USED            124 // used for open bracket (
#define TT_SET             125 // {}
#define TT_LIST            126 // []
#define TT_VAR             127
#define TT_LINK            128
#define TT_STR             129
#define TT_INT             130
#define TT_FLOAT           131
#define TT_OBJ             132
#else
#define TT_ADD             132
#define TT_START           512 // 512 or 265 (256+9)
#define TT_USED            256 // ???
#define TT_SET             257
#define TT_LIST            258
#define TT_VAR             259
#define TT_LINK            260
#define TT_STR             261
#define TT_INT             262
#define TT_FLOAT           263
#define TT_OBJ             264
#endif

#define CLASS_OBJECT               10 // 0  ...
#define CLASS_SYSTEM               20 // 0 01 ...
#define CLASS_S_CLASS              30 // 0 01 0001 ...
#define CLASS_SYSTEM_FILE          40 // 0 01 0011...
#define CLASS_SYSTEM_LIST          50 // 0 01 0000 ...
#define CLASS_SYSTEM_ActiveX       60 // 0 01 0001 ...
#define CLASS_SYSTEM_PEN           70 // 0 01 1010...
#define CLASS_SYSTEM_BRUSH         80 // 0 01 1001...
#define CLASS_SYSTEM_FONT          90 // 0 01 1011...
#define CLASS_SYSTEM_FONTMASK     100 // 0 01 1100...
#define CLASS_SYSTEM_BITMAP       110 // 
#define CLASS_SYSTEM_TIMER        120 // 0 01 1000...
#define CLASS_SYSTEM_DLL          130 // 0 01 1101...
#define CLASS_SYSTEM_SOCKET       140 // 0 01 0100...
#define CLASS_SYSTEM_MYSQL        150 // 0 01 0101...
#define CLASS_SYSTEM_MYSQL_RES    160 // 0 01 0110...
#define CLASS_SYSTEM_MYSQL_ROW    170 // 0 01 0111 ...
#define CLASS_SYSTEM_CONTAINER    180 // 0 01 0010 ...
#define CLASS_SYSTEM_MENU         190 // 0 01 1110...
#define C_S_WIN                   220 // 0 01 1110...
#define C_S_WIN_Main              230 // 0 01 1110 0001...
#define C_S_WIN_Dialog            240 // 0 01 1110 0010...
#define C_S_WIN_Static            250 // 0 01 1110 0101...
#define C_S_WIN_Edit              260 // 0 01 1110 0110...
#define C_S_WIN_Animate           270 // 0 01 1110...
#define C_S_WIN_ListBox           280 // 0 01 1110 0111...
#define C_S_WIN_TreeBox           290 // 0 01 1110 0111...
#define C_S_WIN_Bitmap            300 // 0 01 1110...
#define C_S_WIN_Icon              310 // 0 01 1110...
#define C_S_WIN_Button            320 // 0 01 1110 0011...
#define C_S_WIN_CheckBox          330 // ?????
#define C_S_WIN_Embedded          340 // ????? // this has to be the last (the bottom)

#define M1           0xffffffff         /* -1 or the bigest unsigned */
#define SM1          0xffff             /* -1 or the bigest unsigned word */
#define M2           0xfffffffe
#define SM2          0xfffe
#define NUL          0
#define THREE_Q      0xc0000000
#define MASKA        0xfffffff
#define MASKA1       0x1fffffff
#define MASKA2       0x3fffffff
#define HALFM        0x7fffffff

#define HALF         0x80000000
#define QUARTER      0x40000000
#define OBSEG1       0x20000000  // pred
#define OBSEG2       0x10000000  // pred without arg.
#define OBSEG3       0x8000000   // Func
#define OBSEG4       0x4000000   // Func without arg.
#define OBSEG5       0x2000000   // object name
#define OBSEG6       0x1000000   // op
                                 // other? methods? set_op?
#define NUMB_FLAGS   8
#define LAST_FLAG    0x1000000 // OBSEG6
#define MASKA_P      0xffffff
#define MASKA3       0xffffff  // one bit more for functor

#define LAST_FLAG_F  0x10000000

#define BLOCK       0x4000 // in connection with MAX_VARS
#define UNIQUE      0x8000 // delete
#define SHALF       0x8000
#define S_MASKA     0x7fff

#define PRIME_1     7
#define PRIME_2     1031


#define TP_CALK         0x3f000000
#define TP_TAPA         0x80000000
#define TP_REAL_TAPA    0x40000000
#define TP_VAR     0x20000000
#define TP_TERM    0x10000000
#define TP_STR     0x8000000
#define TP_INT     0x4000000
#define TP_FLOAT   0x2000000
#define TP_OBJ     0x1000000
#define TP_LIST    0x800000
#define TP_IO      0x400000
#define TP_SET     0x200000
#define TP_TEMP_FLAG    0x100000  // only when TEMP

#define TP_MAKE_TRANSFORM 0x400000
#define TP_OTHER_DEF      0x200000
#define MASKA_TP   0x1fffff
#define MAKE_INT   0x1
#define MAKE_REAL  0x2

#define DF_CLASSES     0  // 19
#define DF_WINDOW      22
#define DF_DIALOG      23
#define DF_STATIC      24
#define DF_EDIT        25
#define DF_ANIMATE     26
#define DF_LISTBOX     27
#define DF_TREEBOX     28
#define DF_BITMAP      29
#define DF_ICON        30
#define DF_BUTTON      31 // 6
#define DF_MENU        38
#define DF_NORMAL      39
#define DF_POP_UP      40
#define DF_SEPARATOR   41
#define DF_INIT        42
#define DF_CLOSE       43
#define DF_PAINT       44
#define DF_PRESS       45
#define DF_MOUSE_CLICK 46
#define DF_R_MOUSE_CLICK 47
#define DF_SIZE        48
#define DF_CHAR        49
#define DF_KEY_DOWN    50
#define DF_VpMi        51  // (?-)
#define DF_DptMi       52  // :-
#define DF_Cherga      53  // [#]
#define DF_TRUE        54
#define DF_FALSE       55
#define DF_OP          56
#define DF_BUILT_IN    57
#define DF_IS          58
#define DF_VAR         59
#define DF_TERM        60
#define DF_STR         61
#define DF_INT         62
#define DF_FLOAT       63
#define DF_OBJ         64
#define DF_NUM         65
#define DF_LIST        66
#define DF_SET         67
#define DF_IO          68
#define DF_METHOD      69
#define DF_NOCALK      70
#define DF_POST        71
#define DF_BEGIN       72
#define DF_END         73
#define DF_CURRENT     74
#define DF_DptMiMi     75  // :--
#define DF_NO_CASE     76
#define DF_CHECKED     77
#define DF_GRAYED      78
#define DF_DEFAULT     79
#define DF_BOLD        80
#define DF_ITALIC      81
#define DF_UNDERLINE   82
#define DF_INCLUDE     83
#define DF_BEFORE      84
#define DF_FX               85 // importand row
#define DF_FIRST            105
#define DF_LAST             106
#define DF_ROOT             107
#define DF_MOUSE_MOVE       108
#define DF_MOUSE_WHEEL      109
#define DF_MOUSE_CLICK_UP   110
#define DF_R_MOUSE_CLICK_UP 111
#define DF_KEY_UP           112
#define DF_LEFT             113
#define DF_RIGHT            114
#define DF_MIDDLE           115
#define DF_SHIFT            116
#define DF_CTRL             117
#define DF_ALT              118
#define DF_FUNCTION         119
#define DF_STATE            120
#define DF_DEFINE_SYS_VAR   121
#define DF_UNDEF_OP         122
#define DF_LIKE_ATOM        123
#define DF_LIKE_FUNCTOR     124

#define DEFINITIONS         128

#define SUBTYPE(X,Y) (ObjectStore[X+4]&ObjectStore[Y+5])==ObjectStore[Y+4]
#define WILL_CLEAN(X)  Link[sv_subv++]=X;my_gl++


