Temporarily avoid using base."@I/O redirect"

This commit (and the next) will soon be followed by a rollback.
This commit is contained in:
Nigel Tao committed 2020-05-29 09:53:30 +10:00
1 parent 302afb7ce5
commit 844fc9b5ee
3 files changed
+8 -8

No files matched your search

+3 -3
View File
@@ -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);
goto exit;
} 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;
}
{
@@ -12557,11 +12557,11 @@ wuffs_bmp__decoder__decode_image_config(wuffs_bmp__decoder* self,
if (v_bits_per_pixel == 0) {
if (v_compression == 4) {
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;
} else if (v_compression == 5) {
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;
}
status = wuffs_base__make_status(wuffs_bmp__error__unsupported_bmp_file);
+3 -3
View 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) {
return base."#bad call sequence"
} else if this.io_redirect_fourcc <> 0 {
return base."@I/O redirect"
return base."@metadata reported" // XXX
}
// 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 compression == 4 {
this.io_redirect_fourcc = 'JPEG'be
return base."@I/O redirect"
return base."@metadata reported" // XXX
} else if compression == 5 {
this.io_redirect_fourcc = 'PNG 'be
return base."@I/O redirect"
return base."@metadata reported" // XXX
}
return "#unsupported BMP file"
} else if bits_per_pixel == 24 {
+2 -2
View File
@@ -131,9 +131,9 @@ test_wuffs_bmp_decode_io_redirect() {
wuffs_base__status status =
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,
wuffs_base__note__i_o_redirect);
wuffs_base__note__metadata_reported); // XXX
}
wuffs_base__io_buffer empty = wuffs_base__empty_io_buffer();