df_libtype

Description

Indicates global behaviours of certain DP4 functions

Old Name

#define libtype df_libtype

Syntax

int df_libtype;

Remarks

The df_libtype variable controls various aspects of the behaviour of the DP4 user interface as follows:

  • Bit 0 (1) should always be set. If this bit is not set field_input functions do not work as documented in this manual.

  • If bit 1 (2) is set there is an implied call to trm_refresh() after every call to a function that outputs to the screen. Normally the screen is only painted when you explicitly call trm_refresh(), a map is changed to DEAD, or the program is waiting for input from the user. You may use this value as a "quick and dirty" way of ensuring that in batch programs that all output is seen by the user. However it is better to insert the necessary calls to refresh instead.

  • If bit 2 (4) is set then input functions that update the current field number (inpm_x() and scrn_map() etc) do not return if the user leaves the field in such a way that the current field is unchanged. This helps prevent the entered value being lost in certain circumstances. See libtype 5 for more information.

  • If bit 3 (8) is set then an out of range value is never copied into a field as a result of calling a field input function. Usually the user's entered value is always copied to the variable passed as the field value parameter. Usually the user cannot enter an out of range value in any case.

  • If bit 15 (32768) is set then the behaviour of the terminal manager in the event of a system or fail error is changed. Usually if such an error is generated inside the terminal mananager, the terminal manager reports the error itself before control returns to the user app_error() function. You can prevent this, and so take over responsibility for reporting errors by setting this bit. This is not recommended.