From 4b4f56795433ddac38be8a4796deda57e3c50ec9 Mon Sep 17 00:00:00 2001 From: Maxim Kupriianov Date: Tue, 10 Oct 2017 18:38:17 +0300 Subject: [PATCH] Initial commit. --- .gitignore | 2 ++ Makefile | 9 +++++++++ mupdf.yml | 31 +++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 mupdf.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..71b2bb7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +var/ +.DS_Store diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c2d241c --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +all: + c-for-go mupdf.yml + +clean: + rm -f mupdf/cgo_helpers.go mupdf/cgo_helpers.h mupdf/doc.go mupdf/types.go + rm -f mupdf/mupdf.go + +test: + cd mupdf && go build \ No newline at end of file diff --git a/mupdf.yml b/mupdf.yml new file mode 100644 index 0000000..41ea6c5 --- /dev/null +++ b/mupdf.yml @@ -0,0 +1,31 @@ +--- +GENERATOR: + PackageName: mupdf + PackageDescription: "Package mupdf provides Go bindings." + PackageLicense: "THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS." + Includes: [mupdf/pdf.h, mupdf/fitz.h] + +PARSER: + IncludePaths: [/usr/include] + SourcesPaths: [mupdf/mupdf.h, mupdf/fitz.h] + +TRANSLATOR: + PtrTips: + function: + # - {target: ^mupdf_decode_frame, tips: [ref,0,0,ref]} + # - {target: ^mupdf_, tips: [ref]} + Rules: + global: + - {transform: lower} + - {action: accept, from: "(?i)fz_"} + - {action: replace, from: "fz_", to: _} + - {action: accept, from: "(?i)pdf_"} + - {action: replace, from: "pdf_", to: _} + - {transform: export} + type: + - {action: replace, from: "_t$"} + private: + - {transform: unexport} + post-global: + - {action: replace, from: _$} + - {load: snakecase}