2016-08-23 02:45:31 +03:00
|
|
|
/*
|
|
|
|
* kicad/ext.h - Identify files by their extension
|
|
|
|
*
|
|
|
|
* Written 2016 by Werner Almesberger
|
|
|
|
* Copyright 2016 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 KICAD_EXT_H
|
|
|
|
#define KICAD_EXT_H
|
|
|
|
|
|
|
|
enum ext {
|
|
|
|
ext_unknown,
|
|
|
|
ext_project,
|
|
|
|
ext_sch,
|
|
|
|
ext_lib,
|
|
|
|
ext_pl, /* .kicad_wks, work sheet */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct file_names {
|
|
|
|
const char *pro; /* just one allowed, may be NULL */
|
|
|
|
const char *sch; /* just one allowed, may be NULL */
|
|
|
|
const char *pl; /* just one allowed, may be NULL */
|
|
|
|
const char **libs;
|
|
|
|
unsigned n_libs;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
enum ext identify(const char *path);
|
|
|
|
void classify_files(struct file_names *fn, char *const *args,
|
|
|
|
unsigned n_args);
|
2016-08-23 04:18:46 +03:00
|
|
|
struct file_names *clone_file_names(const struct file_names *fn);
|
|
|
|
void free_file_names(struct file_names *fn);
|
2016-08-23 02:45:31 +03:00
|
|
|
|
|
|
|
#endif /* !KICAD_EXT_H */
|