! [LOMASKY.EVE]TERADYNE.TPU$COMMAND ! ! Teradyne-created TPU procedures used for extending EVE ! ! <<<<< Modification History >>>>>> ! 01/03/92 Brian Lomasky Replace NARROW and WIDE with ! TOGGLE_WIDTH and TER$SET_SCREEN_WIDTH ! 12/30/91 Brian Lomasky Add ALLOW_TAB_SEPARATORS ! 10/01/91 Brian Lomasky Original ! ! ALLOW_TAB_SEPARATORS - Allow as a word separator (same as EDT) ! (Clone of eve$$assign_word_separators, but with ! eve$kt_whitespace replaced with " ", so as to also ! stop on TAB characters) ! ! (Restore the normal EVE default word separators by ! executing the normal EVE RESTORE_WORD_SEPARATORS ! function). ! PROCEDURE EVE_ALLOW_TAB_SEPARATORS eve$$x_word_separators := eve$$kt_word_separators; ! assign the pattern variables that use the separators eve$pattern_end_of_word := ! End of word (ANCHOR + (LINE_END | (span (" ") + (any (eve$$x_word_separators) | ""))) | any (eve$$x_word_separators) | scan (eve$$x_word_separators) | REMAIN) + (LINE_BEGIN | span (" ") | ""); ! At the cursor position ! Match the EOL ! No EOL, leading space ! followed by a word delimiter ! No leading spaces, just a word delimiter ! No leading spaces, a word and its delimiter ! No leaing sapces, last word on line ! All followed by optional new line or white-space ENDPROCEDURE; ! ! FIRST_USER_BUFFER - Position the cursor in the first user buffer in the list ! of buffers ! PROCEDURE EVE_FIRST_USER_BUFFER local u_f_buf; u_f_buf := get_info (BUFFER, 'first'); LOOP u_s_flag := get_info (u_f_buf, 'system'); IF u_s_flag = 0 THEN eve_buffer(get_info (u_f_buf, 'name')); EXITIF u_s_flag = 0; ENDIF; u_f_buf := GET_INFO (BUFFER, 'next'); ENDLOOP; ENDPROCEDURE; ! ! NARROW - Sets terminal width to 80 characters and right margin to 79 ! !PROCEDURE EVE_NARROW; ! EVE_SET_WIDTH (80); ! EVE_SET_RIGHT_MARGIN (79); !ENDPROCEDURE; ! ! SET_SEARCH_EXACT - Sets all searches to case-sensitive ! PROCEDURE EVE_SET_SEARCH_EXACT eve$x_find_exact := EXACT; eve$x_find_no_exact := EXACT; ENDPROCEDURE; ! ! SET_SEARCH_GENERAL - Sets all searches to case-insensitive ! PROCEDURE EVE_SET_SEARCH_GENERAL eve$x_find_exact := NO_EXACT; eve$x_find_no_exact := NO_EXACT; ENDPROCEDURE; ! ! TOGGLE_NOMODIFY - Toggle the MODIFY/NOMODIFY status of the current buffer ! PROCEDURE EVE_TOGGLE_NOMODIFY if not get_info (current_buffer, "modifiable") then set (modifiable, current_buffer, on); ! make buffer modifiable else set (modifiable, current_buffer, off); ! set buffer non modifiable endif; eve$set_status_line (current_window); ENDPROCEDURE; ! ! TOGGLE_NOWRITE - Toggle the WRITE/NOWRITE status of the current buffer ! PROCEDURE EVE_TOGGLE_NOWRITE if get_info (current_buffer, "no_write") then set (no_write, current_buffer, off); ! make buffer writeable on exit else set (no_write, current_buffer, on); ! set buffer to NO_WRITE mode endif; eve$set_status_line (current_window); ENDPROCEDURE; ! ! WIDE - Sets terminal width to 132 characters and right margin to 131 ! !PROCEDURE EVE_WIDE; ! EVE_SET_WIDTH (132); ! EVE_SET_RIGHT_MARGIN (131); !ENDPROCEDURE; ! ! TER$SET_SCREEN_WIDTH - This procedure (called only from EVE_TOGGLE_WIDTH) sets ! the screen width for each TPU window. All windows must be the same width for ! the screen width to change. ! PROCEDURE TER$SET_SCREEN_WIDTH(NEW_WIDTH); local loop_window; loop_window := get_info(windows,"first"); ! Get => to first window loop exitif loop_window = 0; ! Exit if no more windows set(width,loop_window,new_width); ! Set the width of this window loop_window := get_info(windows,"next");! Get => to next window in list endloop; ter$x_screen_width := new_width; ! Remember the new screen width set(right_margin,current_buffer,new_width); ! Make sure margin is correct eve$update_status_lines; ! Update all EVE status lines ENDPROCEDURE; ! ! TOGGLE_WIDTH - Toggle terminal width between 80 and 132 columns ! PROCEDURE EVE_TOGGLE_WIDTH; if ter$x_screen_width = 132 then ! If screen width is currently 132... ter$set_screen_width(80); ! ...set the screen to 80 columns else ter$set_screen_width(132); ! ...else set it to 132 columns endif; ENDPROCEDURE;