diff options
author | Vincent Sanders <vince@kyllikki.org> | 2018-01-19 23:55:30 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2018-01-19 23:55:30 +0000 |
commit | e9d3ec85ad043523a47c0eef2a1662e79184e3b3 (patch) | |
tree | f8a08ba1cc125a2a18c8f9719fb73fc5b8977f3e /src/xref.h | |
parent | a686f1b43b9474376d6bf52352d2b82b4e618769 (diff) | |
download | libnspdf-e9d3ec85ad043523a47c0eef2a1662e79184e3b3.tar.gz libnspdf-e9d3ec85ad043523a47c0eef2a1662e79184e3b3.tar.bz2 |
convert to using stream offset type for stream offsets
Diffstat (limited to 'src/xref.h')
-rw-r--r-- | src/xref.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/xref.h b/src/xref.h new file mode 100644 index 0000000..e53f2b2 --- /dev/null +++ b/src/xref.h @@ -0,0 +1,39 @@ +/* + * Copyright 2018 Vincent Sanders <vince@netsurf-browser.org> + * + * This file is part of libnspdf. + * + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + */ + +/** + * \file + * NetSurf PDF library cross reference table handling + */ + +#ifndef NSPDF__XREF_H_ +#define NSPDF__XREF_H_ + +#include "cos_stream.h" + +struct nspdf_doc; +struct cos_object; + +/** + * parse xref from file + */ +nspdferror nspdf__xref_parse(struct nspdf_doc *doc, struct cos_stream *stream, strmoff_t *offset_out); + + +/** + * get an object dereferencing through xref table if necessary + */ +nspdferror nspdf__xref_get_referenced(struct nspdf_doc *doc, struct cos_object **cobj_out); + +/** + * allocate storage for cross reference table + */ +nspdferror nspdf__xref_allocate(struct nspdf_doc *doc, int64_t size); + +#endif |