diff options
| author | djcb <djcb@djcbsoftware.nl> | 2012-05-20 17:41:18 +0300 |
|---|---|---|
| committer | djcb <djcb@djcbsoftware.nl> | 2012-05-21 09:25:53 +0300 |
| commit | 46f10cfde9be49e0a40c11808592de5b87ff25db (patch) | |
| tree | ee8d2e5df94c6ac11caea797fb575781921fc80c | |
| parent | 605657d4de4028ed30d9b54fde34293acfd6ea4f (diff) | |
* refactoring: split src/ into mu/ and lib/
| -rw-r--r-- | Makefile.am | 2 | ||||
| -rw-r--r-- | configure.ac | 8 | ||||
| -rw-r--r-- | guile/Makefile.am | 4 | ||||
| -rw-r--r-- | guile/mu-guile-message.c | 2 | ||||
| -rw-r--r-- | lib/Makefile.am (renamed from src/Makefile.am) | 20 | ||||
| -rw-r--r-- | lib/mu-bookmarks.c (renamed from src/mu-bookmarks.c) | 0 | ||||
| -rw-r--r-- | lib/mu-bookmarks.h (renamed from src/mu-bookmarks.h) | 0 | ||||
| -rw-r--r-- | lib/mu-contacts.c (renamed from src/mu-contacts.c) | 0 | ||||
| -rw-r--r-- | lib/mu-contacts.h (renamed from src/mu-contacts.h) | 0 | ||||
| -rw-r--r-- | lib/mu-container.c (renamed from src/mu-container.c) | 0 | ||||
| -rw-r--r-- | lib/mu-container.h (renamed from src/mu-container.h) | 0 | ||||
| -rw-r--r-- | lib/mu-date.c (renamed from src/mu-date.c) | 0 | ||||
| -rw-r--r-- | lib/mu-date.h (renamed from src/mu-date.h) | 0 | ||||
| -rw-r--r-- | lib/mu-flags.c (renamed from src/mu-flags.c) | 0 | ||||
| -rw-r--r-- | lib/mu-flags.h (renamed from src/mu-flags.h) | 0 | ||||
| -rw-r--r-- | lib/mu-index.c (renamed from src/mu-index.c) | 0 | ||||
| -rw-r--r-- | lib/mu-index.h (renamed from src/mu-index.h) | 0 | ||||
| -rw-r--r-- | lib/mu-log.c (renamed from src/mu-log.c) | 0 | ||||
| -rw-r--r-- | lib/mu-log.h (renamed from src/mu-log.h) | 0 | ||||
| -rw-r--r-- | lib/mu-maildir.c (renamed from src/mu-maildir.c) | 0 | ||||
| -rw-r--r-- | lib/mu-maildir.h (renamed from src/mu-maildir.h) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-cache.c (renamed from src/mu-msg-cache.c) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-cache.h (renamed from src/mu-msg-cache.h) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-doc.cc (renamed from src/mu-msg-doc.cc) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-doc.h (renamed from src/mu-msg-doc.h) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-fields.c (renamed from src/mu-msg-fields.c) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-fields.h (renamed from src/mu-msg-fields.h) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-file.c (renamed from src/mu-msg-file.c) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-file.h (renamed from src/mu-msg-file.h) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-iter.cc (renamed from src/mu-msg-iter.cc) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-iter.h (renamed from src/mu-msg-iter.h) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-part.c (renamed from src/mu-msg-part.c) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-part.h (renamed from src/mu-msg-part.h) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-prio.c (renamed from src/mu-msg-prio.c) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-prio.h (renamed from src/mu-msg-prio.h) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-priv.h (renamed from src/mu-msg-priv.h) | 0 | ||||
| -rw-r--r-- | lib/mu-msg-sexp.c (renamed from src/mu-msg-sexp.c) | 43 | ||||
| -rw-r--r-- | lib/mu-msg.c (renamed from src/mu-msg.c) | 0 | ||||
| -rw-r--r-- | lib/mu-msg.h (renamed from src/mu-msg.h) | 0 | ||||
| -rw-r--r-- | lib/mu-query.cc (renamed from src/mu-query.cc) | 0 | ||||
| -rw-r--r-- | lib/mu-query.h (renamed from src/mu-query.h) | 0 | ||||
| -rw-r--r-- | lib/mu-runtime.c (renamed from src/mu-runtime.c) | 56 | ||||
| -rw-r--r-- | lib/mu-runtime.h (renamed from src/mu-runtime.h) | 28 | ||||
| -rw-r--r-- | lib/mu-store-priv.hh (renamed from src/mu-store-priv.hh) | 0 | ||||
| -rw-r--r-- | lib/mu-store-read.cc (renamed from src/mu-store-read.cc) | 0 | ||||
| -rw-r--r-- | lib/mu-store-write.cc (renamed from src/mu-store-write.cc) | 0 | ||||
| -rw-r--r-- | lib/mu-store.cc (renamed from src/mu-store.cc) | 0 | ||||
| -rw-r--r-- | lib/mu-store.h (renamed from src/mu-store.h) | 0 | ||||
| -rw-r--r-- | lib/mu-str-normalize.c (renamed from src/mu-str-normalize.c) | 0 | ||||
| -rw-r--r-- | lib/mu-str.c (renamed from src/mu-str.c) | 0 | ||||
| -rw-r--r-- | lib/mu-str.h (renamed from src/mu-str.h) | 4 | ||||
| -rw-r--r-- | lib/mu-threader.c (renamed from src/mu-threader.c) | 0 | ||||
| -rw-r--r-- | lib/mu-threader.h (renamed from src/mu-threader.h) | 0 | ||||
| -rw-r--r-- | lib/mu-util.c (renamed from src/mu-util.c) | 0 | ||||
| -rw-r--r-- | lib/mu-util.h (renamed from src/mu-util.h) | 0 | ||||
| -rw-r--r-- | lib/tests/Makefile.am (renamed from src/tests/Makefile.am) | 72 | ||||
| -rw-r--r-- | lib/tests/dummy.cc (renamed from src/tests/dummy.cc) | 0 | ||||
| -rw-r--r-- | lib/tests/test-mu-common.c (renamed from src/tests/test-mu-common.c) | 0 | ||||
| -rw-r--r-- | lib/tests/test-mu-common.h (renamed from src/tests/test-mu-common.h) | 0 | ||||
| -rw-r--r-- | lib/tests/test-mu-date.c (renamed from src/tests/test-mu-date.c) | 42 | ||||
| -rw-r--r-- | lib/tests/test-mu-flags.c (renamed from src/tests/test-mu-flags.c) | 2 | ||||
| -rw-r--r-- | lib/tests/test-mu-maildir.c (renamed from src/tests/test-mu-maildir.c) | 4 | ||||
| -rw-r--r-- | lib/tests/test-mu-msg-fields.c (renamed from src/tests/test-mu-msg-fields.c) | 28 | ||||
| -rw-r--r-- | lib/tests/test-mu-msg.c (renamed from src/tests/test-mu-msg.c) | 4 | ||||
| -rw-r--r-- | lib/tests/test-mu-store.c (renamed from src/tests/test-mu-store.c) | 2 | ||||
| -rw-r--r-- | lib/tests/test-mu-str.c (renamed from src/tests/test-mu-str.c) | 4 | ||||
| -rw-r--r-- | lib/tests/test-mu-util.c (renamed from src/tests/test-mu-util.c) | 2 | ||||
| -rw-r--r-- | lib/tests/testdir/cur/1220863042.12663_1.mindcrime!2,S (renamed from src/tests/testdir/cur/1220863042.12663_1.mindcrime!2,S) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/cur/1220863060.12663_3.mindcrime!2,S (renamed from src/tests/testdir/cur/1220863060.12663_3.mindcrime!2,S) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/cur/1220863087.12663_15.mindcrime!2,PS (renamed from src/tests/testdir/cur/1220863087.12663_15.mindcrime!2,PS) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/cur/1220863087.12663_19.mindcrime!2,S (renamed from src/tests/testdir/cur/1220863087.12663_19.mindcrime!2,S) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/cur/1220863087.12663_5.mindcrime!2,S (renamed from src/tests/testdir/cur/1220863087.12663_5.mindcrime!2,S) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/cur/1220863087.12663_7.mindcrime!2,RS (renamed from src/tests/testdir/cur/1220863087.12663_7.mindcrime!2,RS) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/cur/1252168370_3.14675.cthulhu!2,S (renamed from src/tests/testdir/cur/1252168370_3.14675.cthulhu!2,S) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/cur/1283599333.1840_11.cthulhu!2, (renamed from src/tests/testdir/cur/1283599333.1840_11.cthulhu!2,) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/cur/1305664394.2171_402.cthulhu!2, (renamed from src/tests/testdir/cur/1305664394.2171_402.cthulhu!2,) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/cur/encrypted!2,S (renamed from src/tests/testdir/cur/encrypted!2,S) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/cur/signed!2,S (renamed from src/tests/testdir/cur/signed!2,S) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/cur/signed-encrypted!2,S (renamed from src/tests/testdir/cur/signed-encrypted!2,S) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/new/1220863087.12663_21.mindcrime (renamed from src/tests/testdir/new/1220863087.12663_21.mindcrime) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/new/1220863087.12663_23.mindcrime (renamed from src/tests/testdir/new/1220863087.12663_23.mindcrime) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/new/1220863087.12663_25.mindcrime (renamed from src/tests/testdir/new/1220863087.12663_25.mindcrime) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/new/1220863087.12663_9.mindcrime (renamed from src/tests/testdir/new/1220863087.12663_9.mindcrime) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir/tmp/1220863087.12663.ignore (renamed from src/tests/testdir/tmp/1220863087.12663.ignore) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/Foo/cur/arto.eml (renamed from src/tests/testdir2/Foo/cur/arto.eml) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/Foo/cur/mail5 (renamed from src/tests/testdir2/Foo/cur/mail5) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/Foo/new/.noindex (renamed from src/tests/testdir2/Foo/new/.noindex) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/Foo/tmp/.noindex (renamed from src/tests/testdir2/Foo/tmp/.noindex) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/bar/cur/181736.eml (renamed from src/tests/testdir2/bar/cur/181736.eml) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/bar/cur/mail1 (renamed from src/tests/testdir2/bar/cur/mail1) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/bar/cur/mail2 (renamed from src/tests/testdir2/bar/cur/mail2) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/bar/cur/mail3 (renamed from src/tests/testdir2/bar/cur/mail3) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/bar/cur/mail4 (renamed from src/tests/testdir2/bar/cur/mail4) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/bar/cur/mail5 (renamed from src/tests/testdir2/bar/cur/mail5) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/bar/cur/mail6 (renamed from src/tests/testdir2/bar/cur/mail6) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/bar/new/.noindex (renamed from src/tests/testdir2/bar/new/.noindex) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/bar/tmp/.noindex (renamed from src/tests/testdir2/bar/tmp/.noindex) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/wom_bat/cur/atomic (renamed from src/tests/testdir2/wom_bat/cur/atomic) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/wom_bat/cur/rfc822.1 (renamed from src/tests/testdir2/wom_bat/cur/rfc822.1) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir2/wom_bat/cur/rfc822.2 (renamed from src/tests/testdir2/wom_bat/cur/rfc822.2) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/cycle/cur/cycle0 (renamed from src/tests/testdir3/cycle/cur/cycle0) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/cycle/cur/cycle0.0 (renamed from src/tests/testdir3/cycle/cur/cycle0.0) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/cycle/cur/cycle0.0.0 (renamed from src/tests/testdir3/cycle/cur/cycle0.0.0) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/cycle/cur/rogue0 (renamed from src/tests/testdir3/cycle/cur/rogue0) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/cycle/new/.noindex (renamed from src/tests/testdir3/cycle/new/.noindex) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/cycle/tmp/.noindex (renamed from src/tests/testdir3/cycle/tmp/.noindex) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/tree/cur/child0.0 (renamed from src/tests/testdir3/tree/cur/child0.0) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/tree/cur/child0.1 (renamed from src/tests/testdir3/tree/cur/child0.1) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/tree/cur/child0.1.0 (renamed from src/tests/testdir3/tree/cur/child0.1.0) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/tree/cur/child2.0.0 (renamed from src/tests/testdir3/tree/cur/child2.0.0) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/tree/cur/child3.0.0.0.0 (renamed from src/tests/testdir3/tree/cur/child3.0.0.0.0) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/tree/cur/child4.0 (renamed from src/tests/testdir3/tree/cur/child4.0) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/tree/cur/child4.1 (renamed from src/tests/testdir3/tree/cur/child4.1) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/tree/cur/root0 (renamed from src/tests/testdir3/tree/cur/root0) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/tree/cur/root1 (renamed from src/tests/testdir3/tree/cur/root1) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/tree/cur/root2 (renamed from src/tests/testdir3/tree/cur/root2) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/tree/new/.noindex (renamed from src/tests/testdir3/tree/new/.noindex) | 0 | ||||
| -rw-r--r-- | lib/tests/testdir3/tree/tmp/.noindex (renamed from src/tests/testdir3/tree/tmp/.noindex) | 0 | ||||
| -rw-r--r-- | mu/mu-cmd-cfind.c (renamed from src/mu-cmd-cfind.c) | 0 | ||||
| -rw-r--r-- | mu/mu-cmd-extract.c (renamed from src/mu-cmd-extract.c) | 0 | ||||
| -rw-r--r-- | mu/mu-cmd-find.c (renamed from src/mu-cmd-find.c) | 0 | ||||
| -rw-r--r-- | mu/mu-cmd-index.c (renamed from src/mu-cmd-index.c) | 0 | ||||
| -rw-r--r-- | mu/mu-cmd-server.c (renamed from src/mu-cmd-server.c) | 0 | ||||
| -rw-r--r-- | mu/mu-cmd.c (renamed from src/mu-cmd.c) | 0 | ||||
| -rw-r--r-- | mu/mu-cmd.h (renamed from src/mu-cmd.h) | 0 | ||||
| -rw-r--r-- | mu/mu-config.c (renamed from src/mu-config.c) | 0 | ||||
| -rw-r--r-- | mu/mu-config.h (renamed from src/mu-config.h) | 0 | ||||
| -rw-r--r-- | mu/mu.cc (renamed from src/mu.cc) | 20 | ||||
| -rw-r--r-- | mu/tests/test-mu-cmd-cfind.c (renamed from src/tests/test-mu-cmd-cfind.c) | 2 | ||||
| -rw-r--r-- | mu/tests/test-mu-cmd.c (renamed from src/tests/test-mu-cmd.c) | 2 | ||||
| -rw-r--r-- | mu/tests/test-mu-contacts.c (renamed from src/tests/test-mu-contacts.c) | 37 | ||||
| -rw-r--r-- | mu/tests/test-mu-query.c (renamed from src/tests/test-mu-query.c) | 6 | ||||
| -rw-r--r-- | mu/tests/test-mu-runtime.c (renamed from src/tests/test-mu-runtime.c) | 0 | ||||
| -rw-r--r-- | mu/tests/test-mu-threads.c (renamed from src/tests/test-mu-threads.c) | 4 | ||||
| -rw-r--r-- | toys/msg2pdf/Makefile.am | 11 | ||||
| -rw-r--r-- | toys/mug/Makefile.am | 7 | ||||
| -rw-r--r-- | toys/mug/mug-msg-list-view.c | 2 | ||||
| -rw-r--r-- | toys/mug2/Makefile.am | 5 | ||||
| -rw-r--r-- | widgets/Makefile.am | 5 | ||||
| -rw-r--r-- | widgets/mu-msg-attach-view.c | 2 | ||||
| -rw-r--r-- | widgets/mu-msg-attach-view.h | 3 | ||||
| -rw-r--r-- | widgets/mu-msg-header-view.c | 4 | ||||
| -rw-r--r-- | widgets/mu-msg-view.c | 2 |
143 files changed, 160 insertions, 279 deletions
diff --git a/Makefile.am b/Makefile.am index 73ef003..3567734 100644 --- a/Makefile.am +++ b/Makefile.am @@ -35,7 +35,7 @@ else emacs= endif -SUBDIRS=m4 man src $(widgets) $(guile) $(emacs) contrib toys +SUBDIRS=m4 man lib $(widgets) $(guile) mu $(emacs) contrib toys ACLOCAL_AMFLAGS=-I m4 diff --git a/configure.ac b/configure.ac index 3491fc9..9a64f70 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ AC_INIT([mu],[0.9.8.5-dev2],[http://code.google.com/p/mu0/issues/list],[mu]) AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_SRCDIR([src/mu.cc]) +AC_CONFIG_SRCDIR([mu/mu.cc]) # libtoolize wants to put some stuff in here; if you have an old # autotools/libtool setup. you can try to comment this out AC_CONFIG_MACRO_DIR([m4]) @@ -291,8 +291,10 @@ AS_IF([test "x$PMCCABE" = "xno"],[ AC_CONFIG_FILES([ Makefile -src/Makefile -src/tests/Makefile +mu/Makefile +mu/tests/Makefile +lib/Makefile +lib/tests/Makefile widgets/Makefile emacs/Makefile emacs/mu4e-meta.el diff --git a/guile/Makefile.am b/guile/Makefile.am index be6758f..90462e7 100644 --- a/guile/Makefile.am +++ b/guile/Makefile.am @@ -25,7 +25,7 @@ AM_CXXFLAGS=-Wall -Wextra -Wno-unused-parameter # note, we need top_builddir for snarfing with 'make distcheck' (ie., # with separate builddir) SUBDIRS= . mu examples -INCLUDES=-I. -I${top_builddir} -I${top_srcdir}/src ${GUILE_CFLAGS} ${GLIB_CFLAGS} +INCLUDES=-I. -I${top_builddir} -I${top_srcdir}/lib ${GUILE_CFLAGS} ${GLIB_CFLAGS} # don't use -Werror, as it might break on other compilers # use -Wno-unused-parameters, because some callbacks may not @@ -41,7 +41,7 @@ libguile_mu_la_SOURCES= \ mu-guile-message.h libguile_mu_la_LIBADD= \ - ${top_builddir}/src/libmu.la \ + ${top_builddir}/lib/libmu.la \ ${GUILE_LIBS} XFILES= \ diff --git a/guile/mu-guile-message.c b/guile/mu-guile-message.c index e7d0fc1..a387d21 100644 --- a/guile/mu-guile-message.c +++ b/guile/mu-guile-message.c @@ -1,5 +1,5 @@ /* -** Copyright (C) 2011 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> +** Copyright (C) 2011-2012 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ** ** 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 diff --git a/src/Makefile.am b/lib/Makefile.am index 8f20329..35e2fc0 100644 --- a/src/Makefile.am +++ b/lib/Makefile.am @@ -32,32 +32,12 @@ INCLUDES=$(XAPIAN_CXXFLAGS) $(GMIME_CFLAGS) $(GLIB_CFLAGS) AM_CFLAGS=-Wall -Wextra -Wno-unused-parameter -Wdeclaration-after-statement -pedantic -Wno-variadic-macros AM_CXXFLAGS=-Wall -Wextra -Wno-unused-parameter -bin_PROGRAMS= \ - mu - noinst_LTLIBRARIES= \ libmu.la -# note, mu.cc is only '.cc' and not '.c' because libmu must explicitly -# be linked as c++, not c. -mu_SOURCES= \ - mu.cc - -mu_LDADD= \ - libmu.la - libmu_la_SOURCES= \ mu-bookmarks.c \ mu-bookmarks.h \ - mu-cmd-cfind.c \ - mu-cmd-extract.c \ - mu-cmd-find.c \ - mu-cmd-index.c \ - mu-cmd-server.c \ - mu-cmd.c \ - mu-cmd.h \ - mu-config.c \ - mu-config.h \ mu-contacts.c \ mu-contacts.h \ mu-container.c \ diff --git a/src/mu-bookmarks.c b/lib/mu-bookmarks.c index ffade2e..ffade2e 100644 --- a/src/mu-bookmarks.c +++ b/lib/mu-bookmarks.c diff --git a/src/mu-bookmarks.h b/lib/mu-bookmarks.h index fdfa8f6..fdfa8f6 100644 --- a/src/mu-bookmarks.h +++ b/lib/mu-bookmarks.h diff --git a/src/mu-contacts.c b/lib/mu-contacts.c index ea4d073..ea4d073 100644 --- a/src/mu-contacts.c +++ b/lib/mu-contacts.c diff --git a/src/mu-contacts.h b/lib/mu-contacts.h index 7a0faa5..7a0faa5 100644 --- a/src/mu-contacts.h +++ b/lib/mu-contacts.h diff --git a/src/mu-container.c b/lib/mu-container.c index 325246c..325246c 100644 --- a/src/mu-container.c +++ b/lib/mu-container.c diff --git a/src/mu-container.h b/lib/mu-container.h index e3ddbe0..e3ddbe0 100644 --- a/src/mu-container.h +++ b/lib/mu-container.h diff --git a/src/mu-date.c b/lib/mu-date.c index 2e969a3..2e969a3 100644 --- a/src/mu-date.c +++ b/lib/mu-date.c diff --git a/src/mu-date.h b/lib/mu-date.h index 7e5e669..7e5e669 100644 --- a/src/mu-date.h +++ b/lib/mu-date.h diff --git a/src/mu-flags.c b/lib/mu-flags.c index 45b8056..45b8056 100644 --- a/src/mu-flags.c +++ b/lib/mu-flags.c diff --git a/src/mu-flags.h b/lib/mu-flags.h index c1cc1c8..c1cc1c8 100644 --- a/src/mu-flags.h +++ b/lib/mu-flags.h diff --git a/src/mu-index.c b/lib/mu-index.c index 52c2642..52c2642 100644 --- a/src/mu-index.c +++ b/lib/mu-index.c diff --git a/src/mu-index.h b/lib/mu-index.h index b6faa23..b6faa23 100644 --- a/src/mu-index.h +++ b/lib/mu-index.h diff --git a/src/mu-log.c b/lib/mu-log.c index 8e0b921..8e0b921 100644 --- a/src/mu-log.c +++ b/lib/mu-log.c diff --git a/src/mu-log.h b/lib/mu-log.h index 323a41f..323a41f 100644 --- a/src/mu-log.h +++ b/lib/mu-log.h diff --git a/src/mu-maildir.c b/lib/mu-maildir.c index d867d14..d867d14 100644 --- a/src/mu-maildir.c +++ b/lib/mu-maildir.c diff --git a/src/mu-maildir.h b/lib/mu-maildir.h index f23be2f..f23be2f 100644 --- a/src/mu-maildir.h +++ b/lib/mu-maildir.h diff --git a/src/mu-msg-cache.c b/lib/mu-msg-cache.c index 34a287f..34a287f 100644 --- a/src/mu-msg-cache.c +++ b/lib/mu-msg-cache.c diff --git a/src/mu-msg-cache.h b/lib/mu-msg-cache.h index ea0ecbb..ea0ecbb 100644 --- a/src/mu-msg-cache.h +++ b/lib/mu-msg-cache.h diff --git a/src/mu-msg-doc.cc b/lib/mu-msg-doc.cc index 8ffdc5f..8ffdc5f 100644 --- a/src/mu-msg-doc.cc +++ b/lib/mu-msg-doc.cc diff --git a/src/mu-msg-doc.h b/lib/mu-msg-doc.h index 4630662..4630662 100644 --- a/src/mu-msg-doc.h +++ b/lib/mu-msg-doc.h diff --git a/src/mu-msg-fields.c b/lib/mu-msg-fields.c index d6f8702..d6f8702 100644 --- a/src/mu-msg-fields.c +++ b/lib/mu-msg-fields.c diff --git a/src/mu-msg-fields.h b/lib/mu-msg-fields.h index 611517b..611517b 100644 --- a/src/mu-msg-fields.h +++ b/lib/mu-msg-fields.h diff --git a/src/mu-msg-file.c b/lib/mu-msg-file.c index 298ced5..298ced5 100644 --- a/src/mu-msg-file.c +++ b/lib/mu-msg-file.c diff --git a/src/mu-msg-file.h b/lib/mu-msg-file.h index 0a800ce..0a800ce 100644 --- a/src/mu-msg-file.h +++ b/lib/mu-msg-file.h diff --git a/src/mu-msg-iter.cc b/lib/mu-msg-iter.cc index cb41d62..cb41d62 100644 --- a/src/mu-msg-iter.cc +++ b/lib/mu-msg-iter.cc diff --git a/src/mu-msg-iter.h b/lib/mu-msg-iter.h index a06cdc9..a06cdc9 100644 --- a/src/mu-msg-iter.h +++ b/lib/mu-msg-iter.h diff --git a/src/mu-msg-part.c b/lib/mu-msg-part.c index bfbb5c1..bfbb5c1 100644 --- a/src/mu-msg-part.c +++ b/lib/mu-msg-part.c diff --git a/src/mu-msg-part.h b/lib/mu-msg-part.h index fa2c9d4..fa2c9d4 100644 --- a/src/mu-msg-part.h +++ b/lib/mu-msg-part.h diff --git a/src/mu-msg-prio.c b/lib/mu-msg-prio.c index 26b76ee..26b76ee 100644 --- a/src/mu-msg-prio.c +++ b/lib/mu-msg-prio.c diff --git a/src/mu-msg-prio.h b/lib/mu-msg-prio.h index 98506c5..98506c5 100644 --- a/src/mu-msg-prio.h +++ b/lib/mu-msg-prio.h diff --git a/src/mu-msg-priv.h b/lib/mu-msg-priv.h index 3d0e704..3d0e704 100644 --- a/src/mu-msg-priv.h +++ b/lib/mu-msg-priv.h diff --git a/src/mu-msg-sexp.c b/lib/mu-msg-sexp.c index 8363027..a7fb39e 100644 --- a/src/mu-msg-sexp.c +++ b/lib/mu-msg-sexp.c @@ -229,6 +229,15 @@ struct _PartInfo { typedef struct _PartInfo PartInfo; +/* like the elvis operator, + * http://colinharrington.net/blog/2008/10/groovy-elvis-operator/ + */ +static const char* +elvis (const char *s1, const char *s2) +{ + return s1 ? s1 : s2; +} + static void each_part (MuMsg *msg, MuMsgPart *part, PartInfo *pinfo) { @@ -236,34 +245,31 @@ each_part (MuMsg *msg, MuMsgPart *part, PartInfo *pinfo) char *name, *tmp; char *tmpfile; - fname = mu_msg_part_file_name (part); - if (!fname) + if (!(fname = mu_msg_part_file_name (part))) fname = mu_msg_part_description (part); - if (fname) name = mu_str_escape_c_literal (fname, TRUE); else - name = g_strdup_printf - ("\"%s-%s-%d\"", - part->type ? part->type : "application", - part->subtype ? part->subtype : "octet-stream", - part->index); + name = g_strdup_printf ("\"%s-%s-%d\"", + elvis (part->type, "application"), + elvis (part->subtype, "octet-stream"), + part->index); tmpfile = NULL; if (pinfo->want_images && g_ascii_strcasecmp (part->type, "image") == 0) { char *tmp; - tmp = get_temp_file (msg, part->index); - if (tmp) { + if ((tmp = get_temp_file (msg, part->index))) { tmpfile = mu_str_escape_c_literal (tmp, TRUE); g_free (tmp); } } tmp = g_strdup_printf - ("%s(:index %d :name %s :mime-type \"%s/%s\"%s%s :attachment %s :size %i)", - pinfo->parts ? pinfo->parts : "", part->index, name, - part->type ? part->type : "application", - part->subtype ? part->subtype : "octet-stream", + ("%s(:index %d :name %s :mime-type \"%s/%s\"%s%s " + ":attachment %s :size %i)", + elvis (pinfo->parts, ""), part->index, name, + elvis (part->type, "application"), + elvis (part->subtype, "octet-stream"), tmpfile ? " :temp" : "", tmpfile ? tmpfile : "", mu_msg_part_looks_like_attachment (part, TRUE) ? "t" : "nil", (int)part->size); @@ -338,10 +344,6 @@ mu_msg_to_sexp (MuMsg *msg, unsigned docid, const MuMsgIterThreadInfo *ti, if (docid != 0) g_string_append_printf (gstr, "\t:docid %u\n", docid); - if (!header_only) /* force loading of file... should do this a bit - * more elegantly */ - mu_msg_get_header (msg, "Reply-To"); - append_sexp_contacts (gstr, msg); if (ti) @@ -351,8 +353,7 @@ mu_msg_to_sexp (MuMsg *msg, unsigned docid, const MuMsgIterThreadInfo *ti, t = mu_msg_get_date (msg); /* weird time format for emacs 29-bit ints...*/ - g_string_append_printf (gstr, - "\t:date (%u %u 0)\n", (unsigned)(t >> 16), + g_string_append_printf (gstr,"\t:date (%u %u 0)\n", (unsigned)(t >> 16), (unsigned)(t & 0xffff)); g_string_append_printf (gstr, "\t:size %u\n", (unsigned) mu_msg_get_size (msg)); @@ -366,7 +367,6 @@ mu_msg_to_sexp (MuMsg *msg, unsigned docid, const MuMsgIterThreadInfo *ti, append_sexp_flags (gstr, msg); /* headers are retrieved from the database, views from the message file - * * file attr things can only be gotten from the file (ie., mu * view), not from the database (mu find). */ if (!header_only) { @@ -375,6 +375,5 @@ mu_msg_to_sexp (MuMsg *msg, unsigned docid, const MuMsgIterThreadInfo *ti, } g_string_append (gstr, ")\n"); - return g_string_free (gstr, FALSE); } diff --git a/src/mu-msg.c b/lib/mu-msg.c index 72c6ded..72c6ded 100644 --- a/src/mu-msg.c +++ b/lib/mu-msg.c diff --git a/src/mu-msg.h b/lib/mu-msg.h index 6a846f8..6a846f8 100644 --- a/src/mu-msg.h +++ b/lib/mu-msg.h diff --git a/src/mu-query.cc b/lib/mu-query.cc index 49ef9d2..49ef9d2 100644 --- a/src/mu-query.cc +++ b/lib/mu-query.cc diff --git a/src/mu-query.h b/lib/mu-query.h index 4686d6c..4686d6c 100644 --- a/src/mu-query.h +++ b/lib/mu-query.h diff --git a/src/mu-runtime.c b/lib/mu-runtime.c index 2360738..18df1cc 100644 --- a/src/mu-runtime.c +++ b/lib/mu-runtime.c @@ -26,9 +26,7 @@ #include <stdlib.h> #include <sys/types.h> #include <unistd.h> -#include <mu-msg.h> - -#include "mu-config.h" +#include "mu-msg.h" #include "mu-log.h" #include "mu-util.h" @@ -41,7 +39,6 @@ struct _MuRuntimeData { gchar *_str[MU_RUNTIME_PATH_NUM]; - MuConfig *_config; gchar *_name; /* e.g., 'mu', 'mug' */ }; typedef struct _MuRuntimeData MuRuntimeData; @@ -116,48 +113,6 @@ mu_runtime_init (const char* muhome_arg, const char *name) return _initialized = TRUE; } - - -gboolean -mu_runtime_init_from_cmdline (int *pargc, char ***pargv, const char *name) -{ - g_return_val_if_fail (!_initialized, FALSE); - g_return_val_if_fail (name, FALSE); - - setlocale (LC_ALL, ""); - g_type_init (); - - _data = g_new0 (MuRuntimeData, 1); - _data->_config = mu_config_init (pargc, pargv); - if (!_data->_config) { - runtime_free (); - return FALSE; - } - - if (!mu_util_create_dir_maybe (_data->_config->muhome, 0700, TRUE)) { - g_printerr ("mu: invalid mu homedir specified;" - " use --muhome=<dir>\n"); - runtime_free (); - return FALSE; - } - - _data->_name = g_strdup (name); - _data->_str[MU_RUNTIME_PATH_MUHOME] = - g_strdup (_data->_config->muhome); - init_paths (_data->_str[MU_RUNTIME_PATH_MUHOME], _data); - - if (!init_log (runtime_path(MU_RUNTIME_PATH_MUHOME), name, - _data->_config->log_stderr, - _data->_config->quiet, - _data->_config->debug)) { - runtime_free (); - return FALSE; - } - - return _initialized = TRUE; -} - - static void runtime_free (void) { @@ -168,7 +123,7 @@ runtime_free (void) g_free (_data->_name); - mu_config_uninit (_data->_config); + /* mu_config_uninit (_data->_config); */ mu_log_uninit(); @@ -252,10 +207,3 @@ mu_runtime_path (MuRuntimePath path) return runtime_path (path); } - -MuConfig* -mu_runtime_config (void) -{ - g_return_val_if_fail (_initialized, NULL); - return _data->_config; -} diff --git a/src/mu-runtime.h b/lib/mu-runtime.h index 9c3a942..af52862 100644 --- a/src/mu-runtime.h +++ b/lib/mu-runtime.h @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- -** +** ** Copyright (C) 2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ** ** This program is free software; you can redistribute it and/or modify it @@ -21,18 +21,17 @@ #define __MU_RUNTIME_H__ #include <glib.h> -#include <mu-config.h> G_BEGIN_DECLS /** * initialize the mu runtime system; initializes logging and other * systems. To uninitialize, use mu_runtime_uninit - * - * @param muhome path where to find the mu home directory (typicaly, ~/.mu) + * + * @param muhome path where to find the mu home directory (typicaly, ~/.mu) * @param name of the main program, ie. 'mu', 'mug' or * 'procmule'. this influences the name of the e.g. the logfile - * + * * @return TRUE if succeeded, FALSE in case of error */ gboolean mu_runtime_init (const char *muhome, const char *name); @@ -43,12 +42,12 @@ gboolean mu_runtime_init (const char *muhome, const char *name); * will parse the command line assuming the parameters of the 'mu' * program. Initializes logging and other systems. To uninitialize, * use mu_runtime_uninit - * + * * @param ptr to the param count (typically, argc) * @param ptr to the params (typically, argv) * @param name of the main program, ie. 'mu', 'mug' or * 'procmule'. this influences the name of the e.g. the logfile - * + * * @return TRUE if succeeded, FALSE in case of error */ gboolean mu_runtime_init_from_cmdline (int *pargc, char ***pargv, @@ -56,8 +55,8 @@ gboolean mu_runtime_init_from_cmdline (int *pargc, char ***pargv, /** - * free all resources - * + * free all resources + * */ void mu_runtime_uninit (void); @@ -76,21 +75,12 @@ typedef enum _MuRuntimePath MuRuntimePath; /** * get a file system path to some 'special' file or directory - * + * * @return ma string which should be not be modified/freed, or NULL in * case of error. */ const char* mu_runtime_path (MuRuntimePath path); - -/** - * get the mu configuration options (ie., the parsed command line - * parameters) - * - * @return the configuration options - */ -MuConfig* mu_runtime_config (void); - G_END_DECLS #endif /*__MU_RUNTIME_H__*/ diff --git a/src/mu-store-priv.hh b/lib/mu-store-priv.hh index 0cb55cb..0cb55cb 100644 --- a/src/mu-store-priv.hh +++ b/lib/mu-store-priv.hh diff --git a/src/mu-store-read.cc b/lib/mu-store-read.cc index 352c301..352c301 100644 --- a/src/mu-store-read.cc +++ b/lib/mu-store-read.cc diff --git a/src/mu-store-write.cc b/lib/mu-store-write.cc index f2dce56..f2dce56 100644 --- a/src/mu-store-write.cc +++ b/lib/mu-store-write.cc diff --git a/src/mu-store.cc b/lib/mu-store.cc index 587958f..587958f 100644 --- a/src/mu-store.cc +++ b/lib/mu-store.cc diff --git a/src/mu-store.h b/lib/mu-store.h index 38be7d6..38be7d6 100644 --- a/src/mu-store.h +++ b/lib/mu-store.h diff --git a/src/mu-str-normalize.c b/lib/mu-str-normalize.c index 9407465..9407465 100644 --- a/src/mu-str-normalize.c +++ b/lib/mu-str-normalize.c diff --git a/src/mu-str.c b/lib/mu-str.c index 81484c9..81484c9 100644 --- a/src/mu-str.c +++ b/lib/mu-str.c diff --git a/src/mu-str.h b/lib/mu-str.h index 6cae11b..79f9613 100644 --- a/src/mu-str.h +++ b/lib/mu-str.h @@ -25,8 +25,8 @@ #include <time.h> #include <sys/types.h> -#include <mu-msg.h> -#include <mu-flags.h> +#include "lib/mu-msg.h" +#include "lib/mu-flags.h" G_BEGIN_DECLS diff --git a/src/mu-threader.c b/lib/mu-threader.c index 9832e54..9832e54 100644 --- a/src/mu-threader.c +++ b/lib/mu-threader.c diff --git a/src/mu-threader.h b/lib/mu-threader.h index 2ee0e0a..2ee0e0a 100644 --- a/src/mu-threader.h +++ b/lib/mu-threader.h diff --git a/src/mu-util.c b/lib/mu-util.c index 4775b40..4775b40 100644 --- a/src/mu-util.c +++ b/lib/mu-util.c diff --git a/src/mu-util.h b/lib/mu-util.h index d1c0c92..d1c0c92 100644 --- a/src/mu-util.h +++ b/lib/mu-util.h diff --git a/src/tests/Makefile.am b/lib/tests/Makefile.am index c2de202..7765ed0 100644 --- a/src/tests/Makefile.am +++ b/lib/tests/Makefile.am @@ -19,11 +19,11 @@ include $(top_srcdir)/gtest.mk INCLUDES=$(XAPIAN_CXXFLAGS) \ $(GMIME_CFLAGS) \ $(GLIB_CFLAGS) \ - -I ${top_srcdir} -I ${top_srcdir}/src \ + -I ${top_srcdir} \ + -I ${top_srcdir}/lib \ -DMU_TESTMAILDIR=\"${abs_srcdir}/testdir\" \ -DMU_TESTMAILDIR2=\"${abs_srcdir}/testdir2\" \ -DMU_TESTMAILDIR3=\"${abs_srcdir}/testdir3\" \ - -DMU_PROGRAM=\"${abs_top_builddir}/src/mu\" \ -DABS_CURDIR=\"${abs_builddir}\" \ -DABS_SRCDIR=\"${abs_srcdir}\" @@ -53,39 +53,14 @@ TEST_PROGS += test-mu-msg-fields test_mu_msg_fields_SOURCES= test-mu-msg-fields.c dummy.cc test_mu_msg_fields_LDADD= libtestmucommon.la -TEST_PROGS += test-mu-query -test_mu_query_SOURCES= test-mu-query.c dummy.cc -test_mu_query_LDADD= libtestmucommon.la - -TEST_PROGS += test-mu-contacts -test_mu_contacts_SOURCES= test-mu-contacts.c dummy.cc -test_mu_contacts_LDADD= libtestmucommon.la - -TEST_PROGS += test-mu-cmd -test_mu_cmd_SOURCES= test-mu-cmd.c dummy.cc -test_mu_cmd_LDADD= libtestmucommon.la - -TEST_PROGS += test-mu-cmd-cfind -test_mu_cmd_cfind_SOURCES= test-mu-cmd-cfind.c dummy.cc -test_mu_cmd_cfind_LDADD= libtestmucommon.la - - TEST_PROGS += test-mu-msg test_mu_msg_SOURCES= test-mu-msg.c dummy.cc test_mu_msg_LDADD= libtestmucommon.la -TEST_PROGS += test-mu-runtime -test_mu_runtime_SOURCES= test-mu-runtime.c dummy.cc -test_mu_runtime_LDADD= libtestmucommon.la - TEST_PROGS += test-mu-store test_mu_store_SOURCES= test-mu-store.c dummy.cc test_mu_store_LDADD= libtestmucommon.la -TEST_PROGS += test-mu-threads -test_mu_threads_SOURCES= test-mu-threads.c dummy.cc -test_mu_threads_LDADD= libtestmucommon.la - TEST_PROGS += test-mu-date test_mu_date_SOURCES= test-mu-date.c dummy.cc test_mu_date_LDADD= libtestmucommon.la @@ -94,22 +69,27 @@ TEST_PROGS += test-mu-flags test_mu_flags_SOURCES= test-mu-flags.c dummy.cc test_mu_flags_LDADD= libtestmucommon.la +# we need to use dummy.cc to enforce c++ linking... +BUILT_SOURCES= \ + dummy.cc + +dummy.cc: + touch dummy.cc -# TEST_PROGS += test-mu-msg-file -# test_mu_msg_file_SOURCES= test-mu-msg-file.c dummy.cc -# test_mu_msg_file_LDADD= libtestmucommon.la -# libtestmucommon_la_SOURCES= \ test-mu-common.c \ test-mu-common.h libtestmucommon_la_LIBADD= ../libmu.la + + + # note the question marks; make does not like files with ':', so we # use the (also supported) version with '!' instead. We could escape # the : with \: but automake does not recognize that.... -# 12 messages, the '.ignore' message should be ignored +# test messages, the '.ignore' message should be ignored # when indexing EXTRA_DIST= \ testdir/tmp/1220863087.12663.ignore \ @@ -145,30 +125,4 @@ EXTRA_DIST= \ testdir2/Foo/new/.noindex \ testdir2/wom_bat/cur/atomic \ testdir2/wom_bat/cur/rfc822.1 \ - testdir2/wom_bat/cur/rfc822.2 \ - testdir3/tree \ - testdir3/tree/new \ - testdir3/tree/new/.noindex \ - testdir3/tree/cur \ - testdir3/tree/cur/child0.1 \ - testdir3/tree/cur/root1 \ - testdir3/tree/cur/child3.0.0.0.0 \ - testdir3/tree/cur/child0.0 \ - testdir3/tree/cur/child4.1 \ - testdir3/tree/cur/child4.0 \ - testdir3/tree/cur/root2 \ - testdir3/tree/cur/child0.1.0 \ - testdir3/tree/cur/child2.0.0 \ - testdir3/tree/cur/root0 \ - testdir3/tree/tmp \ - testdir3/tree/tmp/.noindex \ - testdir3/cycle \ - testdir3/cycle/new \ - testdir3/cycle/new/.noindex \ - testdir3/cycle/cur \ - testdir3/cycle/cur/rogue0 \ - testdir3/cycle/cur/cycle0 \ - testdir3/cycle/cur/cycle0.0.0 \ - testdir3/cycle/cur/cycle0.0 \ - testdir3/cycle/tmp \ - testdir3/cycle/tmp/.noindex + testdir2/wom_bat/cur/rfc822.2 diff --git a/src/tests/dummy.cc b/lib/tests/dummy.cc index e69de29..e69de29 100644 --- a/src/tests/dummy.cc +++ b/lib/tests/dummy.cc diff --git a/src/tests/test-mu-common.c b/lib/tests/test-mu-common.c index 9d8397b..9d8397b 100644 --- a/src/tests/test-mu-common.c +++ b/lib/tests/test-mu-common.c diff --git a/src/tests/test-mu-common.h b/lib/tests/test-mu-common.h index ac71eb1..ac71eb1 100644 --- a/src/tests/test-mu-common.h +++ b/lib/tests/test-mu-common.h diff --git a/src/tests/test-mu-date.c b/lib/tests/test-mu-date.c index 2ebab26..a47ffa9 100644 --- a/src/tests/test-mu-date.c +++ b/lib/tests/test-mu-date.c @@ -1,6 +1,6 @@ /* -*-mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-*/ -/* +/* ** Copyright (C) 2008-2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ** ** This program is free software; you can redistribute it and/or modify it @@ -15,8 +15,8 @@ ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software Foundation, -** Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -** +** Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +** */ #if HAVE_CONFIG_H @@ -31,7 +31,7 @@ #include <locale.h> #include "test-mu-common.h" -#include "src/mu-date.h" +#include "mu-date.h" static void @@ -41,7 +41,7 @@ test_mu_date_str (void) char buf[64]; gchar *tmp; time_t some_time; - + some_time = 1234567890; tmbuf = localtime (&some_time); strftime (buf, 64, "%x", tmbuf); @@ -54,9 +54,9 @@ test_mu_date_str (void) tmbuf = localtime (&some_time); strftime (buf, 64, "%c", tmbuf); tmp = mu_date_str ("%c", some_time); - + g_assert_cmpstr (tmp, ==, buf); - g_free (tmp); + g_free (tmp); } @@ -73,7 +73,7 @@ test_mu_date_parse_hdwmy (void) diff = time(NULL) - mu_date_parse_hdwmy ("5y"); g_assert (diff > 0); g_assert_cmpuint (5 * 365 * 24 * 60 * 60 - diff, <=, 1); - + diff = time(NULL) - mu_date_parse_hdwmy ("3m"); g_assert (diff > 0); g_assert_cmpuint (3 * 30 * 24 * 60 * 60 - diff, <=, 1); @@ -81,13 +81,13 @@ test_mu_date_parse_hdwmy (void) diff = time(NULL) - mu_date_parse_hdwmy ("21d"); g_assert (diff > 0); g_assert_cmpuint (21 * 24 * 60 * 60 - diff, <=, 1); - + diff = time(NULL) - mu_date_parse_hdwmy ("2w"); g_assert (diff > 0); g_assert_cmpuint (2 * 7 * 24 * 60 * 60 - diff, <=, 1); - - - g_assert_cmpint (mu_date_parse_hdwmy("-1y"),==, (time_t)-1); + + + g_assert_cmpint (mu_date_parse_hdwmy("-1y"),==, (time_t)-1); } @@ -95,9 +95,9 @@ static void test_mu_date_complete_begin (void) { g_assert_cmpstr (mu_date_complete_s("2000", TRUE), ==, - "20000101000000"); + "20000101000000"); g_assert_cmpstr (mu_date_complete_s("2", TRUE), ==, - "20000101000000"); + "20000101000000"); g_assert_cmpstr (mu_date_complete_s ("", TRUE), ==, "00000101000000"); g_assert_cmpstr (mu_date_complete_s ("201007", TRUE), ==, @@ -113,9 +113,9 @@ static void test_mu_date_complete_end (void) { g_assert_cmpstr (mu_date_complete_s ("2000", FALSE), ==, - "20001231235959"); + "20001231235959"); g_assert_cmpstr (mu_date_complete_s ("2", FALSE), ==, - "29991231235959"); + "29991231235959"); g_assert_cmpstr (mu_date_complete_s ("", FALSE), ==, "99991231235959"); g_assert_cmpstr (mu_date_complete_s ("201007", FALSE), ==, @@ -134,7 +134,7 @@ test_mu_date_interpret_begin (void) { time_t now; now = time (NULL); - + g_assert_cmpstr (mu_date_interpret_s ("now", TRUE) , ==, mu_date_str_s("%Y%m%d%H%M%S", now)); @@ -147,7 +147,7 @@ test_mu_date_interpret_end (void) { time_t now; now = time (NULL); - + g_assert_cmpstr (mu_date_interpret_s ("now", FALSE) , ==, mu_date_str_s("%Y%m%d%H%M%S", now)); @@ -167,7 +167,7 @@ main (int argc, char *argv[]) /* mu_str_date */ g_test_add_func ("/mu-str/mu-date-str", test_mu_date_str); - + g_test_add_func ("/mu-str/mu_date_parse_hdwmy", test_mu_date_parse_hdwmy); g_test_add_func ("/mu-str/mu_date_complete_begin", @@ -180,10 +180,10 @@ main (int argc, char *argv[]) g_test_add_func ("/mu-str/mu_date_interpret_end", test_mu_date_interpret_end); - + g_log_set_handler (NULL, G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION, (GLogFunc)black_hole, NULL); - + return g_test_run (); } diff --git a/src/tests/test-mu-flags.c b/lib/tests/test-mu-flags.c index 4370993..b8c2a4e 100644 --- a/src/tests/test-mu-flags.c +++ b/lib/tests/test-mu-flags.c @@ -23,7 +23,7 @@ #endif /*HAVE_CONFIG_H*/ #include <glib.h> -#include "src/mu-flags.h" +#include "mu-flags.h" #include "test-mu-common.h" diff --git a/src/tests/test-mu-maildir.c b/lib/tests/test-mu-maildir.c index bb18747..17889aa 100644 --- a/src/tests/test-mu-maildir.c +++ b/lib/tests/test-mu-maildir.c @@ -29,8 +29,8 @@ #include <string.h> #include "test-mu-common.h" -#include "src/mu-maildir.h" -#include "src/mu-util.h" +#include "mu-maildir.h" +#include "mu-util.h" static void test_mu_maildir_mkdir_01 (void) diff --git a/src/tests/test-mu-msg-fields.c b/lib/tests/test-mu-msg-fields.c index 29f7e0b..2d8e796 100644 --- a/src/tests/test-mu-msg-fields.c +++ b/lib/tests/test-mu-msg-fields.c @@ -1,4 +1,4 @@ -/* +/* ** Copyright (C) 2008-2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ** ** This program is free software; you can redistribute it and/or modify it @@ -13,8 +13,8 @@ ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software Foundation, -** Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -** +** Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +** */ #if HAVE_CONFIG_H @@ -29,7 +29,7 @@ #include <locale.h> #include "test-mu-common.h" -#include "src/mu-msg-fields.h" +#include "mu-msg-fields.h" static void test_mu_msg_field_body (void) @@ -37,11 +37,11 @@ test_mu_msg_field_body (void) MuMsgFieldId field; field = MU_MSG_FIELD_ID_BODY_TEXT; - + g_assert_cmpstr (mu_msg_field_name(field),==, "body"); g_assert_cmpuint (mu_msg_field_shortcut(field),==, 'b'); g_assert_cmpuint (mu_msg_field_xapian_prefix(field),==, 'B'); - + g_assert_cmpuint (mu_msg_field_is_numeric(field), ==, FALSE); } @@ -51,11 +51,11 @@ test_mu_msg_field_subject (void) MuMsgFieldId field; field = MU_MSG_FIELD_ID_SUBJECT; - + g_assert_cmpstr (mu_msg_field_name(field),==, "subject"); g_assert_cmpuint (mu_msg_field_shortcut(field),==, 's'); g_assert_cmpuint (mu_msg_field_xapian_prefix(field),==, 'S'); - + g_assert_cmpuint (mu_msg_field_is_numeric(field), ==,FALSE); } @@ -65,7 +65,7 @@ test_mu_msg_field_to (void) MuMsgFieldId field; field = MU_MSG_FIELD_ID_TO; - + g_assert_cmpstr (mu_msg_field_name(field),==, "to"); g_assert_cmpuint (mu_msg_field_shortcut(field),==, 't'); g_assert_cmpuint (mu_msg_field_xapian_prefix(field),==, 'T'); @@ -80,7 +80,7 @@ test_mu_msg_field_prio (void) MuMsgFieldId field; field = MU_MSG_FIELD_ID_PRIO; - + g_assert_cmpstr (mu_msg_field_name(field),==, "prio"); g_assert_cmpuint (mu_msg_field_shortcut(field),==, 'p'); g_assert_cmpuint (mu_msg_field_xapian_prefix(field),==, 'P'); @@ -94,12 +94,12 @@ test_mu_msg_field_flags (void) MuMsgFieldId field; field = MU_MSG_FIELD_ID_FLAGS; - + g_assert_cmpstr (mu_msg_field_name(field),==, "flag"); g_assert_cmpuint (mu_msg_field_shortcut(field),==, 'g'); g_assert_cmpuint (mu_msg_field_xapian_prefix(field),==, 'G'); - g_assert_cmpuint (mu_msg_field_is_numeric(field),==, TRUE); + g_assert_cmpuint (mu_msg_field_is_numeric(field),==, TRUE); } @@ -124,11 +124,11 @@ main (int argc, char *argv[]) /* FIXME: add tests for mu_msg_str_flags; but note the * function simply calls mu_msg_field_str */ - + g_log_set_handler (NULL, G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, (GLogFunc)black_hole, NULL); - + return g_test_run (); } diff --git a/src/tests/test-mu-msg.c b/lib/tests/test-mu-msg.c index 2b7129c..780b2b5 100644 --- a/src/tests/test-mu-msg.c +++ b/lib/tests/test-mu-msg.c @@ -30,8 +30,8 @@ #include <locale.h> #include "test-mu-common.h" -#include "src/mu-msg.h" -#include "src/mu-str.h" +#include "mu-msg.h" +#include "mu-str.h" static gboolean check_contact_01 (MuMsgContact *contact, int *idx) diff --git a/src/tests/test-mu-store.c b/lib/tests/test-mu-store.c index 88554d4..6b15bf0 100644 --- a/src/tests/test-mu-store.c +++ b/lib/tests/test-mu-store.c @@ -31,7 +31,7 @@ #include <locale.h> #include "test-mu-common.h" -#include "src/mu-store.h" +#include "mu-store.h" static void test_mu_store_new_destroy (void) diff --git a/src/tests/test-mu-str.c b/lib/tests/test-mu-str.c index fadb888..83e2943 100644 --- a/src/tests/test-mu-str.c +++ b/lib/tests/test-mu-str.c @@ -31,8 +31,8 @@ #include <locale.h> #include "test-mu-common.h" -#include "src/mu-str.h" -#include "src/mu-msg-prio.h" +#include "mu-str.h" +#include "mu-msg-prio.h" diff --git a/src/tests/test-mu-util.c b/lib/tests/test-mu-util.c index 7f4aed5..56c1dda 100644 --- a/src/tests/test-mu-util.c +++ b/lib/tests/test-mu-util.c @@ -29,7 +29,7 @@ #include <limits.h> #include "test-mu-common.h" -#include "src/mu-util.h" +#include "lib/mu-util.h" static void test_mu_util_dir_expand_00 (void) diff --git a/src/tests/testdir/cur/1220863042.12663_1.mindcrime!2,S b/lib/tests/testdir/cur/1220863042.12663_1.mindcrime!2,S index ab1500f..ab1500f 100644 --- a/src/tests/testdir/cur/1220863042.12663_1.mindcrime!2,S +++ b/lib/tests/testdir/cur/1220863042.12663_1.mindcrime!2,S diff --git a/src/tests/testdir/cur/1220863060.12663_3.mindcrime!2,S b/lib/tests/testdir/cur/1220863060.12663_3.mindcrime!2,S index 4144dbb..4144dbb 100644 --- a/src/tests/testdir/cur/1220863060.12663_3.mindcrime!2,S +++ b/lib/tests/testdir/cur/1220863060.12663_3.mindcrime!2,S diff --git a/src/tests/testdir/cur/1220863087.12663_15.mindcrime!2,PS b/lib/tests/testdir/cur/1220863087.12663_15.mindcrime!2,PS index d6487c0..d6487c0 100644 --- a/src/tests/testdir/cur/1220863087.12663_15.mindcrime!2,PS +++ b/lib/tests/testdir/cur/1220863087.12663_15.mindcrime!2,PS diff --git a/src/tests/testdir/cur/1220863087.12663_19.mindcrime!2,S b/lib/tests/testdir/cur/1220863087.12663_19.mindcrime!2,S index 78efa2a..78efa2a 100644 --- a/src/tests/testdir/cur/1220863087.12663_19.mindcrime!2,S +++ b/lib/tests/testdir/cur/1220863087.12663_19.mindcrime!2,S diff --git a/src/tests/testdir/cur/1220863087.12663_5.mindcrime!2,S b/lib/tests/testdir/cur/1220863087.12663_5.mindcrime!2,S index de46cc8..de46cc8 100644 --- a/src/tests/testdir/cur/1220863087.12663_5.mindcrime!2,S +++ b/lib/tests/testdir/cur/1220863087.12663_5.mindcrime!2,S diff --git a/src/tests/testdir/cur/1220863087.12663_7.mindcrime!2,RS b/lib/tests/testdir/cur/1220863087.12663_7.mindcrime!2,RS index b5c0651..b5c0651 100644 --- a/src/tests/testdir/cur/1220863087.12663_7.mindcrime!2,RS +++ b/lib/tests/testdir/cur/1220863087.12663_7.mindcrime!2,RS diff --git a/src/tests/testdir/cur/1252168370_3.14675.cthulhu!2,S b/lib/tests/testdir/cur/1252168370_3.14675.cthulhu!2,S index 4fad706..4fad706 100644 --- a/src/tests/testdir/cur/1252168370_3.14675.cthulhu!2,S +++ b/lib/tests/testdir/cur/1252168370_3.14675.cthulhu!2,S diff --git a/src/tests/testdir/cur/1283599333.1840_11.cthulhu!2, b/lib/tests/testdir/cur/1283599333.1840_11.cthulhu!2, index 8349c3e..8349c3e 100644 --- a/src/tests/testdir/cur/1283599333.1840_11.cthulhu!2, +++ b/lib/tests/testdir/cur/1283599333.1840_11.cthulhu!2, diff --git a/src/tests/testdir/cur/1305664394.2171_402.cthulhu!2, b/lib/tests/testdir/cur/1305664394.2171_402.cthulhu!2, index 863f714..863f714 100644 --- a/src/tests/testdir/cur/1305664394.2171_402.cthulhu!2, +++ b/lib/tests/testdir/cur/1305664394.2171_402.cthulhu!2, diff --git a/src/tests/testdir/cur/encrypted!2,S b/lib/tests/testdir/cur/encrypted!2,S index b6470e7..b6470e7 100644 --- a/src/tests/testdir/cur/encrypted!2,S +++ b/lib/tests/testdir/cur/encrypted!2,S diff --git a/src/tests/testdir/cur/signed!2,S b/lib/tests/testdir/cur/signed!2,S index a2e7e21..a2e7e21 100644 --- a/src/tests/testdir/cur/signed!2,S +++ b/lib/tests/testdir/cur/signed!2,S diff --git a/src/tests/testdir/cur/signed-encrypted!2,S b/lib/tests/testdir/cur/signed-encrypted!2,S index a3910e6..a3910e6 100644 --- a/src/tests/testdir/cur/signed-encrypted!2,S +++ b/lib/tests/testdir/cur/signed-encrypted!2,S diff --git a/src/tests/testdir/new/1220863087.12663_21.mindcrime b/lib/tests/testdir/new/1220863087.12663_21.mindcrime index 4101716..4101716 100644 --- a/src/tests/testdir/new/1220863087.12663_21.mindcrime +++ b/lib/tests/testdir/new/1220863087.12663_21.mindcrime diff --git a/src/tests/testdir/new/1220863087.12663_23.mindcrime b/lib/tests/testdir/new/1220863087.12663_23.mindcrime index ca46f2b..ca46f2b 100644 --- a/src/tests/testdir/new/1220863087.12663_23.mindcrime +++ b/lib/tests/testdir/new/1220863087.12663_23.mindcrime diff --git a/src/tests/testdir/new/1220863087.12663_25.mindcrime b/lib/tests/testdir/new/1220863087.12663_25.mindcrime index 588ace1..588ace1 100644 --- a/src/tests/testdir/new/1220863087.12663_25.mindcrime +++ b/lib/tests/testdir/new/1220863087.12663_25.mindcrime diff --git a/src/tests/testdir/new/1220863087.12663_9.mindcrime b/lib/tests/testdir/new/1220863087.12663_9.mindcrime index 734ee35..734ee35 100644 --- a/src/tests/testdir/new/1220863087.12663_9.mindcrime +++ b/lib/tests/testdir/new/1220863087.12663_9.mindcrime diff --git a/src/tests/testdir/tmp/1220863087.12663.ignore b/lib/tests/testdir/tmp/1220863087.12663.ignore index 588ace1..588ace1 100644 --- a/src/tests/testdir/tmp/1220863087.12663.ignore +++ b/lib/tests/testdir/tmp/1220863087.12663.ignore diff --git a/src/tests/testdir2/Foo/cur/arto.eml b/lib/tests/testdir2/Foo/cur/arto.eml index ffa0526..ffa0526 100644 --- a/src/tests/testdir2/Foo/cur/arto.eml +++ b/lib/tests/testdir2/Foo/cur/arto.eml diff --git a/src/tests/testdir2/Foo/cur/mail5 b/lib/tests/testdir2/Foo/cur/mail5 index b12387a..b12387a 100644 --- a/src/tests/testdir2/Foo/cur/mail5 +++ b/lib/tests/testdir2/Foo/cur/mail5 diff --git a/src/tests/testdir2/Foo/new/.noindex b/lib/tests/testdir2/Foo/new/.noindex index e69de29..e69de29 100644 --- a/src/tests/testdir2/Foo/new/.noindex +++ b/lib/tests/testdir2/Foo/new/.noindex diff --git a/src/tests/testdir2/Foo/tmp/.noindex b/lib/tests/testdir2/Foo/tmp/.noindex index e69de29..e69de29 100644 --- a/src/tests/testdir2/Foo/tmp/.noindex +++ b/lib/tests/testdir2/Foo/tmp/.noindex diff --git a/src/tests/testdir2/bar/cur/181736.eml b/lib/tests/testdir2/bar/cur/181736.eml index 56255c4..56255c4 100644 --- a/src/tests/testdir2/bar/cur/181736.eml +++ b/lib/tests/testdir2/bar/cur/181736.eml diff --git a/src/tests/testdir2/bar/cur/mail1 b/lib/tests/testdir2/bar/cur/mail1 index b5bb307..b5bb307 100644 --- a/src/tests/testdir2/bar/cur/mail1 +++ b/lib/tests/testdir2/bar/cur/mail1 diff --git a/src/tests/testdir2/bar/cur/mail2 b/lib/tests/testdir2/bar/cur/mail2 index 5bb9208..5bb9208 100644 --- a/src/tests/testdir2/bar/cur/mail2 +++ b/lib/tests/testdir2/bar/cur/mail2 diff --git a/src/tests/testdir2/bar/cur/mail3 b/lib/tests/testdir2/bar/cur/mail3 index 646365e..646365e 100644 --- a/src/tests/testdir2/bar/cur/mail3 +++ b/lib/tests/testdir2/bar/cur/mail3 diff --git a/src/tests/testdir2/bar/cur/mail4 b/lib/tests/testdir2/bar/cur/mail4 index 1f16089..1f16089 100644 --- a/src/tests/testdir2/bar/cur/mail4 +++ b/lib/tests/testdir2/bar/cur/mail4 diff --git a/src/tests/testdir2/bar/cur/mail5 b/lib/tests/testdir2/bar/cur/mail5 index 8ab972a..8ab972a 100644 --- a/src/tests/testdir2/bar/cur/mail5 +++ b/lib/tests/testdir2/bar/cur/mail5 diff --git a/src/tests/testdir2/bar/cur/mail6 b/lib/tests/testdir2/bar/cur/mail6 index 1d5c1d7..1d5c1d7 100644 --- a/src/tests/testdir2/bar/cur/mail6 +++ b/lib/tests/testdir2/bar/cur/mail6 diff --git a/src/tests/testdir2/bar/new/.noindex b/lib/tests/testdir2/bar/new/.noindex index e69de29..e69de29 100644 --- a/src/tests/testdir2/bar/new/.noindex +++ b/lib/tests/testdir2/bar/new/.noindex diff --git a/src/tests/testdir2/bar/tmp/.noindex b/lib/tests/testdir2/bar/tmp/.noindex index e69de29..e69de29 100644 --- a/src/tests/testdir2/bar/tmp/.noindex +++ b/lib/tests/testdir2/bar/tmp/.noindex diff --git a/src/tests/testdir2/wom_bat/cur/atomic b/lib/tests/testdir2/wom_bat/cur/atomic index c3c6792..c3c6792 100644 --- a/src/tests/testdir2/wom_bat/cur/atomic +++ b/lib/tests/testdir2/wom_bat/cur/atomic diff --git a/src/tests/testdir2/wom_bat/cur/rfc822.1 b/lib/tests/testdir2/wom_bat/cur/rfc822.1 index 71c3107..71c3107 100644 --- a/src/tests/testdir2/wom_bat/cur/rfc822.1 +++ b/lib/tests/testdir2/wom_bat/cur/rfc822.1 diff --git a/src/tests/testdir2/wom_bat/cur/rfc822.2 b/lib/tests/testdir2/wom_bat/cur/rfc822.2 index 316fa3f..316fa3f 100644 --- a/src/tests/testdir2/wom_bat/cur/rfc822.2 +++ b/lib/tests/testdir2/wom_bat/cur/rfc822.2 diff --git a/src/tests/testdir3/cycle/cur/cycle0 b/lib/tests/testdir3/cycle/cur/cycle0 index 67c08ee..67c08ee 100644 --- a/src/tests/testdir3/cycle/cur/cycle0 +++ b/lib/tests/testdir3/cycle/cur/cycle0 diff --git a/src/tests/testdir3/cycle/cur/cycle0.0 b/lib/tests/testdir3/cycle/cur/cycle0.0 index 3222a2c..3222a2c 100644 --- a/src/tests/testdir3/cycle/cur/cycle0.0 +++ b/lib/tests/testdir3/cycle/cur/cycle0.0 diff --git a/src/tests/testdir3/cycle/cur/cycle0.0.0 b/lib/tests/testdir3/cycle/cur/cycle0.0.0 index 907f342..907f342 100644 --- a/src/tests/testdir3/cycle/cur/cycle0.0.0 +++ b/lib/tests/testdir3/cycle/cur/cycle0.0.0 diff --git a/src/tests/testdir3/cycle/cur/rogue0 b/lib/tests/testdir3/cycle/cur/rogue0 index 2691070..2691070 100644 --- a/src/tests/testdir3/cycle/cur/rogue0 +++ b/lib/tests/testdir3/cycle/cur/rogue0 diff --git a/src/tests/testdir3/cycle/new/.noindex b/lib/tests/testdir3/cycle/new/.noindex index e69de29..e69de29 100644 --- a/src/tests/testdir3/cycle/new/.noindex +++ b/lib/tests/testdir3/cycle/new/.noindex diff --git a/src/tests/testdir3/cycle/tmp/.noindex b/lib/tests/testdir3/cycle/tmp/.noindex index e69de29..e69de29 100644 --- a/src/tests/testdir3/cycle/tmp/.noindex +++ b/lib/tests/testdir3/cycle/tmp/.noindex diff --git a/src/tests/testdir3/tree/cur/child0.0 b/lib/tests/testdir3/tree/cur/child0.0 index 58da7d6..58da7d6 100644 --- a/src/tests/testdir3/tree/cur/child0.0 +++ b/lib/tests/testdir3/tree/cur/child0.0 diff --git a/src/tests/testdir3/tree/cur/child0.1 b/lib/tests/testdir3/tree/cur/child0.1 index 163fadb..163fadb 100644 --- a/src/tests/testdir3/tree/cur/child0.1 +++ b/lib/tests/testdir3/tree/cur/child0.1 diff --git a/src/tests/testdir3/tree/cur/child0.1.0 b/lib/tests/testdir3/tree/cur/child0.1.0 index 40a9eb2..40a9eb2 100644 --- a/src/tests/testdir3/tree/cur/child0.1.0 +++ b/lib/tests/testdir3/tree/cur/child0.1.0 diff --git a/src/tests/testdir3/tree/cur/child2.0.0 b/lib/tests/testdir3/tree/cur/child2.0.0 index 4e4446e..4e4446e 100644 --- a/src/tests/testdir3/tree/cur/child2.0.0 +++ b/lib/tests/testdir3/tree/cur/child2.0.0 diff --git a/src/tests/testdir3/tree/cur/child3.0.0.0.0 b/lib/tests/testdir3/tree/cur/child3.0.0.0.0 index 1e2f4ab..1e2f4ab 100644 --- a/src/tests/testdir3/tree/cur/child3.0.0.0.0 +++ b/lib/tests/testdir3/tree/cur/child3.0.0.0.0 diff --git a/src/tests/testdir3/tree/cur/child4.0 b/lib/tests/testdir3/tree/cur/child4.0 index 7d0ed79..7d0ed79 100644 --- a/src/tests/testdir3/tree/cur/child4.0 +++ b/lib/tests/testdir3/tree/cur/child4.0 diff --git a/src/tests/testdir3/tree/cur/child4.1 b/lib/tests/testdir3/tree/cur/child4.1 index 295d1b1..295d1b1 100644 --- a/src/tests/testdir3/tree/cur/child4.1 +++ b/lib/tests/testdir3/tree/cur/child4.1 diff --git a/src/tests/testdir3/tree/cur/root0 b/lib/tests/testdir3/tree/cur/root0 index deb64bb..deb64bb 100644 --- a/src/tests/testdir3/tree/cur/root0 +++ b/lib/tests/testdir3/tree/cur/root0 diff --git a/src/tests/testdir3/tree/cur/root1 b/lib/tests/testdir3/tree/cur/root1 index fc3efd8..fc3efd8 100644 --- a/src/tests/testdir3/tree/cur/root1 +++ b/lib/tests/testdir3/tree/cur/root1 diff --git a/src/tests/testdir3/tree/cur/root2 b/lib/tests/testdir3/tree/cur/root2 index 6ba2451..6ba2451 100644 --- a/src/tests/testdir3/tree/cur/root2 +++ b/lib/tests/testdir3/tree/cur/root2 diff --git a/src/tests/testdir3/tree/new/.noindex b/lib/tests/testdir3/tree/new/.noindex index e69de29..e69de29 100644 --- a/src/tests/testdir3/tree/new/.noindex +++ b/lib/tests/testdir3/tree/new/.noindex diff --git a/src/tests/testdir3/tree/tmp/.noindex b/lib/tests/testdir3/tree/tmp/.noindex index e69de29..e69de29 100644 --- a/src/tests/testdir3/tree/tmp/.noindex +++ b/lib/tests/testdir3/tree/tmp/.noindex diff --git a/src/mu-cmd-cfind.c b/mu/mu-cmd-cfind.c index d4cd9aa..d4cd9aa 100644 --- a/src/mu-cmd-cfind.c +++ b/mu/mu-cmd-cfind.c diff --git a/src/mu-cmd-extract.c b/mu/mu-cmd-extract.c index 7240497..7240497 100644 --- a/src/mu-cmd-extract.c +++ b/mu/mu-cmd-extract.c diff --git a/src/mu-cmd-find.c b/mu/mu-cmd-find.c index bd073ff..bd073ff 100644 --- a/src/mu-cmd-find.c +++ b/mu/mu-cmd-find.c diff --git a/src/mu-cmd-index.c b/mu/mu-cmd-index.c index a36db38..a36db38 100644 --- a/src/mu-cmd-index.c +++ b/mu/mu-cmd-index.c diff --git a/src/mu-cmd-server.c b/mu/mu-cmd-server.c index 5c52eb9..5c52eb9 100644 --- a/src/mu-cmd-server.c +++ b/mu/mu-cmd-server.c diff --git a/src/mu-cmd.c b/mu/mu-cmd.c index 491b7be..491b7be 100644 --- a/src/mu-cmd.c +++ b/mu/mu-cmd.c diff --git a/src/mu-cmd.h b/mu/mu-cmd.h index 1b11742..1b11742 100644 --- a/src/mu-cmd.h +++ b/mu/mu-cmd.h diff --git a/src/mu-config.c b/mu/mu-config.c index ed57246..ed57246 100644 --- a/src/mu-config.c +++ b/mu/mu-config.c diff --git a/src/mu-config.h b/mu/mu-config.h index ead7994..ead7994 100644 --- a/src/mu-config.h +++ b/mu/mu-config.h @@ -24,10 +24,14 @@ #endif /*HAVE_CONFIG_H*/ #include <glib.h> +#include <glib-object.h> +#include <locale.h> +#include "mu-config.h" #include "mu-cmd.h" #include "mu-runtime.h" + static void handle_error (GError *err) { @@ -66,16 +70,28 @@ main (int argc, char *argv[]) { GError *err; MuError rv; + MuConfig *conf; + + setlocale (LC_ALL, ""); + g_type_init (); + + conf = mu_config_init (&argc, &argv); + if (!conf) + return 1; - if (!mu_runtime_init_from_cmdline (&argc, &argv, "mu")) + if (!mu_runtime_init (conf->muhome, PACKAGE_NAME)) { + mu_config_uninit (conf); return 1; + } err = NULL; - rv = mu_cmd_execute (mu_runtime_config(), &err); + rv = mu_cmd_execute (conf, &err); handle_error (err); g_clear_error (&err); + + mu_config_uninit (conf); mu_runtime_uninit (); return rv; diff --git a/src/tests/test-mu-cmd-cfind.c b/mu/tests/test-mu-cmd-cfind.c index 7b6174c..66e6cba 100644 --- a/src/tests/test-mu-cmd-cfind.c +++ b/mu/tests/test-mu-cmd-cfind.c @@ -32,7 +32,7 @@ #include <string.h> #include "test-mu-common.h" -#include "src/mu-store.h" +#include "mu-store.h" static gchar* fill_contacts_cache (void) diff --git a/src/tests/test-mu-cmd.c b/mu/tests/test-mu-cmd.c index b0db4a2..1b0afa8 100644 --- a/src/tests/test-mu-cmd.c +++ b/mu/tests/test-mu-cmd.c @@ -32,7 +32,7 @@ #include <string.h> #include "test-mu-common.h" -#include "src/mu-store.h" +#include "mu-store.h" /* tests for the command line interface, uses testdir2 */ diff --git a/src/tests/test-mu-contacts.c b/mu/tests/test-mu-contacts.c index 695feb2..428acf4 100644 --- a/src/tests/test-mu-contacts.c +++ b/mu/tests/test-mu-contacts.c @@ -1,4 +1,4 @@ -/* +/* ** Copyright (C) 2008-2011 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ** ** This program is free software; you can redistribute it and/or modify it @@ -13,8 +13,8 @@ ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software Foundation, -** Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -** +** Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +** */ #ifdef HAVE_CONFIG_H @@ -29,22 +29,22 @@ #include <string.h> #include "test-mu-common.h" -#include "src/mu-contacts.h" +#include "mu-contacts.h" static gchar* fill_database (void) { gchar *cmdline, *tmpdir; - + tmpdir = test_mu_common_get_random_tmpdir(); cmdline = g_strdup_printf ("%s index --muhome=%s --maildir=%s" " --quiet", MU_PROGRAM, tmpdir, MU_TESTMAILDIR); - + g_assert (g_spawn_command_line_sync (cmdline, NULL, NULL, NULL, NULL)); g_free (cmdline); - + return tmpdir; } @@ -59,7 +59,7 @@ static Contact* contact_new (const char *email, const char *name, size_t tstamp) { Contact *contact; - + contact = g_slice_new (Contact); contact->name = name ? g_strdup (name) :NULL; contact->email = email ? g_strdup (email) : NULL; @@ -87,7 +87,7 @@ each_contact (const char *email, const char *name, time_t tstamp, Contact *contact; /* g_print ("[n:%s, e:%s]\n", name, email); */ - + contact = contact_new (email, name, tstamp); *lst = g_slist_prepend (*lst, contact); } @@ -100,7 +100,7 @@ has_contact (GSList *lst, const char* name_or_email, gboolean use_name) c = (Contact*)lst->data; /* g_print ("{n:%s,e:%s}\n", c->name, c->email); */ - + if (use_name && g_strcmp0(name_or_email, c->name) == 0) return TRUE; if (g_strcmp0 (name_or_email, c->email) == 0) @@ -133,13 +133,13 @@ test_mu_contacts_01 (void) MuContacts *contacts; gchar *muhome, *contactsfile; GSList *clist; - + muhome = fill_database (); g_assert (muhome != NULL); contactsfile = g_strdup_printf ("%s%ccache%ccontacts", muhome, G_DIR_SEPARATOR, G_DIR_SEPARATOR); /* g_print ("[%s]\n", contactsfile); */ - + contacts = mu_contacts_new (contactsfile); g_assert (contacts); @@ -156,12 +156,12 @@ test_mu_contacts_01 (void) g_assert (has_contact (clist, "testmu@testmu.xx", FALSE)); g_assert (has_contact (clist, "Helmut Kröger", TRUE)); g_assert (has_contact (clist, "hk@testmu.xxx", FALSE)); - + g_slist_foreach (clist, (GFunc)contact_destroy, NULL); g_slist_free (clist); mu_contacts_destroy (contacts); - + g_free (contactsfile); g_free (muhome); } @@ -171,15 +171,14 @@ int main (int argc, char *argv[]) { int rv; - - g_test_init (&argc, &argv, NULL); + + g_test_init (&argc, &argv, NULL); g_test_add_func ("/mu-contacts/test-mu-contacts-01", test_mu_contacts_01); - + g_log_set_handler (NULL, G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION, (GLogFunc)black_hole, NULL); rv = g_test_run (); - + return rv; } - diff --git a/src/tests/test-mu-query.c b/mu/tests/test-mu-query.c index 6bdb0fd..94cc00f 100644 --- a/src/tests/test-mu-query.c +++ b/mu/tests/test-mu-query.c @@ -32,9 +32,9 @@ #include <locale.h> #include "test-mu-common.h" -#include "src/mu-query.h" -#include "src/mu-str.h" -#include "src/mu-store.h" +#include "mu-query.h" +#include "mu-str.h" +#include "mu-store.h" static gchar* fill_database (const char *testdir) diff --git a/src/tests/test-mu-runtime.c b/mu/tests/test-mu-runtime.c index 60fee22..60fee22 100644 --- a/src/tests/test-mu-runtime.c +++ b/mu/tests/test-mu-runtime.c diff --git a/src/tests/test-mu-threads.c b/mu/tests/test-mu-threads.c index 32fd8b2..4310de9 100644 --- a/src/tests/test-mu-threads.c +++ b/mu/tests/test-mu-threads.c @@ -31,8 +31,8 @@ #include <string.h> #include "test-mu-common.h" -#include "src/mu-query.h" -#include "src/mu-str.h" +#include "mu-query.h" +#include "mu-str.h" static gchar* fill_database (const char *testdir) diff --git a/toys/msg2pdf/Makefile.am b/toys/msg2pdf/Makefile.am index 13b90bd..e85ce3d 100644 --- a/toys/msg2pdf/Makefile.am +++ b/toys/msg2pdf/Makefile.am @@ -20,7 +20,7 @@ include $(top_srcdir)/gtest.mk SUBDIRS= . -INCLUDES=-I${top_srcdir}/src $(GTK_CFLAGS) $(WEBKIT_CFLAGS) -DICONDIR='"$(icondir)"' +INCLUDES=-I${top_srcdir}/lib $(GTK_CFLAGS) $(WEBKIT_CFLAGS) -DICONDIR='"$(icondir)"' # don't use -Werror, as it might break on other compilers # use -Wno-unused-parameters, because some callbacks may not @@ -28,8 +28,7 @@ INCLUDES=-I${top_srcdir}/src $(GTK_CFLAGS) $(WEBKIT_CFLAGS) -DICONDIR='"$(icondi AM_CFLAGS=-Wall -Wextra -Wno-unused-parameter -Wdeclaration-after-statement AM_CXXFLAGS=-Wall -Wextra -Wno-unused-parameter - -noinst_PROGRAMS= \ +noinst_PROGRAMS= \ msg2pdf # note, mug.cc is '.cc' only because libmu must explicitly @@ -49,7 +48,7 @@ DISTCLEANFILES= \ $(BUILT_SOURCES) -msg2pdf_LDADD= \ - ${top_builddir}/src/libmu.la \ - $(GTK_LIBS) \ +msg2pdf_LDADD= \ + ${top_builddir}/lib/libmu.la \ + $(GTK_LIBS) \ ${WEBKIT_LIBS} diff --git a/toys/mug/Makefile.am b/toys/mug/Makefile.am index 603c875..61b40aa 100644 --- a/toys/mug/Makefile.am +++ b/toys/mug/Makefile.am @@ -20,7 +20,7 @@ include $(top_srcdir)/gtest.mk SUBDIRS= . -INCLUDES=-I${top_srcdir}/src $(GTK_CFLAGS) -DICONDIR='"$(icondir)"' +INCLUDES=-I${top_srcdir}/lib $(GTK_CFLAGS) -DICONDIR='"$(icondir)"' # don't use -Werror, as it might break on other compilers # use -Wno-unused-parameters, because some callbacks may not @@ -58,8 +58,5 @@ DISTCLEANFILES= \ mug_LDADD= \ - ${top_builddir}/src/libmu.la \ + ${top_builddir}/lib/libmu.la \ ${GTK_LIBS} - - - diff --git a/toys/mug/mug-msg-list-view.c b/toys/mug/mug-msg-list-view.c index bf50434..a9c08f4 100644 --- a/toys/mug/mug-msg-list-view.c +++ b/toys/mug/mug-msg-list-view.c @@ -1,6 +1,6 @@ /* -*-mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-*/ /* -** Copyright (C) 2008-2011 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> +** Copyright (C) 2008-2012 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ** ** 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 diff --git a/toys/mug2/Makefile.am b/toys/mug2/Makefile.am index 7b3062f..4c5865d 100644 --- a/toys/mug2/Makefile.am +++ b/toys/mug2/Makefile.am @@ -19,7 +19,7 @@ include $(top_srcdir)/gtest.mk # enforce compiling this dir first before decending into tests/ SUBDIRS= . -INCLUDES=-I${top_srcdir} -I${top_srcdir}/src $(GTK_CFLAGS) $(WEBKIT_CFLAGS) -DICONDIR='"$(icondir)"' \ +INCLUDES=-I${top_srcdir} -I${top_srcdir}/lib $(GTK_CFLAGS) $(WEBKIT_CFLAGS) -DICONDIR='"$(icondir)"' \ -DMUG2DIR='"$(abs_srcdir)"' -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE # don't use -Werror, as it might break on other compilers @@ -57,10 +57,9 @@ DISTCLEANFILES= \ mug2_LDADD= \ - ${top_builddir}/src/libmu.la \ + ${top_builddir}/lib/libmu.la \ ${top_builddir}/widgets/libmuwidgets.la \ ${GTK_LIBS} EXTRA_DIST= \ mug.svg - diff --git a/widgets/Makefile.am b/widgets/Makefile.am index b65449a..0417f1b 100644 --- a/widgets/Makefile.am +++ b/widgets/Makefile.am @@ -18,7 +18,7 @@ include $(top_srcdir)/gtest.mk # enforce compiling this dir first before decending into tests/ SUBDIRS= . -INCLUDES=-I${top_srcdir}/src $(GTK_CFLAGS) $(WEBKIT_CFLAGS) $(GIO_CFLAGS) -DICONDIR='"$(icondir)"' \ +INCLUDES=-I${top_srcdir}/lib $(GTK_CFLAGS) $(WEBKIT_CFLAGS) $(GIO_CFLAGS) -DICONDIR='"$(icondir)"' \ -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE # don't use -Werror, as it might break on other compilers @@ -43,8 +43,7 @@ libmuwidgets_la_SOURCES= \ mu-msg-view.c libmuwidgets_la_LIBADD= \ - ${top_builddir}/src/libmu.la \ + ${top_builddir}/lib/libmu.la \ ${GTK_LIBS} \ ${WEBKIT_LIBS} \ ${GIO_LIBS} - diff --git a/widgets/mu-msg-attach-view.c b/widgets/mu-msg-attach-view.c index 1a79afa..122e4bb 100644 --- a/widgets/mu-msg-attach-view.c +++ b/widgets/mu-msg-attach-view.c @@ -19,7 +19,7 @@ #include "mu-msg-attach-view.h" #include "mu-widget-util.h" -#include <mu-msg-part.h> +#include <lib/mu-msg-part.h> enum { ICON_COL, diff --git a/widgets/mu-msg-attach-view.h b/widgets/mu-msg-attach-view.h index 55efd6c..d49b02f 100644 --- a/widgets/mu-msg-attach-view.h +++ b/widgets/mu-msg-attach-view.h @@ -22,7 +22,7 @@ #define __MU_MSG_ATTACH_VIEW_H__ #include <gtk/gtk.h> -#include <mu-msg.h> +#include <lib/mu-msg.h> G_BEGIN_DECLS @@ -65,4 +65,3 @@ int mu_msg_attach_view_set_message (MuMsgAttachView *self, MuMsg *msg); G_END_DECLS #endif /* __MU_MSG_ATTACH_VIEW_H__ */ - diff --git a/widgets/mu-msg-header-view.c b/widgets/mu-msg-header-view.c index 26f62fb..2509cb2 100644 --- a/widgets/mu-msg-header-view.c +++ b/widgets/mu-msg-header-view.c @@ -19,8 +19,8 @@ #include "mu-msg-header-view.h" -#include <mu-str.h> -#include <mu-date.h> +#include <lib/mu-str.h> +#include <lib/mu-date.h> #if HAVE_CONFIG_H #include <config.h> diff --git a/widgets/mu-msg-view.c b/widgets/mu-msg-view.c index 119520f..3cf0419 100644 --- a/widgets/mu-msg-view.c +++ b/widgets/mu-msg-view.c @@ -25,7 +25,7 @@ #include "mu-msg-body-view.h" #include "mu-msg-header-view.h" #include "mu-msg-attach-view.h" -#include "mu-msg-part.h" +#include <lib/mu-msg-part.h> /* 'private'/'protected' functions */ |
