Index: trunk/src/conf_core.h =================================================================== --- trunk/src/conf_core.h (revision 30973) +++ trunk/src/conf_core.h (revision 30974) @@ -2,7 +2,7 @@ #define PCB_CONF_CORE_H #include -#include +#include "globalconst.h" #include /* NOTE: this struct has a strict format because a code generator needs to Index: trunk/src/data.h =================================================================== --- trunk/src/data.h (revision 30973) +++ trunk/src/data.h (revision 30974) @@ -31,7 +31,7 @@ #ifndef PCB_DATA_H #define PCB_DATA_H -#include +#include "globalconst.h" #include #include "layer.h" #include "crosshair.h" Index: trunk/src/flag.h =================================================================== --- trunk/src/flag.h (revision 30973) +++ trunk/src/flag.h (revision 30974) @@ -29,7 +29,7 @@ #ifndef PCB_FLAG_H #define PCB_FLAG_H -#include +#include "globalconst.h" /* Nobody should know about the internals of this except the macros in macros.h that access it. This structure must be simple-assignable Index: trunk/src/globalconst.h =================================================================== --- trunk/src/globalconst.h (nonexistent) +++ trunk/src/globalconst.h (revision 30974) @@ -0,0 +1,62 @@ +/* + * COPYRIGHT + * + * pcb-rnd, interactive printed circuit board design + * (this file is based on PCB, interactive printed circuit board design) + * Copyright (C) 1994,1995,1996 Thomas Nau + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Contact: + * Project page: http://repo.hu/projects/pcb-rnd + * lead developer: http://repo.hu/projects/pcb-rnd/contact.html + * mailing list: pcb-rnd (at) list.repo.hu (send "subscribe") + * + */ + +#ifndef PCB_GLOBALCONST_H +#define PCB_GLOBALCONST_H + +#include + +#define PCB_MAX_LAYER 38 /* max number of layer, check source code for more changes, a *lot* more changes */ +/* new array size that allows substrate layers */ +#define PCB_MAX_LAYERGRP ((PCB_MAX_LAYER+8)*2) /* max number of layer groups, a.k.a. physical layers: a few extra outer layers per side, pluse one substrate per real layer */ +#define PCB_MIN_THICKNESS RND_MIN_SIZE +#define PCB_MAX_THICKNESS RND_MAX_COORD +#define PCB_MIN_ARCRADIUS RND_MIN_SIZE +#define PCB_MAX_ARCRADIUS RND_MAX_COORD +#define PCB_MIN_TEXTSCALE 1 /* scaling of text objects in percent (must be an integer greater than 0) */ +#define PCB_MAX_TEXTSCALE 10000 +#define PCB_MIN_PINORVIASIZE PCB_MIL_TO_COORD(20) /* size of a pin or via */ +#define PCB_MIN_PINORVIAHOLE PCB_MIL_TO_COORD(4) /* size of a pins or vias drilling hole */ +#define PCB_MAX_PINORVIASIZE ((rnd_coord_t)RND_LARGE_VALUE) +#define PCB_MIN_PINORVIACOPPER PCB_MIL_TO_COORD(4) /* min difference outer-inner diameter */ +#define PCB_MIN_GRID 1 +#define PCB_MAX_FONTPOSITION 255 /* upper limit of characters in my font */ + +#define PCB_MAX_BUFFER 5 /* number of pastebuffers additional changes in menu.c are also required to select more buffers */ + +#define PCB_EMARK_SIZE PCB_MIL_TO_COORD(10) /* size of diamond element mark */ +#define PCB_SUBC_AUX_UNIT PCB_MM_TO_COORD(1) /* size of the unit vector for the subc-aux layer */ + +/**** Font ***/ +/* These are used in debug draw font rendering (e.g. pin names) and reverse + scale calculations (e.g. when report is trying to figure how the font + is scaled. Changing these values is not really supported. */ +#define PCB_FONT_CAPHEIGHT PCB_MIL_TO_COORD (45) /* (Approximate) capheight size of the default PCB font */ +#define PCB_DEFAULT_CELLSIZE 50 /* default cell size for symbols */ + +#endif Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 30973) +++ trunk/src/layer.h (revision 30974) @@ -107,7 +107,7 @@ included, that's the difference compared to routed layers */ #define PCB_LAYER_IS_OUTLINE(lyt, purpi) (((lyt) & PCB_LYT_BOUNDARY) && (((purpi) == F_proute) || ((purpi) == F_uroute) || ((purpi) == F_ucut) || ((purpi) == F_uvcut))) -#include +#include "globalconst.h" #include #include #include Index: trunk/src/librnd/core/compat_fs.c =================================================================== --- trunk/src/librnd/core/compat_fs.c (revision 30973) +++ trunk/src/librnd/core/compat_fs.c (revision 30974) @@ -48,7 +48,7 @@ #include #include #include -#include +#include "globalconst.h" #include #include Index: trunk/src/librnd/core/conf.c =================================================================== --- trunk/src/librnd/core/conf.c (revision 30973) +++ trunk/src/librnd/core/conf.c (revision 30974) @@ -32,7 +32,7 @@ #include #include #include -#include +#include "globalconst.h" #include #include #include Index: trunk/src/librnd/core/globalconst.h =================================================================== --- trunk/src/librnd/core/globalconst.h (revision 30973) +++ trunk/src/librnd/core/globalconst.h (revision 30974) @@ -36,24 +36,6 @@ #define RND_MAX_COORD ((rnd_coord_t)RND_LARGE_VALUE) /* coordinate limits */ #define RND_MIN_SIZE 0 -#define PCB_MAX_LAYER 38 /* max number of layer, check source code for more changes, a *lot* more changes */ -/* new array size that allows substrate layers */ -#define PCB_MAX_LAYERGRP ((PCB_MAX_LAYER+8)*2) /* max number of layer groups, a.k.a. physical layers: a few extra outer layers per side, pluse one substrate per real layer */ -#define PCB_MIN_THICKNESS RND_MIN_SIZE -#define PCB_MAX_THICKNESS RND_MAX_COORD -#define PCB_MIN_ARCRADIUS RND_MIN_SIZE -#define PCB_MAX_ARCRADIUS RND_MAX_COORD -#define PCB_MIN_TEXTSCALE 1 /* scaling of text objects in percent (must be an integer greater than 0) */ -#define PCB_MAX_TEXTSCALE 10000 -#define PCB_MIN_PINORVIASIZE PCB_MIL_TO_COORD(20) /* size of a pin or via */ -#define PCB_MIN_PINORVIAHOLE PCB_MIL_TO_COORD(4) /* size of a pins or vias drilling hole */ -#define PCB_MAX_PINORVIASIZE ((rnd_coord_t)RND_LARGE_VALUE) -#define PCB_MIN_PINORVIACOPPER PCB_MIL_TO_COORD(4) /* min difference outer-inner diameter */ -#define PCB_MIN_GRID 1 -#define PCB_MAX_FONTPOSITION 255 /* upper limit of characters in my font */ - -#define PCB_MAX_BUFFER 5 /* number of pastebuffers additional changes in menu.c are also required to select more buffers */ - #ifndef RND_PATH_MAX /* maximum path length */ #ifdef PATH_MAX #define RND_PATH_MAX PATH_MAX @@ -70,14 +52,6 @@ #define RND_MAX_POLYGON_POINT_DISTANCE 0 /* maximum distance when searching polygon points */ #define RND_MAX_NETLIST_LINE_LENGTH 255 /* maximum line length for netlist files */ #define RND_MIN_GRID_DISTANCE 4 /* minimum distance between point to enable grid drawing */ -#define PCB_EMARK_SIZE PCB_MIL_TO_COORD(10) /* size of diamond element mark */ -#define PCB_SUBC_AUX_UNIT PCB_MM_TO_COORD(1) /* size of the unit vector for the subc-aux layer */ -/**** Font ***/ -/* These are used in debug draw font rendering (e.g. pin names) and reverse - scale calculations (e.g. when report is trying to figure how the font - is scaled. Changing these values is not really supported. */ -#define PCB_FONT_CAPHEIGHT PCB_MIL_TO_COORD (45) /* (Approximate) capheight size of the default PCB font */ -#define PCB_DEFAULT_CELLSIZE 50 /* default cell size for symbols */ #endif Index: trunk/src/librnd/core/hid_inlines.h =================================================================== --- trunk/src/librnd/core/hid_inlines.h (revision 30973) +++ trunk/src/librnd/core/hid_inlines.h (revision 30974) @@ -28,7 +28,7 @@ #define PCB_HID_INLINES #include -#include +#include "globalconst.h" RND_INLINE rnd_hid_gc_t pcb_hid_make_gc(void) { Index: trunk/src/librnd/core/safe_fs.c =================================================================== --- trunk/src/librnd/core/safe_fs.c (revision 30973) +++ trunk/src/librnd/core/safe_fs.c (revision 30974) @@ -42,7 +42,7 @@ #include #include #include -#include +#include "globalconst.h" #include #include Index: trunk/src_plugins/fp_wget/edakrill.c =================================================================== --- trunk/src_plugins/fp_wget/edakrill.c (revision 30973) +++ trunk/src_plugins/fp_wget/edakrill.c (revision 30974) @@ -40,7 +40,7 @@ #include #include #include "fp_wget_conf.h" -#include +#include "globalconst.h" #define REQUIRE_PATH_PREFIX "wget@edakrill" Index: trunk/src_plugins/fp_wget/gedasymbols.c =================================================================== --- trunk/src_plugins/fp_wget/gedasymbols.c (revision 30973) +++ trunk/src_plugins/fp_wget/gedasymbols.c (revision 30974) @@ -40,7 +40,7 @@ #include #include #include "fp_wget_conf.h" -#include +#include "globalconst.h" #define REQUIRE_PATH_PREFIX "wget@gedasymbols" Index: trunk/src_plugins/fp_wget/wget_common.c =================================================================== --- trunk/src_plugins/fp_wget/wget_common.c (revision 30973) +++ trunk/src_plugins/fp_wget/wget_common.c (revision 30974) @@ -31,7 +31,7 @@ #include "wget_common.h" #include #include -#include +#include "globalconst.h" #include "../src_plugins/lib_wget/lib_wget.h" Index: trunk/src_plugins/import_sch2/import_sch.c =================================================================== --- trunk/src_plugins/import_sch2/import_sch.c (revision 30973) +++ trunk/src_plugins/import_sch2/import_sch.c (revision 30974) @@ -33,7 +33,7 @@ #include #include #include -#include +#include "globalconst.h" #include "board.h" #include "plug_import.h" Index: trunk/src_plugins/script/live_script.c =================================================================== --- trunk/src_plugins/script/live_script.c (revision 30973) +++ trunk/src_plugins/script/live_script.c (revision 30974) @@ -40,7 +40,7 @@ #include #include #include "undo.h" -#include +#include "globalconst.h" #include "script.h" Index: trunk/src_plugins/script/script.c =================================================================== --- trunk/src_plugins/script/script.c (revision 30973) +++ trunk/src_plugins/script/script.c (revision 30974) @@ -42,7 +42,7 @@ #include #include #include -#include +#include "globalconst.h" #include "script.h"