1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-12-23 03:53:25 +01:00

Merge branch 'iphydf-fix-typedefs'

This commit is contained in:
jfreegman 2018-01-20 13:34:53 -05:00
commit b799c6a8d7
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
8 changed files with 16 additions and 12 deletions

View File

@ -56,6 +56,7 @@
#endif
extern FriendsList Friends;
struct CallControl CallControl;
#define cbend pthread_exit(NULL)
@ -934,8 +935,8 @@ void init_friend_AV(uint32_t index)
}
/**
* Deletes the call structure for a given friend. Called when a friend is deleted from the friends list.
* Index must be equivalent to the friend's friendlist index.
* Deletes a call structure from the Calls list. Called when a friend is deleted from the friends list.
* Index must be equivalent to the size of the Calls list.
*/
void del_friend_AV(uint32_t index)
{

View File

@ -79,9 +79,9 @@ struct CallControl {
uint32_t video_bit_rate;
int32_t video_frame_duration;
} CallControl;
};
struct CallControl CallControl;
extern struct CallControl CallControl;
/* You will have to pass pointer to first member of 'windows' declared in windows.c */
ToxAV *init_audio(ToxWindow *self, Tox *tox);

View File

@ -108,7 +108,10 @@ static struct DHT_Nodes {
/* Determine if a node is offline by comparing the age of the nodeslist
* to the last time the node was successfully pinged.
*/
#define NODE_IS_OFFLINE(last_scan, last_ping) ((last_ping + NODE_OFFLINE_TIMOUT) <= (last_ping))
static bool node_is_offline(unsigned long long int last_ping)
{
return last_ping + NODE_OFFLINE_TIMOUT <= last_ping;
}
/* Return true if nodeslist pointed to by fp needs to be updated.
* This will be the case if the file is empty, has an invalid format,
@ -377,7 +380,7 @@ static int extract_node(const char *line, struct Node *node)
long long int last_pinged = extract_val_last_pinged(last_pinged_str + LAST_PING_JSON_KEY_LEN);
if (last_pinged <= 0 || NODE_IS_OFFLINE(Nodes.last_scan, last_pinged)) {
if (last_pinged <= 0 || node_is_offline(last_pinged)) {
return -3;
}

View File

@ -31,7 +31,7 @@
#define MAX_LINE_INFO_QUEUE 1024
#define MAX_LINE_INFO_MSG_SIZE MAX_STR_SIZE + TOXIC_MAX_NAME_LENGTH + 32 /* needs extra room for log loading */
enum {
typedef enum {
SYS_MSG,
IN_MSG,
OUT_MSG,

View File

@ -30,7 +30,7 @@ struct chatlog {
bool log_on; /* specific to current chat window */
};
enum {
typedef enum {
LOG_GROUP,
LOG_PROMPT,
LOG_CHAT,

View File

@ -67,7 +67,7 @@ static PyObject *python_api_get_nick(PyObject *self, PyObject *args)
static PyObject *python_api_get_status(PyObject *self, PyObject *args)
{
PyObject *ret;
PyObject *ret = NULL;
if (!PyArg_ParseTuple(args, ""))
return NULL;

View File

@ -88,7 +88,7 @@ struct user_settings {
#endif
};
enum {
enum settings_values {
AUTOLOG_OFF = 0,
AUTOLOG_ON = 1,
@ -114,7 +114,7 @@ enum {
MPLEX_OFF = 0,
MPLEX_ON = 1,
} settings_values;
};
#define LINE_JOIN "-->"
#define LINE_QUIT "<--"

View File

@ -42,7 +42,7 @@
#define CHATBOX_HEIGHT 2
/* Curses foreground colours (background is black) */
enum {
typedef enum {
WHITE,
GREEN,
CYAN,