Merge branch 'master' of git://git.gpleda.org/pcb
[geda-pcb/see.git] / globalconst.h
blobcd6f4f97009800ccc169ae0e8e84e34f22b4bd05
1 /*
2 * COPYRIGHT
4 * PCB, interactive printed circuit board design
5 * Copyright (C) 1994,1995,1996 Thomas Nau
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 * Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
23 * Thomas.Nau@rz.uni-ulm.de
25 * RCS: $Id$
28 /* global constants
29 * most of these values are also required by files outside the source tree
30 * (manuals...)
33 #ifndef __GLOBALCONST_INCLUDED__
34 #define __GLOBALCONST_INCLUDED__
36 #include <limits.h>
38 /* ---------------------------------------------------------------------------
39 * some file-, directory- and environment names
41 #define EMERGENCY_NAME "PCB.%.8i.save" /* %i --> pid */
42 #define BACKUP_NAME "PCB.%.8i.backup" /* %i --> pid */
44 /* ---------------------------------------------------------------------------
45 * some default values
47 #define DEFAULT_SIZE "7000x5000" /* default layout size */
48 #define DEFAULT_MEDIASIZE "a4" /* default output media */
49 #define DEFAULT_CELLSIZE 50 /* default cell size for symbols */
50 #define CLICK_TIME 200 /* default time for click expiration */
51 #define SCROLL_TIME 25 /* time between scrolls when drawing beyond border */
52 #define COLUMNS 8 /* number of columns for found pin report */
54 /* ---------------------------------------------------------------------------
55 * frame between the groundplane and the copper
57 #define GROUNDPLANEFRAME 15 /* unit == mil */
58 #define MASKFRAME 3 /* unit == mil */
60 /* ---------------------------------------------------------------------------
61 * some limit specifications
63 #define LARGE_VALUE 10000000 /* maximum extent of board and elements in 1/100 mil */
65 #define MAX_LAYER 16 /* max number of layer, check source */
66 /* code for more changes, a *lot* more changes */
67 #define DEF_LAYER 8 /* default number of layers for new boards */
68 #define NUM_STYLES 4
69 #define MIN_LINESIZE 1 /* thickness of lines in 1/100000'' */
70 #define MAX_LINESIZE LARGE_VALUE
71 #define MIN_TEXTSCALE 10 /* scaling of text objects in percent */
72 #define MAX_TEXTSCALE 10000
73 #define MIN_PINORVIASIZE 2000 /* size of a pin or via in 1/100 mils */
74 #define MIN_PINORVIAHOLE 400 /* size of a pins or vias drilling hole */
75 #define MAX_PINORVIASIZE LARGE_VALUE
76 #define MIN_PINORVIACOPPER 400 /* min difference outer-inner diameter */
77 #define MIN_PADSIZE 100 /* min size of a pad */
78 #define MAX_PADSIZE LARGE_VALUE /* max size of a pad */
79 #define MIN_DRC_VALUE 10
80 #define MAX_DRC_VALUE 50000
81 #define MIN_DRC_SILK 100
82 #define MAX_DRC_SILK 3000
83 #define MIN_DRC_DRILL 100
84 #define MAX_DRC_DRILL 5000
85 #define MIN_DRC_RING 0
86 #define MAX_DRC_RING 10000
87 #define MIN_GRID 1 /* min grid in 1/100 mils */
88 #define MAX_GRID 100000 /* max grid in 1/100 mils */
89 #define CHUNK 100 /* step size for size sliders */
90 #define MIN_ZOOM -12 /* min zoom */
91 #define MAX_ZOOM 12 /* max zoom */
92 #define MAX_FONTPOSITION 255 /* upper limit of characters in my font */
94 #define MAX_COORD LARGE_VALUE /* coordinate limits */
95 #define MIN_SIZE 1000 /* lowest width and height of the board */
96 #define MAX_BUFFER 5 /* number of pastebuffers */
97 /* additional changes in menu.c are */
98 /* also required to select more buffers */
100 #define DEFAULT_DRILLINGHOLE 40 /* default inner/outer ratio for */
101 /* pins/vias in percent */
103 #if MAX_LINESIZE > MAX_PINORVIASIZE /* maximum size value */
104 #define MAX_SIZE MAX_LINESIZE
105 #else
106 #define MAX_SIZE MAX_PINORVIASIZE
107 #endif
109 #ifndef MAXPATHLEN /* maximum path length */
110 #ifdef PATH_MAX
111 #define MAXPATHLEN PATH_MAX
112 #else
113 #define MAXPATHLEN 2048
114 #endif
115 #endif
117 #define MAX_LINE_POINT_DISTANCE 0 /* maximum distance when searching */
118 /* line points */
119 #define MAX_POLYGON_POINT_DISTANCE 0 /* maximum distance when searching */
120 /* polygon points */
121 #define MAX_ELEMENTNAMES 3 /* number of supported names of */
122 /* an element */
123 #define MAX_LIBRARY_LINE_LENGTH 255 /* maximum line length in the */
124 /* library-description file */
125 #define MAX_NETLIST_LINE_LENGTH 255 /* maximum line length for netlist files */
126 #define MAX_MODESTACK_DEPTH 16 /* maximum depth of mode stack */
127 #define MAX_CROSSHAIRSTACK_DEPTH 16 /* maximum depth of state stack */
128 #define MIN_GRID_DISTANCE 4 /* minimum distance between point */
129 /* to enable grid drawing */
130 /* size of diamond element mark */
131 #define EMARK_SIZE 1000
132 #define GBX_MAXAPERTURECOUNT 2560
133 #endif