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

format fixes

This commit is contained in:
Jfreegman
2013-10-11 04:42:30 -04:00
parent 698c18521a
commit 75d356e52a
7 changed files with 35 additions and 28 deletions

View File

@ -40,6 +40,16 @@ struct tm *get_time(void)
return timeinfo;
}
/* Prints the time to given window */
void print_time(WINDOW *window)
{
struct tm *timeinfo = get_time();
wattron(window, COLOR_PAIR(CYAN));
wprintw(window, "[%02d:%02d:%02d] ", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec);
wattroff(window, COLOR_PAIR(CYAN));
}
/* check that the string has one non-space character */
int string_is_empty(char *string)
{
@ -95,13 +105,3 @@ char *wc_to_char(wchar_t ch)
return ret;
}
/* Prints the time to given window */
void print_time(WINDOW *window)
{
struct tm *timeinfo = get_time();
wattron(window, COLOR_PAIR(CYAN));
wprintw(window, "[%02d:%02d:%02d] ", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec);
wattroff(window, COLOR_PAIR(CYAN));
}