// ************************************************************************
// QUICK.H   V2.7
// Written by SAp. (c)
// Some useful C++ definations.
//
//  comments:
//   '_asm' in asm block allows to transfer line directly to extrenal
//      assembler (without C++ sintax checking).  Usefull for label's  and
// 		macroses. Also enables jump optimization. Local labels musts begin
//		with '$$'.
//	   Defination of _NoTasm disable this future.
//  'StackSize=xxxx' makes stack size equal xxxx byte. May be used once.
// ************************************************************************
#if defined(quick_h)
		#error Old version of quick.h used !
#endif
#if defined(QUICK_H)
		#if defined (QUICK_H_VER)
				#undef QUICK_H_VER
		#endif
				#define QUICK_H_VER 0x27
		#if QUICK_H<QUICK_H_VER
				#error Old version of quick.h used! (current v2.7)
		#endif
		#if QUICK_H>QUICK_H_VER
				#error Used version of quick.h is higher! (current v2.7)
		#endif
#endif
#ifndef QUICK_H
		#define QUICK_H QUICK_H_VER
		#ifndef asm
				#define _asm asm
			#ifndef _NoTasm
				static void _QUICK_H_FUN9(void) {
					asm asm EQU
					asm JUMPS
					asm LOCALS $$
					}
			#endif
		#endif
                #if !defined(__COLORS)
                #define __COLORS
                enum COLORS {
                BLACK,          /* dark colors */
                BLUE,
                GREEN,
                CYAN,
                RED,
                MAGENTA,
                BROWN,
                LIGHTGRAY,
				DARKGRAY,           /* light colors */
                LIGHTBLUE,
                LIGHTGREEN,
                LIGHTCYAN,
                LIGHTRED,
                LIGHTMAGENTA,
                YELLOW,
                WHITE,
                OLD=0xff
				};
				#endif
				#ifndef _StackSize
					#define _StackSize(size) unsigned int _stklen=size
				#endif

				#ifndef NULL
						#define NULL 0
				#endif
				#ifndef TRUE
                        #define TRUE 255
                #endif
                #ifndef FALSE
                        #define FALSE 0
                #endif
				#ifndef ext
                #define ext external
                #endif
                #ifndef reg
                #define reg _fastcall
                #endif
                #ifndef uns
				#define uns unsigned
                #endif
                typedef void far * vfar;
                typedef long double ldouble;
                typedef unsigned char byte;
                typedef unsigned int word;
				typedef unsigned long dword;
				#ifndef MK_FP
                #define MK_FP( seg,ofs )( (void _seg * )( seg ) +( void near * )( ofs ))
                #endif
                #ifndef FP_SEG
				#define FP_SEG( fp )( (unsigned )( void _seg * )( void far * )( fp ))
                #endif
                #ifndef FP_OFF
                #define FP_OFF( fp )( (unsigned )( fp ))
                #endif
                #ifndef LINE_ADR
                #define LINE_ADR( buf ) ((((uns long)(buf))>>12)+(uns int)(buf))
                #endif
                #ifndef POINTER
				#define POINTER( line_adr ) (MK_FP(line_adr>>4,line_adr&0xfL))
                #endif
                #ifndef L_BYTE
                #define L_BYTE(data) (uns char)((uns int)data)
                #endif
				#ifndef HI_BYTE
				#define HI_BYTE(data) (uns char)((uns int)data>>8)
				#endif
#endif
