FreeBASIC  0.91.0
dev_err_open.c
Go to the documentation of this file.
1 /* file device */
2 
3 #include "fb.h"
4 
8  NULL,
9  NULL,
14  NULL,
15  NULL,
18 };
19 
20 int fb_DevErrOpen( FB_FILE *handle, const char *filename, size_t filename_len )
21 {
22  int res = fb_ErrorSetNum( FB_RTERROR_OK );
23 
24  FB_LOCK();
25 
26  handle->hooks = &hooks_dev_err;
27 
28  if ( handle->access == FB_FILE_ACCESS_ANY)
30 
31  if( res == FB_RTERROR_OK ) {
32  handle->opaque = stderr;
33  handle->type = FB_FILE_TYPE_PIPE;
34  }
35 
36  FB_UNLOCK();
37 
38  return res;
39 }