procedure eve_read_mail ! ! Reads mail into EVE's DCL buffer. ! local this_buffer, mail_command, this_position; ! Make sure EVE's DCL process exists. if (get_info (eve$x_dcl_process, "type") = unspecified) or (eve$x_dcl_process = 0) then message ("Creating DCL subprocess..."); eve$x_dcl_process := create_process (eve$dcl_buffer, "$ set noon"); endif; this_buffer := current_buffer; this_position := mark (none); if this_buffer <> eve$dcl_buffer then if eve$x_number_of_windows >= 2 then eve_other_window; if current_buffer <> eve$dcl_buffer then map (current_window, eve$dcl_buffer); endif; else unmap (eve$main_window); map (eve$top_window, this_buffer); eve$set_status_line (eve$top_window); update (eve$top_window); map (eve$bottom_window, eve$dcl_buffer); eve$x_number_of_windows := eve$x_number_of_windows + 1; eve$x_this_window := eve$bottom_window; endif; endif; set (status_line, current_window, reverse, " DCL buffer"); position (end_of (eve$dcl_buffer)); ! Tell user how to enter commands to MAIL copy_text("Prompts for MAIL commands will appear in prompt line."); split_line; copy_text("When you enter EXIT (or EX) EVE will regain control."); split_line; position(end_of(current_buffer)); update(current_window); message("See instructions on last two lines of DCL buffer above."); ! OK, now send the commands to enter MAIL send("$ MAIL",eve$x_dcl_process); message("Enter EX or EXIT to leave MAIL procedure and return to EVE."); loop mail_command := read_line("MAIL>"); change_case(mail_command,upper); copy_text(mail_command); send(mail_command,eve$x_dcl_process); position(end_of(current_buffer)); update(current_window); exitif (mail_command = "EXIT") OR (mail_command = "EX"); endloop; message("Returning to EVE; cursor will be left in DCL window."); split_line; position(end_of(current_buffer)); update(current_window); endprocedure;