diff --git a/src/audio_call.c b/src/audio_call.c index 74aee64..0655292 100644 --- a/src/audio_call.c +++ b/src/audio_call.c @@ -50,16 +50,16 @@ struct _ASettings { } ASettins; -void *callback_recv_invite ( void *arg ); -void *callback_recv_ringing ( void *arg ); -void *callback_recv_starting ( void *arg ); -void *callback_recv_ending ( void *arg ); -void *callback_recv_error ( void *arg ); -void *callback_call_started ( void *arg ); -void *callback_call_canceled ( void *arg ); -void *callback_call_rejected ( void *arg ); -void *callback_call_ended ( void *arg ); -void *callback_requ_timeout ( void *arg ); +void callback_recv_invite ( void *arg ); +void callback_recv_ringing ( void *arg ); +void callback_recv_starting ( void *arg ); +void callback_recv_ending ( void *arg ); +void callback_recv_error ( void *arg ); +void callback_call_started ( void *arg ); +void callback_call_canceled ( void *arg ); +void callback_call_rejected ( void *arg ); +void callback_call_ended ( void *arg ); +void callback_requ_timeout ( void *arg ); @@ -327,57 +327,48 @@ int stop_transmission() #define CB_BODY(Arg, onFunc) do { ToxWindow* windows = (Arg); int i;\ for (i = 0; i < MAX_WINDOWS_NUM; ++i) if (windows[i].onFunc != NULL) windows[i].onFunc(&windows[i], ASettins.av); } while (0) -void *callback_recv_invite ( void* arg ) +void callback_recv_invite ( void* arg ) { CB_BODY(arg, onInvite); - _cbend; } -void *callback_recv_ringing ( void* arg ) +void callback_recv_ringing ( void* arg ) { CB_BODY(arg, onRinging); - _cbend; } -void *callback_recv_starting ( void* arg ) +void callback_recv_starting ( void* arg ) { CB_BODY(arg, onStarting); - _cbend; } -void *callback_recv_ending ( void* arg ) +void callback_recv_ending ( void* arg ) { CB_BODY(arg, onEnding); stop_transmission(); } -void *callback_recv_error ( void* arg ) +void callback_recv_error ( void* arg ) { CB_BODY(arg, onError); - _cbend; } -void *callback_call_started ( void* arg ) +void callback_call_started ( void* arg ) { CB_BODY(arg, onStart); - _cbend; } -void *callback_call_canceled ( void* arg ) +void callback_call_canceled ( void* arg ) { CB_BODY(arg, onCancel); - _cbend; } -void *callback_call_rejected ( void* arg ) +void callback_call_rejected ( void* arg ) { CB_BODY(arg, onReject); - _cbend; } -void *callback_call_ended ( void* arg ) +void callback_call_ended ( void* arg ) { CB_BODY(arg, onEnd); stop_transmission(); - _cbend; } -void *callback_requ_timeout ( void* arg ) +void callback_requ_timeout ( void* arg ) { CB_BODY(arg, onTimeout); - _cbend; } /* diff --git a/src/chat.c b/src/chat.c index 5385ced..5742f85 100644 --- a/src/chat.c +++ b/src/chat.c @@ -282,9 +282,9 @@ static void chat_onFileControl(ToxWindow *self, Tox *m, int num, uint8_t receive case TOX_FILECONTROL_ACCEPT: wprintw(ctx->history, "File transfer for '%s' accepted.\n", filename); break; - // case TOX_FILECONTROL_PAUSE: - // wprintw(ctx->history, "File transfer for '%s' paused.\n", filename); - // break; + /*case TOX_FILECONTROL_PAUSE: + wprintw(ctx->history, "File transfer for '%s' paused.\n", filename); + break; */ case TOX_FILECONTROL_KILL: wprintw(ctx->history, "File transfer for '%s' failed.\n", filename); diff --git a/src/execute.c b/src/execute.c index 62581ad..71e5958 100644 --- a/src/execute.c +++ b/src/execute.c @@ -79,8 +79,8 @@ static struct cmd_func chat_commands[] = { static int parse_command(WINDOW *w, char *cmd, char (*args)[MAX_STR_SIZE]) { int num_args = 0; - bool cmd_end = false; // flags when we get to the end of cmd - char *end; // points to the end of the current arg + bool cmd_end = false; /* flags when we get to the end of cmd */ + char *end; /* points to the end of the current arg */ /* characters wrapped in double quotes count as one arg */ while (!cmd_end && num_args < MAX_NUM_ARGS) { diff --git a/src/execute.h b/src/execute.h index cf84cb9..1f22a84 100644 --- a/src/execute.h +++ b/src/execute.h @@ -28,7 +28,7 @@ #else #define GLOBAL_NUM_COMMANDS 14 #define CHAT_NUM_COMMANDS 5 -#endif /* _SUPPORT_AUDIO */ +#endif /* _SUPPORT_AUDIO */ enum { GLOBAL_COMMAND_MODE, diff --git a/src/friendlist.c b/src/friendlist.c index 11f5830..fc8f5e2 100644 --- a/src/friendlist.c +++ b/src/friendlist.c @@ -472,7 +472,7 @@ static void friendlist_onInit(ToxWindow *self, Tox *m) static void friendlist_onAv(ToxWindow *self, ToxAv *av) { int id = toxav_get_peer_id(av, 0); - id++; + /*id++;*/ if ( id >= max_friends_index) return; @@ -511,7 +511,7 @@ ToxWindow new_friendlist(void) ret.onFriendAdded = &friendlist_onFriendAdded; ret.onMessage = &friendlist_onMessage; ret.onConnectionChange = &friendlist_onConnectionChange; - ret.onAction = &friendlist_onMessage; // Action has identical behaviour to message + ret.onAction = &friendlist_onMessage; /* Action has identical behaviour to message */ ret.onNickChange = &friendlist_onNickChange; ret.onStatusChange = &friendlist_onStatusChange; ret.onStatusMessageChange = &friendlist_onStatusMessageChange; diff --git a/src/groupchat.c b/src/groupchat.c index b74d110..539438d 100644 --- a/src/groupchat.c +++ b/src/groupchat.c @@ -330,13 +330,13 @@ static void send_group_action(ToxWindow *self, ChatContext *ctx, Tox *m, uint8_t return; } - // uint8_t selfname[TOX_MAX_NAME_LENGTH]; - // tox_get_self_name(m, selfname, TOX_MAX_NAME_LENGTH); + /* uint8_t selfname[TOX_MAX_NAME_LENGTH]; + tox_get_self_name(m, selfname, TOX_MAX_NAME_LENGTH); - // print_time(ctx->history); - // wattron(ctx->history, COLOR_PAIR(YELLOW)); - // wprintw(ctx->history, "* %s %s\n", selfname, action); - // wattroff(ctx->history, COLOR_PAIR(YELLOW)); + print_time(ctx->history); + wattron(ctx->history, COLOR_PAIR(YELLOW)); + wprintw(ctx->history, "* %s %s\n", selfname, action); + wattroff(ctx->history, COLOR_PAIR(YELLOW)); */ if (tox_group_action_send(m, self->num, action, strlen(action) + 1) == -1) { wattron(ctx->history, COLOR_PAIR(RED)); diff --git a/src/main.c b/src/main.c index 2b57c08..4ed4935 100644 --- a/src/main.c +++ b/src/main.c @@ -158,7 +158,7 @@ static Tox *init_tox(int ipv4) #elif defined(_WIN32) tox_set_name(m, (uint8_t *) "I should install GNU/Linux", sizeof("I should install GNU/Linux")); #elif defined(__APPLE__) - tox_set_name(m, (uint8_t *) "Hipster", sizeof("Hipster")); //This used to users of other Unixes are hipsters + tox_set_name(m, (uint8_t *) "Hipster", sizeof("Hipster")); /* This used to users of other Unixes are hipsters */ #else tox_set_name(m, (uint8_t *) "Registered Minix user #4", sizeof("Registered Minix user #4")); #endif diff --git a/src/misc_tools.c b/src/misc_tools.c index b13b8fe..74b3bf6 100644 --- a/src/misc_tools.c +++ b/src/misc_tools.c @@ -33,7 +33,7 @@ extern ToxWindow *prompt; -// XXX: FIX +/* XXX: FIX */ unsigned char *hex_string_to_bin(char hex_string[]) { size_t len = strlen(hex_string); @@ -224,13 +224,13 @@ void get_file_name(uint8_t *pathname, uint8_t *namebuf) while (idx >= 0 && pathname[idx] == '/') pathname[idx--] = '\0'; - uint8_t *filename = strrchr(pathname, '/'); // Try unix style paths + uint8_t *filename = strrchr(pathname, '/'); /* Try unix style paths */ if (filename != NULL) { if (!strlen(++filename)) filename = pathname; } else { - filename = strrchr(pathname, '\\'); // Try windows style paths + filename = strrchr(pathname, '\\'); /* Try windows style paths */ if (filename == NULL) filename = pathname; diff --git a/src/prompt.c b/src/prompt.c index 1539f6a..d7f6b1b 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -430,7 +430,7 @@ static void prompt_onConnectionChange(ToxWindow *self, Tox *m, int friendnum , u static void prompt_onFriendRequest(ToxWindow *self, uint8_t *key, uint8_t *data, uint16_t length) { - // make sure message data is null-terminated + /* make sure message data is null-terminated */ data[length - 1] = 0; PromptBuf *prt = self->promptbuf; prep_prompt_win(); diff --git a/src/toxic_windows.h b/src/toxic_windows.h index b6e1dda..6d7cf97 100644 --- a/src/toxic_windows.h +++ b/src/toxic_windows.h @@ -82,7 +82,7 @@ enum { /* Fixes text color problem on some terminals. Uncomment if necessary */ -//#define URXVT_FIX +/* #define URXVT_FIX */ typedef struct ToxWindow ToxWindow; typedef struct StatusBar StatusBar; diff --git a/src/windows.c b/src/windows.c index ff6202c..1c58041 100644 --- a/src/windows.c +++ b/src/windows.c @@ -253,7 +253,7 @@ int add_window(Tox *m, ToxWindow w) /* Deletes window w and cleans up */ void del_window(ToxWindow *w) { - active_window = windows; // Go to prompt screen + active_window = windows; /* Go to prompt screen */ delwin(w->window); memset(w, 0, sizeof(ToxWindow)); @@ -279,7 +279,7 @@ void set_next_window(int ch) if (active_window->window) return; - if (active_window == inf) { // infinite loop check + if (active_window == inf) { /* infinite loop check */ endwin(); fprintf(stderr, "set_next_window() failed. Aborting...\n"); exit(EXIT_FAILURE);