summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2018-01-08 22:10:32 +0000
committerVincent Sanders <vince@kyllikki.org>2018-01-08 22:10:32 +0000
commit615323e574ffcecd8525711c39beffcac4156624 (patch)
tree8d1883b3d789def986a2cce25b97991ac2940985
parent119b565de393fdd797e1a3c4f629c936092e9091 (diff)
downloadlibnspdf-615323e574ffcecd8525711c39beffcac4156624.tar.gz
libnspdf-615323e574ffcecd8525711c39beffcac4156624.tar.bz2
fix header guards and copyright notices
-rw-r--r--src/byte_class.c9
-rw-r--r--src/byte_class.h19
-rw-r--r--src/cos_object.c2
-rw-r--r--src/cos_object.h20
-rw-r--r--src/cos_parse.c9
-rw-r--r--src/cos_parse.h18
-rw-r--r--src/pdf_doc.h18
7 files changed, 94 insertions, 1 deletions
diff --git a/src/byte_class.c b/src/byte_class.c
index e881cf5..fff0965 100644
--- a/src/byte_class.c
+++ b/src/byte_class.c
@@ -1,3 +1,12 @@
+/*
+ * 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
+ */
+
#include <stdint.h>
#include "byte_class.h"
diff --git a/src/byte_class.h b/src/byte_class.h
index 0ccfbdf..0f81331 100644
--- a/src/byte_class.h
+++ b/src/byte_class.h
@@ -1,3 +1,20 @@
+/*
+ * 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 byte classification
+ */
+
+#ifndef NSPDF__BYTE_CLASS_H_
+#define NSPDF__BYTE_CLASS_H_
+
#define BC_RGLR 0 /* regular character */
#define BC_WSPC 1 /* character is whitespace */
#define BC_EOLM (1<<1) /* character signifies end of line */
@@ -8,3 +25,5 @@
#define BC_CMNT (1<<6) /* character is a comment */
const uint8_t *bclass;
+
+#endif
diff --git a/src/cos_object.c b/src/cos_object.c
index 335e14b..b4de0f6 100644
--- a/src/cos_object.c
+++ b/src/cos_object.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Vincent Sanders <vince@netsurf-browser.org>
+ * Copyright 2018 Vincent Sanders <vince@netsurf-browser.org>
*
* This file is part of libnspsl
*
diff --git a/src/cos_object.h b/src/cos_object.h
index 8d0f910..b90ef15 100644
--- a/src/cos_object.h
+++ b/src/cos_object.h
@@ -1,3 +1,20 @@
+/*
+ * 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 COS objects
+ */
+
+#ifndef NSPDF__COS_OBJECT_H_
+#define NSPDF__COS_OBJECT_H_
+
struct nspdf_doc;
enum cos_type {
@@ -240,3 +257,6 @@ nspdferror cos_get_array(struct nspdf_doc *doc, struct cos_object *cobj, struct
* NSERROR_TYPE if the \p cobj is not a array
*/
nspdferror cos_get_stream(struct nspdf_doc *doc, struct cos_object *cobj, struct cos_stream **stream_out);
+
+
+#endif
diff --git a/src/cos_parse.c b/src/cos_parse.c
index 8fe181c..5448ad4 100644
--- a/src/cos_parse.c
+++ b/src/cos_parse.c
@@ -1,3 +1,12 @@
+/*
+ * 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
+ */
+
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
diff --git a/src/cos_parse.h b/src/cos_parse.h
index adfb835..0bca79f 100644
--- a/src/cos_parse.h
+++ b/src/cos_parse.h
@@ -1,3 +1,20 @@
+/*
+ * 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 parsing cos objects from file
+ */
+
+#ifndef NSPDF__COS_PARSE_H_
+#define NSPDF__COS_PARSE_H_
+
struct nspdf_doc;
struct cos_object;
@@ -8,3 +25,4 @@ struct cos_object;
*/
nspdferror cos_parse_object(struct nspdf_doc *doc, uint64_t *offset_out, struct cos_object **cosobj_out);
+#endif
diff --git a/src/pdf_doc.h b/src/pdf_doc.h
index 5c25878..b7e6546 100644
--- a/src/pdf_doc.h
+++ b/src/pdf_doc.h
@@ -1,3 +1,19 @@
+/*
+ * 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 pdf document
+ */
+
+#ifndef NSPDF__PDF_DOC_H_
+#define NSPDF__PDF_DOC_H_
struct xref_table_entry;
struct page_table_entry;
@@ -48,3 +64,5 @@ nspdferror nspdf__xref_get_referenced(struct nspdf_doc *doc, struct cos_object *
nspdferror nspdf__xref_allocate(struct nspdf_doc *doc, int64_t size);
nspdferror nspdf__decode_page_tree(struct nspdf_doc *doc, struct cos_object *page_tree_node, unsigned int *page_index);
+
+#endif