mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
test
This commit is contained in:
parent
3bc7f15fe5
commit
e479f338c1
|
@ -236,6 +236,7 @@ void print_help(ChatContext* self) {
|
|||
wprintw(self->history, " /nick <nickname> : Set your nickname\n");
|
||||
wprintw(self->history, " /myid : Print your ID\n");
|
||||
wprintw(self->history, " /clear : Clear the screen\n");
|
||||
wprintw(self->history, " /close : Closes the current chat window\n");
|
||||
wprintw(self->history, " /quit or /exit : Exit program\n");
|
||||
wprintw(self->history, " /help : Print this message again\n\n");
|
||||
|
||||
|
@ -264,5 +265,6 @@ ToxWindow new_chat(int friendnum) {
|
|||
x->friendnum = friendnum;
|
||||
|
||||
ret.x = (void*) x;
|
||||
free(x);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -337,28 +337,37 @@ void set_active_window(int ch) {
|
|||
|
||||
int main(int argc, char* argv[]) {
|
||||
int ch;
|
||||
int i = 0;
|
||||
int f_flag = 0;
|
||||
char *filename = "data";
|
||||
ToxWindow* a;
|
||||
|
||||
for(i = 0; i < argc; i++) {
|
||||
if (argv[i] == NULL){
|
||||
break;
|
||||
} else if(argv[i][0] == '-') {
|
||||
if(argv[i][1] == 'f') {
|
||||
if(argv[i + 1] != NULL)
|
||||
filename = argv[i + 1];
|
||||
else {
|
||||
f_flag = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
init_term();
|
||||
init_tox();
|
||||
init_window_status();
|
||||
init_windows();
|
||||
char *filename = "data";
|
||||
load_data(filename);
|
||||
init_windows();
|
||||
|
||||
int i;
|
||||
for(i = 0; i < argc; i++) {
|
||||
if(argv[i][0] == '-' && argv[i][1] == 'f') {
|
||||
if(argv[i + 1] != NULL)
|
||||
filename = argv[i + 1];
|
||||
else {
|
||||
attron(COLOR_PAIR(3) | A_BOLD);
|
||||
wprintw(prompt->window, "You passed '-f' without giving an argument!\n"
|
||||
if(f_flag == -1) {
|
||||
attron(COLOR_PAIR(3) | A_BOLD);
|
||||
wprintw(prompt->window, "You passed '-f' without giving an argument!\n"
|
||||
"defaulting to 'data' for a keyfile...\n");
|
||||
attroff(COLOR_PAIR(3) | A_BOLD);
|
||||
}
|
||||
}
|
||||
attroff(COLOR_PAIR(3) | A_BOLD);
|
||||
}
|
||||
|
||||
while(true) {
|
||||
// Update tox.
|
||||
do_tox();
|
||||
|
@ -382,4 +391,4 @@ int main(int argc, char* argv[]) {
|
|||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user