summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/luapplib/ppload.h
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luapplib/ppload.h')
-rw-r--r--Build/source/texk/web2c/luatexdir/luapplib/ppload.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luapplib/ppload.h b/Build/source/texk/web2c/luatexdir/luapplib/ppload.h
new file mode 100644
index 00000000000..16392839893
--- /dev/null
+++ b/Build/source/texk/web2c/luatexdir/luapplib/ppload.h
@@ -0,0 +1,54 @@
+
+#ifndef PP_LOAD_H
+#define PP_LOAD_H
+
+typedef struct {
+ ppobj *buf; // ppobjects buffer (allocated, not from our heap)
+ ppobj *pos; // current ppobj *
+ size_t size; // stack size
+ size_t space; // available space
+ ppheap **pheap; // allocator (parent pdf->stack->pheap or own)
+} ppstack;
+
+typedef struct {
+ ppobj *current;
+ ppobj *sentinel;
+} ppkids;
+
+#define PPPAGES_STACK_DEPTH 4
+
+typedef struct {
+ ppkids buffer[PPPAGES_STACK_DEPTH];
+ ppkids *root;
+ ppkids *parent;
+ ppuint depth;
+ ppuint space;
+} pppages;
+
+struct ppdoc {
+ char version[5];
+ iof_file input;
+ iof reader;
+ uint8_t *buffer;
+ size_t filesize;
+ ppxref *xref;
+ ppheap *heap;
+ ppstack stack;
+ pppages pages;
+ int flags;
+ ppcrypt *crypt;
+ ppcrypt_status cryptstatus;
+};
+
+#define PPDOC_LINEARIZED (1 << 0)
+
+ppobj * ppdoc_load_entry (ppdoc *pdf, ppref *ref);
+#define ppobj_preloaded(pdf, obj) ((obj)->type != PPREF ? (obj) : ((obj)->ref->object.type == PPNONE ? ppdoc_load_entry(pdf, (obj)->ref) : &(obj)->ref->object))
+ppstring ppstring_internal (const void *data, size_t size, ppheap **pheap);
+
+struct ppcontext {
+ ppheap *heap;
+ ppstack stack;
+};
+
+#endif \ No newline at end of file