1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-30 08:26:45 +02:00

Reduce size of some large stack memory allocations

This commit is contained in:
jfreegman
2020-10-25 13:48:14 -04:00
parent 4c302da503
commit 3cdcfbf4e5
5 changed files with 21 additions and 27 deletions

View File

@ -26,22 +26,20 @@
#include "toxic.h"
#include "windows.h"
#define MAX_FRIEND_REQUESTS 32
#define MAX_FRIEND_REQUESTS 20
struct friend_request {
bool active;
char msg[MAX_STR_SIZE];
char msg[TOX_MAX_FRIEND_REQUEST_LENGTH + 1];
uint8_t key[TOX_PUBLIC_KEY_SIZE];
};
typedef struct {
typedef struct FriendRequests {
int max_idx;
int num_requests;
struct friend_request request[MAX_FRIEND_REQUESTS];
} FriendRequests;
extern FriendRequests FrndRequests;
ToxWindow *new_prompt(void);
void prep_prompt_win(void);