1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-07-01 18:57:45 +02: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);
buf = malloc(len);
if (buf == NULL) {
if (buf == NULL)
return 2;
}
tox_save(m, buf);
@ -334,8 +333,8 @@ static void load_data(Tox *m, char *path)
uint32_t i = 0;
char name[TOX_MAX_NAME_LENGTH];
while (tox_getname(m, i, (uint8_t *)name) != -1) {
uint8_t name[TOX_MAX_NAME_LENGTH];
while (tox_getname(m, i, name) != -1) {
on_friendadded(m, i);
i++;
}

View File

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

View File

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