mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 00:52:18 +01:00
Temporarily avoid using base."@I/O redirect"
This commit (and the next) will soon be followed by a rollback.
This commit is contained in:
1 parent
302afb7ce5
commit
844fc9b5ee
3 files changed
+8
-8
No files matched your search
@@ -12251,7 +12251,7 @@ wuffs_bmp__decoder__decode_image_config(wuffs_bmp__decoder* self,
|
|||||||
status = wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
|
status = wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
|
||||||
goto exit;
|
goto exit;
|
||||||
} else if (self->private_impl.f_io_redirect_fourcc != 0) {
|
} else if (self->private_impl.f_io_redirect_fourcc != 0) {
|
||||||
status = wuffs_base__make_status(wuffs_base__note__i_o_redirect);
|
status = wuffs_base__make_status(wuffs_base__note__metadata_reported);
|
||||||
goto ok;
|
goto ok;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@@ -12557,11 +12557,11 @@ wuffs_bmp__decoder__decode_image_config(wuffs_bmp__decoder* self,
|
|||||||
if (v_bits_per_pixel == 0) {
|
if (v_bits_per_pixel == 0) {
|
||||||
if (v_compression == 4) {
|
if (v_compression == 4) {
|
||||||
self->private_impl.f_io_redirect_fourcc = 1246774599;
|
self->private_impl.f_io_redirect_fourcc = 1246774599;
|
||||||
status = wuffs_base__make_status(wuffs_base__note__i_o_redirect);
|
status = wuffs_base__make_status(wuffs_base__note__metadata_reported);
|
||||||
goto ok;
|
goto ok;
|
||||||
} else if (v_compression == 5) {
|
} else if (v_compression == 5) {
|
||||||
self->private_impl.f_io_redirect_fourcc = 1347307296;
|
self->private_impl.f_io_redirect_fourcc = 1347307296;
|
||||||
status = wuffs_base__make_status(wuffs_base__note__i_o_redirect);
|
status = wuffs_base__make_status(wuffs_base__note__metadata_reported);
|
||||||
goto ok;
|
goto ok;
|
||||||
}
|
}
|
||||||
status = wuffs_base__make_status(wuffs_bmp__error__unsupported_bmp_file);
|
status = wuffs_base__make_status(wuffs_bmp__error__unsupported_bmp_file);
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
|
|||||||
if (this.call_sequence <> 0) or (this.io_redirect_fourcc == 1) {
|
if (this.call_sequence <> 0) or (this.io_redirect_fourcc == 1) {
|
||||||
return base."#bad call sequence"
|
return base."#bad call sequence"
|
||||||
} else if this.io_redirect_fourcc <> 0 {
|
} else if this.io_redirect_fourcc <> 0 {
|
||||||
return base."@I/O redirect"
|
return base."@metadata reported" // XXX
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the BITMAPFILEHEADER (14 bytes).
|
// Read the BITMAPFILEHEADER (14 bytes).
|
||||||
@@ -130,10 +130,10 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
|
|||||||
if bits_per_pixel == 0 {
|
if bits_per_pixel == 0 {
|
||||||
if compression == 4 {
|
if compression == 4 {
|
||||||
this.io_redirect_fourcc = 'JPEG'be
|
this.io_redirect_fourcc = 'JPEG'be
|
||||||
return base."@I/O redirect"
|
return base."@metadata reported" // XXX
|
||||||
} else if compression == 5 {
|
} else if compression == 5 {
|
||||||
this.io_redirect_fourcc = 'PNG 'be
|
this.io_redirect_fourcc = 'PNG 'be
|
||||||
return base."@I/O redirect"
|
return base."@metadata reported" // XXX
|
||||||
}
|
}
|
||||||
return "#unsupported BMP file"
|
return "#unsupported BMP file"
|
||||||
} else if bits_per_pixel == 24 {
|
} else if bits_per_pixel == 24 {
|
||||||
|
|||||||
+2
-2
@@ -131,9 +131,9 @@ test_wuffs_bmp_decode_io_redirect() {
|
|||||||
|
|
||||||
wuffs_base__status status =
|
wuffs_base__status status =
|
||||||
wuffs_bmp__decoder__decode_image_config(&dec, NULL, &src);
|
wuffs_bmp__decoder__decode_image_config(&dec, NULL, &src);
|
||||||
if (status.repr != wuffs_base__note__i_o_redirect) {
|
if (status.repr != wuffs_base__note__metadata_reported) { // XXX
|
||||||
RETURN_FAIL("decode_image_config: have \"%s\", want \"%s\"", status.repr,
|
RETURN_FAIL("decode_image_config: have \"%s\", want \"%s\"", status.repr,
|
||||||
wuffs_base__note__i_o_redirect);
|
wuffs_base__note__metadata_reported); // XXX
|
||||||
}
|
}
|
||||||
|
|
||||||
wuffs_base__io_buffer empty = wuffs_base__empty_io_buffer();
|
wuffs_base__io_buffer empty = wuffs_base__empty_io_buffer();
|
||||||
|
|||||||
Reference in new issue
Block a user