mirror of
https://github.com/Tha14/toxic.git
synced 2025-12-15 01:56:35 +01:00
show "last seen" time for offline friends
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user