* cosmetics

This commit is contained in:
Dirk-Jan C. Binnema 2011-07-26 08:43:33 +03:00
parent 9dad2d6175
commit 50fad7dc39
3 changed files with 9 additions and 9 deletions

View File

@ -449,7 +449,7 @@ show_usage (gboolean noerror)
static void static void
show_version (void) show_version (void)
{ {
g_print ("mu (mail indexer/searcher) " VERSION "\n" g_print ("mu (mail indexer/searcher) version " VERSION "\n"
"Copyright (C) 2008-2011 Dirk-Jan C. Binnema (GPLv3+)\n"); "Copyright (C) 2008-2011 Dirk-Jan C. Binnema (GPLv3+)\n");
} }

View File

@ -105,22 +105,22 @@ mu_msg_doc_get_num_field (MuMsgDoc *self, MuMsgFieldId mfid)
g_return_val_if_fail (self, -1); g_return_val_if_fail (self, -1);
g_return_val_if_fail (mu_msg_field_id_is_valid(mfid), -1); g_return_val_if_fail (mu_msg_field_id_is_valid(mfid), -1);
g_return_val_if_fail (mu_msg_field_is_numeric(mfid), -1); g_return_val_if_fail (mu_msg_field_is_numeric(mfid), -1);
/* date is a special case, because we store dates as /* date is a special case, because we store dates as
* strings */ * strings */
try { try {
const std::string s (self->doc().get_value(mfid)); const std::string s (self->doc().get_value(mfid));
if (s.empty()) if (s.empty())
return -1; return 0;
else if (mfid == MU_MSG_FIELD_ID_DATE) { else if (mfid == MU_MSG_FIELD_ID_DATE) {
time_t t; time_t t;
t = mu_date_str_to_time_t (s.c_str(), FALSE/*utc*/); t = mu_date_str_to_time_t (s.c_str(), FALSE/*utc*/);
return static_cast<gint64>(t); return static_cast<gint64>(t);
} else } else {
return static_cast<gint64>(Xapian::sortable_unserialise(s)); return static_cast<gint64>(Xapian::sortable_unserialise(s));
}
} MU_XAPIAN_CATCH_BLOCK_RETURN(-1);
} MU_XAPIAN_CATCH_BLOCK_RETURN(-1);
} }

View File

@ -106,9 +106,9 @@ GSList* mu_msg_file_get_str_list_field (MuMsgFile *self,
* @param self a valid MuMsgFile * @param self a valid MuMsgFile
* @param msfid the message field id to get (must be string-based one) * @param msfid the message field id to get (must be string-based one)
* *
* @return the numeric value, or -1 * @return the numeric value, or -1 in case of error
*/ */
gint64 mu_msg_file_get_num_field (MuMsgFile *self, MuMsgFieldId msfid); gint64 mu_msg_file_get_num_field (MuMsgFile *self, MuMsgFieldId mfid);
#endif /*__MU_MSG_FILE_H__*/ #endif /*__MU_MSG_FILE_H__*/