HexEdit/BGPreview.cpp
unsigned __stdcall CHexEditDoc::fi_read(void *buffer, unsigned size, unsigned count, fi_handle handle)
{
	CHexEditDoc *pDoc = (CHexEditDoc *)handle;

	if (pDoc->PreviewProcessStop())
		return 0;       // indicate that processing should stop

	size_t got = pDoc->GetData((unsigned char *)buffer, size*count, pDoc->preview_address_);
	pDoc->preview_address_ += got;
	return got/size;
}
// fi_read() should behave like fread (returns count if all items were read OK, returns 0 on eof/error)

fi_read() should behave like fread (returns count if all items were read OK, returns 0 on eof/error)
fi_read () should behave like fread ( returns count if all items were read OK returns 0 on eof / error )
unsigned __stdcall CHexEditDoc::fi_read(void *buffer, unsigned size, unsigned count, fi_handle handle)
{
	CHexEditDoc *pDoc = (CHexEditDoc *)handle;
	if (pDoc->PreviewProcessStop())
		return 0;       
	size_t got = pDoc->GetData((unsigned char *)buffer, size*count, pDoc->preview_address_);
	pDoc->preview_address_ += got;
	return got/size;
}
unsigned __stdcall CHexEditDoc :: fi_read ( void * buffer , unsigned size , unsigned count , fi_handle handle ) { CHexEditDoc * pDoc = ( CHexEditDoc * ) handle ; if ( pDoc -> PreviewProcessStop ( ) ) return 0 ; size_t got = pDoc -> GetData ( ( unsigned char * ) buffer , size * count , pDoc -> preview_address_ ) ; pDoc -> preview_address_ += got ; return got / size ; }
fi_read() should behave like fread (returns count if all items were read OK, returns 0 on eof/error)
fi_read () should behave like fread ( returns count if all items were read OK returns 0 on eof / error )
// indicate that processing should stop
