Board outline polygon generation
[geda-pcb/pcjc2.git] / src / strflags.h
bloba5f5b445ec80994bc3c019d36af625e64fb9dea8
1 /*
2 * COPYRIGHT
4 * PCB, interactive printed circuit board design
5 * Copyright (C) 2005 DJ Delorie
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * Contact addresses for paper mail and Email:
22 * DJ Delorie, 334 North Road, Deerfield NH 03037-1110, USA
23 * dj@delorie.com
27 #ifndef PCB_STRFLAGS_H
28 #define PCB_STRFLAGS_H
30 /* The purpose of this interface is to make the file format able to
31 handle more than 32 flags, and to hide the internal details of
32 flags from the file format. */
34 /* When passed a string, parse it and return an appropriate set of
35 flags. Errors cause error() to be called with a suitable message;
36 if error is NULL, errors are ignored. */
37 FlagType string_to_flags (const char *flagstring,
38 int (*error) (const char *msg));
40 /* Given a set of flags for a given object type, return a string which
41 can be output to a file. The returned pointer must not be
42 freed. */
43 char *flags_to_string (FlagType flags, int object_type);
45 /* Same as above, but for pcb flags. */
46 FlagType string_to_pcbflags (const char *flagstring,
47 int (*error) (const char *msg));
48 char *pcbflags_to_string (FlagType flags);
50 #endif