1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-30 03:56:45 +02:00

show "last seen" time for offline friends

This commit is contained in:
Jfreegman
2014-03-14 17:48:52 -04:00
parent d29836845c
commit a68fc671e5
2 changed files with 42 additions and 12 deletions

View File

@ -54,6 +54,17 @@ struct tm *get_time(void)
return timeinfo;
}
/* Prints the time to given window */
void print_time(WINDOW *window)
{
uint8_t s[MAX_STR_SIZE];
strftime(s, MAX_STR_SIZE, "[%H:%M:%S] ", get_time());
wattron(window, COLOR_PAIR(BLUE));
wprintw(window, "%s", s);
wattroff(window,COLOR_PAIR(BLUE));
}
/* XXX: FIX */
unsigned char *hex_string_to_bin(char hex_string[])
{
@ -75,17 +86,6 @@ unsigned char *hex_string_to_bin(char hex_string[])
return val;
}
/* Prints the time to given window */
void print_time(WINDOW *window)
{
uint8_t s[MAX_STR_SIZE];
strftime(s, MAX_STR_SIZE, "[%H:%M:%S] ", get_time());
wattron(window, COLOR_PAIR(BLUE));
wprintw(window, "%s", s);
wattroff(window,COLOR_PAIR(BLUE));
}
/* Returns 1 if the string is empty, 0 otherwise */
int string_is_empty(char *string)
{