]> jfr.im git - irc/quakenet/newserv.git/blame - helpmod2/helpmod_entries.h
GLINES: fix null pointer deref in trustgline / trustungline
[irc/quakenet/newserv.git] / helpmod2 / helpmod_entries.h
CommitLineData
c86edd1d
Q
1#ifndef HELPMOD_ENTRIES_H
2#define HELPMOD_ENTRIES_H
3
4#include "../lib/sstring.h"
5#include <stdio.h>
6#include <stdlib.h>
7
8typedef enum
9{
10 HM_LINE_NORMAL,
11 HM_LINE_ALIAS,
12 HM_LINE_TEXT
13} HM_line_type;
14
15typedef struct helpmod_entry_struct
16{
17 struct helpmod_entry_struct* parent;
18 unsigned short int option_count;
19 unsigned short int text_lines;
20
21 sstring* description;
22 sstring** text;
23 struct helpmod_entry_struct** options;
24} *helpmod_entry;
25
26extern struct helpmod_parsed_line_struct
27{
28 char text[512];
29 int depth;
30 HM_line_type line_type;
31} helpmod_parsed_line;
32
33extern helpmod_entry helpmod_base;
34
35int helpmod_valid_selection(helpmod_entry, int);
36helpmod_entry helpmod_make_selection(helpmod_entry, int);
37void helpmod_init_entries(void);
38void helpmod_init_entry(helpmod_entry*);
39void helpmod_clear_all_entries(void);
40void helpmod_load_entries(char*);
41void helpmod_load_entry(helpmod_entry*, FILE*, int, helpmod_entry);
42void helpmod_parse_line(FILE*);
43void helpmod_clear_entries(helpmod_entry);
44long helpmod_entry_count(helpmod_entry);
45
46#endif