forked from scott/threaded_network_chat
29 lines
466 B
C++
29 lines
466 B
C++
#include <string>
|
|
|
|
#include <bits/types/struct_timeval.h>
|
|
#include <curses.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
|
|
#include "chat.h"
|
|
|
|
chatmode_t mode = NO_MODE;
|
|
|
|
int
|
|
main(int argc, char *argv[])
|
|
{
|
|
char *usr_in = new char[1024];
|
|
bool quit = false;
|
|
|
|
if (argc > 1 && (!strcmp(argv[1], "client")))
|
|
mode = CLIENT_MODE;
|
|
else
|
|
mode = SERVER_MODE;
|
|
|
|
initscr();
|
|
use_default_colors();
|
|
|
|
line_position = count_lines(log_path) - LOG_LENGTH + 1;
|
|
}
|