2012-05-23 22:05:24 +03:00
|
|
|
/*
|
|
|
|
* bom.h - BOM data
|
|
|
|
*
|
|
|
|
* 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 BOM_H
|
|
|
|
#define BOM_H
|
|
|
|
|
2012-05-24 00:26:27 +03:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2012-05-23 22:05:24 +03:00
|
|
|
#include "param.h"
|
2012-05-24 00:13:26 +03:00
|
|
|
#include "subst.h"
|
2012-05-23 22:05:24 +03:00
|
|
|
|
|
|
|
|
|
|
|
struct bom {
|
|
|
|
const char *ref; /* component reference */
|
|
|
|
const char *sym; /* symbol */
|
|
|
|
const char **fields; /* fields */
|
|
|
|
int n_fields;
|
|
|
|
const struct param *vars; /* variables (before conversion) */
|
|
|
|
};
|
|
|
|
|
|
|
|
extern struct bom *bom;
|
|
|
|
extern int n_bom;
|
|
|
|
|
|
|
|
|
2012-05-23 22:31:54 +03:00
|
|
|
struct bom *bom_parse_line(const char *s);
|
2012-05-23 23:26:35 +03:00
|
|
|
void bom_set_sym(const char *ref, const char *sym);
|
2012-05-24 00:13:26 +03:00
|
|
|
int bom_subst(struct bom *b, const struct subst *sub);
|
2012-05-24 00:26:27 +03:00
|
|
|
void bom_dump(FILE *file, const struct bom *b);
|
2012-05-23 22:05:24 +03:00
|
|
|
|
|
|
|
#endif /* !BOM_H */
|