1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-05 19:02:27 +02:00
eda-tools/gencat/libs.h

51 lines
1.1 KiB
C

/*
* libs.h - Component or module libraries
*
* 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 LIBS_H
#define LIBS_H
struct name {
const char *s;
struct name *next;
};
struct entry {
struct name *names;
int units;
const struct file *file;
struct entry *next;
};
struct file {
const char *path;
struct entry *entries;
const struct lib *lib;
struct file *next;
};
struct lib {
const char *ext; /* file extension, ".lib" or ".mod" */
void (*add_lib)(struct lib *lib, const char *path);
struct file *files;
};
extern struct lib comp_lib;
const struct entry *lookup_sym(const struct lib *lib, const char *name);
void add_name(struct entry *e, char *s);
struct entry *new_entry(struct lib *lib, int units);
void add_lib(struct lib *lib, const char *path);
void add_libdir(struct lib *lib, const char *path);
#endif /* !LIBS_H */