Lines 1315-1321
Link Here
|
1315 |
* instead of an int, which is what fread() actually returns. |
1315 |
* instead of an int, which is what fread() actually returns. |
1316 |
*/ |
1316 |
*/ |
1317 |
check = (png_size_t)VSIFReadL(data, (png_size_t)1, length, |
1317 |
check = (png_size_t)VSIFReadL(data, (png_size_t)1, length, |
1318 |
(VSILFILE*)png_ptr->io_ptr); |
1318 |
(VSILFILE*)png_get_io_ptr(png_ptr)); |
1319 |
|
1319 |
|
1320 |
if (check != length) |
1320 |
if (check != length) |
1321 |
png_error(png_ptr, "Read Error"); |
1321 |
png_error(png_ptr, "Read Error"); |
Lines 1330-1336
Link Here
|
1330 |
{ |
1330 |
{ |
1331 |
png_uint_32 check; |
1331 |
png_uint_32 check; |
1332 |
|
1332 |
|
1333 |
check = VSIFWriteL(data, 1, length, (VSILFILE*)(png_ptr->io_ptr)); |
1333 |
check = VSIFWriteL(data, 1, length, (VSILFILE*)png_get_io_ptr(png_ptr)); |
1334 |
|
1334 |
|
1335 |
if (check != length) |
1335 |
if (check != length) |
1336 |
png_error(png_ptr, "Write Error"); |
1336 |
png_error(png_ptr, "Write Error"); |
Lines 1341-1347
Link Here
|
1341 |
/************************************************************************/ |
1341 |
/************************************************************************/ |
1342 |
static void png_vsi_flush(png_structp png_ptr) |
1342 |
static void png_vsi_flush(png_structp png_ptr) |
1343 |
{ |
1343 |
{ |
1344 |
VSIFFlushL( (VSILFILE*)(png_ptr->io_ptr) ); |
1344 |
VSIFFlushL( (VSILFILE*)png_get_io_ptr(png_ptr) ); |
1345 |
} |
1345 |
} |
1346 |
|
1346 |
|
1347 |
/************************************************************************/ |
1347 |
/************************************************************************/ |
Lines 1357-1363
Link Here
|
1357 |
// libpng is generally not built as C++ and so won't honour unwind |
1357 |
// libpng is generally not built as C++ and so won't honour unwind |
1358 |
// semantics. Ugg. |
1358 |
// semantics. Ugg. |
1359 |
|
1359 |
|
1360 |
jmp_buf* psSetJmpContext = (jmp_buf*) png_ptr->error_ptr; |
1360 |
jmp_buf* psSetJmpContext = (jmp_buf*) png_get_error_ptr(png_ptr); |
1361 |
if (psSetJmpContext) |
1361 |
if (psSetJmpContext) |
1362 |
{ |
1362 |
{ |
1363 |
longjmp( *psSetJmpContext, 1 ); |
1363 |
longjmp( *psSetJmpContext, 1 ); |