1 --- FreeImage/Source/FreeImage/PluginRAW.cpp Tue Mar 10 11:12:04 2015
2 +++ FreeImage/Source/FreeImage/PluginRAW_.cpp Tue May 24 10:41:28 2022
4 // Use at your own risk!
5 // ==========================================================
7 -#include "../LibRawLite/libraw/libraw.h"
10 #include "FreeImage.h"
11 #include "Utilities.h"
15 int read(void *buffer, size_t size, size_t count) {
16 - if(substream) return substream->read(buffer, size, count);
17 +// if(substream) return substream->read(buffer, size, count);
18 return _io->read_proc(buffer, (unsigned)size, (unsigned)count, _handle);
21 int seek(INT64 offset, int origin) {
22 - if(substream) return substream->seek(offset, origin);
23 +// if(substream) return substream->seek(offset, origin);
24 return _io->seek_proc(_handle, (long)offset, origin);
28 - if(substream) return substream->tell();
29 +// if(substream) return substream->tell();
30 return _io->tell_proc(_handle);
37 - if(substream) return substream->get_char();
38 +// if(substream) return substream->get_char();
39 if(!_io->read_proc(&c, 1, 1, _handle)) return -1;
43 char* gets(char *buffer, int length) {
44 - if (substream) return substream->gets(buffer, length);
45 +// if (substream) return substream->gets(buffer, length);
46 memset(buffer, 0, length);
47 for(int i = 0; i < length; i++) {
48 if(!_io->read_proc(&buffer[i], 1, 1, _handle))
53 - if(substream) return substream->scanf_one(fmt,val);
54 +// if(substream) return substream->scanf_one(fmt,val);
56 if(_io->read_proc(&element, 1, 1, _handle) == 1) {
62 - if(substream) return substream->eof();
63 +// if(substream) return substream->eof();
64 return (_io->tell_proc(_handle) >= _eof);