LICK
 All Data Structures Files Functions Variables Enumerations Enumerator
edit-flat-menu.h
1 #include <stdio.h>
2 
3 #include "../lickdir.h"
4 #include "../llist.h"
5 
6 typedef enum {
7  S_UNLABELED,
8  S_HEADER,
9  S_FOOTER,
10  S_SECTION,
11 } type_e;
12 
13 typedef struct {
14  type_e type;
15  char *id;
16  const char *content;
17  size_t content_len;
18 } section_t;
19 
28 section_t *new_section(type_e type, const char *id, const char *content);
33 void free_section(section_t *s);
38 void free_sections(node_t *s);
45 node_t *get_sections(const char *f);
52 node_t *append_section(node_t *secs, section_t *sec);
58 node_t *remove_section(node_t *secs, const char *sec);
64 void write_sections(FILE *f, node_t *secs);
65 
73 int flat_append_section(const char *menu_path, const char *id,
74  const char *section, lickdir_t *lick);
82 int flat_remove_section(const char *id, const char *menu, lickdir_t *lick);
A linked list node.
Definition: llist.h:19
char * menu_path(char *path)
converts path to a grub-friendly path
Definition: distro.c:64
Paths to the LICK directory and its components.
Definition: lickdir.h:15
Definition: edit-flat-menu.h:13