]> jfr.im git - irc/quakenet/newserv.git/blob - helpmod2/helpmod_entries.h
GLINES: fix null pointer deref in trustgline / trustungline
[irc/quakenet/newserv.git] / helpmod2 / helpmod_entries.h
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
8 typedef enum
9 {
10 HM_LINE_NORMAL,
11 HM_LINE_ALIAS,
12 HM_LINE_TEXT
13 } HM_line_type;
14
15 typedef 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
26 extern struct helpmod_parsed_line_struct
27 {
28 char text[512];
29 int depth;
30 HM_line_type line_type;
31 } helpmod_parsed_line;
32
33 extern helpmod_entry helpmod_base;
34
35 int helpmod_valid_selection(helpmod_entry, int);
36 helpmod_entry helpmod_make_selection(helpmod_entry, int);
37 void helpmod_init_entries(void);
38 void helpmod_init_entry(helpmod_entry*);
39 void helpmod_clear_all_entries(void);
40 void helpmod_load_entries(char*);
41 void helpmod_load_entry(helpmod_entry*, FILE*, int, helpmod_entry);
42 void helpmod_parse_line(FILE*);
43 void helpmod_clear_entries(helpmod_entry);
44 long helpmod_entry_count(helpmod_entry);
45
46 #endif