MAKEDEF
The makedef utility is an executable program (does not require an interpreter) that modifies a screen definition file to support PL/B list controls and establishes the default PL/B runtime characteristics. makedef may also create new screen definition files. The command line syntax is:
|
|
|
Note the following:
{scrndef} must not contain the '.def' extension.
If {scrndef} is not specified, the user's environment table is searched for a PLB_TERM or TERM entry. If both PLB_TERM and TERM entries exist, the PLB_TERM entry takes precedence and is used. An extension of `.def' is appended to the PLB_TERM/TERM entry and an attempt is made to open the corresponding screen definition file.
If the screen definition file assigned to the PLB_TERM or TERM entry cannot be found, the following behaviors are expected:
The 'makedef' utility attempts to create a new screen definition file using the information found in the files located in the `/usr/lib/terminfo' directory. If the '/usr/lib/terminfo' directory does not exist, the information found in the '/usr/share/terminfo' directory is used to create a new screen definition file.
Also, if a Linux/Linux keyword named 'TERMINFO={termdir}' is found in the UET, the {termdir} assigned string is a path that is used to find the terminal information when creating a new screen definition file. Under normal circumstances, the 'TERMINFO' UET keyword should not be used/required.
Once initialization is complete, numerous prompts appear. In those cases where a `y' or `n' prompt is given, the option displayed in upper case is the default for a null entry. The first prompt is:
Would you like instructions ? ( y or N ) :
The instructions provide an overview of the valid formats accepted for control sequences. Several formats are valid: Decimal, Hex, Octal, ASCII Literals, Control Characters, as well as ESC for escape characters and one or more formats can be mixed within a single control sequence.
Since many terminal sequences include an escape character, the letters ESC can be used in place of the decimal, hex or octal value for the escape character. Control codes (Ctrl-a through Ctrl-?) can be entered using the carat character (^), followed by the appropriate character (i.e., ^A, ^H, etc.). Any characters within the normal ASCII ranges can be entered enclosed in quotes (i.e., "A", "a", etc.). Several ASCII characters may also be grouped together within a set of quotes (i.e., "ABCD", "abcd", etc.). Any bytes outside of the previously described ranges can be entered using decimal (nnn), hex (hnn) or octal (onnn) values (i.e., Decimal 127, Hex h7f or Octal o177).
Valid terminal sequence examples:
ESC,"[OP"
27,91,79,80
h1b,h5b,h4f,h50
o33,o133,o117,o120
27,h5b,o117,"P"
These are all valid entries for the terminal sequence Escape [OP. makedef first displays the currently defined sequence or [Not Set] if undefined, before prompting if a change is desired. Since the `N' in the prompt is in upper case, No is the default for a null entry.
Several sections of terminal sequences, when not applicable, can be bypassed simply by answering no at the given prompt (No is the default for a null entry). The prompts and what screen characteristics they cover are as follows:
Toggle subwindow emulation (currently 'Y')? [y or N]:
If Yes is the current status, then subwindows are supported when this terminal definition file is used.
Toggle Color Screen Support (currently 'Y')? [y or N]:
If Yes is the current status, the colors are supported, if defined in the color section, when this terminal definition file is used. If No is the current status, then color is not supported, even if there are color control codes in the color section.
Change any simple terminal control strings? [y or N]:
If Yes was entered for the `Change any simple terminal control strings' prompt, the user is prompted for the following definitions:
Change Backspace Character? [y or N]:
The current backspace character is displayed on the line above the prompt. This character can be changed by entering 'Y' to the prompt and then entering the code for the backspace in binary, decimal, octal or hex.
Change Cancel Character? [y or N]:
The current cancel character is displayed on the line above the prompt. This character can be changed by entering 'Y' to the prompt and then entering the code for the cancel in binary, decimal, octal or hex.
Change screen width (columns) (currently vv)? [y or N]:
Change screen height (rows) (currently hh)? [y or N]:
Change the decimal value specifying the maximum number of columns and rows for the terminal corresponding to this file (vv is the current column value and hh is the current row value).
Change screen address mode (currently ...)? [y or N]:
The address mode is Binary or Decimal. The current address mode is displayed and answering Yes toggles to the other mode (i.e., Binary to Decimal or vice versa). The address mode is how the actual cursor position bytes are to be sent to the terminal. Binary for position 1 would be hex 01 (a single byte) where Decimal for position 1 would be ASCII '01' (two decimal bytes).
The simplest way to determine whether a terminal uses Binary or Decimal mode, if not specifically mentioned in the programming section of the User's Manual for the terminal, is to look at the cursor positioning sequence the terminal requires. Most terminals using an 'hv' or 'vh' sequence (single byte parameters for both horizontal and vertical positioning) are Binary mode whereas terminals using a 'hhvv' or 'vvhh' (two byte parameters for positioning) are Decimal mode.
Change screen position bias (currently n)? [y or N]:
Although the top left corner of the screen is column 1, row 1 in PL/B, many terminals identify that location as 0,0. In addition, many terminals that use Binary mode addressing require that the positioning parameter be ASCII to avoid conflict with other special terminal sequences. Therefore, cursor positioning may need to be biased to convert the non-ASCII range screen positions to valid ASCII characters. The bias factor must be obtained from the programming section of the User's Manual for the terminal.
The remaining prompts first display the currently established values followed by the prompt:
Change cursor position? [y or N]:
The cursor positioning sequence needs to be entered using %1 as the horizontal positioning parameter and %2 as the vertical positioning parameter. The actual value for %1 and %2 are as programmed in the executing PL/B program and it is formatted for the terminal as previously defined by the addressing mode and bias.
Change screen initialization? [y or N]:
Change screen termination? [y or N]:
The initialization and termination sequences allow the user to establish special terminal sequences that are to be sent when the interpreter initially loads the first program and prior to termination return to the operating system. These sequences place the terminal in a specific mode of operation or establish certain attributes (such as colors).
The user is then prompted for the following; *EL, *EF, *ES, *R, *RD, *HON, *HOFF, *DION, *DIOFF, *BLINKON, *BLINKOFF, *ULON, *ULOFF, *GON, *GOFF, *CURSON, *CURSOFF, *PON, *POFF, *B, *CLICK, and *FLASH. Not all of these definitions are supported by all terminals (such as *GON/*GOFF {graphics mode on/off}, *PON/*POFF {terminal printer on/off}, *CLICK {system click}, and *FLASH {makes the entire screen flash like a flashbulb} ). However, the appropriate definition sequences must be in the exact format the terminal manual specifies or left as [Not Set] so as to avoid conflicts.
Since few terminals have a special sequence to perform a Roll Up (*R) or Roll Down (*RD) function like Datapoint's terminals, usually a combination of other sequences to do so. The *R sequence can be accomplished by saving the current cursor position, re-positioning to the Home Down location (column 1 of last row), sending a Line Feed (Hex 0A - to scroll the screen up one line) and then restoring the cursor position. The *RD sequence is usually accomplished by saving the current cursor position, re-positioning to the Home Up location (column 1 of row 1), inserting a line (to scroll the screen down one line) and then restoring the cursor position. Normally, only ANSI compliant terminals feature the ability to save and restore the cursor positioning. Therefore, an *R or *RD may cause the cursor position to be off one line on some terminals so caution should be exercised when using the *R or *RD screen controls.
The *PON and *POFF definitions are provided for those terminals (such as the Datapoint 82xx and Wyse series) that have auxiliary printer ports attached that allow screen I/O to be dumped to a local printer through DISPLAY instructions.
The *B is usually defined as Hex 07 (ASCII Bell character).
Change any user defined functions? [y or N]:
These are ten list controls (*S0-*S9) that can be specially defined and used for unique terminal or printer sequences. These are optional and user generic.
Change any color controls? [y or N]:
Unless the terminal in use supports colors, this section can be bypassed by entering an `N' or through a null entry. If selected, prompts for the following color attribute sequences appears: *BLACK, *RED, *GREEN, *YELLOW, *BLUE, *MAGENTA, *CYAN, and *WHITE.
Change any subwindow control strings? [y or N]:
Answering Yes results in prompts for the following screen controls: *INSCHR, *DELCHR, *INSLIN, *DELLIN, *OPNLIN, *CLSLIN, *SETSWALL, *SETSWTB, *SETSWLR, *RESETSW, *SCRLEFT, and *SCRRIGHT.
Even though your particular terminal may not directly support the sub-window functions, they still function. Internal within SDBINTERP, a screen image is maintained. It tracks your current screen status and sends any modifications to your actual terminal, if necessary. If you perform a sub-window function and your display does not support, it is emulated via the interpreter. The Datapoint screen definition files, as provided by Sunbelt, have complete and accurate sequences for these definitions and therefore should not be modified by the user. The format for these sequences is similar to that used for cursor positioning except that the parameters are relative to their PL/B source counterparts (i.e., `%1,%2,%3,%4' corresponds to t:b:l:r in SETSWALL, `%1,%2' parts corresponding to t:b in SETSWTB, `%1,%2' corresponds to l:r in SETSWLR, etc.).
The next section corresponds to the ability to support up to 40 Function keys in this PL/B implementation. However, since most terminals offer 10 or less, the next prompt allows modification of the values expected for each of the supported Function keys:
Change any function keys? [y or N]:
Answering Yes results in the following prompts:
Change number of function keys (currently nn)? [y or N]:
The number of function keys to be supported can be dynamically increased or decreased as appropriate to the terminal's ability to support them. As with the screen controls the currently defined sequence or [Not Set] is displayed before the prompt for a change for each Function key (up to nn).
Change any other function keys? [y or N]:
Answering Yes at this prompt allows the user to redefine the sequences expected when any of the following keys are pressed: UP, DOWN, LEFT, RIGHT, INS, DEL, HOME, PGUP, PGDN, END, and ESC. As with the function key redefinition, the currently defined sequence or [Not Set], is displayed before the prompt for a change.
Change default file extensions? [y or N]:
This section modifies the default PL/B environment characteristics within a screen definition file. These defaults are assumed whenever a program does not provide the specific characteristics.
Change extension delimiter? [y or N]:
Recommended to be a period (.). This is the character that is the separator between the file name and the file extension, if an extension was not provided. A forward slash (/) cannot be used because it is in conflict with the operating system subdirectory separator.
Toggle extension requirement (currently n)? [y or N]:
Recommended to be No. If set to Yes, the appropriate default extension is automatically appended to the every file name in which an extension was not explicitly given, even if the defined file name to extension delimiter is given without an extension. However, if No is used, the established default extensions are appended only when both the `file name to extension delimiting character' and an extension have not been provided.
Change maximum extension length (currently #)? [y or N]:
This specifies the longest extension length allowed (up to a maximum of 4, that is the recommended value). Any extension given in excess of the defined maximum length is truncated.
Change default text file extension? [y or N]:
Any extension may be provided, up to the maximum extension length. However, if the operating system is case sensitive, it is recommended that the extension defined be in the same case as the file names are expected to be. It is used as the default for any text file in which an extension is required but has not been provided.
Change default isam file extension? [y or N]:
Any extension may be provided, up to the maximum extension length. However, if the operating system is case sensitive, it is recommended that the extension defined be in the same case as the file names are expected to be. It is used as the default for any ISAM key file in which an extension is required but has not been provided.
Change default aam file extension? [y or N]:
Any extension may be provided, up to the maximum extension length. However, if the operating system is case sensitive, it is recommended that the extension defined be in the same case as the file names are expected to be. It is used as the default for any AAM key file in which an extension is required but has not been provided.
Change default PL/B code file extension? [y or N]:
Any extension may be provided, up to the maximum extension length. It is used as the default extension for loading or chaining to any PL/B programs in which a specific extension has not been provided. On case sensitive systems, it is recommended that the extension be in the same case as the majority of the program names are to be. As originally distributed, the default PL/B Code file extension in the screen definition files is set to .dbc. Any change from this default should also be made to the compile script and all other supplied scripts.
Change default spool file extension? [y or N]:
Any extension may be provided, up to the maximum extension length. It is used whenever a spool file is created or opened without a specific file extension being provided.
Change default ANSWER name? [y or N]:
May be any PLBCMP generated file name. The default ANSWER program name should be in the same case as and incorporate as its extension, the default PL/B Code file extension.
Change default MASTER name? [y or N]:
May be any PLBCMP generated file name. The default MASTER program name should be in the same case as and incorporate as its extension, the default PL/B Code file extension.
Change default print device/file name? [y or N]:
This defines the print device or file any unspooled PRINT instructions. Caution should be exercised if a printer device name is specified, since locking conflicts could occur if more than one program accesses the same device concurrently. Spooling is highly recommended.
Change default border characters? [y or N]:
Answering Yes at this prompt allows the user to redefine the default characters for the *BORDER list control function.
Write the output file? [Y or n]:
Entering a Yes or a null entry, results in the new sequences being written to {scrndef] if specified or the file name constructed from the user's environment table TERM entry if not.
See Also: Utilities
![]() |