FreeBASIC  0.91.0
data_readushort.c
Go to the documentation of this file.
1 /* read stmt for ushort's */
2 
3 #include "fb.h"
4 
5 FBCALL void fb_DataReadUShort( unsigned short *dst )
6 {
7  FB_LOCK();
8 
9  if( __fb_data_ptr ) {
11  *dst = (size_t)__fb_data_ptr->ofs;
12  } else if( __fb_data_ptr->len & FB_DATATYPE_WSTR ) {
13  *dst = fb_WstrToUInt( __fb_data_ptr->wstr, __fb_data_ptr->len & 0x7FFF );
14  } else {
16  }
17  } else {
18  /* no more DATA */
19  *dst = 0;
20  }
21 
22  fb_DataNext( );
23 
24  FB_UNLOCK();
25 }