From d247e5b800758fc7839e257564492c874a1fd742 Mon Sep 17 00:00:00 2001 From: small_leek Date: Wed, 16 Dec 2020 14:55:06 +0800 Subject: [PATCH 1/2] correct the substream.patch: the result of jenkins is not real correct the substream.patch --- freeimage.spec | 5 ++++- substream.patch | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/freeimage.spec b/freeimage.spec index 1b8b7e3..8b1e225 100644 --- a/freeimage.spec +++ b/freeimage.spec @@ -5,7 +5,7 @@ Name: freeimage Version: 3.18.0 -Release: 4 +Release: 5 Summary: FreeImage is a library project for developers who would like to support popular graphics image formats (PNG, JPEG, TIFF, BMP and others) License: GPLv2 or GPLv3 and FIPL URL: https://freeimage.sourceforge.io/ @@ -105,6 +105,9 @@ ldconfig -n %{buildroot}%{_libdir} %changelog +* Wed Dec 16 2020 Senlin -3.18.0-5 +- correct the substream.patch: add an empty line at end of file + * Tue Dec 15 2020 Senlin -3.18.0-4 - Rebuild for new LibRaw diff --git a/substream.patch b/substream.patch index b3380c5..e5bab7b 100644 --- a/substream.patch +++ b/substream.patch @@ -53,4 +53,5 @@ - if(substream) return substream->eof(); + //if(substream) return substream->eof(); return (_io->tell_proc(_handle) >= _eof); - } \ No newline at end of file + } + From 0000d6e1409d7a8b06ac3ce59e72b1ecff1548d9 Mon Sep 17 00:00:00 2001 From: small_leek Date: Thu, 17 Dec 2020 10:23:44 +0800 Subject: [PATCH 2/2] update substream.patch. --- substream.patch | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/substream.patch b/substream.patch index e5bab7b..4f55d82 100644 --- a/substream.patch +++ b/substream.patch @@ -4,20 +4,14 @@ } int read(void *buffer, size_t size, size_t count) { -- if(substream) return substream->read(buffer, size, 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); -+ //if(substream) return substream->seek(offset, origin); return _io->seek_proc(_handle, (long)offset, origin); } INT64 tell() { -- if(substream) return substream->tell(); -+ //if(substream) return substream->tell(); return _io->tell_proc(_handle); } @@ -25,24 +19,18 @@ int get_char() { int c = 0; -- if(substream) return substream->get_char(); -+ //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); -+ //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 +104,7 @@ std::string buffer; char element = 0; - bool bDone = false; -- if(substream) return substream->scanf_one(fmt,val); -+ //if(substream) return substream->scanf_one(fmt,val); + bool bDone = false; do { if(_io->read_proc(&element, 1, 1, _handle) == 1) { switch(element) { @@ -50,8 +38,6 @@ } int eof() { -- if(substream) return substream->eof(); -+ //if(substream) return substream->eof(); return (_io->tell_proc(_handle) >= _eof); }