]> git.notmuchmail.org Git - notmuch/blobdiff - database.cc
Implement 'notmuch dump'.
[notmuch] / database.cc
index 7e678d87b8a506524663814e55b502309c74ed37..041cffdc9afe49b01a2c54e86a87b88610d25b0d 100644 (file)
@@ -18,7 +18,7 @@
  * Author: Carl Worth <cworth@cworth.org>
  */
 
  * Author: Carl Worth <cworth@cworth.org>
  */
 
-#include "notmuch-private.h"
+#include "database-private.h"
 
 #include <iostream>
 
 
 #include <iostream>
 
 
 using namespace std;
 
 
 using namespace std;
 
-struct _notmuch_database {
-    char *path;
-    Xapian::WritableDatabase *xapian_db;
-    Xapian::TermGenerator *term_gen;
-};
-
 #define ARRAY_SIZE(arr) (sizeof (arr) / sizeof (arr[0]))
 
 /* Xapian complains if we provide a term longer than this. */
 #define ARRAY_SIZE(arr) (sizeof (arr) / sizeof (arr[0]))
 
 /* Xapian complains if we provide a term longer than this. */
@@ -463,6 +457,7 @@ notmuch_database_open (const char *path)
     notmuch->path = xstrdup (path);
 
     try {
     notmuch->path = xstrdup (path);
 
     try {
+       Xapian::PostingIterator i;
        notmuch->xapian_db = new Xapian::WritableDatabase (xapian_path,
                                                           Xapian::DB_CREATE_OR_OPEN);
     } catch (const Xapian::Error &error) {
        notmuch->xapian_db = new Xapian::WritableDatabase (xapian_path,
                                                           Xapian::DB_CREATE_OR_OPEN);
     } catch (const Xapian::Error &error) {