| 14 |
* * |
* * |
| 15 |
***************************************************************************/ |
***************************************************************************/ |
| 16 |
|
|
| 17 |
|
#define _POSIX_C_SOURCE 200809L |
| 18 |
|
|
| 19 |
#include "screen.h" |
#include "screen.h" |
| 20 |
#include "bbs.h" |
#include "bbs.h" |
| 21 |
#include "common.h" |
#include "common.h" |
| 26 |
#include "file_loader.h" |
#include "file_loader.h" |
| 27 |
#include <fcntl.h> |
#include <fcntl.h> |
| 28 |
#include <ctype.h> |
#include <ctype.h> |
| 29 |
|
#include <string.h> |
| 30 |
#include <unistd.h> |
#include <unistd.h> |
| 31 |
#include <stdlib.h> |
#include <stdlib.h> |
| 32 |
#include <errno.h> |
#include <errno.h> |
| 35 |
#include <sys/param.h> |
#include <sys/param.h> |
| 36 |
#include <sys/shm.h> |
#include <sys/shm.h> |
| 37 |
|
|
|
#define _POSIX_C_SOURCE 200809L |
|
|
#include <string.h> |
|
|
|
|
| 38 |
#define ACTIVE_BOARD_HEIGHT 8 |
#define ACTIVE_BOARD_HEIGHT 8 |
| 39 |
|
|
| 40 |
#define STR_TOP_LEFT_MAX_LEN 40 |
#define STR_TOP_LEFT_MAX_LEN 40 |
| 431 |
break; |
break; |
| 432 |
} |
} |
| 433 |
|
|
| 434 |
BBS_last_access_tm = time(0); |
BBS_last_access_tm = time(NULL); |
| 435 |
} |
} |
| 436 |
|
|
| 437 |
continue; |
continue; |
| 565 |
|
|
| 566 |
len_username = (int)strnlen(BBS_username, sizeof(BBS_username)); |
len_username = (int)strnlen(BBS_username, sizeof(BBS_username)); |
| 567 |
|
|
| 568 |
time_online = time(0) - BBS_login_tm; |
time_online = time(NULL) - BBS_login_tm; |
| 569 |
tm_online = gmtime(&time_online); |
tm_online = gmtime(&time_online); |
| 570 |
if (tm_online->tm_mday > 1) |
if (tm_online->tm_mday > 1) |
| 571 |
{ |
{ |
| 612 |
} |
} |
| 613 |
} |
} |
| 614 |
|
|
| 615 |
if (time(0) - t_last_show >= 10) |
if (time(NULL) - t_last_show >= 10) |
| 616 |
{ |
{ |
| 617 |
line_last = line_current; |
line_last = line_current; |
| 618 |
t_last_show = time(0); |
t_last_show = time(NULL); |
| 619 |
} |
} |
| 620 |
else |
else |
| 621 |
{ |
{ |