!++ ! FILENAME: STAMPS.TPU ! FUNCTION: This file contains procedures which insert / modify date and time ! stamps within a file. ! AUTHOR: Steven K. Shapiro, (C) Copyright SKS Enterprises, Austin TX. ! All Rights Reserved. ! ! The format, structure and contents of this file are the sole ! property of Steven K. Shapiro and are copyrighted to SKS ! Enterprises, Austin Texas. ! ! The information may be freely distributed, used and modified ! provided that the information in this header block is not ! changed, altered, disturbed or modified in any way. ! ! DATE: 25-AUG-1987 Original. ! HISTORY: current. ! CONTENTS: ! eve_version ! eve_date_stamp ! eve_dti_stamp ! eve_dts_replace ! eve_label_file ! eve_dts ! evedt$dts_replace (rep_buf) ! eve_name_file ! eve_time_message ! !23456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H !-- !*----------------------------------------------------------------------------*! variable evedt_version; !*----------------------------------------------------------------------------*! procedure stamps_module_ident local file_date, module_vers; file_date := "-<( 9-DEC-1988 14:57:15.48 )>-"; module_vers := substr(file_date,5,2) + substr(file_date,8,3) + substr(file_date,14,2) + substr(file_date,17,5) ; return module_vers; endprocedure; !*----------------------------------------------------------------------------*! ! ! Display the base EVEDT version number & the date-time of the last build of ! the EVEDT extension to EVE in the message window. ! !*----------------------------------------------------------------------------*! !eve$kt_version := "EVEDT Version V1.0-111886"; ! Eve version number !eve$kt_version := "EVEDT Version V2.0-021287"; ! Eve version number !eve$kt_version := "EVEDT Version V3.0-082687"; ! Eve version number !eve$kt_version := "EVEDT Version V3.1-021688"; ! Eve version number !*----------------------------------------------------------------------------*! ! Added HELP capability !eve$kt_version := "EVEDT Version V3.2-040788"; !*----------------------------------------------------------------------------*! ! Fixed no update for readonly Added VAX Notes margins !eve$kt_version := "EVEDT Version V3.3-081588"; !*----------------------------------------------------------------------------*! ! Added TDDPROCS: eve_xtpu, eve_open !eve$kt_version := "EVEDT Version V3.4-090988"; !*----------------------------------------------------------------------------*! ! Added eve_clist and associated support procedures to TDDPROCS. ! Added eve_xrecall procedure to TDDPROCS. ! Combined all tpu$local_inits into one big tpu$local_init in local_init.tpu. ! Modified input_evedt.tpu to contain local_init.tpu as first INCLUDE. !eve$kt_version := "EVEDT Version V3.41-092288"; !*----------------------------------------------------------------------------*! ! Modified prv and nxt buffer commands to be circular. ! ! Added eve_find_this and find_string_at_cursor procedures. These procs are used ! to search for other occurances of the string the cursor is on. If a select ! range is specified, search for the range as the string, otherwise search for ! the word at the cursor. ! ! Modified evedt$delete_line, evedt$del_end_word, evedt$delete_to_eol, ! evedt$remove_append, eve_erase_start_of_line, eve_erase_character, ! eve_remove, eve_rectangular_remove and eve_delete ! ! such that they now write the deleted text to a system buffer called DELETE. ! This is so that deleted text is never lost. ! !eve$kt_version := "EVEDT Version V3.5-092888"; !*----------------------------------------------------------------------------*! ! ! Changed all bev, bevpls and eveplus variables and procedures to be EVEDT ! variables and procedures. ! !eve$kt_version := "EVEDT Version V3.6-100588"; !*----------------------------------------------------------------------------*! ! ! Revision of all procedures and structure of EVEDT for compatibility with ! VMS Version 5.0, TPU Version 2.0 ! ! The eve$kt_version is now a system constant. It is used with build and is ! updated when the section file is saved. ! procedure eve_version (vers_type) local date_str; date_str := substr(evedt$_build_date,1,17); evedt_rev := "EVEDT Version V4.0-110188"; evedt_version := evedt_rev + ", Build Date: "+ date_str + " (C) Steven K. Shapiro"; if vers_type = 1 then message (evedt_version); endif; return evedt_rev; endprocedure; !*----------------------------------------------------------------------------*! procedure eve_date_stamp ! ! Insert the current date into the current_buffer. copy_text (fao("!%D",0)); copy_text (' '); move_horizontal(-2); eve_erase_word; endprocedure; !*----------------------------------------------------------------------------*! procedure eve_dti_stamp ! ! Insert the current date/time in the current_buffer. copy_text (fao("!%D",0)); copy_text (' '); endprocedure; !*----------------------------------------------------------------------------*! procedure eve_dts_replace ! ! Replace the date/time stamp enclosed in the delimiter string: -<( )>- evedt$dts_replace (current_buffer); endprocedure; !*----------------------------------------------------------------------------*! procedure eve_label_file ! This procedure will place the directory and name of the file as well as the ! date & time stamp string at the top of the buffer. If the buffer is not ! associated with a file, the directory string is omitted. local file_name, start_of_string, end_of_string, len_of_string; if (mark(none) <> beginning_of(current_buffer)) then eve_top; endif; file_name := get_info(current_buffer,"file_name"); if (file_name = "" ) then copy_text("! " + get_info(current_buffer,"name")); else start_of_string := index(file_name,"["); end_of_string := index(file_name,";"); len_of_string := end_of_string - start_of_string; file_name := substr(file_name,start_of_string,len_of_string); copy_text("! " + file_name ); endif; update(current_window); copy_text(substr(" ", 1, ((48-get_info(current_window,"current_column"))/8)+1)); copy_text("-<( )>-"); split_line; evedt$dts_replace (current_buffer); position(beginning_of(current_buffer)); endprocedure; !*----------------------------------------------------------------------------*! procedure eve_dts ! This procedure will place the date time stamp string at the current ! cursor location. local file_name, len_of_name, strt_of_nme; copy_text("-<( "); copy_text (fao("!%D",0)); copy_text(" )>-"); endprocedure; !*----------------------------------------------------------------------------*! procedure evedt$dts_replace (rep_buf) ! ! replace date time stame ! ! Parameters: ! ! rep_buf optional name of buffer to replace DTS in, if not ! supplied, then do in current_buffer. LOCAL start_range; on_error [OTHERWISE]: return; endon_error; start_range := mark(none); save_mode := get_info (rep_buf,"mode"); set (INSERT, rep_buf); sdt := '-<( '; edt := ' )>-'; position (beginning_of (rep_buf)); sdt_range := search (sdt, forward, exact); edt_range := search (edt, forward, exact); if (sdt_range <> 0) and (edt_range <> 0) then position(sdt_range); move_horizontal(4); sdt_mark := mark(none); position(edt_range); move_horizontal(-1); edt_mark := mark(none); dt_range := create_range(sdt_mark, edt_mark, none); erase (dt_range); copy_text (fao("!%D",0)); else message ('date time string not found'); endif; set (save_mode, rep_buf); position(start_range); endprocedure; !*----------------------------------------------------------------------------*! procedure eve_name_file ! This procedure will place the name of the buffer, which is usually the ! same as the file name, at the current cursor location.ber these keystrokes."); copy_text(get_info(current_buffer,"name") + " "); endprocedure; !*----------------------------------------------------------------------------*! procedure eve_time_message ! ! Display the current time in the message line. ! local dts, cthr, ctmin, ampm, cdate; dts := fao("!%D",0); cdate := substr(dts,1,11); cthr := substr(dts,13,2); ctmin := substr(dts,16,2); if int(cthr) >= 12 then ampm := ' PM' else ampm := ' AM'; endif; if int(cthr) > 12 then cthr := str(int(cthr) - 12); endif; message ("Current time: "+cthr+":"+ctmin+ampm+" "+cdate); endprocedure;