FreeBASIC  0.91.0
con_print_raw_uni.h
Go to the documentation of this file.
1 /* print raw data - no interpretation is done */
2 
4  (
6  const FB_TCHAR *pachText,
7  size_t textLength
8  )
9 {
10  fb_Rect *pBorder = &handle->Border;
11  fb_Coord *pCoord = &handle->Coord;
12 
13  while( textLength!=0 )
14  {
15  size_t remainingWidth = pBorder->Right - pCoord->X + 1;
16  size_t copySize = (textLength > remainingWidth) ? remainingWidth : textLength;
17 
18  fb_hConCheckScroll( handle );
19 
20  if( handle->FB_CON_HOOK_TWRITE( handle,
21  (const char *) pachText,
22  copySize )!=TRUE )
23  break;
24 
25  textLength -= copySize;
26  FB_TCHAR_ADVANCE( pachText, copySize );
27  pCoord->X += copySize;
28 
29  if( pCoord->X==(pBorder->Right + 1) ) {
30  pCoord->X = pBorder->Left;
31  pCoord->Y += 1;
32  }
33  }
34 }