summaryrefslogtreecommitdiff
path: root/testing/nTox_win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'testing/nTox_win32.c')
-rw-r--r--testing/nTox_win32.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/testing/nTox_win32.c b/testing/nTox_win32.c
index f3c7a188..dbbd0f6e 100644
--- a/testing/nTox_win32.c
+++ b/testing/nTox_win32.c
@@ -18,7 +18,7 @@
18 * 18 *
19 * You should have received a copy of the GNU General Public License 19 * You should have received a copy of the GNU General Public License
20 * along with Tox. If not, see <http://www.gnu.org/licenses/>. 20 * along with Tox. If not, see <http://www.gnu.org/licenses/>.
21 * 21 *
22 */ 22 */
23 23
24#include "nTox_win32.h" 24#include "nTox_win32.h"
@@ -86,7 +86,7 @@ void print_nickchange(int friendnumber, uint8_t *string, uint16_t length)
86 printf(msg); 86 printf(msg);
87} 87}
88 88
89void print_statuschange(int friendnumber, uint8_t *string, uint16_t length) 89void print_statuschange(int friendnumber, USERSTATUS_KIND kind, uint8_t *string, uint16_t length)
90{ 90{
91 char name[MAX_NAME_LENGTH]; 91 char name[MAX_NAME_LENGTH];
92 getname(friendnumber, (uint8_t*)name); 92 getname(friendnumber, (uint8_t*)name);
@@ -95,7 +95,7 @@ void print_statuschange(int friendnumber, uint8_t *string, uint16_t length)
95 printf(msg); 95 printf(msg);
96} 96}
97 97
98void load_key() 98void load_key()
99{ 99{
100 FILE *data_file = NULL; 100 FILE *data_file = NULL;
101 data_file = fopen("data","r"); 101 data_file = fopen("data","r");
@@ -130,7 +130,7 @@ void add_friend()
130 int i; 130 int i;
131 char temp_id[128]; 131 char temp_id[128];
132 132
133 for (i = 0; i < 128; i++) 133 for (i = 0; i < 128; i++)
134 temp_id[i] = line[i+3]; 134 temp_id[i] = line[i+3];
135 135
136 int num = m_addfriend(hex_string_to_bin(temp_id), (uint8_t*)"Install Gentoo", sizeof("Install Gentoo")); 136 int num = m_addfriend(hex_string_to_bin(temp_id), (uint8_t*)"Install Gentoo", sizeof("Install Gentoo"));
@@ -141,7 +141,7 @@ void add_friend()
141 printf(numstring); 141 printf(numstring);
142 ++maxnumfriends; 142 ++maxnumfriends;
143 } 143 }
144 else if (num == -1) 144 else if (num == -1)
145 printf("\n[i] Message is too long.\n\n"); 145 printf("\n[i] Message is too long.\n\n");
146 146
147 else if (num == -2) 147 else if (num == -2)
@@ -180,7 +180,7 @@ void list_friends()
180 char name[MAX_NAME_LENGTH]; 180 char name[MAX_NAME_LENGTH];
181 getname(i, (uint8_t*)name); 181 getname(i, (uint8_t*)name);
182 182
183 if (m_friendstatus(i) == 4) 183 if (m_friendstatus(i) == 4)
184 printf("[%d] %s\n", i, (uint8_t*)name); 184 printf("[%d] %s\n", i, (uint8_t*)name);
185 } 185 }
186 186
@@ -213,7 +213,7 @@ void message_friend()
213 213
214 for (i = 0; i < len; i++) { 214 for (i = 0; i < len; i++) {
215 215
216 if (line[i+3] != ' ') 216 if (line[i+3] != ' ')
217 numstring[i] = line[i+3]; 217 numstring[i] = line[i+3];
218 218
219 else { 219 else {
@@ -243,7 +243,7 @@ void change_nickname()
243 243
244 for (i = 3; i < len; i++) { 244 for (i = 3; i < len; i++) {
245 245
246 if (line[i] == 0 || line[i] == '\n') 246 if (line[i] == 0 || line[i] == '\n')
247 break; 247 break;
248 248
249 name[i-3] = line[i]; 249 name[i-3] = line[i];
@@ -268,7 +268,7 @@ void change_status(int savetofile)
268 size_t len = strlen(line); 268 size_t len = strlen(line);
269 269
270 for (i = 3; i < len; i++) { 270 for (i = 3; i < len; i++) {
271 if (line[i] == 0 || line[i] == '\n') 271 if (line[i] == 0 || line[i] == '\n')
272 break; 272 break;
273 273
274 status[i-3] = line[i]; 274 status[i-3] = line[i];
@@ -350,7 +350,7 @@ void line_eval(char* line)
350 accept_friend_request(line); 350 accept_friend_request(line);
351 } 351 }
352 /* EXIT */ 352 /* EXIT */
353 else if (inpt_command == 'q') { 353 else if (inpt_command == 'q') {
354 strcpy(line, "---Offline"); 354 strcpy(line, "---Offline");
355 change_status(0); 355 change_status(0);
356 exit(EXIT_SUCCESS); 356 exit(EXIT_SUCCESS);
@@ -398,7 +398,7 @@ int main(int argc, char *argv[])
398 nameloaded = 1; 398 nameloaded = 1;
399 printf("%s\n", name); 399 printf("%s\n", name);
400 fclose(name_file); 400 fclose(name_file);
401 } 401 }
402 402
403 FILE* status_file = NULL; 403 FILE* status_file = NULL;
404 status_file = fopen("statusfile.txt", "r"); 404 status_file = fopen("statusfile.txt", "r");
@@ -424,7 +424,7 @@ int main(int argc, char *argv[])
424 { 424 {
425 if(self_public_key[i] < (PUB_KEY_BYTES/2)) 425 if(self_public_key[i] < (PUB_KEY_BYTES/2))
426 strcpy(idstring1[i],"0"); 426 strcpy(idstring1[i],"0");
427 else 427 else
428 strcpy(idstring1[i], ""); 428 strcpy(idstring1[i], "");
429 sprintf(idstring2[i], "%hhX",self_public_key[i]); 429 sprintf(idstring2[i], "%hhX",self_public_key[i]);
430 } 430 }
@@ -442,7 +442,7 @@ int main(int argc, char *argv[])
442 int resolved_address = resolve_addr(argv[1]); 442 int resolved_address = resolve_addr(argv[1]);
443 if (resolved_address != 0) 443 if (resolved_address != 0)
444 bootstrap_ip_port.ip.i = resolved_address; 444 bootstrap_ip_port.ip.i = resolved_address;
445 else 445 else
446 exit(1); 446 exit(1);
447 447
448 DHT_bootstrap(bootstrap_ip_port, hex_string_to_bin(argv[3])); 448 DHT_bootstrap(bootstrap_ip_port, hex_string_to_bin(argv[3]));