shithub: ircs

ref: 5479f0fb4283ca4a5a58c9b7b50c5b86bde13aa1
dir: /dat.h/

View raw version
enum {
	Bufsize = 512,
};

typedef struct Ircmsg Ircmsg;
typedef struct Ircpref Ircpref;
typedef void (*Ircfmt)(Ircmsg *, char *, int);
typedef struct List List;
typedef struct Trie Trie;
typedef struct Triewalk Triewalk;

struct Ircpref {
	char	*nick;
	char	*user;
	char	*host;
	char	prebuf[128];
};

struct Ircmsg {
	char	*pre;
	char	*cmd;
	char	*par[15];
	char	*trail;
	int	npar;
	char	buf[Bufsize];
	Ircpref;
};

struct List {
	void	*val;
	List	*next;
};

struct Trie {
	Rune	rune;
	Trie	*parent;
	Trie	*child;
	Trie	*next;
	void	*value;
};

struct Triewalk {
	Trie	*root;
	Trie	*curr;
	Rune	*key;
	int	keysize;
	int	depth;
};

extern char *logdir;