2012-03-31 00:53:51 +03:00
|
|
|
/*
|
|
|
|
* comp.h - Component hierarchy
|
|
|
|
*
|
|
|
|
* Copyright 2012 by Werner Almesberger
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef COMP_H
|
|
|
|
#define COMP_H
|
|
|
|
|
|
|
|
struct node {
|
|
|
|
const char *name;
|
2012-04-13 00:07:59 +03:00
|
|
|
const char *lib; /* NULL if intermediate node */
|
2012-03-31 00:53:51 +03:00
|
|
|
const char *canon; /* canonical name of component */
|
2012-04-12 05:10:42 +03:00
|
|
|
int units; /* number of units */
|
2012-03-31 00:53:51 +03:00
|
|
|
int indent; /* level of indentation (characters) */
|
|
|
|
struct node *parent;
|
|
|
|
struct node *child;
|
|
|
|
struct node *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
extern struct node *tree;
|
|
|
|
|
|
|
|
|
|
|
|
void read_tree(FILE *file);
|
|
|
|
void set_libs(struct node *node,
|
2012-04-12 05:10:42 +03:00
|
|
|
const char *(*find_lib)(const char *sym, const char **canon,
|
|
|
|
int *units));
|
2012-03-31 00:53:51 +03:00
|
|
|
void dump_tree(void);
|
|
|
|
|
|
|
|
#endif /* !COMP_H */
|