예제 #1
0
FBCALL void fb_DataReadWstr( FB_WCHAR *dst, int dst_size )
{
	FB_LOCK();

	if( __fb_data_ptr ) {
		if( __fb_data_ptr->len == FB_DATATYPE_OFS ) {
			/* !!!WRITEME!!! */
		} else if( __fb_data_ptr->len & FB_DATATYPE_WSTR ) {
			fb_WstrAssign( dst, dst_size, __fb_data_ptr->wstr );
		} else {
			fb_WstrAssignFromA( dst, dst_size, __fb_data_ptr->zstr, __fb_data_ptr->len );
		}
	} else {
		/* no more DATA, return empty string */
		fb_WstrAssign( dst, dst_size, _LC("") );
	}

	fb_DataNext( );

	FB_UNLOCK();
}
예제 #2
0
FBCALL void fb_DataReadUInt( unsigned int *dst )
{
	FB_LOCK();

	if( __fb_data_ptr ) {
		if( __fb_data_ptr->len == FB_DATATYPE_OFS ) {
			*dst = (unsigned int)(unsigned long)__fb_data_ptr->ofs;
		} else if( __fb_data_ptr->len & FB_DATATYPE_WSTR ) {
			*dst = (unsigned int)fb_WstrToUInt( __fb_data_ptr->wstr, __fb_data_ptr->len & 0x7FFF );
		} else {
			*dst = (unsigned int)fb_hStr2UInt( __fb_data_ptr->zstr, __fb_data_ptr->len );
		}
	} else {
		/* no more DATA */
		*dst = 0;
	}

	fb_DataNext( );

	FB_UNLOCK();
}
예제 #3
0
FBCALL void fb_DataReadSingle( float *dst )
{
    FB_LOCK();

    if( __fb_data_ptr ) {
        if( __fb_data_ptr->len == FB_DATATYPE_OFS ) {
            *dst = (size_t)__fb_data_ptr->ofs;
        } else if( __fb_data_ptr->len & FB_DATATYPE_WSTR ) {
            *dst = fb_WstrToDouble( __fb_data_ptr->wstr, __fb_data_ptr->len & 0x7FFF );
        } else {
            *dst = fb_hStr2Double( __fb_data_ptr->zstr, __fb_data_ptr->len );
        }
    } else {
        /* no more DATA */
        *dst = 0.0;
    }

    fb_DataNext( );

    FB_UNLOCK();
}