Two keys generate signals which trigger special actions within IVI.
<CTRL A> is the Suspend key; <CTRL _ > (or perhaps <CTRL DEL>, depending on your keyboard) is the Abort key.
If IVI is running under the control of a "driver program", these keys affect the driver program, suspending or killing it, and returning control to the keyboard. (See IVI Functions, etc.)
If IVI is under keyboard control, the keys apply directly to IVI.
The Suspend key is a hangover from earlier times. It puts IVI into the background, and returns the user to the shell from which IVI was called. This allows a user to suspend the editor to carry out some other activity. In a windowing system, the user can simply open another window instead.
The shell command:
restores IVI back to the foreground, and regenerates the display.
The Abort key allows IVI to recover from several damaging activities. Basically, it
In the Miscellanea webpage, we have noted the annoying phenomenon of excessive type-ahead, where many repeated operations may be queued if the time taken complete an operation far exceeds the repetition time of the keys. (a) corrects this by discarding queued operations. (b) caters for the possibility that an IVI function or procedure has entered an endless loop. Clearing the function-stack causes the offending function or procedure to terminate. (c) is another feature which may have outlived its usefulness. In days gone by, certain activities, such as FEtching or SOrting a very large file, could take many minutes to complete. These operations have been written to terminate quickly but gracefully if the abort flag becomes set. (An aborted SOrt, for instance, retains all the lines of the original, but these are only partially sorted; an aborted FEtch correctly fetches part of the file.) A user who doesn't want to wait for a long operation to be completed can therefore terminate it using the Abort key. Current computers, however, are fast enough that this problem rarely seems to arise.
In some instances, the Abort key may leave the display in an incorrect state or the text cursor in the wrong place. A note on recovery will be found below.
Note that, unlike the IVI operation keys, these keys are set up at entry to IVI, and cannot be changed or disabled by the user.
Command: UNix shell, SHell
Purpose: Spawn a shell and execute a UNIX (or DOS) command within it
Format: UN <string> or SH <string>
Parameter: The two commands are the same. They have two cases. If the parameter <string> is present, this is the command to be executed within the shell. The screen is cleared, the command is carried out, and its output (if any) is written to the screen. The system then prompts for a <RETURN> to get you back to IVI.
If <string> is omitted, an interactive shell is spawned, and the user can enter commands at the keyboard. The shell command:
then gets you back to IVI.
Note that <string> cannot contain the symbol | .
Earlier we described the Suspend key <CTRL A>, which suspends IVI, putting it into the "background" and re-entering a UNIX shell. Superficially, this appears to be same as UN with no parameter, but there is a subtle difference. <CTRL A> re-enters the shell from which IVI was called; UN enters a subshell of IVI, which inherits some of IVI's environment. If, for example, the file directory has been changed within IVI, the UN shell will be in the new directory. The shell re-entered by <CTRL A> is still in the working directory from which IVI was called. For most users, the distinction will be irrelevant.
UN ls - view the current directory. (This, incidentally, is how
the command DIrectory is implemented.)
UN ls >tmp - write the current directory to file tmp, whence it can be FEtched to the corefile.
UN cd fred - change the current directory to fred. This changes the working directory in the subshell, but it reverts to the former value when the shell is closed, and thus has no effect. Instead you must use the CDirectory command.
In the Sun/Solaris version, the window running IVI can be resized using the mouse buttons any time between operations or commands. (You are strongly advised against doing this while IVI is in the middle of some time-consuming operation like a large SOrt.) The display will be re-created to fill as many lines and columns as the new window allows. (This also applies when IVI is started up.)
The layout of the IVI display requires that there should always be more than 80 columns and more than 5 lines.
In some instances, resizing may leave the display in an incorrect state or the text cursor in the wrong place. Recovery is described below.
These comments do not apply to the Windows version. In this case, starting IVI spawns a new window 80 columns wide. It is possible to choose one of three depths in advance.
Some activities, like resizing the window or using the Abort key, may leave the display in an incorrect state or the text cursor in the wrong place. This can also occur if a system message is broadcast to the window running IVI. A procedure exists which tries to re-create the correct display. This may be called automatically by some activities, or explicitly using the GE command.
Command: GEnerate display
Purpose: Re-create the screen display
The GEnerate display command re-creates the screen display if it becomes corrupted, for example by system messages broadcast to the terminal, or some other means. You can, of course, still enter COMMAND mode to type the command even if the screen is in a mess.
Activities which call the underlying procedure automatically may leave the cursor incorrectly positioned. The next keystroke should correct it, but if this is a typed character, it may be displayed in the wrong place. No harm is done. The stored text will still be correct, and an explicit GE should put things right.
By the way, if you insist on resizing the window or using the Abort key while part way through entering a command, the automatic GE may not be able to redisplay the command line, though the existing characters are still there in spirit.
Many parts of IVI have been in constant use for 20 years. Others, especially the newer features of VINCI, have been less thoroughly exercised. The possibility of internal loops or even crashes cannot be ruled out.
Note that the Abort key does not abort IVI itself, and indeed no interrupt key is provided for this purpose. If IVI or VINCI should enter an infinite loop, it must be killed from another window or by using the Suspend key and the UNIX kill command.
At start-up, IVI alters the some of the properties of the window in which it is running, especially the actions of certain keys. On normal exit, it restores these to their values at start-up. If, however, IVI is killed or crashes, it has no opportunity to do this, and the window may be left in a bad state. In particular, it may not be echoing UNIX commands to the screen.
To correct this, first note that the <RETURN> key may no longer serve to terminate UNIX commands. The <LINEFEED> or <CTRL J> key, however, should still do so. Enter this to eliminate any residual characters in the UNIX command buffer. Now enter (without seeing an echo):
reset<LINEFEED>This should restore the echo, and
stty sane<LINEFEED>will return the keys to their UNIX default actions. (Unfortunately, if you have reassigned UNIX keys you will have to do this again.)
Operation: Dump core
Purpose: Create a file containing a dump of part of the corefile structure
Default Key: <CTRL ]>
Operation Number: 38
This is for debugging purposes only. If you insist on trying it, the file is called test.file. The operation contaminates the display with a message, but this can be corrected using the GEnerate display command.