Environment Setting

To make it easier to handle the differences between the standard behavior of UNIX programs and the standard behavior of D3 programs, two calls are provided that set the environment to either D3 or UNIX.

Call

Description

_CP_pick_env()

Sets the application to a standard D3 environment. When using this setting, all terminal input and output must be done via D3 routines only.

_CP_unix_env()

Sets the application to a standard UNIX environment. With this setting, all terminal input and output must be done directly from C. The program must not execute or call any D3 routines which may crt or print something through D3.

The original logon to D3 calls _CP_pick_env(). After that, the user may use these routines to switch environments as often as desired.

NOTE

Environment functions require considerable amounts of CPU and should only be used when switching environments is absolutely necessary. To ensure the correct functionality of the UNIX shell, the system automatically calls _CP_unix_env() when the user logs off the of the D3 virtual machine.