From a3ad5a57807c1ad866f24af48c44b1b7f6364ce3 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 7 Feb 2016 05:41:48 +0100 Subject: [PATCH] Expose the backends for helper(1) to main() --- tools/backend/contents.c | 6 +----- tools/backend/contents.h | 27 +++++++++++++++++++++++++++ tools/backend/gtkdoc.c | 4 +--- tools/backend/gtkdoc.h | 27 +++++++++++++++++++++++++++ tools/backend/manual.c | 5 +---- tools/backend/manual.h | 27 +++++++++++++++++++++++++++ tools/backend/project.conf | 1 + tools/helper-main.c | 3 +++ tools/project.conf | 3 ++- 9 files changed, 90 insertions(+), 13 deletions(-) create mode 100644 tools/backend/contents.h create mode 100644 tools/backend/gtkdoc.h create mode 100644 tools/backend/manual.h create mode 100644 tools/backend/project.conf diff --git a/tools/backend/contents.c b/tools/backend/contents.c index c13c46a..14f0781 100644 --- a/tools/backend/contents.c +++ b/tools/backend/contents.c @@ -15,11 +15,7 @@ - -/* public */ -/* prototypes */ -int helper_open_contents(Helper * helper, char const * package, - char const * command); +#include "contents.h" /* private */ diff --git a/tools/backend/contents.h b/tools/backend/contents.h new file mode 100644 index 0000000..8fcf8ed --- /dev/null +++ b/tools/backend/contents.h @@ -0,0 +1,27 @@ +/* $Id$ */ +/* Copyright (c) 2016 Pierre Pronchery */ +/* This file is part of DeforaOS Desktop Surfer */ +/* This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 3 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + + + +#ifndef HELPER_BACKEND_CONTENTS_H +# define HELPER_BACKEND_CONTENTS_H + + +/* public */ +/* functions */ +int helper_open_contents(Helper * helper, char const * package, + char const * command); + +#endif /* !HELPER_BACKEND_CONTENTS_H */ diff --git a/tools/backend/gtkdoc.c b/tools/backend/gtkdoc.c index 379bf41..ab3c78e 100644 --- a/tools/backend/gtkdoc.c +++ b/tools/backend/gtkdoc.c @@ -15,9 +15,7 @@ -/* public */ -int helper_open_gtkdoc(Helper * helper, char const * gtkdocdir, - char const * package); +#include "gtkdoc.h" /* private */ diff --git a/tools/backend/gtkdoc.h b/tools/backend/gtkdoc.h new file mode 100644 index 0000000..1d02bce --- /dev/null +++ b/tools/backend/gtkdoc.h @@ -0,0 +1,27 @@ +/* $Id$ */ +/* Copyright (c) 2016 Pierre Pronchery */ +/* This file is part of DeforaOS Desktop Surfer */ +/* This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 3 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + + + +#ifndef HELPER_BACKEND_GTKDOC_H +# define HELPER_BACKEND_GTKDOC_H + + +/* public */ +/* functions */ +int helper_open_gtkdoc(Helper * helper, char const * gtkdocdir, + char const * package); + +#endif /* !HELPER_BACKEND_GTKDOC_H */ diff --git a/tools/backend/manual.c b/tools/backend/manual.c index 9804c33..dac4dfd 100644 --- a/tools/backend/manual.c +++ b/tools/backend/manual.c @@ -15,10 +15,7 @@ -/* public */ -/* prototypes */ -int helper_open_manual(Helper * helper, char const * section, char const * page, - char const * manhtmldir); +#include "manual.h" /* private */ diff --git a/tools/backend/manual.h b/tools/backend/manual.h new file mode 100644 index 0000000..5288fbd --- /dev/null +++ b/tools/backend/manual.h @@ -0,0 +1,27 @@ +/* $Id$ */ +/* Copyright (c) 2016 Pierre Pronchery */ +/* This file is part of DeforaOS Desktop Surfer */ +/* This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 3 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + + + +#ifndef HELPER_BACKEND_MANUAL_H +# define HELPER_BACKEND_MANUAL_H + + +/* public */ +/* functions */ +int helper_open_manual(Helper * helper, char const * section, char const * page, + char const * manhtmldir); + +#endif /* !HELPER_BACKEND_MANUAL_H */ diff --git a/tools/backend/project.conf b/tools/backend/project.conf new file mode 100644 index 0000000..ba4d26a --- /dev/null +++ b/tools/backend/project.conf @@ -0,0 +1 @@ +dist=Makefile,contents.c,contents.h,gtkdoc.c,gtkdoc.h,manual.c,manual.h,search.c diff --git a/tools/helper-main.c b/tools/helper-main.c index a823d8b..593c254 100644 --- a/tools/helper-main.c +++ b/tools/helper-main.c @@ -21,6 +21,9 @@ #include #include #include "helper.h" +#include "backend/contents.h" +#include "backend/gtkdoc.h" +#include "backend/manual.h" #include "../config.h" #define _(string) gettext(string) #define N_(string) string diff --git a/tools/project.conf b/tools/project.conf index 7f94c16..f8b3d62 100644 --- a/tools/project.conf +++ b/tools/project.conf @@ -1,3 +1,4 @@ +subdirs=backend targets=bookmark,helper,htmlapp cppflags_force=-I ../src #cppflags=-D EMBEDDED @@ -5,7 +6,7 @@ cflags_force=`pkg-config --cflags libDesktop` cflags=-W -Wall -g -O2 -pedantic -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector-all ldflags_force=`pkg-config --libs libDesktop` ldflags=-Wl,-pie -Wl,-z,relro -Wl,-z,now -dist=Makefile,backend/contents.c,backend/gtkdoc.c,backend/manual.c,backend/search.c,helper.h +dist=Makefile,helper.h [bookmark] type=binary