aboutsummaryrefslogtreecommitdiff
path: root/notmuch-time.c
diff options
context:
space:
mode:
authoruncrustify <david@tethera.net>2019-06-13 07:31:01 -0300
committerDavid Bremner <david@tethera.net>2019-06-14 07:41:27 -0300
commit33382c2b5ba2537952a60ea378feff36961e4713 (patch)
tree983288c84237c204d9fbfa81fb387397fd46e942 /notmuch-time.c
parentbe8f0ba92a302798b21cf02ef73c4ad783b66cba (diff)
cli: run uncrustify
This is the result of running $ uncrustify --replace --config devel/uncrustify.cfg *.c *.h in the top level source directory
Diffstat (limited to 'notmuch-time.c')
-rw-r--r--notmuch-time.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/notmuch-time.c b/notmuch-time.c
index 2734b36a..cc7ffc23 100644
--- a/notmuch-time.c
+++ b/notmuch-time.c
@@ -39,14 +39,14 @@
*
*/
#define MINUTE (60)
-#define HOUR (60 * MINUTE)
-#define DAY (24 * HOUR)
+#define HOUR (60 *MINUTE)
+#define DAY (24 *HOUR)
#define RELATIVE_DATE_MAX 20
const char *
notmuch_time_relative_date (const void *ctx, time_t then)
{
struct tm tm_now, tm_then;
- time_t now = time(NULL);
+ time_t now = time (NULL);
time_t delta;
char *result;
@@ -76,26 +76,25 @@ notmuch_time_relative_date (const void *ctx, time_t then)
if (delta <= 7 * DAY) {
if (tm_then.tm_wday == tm_now.tm_wday &&
- delta < DAY)
- {
+ delta < DAY) {
strftime (result, RELATIVE_DATE_MAX,
- "Today %R", &tm_then); /* Today 12:30 */
+ "Today %R", &tm_then); /* Today 12:30 */
return result;
} else if ((tm_now.tm_wday + 7 - tm_then.tm_wday) % 7 == 1) {
strftime (result, RELATIVE_DATE_MAX,
- "Yest. %R", &tm_then); /* Yest. 12:30 */
+ "Yest. %R", &tm_then); /* Yest. 12:30 */
return result;
} else {
if (tm_then.tm_wday != tm_now.tm_wday) {
strftime (result, RELATIVE_DATE_MAX,
- "%a. %R", &tm_then); /* Mon. 12:30 */
+ "%a. %R", &tm_then); /* Mon. 12:30 */
return result;
}
}
}
strftime (result, RELATIVE_DATE_MAX,
- "%B %d", &tm_then); /* October 12 */
+ "%B %d", &tm_then); /* October 12 */
return result;
}
#undef MINUTE