compile insert Struct_Equates /* ** Copyright (C) 1992-2017 Revelation Software Inc. All Rights Reserved ** Author cp Date 21 Nov 1994 Purpose Equates for use with C-structure functions Comments ======== Amended Date Reason ======= ==== ====== Mr C 01 Dec 21 Added STRUCT_FLD_COMMENTS$ Mr C 28 Jun 17 Added STRUCT_FLD_ALIGNMENT$ Mr C 30 Mar 17 Fixed bad type equate bzs 24 Mar 17 Added fields for alignment Mr C 17 Feb 17 Updated for v10 cp 15 Oct 97 Updated for 3.5 cp 28 Jan 96 Updated for Hoffa project */ /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// #ifndef _STRUCT_EQUATES_ #define _STRUCT_EQUATES_ /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// * structure functions declare function Struct_Def ;* def = Struct_Def(name) declare subroutine Struct_Flush ;* Struct_Flush(name) or Struct_Flush() declare function Struct_Len ;* len = Struct_Len(name) declare function Blank_Struct ;* struct = Blank_Struct(name) declare function Build_Struct ;* struct = Build_Struct(name, ...) declare subroutine Parse_Struct ;* Parse_Struct(struct, name, ...) declare function Var_To_Struct ;* struct = Var_To_Struct(var, name) declare function Struct_To_Var ;* var = Struct_To_Var(struct, name) declare function Define_Struct ;* ret = Define_Struct(instruction, ...) declare subroutine Define_Struct ;* Define_Struct(instruction, ...) /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// common /%%_struct_com%%/ structInit@, structHashTable@, structVar2@, structVar3@ /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// * fields in each structure record equ STRUCT_TOT_LEN$ to 1 ;* length (in bytes) of the structure equ STRUCT_FLD_CNT$ to 2 ;* number of fields in the structure equ STRUCT_FLD_DEF$ to 3 ;* intrinsic types of each field (@vm delim) equ STRUCT_FLD_LEN$ to 4 ;* lengths of each field (@vm delim) // equ STRUCT_TMP_DEF$ to 5 ;* mangled on load; types without @vm delim - no longer used - clever trick if you have < 10 types ;). equ STRUCT_FLD_VARNAMES$ to 6 ;* variable names of each field (@vm delim) equ STRUCT_FLD_VARTYPES$ to 7 ;* variable types of each field (@vm delim) equ STRUCT_FLD_ALIGNMENT$ to 8 ;* Specific data alignment value equ STRUCT_FLD_COMMENTS$ to 9 ;* @tm'd free text field /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// * structure definition codes equ T_SIGNED_CHAR$ to 0 equ T_UNSIGNED_CHAR$ to 1 ;* (Byte) equ T_SIGNED_SHORT$ to 2 equ T_UNSIGNED_SHORT$ to 3 equ T_SIGNED_LONG$ to 4 equ T_UNSIGNED_LONG$ to 5 equ T_FLOAT$ to 6 equ T_DOUBLE$ to 7 equ T_POINTER$ to 8 equ T_CHAR_ARRAY$ to 9 ;* size of array is stored in "struct_fld_len$" // v10+ equ T_WCHAR_ARRAY$ to 10 ;* size of array is stored in "struct_fld_len$" equ T_BINARY$ to 11 ;* (Byte-array) size of array is stored in "struct_fld_len$" equ T_SIGNED_INT$ to 12 equ T_UNSIGNED_INT$ to 13 equ T_SIGNED_INT64$ to 14 ;* 64-bit only equ T_UNSIGNED_INT64$ to 15 ;* 64-bit only equ T_SIGNED_INTPTR$ to 16 equ T_UNSIGNED_INTPTR$ to 17 equ T_SIZET$ to 18 equ T_HANDLE$ to 19 equ T_LPBYTE$ to 20 equ T_LPUBYTE$ to 21 equ T_LPSHORT$ to 22 equ T_LPUSHORT$ to 23 equ T_LPLONG$ to 24 equ T_LPULONG$ to 25 equ T_LPINT$ to 26 equ T_LPUINT$ to 27 equ T_LPINT64$ to 28 equ T_LPUINT64$ to 29 equ T_LPINTPTR$ to 30 equ T_LPUINTPTR$ to 31 equ T_LPSIZET$ to 32 equ T_LPFLOAT$ to 33 equ T_LPDOUBLE$ to 34 equ T_LPACHAR$ to 35 equ T_LPWCHAR$ to 36 equ T_LPASTR$ to 37 equ T_LPWSTR$ to 38 equ T_LPBINARY$ to 39 equ T_LPHANDLE$ to 40 equ T_PADDING$ to 41 ;* bzs 032417 /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// * define struct equ DS_ENUM$ to 1 ;* list = Define_Struct(DS_ENUM$) equ DS_PUT$ to 2 ;* success = Define_Struct(DS_PUT$, name, def) equ DS_DELETE$ to 3 ;* success = Define_Struct(DS_DELETE$, name) equ DS_REINDEX$ to 4 ;* success = Define_Struct(DS_REINDEX$) equ DS_DIALOG$ to 5 ;* Define_Struct(DS_DIALOG$) (default) equ DS_DLG_CREATE$ to 6 ;* reserved equ DS_DLG_CLOSE$ to 7 ;* reserved equ DS_DLG_GETDEF$ to 8 ;* reserved equ DS_DLG_PUTDEF$ to 9 ;* reserved equ DS_DLG_READ$ to 10 ;* reserved equ DS_DLG_SAVE$ to 11 ;* reserved equ DS_DLG_NEW$ to 12 ;* reserved equ DS_DLG_COPY$ to 13 ;* reserved equ DS_DLG_DELETE$ to 14 ;* reserved equ DS_DLG_CHANGEKEY$ to 15 ;* reserved equ DS_DLG_ETINSERT$ to 16 ;* reserved equ DS_DLG_ETDELETE$ to 17 ;* reserved equ DS_DLG_ETOPTIONS$ to 18 ;* reserved equ DS_DLG_ETGOTFOCUS$ to 19 ;* reserved equ DS_DLG_ETPOSCHANGE$ to 20 ;* reserved equ DS_DLG_ETLOSTFOCUS$ to 21 ;* reserved /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// * miscellaneous equ STRUCT_FILE$ to "SYSOBJ" equ STRUCT_KEY_PREFIX$ to "STRUCT_" equ STRUCT_INDEX$ to "!STRUCT" equ STRUCT_DIALOG$ to "DEFINE_STRUCT" /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// #endif /////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////