/* ***************************************************************************** * * * Copyright 1978 Compaq Computer Corporation * * * * Compaq and the Compaq logo Registered in U.S. Patent and Trademark Office.* * * * Confidential computer software. Valid license from Compaq required for * * possession, use or copying. Consistent with FAR 12.211 and 12.212, * * Commercial Computer Software, Computer Software Documentation, and * * Technical Data for Commercial Items are licensed to the U.S. Government * * under vendors standard commercial license. * * * ***************************************************************************** facility: SDL (Structure Definition Language) author: Paul A. Calato */ /* C H A N G E L O G Date ! Name ! Description ________________!_______!______________________________________________________ ! ! 23-Nov-1985 | pc | Adding copyright header and change log. ________________!_______!______________________________________________________ 8-Dec-2000 | LJK | EV1-65 Change copyright notice to Compaq format. ________________|_______|______________________________________________________ */ /****************************************************************/ /* */ /* DO_TOP_LEVEL_DIM handles top level dimensions on aggragates.*/ /* Since dimensions are not allow on top level aggregates in */ /* Basic, another subaggregate is introduced with a generated */ /* name and the dimension is put on this subaggragate. */ /* */ /****************************************************************/ do_top_level_dim : proc(cur_node,dim,st_un); /********************/ /* */ /* DO_TOP_LEVEL_DIM */ /* */ /********************/ %include 'sdl$library:sdlnodef.in'; %replace struc by '0'b; %replace union by '1'b; /* declare variables */ declare cur_node pointer, /* pointer to the current node */ dim char(*) var, /* dimensions of the aggregate */ st_un bit(1), /* flag indicating structure or union */ v_tabs char(132) var; /* tabs */ DCL OUTPUT_BUF ENTRY ( character(1024) VARYING ); DCL DO_CHILDREN ENTRY ( pointer, fixed binary(31) ); DCL TABS ENTRY ( pointer, fixed binary(31), bit(1) ) returns(char(132) var) ; v_tabs = tabs(cur_node,2,'0'b); /* * output the subaggregate. Generate the name by appendin '_array' to * the end of the structure name. */ call output_buf( v_tabs || 'group fill_array' || dim ); /* * if the aggragate is a union output the "variant" keyword */ if( st_un = union ) then call output_buf( v_tabs || ' variant' ); call do_children(cur_node,2); if( st_un = union ) then call output_buf( v_tabs || ' end variant' ); call output_buf( v_tabs || 'end group fill_array' ); end do_top_level_dim;