Root/genkicat/tree.h

1/*
2 * tree.h - Component hierarchy
3 *
4 * Copyright 2012 by Werner Almesberger
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 */
11
12#ifndef TREE_H
13#define TREE_H
14
15#include "libs.h"
16
17
18struct line {
19    char *s;
20    int url; /* 1 if URL */
21    struct line *next;
22};
23
24struct node {
25    const char *name;
26    const struct entry *e; /* NULL if intermediate node */
27    struct line *comment; /* NULL if intermediate node */
28    int indent; /* level of indentation (characters) */
29    struct node *parent;
30    struct node *child;
31    struct node *next;
32};
33
34
35extern struct node *tree;
36
37
38void read_tree(FILE *file);
39void read_desc(FILE *file);
40void set_libs(const struct lib *lib, struct node *node);
41void dump_tree(void);
42void dump_comp(void);
43
44#endif /* !TREE_H */
45

Archive Download this file

Branches:
master



interactive