Path: utzoo!attcan!uunet!mcvax!cernvax!ethz!matt From: matt@ethz.UUCP (Martin Matt) Newsgroups: comp.os.vms Subject: Re: TPU question Message-ID: <454@ethz.UUCP> Date: 18 May 88 06:29:46 GMT References: <8805160616.AA10464@ucbvax.Berkeley.EDU> Reply-To: matt@bernina.UUCP (Martin Matt) Organization: ETH Zuerich, Switzerland Lines: 65 In article <8805160616.AA10464@ucbvax.Berkeley.EDU> ACSNICK@UBVMS.BITNET (Nick B Triantos) writes: >I have a question regarding TPU, specifically through the EVE interface. > >Is there any way that anyone knows of to remove a buffer after it is no >longer needed. i.e.- This TPU procedure deletes the curent buffer and places you in the first non-system buffer it finds. If no such buffer is present, EVE_DELBUFFER creates a buffer MAIN and places you there. Martin Matt ( ...!cernvax!ethz!matt ) !=============================================================================== ! PROCEDURE eve_delbuffer !=============================================================================== ! PROCEDURE eve_delbuffer LOCAL new_buffer, del_buffer, answer; del_buffer := current_buffer; if del_buffer=0 then message('not currently in buffer'); return endif; if get_info(del_buffer, "system")=1 then message('cannot delete a system buffer'); return endif; if get_info(del_buffer, "modified")=1 then answer := read_line("delete this buffer without updating ? (Y/N) [N] : "); if (answer<>'Y') AND (answer<>'y') then return endif; endif; if (eve$x_number_of_windows=2) AND (get_info(eve$top_window,"buffer")=get_info(eve$bottom_window,"buffer")) then eve_one_window endif; new_buffer := get_info(BUFFERS, "last"); loop exitif (new_buffer=0); exitif (new_buffer<>del_buffer) AND (get_info(new_buffer,"system")=0); new_buffer := get_info(BUFFERS, "previous"); endloop; if (new_buffer=0) then if get_info(del_buffer,"name")<>"MAIN" then new_buffer := create_buffer("MAIN") else new_buffer := erase(del_buffer); return endif endif; map(current_window, new_buffer); eve$set_status_line (current_window); delete(del_buffer); endprocedure; -- Martin Matt ( ...!cernvax!ethz!matt )