FreeBASIC  0.91.0
dev_scrn_readline_wstr.c
Go to the documentation of this file.
1 /* file device */
2 
3 #include "fb.h"
4 
5 int fb_DevScrnReadLineWstr( FB_FILE *handle, FB_WCHAR *dst, ssize_t dst_chars )
6 {
7  int res;
8  FBSTRING temp = { 0 };
9 
10  /* !!!FIXME!!! no unicode input supported */
11 
12  res = fb_LineInput( NULL, (void *)&temp, -1, FALSE, FALSE, TRUE );
13 
14  if( res == FB_RTERROR_OK )
15  fb_WstrAssignFromA( dst, dst_chars, (void *)&temp, -1 );
16 
17  fb_StrDelete( &temp );
18 
19  return res;
20 }
21 
23 {
25 
26  if( FB_HANDLE_SCREEN->hooks->pfnReadLineWstr == NULL )
27  FB_HANDLE_SCREEN->hooks->pfnReadLineWstr = fb_DevScrnReadLineWstr;
28 }