Add a decoder.decode_lsd skeleton.

This commit is contained in:
Nigel Tao committed 2017-06-18 09:45:09 +10:00
1 parent 2543999c61
commit 8d1bf15d70
5 files changed
+35 -7

No files matched your search

+9
View File
@@ -11,9 +11,12 @@ pub struct decoder?(
pub func decoder.decode?(dst ptr buf1, src ptr buf1)() {
this.decode_header?(src:in.src)
this.decode_lsd?(src:in.src)
}
// decode_header reads either "GIF87a" or "GIF89a".
//
// See the spec section 17 "Header" on page 7.
pri func decoder.decode_header?(src ptr buf1)() {
var c[6] u8
var i u8
@@ -26,3 +29,9 @@ pri func decoder.decode_header?(src ptr buf1)() {
return error "bad GIF header"
}
}
// decode_lsd reads the Logical Screen Descriptor.
//
// See the spec section 18 "Logical Screen Descriptor" on page 8.
pri func decoder.decode_lsd?(src ptr buf1)() {
}