| 298 |
input_ok = 1; |
input_ok = 1; |
| 299 |
switch (ch) |
switch (ch) |
| 300 |
{ |
{ |
| 301 |
case KEY_NULL: |
//case KEY_NULL: |
| 302 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 303 |
goto cleanup; |
goto cleanup; |
| 304 |
case KEY_HOME: |
case KEY_HOME: |
| 395 |
clrline(begin_line, SCREEN_ROWS); |
clrline(begin_line, SCREEN_ROWS); |
| 396 |
break; |
break; |
| 397 |
default: |
default: |
|
log_std("Input: %d\n", ch); |
|
| 398 |
input_ok = 0; |
input_ok = 0; |
| 399 |
break; |
break; |
| 400 |
} |
} |
| 431 |
return ch; |
return ch; |
| 432 |
} |
} |
| 433 |
|
|
| 434 |
int show_top(char *status) |
int show_top(const char *status) |
| 435 |
{ |
{ |
| 436 |
int truncate; |
int truncate; |
| 437 |
int status_len; |
int status_len; |
| 464 |
return 0; |
return 0; |
| 465 |
} |
} |
| 466 |
|
|
| 467 |
int show_bottom(char *msg) |
int show_bottom(const char *msg) |
| 468 |
{ |
{ |
| 469 |
char str_time[LINE_BUFFER_LEN]; |
char str_time[LINE_BUFFER_LEN]; |
|
char space[LINE_BUFFER_LEN]; |
|
| 470 |
time_t time_online; |
time_t time_online; |
| 471 |
struct tm *tm_online; |
struct tm *tm_online; |
| 472 |
|
int len_username = (int)strnlen(BBS_username, sizeof(BBS_username)); |
| 473 |
|
|
| 474 |
get_time_str(str_time, sizeof(str_time)); |
get_time_str(str_time, sizeof(str_time)); |
|
str_space(space, 34 - (int)strnlen(BBS_username, sizeof(BBS_username))); |
|
| 475 |
|
|
| 476 |
time_online = time(0) - BBS_login_tm; |
time_online = time(0) - BBS_login_tm; |
| 477 |
tm_online = gmtime(&time_online); |
tm_online = gmtime(&time_online); |
| 478 |
|
|
| 479 |
moveto(SCREEN_ROWS, 0); |
moveto(SCREEN_ROWS, 0); |
| 480 |
clrtoeol(); |
clrtoeol(); |
| 481 |
prints("\033[1;44;33m[\033[36m%s\033[33m]%sีสบล[\033[36m%s\033[33m]" |
prints("\033[1;44;33m[\033[36m%s\033[33m]%*sีสบล[\033[36m%s\033[33m]" |
| 482 |
"[\033[36m%1d\033[33m:\033[36m%2d\033[33m:\033[36m%2d\033[33m]\033[m", |
"[\033[36m%1d\033[33m:\033[36m%2d\033[33m:\033[36m%2d\033[33m]\033[m", |
| 483 |
str_time, space, BBS_username, tm_online->tm_mday - 1, |
str_time, 34 - len_username, "", BBS_username, |
| 484 |
tm_online->tm_hour, tm_online->tm_min); |
tm_online->tm_mday - 1, tm_online->tm_hour, tm_online->tm_min); |
| 485 |
iflush(); |
iflush(); |
| 486 |
|
|
| 487 |
return 0; |
return 0; |