mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-17 20:04:05 +02:00
1b7ace9043
Each entry has this structure: component: text more text more text on a new line next component: ... If a component has multiple entries, a line break is placed between them. Component names are case-insensitive.
44 lines
1.0 KiB
C
44 lines
1.0 KiB
C
/*
|
|
* 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 line {
|
|
char *s;
|
|
struct line *next;
|
|
};
|
|
|
|
struct node {
|
|
const char *name;
|
|
const char *lib; /* NULL if intermediate node */
|
|
const char *canon; /* canonical name of component */
|
|
int units; /* number of units; undefined if intermediate */
|
|
struct line *comment; /* NULL if intermediate node */
|
|
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 read_desc(FILE *file);
|
|
void set_libs(struct node *node,
|
|
const char *(*find_lib)(const char *sym, const char **canon,
|
|
int *units));
|
|
void dump_tree(void);
|
|
|
|
#endif /* !COMP_H */
|