-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstruct.h
More file actions
62 lines (53 loc) · 1.04 KB
/
struct.h
File metadata and controls
62 lines (53 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#pragma once
#include <stdio.h>
#include <stdbool.h>
#include <termios.h>
#include <sys/ioctl.h>
typedef struct nickname nickname;
struct nickname
{
char mode;
char *handle;
struct nickname *next;
};
typedef struct bufline bufline;
struct bufline
{
struct bufline *prev;
char *message;
bool isread;
struct bufline *next;
};
typedef struct bufptr bufptr;
struct bufptr
{
struct bufptr *prevbuf;
char *channel;
char *topic;
char *topicsetby;
int nickwidth;
int nickcount;
time_t nickwidth_set_at;
bufline *head;
bufline *curr;
struct nickname *nicklist;
struct bufptr *nextbuf;
};
typedef struct irc_ctx_t irc_ctx_t;
struct irc_ctx_t
{
char nick[128];
char username[128];
char realname[128];
int port;
char *active_channel;
bufptr *server_buffer;
bufline *buffer_read_ptr;
struct termios termstate;
struct termios termstate_raw;
struct winsize ttysize;
bool input_wait;
bool output_wait;
bool chanlist_header;
FILE *pager;
};