1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-18 02:22:27 +02:00
eda-tools/b2/bom.h

40 lines
884 B
C
Raw Normal View History

/*
* 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
#include <stdio.h>
#include "param.h"
#include "subst.h"
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;
struct bom *bom_parse_line(const char *s);
void bom_set_sym(const char *ref, const char *sym);
int bom_subst(struct bom *b, const struct subst *sub);
void bom_dump(FILE *file, const struct bom *b);
#endif /* !BOM_H */