diff --git a/src/runtime/c/Makefile.am b/src/runtime/c/Makefile.am index 213be21e2..07dbe5f42 100644 --- a/src/runtime/c/Makefile.am +++ b/src/runtime/c/Makefile.am @@ -3,21 +3,21 @@ lib_LTLIBRARIES = libpgf.la pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libpgf.pc -pgfincludedir=$(includedir) +pgfincludedir=$(includedir)/pgf pgfinclude_HEADERS = \ - pgf.h + pgf/pgf.h libpgf_la_SOURCES = \ - db.cxx \ - db.h \ - text.cxx \ - text.h \ - pgf.cxx \ - reader.cxx \ - reader.h \ - data.h \ - expr.h \ - namespace.h + pgf/db.cxx \ + pgf/db.h \ + pgf/text.cxx \ + pgf/text.h \ + pgf/pgf.cxx \ + pgf/reader.cxx \ + pgf/reader.h \ + pgf/data.h \ + pgf/expr.h \ + pgf/namespace.h libpgf_la_LDFLAGS = "-no-undefined" diff --git a/src/runtime/c/data.h b/src/runtime/c/pgf/data.h similarity index 100% rename from src/runtime/c/data.h rename to src/runtime/c/pgf/data.h diff --git a/src/runtime/c/db.cxx b/src/runtime/c/pgf/db.cxx similarity index 100% rename from src/runtime/c/db.cxx rename to src/runtime/c/pgf/db.cxx diff --git a/src/runtime/c/db.h b/src/runtime/c/pgf/db.h similarity index 100% rename from src/runtime/c/db.h rename to src/runtime/c/pgf/db.h diff --git a/src/runtime/c/expr.h b/src/runtime/c/pgf/expr.h similarity index 100% rename from src/runtime/c/expr.h rename to src/runtime/c/pgf/expr.h diff --git a/src/runtime/c/namespace.h b/src/runtime/c/pgf/namespace.h similarity index 100% rename from src/runtime/c/namespace.h rename to src/runtime/c/pgf/namespace.h diff --git a/src/runtime/c/pgf.cxx b/src/runtime/c/pgf/pgf.cxx similarity index 100% rename from src/runtime/c/pgf.cxx rename to src/runtime/c/pgf/pgf.cxx diff --git a/src/runtime/c/pgf.h b/src/runtime/c/pgf/pgf.h similarity index 100% rename from src/runtime/c/pgf.h rename to src/runtime/c/pgf/pgf.h diff --git a/src/runtime/c/reader.cxx b/src/runtime/c/pgf/reader.cxx similarity index 100% rename from src/runtime/c/reader.cxx rename to src/runtime/c/pgf/reader.cxx diff --git a/src/runtime/c/reader.h b/src/runtime/c/pgf/reader.h similarity index 100% rename from src/runtime/c/reader.h rename to src/runtime/c/pgf/reader.h diff --git a/src/runtime/c/text.cxx b/src/runtime/c/pgf/text.cxx similarity index 100% rename from src/runtime/c/text.cxx rename to src/runtime/c/pgf/text.cxx diff --git a/src/runtime/c/text.h b/src/runtime/c/pgf/text.h similarity index 100% rename from src/runtime/c/text.h rename to src/runtime/c/pgf/text.h diff --git a/src/runtime/c/vector.h b/src/runtime/c/pgf/vector.h similarity index 100% rename from src/runtime/c/vector.h rename to src/runtime/c/pgf/vector.h diff --git a/src/runtime/haskell/PGF2.hsc b/src/runtime/haskell/PGF2.hsc index 93eebaf22..fd97dc2bd 100644 --- a/src/runtime/haskell/PGF2.hsc +++ b/src/runtime/haskell/PGF2.hsc @@ -41,7 +41,7 @@ import Data.Typeable import qualified Data.Map as Map import Data.IORef -#include +#include type AbsName = String -- ^ Name of abstract syntax type ConcName = String -- ^ Name of concrete syntax diff --git a/src/runtime/haskell/PGF2/FFI.hsc b/src/runtime/haskell/PGF2/FFI.hsc index 47f7b269c..f451cb25f 100644 --- a/src/runtime/haskell/PGF2/FFI.hsc +++ b/src/runtime/haskell/PGF2/FFI.hsc @@ -9,7 +9,7 @@ import Foreign.Ptr import Foreign.ForeignPtr import qualified Data.Map as Map -#include +#include -- | An abstract data type representing multilingual grammar -- in Portable Grammar Format. diff --git a/src/runtime/haskell/pgf2.cabal b/src/runtime/haskell/pgf2.cabal index 2b1eaef4f..b16b383b7 100644 --- a/src/runtime/haskell/pgf2.cabal +++ b/src/runtime/haskell/pgf2.cabal @@ -25,7 +25,6 @@ library extra-libraries: pgf cc-options: -std=c99 - c-sources: utils.c test-suite basic type: exitcode-stdio-1.0 diff --git a/src/runtime/python/pypgf.c b/src/runtime/python/pypgf.c index d4b9b0f02..6c145b3be 100644 --- a/src/runtime/python/pypgf.c +++ b/src/runtime/python/pypgf.c @@ -2,7 +2,7 @@ #include #include "structmember.h" -#include +#include #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject @@ -3521,7 +3521,7 @@ pgf_readPGF(PyObject *self, PyObject *args) return NULL; } else if (err.type == PGF_EXN_PGF_ERROR) { PyErr_SetString(PGFError, err.msg); - free(err.msg); + free((char*) err.msg); Py_DECREF(py_pgf); return NULL; }