[PPL-devel] [GIT] ppl/ppl(master): Added missing header file and inclusions.
Roberto Bagnara
roberto.bagnara at bugseng.com
Sat Nov 29 20:08:18 CET 2014
Module: ppl/ppl
Branch: master
Commit: 3a30bffb1c73c16dcc2e1bf96527a8749dac4f45
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=3a30bffb1c73c16dcc2e1bf96527a8749dac4f45
Author: Roberto Bagnara <roberto.bagnara at bugseng.com>
Date: Sat Nov 29 20:07:49 2014 +0100
Added missing header file and inclusions.
---
interfaces/Prolog/SWI/Makefile.am | 1 +
interfaces/Prolog/SWI/pl_clpq.cc | 10 +++-----
.../SWI/ppl_interface_generator_swiprolog_cc.m4 | 7 +++--
interfaces/Prolog/SWI/ppl_pl.cc | 10 +++-----
interfaces/Prolog/SWI/ppl_swiprolog.hh | 22 ++++++++++++++++++++
5 files changed, 35 insertions(+), 15 deletions(-)
diff --git a/interfaces/Prolog/SWI/Makefile.am b/interfaces/Prolog/SWI/Makefile.am
index 529aa5c..9a33098 100644
--- a/interfaces/Prolog/SWI/Makefile.am
+++ b/interfaces/Prolog/SWI/Makefile.am
@@ -74,6 +74,7 @@ pkglib_LTLIBRARIES = libppl_swiprolog.la
libppl_swiprolog_la_SOURCES = \
ppl_prolog_sysdep.hh \
+ppl_swiprolog.hh \
swi_efli.hh \
swi_efli.cc
diff --git a/interfaces/Prolog/SWI/pl_clpq.cc b/interfaces/Prolog/SWI/pl_clpq.cc
index a287134..ebdd698 100644
--- a/interfaces/Prolog/SWI/pl_clpq.cc
+++ b/interfaces/Prolog/SWI/pl_clpq.cc
@@ -21,10 +21,8 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
For the most up-to-date information see the Parma Polyhedra Library
site: http://bugseng.com/products/ppl/ . */
-#include <SWI-Prolog.h>
-
-extern "C" install_t install();
-extern "C" install_t uninstall();
+#include "ppl_swiprolog.hh"
+#include "swi_cfli.hh"
int
main(int, char** argv) {
@@ -39,10 +37,10 @@ main(int, char** argv) {
if (!PL_initialise(1, pl_args))
PL_halt(1);
- install();
+ install_libppl_swiprolog();
predicate_t pred = PL_predicate("main", 0, "user");
term_t h0 = PL_new_term_refs(0);
int ret_val = PL_call_predicate(0, PL_Q_NORMAL, pred, h0);
- uninstall();
+ uninstall_libppl_swiprolog();
PL_halt(ret_val ? 0 : 1);
}
diff --git a/interfaces/Prolog/SWI/ppl_interface_generator_swiprolog_cc.m4 b/interfaces/Prolog/SWI/ppl_interface_generator_swiprolog_cc.m4
index 5680f65..b108b7b 100644
--- a/interfaces/Prolog/SWI/ppl_interface_generator_swiprolog_cc.m4
+++ b/interfaces/Prolog/SWI/ppl_interface_generator_swiprolog_cc.m4
@@ -32,9 +32,10 @@ m4_include(`ppl_interface_generator_copyright')`'dnl
*/
#include "../ppl_prolog_domains.hh"
+#include "ppl_swiprolog.hh"
#define PL_EXTENSION_ENTRY(name, arity) \
- { #name, arity, static_cast<pl_function_t>(name), 0 },
+ { #name, arity, reinterpret_cast<pl_function_t>(name), 0 },
namespace {
@@ -46,13 +47,13 @@ m4_divert(1)dnl
} // namespace
extern "C" install_t
-install() {
+install_libppl_swiprolog() {
ppl_initialize();
PL_register_extensions(predicates);
}
extern "C" install_t
-uninstall() {
+uninstall_libppl_swiprolog() {
ppl_finalize();
}
m4_divert(-1)
diff --git a/interfaces/Prolog/SWI/ppl_pl.cc b/interfaces/Prolog/SWI/ppl_pl.cc
index c333362..86c35cd 100644
--- a/interfaces/Prolog/SWI/ppl_pl.cc
+++ b/interfaces/Prolog/SWI/ppl_pl.cc
@@ -21,10 +21,8 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
For the most up-to-date information see the Parma Polyhedra Library
site: http://bugseng.com/products/ppl/ . */
-#include <SWI-Prolog.h>
-
-extern "C" install_t install();
-extern "C" install_t uninstall();
+#include "ppl_swiprolog.hh"
+#include "swi_cfli.hh"
int
main(int argc, char **argv) {
@@ -37,8 +35,8 @@ main(int argc, char **argv) {
PL_halt(1);
PL_install_readline();
- install();
+ install_libppl_swiprolog();
int ret_val = PL_toplevel();
- uninstall();
+ uninstall_libppl_swiprolog();
PL_halt(ret_val ? 0 : 1);
}
diff --git a/interfaces/Prolog/SWI/ppl_swiprolog.hh b/interfaces/Prolog/SWI/ppl_swiprolog.hh
new file mode 100644
index 0000000..7339a0d
--- /dev/null
+++ b/interfaces/Prolog/SWI/ppl_swiprolog.hh
@@ -0,0 +1,22 @@
+/* Copyright (C) 2001-2010 Roberto Bagnara <bagnara at cs.unipr.it>
+ Copyright (C) 2010-2014 BUGSENG srl (http://bugseng.com)
+
+This file is free software; as a special exception the author gives
+unlimited permission to copy and/or distribute it, with or without
+modifications, as long as this notice is preserved.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE. */
+
+#ifndef PPL_ppl_swiprolog_hh
+#define PPL_ppl_swiprolog_hh 1
+
+#include "swi_cfli.hh"
+
+extern "C" install_t install_libppl_swiprolog();
+
+extern "C" install_t uninstall_libppl_swiprolog();
+
+#endif // !defined(PPL_ppl_swiprolog_hh)
More information about the PPL-devel
mailing list