FreeBASIC  0.91.0
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 
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 
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 )
36 
37  if( tmp_result == NULL )
39 
40  fb_WstrAssignFromA( dst, max_chars, tmp_result, -1 );
41 
42  return fb_ErrorSetNum( FB_RTERROR_OK );
43 }
44 
45