FreeBASIC  0.91.0
fb_device.h
Go to the documentation of this file.
1  /* CONS */
2  int fb_DevConsOpen ( FB_FILE *handle, const char *filename, size_t filename_len );
3 
4  /* ERR */
5  int fb_DevErrOpen ( FB_FILE *handle, const char *filename, size_t filename_len );
6 
7  /* FILE */
8  void fb_hSetFileBufSize ( FILE *fp );
9  int fb_DevFileOpen ( FB_FILE *handle, const char *filename, size_t filename_len );
11  int fb_DevFileEof ( FB_FILE *handle );
12 
13  int fb_DevFileLock ( FB_FILE *handle, fb_off_t position, fb_off_t size );
14  int fb_DevFileRead ( FB_FILE *handle, void *value, size_t *pLength );
15  int fb_DevFileReadWstr ( FB_FILE *handle, FB_WCHAR *dst, size_t *pchars );
17  int fb_DevFileReadLineWstr ( FB_FILE *handle, FB_WCHAR *dst, ssize_t dst_chars );
18  int fb_DevFileSeek ( FB_FILE *handle, fb_off_t offset, int whence );
19  int fb_hDevFileSeekStart ( FILE *fp, int mode, FB_FILE_ENCOD encod, int seek_zero );
20  fb_off_t fb_DevFileGetSize ( FILE *fp, int mode, FB_FILE_ENCOD encod, int seek_back );
21  int fb_DevFileTell ( FB_FILE *handle, fb_off_t *pOffset );
23  int fb_DevFileWrite ( FB_FILE *handle, const void *value, size_t valuelen );
24  int fb_DevFileWriteWstr ( FB_FILE *handle, const FB_WCHAR *value, size_t valuelen );
26 
27  typedef char* (*fb_FnDevReadString) ( char *buffer, size_t count, FILE *fp );
28  int fb_DevFileReadLineDumb ( FILE *fp, FBSTRING *dst, fb_FnDevReadString pfnReadString );
29 
30  /* ENCOD */
31  int fb_DevFileOpenEncod ( FB_FILE *handle, const char *filename, size_t fname_len );
32  int fb_DevFileOpenUTF ( FB_FILE *handle, const char *filename, size_t filename_len );
33  int fb_DevFileReadEncod ( FB_FILE *handle, void *dst, size_t *max_chars );
34  int fb_DevFileReadEncodWstr ( FB_FILE *handle, FB_WCHAR *dst, size_t *max_chars );
36  int fb_DevFileReadLineEncodWstr( FB_FILE *handle, FB_WCHAR *dst, ssize_t max_chars );
37  int fb_DevFileWriteEncod ( FB_FILE *handle, const void* buffer, size_t chars );
38  int fb_DevFileWriteEncodWstr( FB_FILE *handle, const FB_WCHAR* buffer, size_t len );
39 
40  /* PIPE */
41  int fb_DevPipeOpen ( FB_FILE *handle, const char *filename, size_t filename_len );
43 
44  /* SCRN */
45 typedef struct {
46  char buffer[16];
47  unsigned length;
49 
50  void fb_DevScrnInit ( void );
51  void fb_DevScrnInit_NoOpen ( void );
52  void fb_DevScrnInit_Write ( void );
53  void fb_DevScrnInit_WriteWstr ( void );
54  void fb_DevScrnInit_Read ( void );
55  void fb_DevScrnInit_ReadWstr ( void );
56  void fb_DevScrnInit_ReadLine ( void );
57  void fb_DevScrnInit_ReadLineWstr ( void );
58 
59  int fb_DevScrnOpen ( FB_FILE *handle, const char *filename, size_t filename_len );
61  int fb_DevScrnEof ( FB_FILE *handle );
62  int fb_DevScrnRead ( FB_FILE *handle, void* value, size_t *pLength );
63  int fb_DevScrnReadWstr ( FB_FILE *handle, FB_WCHAR *dst, size_t *pchars );
64  int fb_DevScrnWrite ( FB_FILE *handle, const void* value, size_t valuelen );
65  int fb_DevScrnWriteWstr ( FB_FILE *handle, const FB_WCHAR* value, size_t valuelen );
67  int fb_DevScrnReadLineWstr ( FB_FILE *handle, FB_WCHAR *dst, ssize_t dst_chars );
68  void fb_DevScrnFillInput ( DEV_SCRN_INFO *info );
69 
70  /* STDIO */
72 
73  /* LPT */
74  int fb_DevLptOpen ( FB_FILE *handle, const char *filename, size_t filename_len );
75 
76  /* COM */
77  int fb_DevComOpen ( FB_FILE *handle, const char *filename, size_t filename_len );
78  int fb_DevComTestProtocol ( FB_FILE *handle, const char *filename, size_t filename_len );
79  int fb_DevComTestProtocolEx ( FB_FILE *handle, const char *filename, size_t filename_len, size_t *pPort );