diff options
author | Vincent Sanders <vince@kyllikki.org> | 2017-12-24 10:06:04 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2017-12-24 10:06:04 +0000 |
commit | 0c29558f8caf51da6c4258fbd1ebfa341af5aab9 (patch) | |
tree | e9831771710d81ee4e374d9449c856f0700ed191 /src/cos_object.h | |
parent | 897a8900bf77db2d804b0f78bc4b41371e05347f (diff) | |
download | libnspdf-0c29558f8caf51da6c4258fbd1ebfa341af5aab9.tar.gz libnspdf-0c29558f8caf51da6c4258fbd1ebfa341af5aab9.tar.bz2 |
clean up error handling and start decoding of indirect objects
Diffstat (limited to 'src/cos_object.h')
-rw-r--r-- | src/cos_object.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/cos_object.h b/src/cos_object.h index 65b3ed5..8d1449d 100644 --- a/src/cos_object.h +++ b/src/cos_object.h @@ -83,7 +83,12 @@ struct cos_object { } u; }; -int cos_decode_object(struct pdf_doc *doc, uint64_t *offset_out, struct cos_object **cosobj_out); +/** + * Decode input stream into an object + * + * lex and parse a byte stream to generate a COS object. + */ +nspdferror cos_decode_object(struct pdf_doc *doc, uint64_t *offset_out, struct cos_object **cosobj_out); nspdferror cos_free_object(struct cos_object *cos_obj); @@ -91,8 +96,9 @@ nspdferror cos_dictionary_get_value(struct cos_object *dict, const char *key, st nspdferror cos_dictionary_extract_value(struct cos_object *dict, const char *key, struct cos_object **value_out); -nspdferror cos_get_int(struct cos_object *cobj, int64_t *value_out); -nspdferror cos_get_dictionary(struct cos_object *cobj, struct cos_object **value_out); +nspdferror cos_get_int(struct pdf_doc *doc, struct cos_object *cobj, int64_t *value_out); + +nspdferror cos_get_dictionary(struct pdf_doc *doc, struct cos_object *cobj, struct cos_object **value_out); |