This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/_harderr.c

24 lines
550 B
C

#include <stdio.h>
#include <conio.h>
#include <dos.h>
int __far critical_error_handler( unsigned deverr,
unsigned errcode,
unsigned far *devhdr )
{
cprintf( "Critical error: " );
cprintf( "deverr=%4.4X errcode=%d\r\n",
deverr, errcode );
cprintf( "devhdr = %Fp\r\n", devhdr );
return( _HARDERR_IGNORE );
}
void main( void )
{
FILE *fp;
_harderr( critical_error_handler );
fp = fopen( "a:tmp.tmp", "r" );
printf( "fp = %p\n", fp );
}