1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-04 23:05:21 +02:00
eda-tools/genkicat/libs.h

54 lines
1.2 KiB
C
Raw Normal View History

/*
* 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 ".fpd" */
void (*add_lib)(struct lib *lib, const char *path);
void (*ps_entry)(FILE *file, const struct lib *lib,
const struct entry *e, int unit, int landscape);
struct file *files;
};
extern struct lib comp_lib;
extern struct lib fped_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 */