summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-06-23 23:15:53 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-06-23 23:15:53 +0200
commit828fe5ce4371432403aaa8c398fe4cb2dca39ddc (patch)
treeb157a789e69c9e6944923d8fc7580e57b0e9d16f
parent79ed95777a2e407e172788366cd886f9fba60a32 (diff)
Cleanup of the skeleton
-rw-r--r--configure.ac72
-rw-r--r--src/conv/text/TextDocumentGenerator.cpp1
-rw-r--r--src/conv/text/TextDocumentGenerator.h1
-rw-r--r--src/lib/libsdw_internal.cpp2
4 files changed, 3 insertions, 73 deletions
diff --git a/configure.ac b/configure.ac
index 51163a5..c5262b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,8 +6,8 @@ AC_PREREQ([2.65])
# Version informations
# ====================
m4_define([libsdw_version_major],[0])
-m4_define([libsdw_version_minor],[2])
-m4_define([libsdw_version_micro],[9])
+m4_define([libsdw_version_minor],[0])
+m4_define([libsdw_version_micro],[0])
m4_define([libsdw_version],[libsdw_version_major.libsdw_version_minor.libsdw_version_micro])
# =============
@@ -69,14 +69,12 @@ AS_CASE([$host],
[*-*-mingw*], [
native_win32=yes
LIBSDW_WIN32_RESOURCE=libsdw-win32res.lo
- LIBSDW_STREAM_WIN32_RESOURCE=libsdw-stream-win32res.lo
SDW2HTML_WIN32_RESOURCE=sdw2html-win32res.lo
SDW2TEXT_WIN32_RESOURCE=sdw2text-win32res.lo
SDW2RAW_WIN32_RESOURCE=sdw2raw-win32res.lo
], [
native_win32=no
LIBSDW_WIN32_RESOURCE=
- LIBSDW_STREAM_WIN32_RESOURCE=
SDW2HTML_WIN32_RESOURCE=
SDW2TEXT_WIN32_RESOURCE=
SDW2RAW_WIN32_RESOURCE=
@@ -84,7 +82,6 @@ AS_CASE([$host],
)
AM_CONDITIONAL(OS_WIN32, [test "x$native_win32" = "xyes"])
AC_SUBST(LIBSDW_WIN32_RESOURCE)
-AC_SUBST(LIBSDW_STREAM_WIN32_RESOURCE)
AC_SUBST(SDW2HTML_WIN32_RESOURCE)
AC_SUBST(SDW2TEXT_WIN32_RESOURCE)
AC_SUBST(SDW2RAW_WIN32_RESOURCE)
@@ -218,70 +215,6 @@ AS_IF([test "x$enable_static_tools" = "xyes"], [
])
AM_CONDITIONAL(STATIC_TOOLS, [test "x$enable_static_tools" = "xyes"])
-# ========
-# shared_ptr implementation
-# ========
-AC_ARG_WITH(sharedptr,
- [AS_HELP_STRING([--with-sharedptr=boost|c++11|tr1],
- [Use Boost|std::memory|std::tr1::memory for shared ptr implementation])],
- [with_sharedptr="$withval"],
- [with_sharedptr=boost]
-)
-AS_CASE([$with_sharedptr],
- [boost|c++11|tr1], [],
- [AC_MSG_ERROR([Unknown value of shared_ptr provider: $with_sharedptr])]
-)
-
-AS_IF([test "x$with_sharedptr" = "xc++11"], [
- AC_MSG_CHECKING([for c++11 shared ptr])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM(
- [[#include <memory>]],
- [[std::shared_ptr<int> p;]]
- )
- ], [
- AC_MSG_RESULT([yes])
- AC_DEFINE([SHAREDPTR_STD],[1],[Use C++11 implementation of shared_ptr])
- ], [
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([Could not find C++11 implementation of shared_ptr])
- ], [
- [#include <memory>]
- ])
-])
-AS_IF([test "x$with_sharedptr" = "xtr1"], [
- AC_MSG_CHECKING([for tr1 shared ptr])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM(
- [[#include <tr1/memory>]],
- [[std::tr1::shared_ptr<int> p;]]
- )
- ], [
- AC_MSG_RESULT([yes])
- AC_DEFINE([SHAREDPTR_TR1],[1],[Use TR1 implementation of shared_ptr])
- ], [
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([Could not find TR1 implementation of shared_ptr])
- ], [
- [#include <tr1/memory>]
- ])
-])
-AS_IF([test "x$with_sharedptr" = "xboost"], [
- AC_MSG_CHECKING([for boost shared ptr])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM(
- [[#include <boost/shared_ptr.hpp>]],
- [[boost::shared_ptr<int> p;]]
- )
- ], [
- AC_MSG_RESULT([yes])
- AC_DEFINE([SHAREDPTR_BOOST],[1],[Use Boost implementation of shared_ptr])
- ], [
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([Could not find Boost implementation of shared_ptr])
- ])
-])
-
# =============
# Documentation
# =============
@@ -335,7 +268,6 @@ Build configuration:
debug: ${enable_debug}
full-debug: ${enable_full_debug}
docs: ${build_docs}
- shared_ptr: ${with_sharedptr}
static-tools: ${enable_static_tools}
werror: ${enable_werror}
==============================================================================
diff --git a/src/conv/text/TextDocumentGenerator.cpp b/src/conv/text/TextDocumentGenerator.cpp
index 35f9db9..868c3ac 100644
--- a/src/conv/text/TextDocumentGenerator.cpp
+++ b/src/conv/text/TextDocumentGenerator.cpp
@@ -26,7 +26,6 @@
#define UCS_TAB 0x0009
TextDocumentGenerator::TextDocumentGenerator(const bool isInfo) :
- m_currentListLevel(0),
m_isInfo(isInfo)
{
}
diff --git a/src/conv/text/TextDocumentGenerator.h b/src/conv/text/TextDocumentGenerator.h
index 929db79..21300f8 100644
--- a/src/conv/text/TextDocumentGenerator.h
+++ b/src/conv/text/TextDocumentGenerator.h
@@ -94,7 +94,6 @@ public:
virtual void insertEquation(const WPXPropertyList & /* propList */, const WPXString & /* data */) {}
private:
- unsigned int m_currentListLevel;
bool m_isInfo;
};
diff --git a/src/lib/libsdw_internal.cpp b/src/lib/libsdw_internal.cpp
index fde7b7d..bfdc6ed 100644
--- a/src/lib/libsdw_internal.cpp
+++ b/src/lib/libsdw_internal.cpp
@@ -54,7 +54,7 @@ uint16_t libsdw::readU16(WPXInputStream *input)
uint8_t const *p = input->read(sizeof(uint16_t), numBytesRead);
if (p && numBytesRead == sizeof(uint16_t))
- return (uint16_t)p[0]|((uint16_t)p[1]<<8);
+ return (uint16_t)((uint16_t)p[0]|((uint16_t)p[1]<<8));
SDW_DEBUG_MSG(("Throwing EndOfStreamException\n"));
throw EndOfStreamException();
}