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