Root/b2/bom.h

1/*
2 * bom.h - BOM data
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
13#ifndef BOM_H
14#define BOM_H
15
16#include <stdio.h>
17
18#include "param.h"
19#include "subst.h"
20
21
22struct bom {
23    const char *ref; /* component reference */
24    const char *sym; /* symbol */
25    const char **fields; /* fields */
26    int n_fields;
27    const struct param *vars; /* variables (before conversion) */
28};
29
30extern struct bom *bom;
31extern int n_bom;
32
33
34struct bom *bom_parse_line(const char *s);
35void bom_set_sym(const char *ref, const char *sym);
36int bom_subst(struct bom *b, const struct subst *sub);
37void bom_dump(FILE *file, const struct bom *b);
38
39#endif /* !BOM_H */
40

Archive Download this file

Branches:
master



interactive