^zProgram 1 - FDEINIT.COM $!---------------------------------------------------------------------------- $! FDEINIT.COM $! $! Create the subdirectory, libraries, and data file needed to initiate $! the first session in the Fortran Development Environment. All $! symbols are local, so there's no need to delete them at job $! termination. $!--------------------------------------------------------------------------- $! $! Minimal error checking; if THIS procedure doesn't work, something's $! definitely wrong. $! $on error then go to done $! $! Display some information about this procedure and what to expect $! $type sys$input This procedure sets your default directory to SYS$LOGIN, then creates a project subdirectory for libraries, executable images, and files necessary to the operation of the development environment. If you do not want to load these items into a subdirectory off your root directory, type a CONTROL/Y and exit now. Change the source code of this file to reflect your needs. $inquire/nopunct ans "Press any key to continue, or CTRL/Y to exit..." $! $! OK to continue, so provide a little more information before continuing. $! $type sys$input You will be prompted for the project name, the name of the initial work file (do NOT add a file type to this name; all files will be .FOR), the editor you wish to use, and some additional information. With the exception of the project name, everything else can be changed when the main menu is first displayed. Type a CONTROL/Y at any time to exit. $inquire project "Project name" $inquire workfile "First work file name" $inquire editor "Initial editor (EDT, TPU)" $inquire/nopunct debug "Should DEBUG initially be on (Y or N)? " $inquire termtype "Terminal type (VT100, VT200)" $inquire/nopunct list "Should compiler listings be created (Y or N)? " $! $! No more input. Command file takes over from here... $! $type sys$input No further input required... $write sys$output "Setting default directory to SYS$LOGIN... " $set def sys$login $write sys$output "Creating subdirectory named [.''project']" $create/directory/version=2 [.'project'] $write sys$output "Setting default directory to [.''project']" $set def [.'project'] $write sys$output "Creating text and object module libraries..." $library/create/text 'project' $library/create 'project' $write sys$output "Creating PROGRAM.DAT, which contains FDE startup data..." $open/write init_file program.dat $write init_file "''project'" $write init_file "''workfile'" $write init_file "''editor'" $write init_file "''debug'" $write init_file "''termtype'" $write init_file "''list'" $close init_file $! $! Create the FDE symbol $! $fde:==@fde_dir:fde $! $! Advise adding the FDE symbol and a logical for the FDE $! command file for FDE subdirectory to LOGIN.COM. $! $type sys$input You should create a logical name called FDE_DIR that points to the directory containing the FDE command files, and add it and the FDE global symbol to your LOGIN.COM. $done: $ exit PROGRAM 2 - FDE.COM $ v == f$verify(0) $!--------------------------------------------------------------------------- $! FDE.COM $! $! This is the first command file to be executed. It initializes the $! environment based on the information contained in PROGRAM.DAT. $! It then displays the top portion of the main menu, and calls $! FDE_COMMANDS to display the available commands. It will enter a $! loop to test for the proper commands, then branch to the appropriate $! label and call an external routine. $!--------------------------------------------------------------------------- $ ! INITIALIZE TERMINAL ENVIRONMENT, DISPLAY "LOADING..." MESSAGE $ $ esc[0,32]==27 $ set noon $ write sys$output " " $ write sys$output esc+- "[5m...Loading the Fortran Development Environment"+esc+"[m" $ set broadcast=(shutdown,urgent,queue,opcom) $ DEFAULT_DIRECTORY = f$environment("default") $ $ ! INITIALIZE LOCAL SYMBOLS TO SETTINGS FROM THE LAST SESSION $ $ open fde_program fde_dir:program.dat $ read/end_of_file=endfde fde_program main_prog $ read/end_of_file=endfde fde_program work_file $ read/end_of_file=endfde fde_program EDITOR $ read/end_of_file=endfde fde_program DEBUG $ read/end_of_file=endfde fde_program FDE_TERM_TYPE $ read/end_of_file=endfde fde_program LIST $ $ endfde: $ close fde_program $ $ ! SET GLOBAL SYMBOLS $ $ FDE_MAIN_PROG == f$edit(main_prog,"trim") $ FDE_WORK_FILE == f$edit(work_file,"trim") $ DEBUG_ON == f$edit(debug,"trim") $ LIST_ON == f$edit(list,"trim") $ $ if FDE_MAIN_PROG.nes."" then goto change_directory $ goto set_edit $ $ ! CHANGE TO THE DIRECTORY APPROPRIATE FOR THIS PROGRAM SET $ $ change_directory: $ ROOT_DIRECTORY = f$trnlnm("sys$login") $ root_dir_length = f$locate("]",root_directory) $ root_dir_edited = f$extract(0,root_dir_length,root_directory) $ FDE_WORK_DIR = "''root_dir_edited'" + "." + "''FDE_MAIN_PROG'" + "]" $ set def 'FDE_WORK_DIR' $ $ ! CHANGE TO THE EDITOR LAST USED $ $ set_edit: $ double_quote = """ $ if EDITOR.eqs."" then goto set_com $ if EDITOR.eqs."TPU".or.EDITOR.eqs."tpu" then goto tpu_edit $ if EDITOR.eqs."WPS".or.EDITOR.eqs."wps" then goto wps_edit $ if EDITOR.eqs."EDT".or.EDITOR.eqs."edt" then goto edt_edit $ goto set_com $ $ ! SET TERMINAL TO VT200 AND EDITOR FOR TPU/EVE $ $ tpu_edit: $ set terminal/dev=vt200/noeight $ write sys$output esc+"[62;1",double_quote,"p" $ FDE_EDIT=="EDIT/TPU" $ goto set_com $ $ ! SET TERMINAL TO VT200 WITH EDT AND WPS-STYLE KEYBOARD $ $ wps_edit: $ set terminal/dev=vt200/noeight $ write sys$output esc+"[62;1",double_quote,"p" $ FDE_EDIT=="edit/edt/com=sys$login:wpsini.edt" $ goto set_com $ $ ! SET TERMINAL TO VT100 AND BARE BONES EDT $ $ edt_edit: $ set terminal/dev=vt100 $ write sys$output esc+"[61",double_quote,"p" $ FDE_EDIT=="edit/edt/com=sys$login:edtini.edt" $ $ ! SET COMPILER/LINKER OPTIONS AND SYMBOLS $ $ set_com: $ FDE_COMPILE == "FORTRAN" $ FDE_LINK == "LINK" $ if list_on then FDE_COMPILE == "''FDE_COMPILE'/LIST" $ if debug_on then goto debug_yes $ goto display_screen $ debug_yes: $ FDE_COMPILE == "''FDE_COMPILE'/NOOPT/DEBUG" $ FDE_LINK == "''FDE_LINK'/debug" $ $ ! CREATE THE MAIN MENU DISPLAY $ $ display_screen: $ write sys$output esc+"(B" ! US is G0 $ write sys$output esc+")0" ! Special line is G1 $ write sys$output esc+"[22;24r" $ write sys$output esc+"[2J"+esc+"[H" ! Clear screen $ type sys$input ^N lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x[7m FORTRAN DEVELOPMENT ENVIRONMENT [0mx mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj^O $ time_line[24,25]:='f$cvtime(,,"hour")' $ time_line[26,26]:=":" $ time_line[27,28]:='f$cvtime(,,"minute")' $ time_line[33,41]:='f$cvtime(,,"date")' $ time_line[45,55]:='f$cvtime(,,"weekday")' $ write sys$output time_line $ write sys$output esc+"[7;1f"+esc+"[1mDEFAULT DIRECTORY: " $ write sys$output esc+"[7;50f"+"WORK FILE: " $ write sys$output esc+"[8;1f"+"PROGRAM: " $ write sys$output esc+"[8;50f"+"EDITOR: " $ write sys$output esc+"[9;1f"+"DEBUG ON? " $ write sys$output esc+"[9;15f"+"LIST ON? " $ write sys$output esc+"[9;50f"+"TERMINAL TYPE: "+esc+"[m" $ write sys$output esc+"[7;20f"+"''fde_work_dir'" $ write sys$output esc+"[7;61f"+"''fde_work_file'" $ write sys$output esc+"[8;10f"+"''fde_main_prog'" $ write sys$output esc+"[8;58f"+"''editor'" $ write sys$output esc+"[9;11f"+"''debug_on'" $ write sys$output esc+"[9;24f"+"''list_on'" $ write sys$output esc+"[9;65f"+"''fde_term_type'" $ write sys$output " " $ $ ! DISPLAY COMMAND OPTIONS $ $ @fde_dir:fde_commands $ $ ! TEST FOR THEN EXECUTE THE APPROPRIATE COMMAND $ $ chk_commands: $ write sys$output esc+"[22;1f"+esc+"[K" $ inquire/nopunct fde_com "[22;1f[1mCommand> [m" $ if fde_com.eqs."EXTR".or.fde_com.eqs."extr" then- @fde_dir:extract.com 'fde_work_file' $ if fde_com.eqs."EXTRALL".or.fde_com.eqs."extrall" then- @fde_dir:extr_all.com 'fde_main_prog' $ if fde_com.eqs."EDITOR".or.fde_com.eqs."editor" then- @fde_dir:sel_editor.com $ if fde_com.eqs."EDIT".or.fde_com.eqs."edit" then- goto edit $ if fde_com.eqs."UPDATE".or.fde_com.eqs."update" then- goto update $ if fde_com.eqs."MAKE".or.fde_com.eqs."make" then- goto make $ if fde_com.eqs."LIST".or.fde_com.eqs."list" then- @fde_dir:list $ if fde_com.eqs."DEBUG".or.fde_com.eqs."debug" then- @fde_dir:debug $ if fde_com.eqs."PRINT".or.fde_com.eqs."print" then- goto print_la50 $ if fde_com.eqs."PLIS".or.fde_com.eqs."plis" then- goto plis $ if fde_com.eqs."DISPLAY".or.fde_com.eqs."display" then- goto display_files $ if fde_com.eqs."FILE".or.fde_com.eqs."file" then- @fde_dir:file $ if fde_com.eqs."PROGRAM".or.fde_com.eqs."program" then- @fde_dir:program $ if fde_com.eqs."RUN".or.fde_com.eqs."run" then- goto run_prog $ if fde_com.eqs."SHELL".or.fde_com.eqs."shell" then- goto spawn_sub $ if fde_com.eqs."EXIT".or.fde_com.eqs."exit" then- goto finish $ goto chk_commands $ $ ! DISPLAY CONTENTS OF LIST FILES, LIBRARIES OR DIRECTORY $ $ display_files: $ @fde_dir:display $ goto display_screen $ $ ! EDIT THE SELECTED FILE $ $ edit: $ define/user sys$input sys$command: $ fde_edit 'fde_work_file'.for $ goto display_screen $ $ ! SHELL COMMAND $ $ spawn_sub: $ set noon $ write sys$output esc+"[2J"+esc+"[H"+esc+"[1;24r" $ spawn $ goto display_screen $ $ ! COMPILE THEN UPDATE THE TEXT LIBRARY $ $ update: $ @fde_dir:update 'fde_work_file' 'fde_main_prog' $ goto display_screen $ $ ! LINK THEN UPDATE THE OBJECT MODULE LIBRARY $ $ make: $ @fde_dir:fde_link 'fde_work_file' $ goto display_screen $ $ ! RUN THE PROGRAM $ $ run_prog: $ set noon $ write sys$output esc+"[2J"+esc+"[H"+esc+"[1;24r" $ $ if f$search("''fde_main_prog'.COM").nes."" then goto com_avail $ define/user sys$input sys$command: $ run 'fde_main_prog' $ goto end_run $ com_avail: $ define/user sys$input sys$command: $ @'fde_main_prog' $ end_run: $ inquire/nopunct ans "22;1f1mPress any key to continue... 0m" $ write sys$output esc,"[2J",esc,"[H" ! Clear screen $ goto display_screen $ $ ! PRINT THE SOURCE CODE TO LA50 ON TERMINAL $ $ print_la50: $ @fde_dir:la50 'fde_work_file'.for $ goto display_screen $ $ ! PRINT THE COMPILER LISTING TO LA50 $ $ plis: $ @fde_dir:la50 'fde_work_file'.lis $ goto display_screen $ $ ! RESET TERMINAL THEN LEAVE $ $ finish: $ set on $ @fde_dir:fde_stop $ exit PROGRAM 3 - DEBUG.COM $!------------------------------------------------------------------------ $! DEBUG.COM - turns the FDE debugger on and off and sets the compile $! and link global symbols. $! $!------------------------------------------------------------------------ $ $ ! GET CURRENT STATE OF DEBUG $ $ open/read/write fde_program fde_dir:program.dat $ read fde_program null1 $ read fde_program null2 $ read fde_program null3 $ read fde_program debug $ $ ! SET COMPILE AND LINK SYMBOLS TO NEW STATE $ $ if debug then goto switch_it $ debug_on == "Y" $ FDE_COMPILE == "''FDE_COMPILE'/NOOPTIMIZE/DEBUG" $ FDE_LINK == "LINK/DEBUG" $ goto write_it $ switch_it: $ debug_on == "N" $ fde_link == "LINK" $ total_length = f$length(fde_compile) $ begin_position = f$locate("/NOOPT",fde_compile) $ end_position = begin_position + 17 $ if total_length.eq.end_position then goto strip $ goto extract $ strip: $ fde_compile == f$extract(0,begin_position,fde_compile) $ goto write_it $ extract: $ prefix = f$extract(0,begin_position,fde_compile) $ suffix = f$extract(end_position,total_length,fde_compile) $ fde_compile == prefix + suffix $ $ ! UPDATE FDE STATUS FILE WITH NEW DEBUG STATE $ $ write_it: $ write/update fde_program debug_on $ close fde_program $ write sys$output esc + "[9;11f " $ write sys$output esc + "[9;11f''debug_on'" $ write sys$output esc + "[22;1f" + esc + "[K" $ exit PROGRAM 4 - DISPLAY.COM $!----------------------------------------------------------------------- $! DISPLAY.COM - Displays a short menu asking which file or $! library listing to display. $!----------------------------------------------------------------------- $ $ ! ASK WHICH TYPE OF DISPLAY IS DESIRED $ $ write sys$output esc + "[2J" + esc + "[H" $ write sys$output esc + "[4;23r" $ inquire/nopunct f_type - "[1mWhich - .(L)IS, (S)ource, (D)ir, (T)ext lib, or (O)bj lib: [L] [m" $ write sys$output esc + "[5;1f" $ if f_type.eqs."L".or.f_type.eqs."l".or.f_type.eqs."" then goto listing $ $ ! DISPLAY SOURCE CODE $ $ if f_type.eqs."S".or.f_type.eqs."s" then type 'fde_work_file'.for $ $ ! DISPLAY DIRECTORY $ $ if f_type.eqs."D".or.f_type.eqs."d" then dir $ $ ! DISPLAY TEXT LIBRARY $ $ if f_type.eqs."T".or.f_type.eqs."t" then library/list/text 'fde_main_prog' $ $ ! DISPLAY OBJECT MODULE LIBRARY $ $ if f_type.eqs."O".or.f_type.eqs."o" then library/list 'fde_main_prog' $ inquire/nopunct return - "[24;1f[1mPress to continue... [m" $ goto done $ $ ! DISPLAY COMPILER LISTING OF WORKING FILE $ $ listing: $ set terminal/width=132 $ type 'fde_work_file'.lis $ inquire/nopunct return - "[24;1f[1mPress to continue...[m" $ set terminal/width=80 $ done: $ exit PROGRAM 5 - EXTRACT.COM $!-------------------------------------------------------------------------- $! EXTRACT.COM - Extracts a text module from the text library called $! 'FDE_MAIN_PROG'.TLB, where 'FDE_MAIN_PROG' is the symbol $! for the current FDE "main program". $! $! p1 = the work file to be extracted $!--------------------------------------------------------------------------- $ $ library/text/extract='p1'/output='p1'.for 'fde_main_prog'.tlb $ write sys$output esc+"[23;1f"+esc+"[K" $ exit PROGRAM 6 - EXTRALL.COM $!----------------------------------------------------------------- $! EXTRALL.COM - Extracts (@fde_dir:extract) all of the text modules $! from the current text library. It obtains the $! names of each module by reading "MODULE.DAT" in $! the default directory. $!----------------------------------------------------------------- $ $ open module_data MODULE.DAT $ read_loop: $ read/end_of_file=finish/error=finish module_data module $ @fde_dir:extract 'module' $ goto read_loop $ finish: $ write sys$output esc+"[22;1f"+esc+"[K" $ close module_data $ exit PROGRAM 7 - FDE_COMMANDS.COM $!--------------------------------------------------------------------------- $! Displays a menu of all commands available in this environment $!--------------------------------------------------------------------------- $ $ write sys$output - " You may use these commands in this environment:" $ write sys$output "" $ write sys$output esc,"[7mExtr:",esc,"[0m Extract source from TLB" $ write sys$output esc,"[7mExtrall:",esc,"[0m Extract all source" $ write sys$output esc,"[7mEditor:",esc,"[0m Select Editor" $ write sys$output esc,"[7mEdit:",esc,"[0m Edit work file" $ write sys$output esc,"[7mUpdate:",esc,"[0m Compile, replace source" $ write sys$output esc,"[7mMake:",esc,"[0m Link to subroutines" $ write sys$output esc,"[7mList:",esc,"[0m Turn compile listing on & off" $ write sys$output esc,- "[7mDebug:",esc,"[0m Turn debugging on & off" $ write sys$output esc,- "[13;40f",esc,"[7mPrint:",esc,"[0m Send workfile source to LA50" $ write sys$output esc,- "[14;40f",esc,"[7mPlis:",esc,"[0m Print workfile listing on LA50" $ write sys$output esc,- "[15;40f",esc,"[7mDisplay:",esc,"[0m View a file or library list" $ write sys$output esc,"[16;40f",esc,"[7mFile:",esc,"[0m Select workfile" $ write sys$output esc,- "[17;40f",esc,"[7mProgram:",esc,"[0m Select main program/dir." $ write sys$output esc,"[18;40f",esc,"[7mRun:",esc,"[0m Run main program" $ write sys$output esc,- "[19;40f",esc,"[7mShell:",esc,"[0m Issue DCL commands (must LO!)" $ write sys$output esc,- "[20;40f",esc,"[7mExit:",esc,"[0m Leave development environment" $ write sys$output esc,"[21;24r" PROGRAM 8 - FDE_LINK.COM $!--------------------------------------------------------------------------- $! FDE_LINK.COM - provides the correct linking procedures for the FDE $! program. $! $!--------------------------------------------------------------------------- $ set on $ on warning then goto err_msg $ write sys$output esc+"[2J"+esc+"[H" $ write sys$output esc+"[1;24r" $ write sys$output - esc+"[1m ... Linking to ''fde_main_prog' ..."+esc+"[0m" $ write sys$output esc+"(B"+esc+")0"+esc+"[5;24r^N" $ type sys$input qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq ERRORS qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq ^O $ FDE_LINK/EXE='fde_work_file'.EXE 'fde_work_file','fde_main_prog'/lib $ purge *.exe $ inquire/nopunct ret - "[22;1f[1mPress to continue...[0m" $ exit $ err_msg: $ continue $ inquire/nopunct ret - "[22;1f[1mPress to continue...[0m" $ set noon $ exit PROGRAM 9 - FDE_STOP.COM $!--------------------------------------------------------------------------- $! FDE_STOP.COM - cleans up after using the FDE program. $! This includes deleting all of the global symbols $! unique to this environment. $!--------------------------------------------------------------------------- $ $ purge/keep=2 $ set broadcast=(all) $ set def 'DEFAULT_DIRECTORY' $ delete/symbol/global FDE_MAIN_PROG $ delete/symbol/global FDE_WORK_FILE $ delete/symbol/global FDE_EDIT $ delete/symbol/global FDE_COMPILE $ delete/symbol/global FDE_LINK $ delete/symbol/global DEBUG_ON $ delete/symbol/global LIST_ON $ write sys$output esc,"[1;24r" $ write sys$output esc,"[2J",esc,"[H" $ delete/symbol/global esc $ if v then set verify $ delete/symbol/global v $ exit PROGRAM 10 - FILE.COM $!------------------------------------------------------------------------- $! FILE.COM - changes the work file name in the FDE program $!------------------------------------------------------------------------- $ start: $ write sys$output esc,"[22;1f",esc,"[K" $ inquire/nopunct name - "[22;1f[1mNew work file name> [0m" $ fde_work_file==f$edit(name,"trim") $ new_name[0,25]:='fde_work_file' $ write sys$output esc,"[7;61f",esc,"[K" $ write sys$output esc,"[7;61f''fde_work_file'" $ open/read/write fde_program fde_dir:program.dat $ read fde_program null $ read fde_program null $ write/update fde_program new_name $ close fde_program $ write sys$output esc,"[22;1f",esc,"[K" $ exit PROGRAM 11 - LIST.COM $!------------------------------------------------------------------------ $! LIST.COM - turns the compiler list function on and off and sets the $! compile global symbol. $!------------------------------------------------------------------------ $ $ set noon $ $ ! GET THE CURRENT STATE OF THE LIST OPTION (ON OR OFF) $ $ open/read/write fde_program fde_dir:program.dat $ read fde_program null1 $ read fde_program null2 $ read fde_program null3 $ read fde_program null4 $ read fde_program null5 $ read fde_program LIST $ $ ! SET THE NEW LISTING STATE TO THE OPPOSITE OF THE CURRENT STATE $ $ if list then goto switch_it $ list_on == "Y" $ FDE_COMPILE == "''FDE_COMPILE'/LIST" $ goto write_it $ switch_it: $ list_on == "N" $ total_length = f$length(fde_compile) $ begin_position = f$locate("/list",fde_compile) $ end_position = begin_position + 5 $ if total_length.eq.end_position then goto strip $ goto extract $ strip: $ fde_compile == f$extract(0,begin_position,fde_compile) $ goto write_it $ extract: $ prefix = f$extract(0,begin_position,fde_compile) $ suffix = f$extract(end_position,total_length,fde_compile) $ fde_compile == prefix + suffix $ $ ! UPDATE THE FDE PROGRAM STATUS TO REFLECT NEW STATE $ $ write_it: $ write/update fde_program list_on $ close fde_program $ $ ! UPDATE MENU $ $ write sys$output esc,"[9;24f " $ write sys$output esc,"[9;24f''list_on'" $ write sys$output esc,"[22;1f",esc,"[K" $ exit PROGRAM 12 - PROGRAM.COM $!--------------------------------------------------------------------------- $! PROGRAM.COM - changes the program (FDE_MAIN_PROG) name in the FDE program $! This also has the effect of changing the subdirectory $! name, the default directory, and the name of the command $! file which runs the program. $!--------------------------------------------------------------------------- $ set noon $ $ ! PROMPT FOR THE NAME OF THE NEW PROGRAM $ $ write sys$output esc,"[22;1f",esc,"[K" $ inquire/nopunct prog "[22;1f[1mNew program name> [0m" $ fde_main_prog==f$edit(prog,"trim") $ new_prog[0,20]:='fde_main_prog' $ $ ! CHANGE TO NEW SUBDIRECTORY $ $ write sys$output esc,"[23;1f",esc,"[K" $ write sys$output esc,"[23;1fChanging to new directory..." $ $ change_dir: $ ROOT_DIRECTORY = f$trnlnm("sys$login") $ root_dir_length = f$locate("]",root_directory) $ root_dir_edited = f$extract(0,root_dir_length,root_directory) $ FDE_WORK_DIR = "''root_dir_edited'" + "." + "''FDE_MAIN_PROG'" + "]" $ set def 'FDE_WORK_DIR' $ write sys$output esc,"[23;1f",esc,"[K" $ write sys$output esc,"[23;1fSetting file version limit to 2 ..." $ set file/version=2 *.* $ write sys$output esc,"[23;1f",esc,"[K" $ $ ! UPDATE THE FDE ENVIRONMENT TO REFLECT THE NEW PROGRAM $ $ open/read/write fde_program fde_dir:program.dat $ read fde_program null $ write/update fde_program new_prog $ close fde_program $ write sys$output esc,"[7;20f " $ write sys$output esc,"[7;20f''fde_work_dir'" $ write sys$output esc,"[8;10f " $ write sys$output esc,"[8;10f''fde_main_prog'" $ write sys$output esc,"[22;1f",esc,"[K" $ exit PROGRAM 13 - SEL_EDITOR.COM $!------------------------------------------------------------------------- $! SEL_EDITOR.COM - selects a new editor, then sets the terminal type $! most appropriate to that editor. $!------------------------------------------------------------------------- $ start: $ write sys$output esc,"[22;1f",esc,"[K" $ inquire/nopunct editor "[22;1f[1mNew Editor name> [0m" $ write sys$output esc,"[8;58f",esc,"[K" $ write sys$output esc,"[8;58f''editor'" $ if EDITOR.eqs."TPU".or.EDITOR.eqs."tpu" then goto tpu_edit $ if EDITOR.eqs."EDT".or.EDITOR.eqs."edt" then goto edt_edit $ if EDITOR.eqs."WPS".or.EDITOR.eqs."wps" then goto wps_edit $ goto start $ $ ! TPU/EVE EDITOR WITH VT200 TERMINAL $ $ tpu_edit: $ set terminal/dev=vt200 $ write sys$output esc,"[62;1",double_quote,"p" $ FDE_EDIT:== "EDIT/TPU" $ FDE_TERM_TYPE = "VT200/NOEIGHT" $ call subr1 'editor' $ goto finish $ $ ! EDT EDITOR WITH WPS-STYLE KEYS AND VT200 TERMINAL $ $ wps_edit: $ set terminal/dev=vt200 $ write sys$output esc,"[62;1",double_quote,"p" $ FDE_EDIT:== "edit/edt/com=sys$login:wpsini.edt" $ FDE_TERM_TYPE = "VT200" $ call subr1 'editor' $ goto finish $ $ ! STANDARD EDT EDITOR AND KEYS, VT100 TERMINAL $ $ edt_edit: $ set terminal/dev=vt100 $ write sys$output esc,"[61",double_quote,"p" $ FDE_EDIT:=="edit/edt/com=sys$login:edtini.edt" $ FDE_TERM_TYPE = "VT100" $ $ ! WRITE THE NEW STATUS TO THE FDE STATUS FILE $ $ open/read/write fde_program fde_dir:program.dat $ read fde_program null $ read fde_program null $ read fde_program null $ write/update fde_program editor $ read fde_program null $ read fde_program null $ write/update fde_program fde_term_type $ close fde_program $ $ ! LEAVE $ $ finish: $ write sys$output esc,"[9;65f",esc,"[K" $ write sys$output esc,"[9;65f''fde_term_type'" $ write sys$output esc,"[22;1f",esc,"[K" $ exit PROGRAM 14 - UPDATE.COM $!------------------------------------------------------------------------- $! UPDATE.COM - compile the current work file and replace it in the $! text library. Do some screen management along the $! way so that any errors will be displayed. $!------------------------------------------------------------------------- $ $ set on $ on error then goto err_msg $ write sys$output esc,"[2J",esc,"[H" $ write sys$output esc,"[1;24r" $ write sys$output esc,"[1m ... Compiling ''fde_work_file' ...",esc,"[0m" $ $ ! CHANGE TO DEC LINE DRAWING CHARACTER SET $ $ write sys$output esc,"(B",esc,")0",esc,"[5;24r^N" $ $ ! DISPLAY ERRORS, IF ANY $ $ type sys$input qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq ERRORS qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq ^O $ ! THE LINE DIRECTLY ABOVE CHANGES BACK TO DEC/ANSI CHARACTER SET $ $ fde_compile 'fde_work_file' $ $ ! UPDATE THE TEXT AND OBJECT LIBRARIES WITH THE NEW MODULE $ $ library/text 'fde_main_prog' 'fde_work_file'.for $ library 'fde_main_prog' 'fde_work_file' $ $ ! PERFORM A PURGE OF SOURCE AND, IF NECESSARY, A PURGE OF LISTING FILE $ $ purge *.for $ if list_on then purge *.lis $ inquire/nopunct ret - "[22;1f[1mPress to continue...[0m" $ $ ! LEAVE $ $ exit $ err_msg: $ continue $ inquire/nopunct ret - "[22;1f[1mPress to continue...[0m" $ set noon $ exit PROGRAM 15 - LA50.COM $!------------------------------------------------------------------ $! $! LA50.COM: This procedure controls the generation of printouts on an $! LA50 printer. The first parameter is the name of the text file to be $! printed. $! $!---------------------------------------------------------------------- $! $! set terminal to nowrap for readable printouts $! $ SET NOON $ SET TERM/NOWRAP $! $! turn printer on, print file $! $ WRITE SYS$OUTPUT esc,"[5i" $ WRITE SYS$OUTPUT esc,"[2w" !12 pitch $ WRITE SYS$OUTPUT esc,"[0z" !6 lines per inch $ WRITE SYS$OUTPUT esc,"[66t" !66 lines per page $ TYPE 'P1' $! $! turn printer off $! $ WRITE SYS$OUTPUT esc,"[0w" !10 pitch $ WRITE SYS$OUTPUT esc,"[4i" $! $DONE: $ SET TERM/WRAP $EXIT FIGURE - FDE MAIN MENU SCREEN ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ FORTRAN DEVELOPMENT ENVIRONMENT ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ 22:39 1989-09-16 SATURDAY DEFAULT DIRECTORY: DUA3:[WEYEL.BBS] WORK FILE: CALC PROGRAM: BBS EDITOR: TPU DEBUG ON? Y LIST ON? Y TERMINAL TYPE: VT100 You may use these commands in this environment: Extr: Extract source from TLB Print: Send workfile source to LA50 Extrall: Extract all source Plis: Print workfile listing on LA50 Editor: Select Editor Display: View a file or library list Edit: Edit work file File: Select workfile Update: Compile, replace source Program: Select main program/dir. Make: Link to subroutines Run: Run main program List: Turn compile listing on & off Shell: Issue DCL commands (must LO!) Debug: Turn debugging on & off Exit: Leave development environment Command>