1 Star 0 Fork 15

DisNight / freeimage

forked from src-openEuler / freeimage 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
substream.patch 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
DisNight 提交于 2021-02-09 16:56 . fix patch line error
--- a/Source/FreeImage/PluginRAW.cpp~ 2020-05-08 08:27:31.000000000 -0500
+++ b/Source/FreeImage/PluginRAW.cpp 2020-05-08 08:47:09.011816310 -0500
@@ -63,17 +63,14 @@
}
int read(void *buffer, size_t size, size_t count) {
- if(substream) return substream->read(buffer, size, count);
return _io->read_proc(buffer, (unsigned)size, (unsigned)count, _handle);
}
int seek(INT64 offset, int origin) {
- if(substream) return substream->seek(offset, origin);
return _io->seek_proc(_handle, (long)offset, origin);
}
INT64 tell() {
- if(substream) return substream->tell();
return _io->tell_proc(_handle);
}
@@ -83,13 +80,11 @@
int get_char() {
int c = 0;
- if(substream) return substream->get_char();
if(!_io->read_proc(&c, 1, 1, _handle)) return -1;
return c;
}
char* gets(char *buffer, int length) {
- if (substream) return substream->gets(buffer, length);
memset(buffer, 0, length);
for(int i = 0; i < length; i++) {
if(!_io->read_proc(&buffer[i], 1, 1, _handle))
@@ -104,7 +99,6 @@
std::string buffer;
char element = 0;
bool bDone = false;
- if(substream) return substream->scanf_one(fmt,val);
do {
if(_io->read_proc(&element, 1, 1, _handle) == 1) {
switch(element) {
@@ -127,7 +121,6 @@
}
int eof() {
- if(substream) return substream->eof();
return (_io->tell_proc(_handle) >= _eof);
}
1
https://gitee.com/disnight/freeimage.git
git@gitee.com:disnight/freeimage.git
disnight
freeimage
freeimage
master

搜索帮助