Ejemplo n.º 1
0
static size_t php_ole_ops_read(php_stream *stream, char *buf, size_t count TSRMLS_DC)
{
	OLE_DATA_SELF();

	if(self->input){
		int cur = gsf_input_tell(self->input);
		int len = gsf_input_size(self->input);

		int read_len = (int)count;
		if(read_len > len - cur){
			read_len = len - cur;
		}
		gboolean eof = gsf_input_eof(self->input);
		stream->eof = eof;
		if(eof){
			return 0;
		}

		gsf_input_read(self->input,read_len,buf);
		int size = gsf_input_tell(self->input);

		return read_len;
	}
	else{
		return 0;
	}

}
Ejemplo n.º 2
0
bool AbiWordperfectInputStream::isEnd()
{
	return gsf_input_eof(m_input);
}
bool AbiWordperfectInputStream::atEOS()
{
	return gsf_input_eof(m_input);
}