|
Purpose |
Checks the status of the printer | |
|
Old name |
#define check_printer dvc_check | |
|
Syntax |
void dvc_check(void); | |
|
Description |
The dvc_check() function checks the current status of the printer. You should call it after the printer is selected, after each call to the function prn_print(). The global variables print_error and pr_err_mode govern how this function responds to an error. When an error occurs following a call to prn_print(), the global variable print_error is set to a non-zero value and a subsequent call to the function dvc_check() handles the error. The action taken by dvc_check() depends on the value of the global variable pr_err_mode: | |
|
|
pr_err_mode |
|
|
|
0 |
The following error message is dislayed and the program aborts: |
|
|
DP4 System error 129. Origin: Device driver | |
|
|
1 |
The above message is displayed, but the user has the option to abort the program by pressing the <Esc> key or to continue by pressing any other key |
|
|
2 |
No error message is displayed, it is up to the application to test the global variable print_error and display an appropriate message |
|
|
3 |
This is for situations where a DDI is interfacing with the system and a special version of PROGRUN is being used. Errors flagged by the DDI cause the 'hot-key' functionality to be invoked to handle the error. Refer to the DP4 Device Integration Developers Manual for more details |
|
|
|
If the global variable pr_err_mode is 0, the error message is displayed by the function sys_error(), otherwise it is displayed by the function sys_request(). The function sys_error() aborts the program, but sys_request only aborts the program if the user presses <Esc>. |
|
|
|
You can write your own version of dvc_check() if you wish to translate the error numbers into more meaningful messages for your application. |
|
See also |
||