FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
dev_scrn_init.c
Go to the documentation of this file.
1
/* file device */
2
3
#include "
fb.h
"
4
5
static
FB_FILE_HOOKS
hooks_dev_scrn_null
= { 0 };
6
7
void
fb_DevScrnInit_Screen
(
void
)
8
{
9
int
cols;
10
DEV_SCRN_INFO
*info = (
DEV_SCRN_INFO
*) malloc(
sizeof
(
DEV_SCRN_INFO
));
11
12
fb_GetSize
( &cols,
NULL
);
13
info->
length
= 0;
14
15
FB_HANDLE_SCREEN
->opaque = info;
16
FB_HANDLE_SCREEN
->line_length =
fb_GetX
() - 1;
17
FB_HANDLE_SCREEN
->width = cols;
18
}
19
20
void
fb_DevScrnInit_NoOpen
(
void
)
21
{
22
if
(
FB_HANDLE_SCREEN
->hooks ==
NULL
) {
23
FB_LOCK
();
24
25
memset(
FB_HANDLE_SCREEN
, 0,
sizeof
(*
FB_HANDLE_SCREEN
));
26
27
FB_HANDLE_SCREEN
->mode =
FB_FILE_MODE_APPEND
;
28
FB_HANDLE_SCREEN
->type =
FB_FILE_TYPE_VFS
;
29
FB_HANDLE_SCREEN
->access =
FB_FILE_ACCESS_READWRITE
;
30
31
fb_DevScrnInit_Screen
( );
32
33
FB_HANDLE_SCREEN
->hooks = &
hooks_dev_scrn_null
;
34
35
FB_UNLOCK
();
36
}
37
}
rtlib
dev_scrn_init.c
Generated on Thu Jan 23 2014 19:40:08 for FreeBASIC by
1.8.4