RFR: JDK-8295685: Update Libpng to 1.6.38 [v3]

Harshitha Onkar honkar at openjdk.org
Wed Nov 2 23:10:30 UTC 2022


On Wed, 2 Nov 2022 21:18:43 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:

>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   updated instructions
>
> src/java.desktop/share/native/libsplashscreen/libpng/UPDATING.txt line 51:
> 
>> 49:         do
>> 50:         sed -e 's/[ ]* $//' ${f} > ${f}.tmp;
>> 51:         mv ${f}.tmp $f;
> 
> You can use `-i` option for `sed` instead of explicit temp file.
> 
> -i[SUFFIX], --in-place[=SUFFIX]
> 
>       edit files in place (makes backup if SUFFIX supplied)
> 
> 
> So it can be simplified to `sed -i -e 's/[ ]* $//' ${f}`
> 
> BTW all 3 preparation actions can be performed in a single loop:
> 
> 
> 
> for f in *.c *.h;
> do
>   # replace tabs with spaces
>   expand ${f} > ${f}.tmp;
>   mv ${f}.tmp $f;
> 
>   # fix line endings to LF
>   sed -i -e 's/\r$//g' ${f}
> 
>   # remove trailing spaces
>   sed -i -e 's/[ ]* $//g' ${f} 
> done

Thanks for the suggestion. I'll update it.

-------------

PR: https://git.openjdk.org/jdk/pull/10953



More information about the client-libs-dev mailing list