unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] lib: whitespace cleanup
@ 2016-05-28 17:45 Tomi Ollila
  2016-06-05 11:38 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: Tomi Ollila @ 2016-05-28 17:45 UTC (permalink / raw)
  To: notmuch; +Cc: tomi.ollila

From: Tomi Ollila <tomi.ollila@iki.fi>

Cleaned the following whitespace in lib/* files:

lib/index.cc:              1 line:  trailing whitespace
lib/database.cc            5 lines: 8 spaces at the beginning of line
lib/notmuch-private.h:     4 lines: 8 spaces at the beginning of line
lib/message.cc:            1 line:  trailing whitespace
lib/sha1.c:                1 line:  empty lines at the end of file
lib/query.cc:              2 lines: 8 spaces at the beginning of line
lib/gen-version-script.sh: 1 line:  trailing whitespace
---

Cleaned lib as it was easiest to compare these doesn't collide
with any patches in review queue. There are plenty of more to
be cleaned up, perhaps later...

 lib/database.cc           | 10 +++++-----
 lib/gen-version-script.sh |  2 +-
 lib/index.cc              |  2 +-
 lib/message.cc            |  2 +-
 lib/notmuch-private.h     |  8 ++++----
 lib/query.cc              |  4 ++--
 lib/sha1.c                |  1 -
 7 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/lib/database.cc b/lib/database.cc
index 96300008765e..0b6041022613 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -2177,8 +2177,8 @@ _notmuch_database_link_message_to_parents (notmuch_database_t *notmuch,
      * References header, if available.  If not, fall back to the
      * first message ID in the In-Reply-To header. */
     if (last_ref_message_id) {
-        _notmuch_message_add_term (message, "replyto",
-                                   last_ref_message_id);
+	_notmuch_message_add_term (message, "replyto",
+				   last_ref_message_id);
     } else if (in_reply_to_message_id) {
 	_notmuch_message_add_term (message, "replyto",
 			     in_reply_to_message_id);
@@ -2287,15 +2287,15 @@ _consume_metadata_thread_id (void *ctx, notmuch_database_t *notmuch,
     if (stored_id.empty ()) {
 	return NULL;
     } else {
-        Xapian::WritableDatabase *db;
+	Xapian::WritableDatabase *db;
 
 	db = static_cast <Xapian::WritableDatabase *> (notmuch->xapian_db);
 
 	/* Clear the metadata for this message ID. We don't need it
 	 * anymore. */
-        db->set_metadata (metadata_key, "");
+	db->set_metadata (metadata_key, "");
 
-        return talloc_strdup (ctx, stored_id.c_str ());
+	return talloc_strdup (ctx, stored_id.c_str ());
     }
 }
 
diff --git a/lib/gen-version-script.sh b/lib/gen-version-script.sh
index 847700114ef8..0f908093dc5e 100644
--- a/lib/gen-version-script.sh
+++ b/lib/gen-version-script.sh
@@ -17,7 +17,7 @@ nm  $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $3 ~ "Xapian.*Error" {print $3
 while read sym; do
     demangled=$(c++filt $sym)
     case $demangled in
-	typeinfo*) 
+	typeinfo*)
 	    printf "\t$sym;\n"
 	    ;;
 	*)
diff --git a/lib/index.cc b/lib/index.cc
index f166aefd2fc1..8aa844e4161d 100644
--- a/lib/index.cc
+++ b/lib/index.cc
@@ -144,7 +144,7 @@ filter_filter (GMimeFilter *gmime_filter, char *inbuf, size_t inlen, size_t pres
 	{9,  ' ',  ' ',  10, 0},
 	{10, '\n', '\n', 11, 10},
 	{11, 'M',  'M',  12, 0},
-	{12, ' ',  '`',  12, 11}  
+	{12, ' ',  '`',  12, 11}
     };
     int next;
 
diff --git a/lib/message.cc b/lib/message.cc
index 68393055b3eb..022268796fc7 100644
--- a/lib/message.cc
+++ b/lib/message.cc
@@ -1444,7 +1444,7 @@ notmuch_message_maildir_flags_to_tags (notmuch_message_t *message)
 
     for (i = 0; i < ARRAY_SIZE(flag2tag); i++) {
 	if ((strchr (combined_flags, flag2tag[i].flag) != NULL)
-	    ^ 
+	    ^
 	    flag2tag[i].inverse)
 	{
 	    status = notmuch_message_add_tag (message, flag2tag[i].tag);
diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h
index 92807975bb94..6063262a1e3a 100644
--- a/lib/notmuch-private.h
+++ b/lib/notmuch-private.h
@@ -158,8 +158,8 @@ typedef enum _notmuch_private_status {
     ((private_status >= (notmuch_private_status_t) NOTMUCH_STATUS_LAST_STATUS)\
      ?									\
      _internal_error (format " (%s).\n",				\
-                      ##__VA_ARGS__,					\
-                      __location__),					\
+		      ##__VA_ARGS__,					\
+		      __location__),					\
      (notmuch_status_t) NOTMUCH_PRIVATE_STATUS_SUCCESS			\
      :									\
      (notmuch_status_t) private_status)
@@ -477,11 +477,11 @@ _notmuch_mset_messages_move_to_next (notmuch_messages_t *messages);
 
 notmuch_bool_t
 _notmuch_doc_id_set_contains (notmuch_doc_id_set_t *doc_ids,
-                              unsigned int doc_id);
+			      unsigned int doc_id);
 
 void
 _notmuch_doc_id_set_remove (notmuch_doc_id_set_t *doc_ids,
-                            unsigned int doc_id);
+			    unsigned int doc_id);
 
 /* querying xapian documents by type (e.g. "mail" or "ghost"): */
 notmuch_status_t
diff --git a/lib/query.cc b/lib/query.cc
index 0875b0e42755..7235fde12f56 100644
--- a/lib/query.cc
+++ b/lib/query.cc
@@ -276,7 +276,7 @@ _notmuch_query_search_documents (notmuch_query_t *query,
 	case NOTMUCH_SORT_MESSAGE_ID:
 	    enquire.set_sort_by_value (NOTMUCH_VALUE_MESSAGE_ID, FALSE);
 	    break;
-        case NOTMUCH_SORT_UNSORTED:
+	case NOTMUCH_SORT_UNSORTED:
 	    break;
 	}
 
@@ -412,7 +412,7 @@ _notmuch_doc_id_set_contains (notmuch_doc_id_set_t *doc_ids,
 
 void
 _notmuch_doc_id_set_remove (notmuch_doc_id_set_t *doc_ids,
-                            unsigned int doc_id)
+			    unsigned int doc_id)
 {
     if (doc_id < doc_ids->bound)
 	doc_ids->bitmap[DOCIDSET_WORD(doc_id)] &= ~(1 << DOCIDSET_BIT(doc_id));
diff --git a/lib/sha1.c b/lib/sha1.c
index 94060d577233..8a6d42299e75 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -112,4 +112,3 @@ _notmuch_sha1_of_file (const char *filename)
 
     return result;
 }
-
-- 
2.8.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] lib: whitespace cleanup
  2016-05-28 17:45 [PATCH] lib: whitespace cleanup Tomi Ollila
@ 2016-06-05 11:38 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2016-06-05 11:38 UTC (permalink / raw)
  To: Tomi Ollila, notmuch; +Cc: tomi.ollila

Tomi Ollila <too@iki.fi> writes:

> From: Tomi Ollila <tomi.ollila@iki.fi>
>
> Cleaned the following whitespace in lib/* files:
>
> lib/index.cc:              1 line:  trailing whitespace
> lib/database.cc            5 lines: 8 spaces at the beginning of line
> lib/notmuch-private.h:     4 lines: 8 spaces at the beginning of line
> lib/message.cc:            1 line:  trailing whitespace
> lib/sha1.c:                1 line:  empty lines at the end of file
> lib/query.cc:              2 lines: 8 spaces at the beginning of line
> lib/gen-version-script.sh: 1 line:  trailing whitespace
> ---

pushed,

d

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-05 11:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-28 17:45 [PATCH] lib: whitespace cleanup Tomi Ollila
2016-06-05 11:38 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).