mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 00:47:28 +01:00
Add user-defined error and status codes.
This commit is contained in:
1 parent
90e49caf51
commit
3863427127
10 files changed
+282
-42
No files matched your search
@@ -1,6 +1,10 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be found
|
||||
// in the LICENSE file.
|
||||
|
||||
// TODO: some mechanism for fixing the error code's value, such as a trailing
|
||||
// "= 100", to maintain API stability.
|
||||
pub error "bad GIF image"
|
||||
|
||||
pub struct lzw_decoder?(
|
||||
literal_width u32[2..8] = 8,
|
||||
stack[4096] u8,
|
||||
@@ -40,6 +44,8 @@ pub func lzw_decoder.decode?(dst ptr buf1, src ptr buf1, src_final bool)() {
|
||||
continue
|
||||
} else if code == end_code {
|
||||
return
|
||||
} else {
|
||||
return error "bad GIF image"
|
||||
}
|
||||
|
||||
// TODO: implement.
|
||||
|
||||
Reference in new issue
Block a user