include 'auto.inc' c c General table information c structure /table_info/ integer*4 table_pointer !pointer to table integer*4 ptr_verbs !pointer to verbs table integer*4 ptr_cmnds !pointer to command blocks integer*4 n_verbs !#verbs in table integer*4 retadr(2) integer*2 chan_imag !chan to mapped image integer*2 dummy logical*4 verbone !how to process images with only one verb end structure c c Header for CLI structures c structure /header/ integer*2 length !length of block byte type !type of block byte subtype !subtype integer*2 flags !flag word integer*2 tro_count !#tro's (table relative offsets) end structure c c Parameters for block_types (the type field for header) c integer*4 block_type_vector integer*4 block_type_command integer*4 block_type_type integer*4 block_type_entity integer*4 block_type_expression integer*4 block_type_cdu_visited c c Main CLI header block c structure /vector_block/ record /header/ header !header block (type vector) integer*4 verbs_tro !offset to verb table integer*4 commands_tro !offset to commands list integer*4 size !size of total table end structure c c Subtypes (the subtype of the header) c integer*4 vector_block_subtype_dcl integer*4 vector_block_subtype_mcr integer*4 vector_block_subtype_verb integer*4 vector_block_subtype_command c parameter (vector_block_subtype_dcl = 1) parameter (vector_block_subtype_mcr = 2) parameter (vector_block_subtype_verb = 3) parameter (vector_block_subtype_command = 4) c parameter (block_type_vector = 1) parameter (block_type_command = 2) parameter (block_type_type = 3) parameter (block_type_entity = 4) parameter (block_type_expression = 5) parameter (block_type_cdu_visited = 6) c c The verb table (pointer to by the .verb_tro of the vector block) c structure /verbs/ record /header/ header !general header (type=verb) character*4 verbsa(1) !table of char*4 words end structure c c The command table (pointed to by the .commands_tro of the vector block) c structure /commands/ record /header/ header !general header integer*4 command_tro(1) !list of TRO's pointing to the commands end structure c c A command block c structure /command_block/ record /header/ header !header integer*4 param_tro !TRO to the first parameter integer*4 qualifier_tro !TRO to the first qualifier integer*4 disallow_tro !TRO to the first disallow block byte handler ! byte param_count !2 nibbles (min param, max_param) byte verb_type !type of verb byte pad !padding integer*2 name_bro !BRO (Block relative offset) to the name) integer*2 image_bro !BRO to the imagename integer*2 outputs_bro !BRO to the output integer*2 prefix_bro !BRO to the prefix byte rest(1) !all BRO data is here end structure c integer*4 command_block_subtype_verb integer*4 command_block_subtype_syntax c parameter (command_block_subtype_verb = 1) parameter (command_block_subtype_syntax = 2) c integer*4 command_block_flag_abbrev integer*4 command_block_flag_nostat integer*4 command_block_flag_foreign integer*4 command_block_flag_immed integer*4 command_block_flag_mcrparse integer*4 command_block_flag_parms integer*4 command_block_flag_quals integer*4 command_block_flag_disallows c parameter (command_block_flag_abbrev = 0) parameter (command_block_flag_nostat = 1) parameter (command_block_flag_foreign = 2) parameter (command_block_flag_immed = 3) parameter (command_block_flag_mcrparse = 4) parameter (command_block_flag_parms = 5) parameter (command_block_flag_quals = 6) parameter (command_block_flag_disallows = 7) c integer*4 command_block_handler_none integer*4 command_block_handler_cli integer*4 command_block_handler_user integer*4 command_block_handler_image integer*4 command_block_handler_same c parameter (command_block_handler_none = 0) parameter (command_block_handler_cli = 1) parameter (command_block_handler_user = 2) parameter (command_block_handler_image = 3) parameter (command_block_handler_same = 4) c integer*4 max_name integer*4 max_image integer*4 max_outputs integer*4 max_prefix c parameter (max_name = 31) parameter (max_image = 63) parameter (max_outputs = 7) parameter (max_prefix = 31) c c structure /type_block/ record /header/ header !header block integer*4 keyword_tro !TRO to the keywords integer*2 name_bro !BRO to the name of the type integer*2 prefix_bro !BRO to the Prefix of the type byte rest(1) end structure c c Entity (th final data), this is a linked list via the .next_tro TRO c structure /entity_block/ record /header/ header !header block integer*4 next_tro !pointer (TRO) to the next entity integer*4 syntax_tro !pointer to a syntax change integer*4 user_type_tro !TRO to user defined type byte number byte valtyp integer*2 name_bro !BRO for the name(s) integer*2 label_bro !BRO for the label (for the CLI$GET_VALUE name) integer*2 prompt_bro !BRO to the prompt (parameters) integer*2 defval_bro !BRO to de default value byte rest(1) !BRO data is here end structure c integer*4 entity_block_subtype_parameter integer*4 entity_block_subtype_qualifier integer*4 entity_block_subtype_keyword c parameter (entity_block_subtype_parameter = 1) parameter (entity_block_subtype_qualifier = 2) parameter (entity_block_subtype_keyword = 3) c integer*4 entity_block_flag_val integer*4 entity_block_flag_neg integer*4 entity_block_flag_deftrue integer*4 entity_block_flag_batdef integer*4 entity_block_flag_valreq integer*4 entity_block_flag_list integer*4 entity_block_flag_concat integer*4 entity_block_flag_impcat integer*4 entity_block_flag_verb integer*4 entity_block_flag_parm integer*4 entity_block_flag_mcroptdelim integer*4 entity_block_flag_mcrignore c parameter (entity_block_flag_val = 0) parameter (entity_block_flag_neg = 1) parameter (entity_block_flag_deftrue = 2) parameter (entity_block_flag_batdef = 3) parameter (entity_block_flag_valreq = 4) parameter (entity_block_flag_list = 5) parameter (entity_block_flag_concat = 6) parameter (entity_block_flag_impcat = 7) parameter (entity_block_flag_verb = 8) parameter (entity_block_flag_parm = 9) parameter (entity_block_flag_mcroptdelim = 10) parameter (entity_block_flag_mcrignore = 11) c integer*4 entity_block_valtyp_string integer*4 entity_block_valtyp_infile integer*4 entity_block_valtyp_outfile integer*4 entity_block_valtyp_number integer*4 entity_block_valtyp_privilege integer*4 entity_block_valtyp_datetime integer*4 entity_block_valtyp_protection integer*4 entity_block_valtyp_process integer*4 entity_block_valtyp_inlog integer*4 entity_block_valtyp_outlog integer*4 entity_block_valtyp_insym integer*4 entity_block_valtyp_outsym integer*4 entity_block_valtyp_node integer*4 entity_block_valtyp_device integer*4 entity_block_valtyp_directory integer*4 entity_block_valtyp_uic integer*4 entity_block_valtyp_restofline integer*4 entity_block_valtyp_parenvalue integer*4 entity_block_valtyp_deltatime integer*4 entity_block_valtyp_quotedstr integer*4 entity_block_valtyp_file integer*4 entity_block_valtyp_expression integer*4 entity_block_valtyp_$test1 integer*4 entity_block_valtyp_$test2 integer*4 entity_block_valtyp_$test3 integer*4 entity_block_valtyp_acl integer*4 entity_block_valtyp_old_file integer*4 entity_block_valtyp_last_entry parameter (entity_block_valtyp_string = 0) parameter (entity_block_valtyp_infile = 1) parameter (entity_block_valtyp_outfile = 2) parameter (entity_block_valtyp_number = 3) parameter (entity_block_valtyp_privilege = 4) parameter (entity_block_valtyp_datetime = 5) parameter (entity_block_valtyp_protection = 6) parameter (entity_block_valtyp_process = 7) parameter (entity_block_valtyp_inlog = 8) parameter (entity_block_valtyp_outlog = 9) parameter (entity_block_valtyp_insym = 10) parameter (entity_block_valtyp_outsym = 11) parameter (entity_block_valtyp_node = 12) parameter (entity_block_valtyp_device = 13) parameter (entity_block_valtyp_directory = 14) parameter (entity_block_valtyp_uic = 15) parameter (entity_block_valtyp_restofline = 16) parameter (entity_block_valtyp_parenvalue = 17) parameter (entity_block_valtyp_deltatime = 18) parameter (entity_block_valtyp_quotedstr = 19) parameter (entity_block_valtyp_file = 20) parameter (entity_block_valtyp_expression = 21) parameter (entity_block_valtyp_$test1 = 22) parameter (entity_block_valtyp_$test2 = 23) parameter (entity_block_valtyp_$test3 = 24) parameter (entity_block_valtyp_acl = 25) parameter (entity_block_valtyp_old_file = 26) parameter (entity_block_valtyp_last_entry = 26) c integer*4 max_label integer*4 max_prompt integer*4 max_defval c parameter (max_label = 31) parameter (max_prompt = 31) parameter (max_defval = 95) c structure /expression_block/ record /header/ header integer*4 tro(1) end structure c integer*4 expression_block_subtype_path integer*4 expression_block_subtype_not integer*4 expression_block_subtype_any2 integer*4 expression_block_subtype_and integer*4 expression_block_subtype_or integer*4 expression_block_subtype_xor integer*4 expression_block_subtype_neg c parameter (expression_block_subtype_path = 1) parameter (expression_block_subtype_not = 2) parameter (expression_block_subtype_any2 = 3) parameter (expression_block_subtype_and = 4) parameter (expression_block_subtype_or = 5) parameter (expression_block_subtype_xor = 6) parameter (expression_block_subtype_neg = 7) c integer*4 max_buf_len parameter (max_buf_len=80) integer*4 max_typ_len parameter (max_typ_len=1) integer*4 max_idx_len parameter (max_idx_len=4) c integer*4 key_len parameter (key_len = max_typ_len + max_name + max_idx_len) c integer*4 max_tot_len parameter (max_tot_len = key_len + max_buf_len) c structure /data/ union map character*(max_typ_len) type character*(max_name) name integer*4 idx character*(max_buf_len) data end map map character*(max_tot_len) total end map end union end structure c c Table data for our own generated tables c structure /table_data/ record /vector_block/ vector_block record /header/ verb_header character*4 verbs(1) record /header/ cmnd_header integer*4 commands(1) record /command_block/ command record /entity_block/ par_entity(8) record /entity_block/ qual_entity !the /log qualifer byte names(255) end structure