Root/
| 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 | |
| 22 | struct 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 | |
| 30 | extern struct bom *bom; |
| 31 | extern int n_bom; |
| 32 | |
| 33 | |
| 34 | struct bom *bom_parse_line(const char *s); |
| 35 | void bom_set_sym(const char *ref, const char *sym); |
| 36 | int bom_subst(struct bom *b, const struct subst *sub); |
| 37 | void bom_dump(FILE *file, const struct bom *b); |
| 38 | |
| 39 | #endif /* !BOM_H */ |
| 40 |
Branches:
master
