FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
gfx_lineinp_wstr.c
Go to the documentation of this file.
1
/* console line input function for wstrings */
2
3
#include "
fb_gfx.h
"
4
5
int
fb_GfxLineInputWstr
6
(
7
const
FB_WCHAR
*text,
8
FB_WCHAR
*dst,
9
ssize_t max_chars,
10
int
addquestion,
11
int
addnewline
12
)
13
{
14
FBSTRING
*tmp_result;
15
16
/* !!!FIXME!!! no support for unicode input */
17
18
FB_LOCK
();
19
20
fb_PrintBufferEx
(
NULL
, 0,
FB_PRINT_FORCE_ADJUST
);
21
22
if
( text !=
NULL
)
23
{
24
fb_PrintWstr
( 0, text, 0 );
25
26
if
( addquestion !=
FB_FALSE
)
27
fb_PrintFixString
( 0,
"? "
, 0 );
28
}
29
30
FB_UNLOCK
();
31
32
tmp_result =
fb_ConReadLine
(
TRUE
);
33
34
if
( addnewline )
35
fb_PrintVoid
( 0,
FB_PRINT_NEWLINE
);
36
37
if
( tmp_result ==
NULL
)
38
return
fb_ErrorSetNum
(
FB_RTERROR_OUTOFMEM
);
39
40
fb_WstrAssignFromA
( dst, max_chars, tmp_result, -1 );
41
42
return
fb_ErrorSetNum
(
FB_RTERROR_OK
);
43
}
44
45
gfxlib2
gfx_lineinp_wstr.c
Generated on Thu Jan 23 2014 19:40:06 for FreeBASIC by
1.8.4