(* Release 3.10 *) (*-------------------------------------------------------------------------* * * * CORELIB.ITF - Core library include file * * * * COPYRIGHT (C) 1990..1992 Clarion Software Corporation. * * All Rights Reserved * * * *--------------------------------------------------------------------------*) (********************************* Model Flags *****************************) (* *) (* These flags are generated by the make system to reflect the current *) (* memory model. *) (* *) (***************************************************************************) (* added 15/3/92 pab *) StkParam = 1 - _jpicall FarCall = _fcall FarPtr = _fptr (*%F _fcall *) Ret0@ = 0C3H (* code for ret 0 *) RetX@ = 0C2H (* code for ret num *) (*%E *) (*%T _fcall *) Ret0@ = 0CBH (* code for ret 0 *) RetX@ = 0CAH (* code for ret num *) (*%E *) cs@ = 2EH (* codes for segment overrides *) ds@ = 3EH es@ = 26H ss@ = 36H (* end of 15/3/92 rev *) NearCall = 1 - _fcall SameDS = 1 - _fdata NearPtr = 1 - _fptr MThread = _mthread RegParam = _jpicall near_init_code = NearCall near_init_data = SameDS StackChecks = 1 _XTDDOS = (~_OS2) |_XTD _DLLOVL = (~_OS2) & (_DLL | _OVL) _NRM = ~(_DLL | _OVL) ProtMode = _WINDOWS | _OS2 (* You must be using a standard memory model or add the following line to your project: #pragma define(_DLL=>?,_OS2=>?,_WINDOWS=>?) where ? is either on or off depending on the target environment. *) (*%T _WINDLL *) _DLL = 0 (*%E *) (***************************** Stack Frame Constants ***********************) (* *) (* These constants specify the model and calling convention parameter *) (* offset on the stack. *) (* *) (***************************************************************************) (*%F NearCall *) frame = 6 (* standard stack frame, far call *) bxframe = 4 (* bx stack frame, far call *) (*%E *) (*%T NearCall *) frame = 4 (* standard stack frame, near call *) bxframe = 2 (* bx stack frame, near call *) (*%E *) lframe = 6 (* standard stack frame, near_call=>off *) lbxframe = 4 (* bx stack frame, near_call=>off *) sframe = 4 (* standard stack frame, near_call=>on *) sbxframe = 2 (* bx stack frame, near_call=>on *) PopParam = 0 (* Dummy value for changing real return convention *) (***************************** Data Type Sizes *****************************) (* *) (* These constants specify the data type sizes according to memory *) (* model. *) (* *) (***************************************************************************) (*%F NearCall *) CodePtrSize = 4 (* Code pointer, far calls *) (*%E *) (*%T NearCall *) CodePtrSize = 2 (* Code pointer, near calls *) (*%E *) FarCodePtrSize = 4 (* Code pointer, near_call=>off *) NearCodePtrSize = 2 (* Code pointer, near_call=>on *) (*%F NearPtr *) DataPtrSize = 4 (* Data pointer, 32 bit data pointer models *) (*%E *) (*%T NearPtr *) DataPtrSize = 2 (* Data pointer, 16 bit data pointer models *) (*%E *) FarDataPtrSize = 4 (* Data pointer, near_ptr=>off *) NearDataPtrSize = 2 (* Data pointer, near_ptr=>on *) (*%F NearPtr *) _ptr = 0 (* _iob structure *) _cnt = 4 _size = 6 _base = 8 _flag = 12 _file = 14 _pback = 16 _iobSize = 24 (* size of _iob structure *) (*%E *) (*%T NearPtr *) _ptr = 0 (* _iob structure *) _cnt = 2 _size = 4 _base = 6 _flag = 8 _file = 10 _pback = 12 _iobSize = 20 (* size of _iob structure *) (*%E *) (***************************** OS Error Codes ******************************) (* *) (* These constants specify the error codes handled or set by the library. *) (* *) (***************************************************************************) ENOENT = 2 ENOPATH = 3 EACCESS = 5 EBADF = 6 E2BIG = 7 ENOMEM = 8 ENOSPC = 14 EINVAL = 19 EDOM = 33 ERANGE = 34 (***************************** IO Constants*********************************) (* *) (* These global constants are used by the IO functions. *) (* *) (***************************************************************************) BUFSIZ = 512 (* IO Buffer size *) _IOFBF = 0 (* setvbuf - full buffering *) _IOLBF = 1 (* setvbuf - line buffering *) _IONBF = 2 (* setvbuf - no buffering *) _F_RDWR = 0003H (* Read/write *) _F_READ = 0001H (* Read only file *) _F_WRIT = 0002H (* Write only file *) _F_UBUF = 0004H (* User allocated buffer *) _F_APP = 0008H (* Append data *) _F_ERR = 0010H (* Error *) _F_EOF = 0020H (* EOF *) _F_BIN = 0040H (* Binary file *) _F_IN = 0080H (* Data is incoming *) _F_OUT = 0100H (* Data is outgoing *) _F_DEV = 0200H (* File is terminal *) _F_RST = 0400H (* Newly opened stream *) _F_LBUF = 0800H (* line buffered stream *) _F_CTZ = 1000H SEEK_SET = 0 (* lseek - origin beginning of file *) SEEK_CUR = 1 (* lseek - origin current position *) SEEK_END = 2 (* lseek - origin end of file *) CTLZ = 1AH (* Text mode EOF character *) EOF = -1 (* end of file return value *) O_RDONLY = 0 O_WRONLY = 1 O_RDWR = 2 O_CREAT = 0100H (* create and open file *) O_TRUNC = 0200H (* open with truncation *) O_EXCL = 0400H (* exclusive open *) _O_EOF = 0200H (* set when text file hits ^Z *) O_APPEND = 0800H (* write to end of file *) O_CHANGED = 1000H (* File has been written *) O_DEVICE = 2000H (* user read only flag *) O_TEXT = 4000H (* CR-LF translation *) O_BINARY = 8000H (* no translation *) SH_NOINHERIT = 80H (* File sharing modes *) SH_COMPAT = 00H SH_DENYRW = 10H SH_DENYWR = 20H SH_DENYRD = 30H SH_DENYNO = 40H SH_DENYNONE = SH_DENYNO (* MS documentation uses both *) S_IFDIR = 4000H (* directory *) S_IFCHR = 2000H (* character device *) S_IFREG = 8000H (* regular file *) S_IREAD = 0100H (* owner may read *) S_IWRITE = 0080H (* owner may write *) S_IEXEC = 0040H (* owner may execute directory search *) (************************ OS2 structures and constants ********************) (* *) (* *) (***************************************************************************) fdateCreation = 0 ftimeCreation = 2 fdateLastAccess = 4 ftimeLastAccess = 6 fdateLastWrite = 8 ftimeLastWrite = 10 cbFile = 12 cbFileAlloc = 16 attrFile = 20 FileInfoSize = 22 IO_WAIT = 0 IO_NOWAIT = 1 (* KBDKEYINFO structure, for KbdCharIn and KbdPeek *) chChar = 0 chScan = 1 fbStatus = 2 bNlsShift = 3 fsState = 4 time = 6 KbdInfoSize = 10 (* DATETIME structure, for DosGetDateTime *) hours = 0 minutes = 1 seconds = 2 hundredths = 3 day = 4 month = 5 year = 6 timezone = 8 weekday = 10 DateTimeSize = 11 EXIT_THREAD = 0 EXIT_PROCESS = 1 EXLST_ADD = 1 EXLST_REMOVE = 2 EXLST_EXIT = 3 (* Signal Numbers for DosSetSigHandler *) SIG_CTRLC = 1 (* Control C *) SIG_BROKENPIPE = 2 (* Broken Pipe *) SIG_KILLPROCESS = 3 (* Program Termination *) SIG_CTRLBREAK = 4 (* Control Break *) SIG_PFLG_A = 5 (* Process Flag A *) SIG_PFLG_B = 6 (* Process Flag B *) SIG_PFLG_C = 7 (* Process Flag C *) SIG_CSIGNALS = 8 (* number of signals plus one *) (* Flag Numbers for DosFlagProcess *) PFLG_A = 0 (* Process Flag A *) PFLG_B = 1 (* Process Flag B *) PFLG_C = 2 (* Process Flag C *) (* Signal actions *) SIGA_KILL = 0 SIGA_IGNORE = 1 SIGA_ACCEPT = 2 SIGA_ERROR = 3 SIGA_ACKNOWLEDGE = 4 SIG_DFL = 0 SIG_IGN = 1 SIG_SGE = 3 SIG_ACK = 4 (************************ Library Internal Constants ***********************) (* *) (* These constants are internal to the run-time library and may NOT *) (* changed. *) (* *) (***************************************************************************) TRUE = 1 FALSE = 0 math_saved_regs = 8 THREADTABLESIZE = 52 (* Thread Table Size *) MAXPROCESS = 32 _ERRNO = 0 ExpNeg = 80H magic = 01234H (* value to flag exception handler *) f_st5 = 10H (* arg1 is in st5 *) f_two = 20H (* two arguments *) f_long = 40H (* long arguments *) _DOMAIN = 1 (* parameter not in valid domain *) _SING = 2 (* function is incalculable at this place *) _OVERFLOW = 3 (* result exceeds representable range *) _UNDERFLOW = 4 (* result too close to zero to be represented *) _TLOSS = 5 (* total loss of precision (eg. Sine (2**65)) *) _PLOSS = 6 (* partial precision loss *) VideoConfigSize = 22 RCcoordSize = 4 XYcoordSize = 4 graph_xcoord = 0 graph_ycoord = 2 (* Process descriptor offsets *) NextProcess = 0 (* Next in chain (-1 = end) *) (* of waiting processes *) LongCall = 2 (* Long call used to point interrupts *) LongCallIP = 4 (* at interrupt handler *) LongCallCS = 6 ProcessSP = 8 ProcessSS = 10 ProcessPriority = 12 ProcessFloat = 14 ProcessRecordSize = 94 + ProcessFloat ProcessRecSize = 1 (* paragraphs *) ProcessRecSizeFloat = 7 (* paragraphs *) ColorStatusReg = 03DAH ColorRetrace = 1 ColorVertRetrace = 8 BWseg = 0B000H ColorSeg = 0B800H ZFLAG = 80H (* Zero pad flag from printf *) (*%F NearPtr *) (* vprinter control structure *) stream = 0 flush = 4 (*%F _DLL *) count = 6 args = 8 handler = 10 (*%E *) (*%T _DLL *) count = 8 args = 10 handler = 12 (*%E *) (*%E *) (*%T NearPtr *) stream = 0 flush = 2 count = 4 args = 6 handler = 8 (*%E *) CurrentThread = 0 (*%F _WINDOWS *) InMathLib = 1 (*%E *) (*%T _WINDOWS *) InMathLib = 17 (* offset in SS of 4-byte area used by math functions *) (*%E *) ThreadID = 6 (* Thread table offsets *) _ERRNO = 0 nearFreeSize = 0 (* near heap header offsets *) nearNextBlock = 2 farFreeSize = 14 (* MSDOS far heap header offsets *) farNextBlock = 16 OS2FreeSize = 0 (* OS2 far heap header offsets *) OS2NextBlock = 2 prevHeap = 0 (* OS2 far heap segment header offsets *) nextHeap = 2 firstFree = 4 statHeap = 6 heapStart = 8 HEAP_ALLOCATED = 1 (* OS2 far heap segment header constants *) HEAP_FREE = 0 OS2MAXSIZE = 0FFF6H OS2HEAPTOP = OS2MAXSIZE + heapStart OS2MINHEAP = 10 OS2MAXSEGS = 10 MINGAP = 1024 MINBLOCK = 16 MINHEAP = 16 STACK_SIZE = 1000H ENVNUM = 64 (* Max environment pointers *) DTA_SIZE = 128 InitRecSize = 3+CodePtrSize Magic = 0 Priority = 2 ProcVar = 3 MAGIC_NUM = 1234H PR0 = 30 PR1 = 29 PR2 = 28 PR3 = 27 PR4 = 26 PR5 = 25 PRL = 20 PRMAX = 32 InitRecNext = 0 InitRecTotal = 4 InitRecSeg = 6 Timer=40H (* 8253-5 Programmable Interval Timer *) PPIport=60H (* 8255A-5 Programmable Peripheral Interface *) KBCtrl=61H ARG_BUF_SIZE = 1024 (* Max Size for child's environment *) emu_fraction = 0 emu_exponent = 8 emu_sign = 10 emu_spare = 11 emu_temp_size = 12 by0 = 0 by1 = 1 w0 = 0 w1 = 2 w2 = 4 w3 = 6 dd0 = 0 dd1 = 4 STACK_GUARD = 1234H GETSTATE_START = 0 GETSTATE_END = 2 GETSTATE_FIRST = 4 (* Overlay/DOS DLL Loader Error Codes *) LOADER_ERROR_INVALID_ENTRY = 1 LOADER_ERROR_TOO_MANY_MODULES = 2 LOADER_ERROR_WRONG_MODULE_VERSION = 3 LOADER_ERROR_MODULE_CORRUPT = 4 LOADER_ERROR_STACK_CORRUPT = 5 LOADER_ERROR_MODULE_NOT_FOUND = 6 LOADER_ERROR_FIXUP_INCORRECT = 7 LOADER_ERROR_EMS_ERROR = 8 LOADER_ERROR_NOT_DLL = 9 LOADER_ERROR_INVALID_FUNC = 10 LOADER_ERROR_MODULE_INIT_FAILED = 11 LOADER_ERROR_FILE_NOT_FOUND = 12 LOADER_ERROR_OUT_OF_MEMORY = 13 LOADER_ERROR_FILE_READ = 14 LOADER_ERROR_FILE_SEEK = 15 LOADER_ERROR_STACK_OVERFLOW = 16 LOADER_ERROR_CODE_FIXUP = 17 LOADER_ERROR_TOO_MANY_SEGMENTS = 18 LOADER_ERROR_INVALID_LOAD = 19 LOADER_ERROR_CMEM_ERROR = 20 LOADER_ERROR_INVALID_IMPORT = 21 LOADER_ERROR_NO_ENTRYPOINTS = 22 LOADER_ERROR_INVALID_TRANSFORM = 23 (*%T _WINDOWS *) (********************* Windows Initialization Constants ********************) (* *) (* These constants are internal to the run-time library and may NOT *) (* changed. They are only used in the Windows Startup modules. *) (* *) (***************************************************************************) hInstance = 0 (* hInstance *) hPrevInst = 2 (* hPrevInstance *) PSPSeg = 4 (* PSP Segment Address *) cmdLine = 6 (* ES: Pointer to DOS Command Line *) cmdShow = 8 (* nCmdShow *) (*%E *)