summaryrefslogtreecommitdiff
path: root/statuses/datetime.c
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2013-02-15 00:10:58 +0000
committernorly <ny-git@enpas.org>2013-02-15 00:10:58 +0000
commit2ddbfa53a31360e50565345a1ac08c0799c8243e (patch)
tree4425fb570559d1425f29c86effc66706b2ce1e91 /statuses/datetime.c
parent9102c7c65421f2ef3e415c7e76a741657e34663b (diff)
Reindent and restyle
Diffstat (limited to 'statuses/datetime.c')
-rw-r--r--statuses/datetime.c47
1 files changed, 22 insertions, 25 deletions
diff --git a/statuses/datetime.c b/statuses/datetime.c
index 42b37aa..abcc07b 100644
--- a/statuses/datetime.c
+++ b/statuses/datetime.c
@@ -5,33 +5,30 @@
void status_datetime()
{
- time_t nows = 0;
- struct tm *nowtm;
+ time_t nows = 0;
+ struct tm *nowtm;
- nows = time(NULL);
- if (nows == ((time_t) -1))
- {
- printf(" ^fg(red)ERROR: DATETIME");
- return;
- }
+ nows = time(NULL);
+ if (nows == ((time_t) -1)) {
+ printf(" ^fg(red)ERROR: DATETIME");
+ return;
+ }
- nowtm = localtime(&nows);
+ nowtm = localtime(&nows);
- printf(" ^fg(#666666)%d.%d.%d ^fg(grey)%d:%.2d"
+ printf(" ^fg(#666666)%d.%d.%d ^fg(grey)%d:%.2d"
+ #ifdef SHOW_SECONDS
+ ":%.2d"
+ #endif
+ " "
+ ,nowtm -> tm_mday,
+ (nowtm -> tm_mon) + 1,
+ (nowtm -> tm_year) + 1900,
+ nowtm -> tm_hour,
+ nowtm -> tm_min
- #ifdef SHOW_SECONDS
- ":%.2d"
- #endif
- " "
- ,nowtm -> tm_mday,
- (nowtm -> tm_mon) + 1,
- (nowtm -> tm_year) + 1900,
- nowtm -> tm_hour,
- nowtm -> tm_min
-
- #ifdef SHOW_SECONDS
- ,nowtm -> tm_sec
- #endif
-
- );
+ #ifdef SHOW_SECONDS
+ ,nowtm -> tm_sec
+ #endif
+ );
}