1 /* BEGINNING OF: mrds_area_initialize.incl.pl1 * * * * * * * * * * * * * */ 2 3 /* HISTORY: 4 5 Created by: Thanh Nguyen 01/15/85 6 7 */ 8 9 10 mrds_area_initialize: proc (mrds_area_ptr); 11 12 /* This procedure resets the given temporary segment and initializes the offset 13 and length of the free space to beginning of the segment. Function 14 mrds_space_allocate in mrds_space_allocate.incl.pl1 must be used to allocate 15 any storage into this temporary segment. 16 */ 17 18 dcl mrds_area_ptr ptr; /* ptr to the temporary segment. */ 19 dcl MRDS_AREA char (8) init ("MRDSAREA"); 20 21 dcl 1 mrds_area based (mrds_area_ptr), 22 2 area_id char (8), 23 2 offset_to_free_word fixed bin (35), /* offset to the next free word in temp seg. */ 24 2 length_free_space fixed bin (35); /* length of remaining free space in temp seg.*/ 25 26 dcl sys_info$max_seg_size fixed bin(35) ext static; 27 28 29 if mrds_area_ptr ^= null then do; 30 /* Set our identification, so we can recognize it later */ 31 mrds_area.area_id = MRDS_AREA; 32 /* Start from word four right after our heading structure. */ 33 mrds_area.offset_to_free_word = 4; 34 mrds_area.length_free_space = sys_info$max_seg_size - 4; 35 end; 36 return; 37 38 end mrds_area_initialize; 39 40 /* END OF: mrds_area_initialize.incl.pl1 * * * * * * * * * * * * * */