! procedure bbs_comment_reply; buffer_scratch := GET_INFO (BUFFER, "find_buffer", "NOTES$SCRATCH"); buffer_edit := GET_INFO (BUFFER, "find_buffer", "NOTES$EDIT"); ! ! Add the "> " characters to beginning of each line in buffer_scratch and ! copy the buffer. ! POSITION ( BEGINNING_OF (buffer_scratch)); SET (INSERT, buffer_scratch); LOOP POSITION (LINE_BEGIN); marker_test := MARK (NONE); EXITIF marker_test = END_OF (buffer_scratch); COPY_TEXT ("> "); MOVE_VERTICAL (1); ENDLOOP; POSITION ( BEGINNING_OF (buffer_edit)); COPY_TEXT (buffer_scratch); POSITION ( END_OF (buffer_edit)); !+v1.2 ! ! Call procedure from EVE to set to one window ! eve_one_window; !-v1.2 ENDPROCEDURE; ! procedure bbs_comment_reply ! 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; ! PROCEDURE NOTES$USER_OPEN_NOTEFILE LOCAL buffer_notes_command, buffer_save; ON_ERROR RETURN; ENDON_ERROR; tmp:=substr(notes$x_entry_name,1,80)+'> '; !edit (tmp,TRIM,UPPER); notes$x_command_prompt:=tmp; notes$x_command_prompt_length:=length(tmp); !eve$x_command_prompt :=notes$x_command_prompt; !eve$x_command_prompt_length:=notes$x_command_prompt_length; ! !+v1.1 (bug fix) ! ! Go to buffer "NOTES$COMMAND" and change the beginning of every line ! to contain the current conference name. ! buffer_notes_command := GET_INFO (BUFFER, "find_buffer", "NOTES$COMMAND"); buffer_save := CURRENT_BUFFER; SET (INSERT, buffer_notes_command); POSITION (BEGINNING_OF(buffer_notes_command)); pattern_conference_name := LINE_BEGIN + UNANCHOR + "> "; LOOP range_previous_name := SEARCH_QUIETLY (pattern_conference_name, FORWARD); EXITIF range_previous_name = 0; ERASE (range_previous_name); COPY_TEXT (notes$x_command_prompt); MOVE_VERTICAL (1); POSITION (LINE_BEGIN); ENDLOOP; POSITION (END_OF(buffer_notes_command)); POSITION (buffer_save); !-v1.1 ENDPROCEDURE; ! PROCEDURE NOTES$USER_CLOSE_NOTEFILE notes$x_command_prompt:="Notes> "; notes$x_command_prompt_length:=length(notes$x_command_prompt); ! !+v1.2 ! ! Go to buffer "NOTES$COMMAND" and change the beginning of every line ! to contain the string "Notes> " ! buffer_notes_command := GET_INFO (BUFFER, "find_buffer", "NOTES$COMMAND"); buffer_save := CURRENT_BUFFER; SET (INSERT, buffer_notes_command); POSITION (BEGINNING_OF(buffer_notes_command)); pattern_conference_name := LINE_BEGIN + UNANCHOR + "> "; LOOP range_previous_name := SEARCH_QUIETLY (pattern_conference_name, FORWARD); EXITIF range_previous_name = 0; ERASE (range_previous_name); COPY_TEXT (notes$x_command_prompt); MOVE_VERTICAL (1); POSITION (LINE_BEGIN); ENDLOOP; POSITION (END_OF(buffer_notes_command)); POSITION (buffer_save); !-v1.2 ! ENDPROCEDURE; ! PROCEDURE SEARCHIT x:="SPAWN BBS_TITLES "+read_line("Title search: "); notes$do_command(x); ENDPROCEDURE; ! PROCEDURE KERMITSND notes$do_command('spawn kermit send sys$login:note.txt'); ENDPROCEDURE; ! PROCEDURE KERMITRCV notes$do_command('spawn kermit rec sys$login:note.txt'); ENDPROCEDURE; ! 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); test_screen_width := GET_INFO (SCREEN, "width"); IF test_screen_width = 80 THEN text_line := substr(current_line, 23, 6); ENDIF; IF test_screen_width = 132 THEN text_line := substr(current_line, 36, 6); ENDIF; 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('exit'); 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; ! ! Set Notes buffer width. ! set (margins, Notes$x_edit_buffer, 5, 75); set (margins, notes$x_mail_buffer, 5, 75); ! ! 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 ! GOLD PF4 SET CLASS NOTES ! GOLD ENTER NEXT UNSEEN CONFERENCE ! GOLD R KERMIT RECEIVE ! GOLD S KERMIT SEND ! GOLD T SEARCH TITLES ! GOLD W WHAT CONFERENCE? ! GOLD D DISPLAY ORIGINAL DIRECTORY ! GOLD = ROT13 ! F17 SEND/NOCC/NOSELF/NOSUBJECT ! F19 FORWARD/NOEDIT/NOCC/NOSELF/NOSUBJECT ! DEFINE_KEY('notes$$show_ctrl_z',key_name("D",shift_key), 'Original_directory', notes$kt_user_keys); 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( '' )", KEY_NAME( KP2, SHIFT_KEY ), "", 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( 'send/nocc/noself/nosubj/noconf' )", F17, "Forward", notes$kt_user_keys ); DEFINE_KEY( "notes$do_command( 'forward/noedit/nocc/noself/nosubj/noconf' )", F19, "Forward", 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( "notes$do_command( 'set class bbs' )", PF4, "BBS", notes$kt_user_keys ); DEFINE_KEY( "notes$do_command( 'set class notes' )", KEY_NAME( PF4, SHIFT_KEY ), "NOTES", notes$kt_user_keys ); DEFINE_KEY( "searchit", KEY_NAME( "t", SHIFT_KEY ), "Titles", notes$kt_user_keys ); DEFINE_KEY( "kermitsnd", KEY_NAME( "s", SHIFT_KEY ), "Kermit", notes$kt_user_keys ); DEFINE_KEY( "kermitrcv", KEY_NAME( "r", SHIFT_KEY ), "Kermit", notes$kt_user_keys ); DEFINE_KEY('rot13("NOTES")', key_name('=', shift_key), "ROT13", NOTES$KT_user_keys); ! ! EVE KEYPAD KEYS ! ! Key Definition ! -------------------------- ! GOLD B OTHER WINDOW (Buffer) ! GOLD C COMMENT ! GOLD E EXIT ! GOLD O OTHER WINDOW ! GOLD Q QUIT ! GOLD T MESSAGE TIME ! GOLD Z EXIT ! GOLD = ROT13 ! CTRL/C QUIT ! 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('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('eve_spell', key_name('s', shift_key), "Spell", eve$x_user_keys); define_key('rot13("EVE")', key_name('=', shift_key), "ROT13", eve$x_user_keys); define_key('bbs_comment_reply', key_name('c', shift_key), "COMMENT", eve$x_user_keys); define_key('eve_quit', CTRL_C_KEY, "Quit", eve$x_user_keys);