add circular buffer logic and fix makefile bug
This commit is contained in:
@@ -31,7 +31,7 @@ typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
irc_event_type_t type;
|
||||
irc_message_t orig_msg;
|
||||
char line[513];
|
||||
} irc_event_t;
|
||||
|
||||
typedef struct
|
||||
@@ -96,6 +96,14 @@ typedef struct
|
||||
irc_connection_type_t connType;
|
||||
} irc_connection_info_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
irc_event_t *events;
|
||||
int eventsSize;
|
||||
int front;
|
||||
int rear;
|
||||
} irc_event_queue_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
irc_connection_info_t connectionInfo;
|
||||
@@ -111,13 +119,13 @@ typedef struct
|
||||
/* Identity */
|
||||
irc_identity_t identity;
|
||||
|
||||
irc_event_t* eventQueue; // lives on the heap
|
||||
int eventQueuePtr;
|
||||
/* Event queues */
|
||||
irc_event_queue_t evtQueue;
|
||||
} irc_client_t;
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
void (*handler)(irc_message_t *msg, irc_client_t *irc);
|
||||
} command_t;
|
||||
} irc_command_t;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user