1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-26 22:03:27 +01:00

move define

This commit is contained in:
Jfreegman 2013-09-09 15:33:15 -04:00
parent 4fc063d5fe
commit f50f93ee81
3 changed files with 5 additions and 6 deletions

View File

@ -275,9 +275,8 @@ int store_data(Tox *m, char *path)
len = tox_size(m); len = tox_size(m);
buf = malloc(len); buf = malloc(len);
if (buf == NULL) { if (buf == NULL)
return 2; return 2;
}
tox_save(m, buf); tox_save(m, buf);
@ -334,8 +333,8 @@ static void load_data(Tox *m, char *path)
uint32_t i = 0; uint32_t i = 0;
char name[TOX_MAX_NAME_LENGTH]; uint8_t name[TOX_MAX_NAME_LENGTH];
while (tox_getname(m, i, (uint8_t *)name) != -1) { while (tox_getname(m, i, name) != -1) {
on_friendadded(m, i); on_friendadded(m, i);
i++; i++;
} }

View File

@ -20,6 +20,8 @@
/* number of permanent default windows */ /* number of permanent default windows */
#define N_DEFAULT_WINS 3 #define N_DEFAULT_WINS 3
#define UNKNOWN_NAME "Unknown"
#ifndef TOXICVER #ifndef TOXICVER
#define TOXICVER "NOVER" //Use the -D flag to set this #define TOXICVER "NOVER" //Use the -D flag to set this
#endif #endif

View File

@ -17,8 +17,6 @@ static ToxWindow *active_window;
static ToxWindow *prompt; static ToxWindow *prompt;
static Tox *m; static Tox *m;
#define UNKNOWN_NAME "Unknown"
/* CALLBACKS START */ /* CALLBACKS START */
void on_request(uint8_t *public_key, uint8_t *data, uint16_t length, void *userdata) void on_request(uint8_t *public_key, uint8_t *data, uint16_t length, void *userdata)
{ {