| 22 |
#include "io.h" |
#include "io.h" |
| 23 |
#include "editor.h" |
#include "editor.h" |
| 24 |
#include "file_loader.h" |
#include "file_loader.h" |
| 25 |
|
#include "login.h" |
| 26 |
#include <fcntl.h> |
#include <fcntl.h> |
| 27 |
#include <ctype.h> |
#include <ctype.h> |
| 28 |
|
#include <string.h> |
| 29 |
#include <unistd.h> |
#include <unistd.h> |
| 30 |
#include <stdlib.h> |
#include <stdlib.h> |
| 31 |
#include <errno.h> |
#include <errno.h> |
| 34 |
#include <sys/param.h> |
#include <sys/param.h> |
| 35 |
#include <sys/shm.h> |
#include <sys/shm.h> |
| 36 |
|
|
|
#define _POSIX_C_SOURCE 200809L |
|
|
#include <string.h> |
|
|
|
|
| 37 |
#define ACTIVE_BOARD_HEIGHT 8 |
#define ACTIVE_BOARD_HEIGHT 8 |
| 38 |
|
|
| 39 |
#define STR_TOP_LEFT_MAX_LEN 40 |
#define STR_TOP_LEFT_MAX_LEN 40 |
| 430 |
break; |
break; |
| 431 |
} |
} |
| 432 |
|
|
| 433 |
BBS_last_access_tm = time(0); |
BBS_last_access_tm = time(NULL); |
| 434 |
} |
} |
| 435 |
|
|
| 436 |
continue; |
continue; |
| 494 |
return KEY_NULL; |
return KEY_NULL; |
| 495 |
} |
} |
| 496 |
|
|
| 497 |
|
if (user_online_update("VIEW_FILE") < 0) |
| 498 |
|
{ |
| 499 |
|
log_error("user_online_update(VIEW_FILE) error\n"); |
| 500 |
|
} |
| 501 |
|
|
| 502 |
ret = display_data(p_data, line_total, p_line_offsets, eof_exit, display_file_key_handler, DATA_READ_HELP); |
ret = display_data(p_data, line_total, p_line_offsets, eof_exit, display_file_key_handler, DATA_READ_HELP); |
| 503 |
|
|
| 504 |
if (detach_file_shm(p_shm) < 0) |
if (detach_file_shm(p_shm) < 0) |
| 569 |
|
|
| 570 |
len_username = (int)strnlen(BBS_username, sizeof(BBS_username)); |
len_username = (int)strnlen(BBS_username, sizeof(BBS_username)); |
| 571 |
|
|
| 572 |
time_online = time(0) - BBS_login_tm; |
time_online = time(NULL) - BBS_login_tm; |
| 573 |
tm_online = gmtime(&time_online); |
tm_online = gmtime(&time_online); |
| 574 |
if (tm_online->tm_mday > 1) |
if (tm_online->tm_mday > 1) |
| 575 |
{ |
{ |
| 616 |
} |
} |
| 617 |
} |
} |
| 618 |
|
|
| 619 |
if (time(0) - t_last_show >= 10) |
if (time(NULL) - t_last_show >= 10) |
| 620 |
{ |
{ |
| 621 |
line_last = line_current; |
line_last = line_current; |
| 622 |
t_last_show = time(0); |
t_last_show = time(NULL); |
| 623 |
} |
} |
| 624 |
else |
else |
| 625 |
{ |
{ |