! PROCEDURE lsi_search LOCAL search_string; search_string := READ_LINE( "Search for: " ); notes$do_command( 'SEARCH ' + search_string ); ENDPROCEDURE; ! PROCEDURE cle_open_next(flag) local last_pos, unseen_pat, text_line; on_error; endon_error; message('Looking for Next Unseen Conference'); last_pos := mark(none); ! ! Test for initialized ! if get_info(cle$_empty_buffer, 'type') <> buffer then cle$_empty_buffer := create_buffer('Empty_buffer1'); set(no_write, cle$_empty_buffer, on); set(system, cle$_empty_buffer); cle$_unseen_buffer := create_buffer('Unseen_buffer'); set(no_write, cle$_unseen_buffer, on); set(system, cle$_unseen_buffer); endif; ! ! Check for empty unseen buffer ! position(cle$_unseen_buffer); if get_info(cle$_unseen_buffer, 'record_count') = 0 then notes$do_command('directory/entries/class=*/buffer=unseen_buffer'); position(beginning_of(cle$_unseen_buffer)); ! ! Strip dir header ! erase_line; erase_line; erase_line; erase_line; ! ! Remove all without unseen messages ! loop; exitif mark(none) = end_of(current_buffer); text_line := substr(current_line, 23, 6); edit(text_line, trim); if int(text_line) = 0 then erase_line; else move_vertical(1); endif; endloop; endif; position(beginning_of(cle$_unseen_buffer)); ! ! Check for inside a conference and close if so ! if beginning_of(current_buffer) = end_of(current_buffer) then position(last_pos); message('No more unseen conferences'); ! set(screen_update, off); notes$do_command('close'); set(screen_update, on); return; endif; text_line := substr(current_line, 2, 20); erase_line; position(last_pos); edit(text_line, trim); text_line := 'open ' + text_line; notes$do_command(text_line); ENDPROCEDURE; ! PROCEDURE Where_am_i message ("Current conference is " + notes$x_entry_name); ENDPROCEDURE; ! PROCEDURE cle_change_window_number ! set (screen_update, off); if eve$x_number_of_windows = 2 then if current_window = eve$top_window then cle$_second_buffer := get_info(eve$bottom_window, 'buffer'); else cle$_second_buffer := get_info(eve$top_window, 'buffer'); endif; eve_one_window; else eve_two_windows; if cle$_second_buffer <> 0 then ! map(eve$top_window, cle$_second_buffer); eve$set_status_line(current_window); position(eve$bottom_window); endif; endif; set (screen_update, on); ENDPROCEDURE; procedure rot13(token); ! ! Token is a string. Make token = "NOTES" when invoking ROT13 from VAXNOTES. ! Make token = "EVE" when invoking from EVE. Appropriate keys will be ! defined accordingly to execute this procedure in VAXNOTES and EVE. ! IF token = "NOTES" THEN buffer_variable := GET_INFO (BUFFER, "find_buffer", "NOTES$MAIN") ENDIF; IF token = "EVE" THEN buffer_variable := CURRENT_BUFFER ENDIF; IF buffer_variable = 0 THEN MESSAGE ("Buffer specified does not exist, ROT13 not performed"); RETURN; ENDIF; translate ( buffer_variable, "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"); message ("ROT13 complete.") endprocedure; ! ! ! Set Notes buffer width to 63. ! set (margins, Notes$x_edit_buffer, 7, 72); set (margins, notes$x_mail_buffer, 7, 72); ! ! Set bell to ring for broadcast messages ! SET( BELL, BROADCAST, ON ); ! ! VAXNOTES KEYPAD KEYS ! ! Key Definition ! -------------------------- ! KP1 BACK REPLY ! GOLD KP2 NONE ! KP3 NEXT REPLY ! KP4 DIR ! GOLD KP4 DIR/ALL ! GOLD KP5 NONE ! KP6 DIR/UNSEEN ! GOLD KP6 DIR/CLASS=* ! GOLD KP7 EXIT ! KP8 UPDATE ! GOLD KP8 UPDATE/CLASS=* ! KP9 REPLY ! GOLD KP9 WRITE ! PF3 SEARCH/NEXT ! GOLD PF3 SEARCH (prompts for string) ! PF4 SET CLASS BBS (removed) ! MINUS SET CLASS SYSK (removed) ! GOLD ENTER NEXT UNSEEN CONFERENCE ! GOLD W WHAT CONFERENCE? ! GOLD R ROT13 ! DEFINE_KEY("where_am_i",key_name("w",shift_key),"where", notes$kt_user_keys); DEFINE_KEY('cle_open_next(false)',key_name(enter,shift_key), 'Open_next_unseen_conference', notes$kt_user_keys); DEFINE_KEY( "notes$do_command( 'back reply' )", KP1, "<", notes$kt_user_keys ); DEFINE_KEY( "notes$do_command( '' )", KEY_NAME( KP2, SHIFT_KEY ), "", notes$kt_user_keys ); DEFINE_KEY( "notes$do_command( 'next reply' )", KP3, ">", notes$kt_user_keys ); DEFINE_KEY( "notes$do_command( 'directory' )", KP4, "Dir", notes$kt_user_keys ); DEFINE_KEY( "notes$do_command( 'directory/all' )", KEY_NAME( KP4, SHIFT_KEY ), "Dir/all", notes$kt_user_keys ); DEFINE_KEY( "notes$do_command( '' )", KEY_NAME( KP5, SHIFT_KEY ), "", notes$kt_user_keys ); DEFINE_KEY( "notes$do_command( 'directory/unseen' )", KP6, "Dir/uns", notes$kt_user_keys ); DEFINE_KEY( "notes$do_command( 'directory/class=*' )", KEY_NAME( KP6, SHIFT_KEY ), "Di/cl=*", notes$kt_user_keys ); DEFINE_KEY( "notes$do_command( 'exit' )", KEY_NAME( KP7, SHIFT_KEY ), "Exit", notes$kt_user_keys ); DEFINE_KEY( "notes$do_command( 'update' )", KP8, "Update", notes$kt_user_keys ); DEFINE_KEY( "notes$do_command( 'update/class=*' )", KEY_NAME( KP8, SHIFT_KEY ), "Up/cl=*", notes$kt_user_keys ); DEFINE_KEY( "notes$do_command( 'answer' )", KP9, "Reply", notes$kt_user_keys ); DEFINE_KEY( "notes$do_command( 'write' )", KEY_NAME( KP9, SHIFT_KEY ), "Write", notes$kt_user_keys ); DEFINE_KEY( "notes$do_command( 'search' )", PF3, "Sea/nex", notes$kt_user_keys ); DEFINE_KEY( "lsi_search", KEY_NAME( PF3, SHIFT_KEY ), "Search", notes$kt_user_keys ); define_key('rot13("NOTES")', key_name('=', shift_key), "ROT13", NOTES$KT_user_keys); !DEFINE_KEY( "notes$do_command( 'set class bbs' )", PF4, ! "BBS", notes$kt_user_keys ); !DEFINE_KEY( "notes$do_command( 'set class sysk' )", MINUS, ! "SYSK", notes$kt_user_keys ); ! ! EVE KEYPAD KEYS ! ! Key Definition ! -------------------------- ! GOLD B OTHER WINDOW (Buffer) ! GOLD E EXIT ! GOLD O OTHER WINDOW ! GOLD Q QUIT ! GOLD T MESSAGE TIME ! GOLD Z EXIT ! GOLD = TOGGLE WINDOW (1 => 2 or 2 => 1) ! define_key('eve_top', key_name(up, shift_key), 'top', eve$x_user_keys); define_key('eve_bottom', key_name(down, shift_key), 'bottom', eve$x_user_keys); define_key ('eve_other_window', key_name('o', shift_key), "Other Window", eve$x_user_keys); define_key ('eve_buffer("")', key_name('b', shift_key), "Other Window", eve$x_user_keys); define_key ('cle_change_window_number', key_name('=', shift_key), "Toggle Windows", eve$x_user_keys); define_key('message("Message time was " + notes$x_note_time)', key_name('t', shift_key), 'Reply to time', eve$x_user_keys); define_key('eve_get_file("")', key_name('f', shift_key), 'Get file', eve$x_user_keys); define_key('eve_quit', key_name('q', shift_key), "Quit", eve$x_user_keys); define_key('eve_exit', key_name('z', shift_key), "Exit", eve$x_user_keys); define_key('eve_exit', key_name('e', shift_key), "Exit", eve$x_user_keys); define_key('rot13("EVE")', key_name('=', shift_key), "ROT13", eve$x_user_keys); !define_key('eve_spell', key_name('s', shift_key), "Spell", ! eve$x_user_keys);