Removed use of fgets() to read files and gerb_file approved file operations.
[geda-gerbv/spe.git] / src / project.h
blobcfe9f9ba26d531fe4a4beccf2ed604856660c941
1 /*
2 * gEDA - GNU Electronic Design Automation
3 * This file is a part of gerbv.
5 * Copyright (C) 2000-2003 Stefan Petersen (spe@stacken.kth.se)
6 * Copyright (C) 2008 Dan McMahill
8 * $Id$
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
25 /** \file project.h
26 \brief routines for loading and saving project files
27 \ingroup gerbv
28 */
30 #ifndef PROJECT_H
31 #define PROJECT_H
33 typedef struct project_list_t {
34 int layerno;
35 char *filename;
36 int rgb[3];
37 char inverted;
38 char is_pnp;
39 char visible;
40 gerbv_HID_Attribute *attr_list;
41 int n_attr;
42 struct project_list_t *next;
43 } project_list_t;
46 enum conv_type {
47 MINGW_UNIX = 0,
48 UNIX_MINGW = 1
53 * Reads a project from a file and returns a linked list describing the project
55 project_list_t *read_project_file(char const* filename);
58 /* Writes a description of a project to a file
59 * that can be parsed by read_project above */
60 int write_project_file(gerbv_project_t *gerbvProject, char const* filename, project_list_t *project);
62 void
63 project_destroy_project_list (project_list_t *projectList);
64 #endif /* PROJECT_H */