summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-04-01 07:10:50 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-04-01 07:17:49 +0200
commitfb3cfd40f095b7e80661b19e47e0f4dcff42d33b (patch)
treec8754d27898f0cce0f3a86818d7f46d6d7a42d60
parentf850123e8987517a0048d9de0974b758e2f30bee (diff)
Restructure source tree
Some simple code-moves: shl => src/shared/ tsm => src/tsm/ ..and also move the ./docs/ files into the source tree. This will make the tree much easier to grasp once we add more tools like gtktsm. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
-rw-r--r--.gitignore2
-rw-r--r--Makefile.am50
-rw-r--r--configure.ac4
-rw-r--r--src/shared/shl_array.h (renamed from src/shl_array.h)0
-rw-r--r--src/shared/shl_htable.c (renamed from src/shl_htable.c)0
-rw-r--r--src/shared/shl_htable.h (renamed from src/shl_htable.h)0
-rw-r--r--src/shared/shl_llog.h (renamed from src/shl_llog.h)0
-rw-r--r--src/tsm/libtsm-int.h (renamed from src/libtsm_int.h)0
-rw-r--r--src/tsm/libtsm.h (renamed from src/libtsm.h)0
-rw-r--r--src/tsm/libtsm.pc.in (renamed from docs/libtsm.pc.in)0
-rw-r--r--src/tsm/libtsm.sym (renamed from docs/libtsm.sym)0
-rw-r--r--src/tsm/tsm-render.c (renamed from src/tsm_render.c)4
-rw-r--r--src/tsm/tsm-screen.c (renamed from src/tsm_screen.c)4
-rw-r--r--src/tsm/tsm-selection.c (renamed from src/tsm_selection.c)4
-rw-r--r--src/tsm/tsm-unicode.c (renamed from src/tsm_unicode.c)2
-rw-r--r--src/tsm/tsm-vte-charsets.c (renamed from src/tsm_vte_charsets.c)2
-rw-r--r--src/tsm/tsm-vte.c (renamed from src/tsm_vte.c)4
-rw-r--r--test.supp15
-rw-r--r--test/test_common.h4
19 files changed, 57 insertions, 38 deletions
diff --git a/.gitignore b/.gitignore
index 189bb81..623c492 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,9 +20,9 @@ config.h.in~
config.log
config.status
configure
-docs/libtsm.pc
libtool
m4/
+src/tsm/libtsm.pc
stamp-h1
test-suite.log
test_htable
diff --git a/Makefile.am b/Makefile.am
index 10f5994..66fc904 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,9 +31,7 @@ EXTRA_DIST = \
README \
COPYING \
LICENSE_htable \
- NEWS \
- docs/libtsm.pc.in \
- docs/libtsm.sym
+ NEWS
CLEANFILES =
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =
@@ -69,7 +67,8 @@ AM_CFLAGS = \
-fdata-sections
AM_CPPFLAGS = \
-include $(top_builddir)/config.h \
- -I $(srcdir)/src
+ -I $(srcdir)/src \
+ -I $(srcdir)/src/shared
AM_LDFLAGS =
if BUILD_HAVE_GNU_LD
@@ -106,10 +105,10 @@ endif
noinst_LTLIBRARIES += libshl.la
libshl_la_SOURCES = \
- src/shl_array.h \
- src/shl_htable.h \
- src/shl_htable.c \
- src/shl_llog.h
+ src/shared/shl_array.h \
+ src/shared/shl_htable.h \
+ src/shared/shl_htable.c \
+ src/shared/shl_llog.h
libshl_la_CPPFLAGS = $(AM_CPPFLAGS)
libshl_la_LDFLAGS = $(AM_LDFLAGS)
libshl_la_LIBADD = $(AM_LIBADD)
@@ -120,19 +119,22 @@ libshl_la_LIBADD = $(AM_LIBADD)
#
lib_LTLIBRARIES += libtsm.la
-noinst_LTLIBRARIES += libtsm_test.la
-include_HEADERS += src/libtsm.h
-pkgconfig_DATA += docs/libtsm.pc
+noinst_LTLIBRARIES += libtsm-test.la
+include_HEADERS += src/tsm/libtsm.h
+pkgconfig_DATA += src/tsm/libtsm.pc
+EXTRA_DIST += \
+ src/tsm/libtsm.pc.in \
+ src/tsm/libtsm.sym
libtsm_la_SOURCES = \
- src/libtsm.h \
- src/libtsm_int.h \
- src/tsm_unicode.c \
- src/tsm_screen.c \
- src/tsm_selection.c \
- src/tsm_render.c \
- src/tsm_vte.c \
- src/tsm_vte_charsets.c \
+ src/tsm/libtsm.h \
+ src/tsm/libtsm-int.h \
+ src/tsm/tsm-render.c \
+ src/tsm/tsm-screen.c \
+ src/tsm/tsm-selection.c \
+ src/tsm/tsm-unicode.c \
+ src/tsm/tsm-vte.c \
+ src/tsm/tsm-vte-charsets.c \
external/wcwidth.h \
external/wcwidth.c \
external/xkbcommon-keysyms.h
@@ -144,7 +146,7 @@ libtsm_test_la_CPPFLAGS = $(AM_CPPFLAGS)
libtsm_la_LIBADD = libshl.la
libtsm_test_la_LIBADD = libshl.la
-EXTRA_libtsm_la_DEPENDENCIES = $(top_srcdir)/docs/libtsm.sym
+EXTRA_libtsm_la_DEPENDENCIES = $(top_srcdir)/src/tsm/libtsm.sym
libtsm_la_LDFLAGS = \
$(AM_LDFLAGS) \
@@ -152,7 +154,7 @@ libtsm_la_LDFLAGS = \
if BUILD_HAVE_GNU_LD
libtsm_la_LDFLAGS += \
- -Wl,--version-script="$(top_srcdir)/docs/libtsm.sym"
+ -Wl,--version-script="$(top_srcdir)/src/tsm/libtsm.sym"
endif
libtsm_test_la_LDFLAGS = \
@@ -191,7 +193,7 @@ test_sources = \
test/test_common.h
test_libs = \
libshl.la \
- libtsm_test.la \
+ libtsm-test.la \
$(CHECK_LIBS)
test_cflags = \
$(AM_CPPFLAGS) \
@@ -214,7 +216,9 @@ test_valgrind_CPPFLAGS = $(test_cflags)
test_valgrind_LDADD = $(test_libs)
test_valgrind_LDFLAGS = $(test_lflags)
-VALGRIND = CK_FORK=no valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --leak-resolution=high --error-exitcode=1
+EXTRA_DIST += test.supp
+
+VALGRIND = CK_FORK=no valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --leak-resolution=high --error-exitcode=1 --suppressions=$(top_builddir)/test.supp
# verify that test_valgrind actually leaks data
memcheck-verify: check
diff --git a/configure.ac b/configure.ac
index 9b4d02f..6aeeafa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +10,7 @@ AC_INIT([libtsm],
[http://bugs.freedesktop.org/enter_bug.cgi?product=kmscon],
[libtsm],
[http://www.freedesktop.org/wiki/Software/kmscon/libtsm])
-AC_CONFIG_SRCDIR([src/tsm_vte.c])
+AC_CONFIG_SRCDIR([src/tsm/libtsm.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER(config.h)
@@ -141,7 +141,7 @@ AM_CONDITIONAL([BUILD_IS_DARWIN],
#
AC_CONFIG_FILES([Makefile
- docs/libtsm.pc])
+ src/tsm/libtsm.pc])
AC_OUTPUT
#
diff --git a/src/shl_array.h b/src/shared/shl_array.h
index f776807..f776807 100644
--- a/src/shl_array.h
+++ b/src/shared/shl_array.h
diff --git a/src/shl_htable.c b/src/shared/shl_htable.c
index e79a7c0..e79a7c0 100644
--- a/src/shl_htable.c
+++ b/src/shared/shl_htable.c
diff --git a/src/shl_htable.h b/src/shared/shl_htable.h
index 9591180..9591180 100644
--- a/src/shl_htable.h
+++ b/src/shared/shl_htable.h
diff --git a/src/shl_llog.h b/src/shared/shl_llog.h
index 1dd4a3c..1dd4a3c 100644
--- a/src/shl_llog.h
+++ b/src/shared/shl_llog.h
diff --git a/src/libtsm_int.h b/src/tsm/libtsm-int.h
index 9de690e..9de690e 100644
--- a/src/libtsm_int.h
+++ b/src/tsm/libtsm-int.h
diff --git a/src/libtsm.h b/src/tsm/libtsm.h
index d9f30cd..d9f30cd 100644
--- a/src/libtsm.h
+++ b/src/tsm/libtsm.h
diff --git a/docs/libtsm.pc.in b/src/tsm/libtsm.pc.in
index cc1aa6f..cc1aa6f 100644
--- a/docs/libtsm.pc.in
+++ b/src/tsm/libtsm.pc.in
diff --git a/docs/libtsm.sym b/src/tsm/libtsm.sym
index e5acf02..e5acf02 100644
--- a/docs/libtsm.sym
+++ b/src/tsm/libtsm.sym
diff --git a/src/tsm_render.c b/src/tsm/tsm-render.c
index 03cbbbf..7e365f9 100644
--- a/src/tsm_render.c
+++ b/src/tsm/tsm-render.c
@@ -36,10 +36,10 @@
#include <stdlib.h>
#include <string.h>
#include "libtsm.h"
-#include "libtsm_int.h"
+#include "libtsm-int.h"
#include "shl_llog.h"
-#define LLOG_SUBSYSTEM "tsm_render"
+#define LLOG_SUBSYSTEM "tsm-render"
SHL_EXPORT
tsm_age_t tsm_screen_draw(struct tsm_screen *con, tsm_screen_draw_cb draw_cb,
diff --git a/src/tsm_screen.c b/src/tsm/tsm-screen.c
index 1813ed1..4399d3f 100644
--- a/src/tsm_screen.c
+++ b/src/tsm/tsm-screen.c
@@ -62,10 +62,10 @@
#include <stdlib.h>
#include <string.h>
#include "libtsm.h"
-#include "libtsm_int.h"
+#include "libtsm-int.h"
#include "shl_llog.h"
-#define LLOG_SUBSYSTEM "tsm_screen"
+#define LLOG_SUBSYSTEM "tsm-screen"
static struct cell *get_cursor_cell(struct tsm_screen *con)
{
diff --git a/src/tsm_selection.c b/src/tsm/tsm-selection.c
index 2157480..3c852e0 100644
--- a/src/tsm_selection.c
+++ b/src/tsm/tsm-selection.c
@@ -56,10 +56,10 @@
#include <stdlib.h>
#include <string.h>
#include "libtsm.h"
-#include "libtsm_int.h"
+#include "libtsm-int.h"
#include "shl_llog.h"
-#define LLOG_SUBSYSTEM "tsm_selection"
+#define LLOG_SUBSYSTEM "tsm-selection"
static void selection_set(struct tsm_screen *con, struct selection_pos *sel,
unsigned int x, unsigned int y)
diff --git a/src/tsm_unicode.c b/src/tsm/tsm-unicode.c
index 874915c..ad282de 100644
--- a/src/tsm_unicode.c
+++ b/src/tsm/tsm-unicode.c
@@ -59,7 +59,7 @@
#include <string.h>
#include "external/wcwidth.h"
#include "libtsm.h"
-#include "libtsm_int.h"
+#include "libtsm-int.h"
#include "shl_array.h"
#include "shl_htable.h"
diff --git a/src/tsm_vte_charsets.c b/src/tsm/tsm-vte-charsets.c
index ba4f1db..5cc5d12 100644
--- a/src/tsm_vte_charsets.c
+++ b/src/tsm/tsm-vte-charsets.c
@@ -67,7 +67,7 @@
#include <stdlib.h>
#include <string.h>
#include "libtsm.h"
-#include "libtsm_int.h"
+#include "libtsm-int.h"
/*
* Lower Unicode character set. This maps the characters to the basic ASCII
diff --git a/src/tsm_vte.c b/src/tsm/tsm-vte.c
index b293c5e..3ef3851 100644
--- a/src/tsm_vte.c
+++ b/src/tsm/tsm-vte.c
@@ -50,7 +50,7 @@
#include <stdlib.h>
#include <string.h>
#include "libtsm.h"
-#include "libtsm_int.h"
+#include "libtsm-int.h"
#include "shl_llog.h"
#ifdef BUILD_HAVE_XKBCOMMON
@@ -59,7 +59,7 @@
# include "external/xkbcommon-keysyms.h"
#endif
-#define LLOG_SUBSYSTEM "tsm_vte"
+#define LLOG_SUBSYSTEM "tsm-vte"
/* Input parser states */
enum parser_state {
diff --git a/test.supp b/test.supp
new file mode 100644
index 0000000..a61a1f7
--- /dev/null
+++ b/test.supp
@@ -0,0 +1,15 @@
+#
+# Some suppression rules for our test-suite to work correctly.
+# libcheck has some weird errors, so lets ignore them.
+#
+
+{
+ libcheck timer_create warnings
+ Memcheck:Param
+ timer_create(evp)
+ fun:timer_create
+ obj:/usr/lib/libcheck.so.0.0.0
+ obj:/usr/lib/libcheck.so.0.0.0
+ fun:srunner_run
+ fun:main
+}
diff --git a/test/test_common.h b/test/test_common.h
index 902020c..66df9f4 100644
--- a/test/test_common.h
+++ b/test/test_common.h
@@ -43,8 +43,8 @@
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>
-#include "libtsm.h"
-#include "libtsm_int.h"
+#include "tsm/libtsm.h"
+#include "tsm/libtsm-int.h"
#include "shl_htable.h"
/* lower address-space is protected from user-allocation, so this is invalid */