mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 01:43:01 +01:00
move define
This commit is contained in:
parent
4fc063d5fe
commit
f50f93ee81
@ -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++;
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user