You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(4) |
Mar
(5) |
Apr
|
May
(5) |
Jun
(30) |
Jul
(2) |
Aug
(18) |
Sep
(14) |
Oct
(7) |
Nov
(21) |
Dec
(44) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(63) |
Feb
(94) |
Mar
(54) |
Apr
(39) |
May
(34) |
Jun
(25) |
Jul
(10) |
Aug
(33) |
Sep
(16) |
Oct
(62) |
Nov
(12) |
Dec
(2) |
| 2005 |
Jan
(71) |
Feb
(8) |
Mar
(50) |
Apr
|
May
(2) |
Jun
(12) |
Jul
(19) |
Aug
(8) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(8) |
| 2006 |
Jan
(10) |
Feb
(1) |
Mar
(301) |
Apr
(232) |
May
(26) |
Jun
(20) |
Jul
(26) |
Aug
(79) |
Sep
(92) |
Oct
(174) |
Nov
(17) |
Dec
(93) |
| 2007 |
Jan
(27) |
Feb
(179) |
Mar
(37) |
Apr
(81) |
May
(20) |
Jun
(5) |
Jul
|
Aug
(40) |
Sep
(68) |
Oct
(8) |
Nov
(47) |
Dec
(34) |
| 2008 |
Jan
(154) |
Feb
(15) |
Mar
(5) |
Apr
(21) |
May
(4) |
Jun
(1) |
Jul
(4) |
Aug
(6) |
Sep
(8) |
Oct
(9) |
Nov
(35) |
Dec
(50) |
| 2009 |
Jan
(8) |
Feb
(10) |
Mar
(6) |
Apr
(9) |
May
(7) |
Jun
(40) |
Jul
(7) |
Aug
(5) |
Sep
(2) |
Oct
(16) |
Nov
(42) |
Dec
(5) |
| 2010 |
Jan
(3) |
Feb
(15) |
Mar
(32) |
Apr
(18) |
May
(6) |
Jun
(9) |
Jul
|
Aug
(11) |
Sep
(16) |
Oct
|
Nov
(4) |
Dec
(35) |
| 2011 |
Jan
(24) |
Feb
(6) |
Mar
(27) |
Apr
(119) |
May
(72) |
Jun
(20) |
Jul
(31) |
Aug
(88) |
Sep
(86) |
Oct
(14) |
Nov
(11) |
Dec
(30) |
| 2012 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <gi...@gp...> - 2010-09-29 20:46:41
|
The branch, pcb-20100929 has been created
at 0cf505d684209fa776483f323f20d3fbadddfc68 (commit)
commit 0cf505d684209fa776483f323f20d3fbadddfc68
Author: DJ Delorie <dj...@de...>
Date: Wed Sep 29 16:43:11 2010 -0400
branch version 20100929
|
|
From: <gi...@gp...> - 2010-09-29 20:36:47
|
The branch, master has been updated
via 262ec1ab712879aa27a4e1b318b8128a8bf45fd4 (commit)
via 72f61208d539641f80004ed4608cbfddc3291f25 (commit)
via fdd585acc4f8f3c414af48e78d12b426aaa2b49e (commit)
from 5be5cf3f57c61c2e0bcb5da241514012350ccdbd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
ChangeLog | 1743 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
NEWS | 60 ++
po/POTFILES.in | 5 +-
3 files changed, 1806 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit 262ec1ab712879aa27a4e1b318b8128a8bf45fd4
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Update NEWS from ChangeLog
:100644 100644 d4713e6... d3435ec... M NEWS
commit 72f61208d539641f80004ed4608cbfddc3291f25
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Update ChangeLog from git logs.
:100644 100644 b26c431... 672dae6... M ChangeLog
commit fdd585acc4f8f3c414af48e78d12b426aaa2b49e
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Fix for distcheck errors.
:100644 100644 9ef4db5... 3bfb3ed... M po/POTFILES.in
=========
Changes
=========
commit 262ec1ab712879aa27a4e1b318b8128a8bf45fd4
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Update NEWS from ChangeLog
diff --git a/NEWS b/NEWS
index d4713e6..d3435ec 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,64 @@
========================================================================
+Release Notes for PCB snapshot 20100929
+========================================================================
+This release represents over 240 commits and as such this summary
+clearly is not complete. See the ChangeLog file for the complete list
+of changes.
+
+Features
+--------
+
+- PCB can directly import (forward annotate) schematics while running.
+- Many places where measurements are entered now accept units, like
+ "5mm", and "cm" and "in" are allowed too.
+- Free Rotate Buffer added to menu
+- Polygon Hole tool.
+- F12 invokes the Lock tool.
+- Russian translation added.
+- DBUS is enabled by default when possible.
+- Command-line exporters can run action scripts too.
+- GTK tool tips on elements, pins, and nets.
+- Command-line actions in GUIs do not require (,,) syntax.
+- PCB can import footprints both in subdirectories and the named directories.
+- New GCode exporter.
+- Footprint files use ".fp" as the suffix; this is automatically
+ searched for if needed.
+- GTK dialogs do not show at startup unless requested.
+- Stackup can be specified on the command line for command-line exporting.
+- Reference card updated.
+- The snap-point in pads is the center.
+- The 's' key toggles polygons to clear/notclear all pads and pins
+
+Bug Fixes
+---------
+
+- Various PNG export fixes.
+- lesstif's magic toggle-layers-on-flip fixed.
+- Arc bounding box math fixed.
+- Fixed: sometimes, disabling silk also disabled the solder layer.
+- "pcb --help" prints all options again
+- Add mnemonic for "close without saving"
+- Don't select silk on the back side when it's invisible.
+- Various polygon rendering bugs fixed.
+- PNG drill bloat export fixed.
+- Attempts to change polygon clearance *on* polygons results in a hint.
+- PNG doesn't segfault if not all graphic formats are supported.
+- Various toporouter fixes and improvements
+- HID_Mixed is supported in attribute dialogs
+- Flipped rectangles in PS exports are drawn correctly.
+- Optimizer removes micro-traces under pads.
+- Vias, pins, and pads are now drawn under the mask instead of over.
+- Windows supported better.
+
+Other
+-----
+
+- Sources converted to C99
+- Doc extraction gives more control over categories.
+- Thermal documentation updated.
+- Actions can see the context they were invoked in
+
+========================================================================
Release Notes for PCB snapshot 20091103
========================================================================
This release represents almost 200 commits and as such this summary
commit 72f61208d539641f80004ed4608cbfddc3291f25
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Update ChangeLog from git logs.
diff --git a/ChangeLog b/ChangeLog
index b26c431..672dae6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,1746 @@
+2010-09-29 DJ Delorie * dj AT delorie dot com *
+
+ * src/action.c: Make new text clear polygons
+
+2010-09-20 DJ Delorie * dj AT delorie dot com *
+
+ * src/parse_l.l: Don't print "can't open ./default_font for reading"
+ all the time
+
+2010-09-19 DJ Delorie * dj AT delorie dot com *
+
+ * src/file.c, src/parse_l.l: Wrap more messages in debug Messages about where fonts were found, or how many milliseconds it
+ takes to load a file, are not normally needed. Wrap them in DEBUG
+ conditionals.
+
+2010-09-14 DJ Delorie * dj AT delorie dot com *
+
+ * src/hid/png/png.c: If we don't use the outline to clip, don't draw
+ it either.
+
+2010-09-14 DJ Delorie * dj AT delorie dot com *
+
+ * src/hid/png/png.c: Fix bug tracker # 3064887 PNG exported all black in photo mode if the "outline" was exactly
+ the board size, because the left/bottom edges were clipped leaving a
+ big hole. With this patch, we do two things: 1. Detect a non-trivial outline, and only do outline processing if
+ found. Thus, a rectangular outline exactly the size of the board is
+ just ignored - no black border on the output image. 2. Any outline line that's drawn exactly on the bottom/right edge is
+ brought in by half a pixel to ensure it's drawn in the resulting
+ image.
+
+2010-09-13 DJ Delorie * dj AT delorie dot com *
+
+ * src/action.c: Avoid divide-by-zero Check for a zero dispersion before computing it.
+
+2010-09-11 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/thermal.c: thermal.c: Initialise flags of the LineType object
+ in square_therm() Keeps valgrind quiet about conditionals based upon uninitialised
+ variables.. must be a good thing.
+
+2010-09-10 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/action.c, src/autoplace.c, src/autoroute.c, src/buffer.c,
+ src/copy.c, src/create.c, src/crosshair.c, src/data.h, src/djopt.c,
+ src/draw.c, src/file.c, src/find.c, src/flags.c,
+ src/hid/batch/batch.c, src/hid/common/extents.c,
+ src/hid/common/flags.c, src/hid/gcode/gcode.c,
+ src/hid/gerber/gerber.c, src/hid/gtk/gtkhid-main.c,
+ src/hid/gtk/gui-config.c, src/hid/gtk/gui-output-events.c,
+ src/hid/gtk/gui-top-window.c, src/hid/lesstif/dialogs.c,
+ src/hid/lesstif/main.c, src/hid/lesstif/menu.c,
+ src/hid/nelma/nelma.c, src/hid/png/png.c, src/hid/ps/eps.c,
+ src/hid/ps/ps.c, src/line.c, src/macro.h, src/misc.c, src/move.c,
+ src/polygon.c, src/print.c, src/puller.c, src/rats.c, src/rtree.c,
+ src/rubberband.c, src/search.c, src/select.c, src/toporouter.c:
+ Split usage of "max_layer" into max_copper_layer and max_group PCB has an equal number of layer groups as copper layers, so the
+ "max_layer" #define'd variable has been used throught the codebase
+ to delimit iteration over both layer groups, and layers. This makes it hard for people reading the codebase to identify
+ whether a given loop is over layers or layer groups (since the
+ counter variable is often fairly terse or indescript). Confusingly,
+ in some of the code, layer groups indexes are stored in a variable
+ called "layer". To aid understanding of the code, this commit removes the max_layer
+ variable (#define'd to (PCB->Data->LayerN)), and replaces it with
+ two similarly #define'd variables, "max_copper_layer" and
+ "max_group". This commit also introduces convenience macros: #define solder_silk_layer (max_copper_layer + SOLDER_LAYER) #define component_silk_layer (max_copper_layer + COMPONENT_LAYER) Which make the code intention much clearer for a common case of the
+ old max_layer variable usage.
+
+2010-09-10 DJ Delorie * dj AT delorie dot com *
+
+ * src/hid/lesstif/main.c: Fix lesstif SwapSides magic layer option. If the first layer in the layer group is silk, the swap sides key
+ won't auto-toggle the solder and component groups, nor properly
+ activate them if it does. Add code to find a visible *copper* layer
+ in the layer group and use that.
+
+2010-09-09 Ineiev * ineiev AT gmail dot com *
+
+ * src/find.c: find.c: Add RATLINE_TYPE to switch statement in
+ BuildObjectList Part of Ineiev's patch from:
+ http://archives.seul.org/geda/user/Nov-2009/msg00456.html Modified-by: Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+2010-09-09 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/find.c: Fix crash due to uninitalised variable in DRC check
+ Bug #3033772 Andrew Armenia noted that the second pointer returned from
+ BuildObjectList(), "object_type_list" would be left uninitialised if
+ the object type was not encountered. A subsequent call to free() in
+ DRCFind() would then cause memory corruption. The issue was originally reported by Ineiev:
+ http://archives.seul.org/geda/user/Nov-2009/msg00456.html That patch addresses the lack of a RATLINE_TYPE in the
+ BuildObjectType function, but does not prevent a segfault for other
+ unknown types.
+
+2010-09-08 DJ Delorie * dj AT delorie dot com *
+
+ * src/misc.c: Fix arc bounding box math. Calculations for Arc bounding boxes weren't taking into account the
+ wide range of possible starting arcs. This patch uses modulus to
+ force angles into canonical forms and iterates through quadrants to
+ capture the full extents of each arc.
+
+2010-09-08 DJ Delorie * dj AT delorie dot com *
+
+ * src/parse_y.y: Fix typo in parse_y.y A typo in parse_y.y was causing the documentation to be corrupted.
+
+2010-09-07 DJ Delorie * dj AT delorie dot com *
+
+ * src/hid/gtk/gtkhid-main.c, src/hid/lesstif/main.c: Fix layer
+ visibility logic for some boards. If the Groups() line listed the c/s layer before the copper layer,
+ disabling silk would also disable the copper. This change searches
+ the entire layer group looking for any layer that might need to be
+ drawn, and uses that as the exemplar instead of blindly choosing the
+ first layer in the list.
+
+2010-09-01 DJ Delorie * dj AT delorie dot com *
+
+ * src/gpcb-menu.res, src/pcb-menu.res: Add import settings to menus At the bottom of the Settings menu, add a submenu for import
+ settings for placing new elements.
+
+2010-09-01 DJ Delorie * dj AT delorie dot com *
+
+ * src/action.c: Store units for import::disperse If the user specified the dispersement as "123mm" for example, store
+ that string as-is for convenience.
+
+2010-09-01 DJ Delorie * dj AT delorie dot com *
+
+ * src/misc.c: Enhance GetValue Allow cm and in as units. Allow the units to be part of the value
+ string or separate.
+
+2010-09-01 DJ Delorie * dj AT delorie dot com *
+
+ * src/action.c: Add new-part-location to import Adds import::newX, import::newY, and import::disperse attributes.
+ These determine where new parts are located when they're added to
+ the layout, including some random variation to keep them from being
+ all on exactly the same spot. Parameters were added to Import() to
+ set these: In @code{Import()} is called with @code{setnewpoint} then the
+ location of new components can be specified. This is where parts
+ show up when they're added to the board. The default is the center
+ of the board. @table @code @item Import(setnewpoint) Prompts the user to click on the board somewhere, uses that point.
+ If called by a hotkey, uses the current location of the crosshair. @item Import(setnewpoint,mark) Uses the location of the mark. If no mark is present, the point is
+ not changed. @item Import(setnewpoint,center) Resets the point to the center of the board. @item Import(setnewpoint,X,Y,units) Sets the point to the specific coordinates given. Example:
+ @code{Import(setnewpoint,50,25,mm)} @end table Note that the X and Y locations are stored in attributes named
+ @code{import::newX} and @code{import::newY} so you could change
+ them manually if you wished. Calling @code{Import(setdisperse,D,units)} sets how much the newly
+ placed elements are dispersed relative to the set point. For
+ example, @code{Import(setdisperse,10,mm)} will offset each part
+ randomly up to 10mm away from the point. The default dispersion is
+ 1/10th of the smallest board dimension. Dispersion is saved in the
+ @code{import::disperse} attribute.
+
+2010-09-01 DJ Delorie * dj AT delorie dot com *
+
+ * src/misc.c, src/misc.h: Add AttributeRemove functions Add AttributeRemoveFromList() and the wrapper AttributeRemove()
+
+2010-08-28 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/hid/gtk/gui-top-window.c: hid/gtk: Remove unused colour
+ allocation for "BlackPixel"
+
+2010-08-28 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/hid/gtk/gui-top-window.c: hid/gtk: Remove unused extern HID
+ ghid_hid from gui-top-window.c
+
+2010-08-25 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/draw.c: draw.c: Remove the unused "Erasing" flag / counter This variable tracks whether the object being drawn is to be erased.
+ It is never actually tested, so remove it.
+
+2010-08-25 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/draw.c: draw.c: Initialise integer counters with 0, not
+ "false". For the "doing_assy" flag, fix its type to "bool" rather than "int".
+
+2010-08-25 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/draw.c: draw.c: Remove "HaveGathered" parameter from
+ DrawLineLowLevel() This is superflous, as it is only passed as TRUE when the Gathering
+ variable it overrides is known to be FALSE anyway.
+
+2010-08-25 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/data.c, src/data.h, src/draw.c: Remove unused global variable
+ "render", and "extern bool RedrawOnEnter" The "render" variable was set and reset, but was not used anywhere.
+
+2010-08-24 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/hid/gtk/gui-output-events.c: hid/gtk: Track previous state of
+ crosshair attachements when undrawing For correctness - this doesn't necessarily fix any rendering bugs.
+
+2010-08-24 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/hid/gtk/gui-utils.c: hid/gtk: Simplify ghid_draw_area_update() If the rect passed is NULL, we can simply pass that on to
+ gdk_window_invalidate_rect() which will invalidate the whole area.
+
+2010-08-24 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/hid/gtk/gui-utils.c, src/hid/gtk/gui.h: hid/gtk: Remove unused
+ functions relating to string display Removes ghid_string_markup_extents() and ghid_string_markup()
+
+2010-08-24 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/hid/gtk/gui-utils.c: hid/gtk: Remove unused
+ ghid_draw_area_clear() function
+
+2010-08-15 DJ Delorie * dj AT delorie dot com *
+
+ * src/hid/gtk/gui-top-window.c: Merge GTK attributes. Since the new help system only allows one attribute (i.e. command
+ line) list per HID, combine the two GTK lists into one.
+
+2010-08-15 DJ Delorie * dj AT delorie dot com *
+
+ * src/hid/lesstif/main.c, src/hid/lesstif/menu.c: Merge lesstif
+ attributes. Since the new help system only allows one attribute (i.e. command
+ line) list per HID, combine the two Lesstif lists into one.
+
+2010-08-15 DJ Delorie * dj AT delorie dot com *
+
+ * src/main.c: Print all command line options with help. Keep track of which attributes we've printed as part of the HID
+ help. After that, print any remaining attributes we know about that
+ we haven't already printed.
+
+2010-08-15 DJ Delorie * dj AT delorie dot com *
+
+ * src/hid/gtk/gtkhid-main.c, src/hid/gtk/gui-top-window.c: Export
+ GTK attributes. The new help system uses export attribute lists for help, so the
+ Lesstif HID needs to export them.
+
+2010-08-15 DJ Delorie * dj AT delorie dot com *
+
+ * src/hid/lesstif/main.c: Export lesstif attributes. The new help system uses export attribute lists for help, so the
+ Lesstif HID needs to export them.
+
+2010-08-15 DJ Delorie * dj AT delorie dot com *
+
+ * src/action.c: Check for NULL element name when adding attributes. When setting element attributes, if the element is as yet unnamed,
+ use an "unnamed element" title instead of segfaulting.
+
+2010-08-15 Robert Spanton * rspanton AT zepler dot net *
+
+ * po/ru.po, src/hid/gtk/gui-dialog.c: Add a keyboard shortcut to
+ pcb's "close without saving" option This patch adds a keyboard mnemonic to the "close without saving"
+ option in the close confirmation dialog box.
+
+2010-08-15 DJ Delorie * dj AT delorie dot com *
+
+ * src/action.c: Update Import() docs Fix capitalization. Mention that elements that should be removed
+ are left, but selected, after an Import.
+
+2010-08-15 DJ Delorie * dj AT delorie dot com *
+
+ * src/buffer.c, src/gpcb-menu.res, src/pcb-menu.res: Add
+ FreeRotateBuffer to the Menu Modify FreeRotateBuffer() to prompt the user if no angle is passed.
+ Add an entry to the menus to call it that way.
+
+2010-08-10 kai-martin * kmk AT bibo dot iqo dot uni-hannover dot de *
+
+ * src/action.c: modified: action.c (fix element name position on
+ import schematic)
+
+2010-08-14 DJ Delorie * dj AT delorie dot com *
+
+ * tools/gnet-pcbfwd.scm: Quote strings Quote all strings that might contains commas or close parens, to
+ avoid syntax errors when those names are passed to actions.
+
+2010-08-03 DJ Delorie * dj AT delorie dot com *
+
+ * src/select.c: Don't select silk on the far side if the far side is
+ not shown The logic for determining if a layer was "on" didn't take into
+ account that the two silkscreen layers are handled differently.
+ Thus, if you tried to select shown silk, you would select hidden
+ silk on the other side too, unknowingly moving that around. With this patch, silk on the far side is only selected if the far
+ side ("invisible" side) is shown.
+
+2010-06-06 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/action.c, src/const.h, src/crosshair.c, src/flags.c,
+ src/gpcb-menu.res, src/hid/gtk/gui-icons-mode-buttons.data,
+ src/hid/gtk/gui-misc.c, src/hid/gtk/gui-output-events.c,
+ src/hid/gtk/gui-top-window.c, src/hid/lesstif/main.c,
+ src/pcb-menu.res, src/set.c: Introduce POLYGONHOLE_MODE for creating
+ holes in polygons Having selected polygon hole mode, the first click selects which
+ polygon to cut a hole in. A second click defines the start point of
+ the hole contour. The tool then behaves in a similar way to the
+ polygon drawing tool, with the hole ending when the start point is
+ re-clicked. To avoid creating illegal polygons, the hole drawn is subtracted
+ from a representation of the original polygon with the
+ poly_Boolean_free(). This consolidates any contours it intersects
+ with and prevents the user defining contours which intersect each
+ other. (Although we don't currently prevent the the user drawing
+ self-intersecting contours). The resulting POLYAREA is re-processed into PolygonType objects,
+ potentially more than one - if the hole drawn bisects the original
+ polygon. To keep undo operations simple, these are added as
+ completely new objects and the original polygon is deleted - along
+ with its ID.
+
+2010-06-06 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/polygon.c, src/polygon.h: Expose APIs for creating POLYAREA
+ from PolygonType objects and back The PolygonPoly() API wraps polygon.c's original_poly() function,
+ whilst PolyToPolygonsOnLayer() converts the passed POLYAREA and all
+ those linked to it into discrete PolygonType objects on the board.
+
+2010-06-06 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/action.c, src/autoroute.c, src/buffer.c, src/copy.c,
+ src/create.c, src/create.h, src/crosshair.c, src/file.c,
+ src/file.h, src/global.h, src/insert.c, src/insert.h, src/mymem.c,
+ src/mymem.h, src/parse_l.l, src/parse_y.y, src/polygon.c,
+ src/polygon.h, src/remove.c, src/report.c, src/undo.c, src/undo.h:
+ Support holes in input polygons (incl. file-format addition) PCB file-format date is now 20100606, and files saved with this or
+ greater PCB version will not load with older versions of PCB. If a
+ particular board doesn't make use of the polygon hole feature, the
+ PCB revision date in the file can be manually reset to 20070407. The file-format addition is as follows. Previously, a polygon would
+ be specified as a series of coordinates, such as: Layer(1 "component") ( Polygon("clearpoly") ( [6000 6000] [81000 6000] [81000 59000] [6000 59000] ) ) This commit introduces the ability to specify negative contours
+ which form holes in the polygon shape, e.g.: Layer(1 "component") ( Polygon("") ( [6000 6000] [81000 6000] [81000 59000] [6000 59000] Hole ( [76000 55000] [76000 38000] [58000 38000] [58000 55000] ) Hole ( [10000 10000] [10000 28000] [27000 28000] [27000 10000] ) ) ) The winding order of the contours specified in the file does not
+ matter, since PCB will automatically invert the order of the points
+ as necessary (as it always did with the outer contour). Hole contours should not intersect or self-intersect (although this
+ isn't checked for at load time). Hole contours must not intersect
+ the polygon's outer contour. Technical details: The PolygonType structure has a number of new fields, the critical
+ ones being an array of indices defining the start of hole contours. (PolygonType *)->HoleIndex[n] The number of hole contours is stored in (PolygonType
+ *)->HoleIndexN, and the maximum allocated memory for indices in
+ (...)->HoleIndexMax. The first hole contour starts at the point
+ given by (...)->Points[(...)->HoleIndex[0]], and continues until the start of
+ the next contour, or the last point defined. By storing all polygon points (including holes) in the existing
+ array (...)->Points[], existing code which operates on the polygon as a
+ whole, e.g. translation and rotation, can operate without change. For other operations, determining wrap-around to operate within the
+ same contour requires more computation. Some helper functions have
+ been introduced in polygon.c to aid this, next_contour_point() and
+ prev_contour_point(). Where applicable, these have been used to
+ simplify existing code which used ad-hoc wrap-around code. polygon_point_idx() computes the array index of a point in a polygon
+ from its PointTypePtr address. This is used to replace a search
+ idiom used in a number of places. polygon_point_contour() returns
+ the number of the contour a given point index belongs in, 0 for the
+ outer contour, 1 for the first hole etc.. Undo: Undo with holes has become a little more complex. The undo for a
+ point removal must now record which contour the point came from.
+ This is determined by the index of the removed point, and a new
+ boolean flag "last_in_contour", indicating if the point was at the
+ end of its contour. This flag is passed to InsertPointIntoObject(),
+ which uses it to disambiguate inserting a point at an index on the
+ boundary of two contours. Undo operations for removing hole contours "cheat" by saving a copy
+ of the whole polygon into the undo buffer rather than attempting to
+ describe the operation as a delta change to an existing polygon.
+ When undoing, the object IDs are swapped to keep them consistent.
+
+2010-06-05 Jared Casper * jaredcasper AT gmail dot com *
+
+ * src/hid/gtk/gui-log-window.c: Add missing return statement.
+
+2010-06-05 Jared Casper * jaredcasper AT gmail dot com *
+
+ * src/gpcb-menu.res, src/pcb-menu.res: Fix Bug #2717258, Lock mode
+ with F12. Binds F12 to lock mode in the default gcpb-menu.res and pcb-menu.res
+ files, bringing them inline with existing documentation.
+
+2010-06-05 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/crosshair.c, src/hid/lesstif/main.c: Revert some "True" ->
+ "true" string changes These were inadvertently changed by the mechanised Boolean -> bool
+ replacement in commit ad5eb5a165442be38624aa622beeb57dc1d2afbd
+
+2010-06-05 Robert Spanton * rspanton AT zepler dot net *
+
+ * src/action.c, src/action.h, src/autoplace.c, src/autoplace.h,
+ src/autoroute.c, src/autoroute.h, src/box.h, src/buffer.c,
+ src/buffer.h, src/change.c, src/change.h, src/clip.c, src/clip.h,
+ src/command.c, src/copy.c, src/copy.h, src/create.c, src/create.h,
+ src/crosshair.c, src/crosshair.h, src/data.c, src/data.h,
+ src/djopt.c, src/draw.c, src/draw.h, src/drill.c, src/file.c,
+ src/file.h, src/find.c, src/find.h, src/flags.c, src/global.h,
+ src/gts/gts.h, src/hid/gerber/gerber.c,
+ src/hid/gtk/gui-command-window.c, src/hid/gtk/gui-dialog-size.c,
+ src/hid/gtk/gui-drc-window.c, src/hid/gtk/gui-library-window.c,
+ src/hid/gtk/gui-misc.c, src/hid/gtk/gui-netlist-window.c,
+ src/hid/gtk/gui-output-events.c, src/hid/gtk/gui-top-window.c,
+ src/hid/lesstif/dialogs.c, src/hid/lesstif/library.c,
+ src/hid/lesstif/main.c, src/hid/lesstif/menu.c,
+ src/hid/lesstif/netlist.c, src/hid/lesstif/styles.c,
+ src/hid/nelma/nelma.c, src/insert.c, src/insert.h, src/line.c,
+ src/main.c, src/misc.c, src/misc.h, src/move.c, src/move.h,
+ src/mtspace.c, src/mtspace.h, src/mymem.c, src/netlist.c,
+ src/parse_l.l, src/parse_y.y, src/polygon.c, src/polygon.h,
+ src/polygon1.c, src/rats.c, src/rats.h, src/remove.c, src/remove.h,
+ src/report.c, src/rotate.c, src/rtree.c, src/rtree.h,
+ src/rubberband.c, src/search.c, src/search.h, src/select.c,
+ src/select.h, src/set.c, src/set.h, src/thermal.c,
+ src/toporouter.c, src/undo.c, src/undo.h, src/vendor.c,
+ src/vendor.h: Change all Booleans to bool. c99 provides bool. Declaring Boolean adds some obscurity to the
+ code, and could also miss out on some machine-specific
+ optimisations. This patch removes the definition of Boolean, and changes all
+ instances of it to bool. If you've come across this commit because it's causing you issues
+ when rebasing on mainline pcb, then you should find the following
+ script useful. You can use it to rewrite all of your local commits
+ to use bool instead of Boolean like so: git filter-branch --tree-filter rename-bool.sh HEAD...${HASH} Replacing ${HASH} with the latest commit that's in mainline. if [ ! -f src/autoplace.c ] then echo "This doesn't look like the PCB source directory." echo "Cowardly exiting to avoid causing misery!" exit fi chg_bool () { FNAME=$1 ADDR=$2 sed -i -e "${ADDR}s/\bBoolean\b/bool/g" "$FNAME" sed -i -e "${ADDR}s/\bTrue\b/true/g" "$FNAME" sed -i -e "${ADDR}s/\bFalse\b/false/g" "$FNAME" } find -name '*.[ch]' | while read f do chg_bool "$f" done find -name '*.[yl]' | while read f do # Replace first '%%' line with __TMP_MARKER_ sed -i -e '0,/^%%/s/^%%/__TMP_MARKER_/' "$f" # Replace in section before the first '%%' chg_bool "$f" "0,/^__TMP_MARKER_/" # Replace in section after the last '%%' chg_bool "$f" "/^%%/,$" # Remove the temporary marker: sed -i -e 's/^__TMP_MARKER_/%%/' "$f" done
+
+2010-06-03 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/file.c, src/parse_y.y: Refer to git, not cvs when reading a
+ file from newer PCB.
+
+2010-06-02 Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+ * po/LINGUAS, po/ru.po: Add Russian translation
+
+2010-06-02 Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+ * po/POTFILES.in: Add source files with localized strings to .po
+ generation
+
+2010-06-02 Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+ * src/hid/gtk/gui-keyref-window.c, src/rats.c: Adjust punctuation
+ and capitalisation of some messages
+
+2010-06-02 Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+ * src/gpcb-menu.res: Add top level menu to localization
+
+2010-06-02 Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+ * src/gpcb-menu.res, src/pcb-menu.res: String unification and white
+ space cleanup String Rip up selected auto-routed tracks unified, so it can be
+ translated as one string. Also some white spaces at end of line
+ removed.
+
+2010-06-02 Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+ * src/hid/common/actions.c: Localize need coord message before
+ output
+
+2010-06-02 Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+ * src/action.c, src/change.c, src/create.c,
+ src/hid/gtk/gtkhid-main.c, src/hid/gtk/gui-command-window.c,
+ src/hid/gtk/gui-config.c, src/hid/gtk/gui-top-window.c,
+ src/hid/ps/ps.c: Add strings to localization
+
+2010-06-02 Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+ * src/global.h, src/hid/gtk/gui.h: Move internationalization macros
+ to one header
+
+2010-06-02 Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+ * autogen.sh: Add rule to extract localized stings from .res files
+
+2010-06-02 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/hid/gtk/gtkhid-gdk.c: hid/gtk: Don't call gdk_draw_points()
+ when we have no grid points to draw Fixes this warning seen when zooming close in on a course grid
+ setting: Gdk-CRITICAL **: gdk_draw_points: assertion `(points != NULL) &&
+ (n_points > 0)' failed
+
+2010-06-02 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/polygon1.c: Fix node_label() function to work with
+ self-intersection Rather than just giving up if we encounter our own edges in the CVC
+ list at first, skip them until we either run out of edges, or find
+ one belonging to the other polygon. I'm not 100% sure this is the correct fix, but it "seems to work". Test-case: Layer(1 "component") ( Line[60000 70000 60000 90000 4000 2000 "clearline"] Line[80000 60000 80000 90000 4000 2000 "clearline"] Line[90000 90000 90000 50000 4000 6000 "clearline"] Line[60000 40000 80000 60000 4000 6000 "clearline"] Polygon("clearpoly") ( [10000 10000] [140000 10000] [140000 140000] [10000 140000] ) )
+
+2010-06-02 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/polygon1.c: Fix the polygon touching contour test in
+ poly_ChkContour The following test-cases were used to help verify the changes: This polygon forms a self-touching shape like this: \| However, the right-hand edge does NOT have a node at the
+ junction. /| This previously caused it to fail the
+ self-intersection test. It should be reported as good. Polygon("") ( [85000 50000] [85000 90000] [83000 90000] [83536 63535] [85000 59999] [83535 56464] ) This polygon forms a self-intersecting shape like this: |/ (The vertical section is a straight line with no node in the
+ middle) /| It must be reported as bad. Polygon("") ( [85000 50000] [85000 90000] [83000 90000] [83536 63535] [85000 59999] [89535 56464] ) This polygon self-intersects, and must be reported as bad: Polygon("") ( [160000 50000] [160000 90000] [170000 100000] [180000 120000] [180000 150000] [160000 150000] [160000 120000] [170000 100000] [180000 90000] [180000 50000] ) This polygon self-touches, and should be reported as good: Polygon("clearpoly") ( [120000 50000] [120000 90000] [130000 100000] [120000 120000] [120000 150000] [140000 150000] [140000 120000] [130000 100000] [140000 90000] [140000 50000] )
+
+2010-06-02 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/polygon1.c: Fix poly_ComputeInteriorPoint() to work correctly
+ for holes The step where the algorithm finds a convex node to start from must
+ take into account whether the polygon vertices are ordered as a hole
+ or an outer contour. We now correctly compute a point inside the
+ hole, rather than possibly outside it. This fixes an assertion on the following test-case. Prior to this
+ commit, the incorrect "interior" point tested for the concave hole
+ happens to lie inside the polygon's other hole, causing it to fail
+ an assert during processing. Layer(2 "solder") ( Line[340000 160000 183700 108000 1500 3000 "clearline"] Line[92000 121000 120000 90000 1500 3000 "clearline"] Line[270000 90000 120000 90000 1500 3000 "clearline"] Polygon("clearpoly") ( [40000 40000] [320000 40000] [320000 200000] [40000 200000] ) ) The bug was created in my attempt to speed up poly_ContourInContour:
+ commit 3d0a8bd1dae0816d364a774bf9b958faf2983ec7
+
+2010-05-11 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/polygon1.c: Speed up poly_ContourInContour() test by computing
+ interior point NB: This introduces a behaviour change in the boundary case, that
+ two identical contours will now be considered to be inside each
+ other. First perform a test on an arbitrary boundary node (proving that the
+ contour being testing for "insideness" is not outside the other
+ contour. (This cannot not conclusively prove the contour is inside). In many cases, this simple node test gives enough evidence to return
+ 0 for the ContourInContour test computing and testing an interior
+ point. Rather than checking each exterior point, compute a strictly
+ interior point (not on the boundary), and test that against the
+ second contour. Benchmarked to improve performance over other fixes for the buggy
+ test. Example board load (CPU) times for a complex board: 21.50 (buggy contour_in_contour - single node point test) 24.43 (brute-force node point tests) 21.79 (single node test, then internal point test)
+
+2010-05-10 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/polygon1.c: Fix poly_ContourInContour() test not to return
+ TRUE for touching contours This test could previously return true for touching contours, such
+ as: __________.... |_________ | : :........ || : :: /\ : || :
+ Note that the bounding box of A is inside that of B, :: / \ :/ \ :
+ such that initial bounding box checks won't reject the ::/ A \/ B
+ \: possibility of A being inside B. ::\ /\ /: :: \ / :\ /
+ : ::..\/..:.\/..: When testing for insideness, the first point on A's contour is
+ picked. In this case, unfortunately being the touching X point
+ between the two contours. This point (correctly) returns as being
+ inside B - and the false presumption is that the whole A contour is
+ inside B. This commit introduces an unfortunately slow, but more robust test,
+ where we check each node in A for whether it is inside B. We return
+ as soon as we find an A node outside B, however this means the test
+ is VERY much slower for the case where A _is_ inside B.
+
+2010-05-11 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/polygon1.c: Add comment explaining assumptions for
+ poly_ContourInContour function Also, document its buggy boundary condition where the arbitrary
+ point chosen to test happens to be a common node shared between two
+ separate contours (which the test should return FALSE for).
+
+2010-05-10 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * configure.ac: Make --enable-dbus default for the GTK and Lesstif
+ HIDs
+
+2010-05-10 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/main.c: Allow running of action scripts when running PCB as an
+ exporter
+
+2010-05-10 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/polygon1.c: Improve dump_poly() output Make it print each contour of a POLYAREA, and move the NEXT PLINE
+ and NEXT POLY messages inside the loops interating over these
+ structures.
+
+2010-05-10 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/hid/gtk/gui-output-events.c: hid/gtk: Add tool-tip to identify
+ element, pin and net when hovering
+
+2010-05-09 DJ Delorie * dj AT delorie dot com *
+
+ * src/gpcb-menu.res, src/pcb-menu.res: Clarify the meaning of keys
+ bound to SetValue() Clarifies that keys which are bound to SetValue change the styles,
+ not the existing objects, so they really affect *new* objects.
+
+2010-05-04 DJ Delorie * dj AT delorie dot com *
+
+ * src/hid/png/png.c: Fix PNG bloat for drills. Keep track of when the GC is doing an erase or drill, and invert the
+ bloat for holes.
+
+2010-04-23 DJ Delorie * dj AT delorie dot com *
+
+ * src/hid/gtk/gtkhid-main.c: Allow for only one confirm button. The GTK confirm_dialog() hook now supports the user passing only one
+ button. Before, if you passed just "ok" it would create two OK
+ buttons.
+
+2010-04-23 DJ Delorie * dj AT delorie dot com *
+
+ * src/change.c: Add hint about :MinClearGap(Selected,=10,mil) Add a hint to the user about how to change the clearance of a group
+ of objects.
+
+2010-04-23 DJ Delorie * dj AT delorie dot com *
+
+ * src/change.c, src/change.h: Handle attempts to change clearance on
+ polygons. If the user attempts to change the clearance between polygons and
+ objects within the polygon by pressing 'k' over the *polygon*,
+ notice that attemp and tell the user how to accomplish what they
+ want.
+
+2010-04-12 Kai-Martin Knaak * kmk AT lilalaser dot de *
+
+ * doc/extract-docs: expand the syntax of documentating comments This is part of the effort to derive the command line option entries
+ in the manual dynamically from the source. The expanded syntax
+ allows for more control on the actual headings rendered in the
+ manual. 1) accept keys enclosed in quotation marks ("). This allows for
+ multiple word nodes in the documentation. 2) strip leading digits of the key after sort. This allows to
+ control the order of nodes from the source.
+
+2010-04-16 Jared Casper * jaredcasper AT gmail dot com *
+
+ * doc/pcb.texi, doc/thermal.pcb: Fix pr2136131. Clarify image of
+ thermal in doc. Also added some text about changing the style of thermal using
+ shift-click in the sections that talk about it.
+
+2010-03-18 Jared Casper * jaredcasper AT gmail dot com *
+
+ * src/hid/common/actions.c: Check action name at registration. Prevent actions with spaces and '(' in their names from being
+ registered; these will cause ambiguity and problems in
+ hid_parse_actionstring.
+
+2010-03-18 Jared Casper * jaredcasper AT gmail dot com *
+
+ * doc/pcb.texi, src/action.c, src/hid.h, src/hid/batch/batch.c,
+ src/hid/common/actions.c, src/hid/common/hid_resource.c,
+ src/hid/gtk/gui-command-window.c, src/hid/gtk/gui-top-window.c,
+ src/hid/lesstif/main.c, src/hid/lesstif/menu.c, src/main.c:
+ Consolidate hid action parsing. - Create a common routine hid_parse_command, which handles both
+ action script style "action(arg1, arg2);" and command entry style
+ "action arg1 arg2". This is done by making a static
+ hid_parse_actionstring function, which takes a boolean to determine
+ whether or not it should accept command entry style strings.
+ hid_parse_actions functions as it currently does, only accepting
+ action script style, but does so by calling hid_parse_actionstring
+ with TRUE. - Use hid_parse_command across all hids for user command entry,
+ removing command_parse in lesstif/main.c and batch/batch.c. - Added extra error handling to common hid_actionv to match
+ lesstif_call_action and remove lesstif_call_action.
+
+2010-04-05 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/toporouter.c: Fix some "mixed declarations and code" issues.
+
+2010-04-04 Ineiev * ineiev AT gmail dot com *
+
+ * src/misc.c: Fix "Request for bounding box of unsupported type
+ 1024" Tracker bug # 2893717
+
+ https://sourceforge.net/tracker/?func=detail&atid=538811&aid=2893717&group_id=73743
+
+2010-04-03 DJ Delorie * dj AT duopoly dot delorie dot com *
+
+ * src/hid/lesstif/dialogs.c: Fix doc typo
+
+2010-04-03 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/hid/gtk/gtkhid-main.c, src/hid/gtk/gui-dialog.c: Open
+ schematic file chooser dialog if PCB name is not set. (cherry picked from commit 209e1031656f58ffe40189d93893457975c4042f)
+
+2010-04-03 DJ Delorie * dj AT duopoly dot delorie dot com *
+
+ * src/hid/lesstif/dialogs.c: Implement lesstif ImportGUI()
+
+2010-04-03 DJ Delorie * dj AT duopoly dot delorie dot com *
+
+ * src/action.c: Add missing newline.
+
+2010-04-03 DJ Delorie * dj AT duopoly dot delorie dot com *
+
+ * src/action.c: Let the GUI deal with choosing schematics. If the PCB is as yet unnamed, or if the pcb name doesn't correspond
+ to a schematic file, have Import() call ImportGUI() to let the user
+ tell PCB what to do. Note: corresponding HID changes are separate commits.
+
+2010-04-03 DJ Delorie * dj AT duopoly dot delorie dot com *
+
+ * src/misc.c, src/misc.h: Add AttributePut functionality. Add the logic to put arbitrary attributes into a PCB.
+
+2010-04-03 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/file.h: Remove conflicting declaration of ParseLibraryTree. This is a static function declared in file.c. Therefore I took it
+ out of file.h.
+
+2010-04-03 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/action.c: Place components in middle of board instead of at
+ 0,0.
+
+2010-03-01 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/action.c, src/buffer.c, src/change.c, src/copy.c,
+ src/create.c, src/file.c, src/file.h, src/global.h, src/main.c:
+ Support for footprints not in subdirectories Added tons of debug spew to various files to aid in program tracing
+ Also, modify library loading stuff in file.c to allow footprints to
+ live directly in library directory (rather than only one level
+ down).
+
+2010-04-02 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/hid/png/png.c: When built with less than all of the graphic
+ formats that the png exporter supports, don't segfault anymore. The
+ problem is an array is defined differently at compile time but the
+ default value for the format was constant and a ways into the array.
+ Problem reported by jean on irc.
+
+2010-04-01 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/hid/gtk/gui-top-window.c: Inform the user where (what file or
+ compiled in defaults) the menu config came from. Should help with
+ some of the gpcb-menu.res versus pcb-menu.res and the
+ ./gpcb-menu.res versus ~/.pcb/gpcb-menu.res confusion which comes up
+ from time to time.
+
+2010-04-01 DJ Delorie * dj AT delorie dot com *
+
+ * src/report.c: Return non-fail for ReportAllNetLengths()
+
+2010-04-01 DJ Delorie * dj AT delorie dot com *
+
+ * src/report.c: Record the calculated length in Report(NetLength)
+
+2010-03-24 Dan McMahill * dan AT mcmahill dot net *
+
+ * : commit d9e4279e4c0af142bc776bdd4a3b905388ce6b5a Author: Dan
+ McMahill * dan AT mcmahill dot net * Date: Wed Mar 24 17:38:17
+ 2010 -0400
+
+2010-03-22 anthonix * anthonix AT anthonix-desktop dot (none) *
+
+ * : commit 6081daa8966c8c83bb734789c38dd5c42dd97443 Author:
+ anthonix * anthonix AT anthonix-desktop dot (none) * Date: Mon Mar
+ 22 12:38:01 2010 +1300
+
+2010-03-21 DJ Delorie * dj AT delorie dot com *
+
+ * src/hid/lesstif/menu.c: Fix Typo
+
+2010-03-20 anthonix * anthonix AT anthonix-desktop dot (none) *
+
+ * src/toporouter.c: Toporouter: Speccut bug fix
+
+2010-03-20 anthonix * anthonix AT anthonix-desktop dot (none) *
+
+ * : commit 1ee723379413c20973bdad27b1e1cf1d722cf3d1 Author:
+ anthonix * anthonix AT anthonix-desktop dot (none) * Date: Sat Mar
+ 20 19:45:05 2010 +1300
+
+2010-03-19 Anthony M. Blake * anthonix AT anthonix dot resnet dot scms dot waikato dot ac dot nz *
+
+ * : commit e45f4e8d15f2c30f8ccb37de5b0bfa801fca572c Author: Anthony
+ M. Blake * anthonix AT anthonix dot resnet dot scms dot waikato dot
+ ac dot nz * Date: Fri Mar 19 16:25:38 2010 +1300
+
+2010-03-18 Dan McMahill * dan AT mcmahill dot net *
+
+ * tests/run_tests.sh: Missed the copyright bump when adding the
+ gcode compare routines a few weeks back.
+
+2010-03-18 Dan McMahill * dan AT mcmahill dot net *
+
+ * configure.ac, tests/golden/Makefile.am,
+ tests/golden/hid_png2/Makefile.am,
+ tests/golden/hid_png3/Makefile.am, tests/tests.list: Add tests for
+ --outfile and --dpi arguments to the PNG exporter
+
+2010-03-13 Kai-Martin Knaak * kmk AT lilalaser dot de *
+
+ * README, doc/pcb.texi, src/main.c, win32/Readme.txt: replaces
+ "pcb.sourceforge.net" with "pcb.gpleda.org"
+
+2010-03-14 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/hid.h, src/hid/common/actions.c: Apply patch from Patrick
+ Bernaud: Add function to register single action. The possibility to register a single action has been introduced with
+ commit 337fa8ba8094cee1ed291cec7bf29895ac7c9d72 but then reverted
+ later when changing way of passing context to action callback.
+
+2010-03-14 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/hid/common/actions.c: Apply patch from Patrick Bernaud: Modify
+ HID actions storage. It removes the HID_ActionNode structure and directly store
+ registered actions in an array of HID_Action*. It also provides a nicer way of making sure the array is sorted and
+ the code for binary search within the array has been removed in
+ favor of a call to bsearch().
+
+2010-03-14 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/main.c: Apply patch from Patrick Bernaud: Set 'exporter'
+ global variable before printing defaults. In print_defaults(), when the HID to print defaults is not a gui,
+ set 'exporter' global variable prior to calling HID's
+ get_export_options() callback.
+
+2010-03-14 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/main.c: Apply patch from Patrick Bernaud: Rewrite function
+ that print HID options. The previous version of usage_hid() had a strange search for gui HID
+ attributes through 'hid_attr_node' rather than requesting them
+ directly from the HID. As a result it was calling the get_export_options() callback on
+ exporter without prior setting of the exporter global variable.
+
+2010-03-14 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/hid/gtk/gui-dialog-print.c: Apply patch from Patrick Bernaud:
+ gtkhid: Avoid use of 'exporter' when testing for exporter
+ availability.
+
+2010-03-14 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/hid/gtk/gui-dialog-print.c: Apply patch from Patrick Bernaud:
+ gtkhid: Set and unset global variable 'exporter' when printing. The GTK hid was not setting the global variable 'exporter' before
+ exporting the layout in ghid_dialog_print(): exporter HID relying on
+ this variable being set were lost.
+
+2010-03-14 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/hid.h, src/hid/common/actions.c, src/hid/lesstif/menu.c: Apply
+ patch from Patrick Bernaud: Provide context to callbacks of actions
+ through global variable. Providing a context to action is necessary for scripting languages
+ (for example). To do so, a global variable ('current_action') is
+ being defined: it is saved, set and restored when running the
+ callback of an action in a way similar to what PCB already does with
+ HIDs. The callback function may access the action it belongs to and cast
+ it the way it wants to extract information from a potentially
+ extended HID_Action structure.
+
+2010-03-14 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/hid/common/actions.c: Apply patch from Patrick Bernaud: Sort
+ actions by references in 'all_actions'. Previously, when building 'all_actions', a copy of every HID_Action
+ was performed for each action. Now it builds 'all_actions' with
+ pointers to the actual HID_Action structures (without reallocating).
+
+2010-03-14 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/hid.h, src/hid/common/actions.c, src/hid/hidint.h,
+ src/hid/lesstif/menu.c: Apply patch from Patrick Bernaud: Revert
+ "single-action register/deregister". This reverts commits 337fa8ba8094cee1ed291cec7bf29895ac7c9d72 and
+ b274cf8fe9c8caf5bcd4edc28935c88cf5bab7f4 before the introduction of
+ a new context passing scheme for actions.
+
+2010-03-14 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/hid.h: Apply patch from Patrick Bernaud: Fix comment for
+ global variable 'gui' in hid.h. hid_start_gui() does not exist. The variable is instead set in
+ main() and hid_expose_callback().
+
+2010-03-14 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/draw.c: Apply patch from Patrick Bernaud: Modify
+ DrawSpecialPolygon() prototype to not take a pointer on HID. DrawSpecialPolygon() was the only function to take a HID as
+ parameter. Every other draw function works on the current HID
+ through global variable 'gui'.
+
+2010-03-14 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/hid/gtk/gui-dialog-print.c: Apply patch from Patrick Bernaud:
+ Support HID_Mixed options in attribute dialog Since an HID_Mixed attribute is the combination of a real and an
+ enum, reuse the code for HID_Enum to provide a combo box next to the
+ spin button for the real part.
+
+2010-03-14 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/hid/common/hidinit.c, src/hid/gtk/gui-config.c, src/main.c:
+ Apply patch from Patrick Bernaud. Modified code to not abort on HID_Mixed attributes. Th gtk HID is
+ modified to understand such an attribute (though the attribute
+ dialog has still no support for them), the lesstif HID is unchanged.
+
+2010-03-14 Stuart Brorson * sdb AT cloud9 dot net *
+
+ * src/main.c: Applying patch from Patrick Bernaud. HIDs with a name too long were breaking alignement in usage() as the
+ code requested insertion of a tab after the name even for HID names
+ already exceeding the length of the tabulation. This is similar to how usage_attr() already does alignment of name
+ and help text.
+
+2010-03-13 Dan McMahill * dan AT mcmahill dot net *
+
+ * : commit b75d1fe8d42c138ae499898db5b926948b73f767 Author: Dan
+ McMahill * dan AT mcmahill dot net * Date: Sat Mar 13 09:08:06
+ 2010 -0500
+
+2010-03-12 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/hid/gcode/gcode.c: Remove invalidate_wh from the new gcode HID
+ too.
+
+2010-03-11 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/global.h, src/main.c, src/misc.c: Remove Settings.init_done
+ variable and its usage This variable was previously used to allow action scripts run prior
+ to loading the GUI to avoid GUI startup if they executed a "Quit"
+ action. The requirement dates back prior to the HID split, where the "Quit"
+ action would cause PCB to call gtk_main_quit(), an operation which
+ is illegal if the GUI main loop was not yet started. The init_done
+ flag was used in QuitApplication(), both to determine whether the
+ GUI had started, and if not - to note that the GUI should not be
+ initialised later. (Instead of calling gtk_main_quit()). With the HID split, the QuitApplication() function was changed to
+ call exit(0) rather than gtk_main_quit(), so this dance isn't
+ necessary at all now.. in either case, we can just exit the
+ application immediately.
+
+2010-03-11 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/global.h: Remove unused HistorySize field from the settings
+ structure
+
+2010-03-11 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/draw.c, src/hid.h, src/hid/batch/batch.c,
+ src/hid/common/hidnogui.c, src/hid/gtk/gtkhid-main.c,
+ src/hid/lesstif/main.c: Remove unused "last" parameter from HID
+ "invalidate_lr" method
+
+2010-03-11 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * src/hid.h, src/hid/batch/batch.c, src/hid/bom/bom.c,
+ src/hid/common/extents.c, src/hid/common/hidnogui.c,
+ src/hid/gerber/gerber.c, src/hid/gtk/gtkhid-main.c,
+ src/hid/lesstif/main.c, src/hid/lpr/lpr.c, src/hid/nelma/nelma.c,
+ src/hid/png/png.c, src/hid/ps/eps.c, src/hid/ps/ps.c: Remove unused
+ HID method invalidate_wh() invalidate_lr and invalidate_all are sufficient APIs for our needs.
+
+2010-03-11 Dan McMahill * dan AT mcmahill dot net *
+
+ * data/pcb.desktop.in: Revert "As silly as it seems to group any
+ sort of scientific or EDA" I've pushed really hard to sort this nonsense out, and this patch is
+ not in my opinion suitable for applcation. gEDA, gerbv and PCB all
+ deliberately omit the Education category.. this is not where we need
+ to fix this issue. I strongly object to putting bogus categories into our apps. If
+ Debian want to patch these in, let them. This reverts commit b402a144e19225f0648189bca6fbfad95d046047.
+
+2010-03-11 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/hid/ps/ps.c: Fix an obvious bug in the previous commit.
+ Caught by harry.
+
+2010-03-11 Dan McMahill * dan AT mcmahill dot net *
+
+ * data/pcb.desktop.in: As silly as it seems to group any sort of
+ scientific or EDA software under "Education", this appears to be the
+ standard documented by
+ http://standards.freedesktop.org/menu-spec/1.0/apa.html Noted in
+ patch #2889228 by Ahmed El-Mahmoudy.
+
+2010-03-11 Dan McMahill * dan AT mcmahill dot net *
+
+ * data/pcb.desktop.in: "Encoding" is deprecated.
+ http://standards.freedesktop.org/desktop-entry-spec/1.0/apc.html
+ Noted in patch #2889228
+
+2010-03-10 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/Makefile.am: It is gcode/hid.conf not gcode/gcode.conf that
+ needs to be distributed. Also put this file in the correct sorted
+ location.
+
+2010-03-10 Dan McMahill * dan AT mcmahill dot net *
+
+ * configure.ac: Add missing AC_PROG_MKDIR_P check.
+
+2010-03-10 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/Makefile.am: Fix building outside of the source tree with
+ dependency tracking disabled. In that case some directories need to
+ be manually created. Fixes bug #2889226.
+
+2010-03-10 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/hid/ps/ps.c: In the rectangle fill code fix a bug in swapping
+ of the coordinates. It doesn't appear that this code path is
+ encountered much.
+
+2010-03-10 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/hid/ps/ps.c: Add DSC to the postscript outputs to keep certain
+ windows based postscript viewers a little happier. Patch supplied
+ in patch #2700352 by Bob Paddock.
+
+2010-03-10 Dan McMahill * dan AT mcmahill dot net *
+
+ * INSTALL, configure.ac: The gcode exporter used libgd so make sure
+ we check for it and document that we need it. Noted by Patrick
+ Bernaud in bug #2967313
+
+2010-03-10 Dan McMahill * dan AT mcmahill dot net *
+
+ * tests/inputs/Makefile.am: Make sure the simple gcode test layout
+ makes it into the distfile.
+
+2010-03-10 Dan McMahill * dan AT mcmahill dot net *
+
+ * : commit 802576013b5d780cd87caafa31c694279ee2dc4f Author: Dan
+ McMahill * dan AT mcmahill dot net * Date: Wed Mar 10 13:15:26
+ 2010 -0500
+
+2010-03-09 Stephen Ecob * silicon dot on dot inspiration AT gmail dot com *
+
+ * src/djopt.c: Fix Freckles The autorouter sometimes ends a trace just past a pad. The
+ optimizer cuts this trace at the pad center, leaving a tiny trace
+ left over. This tiny trace is a "freckle" and it inhibits mitering.
+ Check for such freckles and remove them.
+
+2010-03-09 Dan McMahill * dan AT mcmahill dot net *
+
+ * tests/run_tests.sh: Make the xy file check actually do something.
+
+2010-03-09 Dan McMahill * dan AT mcmahill dot net *
+
+ * configure.ac, tests/golden/Makefile.am,
+ tests/golden/hid_gcode1/Makefile.am,
+ tests/golden/hid_gcode1/gcode_oneline.gcode.back.cnc,
+ tests/golden/hid_gcode1/gcode_oneline.gcode.drill.cnc,
+ tests/golden/hid_gcode1/gcode_oneline.gcode.front.cnc,
+ tests/golden/hid_gcode10/Makefile.am,
+ tests/golden/hid_gcode10/gcode_oneline.gcode.back.cnc,
+ tests/golden/hid_gcode10/gcode_oneline.gcode.drill.cnc,
+ tests/golden/hid_gcode10/gcode_oneline.gcode.front.cnc,
+ tests/golden/hid_gcode11/Makefile.am,
+ tests/golden/hid_gcode11/gcode_oneline.gcode.back.cnc,
+ tests/golden/hid_gcode11/gcode_oneline.gcode.drill.cnc,
+ tests/golden/hid_gcode11/gcode_oneline.gcode.front.cnc,
+ tests/golden/hid_gcode2/Makefile.am,
+ tests/golden/hid_gcode2/out.back.cnc,
+ tests/golden/hid_gcode2/out.drill.cnc,
+ tests/golden/hid_gcode2/out.front.cnc,
+ tests/golden/hid_gcode3/Makefile.am,
+ tests/golden/hid_gcode3/gcode_oneline.gcode.back.cnc,
+ tests/golden/hid_gcode3/gcode_oneline.gcode.drill.cnc,
+ tests/golden/hid_gcode3/gcode_oneline.gcode.front.cnc,
+ tests/golden/hid_gcode4/Makefile.am,
+ tests/golden/hid_gcode4/gcode_oneline.gcode.back.cnc,
+ tests/golden/hid_gcode4/gcode_oneline.gcode.drill.cnc,
+ tests/golden/hid_gcode4/gcode_oneline.gcode.front.cnc,
+ tests/golden/hid_gcode5/Makefile.am,
+ tests/golden/hid_gcode5/gcode_oneline.gcode.back.cnc,
+ tests/golden/hid_gcode5/gcode_oneline.gcode.drill.cnc,
+ tests/golden/hid_gcode5/gcode_oneline.gcode.front.cnc,
+ tests/golden/hid_gcode6/Makefile.am,
+ tests/golden/hid_gcode6/gcode_oneline.gcode.back.cnc,
+ tests/golden/hid_gcode6/gcode_oneline.gcode.drill.cnc,
+ tests/golden/hid_gcode6/gcode_oneline.gcode.front.cnc,
+ tests/golden/hid_gcode7/Makefile.am,
+ tests/golden/hid_gcode7/gcode_oneline.gcode.back.cnc,
+ tests/golden/hid_gcode7/gcode_oneline.gcode.drill.cnc,
+ tests/golden/hid_gcode7/gcode_oneline.gcode.front.cnc,
+ tests/golden/hid_gcode8/Makefile.am,
+ tests/golden/hid_gcode8/gcode_oneline.gcode.back.cnc,
+ tests/golden/hid_gcode8/gcode_oneline.gcode.drill.cnc,
+ tests/golden/hid_gcode8/gcode_oneline.gcode.front.cnc,
+ tests/golden/hid_gcode9/Makefile.am,
+ tests/golden/hid_gcode9/gcode_oneline.gcode.back.cnc,
+ tests/golden/hid_gcode9/gcode_oneline.gcode.drill.cnc,
+ tests/golden/hid_gcode9/gcode_oneline.gcode.front.cnc,
+ tests/inputs/gcode_oneline.pcb, tests/run_tests.sh,
+ tests/tests.list: Add testsuite entries to test the gcode export HID
+ and all of its command line options.
+
+2010-03-09 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/hid/gcode/gcode.c: Remove RCSID. We don't use those anymore.
+
+2010-03-09 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/hid/gcode/gcode.c: Change options like 'drill depth' to
+ 'drill-depth' as a space in a command line option is non-standard.
+ Also be consistent with having or not having a "." at the end of the
+ option help strings.
+
+2010-03-09 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/hid/gcode/gcode.c: Remove unix2dos system() call. It was not
+ needed.
+
+2010-03-09 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/hid/gcode/trace.c: Get rid of compiler warnings.
+
+2010-03-09 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/hid/gcode/gcode.c: Get rid of some gcc warnings.
+
+2010-03-09 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/hid/gcode/gcode.c: C++ style comments -> C style comments
+
+2010-03-09 Dan McMahill * dan AT mcmahill dot net *
+
+ * doc/pcb.1: Fix nroff error. Noted in sf patch #2889227 by Ahmed
+ El-Mahmoudy.
+
+2010-03-09 Dan McMahill * dan AT mcmahill dot net *
+
+ * configure.ac: add the gcode exporter to the export hid list
+
+2010-03-09 Dan McMahill * dan AT mcmahill dot net *
+
+ * INSTALL: add notes about what libs may be needed (none) for the
+ gcode exporter.
+
+2010-03-09 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/hid/gcode/auxiliary.h, src/hid/gcode/bitmap.h,
+ src/hid/gcode/curve.c, src/hid/gcode/curve.h,
+ src/hid/gcode/decompose.c, src/hid/gcode/decompose.h,
+ src/hid/gcode/gcode.c, src/hid/gcode/gcode.h,
+ src/hid/gcode/lists.h, src/hid/gcode/potracelib.h,
+ src/hid/gcode/trace.c, src/hid/gcode/trace.h: indent to conform to
+ the coding style used by pcb.
+
+2010-03-09 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/Makefile.am: gcode_lists.h should depend on gcode sources, not
+ png sources.
+
+2010-03-09 Dan McMahill * dan AT mcmahill dot net *
+
+ * src/hid/gcode/auxiliary.h, src/hid/gcode/bitmap.h,
+ src/hid/gcode/curve.c, src/hid/gcode/curve.h,
+ src/hid/gcode/decompose.c, src/hid/gcode/decompose.h,
+ src/hid/gcode/gcode.c, src/hid/gcode/gcode.h,
+ src/hid/gcode/hid.conf, src/hid/gcode/lists.h,
+ src/hid/gcode/potracelib.h, src/hid/gcode/trace.c,
+ src/hid/gcode/trace.h: Apply sf patch 2948711 from Alberto Maccioni
+ which adds a g-code exporter.
+
+2010-03-08 Dan McMahill * dan AT mcmahill dot net *
+
+ * configure.ac: When building the docs have configure check for
+ epsf.tex being in the TeX installation. Problem noted by Kai-Martin
+ Knaak and the method for checking suggested by Peter Clifton.
+
+2010-03-02 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * configure.ac: Fix test for whether to rebuild the shipped
+ pcblib-newlib library ${top_srcdir} is a Makefile variable, we need $srcdir in
+ configure.ac
+
+2010-03-02 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * lib/Makefile.am: Fix make distcheck by removing regenerated newlib
+ footprints The generated newlib files need to be removed by make distclean if
+ they are being updated by the build process. If the files aren't
+ being updated, we should not delete them as they were originally
+ distributed with the source tarball.
+
+2010-03-02 Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+ * tools/Makefile.am: Fix distribution of gnet-pcbfwd.scm in the dist
+ tarball Use the dist_ prefix to make this simple, so o...
[truncated message content] |
|
From: <gi...@gp...> - 2010-09-29 17:10:33
|
The branch, master has been updated
via 5be5cf3f57c61c2e0bcb5da241514012350ccdbd (commit)
from 7969c1eba58a2dfbe86fa12906ac57a879738bf7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/action.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit 5be5cf3f57c61c2e0bcb5da241514012350ccdbd
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Make new text clear polygons
:100644 100644 8924d20... f52fcf4... M src/action.c
=========
Changes
=========
commit 5be5cf3f57c61c2e0bcb5da241514012350ccdbd
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Make new text clear polygons
diff --git a/src/action.c b/src/action.c
index 8924d20..f52fcf4 100644
--- a/src/action.c
+++ b/src/action.c
@@ -1393,11 +1393,11 @@ NotifyMode (void)
if (strlen(string) > 0)
{
TextTypePtr text;
- int flag = NOFLAG;
+ int flag = CLEARLINEFLAG;
if (GetLayerGroupNumberByNumber (INDEXOFCURRENT) ==
GetLayerGroupNumberByNumber (solder_silk_layer))
- flag = ONSOLDERFLAG;
+ flag |= ONSOLDERFLAG;
if ((text = CreateNewText (CURRENT, &PCB->Font, Note.X,
Note.Y, 0, Settings.TextScale,
string, MakeFlags (flag))) != NULL)
|
|
From: <gi...@gp...> - 2010-09-20 05:43:18
|
The branch, master has been updated
via 7969c1eba58a2dfbe86fa12906ac57a879738bf7 (commit)
from 8edbb89218afc6c035357c04738233cd92767eea (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/parse_l.l | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit 7969c1eba58a2dfbe86fa12906ac57a879738bf7
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Don't print "can't open ./default_font for reading" all the time
:100644 100644 9163fde... b1b67a8... M src/parse_l.l
=========
Changes
=========
commit 7969c1eba58a2dfbe86fa12906ac57a879738bf7
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Don't print "can't open ./default_font for reading" all the time
diff --git a/src/parse_l.l b/src/parse_l.l
index 9163fde..b1b67a8 100644
--- a/src/parse_l.l
+++ b/src/parse_l.l
@@ -234,7 +234,9 @@ static int Parse(char *Executable, char *Path, char *Filename, char *Parameter)
yyin = fopen (tmps, "r");
if (!yyin)
{
- Message("Can't open %s for reading\n", tmps);
+ /* Special case this one, we get it all the time... */
+ if (strcmp (tmps, "./default_font"))
+ Message("Can't open %s for reading\n", tmps);
return(1);
}
free (tmps);
|
|
From: <gi...@gp...> - 2010-09-20 00:32:42
|
The branch, master has been updated
via 8edbb89218afc6c035357c04738233cd92767eea (commit)
from 46a84d5baee66bc03dd72adb03083ec7c92b64d3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/file.c | 6 +++++-
src/parse_l.l | 4 ++++
2 files changed, 9 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit 8edbb89218afc6c035357c04738233cd92767eea
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Wrap more messages in debug
Messages about where fonts were found, or how many milliseconds
it takes to load a file, are not normally needed. Wrap them in
DEBUG conditionals.
:100644 100644 97412b2... 6893379... M src/file.c
:100644 100644 8aa754c... 9163fde... M src/parse_l.l
=========
Changes
=========
commit 8edbb89218afc6c035357c04738233cd92767eea
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Wrap more messages in debug
Messages about where fonts were found, or how many milliseconds
it takes to load a file, are not normally needed. Wrap them in
DEBUG conditionals.
diff --git a/src/file.c b/src/file.c
index 97412b2..6893379 100644
--- a/src/file.c
+++ b/src/file.c
@@ -352,10 +352,12 @@ LoadPCB (char *Filename)
{
PCBTypePtr newPCB = CreateNewPCB (false);
bool units_mm;
- clock_t start, end;
double elapsed;
+#ifdef DEBUG
+ clock_t start, end;
start = clock ();
+#endif
/* new data isn't added to the undo list */
if (!ParsePCB (newPCB, Filename))
@@ -401,10 +403,12 @@ LoadPCB (char *Filename)
hid_action ("PCBChanged");
+#ifdef DEBUG
end = clock ();
elapsed = ((double) (end - start)) / CLOCKS_PER_SEC;
gui->log ("Loading file %s took %f seconds of CPU time\n",
Filename, elapsed);
+#endif
return (0);
}
diff --git a/src/parse_l.l b/src/parse_l.l
index 8aa754c..9163fde 100644
--- a/src/parse_l.l
+++ b/src/parse_l.l
@@ -342,11 +342,15 @@ int ParseFont(FontTypePtr Ptr, char *Filename)
for (p = strtok (path, PCB_PATH_DELIMETER); p && *p;
p = strtok (NULL, PCB_PATH_DELIMETER))
{
+#ifdef DEBUG
Message ("Looking for %s in %s\n", Filename, p);
+#endif
r = Parse(Settings.FontCommand, p, Filename, NULL);
if (r == 0)
{
+#ifdef DEBUG
Message ("Found %s in %s\n", Filename, p);
+#endif
break;
}
}
|
|
From: <gi...@gp...> - 2010-09-14 21:49:01
|
The branch, master has been updated
via 46a84d5baee66bc03dd72adb03083ec7c92b64d3 (commit)
from 8417c5d9d90f8059a23f799b21547a2b86249d8b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/png/png.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit 46a84d5baee66bc03dd72adb03083ec7c92b64d3
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
If we don't use the outline to clip, don't draw it either.
:100644 100644 d92dced... 5c52768... M src/hid/png/png.c
=========
Changes
=========
commit 46a84d5baee66bc03dd72adb03083ec7c92b64d3
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
If we don't use the outline to clip, don't draw it either.
diff --git a/src/hid/png/png.c b/src/hid/png/png.c
index d92dced..5c52768 100644
--- a/src/hid/png/png.c
+++ b/src/hid/png/png.c
@@ -738,7 +738,7 @@ png_do_export (HID_Attr_Val * options)
int cc, mask, silk;
int transparent;
- if (photo_outline) {
+ if (photo_outline && have_outline) {
transparent=gdImageGetPixel(photo_outline, x, y);
} else {
transparent=0;
|
|
From: <gi...@gp...> - 2010-09-14 21:35:12
|
The branch, master has been updated
via 8417c5d9d90f8059a23f799b21547a2b86249d8b (commit)
from 3eabb6c3a2f334b185c8a993360fba459160bdf9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/png/png.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 42 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit 8417c5d9d90f8059a23f799b21547a2b86249d8b
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Fix bug tracker # 3064887
PNG exported all black in photo mode if the "outline" was exactly the
board size, because the left/bottom edges were clipped leaving a big
hole. With this patch, we do two things:
1. Detect a non-trivial outline, and only do outline processing if
found. Thus, a rectangular outline exactly the size of the board is
just ignored - no black border on the output image.
2. Any outline line that's drawn exactly on the bottom/right edge is brought in
by half a pixel to ensure it's drawn in the resulting image.
:100644 100644 982f687... d92dced... M src/hid/png/png.c
=========
Changes
=========
commit 8417c5d9d90f8059a23f799b21547a2b86249d8b
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Fix bug tracker # 3064887
PNG exported all black in photo mode if the "outline" was exactly the
board size, because the left/bottom edges were clipped leaving a big
hole. With this patch, we do two things:
1. Detect a non-trivial outline, and only do outline processing if
found. Thus, a rectangular outline exactly the size of the board is
just ignored - no black border on the output image.
2. Any outline line that's drawn exactly on the bottom/right edge is brought in
by half a pixel to ensure it's drawn in the resulting image.
diff --git a/src/hid/png/png.c b/src/hid/png/png.c
index 982f687..d92dced 100644
--- a/src/hid/png/png.c
+++ b/src/hid/png/png.c
@@ -66,6 +66,11 @@ static int show_solder_side;
#define SCALE_Y(y) ((int)(((show_solder_side ? (PCB->MaxHeight-(y)) : (y)) - y_shift)/scale))
#define SWAP_IF_SOLDER(a,b) do { int c; if (show_solder_side) { c=a; a=b; b=c; }} while (0)
+/* Used to detect non-trivial outlines */
+#define NOT_EDGE_X(x) ((x) != 0 && (x) != PCB->MaxWidth)
+#define NOT_EDGE_Y(y) ((y) != 0 && (y) != PCB->MaxHeight)
+#define NOT_EDGE(x,y) (NOT_EDGE_X(x) || NOT_EDGE_Y(y))
+
static void png_fill_circle (hidGC gc, int cx, int cy, int radius);
/* The result of a failed gdImageColorAllocate() call */
@@ -120,6 +125,8 @@ static gdImagePtr photo_silk, photo_mask, photo_drill, *photo_im;
static gdImagePtr photo_outline;
static int photo_groups[MAX_LAYER+2], photo_ngroups;
+static int doing_outline, have_outline;
+
#define FMT_gif "GIF"
#define FMT_jpg "JPEG"
#define FMT_png "PNG"
@@ -707,7 +714,7 @@ png_do_export (HID_Attr_Val * options)
ts_bs (photo_silk);
ts_bs_sm (photo_mask);
- if (photo_outline) {
+ if (photo_outline && have_outline) {
int black=gdImageColorResolve(photo_outline, 0x00, 0x00, 0x00);
// go all the way around the image, trying to fill the outline
@@ -893,6 +900,8 @@ png_set_layer (const char *name, int group, int empty)
if (name == 0)
name = PCB->Data->Layer[idx].Name;
+ doing_outline = 0;
+
if (idx >= 0 && idx < max_copper_layer && !print_layer[idx])
return 0;
if (SL_TYPE (idx) == SL_ASSY || SL_TYPE (idx) == SL_FAB)
@@ -943,7 +952,11 @@ png_set_layer (const char *name, int group, int empty)
return 0;
if (strcmp (name, "outline") == 0)
- photo_im = &photo_outline;
+ {
+ doing_outline = 1;
+ have_outline = 0;
+ photo_im = &photo_outline;
+ }
else
photo_im = photo_copper + group;
@@ -1314,6 +1327,7 @@ png_fill_rect (hidGC gc, int x1, int y1, int x2, int y2)
gdImageFilledRectangle (im, SCALE_X (x1-bloat), SCALE_Y (y1),
SCALE_X (x2+bloat)-1, SCALE_Y (y2)-1, gc->color->c);
+ have_outline |= doing_outline;
}
static void
@@ -1330,6 +1344,25 @@ png_draw_line (hidGC gc, int x1, int y1, int x2, int y2)
}
use_gc (gc);
+ if (NOT_EDGE (x1, y1) || NOT_EDGE (x2, y2))
+ have_outline |= doing_outline;
+ if (doing_outline)
+ {
+ /* Special case - lines drawn along the bottom or right edges
+ are brought in by a pixel to make sure we have contiguous
+ outlines. */
+ if (x1 == PCB->MaxWidth && x2 == PCB->MaxWidth)
+ {
+ x1 -= scale/2;
+ x2 -= scale/2;
+ }
+ if (y1 == PCB->MaxHeight && y2 == PCB->MaxHeight)
+ {
+ y1 -= scale/2;
+ y2 -= scale/2;
+ }
+ }
+
gdImageSetThickness (im, 0);
linewidth = 0;
if(gc->cap != Square_Cap || x1 == x2 || y1 == y2 )
@@ -1388,6 +1421,8 @@ png_draw_arc (hidGC gc, int cx, int cy, int width, int height,
ea = start_angle;
}
+ have_outline |= doing_outline;
+
/*
* make sure we start between 0 and 360 otherwise gd does
* strange things
@@ -1429,6 +1464,9 @@ png_fill_circle (hidGC gc, int cx, int cy, int radius)
else
my_bloat = 2 * bloat;
+
+ have_outline |= doing_outline;
+
gdImageSetThickness (im, 0);
linewidth = 0;
gdImageFilledEllipse (im, SCALE_X (cx), SCALE_Y (cy),
@@ -1452,6 +1490,8 @@ png_fill_polygon (hidGC gc, int n_coords, int *x, int *y)
use_gc (gc);
for (i = 0; i < n_coords; i++)
{
+ if (NOT_EDGE (x[i], y[i]))
+ have_outline |= doing_outline;
points[i].x = SCALE_X (x[i]);
points[i].y = SCALE_Y (y[i]);
}
|
|
From: <gi...@gp...> - 2010-09-14 02:04:33
|
The branch, master has been updated
via 3eabb6c3a2f334b185c8a993360fba459160bdf9 (commit)
from 14fe70f2e226524fd95dd8a3012f1e0dec9191f8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/action.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit 3eabb6c3a2f334b185c8a993360fba459160bdf9
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Avoid divide-by-zero
Check for a zero dispersion before computing it.
:100644 100644 e931fe9... 8924d20... M src/action.c
=========
Changes
=========
commit 3eabb6c3a2f334b185c8a993360fba459160bdf9
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Avoid divide-by-zero
Check for a zero dispersion before computing it.
diff --git a/src/action.c b/src/action.c
index e931fe9..8924d20 100644
--- a/src/action.c
+++ b/src/action.c
@@ -7112,8 +7112,11 @@ ActionElementList (int argc, char **argv, int x, int y)
ny = parse_layout_attribute_units ("import::newY", ny);
d = parse_layout_attribute_units ("import::disperse", d);
- nx += random () % (d*2) - d;
- ny += random () % (d*2) - d;
+ if (d > 0)
+ {
+ nx += random () % (d*2) - d;
+ ny += random () % (d*2) - d;
+ }
if (nx < 0)
nx = 0;
|
|
From: <gi...@gp...> - 2010-09-12 00:24:58
|
The branch, master has been updated
via 14fe70f2e226524fd95dd8a3012f1e0dec9191f8 (commit)
from 6e89ba408604105b89a622d8ce5606027ececeb2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/thermal.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
=================
Commit Messages
=================
commit 14fe70f2e226524fd95dd8a3012f1e0dec9191f8
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
thermal.c: Initialise flags of the LineType object in square_therm()
Keeps valgrind quiet about conditionals based upon uninitialised
variables.. must be a good thing.
:100644 100644 4fdcb1c... f9dd369... M src/thermal.c
=========
Changes
=========
commit 14fe70f2e226524fd95dd8a3012f1e0dec9191f8
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
thermal.c: Initialise flags of the LineType object in square_therm()
Keeps valgrind quiet about conditionals based upon uninitialised
variables.. must be a good thing.
diff --git a/src/thermal.c b/src/thermal.c
index 4fdcb1c..f9dd369 100644
--- a/src/thermal.c
+++ b/src/thermal.c
@@ -204,6 +204,7 @@ square_therm (PinTypePtr pin, Cardinal style)
case 4:
{
LineType l;
+ l.Flags = NoFlags ();
d = pin->Thickness / 2 - pcb->ThermScale * pin->Clearance;
out = pin->Thickness / 2 + pin->Clearance / 4;
in = pin->Clearance / 2;
|
|
From: <gi...@gp...> - 2010-09-10 14:31:54
|
The branch, master has been updated
via 6e89ba408604105b89a622d8ce5606027ececeb2 (commit)
from d7be5538da245ccdbd5e2c50d0231fb2d154e9ac (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/action.c | 4 +-
src/autoplace.c | 6 ++--
src/autoroute.c | 66 ++++++++++++++++++------------------
src/buffer.c | 38 +++++++++-----------
src/copy.c | 2 +-
src/create.c | 12 +++---
src/crosshair.c | 2 +-
src/data.h | 5 ++-
src/djopt.c | 24 ++++++------
src/draw.c | 18 +++++-----
src/file.c | 4 +-
src/find.c | 66 ++++++++++++++++++------------------
src/flags.c | 2 +-
src/hid/batch/batch.c | 4 +-
src/hid/common/extents.c | 4 +-
src/hid/common/flags.c | 8 ++--
src/hid/gcode/gcode.c | 8 ++--
src/hid/gerber/gerber.c | 18 +++++-----
src/hid/gtk/gtkhid-main.c | 10 +++---
src/hid/gtk/gui-config.c | 36 ++++++++++----------
src/hid/gtk/gui-output-events.c | 2 +-
src/hid/gtk/gui-top-window.c | 24 ++++++------
src/hid/lesstif/dialogs.c | 72 +++++++++++++++++++-------------------
src/hid/lesstif/main.c | 12 +++---
src/hid/lesstif/menu.c | 10 +++---
src/hid/nelma/nelma.c | 14 ++++----
src/hid/png/png.c | 26 +++++++-------
src/hid/ps/eps.c | 24 ++++++------
src/hid/ps/ps.c | 20 +++++-----
src/line.c | 8 ++--
src/macro.h | 48 +++++++++++++-------------
src/misc.c | 65 ++++++++++++++++++-----------------
src/move.c | 42 +++++++++++-----------
src/polygon.c | 19 +++++-----
src/print.c | 4 +-
src/puller.c | 4 +-
src/rats.c | 12 +++---
src/rtree.c | 2 +-
src/rubberband.c | 14 +++----
src/search.c | 4 +-
src/select.c | 2 +-
src/toporouter.c | 14 ++++----
42 files changed, 388 insertions(+), 391 deletions(-)
=================
Commit Messages
=================
commit 6e89ba408604105b89a622d8ce5606027ececeb2
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Split usage of "max_layer" into max_copper_layer and max_group
PCB has an equal number of layer groups as copper layers, so the
"max_layer" #define'd variable has been used throught the codebase to
delimit iteration over both layer groups, and layers.
This makes it hard for people reading the codebase to identify whether
a given loop is over layers or layer groups (since the counter variable
is often fairly terse or indescript). Confusingly, in some of the code,
layer groups indexes are stored in a variable called "layer".
To aid understanding of the code, this commit removes the max_layer
variable (#define'd to (PCB->Data->LayerN)), and replaces it with
two similarly #define'd variables, "max_copper_layer" and "max_group".
This commit also introduces convenience macros:
#define solder_silk_layer (max_copper_layer + SOLDER_LAYER)
#define component_silk_layer (max_copper_layer + COMPONENT_LAYER)
Which make the code intention much clearer for a common case of the
old max_layer variable usage.
:100644 100644 32e294c... e931fe9... M src/action.c
:100644 100644 2572755... ed2014a... M src/autoplace.c
:100644 100644 7fb7443... ea97d01... M src/autoroute.c
:100644 100644 b6d1e2b... 1b2d27c... M src/buffer.c
:100644 100644 58ce9df... c8244ed... M src/copy.c
:100644 100644 b3d5bee... bf3b688... M src/create.c
:100644 100644 b9a3dd2... 6fa8bc9... M src/crosshair.c
:100644 100644 ce27339... 8dc674a... M src/data.h
:100644 100644 92fd2b8... 240b86b... M src/djopt.c
:100644 100644 1a576bc... e0890da... M src/draw.c
:100644 100644 a61d53f... 97412b2... M src/file.c
:100644 100644 e00e2ad... 8d468bb... M src/find.c
:100644 100644 60688dd... c33cfb6... M src/flags.c
:100644 100644 3129466... f3b7d3c... M src/hid/batch/batch.c
:100644 100644 a0dbf6b... e8bd8ab... M src/hid/common/extents.c
:100644 100644 3915c7a... e4a566d... M src/hid/common/flags.c
:100644 100644 c3c2e4e... 7a52a7c... M src/hid/gcode/gcode.c
:100644 100644 fa908ce... e2d9c57... M src/hid/gerber/gerber.c
:100644 100644 58c2635... 7d59672... M src/hid/gtk/gtkhid-main.c
:100644 100644 5e8121b... 36277eb... M src/hid/gtk/gui-config.c
:100644 100644 7cc764e... 6164415... M src/hid/gtk/gui-output-events.c
:100644 100644 76ac977... 9c30a93... M src/hid/gtk/gui-top-window.c
:100644 100644 6ab4b78... 544a718... M src/hid/lesstif/dialogs.c
:100644 100644 390e128... 5caec02... M src/hid/lesstif/main.c
:100644 100644 5a43fa8... 9983d42... M src/hid/lesstif/menu.c
:100644 100644 68d7d5b... c53ce05... M src/hid/nelma/nelma.c
:100644 100644 d5d6617... 982f687... M src/hid/png/png.c
:100644 100644 0c9345b... 1b85b7d... M src/hid/ps/eps.c
:100644 100644 7b42b5f... 3e72b81... M src/hid/ps/ps.c
:100644 100644 943660a... d1faaec... M src/line.c
:100644 100644 819d202... ddb1fb3... M src/macro.h
:100644 100644 34d103c... faeefa8... M src/misc.c
:100644 100644 cd23253... cce6e19... M src/move.c
:100644 100644 f2745ed... 586e8cc... M src/polygon.c
:100644 100644 3831b4a... b5fec1c... M src/print.c
:100644 100644 848d394... 66a5a03... M src/puller.c
:100644 100644 29e9831... 46a18c8... M src/rats.c
:100644 100644 0d5bf51... a6fe712... M src/rtree.c
:100644 100644 e5fb797... 31ed1b7... M src/rubberband.c
:100644 100644 3f23ff4... 79451fe... M src/search.c
:100644 100644 aa65f36... c4b5e17... M src/select.c
:100644 100644 fa57635... 60c3853... M src/toporouter.c
=========
Changes
=========
commit 6e89ba408604105b89a622d8ce5606027ececeb2
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Split usage of "max_layer" into max_copper_layer and max_group
PCB has an equal number of layer groups as copper layers, so the
"max_layer" #define'd variable has been used throught the codebase to
delimit iteration over both layer groups, and layers.
This makes it hard for people reading the codebase to identify whether
a given loop is over layers or layer groups (since the counter variable
is often fairly terse or indescript). Confusingly, in some of the code,
layer groups indexes are stored in a variable called "layer".
To aid understanding of the code, this commit removes the max_layer
variable (#define'd to (PCB->Data->LayerN)), and replaces it with
two similarly #define'd variables, "max_copper_layer" and "max_group".
This commit also introduces convenience macros:
#define solder_silk_layer (max_copper_layer + SOLDER_LAYER)
#define component_silk_layer (max_copper_layer + COMPONENT_LAYER)
Which make the code intention much clearer for a common case of the
old max_layer variable usage.
diff --git a/src/action.c b/src/action.c
index 32e294c..e931fe9 100644
--- a/src/action.c
+++ b/src/action.c
@@ -1396,7 +1396,7 @@ NotifyMode (void)
int flag = NOFLAG;
if (GetLayerGroupNumberByNumber (INDEXOFCURRENT) ==
- GetLayerGroupNumberByNumber (max_layer + SOLDER_LAYER))
+ GetLayerGroupNumberByNumber (solder_silk_layer))
flag = ONSOLDERFLAG;
if ((text = CreateNewText (CURRENT, &PCB->Font, Note.X,
Note.Y, 0, Settings.TextScale,
@@ -7923,7 +7923,7 @@ ActionAttributes (int argc, char **argv, int x, int y)
{
int i;
layer = NULL;
- for (i=0; i<max_layer; i++)
+ for (i=0; i<max_copper_layer; i++)
if (strcmp (PCB->Data->Layer[i].Name, layername) == 0)
{
layer = & (PCB->Data->Layer[i]);
diff --git a/src/autoplace.c b/src/autoplace.c
index 2572755..ed2014a 100644
--- a/src/autoplace.c
+++ b/src/autoplace.c
@@ -158,8 +158,8 @@ UpdateXY (NetListTypePtr Nets)
Cardinal SLayer, CLayer;
Cardinal i, j;
/* find layer groups of the component side and solder side */
- SLayer = GetLayerGroupNumberByNumber (max_layer + SOLDER_LAYER);
- CLayer = GetLayerGroupNumberByNumber (max_layer + COMPONENT_LAYER);
+ SLayer = GetLayerGroupNumberByNumber (solder_silk_layer);
+ CLayer = GetLayerGroupNumberByNumber (component_silk_layer);
/* update all nets */
for (i = 0; i < Nets->NetN; i++)
{
@@ -214,7 +214,7 @@ static void
showboxes (BoxListTypePtr blist)
{
Cardinal i;
- LayerTypePtr SLayer = &(PCB->Data->Layer[max_layer + SOLDER_LAYER]);
+ LayerTypePtr SLayer = &(PCB->Data->Layer[solder_silk_layer]);
for (i = 0; i < blist->BoxN; i++)
{
CreateNewLineOnLayer (SLayer, blist->Box[i].X1, blist->Box[i].Y1,
diff --git a/src/autoroute.c b/src/autoroute.c
index 7fb7443..ea97d01 100644
--- a/src/autoroute.c
+++ b/src/autoroute.c
@@ -404,7 +404,7 @@ static int total_via_count = 0;
static int
__routebox_is_good (routebox_t * rb)
{
- assert (rb && (rb->group < max_layer) &&
+ assert (rb && (rb->group < max_group) &&
(rb->box.X1 <= rb->box.X2) && (rb->box.Y1 <= rb->box.Y2) &&
(rb->flags.homeless ?
(rb->box.X1 != rb->box.X2) || (rb->box.Y1 != rb->box.Y2) :
@@ -606,7 +606,7 @@ AddPin (PointerListType layergroupboxes[], PinTypePtr pin, bool is_via,
routebox_t **rbpp, *lastrb = NULL;
int i, ht;
/* a pin cuts through every layer group */
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_group; i++)
{
rbpp = (routebox_t **) GetPointerMemory (&layergroupboxes[i]);
*rbpp = malloc (sizeof (**rbpp));
@@ -653,7 +653,7 @@ AddPad (PointerListType layergroupboxes[],
BDimension halfthick;
routebox_t **rbpp;
int layergroup = (TEST_FLAG (ONSOLDERFLAG, pad) ? back : front);
- assert (0 <= layergroup && layergroup < max_layer);
+ assert (0 <= layergroup && layergroup < max_group);
assert (PCB->LayerGroups.Number[layergroup] > 0);
rbpp = (routebox_t **) GetPointerMemory (&layergroupboxes[layergroup]);
assert (rbpp);
@@ -687,7 +687,7 @@ AddLine (PointerListType layergroupboxes[], int layergroup, LineTypePtr line,
{
routebox_t **rbpp;
assert (layergroupboxes && line);
- assert (0 <= layergroup && layergroup < max_layer);
+ assert (0 <= layergroup && layergroup < max_group);
assert (PCB->LayerGroups.Number[layergroup] > 0);
rbpp = (routebox_t **) GetPointerMemory (&layergroupboxes[layergroup]);
@@ -735,7 +735,7 @@ AddIrregularObstacle (PointerListType layergroupboxes[],
LocationType keep = style->Keepaway;
assert (layergroupboxes && parent);
assert (X1 <= X2 && Y1 <= Y2);
- assert (0 <= layergroup && layergroup < max_layer);
+ assert (0 <= layergroup && layergroup < max_group);
assert (PCB->LayerGroups.Number[layergroup] > 0);
rbpp = (routebox_t **) GetPointerMemory (&layergroupboxes[layergroup]);
@@ -760,7 +760,7 @@ AddPolygon (PointerListType layergroupboxes[], Cardinal layer,
int is_not_rectangle = 1;
int layergroup = GetLayerGroupNumberByNumber (layer);
routebox_t *rb;
- assert (0 <= layergroup && layergroup < max_layer);
+ assert (0 <= layergroup && layergroup < max_group);
rb = AddIrregularObstacle (layergroupboxes,
polygon->BoundingBox.X1,
polygon->BoundingBox.Y1,
@@ -904,11 +904,11 @@ CreateRouteData ()
/* check which layers are active first */
routing_layers = 0;
- for (group = 0; group < max_layer; group++)
+ for (group = 0; group < max_group; group++)
{
for (i = 0; i < PCB->LayerGroups.Number[group]; i++)
- /* layer must be 1) not silk (ie, < max_layer) and 2) on */
- if ((PCB->LayerGroups.Entries[group][i] < max_layer) &&
+ /* layer must be 1) not silk (ie, < max_copper_layer) and 2) on */
+ if ((PCB->LayerGroups.Entries[group][i] < max_copper_layer) &&
PCB->Data->Layer[PCB->LayerGroups.Entries[group][i]].On)
{
routing_layers++;
@@ -920,10 +920,10 @@ CreateRouteData ()
}
/* if via visibility is turned off, don't use them */
AutoRouteParameters.use_vias = routing_layers > 1 && PCB->ViaOn;
- front = GetLayerGroupNumberByNumber (max_layer + COMPONENT_LAYER);
- back = GetLayerGroupNumberByNumber (max_layer + SOLDER_LAYER);
+ front = GetLayerGroupNumberByNumber (component_silk_layer);
+ back = GetLayerGroupNumberByNumber (solder_silk_layer);
/* determine preferred routing direction on each group */
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_group; i++)
{
if (i != back && i != front)
{
@@ -963,7 +963,7 @@ CreateRouteData ()
}
/* initialize pointerlisttype */
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_group; i++)
{
layergroupboxes[i].Ptr = NULL;
layergroupboxes[i].PtrN = 0;
@@ -1137,7 +1137,7 @@ CreateRouteData ()
}
END_LOOP;
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_copper_layer; i++)
{
int layergroup = GetLayerGroupNumberByNumber (i);
/* add all (non-rat) lines */
@@ -1206,7 +1206,7 @@ CreateRouteData ()
}
/* create r-trees from pointer lists */
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_group; i++)
{
/* create the r-tree */
rd->layergrouptree[i] =
@@ -1220,7 +1220,7 @@ CreateRouteData ()
/* create "empty-space" structures for via placement (now that we know
* appropriate keepaways for all the fixed elements) */
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_group; i++)
{
POINTER_LOOP (&layergroupboxes[i]);
{
@@ -1232,7 +1232,7 @@ CreateRouteData ()
}
}
/* free pointer lists */
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_group; i++)
FreePointerListMemory (&layergroupboxes[i]);
/* done! */
return rd;
@@ -1242,7 +1242,7 @@ void
DestroyRouteData (routedata_t ** rd)
{
int i;
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_group; i++)
r_destroy_tree (&(*rd)->layergrouptree[i]);
if (AutoRouteParameters.use_vias)
mtspace_destroy (&(*rd)->mtspace);
@@ -1385,7 +1385,7 @@ cost_to_routebox (const CheapPointType * p, Cardinal point_layer,
if ((p2.X - p->X) * (p2.Y - p->Y) != 0)
trial += AutoRouteParameters.JogPenalty;
/* special case for defered via searching */
- if (point_layer > max_layer || point_layer == rb->group)
+ if (point_layer > max_group || point_layer == rb->group)
return trial + ABS (p2.X - p->X) + ABS (p2.Y - p->Y);
/* if this target is only a via away, then the via is cheaper than the congestion */
if (p->X == p2.X && p->Y == p2.Y)
@@ -1451,34 +1451,34 @@ showbox (BoxType b, Dimension thickness, int group)
#if 1
if (b.Y1 == b.Y2 || b.X1 == b.X2)
thickness = 5;
- line = CreateNewLineOnLayer (LAYER_PTR (max_layer + COMPONENT_LAYER),
+ line = CreateNewLineOnLayer (LAYER_PTR (component_silk_layer),
b.X1, b.Y1, b.X2, b.Y1, thickness, 0,
MakeFlags (0));
AddObjectToCreateUndoList (LINE_TYPE,
- LAYER_PTR (max_layer + COMPONENT_LAYER), line,
+ LAYER_PTR (component_silk_layer), line,
line);
if (b.Y1 != b.Y2)
{
- line = CreateNewLineOnLayer (LAYER_PTR (max_layer + COMPONENT_LAYER),
+ line = CreateNewLineOnLayer (LAYER_PTR (component_silk_layer),
b.X1, b.Y2, b.X2, b.Y2, thickness, 0,
MakeFlags (0));
AddObjectToCreateUndoList (LINE_TYPE,
- LAYER_PTR (max_layer + COMPONENT_LAYER),
+ LAYER_PTR (component_silk_layer),
line, line);
}
- line = CreateNewLineOnLayer (LAYER_PTR (max_layer + COMPONENT_LAYER),
+ line = CreateNewLineOnLayer (LAYER_PTR (component_silk_layer),
b.X1, b.Y1, b.X1, b.Y2, thickness, 0,
MakeFlags (0));
AddObjectToCreateUndoList (LINE_TYPE,
- LAYER_PTR (max_layer + COMPONENT_LAYER), line,
+ LAYER_PTR (component_silk_layer), line,
line);
if (b.X1 != b.X2)
{
- line = CreateNewLineOnLayer (LAYER_PTR (max_layer + COMPONENT_LAYER),
+ line = CreateNewLineOnLayer (LAYER_PTR (component_silk_layer),
b.X2, b.Y1, b.X2, b.Y2, thickness, 0,
MakeFlags (0));
AddObjectToCreateUndoList (LINE_TYPE,
- LAYER_PTR (max_layer + COMPONENT_LAYER),
+ LAYER_PTR (component_silk_layer),
line, line);
}
#endif
@@ -1520,7 +1520,7 @@ static void
showroutebox (routebox_t * rb)
{
showbox (rb->sbox, rb->flags.source ? 20 : (rb->flags.target ? 10 : 1),
- rb->flags.is_via ? max_layer + COMPONENT_LAYER : rb->group);
+ rb->flags.is_via ? component_silk_layer : rb->group);
}
#endif
@@ -3195,7 +3195,7 @@ RD_DrawVia (routedata_t * rd, LocationType X, LocationType Y,
int ka = AutoRouteParameters.style->Keepaway;
/* a via cuts through every layer group */
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_group; i++)
{
if (!is_layer_group_active[i])
continue;
@@ -3667,7 +3667,7 @@ CreateSearchEdge (struct routeone_state *s, vetting_t * work, edge_t * parent,
/* find the cheapest target */
#if 0
target =
- mincost_target_to_point (&parent->cost_point, max_layer + 1, targets,
+ mincost_target_to_point (&parent->cost_point, max_group + 1, targets,
parent->mincost_target);
#else
target = parent->mincost_target;
@@ -3820,7 +3820,7 @@ do_via_search (edge_t * search, struct routeone_state *s,
free (area);
assert (box_is_good (&cliparea));
count++;
- for (j = 0; j < max_layer; j++)
+ for (j = 0; j < max_group; j++)
{
edge_t *ne;
if (j == within->group || !is_layer_group_active[j])
@@ -4547,7 +4547,7 @@ InitAutoRouteParameters (int pass,
AutoRouteParameters.JogPenalty = 1000 * (is_smoothing ? 20 : 4);
AutoRouteParameters.CongestionPenalty = 1e6;
AutoRouteParameters.MinPenalty = EXPENSIVE;
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_group; i++)
{
if (is_layer_group_active[i])
{
@@ -4589,7 +4589,7 @@ no_expansion_boxes (routedata_t * rd)
big.X2 = MAX_COORD;
big.Y1 = 0;
big.Y2 = MAX_COORD;
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_group; i++)
{
if (r_search (rd->layergrouptree[i], &big, NULL, bad_boy, NULL))
return false;
diff --git a/src/buffer.c b/src/buffer.c
index b6d1e2b..1b2d27c 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -966,14 +966,12 @@ SmashBufferElement (BufferTypePtr Buffer)
}
END_LOOP;
group =
- GetLayerGroupNumberByNumber (max_layer +
- (SWAP_IDENT ? SOLDER_LAYER :
- COMPONENT_LAYER));
+ GetLayerGroupNumberByNumber (SWAP_IDENT ? solder_silk_layer :
+ component_silk_layer);
clayer = &Buffer->Data->Layer[PCB->LayerGroups.Entries[group][0]];
group =
- GetLayerGroupNumberByNumber (max_layer +
- (SWAP_IDENT ? COMPONENT_LAYER :
- SOLDER_LAYER));
+ GetLayerGroupNumberByNumber (SWAP_IDENT ? component_silk_layer :
+ solder_silk_layer);
slayer = &Buffer->Data->Layer[PCB->LayerGroups.Entries[group][0]];
PAD_LOOP (element);
{
@@ -1074,9 +1072,8 @@ ConvertBufferToElement (BufferTypePtr Buffer)
}
END_LOOP;
/* get the component-side SM pads */
- group = GetLayerGroupNumberByNumber (max_layer +
- (SWAP_IDENT ? SOLDER_LAYER :
- COMPONENT_LAYER));
+ group = GetLayerGroupNumberByNumber (SWAP_IDENT ? solder_silk_layer :
+ component_silk_layer);
GROUP_LOOP (Buffer->Data, group);
{
char num[8];
@@ -1124,9 +1121,8 @@ ConvertBufferToElement (BufferTypePtr Buffer)
}
END_LOOP;
/* now get the opposite side pads */
- group = GetLayerGroupNumberByNumber (max_layer +
- (SWAP_IDENT ? COMPONENT_LAYER :
- SOLDER_LAYER));
+ group = GetLayerGroupNumberByNumber (SWAP_IDENT ? component_silk_layer :
+ solder_silk_layer);
GROUP_LOOP (Buffer->Data, group);
{
bool warned = false;
@@ -1488,7 +1484,7 @@ MirrorBuffer (BufferTypePtr Buffer)
Message (_("You can't mirror a buffer that has elements!\n"));
return;
}
- for (i = 0; i < max_layer + 2; i++)
+ for (i = 0; i < max_copper_layer + 2; i++)
{
LayerTypePtr layer = Buffer->Data->Layer + i;
if (layer->TextN)
@@ -1613,14 +1609,14 @@ SwapBuffer (BufferTypePtr Buffer)
}
ENDALL_LOOP;
/* swap silkscreen layers */
- swap = Buffer->Data->Layer[max_layer + SOLDER_LAYER];
- Buffer->Data->Layer[max_layer + SOLDER_LAYER] =
- Buffer->Data->Layer[max_layer + COMPONENT_LAYER];
- Buffer->Data->Layer[max_layer + COMPONENT_LAYER] = swap;
+ swap = Buffer->Data->Layer[solder_silk_layer];
+ Buffer->Data->Layer[solder_silk_layer] =
+ Buffer->Data->Layer[component_silk_layer];
+ Buffer->Data->Layer[component_silk_layer] = swap;
/* swap layer groups when balanced */
- sgroup = GetLayerGroupNumberByNumber (max_layer + SOLDER_LAYER);
- cgroup = GetLayerGroupNumberByNumber (max_layer + COMPONENT_LAYER);
+ sgroup = GetLayerGroupNumberByNumber (solder_silk_layer);
+ cgroup = GetLayerGroupNumberByNumber (component_silk_layer);
if (PCB->LayerGroups.Number[cgroup] == PCB->LayerGroups.Number[sgroup])
{
for (j = k = 0; j < PCB->LayerGroups.Number[sgroup]; j++)
@@ -1629,11 +1625,11 @@ SwapBuffer (BufferTypePtr Buffer)
Cardinal cnumber = PCB->LayerGroups.Entries[cgroup][k];
Cardinal snumber = PCB->LayerGroups.Entries[sgroup][j];
- if (snumber >= max_layer)
+ if (snumber >= max_copper_layer)
continue;
swap = Buffer->Data->Layer[snumber];
- while (cnumber >= max_layer)
+ while (cnumber >= max_copper_layer)
{
k++;
cnumber = PCB->LayerGroups.Entries[cgroup][k];
diff --git a/src/copy.c b/src/copy.c
index 58ce9df..c8244ed 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -338,7 +338,7 @@ CopyPastebufferToLayout (LocationType X, LocationType Y)
DeltaX = X - PASTEBUFFER->X, DeltaY = Y - PASTEBUFFER->Y;
/* paste all layers */
- for (i = 0; i < max_layer + 2; i++)
+ for (i = 0; i < max_copper_layer + 2; i++)
{
LayerTypePtr sourcelayer = &PASTEBUFFER->Data->Layer[i],
destlayer = LAYER_PTR (i);
diff --git a/src/create.c b/src/create.c
index b3d5bee..bf3b688 100644
--- a/src/create.c
+++ b/src/create.c
@@ -114,15 +114,15 @@ pcb_colors_from_settings (PCBTypePtr ptr)
ptr->Data->Layer[i].Color = Settings.LayerColor[i];
ptr->Data->Layer[i].SelectedColor = Settings.LayerSelectedColor[i];
}
- ptr->Data->Layer[max_layer + COMPONENT_LAYER].Color =
+ ptr->Data->Layer[component_silk_layer].Color =
Settings.ShowSolderSide ?
Settings.InvisibleObjectsColor : Settings.ElementColor;
- ptr->Data->Layer[max_layer + COMPONENT_LAYER].SelectedColor =
+ ptr->Data->Layer[component_silk_layer].SelectedColor =
Settings.ElementSelectedColor;
- ptr->Data->Layer[max_layer + SOLDER_LAYER].Color =
+ ptr->Data->Layer[solder_silk_layer].Color =
Settings.ShowSolderSide ?
Settings.ElementColor : Settings.InvisibleObjectsColor;
- ptr->Data->Layer[max_layer + SOLDER_LAYER].SelectedColor =
+ ptr->Data->Layer[solder_silk_layer].SelectedColor =
Settings.ElementSelectedColor;
}
@@ -213,9 +213,9 @@ CreateNewPCBPost (PCBTypePtr pcb, int use_defaults)
if (ParseGroupString (Settings.Groups, &pcb->LayerGroups, DEF_LAYER))
return 1;
- pcb->Data->Layer[max_layer + COMPONENT_LAYER].Name =
+ pcb->Data->Layer[component_silk_layer].Name =
MyStrdup ("silk", "CreateNewPCB()");
- pcb->Data->Layer[max_layer + SOLDER_LAYER].Name =
+ pcb->Data->Layer[solder_silk_layer].Name =
MyStrdup ("silk", "CreateNewPCB()");
}
return 0;
diff --git a/src/crosshair.c b/src/crosshair.c
index b9a3dd2..6fa8bc9 100644
--- a/src/crosshair.c
+++ b/src/crosshair.c
@@ -315,7 +315,7 @@ XORDrawBuffer (BufferTypePtr Buffer)
y = Crosshair.Y - Buffer->Y;
/* draw all visible layers */
- for (i = 0; i < max_layer + 2; i++)
+ for (i = 0; i < max_copper_layer + 2; i++)
if (PCB->Data->Layer[i].On)
{
LayerTypePtr layer = &Buffer->Data->Layer[i];
diff --git a/src/data.h b/src/data.h
index ce27339..8dc674a 100644
--- a/src/data.h
+++ b/src/data.h
@@ -46,7 +46,10 @@ extern OutputType Output;
extern PCBTypePtr PCB;
-#define max_layer (PCB->Data->LayerN)
+#define max_group (PCB->Data->LayerN)
+#define max_copper_layer (PCB->Data->LayerN)
+#define solder_silk_layer (max_copper_layer + SOLDER_LAYER)
+#define component_silk_layer (max_copper_layer + COMPONENT_LAYER)
extern SettingType Settings;
diff --git a/src/djopt.c b/src/djopt.c
index 92fd2b8..240b86b 100644
--- a/src/djopt.c
+++ b/src/djopt.c
@@ -555,7 +555,7 @@ new_line (corner_s * s, corner_s * e, int layer, LineType * example)
{
line_s *ls;
- if (layer >= max_layer)
+ if (layer >= max_copper_layer)
dj_abort ("layer %d\n", layer);
if (example == NULL)
@@ -2026,7 +2026,7 @@ vianudge ()
counts[c->lines[i]->layer]++;
directions[c->lines[i]->layer] |= o;
}
- for (o = 0, i = 0; i < max_layer; i++)
+ for (o = 0, i = 0; i < max_copper_layer; i++)
if (counts[i] == 1)
{
o = directions[i];
@@ -2045,7 +2045,7 @@ vianudge ()
default:
continue;
}
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_copper_layer; i++)
if (counts[i] && directions[i] != o && directions[i] != oboth)
goto vianudge_continue;
@@ -2661,7 +2661,7 @@ pinsnap ()
dprintf ("%s x %d-%d y %d-%d\n", corner_name (c), left, right,
bottom, top);
- for (l = 0; l <= max_layer; l++)
+ for (l = 0; l <= max_copper_layer; l++)
{
best_dist[l] = close * 2;
best_c[l] = 0;
@@ -2707,10 +2707,10 @@ pinsnap ()
}
if (!got_one && c->n_lines == (c->pad ? 1 : 0))
{
- for (l = 0; l <= max_layer; l++)
+ for (l = 0; l <= max_copper_layer; l++)
if (best_c[l])
dprintf ("best[%d] = %s\n", l, corner_name (best_c[l]));
- for (l = 0; l <= max_layer; l++)
+ for (l = 0; l <= max_copper_layer; l++)
if (best_c[l])
{
dprintf ("move %s to %s\n", corner_name (best_c[l]),
@@ -2882,24 +2882,24 @@ grok_layer_groups ()
LayerGroupType *l = &(PCB->LayerGroups);
solder_layer = component_layer = -1;
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_copper_layer; i++)
{
layer_type[i] = 0;
layer_groupings[i] = 0;
}
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_group; i++)
{
f = 0;
for (j = 0; j < l->Number[i]; j++)
{
- if (l->Entries[i][j] == max_layer + SOLDER_LAYER)
+ if (l->Entries[i][j] == solder_silk_layer)
f |= LT_SOLDER;
- if (l->Entries[i][j] == max_layer + COMPONENT_LAYER)
+ if (l->Entries[i][j] == component_silk_layer)
f |= LT_COMPONENT;
}
for (j = 0; j < l->Number[i]; j++)
{
- if (l->Entries[i][j] >= 0 && l->Entries[i][j] < max_layer)
+ if (l->Entries[i][j] >= 0 && l->Entries[i][j] < max_copper_layer)
{
layer_type[l->Entries[i][j]] |= f;
layer_groupings[l->Entries[i][j]] = i;
@@ -3036,7 +3036,7 @@ ActionDJopt (int argc, char **argv, int x, int y)
return 0;
}
- for (layn = 0; layn < max_layer; layn++)
+ for (layn = 0; layn < max_copper_layer; layn++)
{
LayerType *layer = LAYER_PTR (layn);
int ln;
diff --git a/src/draw.c b/src/draw.c
index 1a576bc..e0890da 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -361,7 +361,7 @@ PrintAssembly (const BoxType * drawn_area, int side_group, int swap_ident)
/* draw package */
DrawSilk (swap_ident,
- swap_ident ? SOLDER_LAYER : COMPONENT_LAYER,
+ swap_ident ? solder_silk_layer : component_silk_layer,
drawn_area);
SWAP_IDENT = save_swap;
}
@@ -384,7 +384,7 @@ DrawEverything (BoxTypePtr drawn_area)
PCB->Data->BACKSILKLAYER.Color = PCB->InvisibleObjectsColor;
memset (do_group, 0, sizeof (do_group));
- for (ngroups = 0, i = 0; i < max_layer; i++)
+ for (ngroups = 0, i = 0; i < max_copper_layer; i++)
{
LayerType *l = LAYER_ON_STACK (i);
int group = GetLayerGroupNumberByNumber (LayerStack[i]);
@@ -395,8 +395,8 @@ DrawEverything (BoxTypePtr drawn_area)
}
}
- component = GetLayerGroupNumberByNumber (max_layer + COMPONENT_LAYER);
- solder = GetLayerGroupNumberByNumber (max_layer + SOLDER_LAYER);
+ component = GetLayerGroupNumberByNumber (component_silk_layer);
+ solder = GetLayerGroupNumberByNumber (solder_silk_layer);
/*
* first draw all 'invisible' stuff
@@ -502,9 +502,9 @@ DrawEverything (BoxTypePtr drawn_area)
}
/* Draw top silkscreen */
if (gui->set_layer ("topsilk", SL (SILK, TOP), 0))
- DrawSilk (0, COMPONENT_LAYER, drawn_area);
+ DrawSilk (0, component_silk_layer, drawn_area);
if (gui->set_layer ("bottomsilk", SL (SILK, BOTTOM), 0))
- DrawSilk (1, SOLDER_LAYER, drawn_area);
+ DrawSilk (1, solder_silk_layer, drawn_area);
if (gui->gui)
{
/* Draw element Marks */
@@ -698,7 +698,7 @@ DrawSilk (int new_swap, int layer, const BoxType * drawn_area)
{
gui->use_mask (HID_MASK_BEFORE);
#endif
- DrawLayer (LAYER_PTR (max_layer + layer), drawn_area);
+ DrawLayer (LAYER_PTR (layer), drawn_area);
/* draw package */
r_search (PCB->Data->element_tree, drawn_area, NULL, frontE_callback,
NULL);
@@ -716,7 +716,7 @@ DrawSilk (int new_swap, int layer, const BoxType * drawn_area)
if (gui->poly_after)
{
gui->use_mask (HID_MASK_AFTER);
- DrawLayer (LAYER_PTR (max_layer + layer), drawn_area);
+ DrawLayer (LAYER_PTR (max_copper_layer + layer), drawn_area);
/* draw package */
r_search (PCB->Data->element_tree, drawn_area, NULL, frontE_callback,
NULL);
@@ -874,7 +874,7 @@ DrawLayerGroup (int group, const BoxType * screen)
if (strcmp (Layer->Name, "outline") == 0 ||
strcmp (Layer->Name, "route") == 0)
rv = 0;
- if (layernum < max_layer && Layer->On)
+ if (layernum < max_copper_layer && Layer->On)
{
/* draw all polygons on this layer */
if (Layer->PolygonN)
diff --git a/src/file.c b/src/file.c
index a61d53f..97412b2 100644
--- a/src/file.c
+++ b/src/file.c
@@ -867,7 +867,7 @@ WriteBuffer (FILE * FP)
WriteViaData (FP, PASTEBUFFER->Data);
WriteElementData (FP, PASTEBUFFER->Data);
- for (i = 0; i < max_layer + 2; i++)
+ for (i = 0; i < max_copper_layer + 2; i++)
WriteLayerData (FP, i, &(PASTEBUFFER->Data->Layer[i]));
return (STATUS_OK);
}
@@ -887,7 +887,7 @@ WritePCB (FILE * FP)
WriteViaData (FP, PCB->Data);
WriteElementData (FP, PCB->Data);
WritePCBRatData (FP);
- for (i = 0; i < max_layer + 2; i++)
+ for (i = 0; i < max_copper_layer + 2; i++)
WriteLayerData (FP, i, &(PCB->Data->Layer[i]));
WritePCBNetlistData (FP);
diff --git a/src/find.c b/src/find.c
index e00e2ad..8d468bb 100644
--- a/src/find.c
+++ b/src/find.c
@@ -567,7 +567,7 @@ FreeLayoutLookupMemory (void)
{
Cardinal i;
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_copper_layer; i++)
{
MYFREE (LineList[i].Data);
MYFREE (ArcList[i].Data);
@@ -630,7 +630,7 @@ InitLayoutLookup (void)
Cardinal i;
/* initialize line arc and polygon data */
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_copper_layer; i++)
{
LayerTypePtr layer = LAYER_PTR (i);
@@ -824,7 +824,7 @@ LookupLOConnectionsToPVList (bool AndRats)
return true;
/* now all lines, arcs and polygons of the several layers */
- for (layer = 0; layer < max_layer; layer++)
+ for (layer = 0; layer < max_copper_layer; layer++)
{
info.layer = layer;
/* add touching lines */
@@ -875,7 +875,7 @@ LookupLOConnectionsToLOList (bool AndRats)
* by 'LookupPVConnectionsToLOList()' which has to check the same
* list entries plus the new ones
*/
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_copper_layer; i++)
{
lineposition[i] = LineList[i].Location;
polyposition[i] = PolygonList[i].Location;
@@ -908,7 +908,7 @@ LookupLOConnectionsToLOList (bool AndRats)
}
}
/* loop over all layergroups */
- for (group = 0; group < max_layer; group++)
+ for (group = 0; group < max_group; group++)
{
Cardinal entry;
@@ -916,10 +916,10 @@ LookupLOConnectionsToLOList (bool AndRats)
{
layer = PCB->LayerGroups.Entries[group][entry];
- /* be aware that the layer number equal max_layer
- * and max_layer+1 have a special meaning for pads
+ /* be aware that the layer number equal max_copper_layer
+ * and max_copper_layer+1 have a special meaning for pads
*/
- if (layer < max_layer)
+ if (layer < max_copper_layer)
{
/* try all new lines */
position = &lineposition[layer];
@@ -945,11 +945,11 @@ LookupLOConnectionsToLOList (bool AndRats)
else
{
/* try all new pads */
- layer -= max_layer;
+ layer -= max_copper_layer;
if (layer > 1)
{
- Message (_("bad layer number %d max_layer=%d in find.c\n"),
- layer, max_layer);
+ Message (_("bad layer number %d max_copper_layer=%d in find.c\n"),
+ layer, max_copper_layer);
return false;
}
position = &padposition[layer];
@@ -965,17 +965,17 @@ LookupLOConnectionsToLOList (bool AndRats)
* may have changed the prior lists
*/
done = !AndRats || ratposition >= RatList.Number;
- for (layer = 0; layer < max_layer + 2; layer++)
+ for (layer = 0; layer < max_copper_layer + 2; layer++)
{
- if (layer < max_layer)
+ if (layer < max_copper_layer)
done = done &&
lineposition[layer] >= LineList[layer].Number
&& arcposition[layer] >= ArcList[layer].Number
&& polyposition[layer] >= PolygonList[layer].Number;
else
done = done
- && padposition[layer - max_layer] >=
- PadList[layer - max_layer].Number;
+ && padposition[layer - max_copper_layer] >=
+ PadList[layer - max_copper_layer].Number;
}
}
while (!done);
@@ -1171,7 +1171,7 @@ LookupPVConnectionsToLOList (bool AndRats)
struct lo_info info;
/* loop over all layers */
- for (layer = 0; layer < max_layer; layer++)
+ for (layer = 0; layer < max_copper_layer; layer++)
{
/* do nothing if there are no PV's */
if (TotalP + TotalV == 0)
@@ -1944,7 +1944,7 @@ LookupLOConnectionsToArc (ArcTypePtr Arc, Cardinal LayerGroup)
layer = PCB->LayerGroups.Entries[LayerGroup][entry];
/* handle normal layers */
- if (layer < max_layer)
+ if (layer < max_copper_layer)
{
PolygonTypePtr polygon;
@@ -1972,7 +1972,7 @@ LookupLOConnectionsToArc (ArcTypePtr Arc, Cardinal LayerGroup)
}
else
{
- info.layer = layer - max_layer;
+ info.layer = layer - max_copper_layer;
if (setjmp (info.env) == 0)
r_search (PCB->Data->pad_tree, &info.arc.BoundingBox, NULL,
LOCtoArcPad_callback, &info);
@@ -2082,7 +2082,7 @@ LookupLOConnectionsToLine (LineTypePtr Line, Cardinal LayerGroup,
layer = PCB->LayerGroups.Entries[LayerGroup][entry];
/* handle normal layers */
- if (layer < max_layer)
+ if (layer < max_copper_layer)
{
PolygonTypePtr polygon;
@@ -2114,7 +2114,7 @@ LookupLOConnectionsToLine (LineTypePtr Line, Cardinal LayerGroup,
else
{
/* handle special 'pad' layers */
- info.layer = layer - max_layer;
+ info.layer = layer - max_copper_layer;
if (setjmp (info.env) == 0)
r_search (PCB->Data->pad_tree, &info.line.BoundingBox, NULL,
LOCtoLinePad_callback, &info);
@@ -2181,7 +2181,7 @@ LOTouchesLine (LineTypePtr Line, Cardinal LayerGroup)
Cardinal layer = PCB->LayerGroups.Entries[LayerGroup][entry];
/* handle normal layers */
- if (layer < max_layer)
+ if (layer < max_copper_layer)
{
PolygonTypePtr polygon;
@@ -2209,7 +2209,7 @@ LOTouchesLine (LineTypePtr Line, Cardinal LayerGroup)
else
{
/* handle special 'pad' layers */
- info.layer = layer - max_layer;
+ info.layer = layer - max_copper_layer;
if (setjmp (info.env) == 0)
r_search (PCB->Data->pad_tree, &info.line.BoundingBox, NULL,
LOT_Padcallback, &info);
@@ -2301,7 +2301,7 @@ LookupLOConnectionsToRatEnd (PointTypePtr Point, Cardinal LayerGroup)
arcs by definition
*/
- if (layer < max_layer)
+ if (layer < max_copper_layer)
{
info.layer = layer;
if (setjmp (info.env) == 0)
@@ -2316,7 +2316,7 @@ LookupLOConnectionsToRatEnd (PointTypePtr Point, Cardinal LayerGroup)
else
{
/* handle special 'pad' layers */
- info.layer = layer - max_layer;
+ info.layer = layer - max_copper_layer;
if (setjmp (info.env) == 0)
r_search_pt (PCB->Data->pad_tree, Point, 1, NULL,
LOCtoPad_callback, &info);
@@ -2447,7 +2447,7 @@ LookupLOConnectionsToPad (PadTypePtr Pad, Cardinal LayerGroup)
layer = PCB->LayerGroups.Entries[LayerGroup][entry];
/* handle normal layers */
- if (layer < max_layer)
+ if (layer < max_copper_layer)
{
info.layer = layer;
/* add lines */
@@ -2472,7 +2472,7 @@ LookupLOConnectionsToPad (PadTypePtr Pad, Cardinal LayerGroup)
else
{
/* handle special 'pad' layers */
- info.layer = layer - max_layer;
+ info.layer = layer - max_copper_layer;
if (setjmp (info.env) == 0)
r_search (PCB->Data->pad_tree, (BoxType *) & info.pad, NULL,
LOCtoPadPad_callback, &info);
@@ -2580,7 +2580,7 @@ LookupLOConnectionsToPolygon (PolygonTypePtr Polygon, Cardinal LayerGroup)
layer = PCB->LayerGroups.Entries[LayerGroup][entry];
/* handle normal layers */
- if (layer < max_layer)
+ if (layer < max_copper_layer)
{
PolygonTypePtr polygon;
@@ -2610,7 +2610,7 @@ LookupLOConnectionsToPolygon (PolygonTypePtr Polygon, Cardinal LayerGroup)
}
else
{
- info.layer = layer - max_layer;
+ info.layer = layer - max_copper_layer;
if (setjmp (info.env) == 0)
r_search (PCB->Data->pad_tree, (BoxType *) & info.polygon,
NULL, LOCtoPolyPad_callback, &info);
@@ -2893,7 +2893,7 @@ ListsEmpty (bool AndRats)
empty = (PVList.Location >= PVList.Number);
if (AndRats)
empty = empty && (RatList.Location >= RatList.Number);
- for (i = 0; i < max_layer && empty; i++)
+ for (i = 0; i < max_copper_layer && empty; i++)
empty = empty && LineList[i].Location >= LineList[i].Number
&& ArcList[i].Location >= ArcList[i].Number
&& PolygonList[i].Location >= PolygonList[i].Number;
@@ -3059,7 +3059,7 @@ PrepareNextLoop (FILE * FP)
Cardinal layer;
/* reset found LOs for the next pin */
- for (layer = 0; layer < max_layer; layer++)
+ for (layer = 0; layer < max_copper_layer; layer++)
{
LineList[layer].Location = LineList[layer].Number = 0;
ArcList[layer].Location = ArcList[layer].Number = 0;
@@ -3151,7 +3151,7 @@ DrawNewConnections (void)
Cardinal position;
/* decrement 'i' to keep layerstack order */
- for (i = max_layer - 1; i != -1; i--)
+ for (i = max_copper_layer - 1; i != -1; i--)
{
Cardinal layer = LayerStack[i];
@@ -3366,7 +3366,7 @@ LookupConnection (LocationType X, LocationType Y, bool AndDraw,
(LayerTypePtr) ptr1);
/* don't mess with silk objects! */
- if (laynum >= max_layer)
+ if (laynum >= max_copper_layer)
return;
}
}
@@ -3611,7 +3611,7 @@ DumpList (void)
PVList.Number = 0;
PVList.Location = 0;
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_copper_layer; i++)
{
LineList[i].Location = 0;
LineList[i].DrawLocation = 0;
diff --git a/src/flags.c b/src/flags.c
index 60688dd..c33cfb6 100644
--- a/src/flags.c
+++ b/src/flags.c
@@ -143,7 +143,7 @@ FlagLayerShown (int n)
case FL_MASK:
return TEST_FLAG (SHOWMASKFLAG, PCB);
default:
- if (n >= 0 && n < max_layer)
+ if (n >= 0 && n < max_copper_layer)
return PCB->Data->Layer[n].On;
}
return 0;
diff --git a/src/hid/batch/batch.c b/src/hid/batch/batch.c
index 3129466..f3b7d3c 100644
--- a/src/hid/batch/batch.c
+++ b/src/hid/batch/batch.c
@@ -82,8 +82,8 @@ info (int argc, char **argv, int x, int y)
PCB->MaxHeight / 100.0,
PCB->MaxWidth * COOR_TO_MM,
PCB->MaxHeight * COOR_TO_MM);
- cg = GetLayerGroupNumberByNumber (max_layer + COMPONENT_LAYER);
- sg = GetLayerGroupNumberByNumber (max_layer + SOLDER_LAYER);
+ cg = GetLayerGroupNumberByNumber (component_silk_layer);
+ sg = GetLayerGroupNumberByNumber (solder_silk_layer);
for (i=0; i<MAX_LAYER; i++)
{
diff --git a/src/hid/common/extents.c b/src/hid/common/extents.c
index a0dbf6b..e8bd8ab 100644
--- a/src/hid/common/extents.c
+++ b/src/hid/common/extents.c
@@ -38,11 +38,11 @@ static int
extents_set_layer (const char *name, int group, int empty)
{
int idx = group;
- if (idx >= 0 && idx < max_layer)
+ if (idx >= 0 && idx < max_group)
{
idx = PCB->LayerGroups.Entries[idx][0];
}
- if (idx >= 0 && idx < max_layer + 2)
+ if (idx >= 0 && idx < max_copper_layer + 2)
return 1;
if (idx < 0)
{
diff --git a/src/hid/common/flags.c b/src/hid/common/flags.c
index 3915c7a..e4a566d 100644
--- a/src/hid/common/flags.c
+++ b/src/hid/common/flags.c
@@ -132,7 +132,7 @@ void
hid_save_and_show_layer_ons (int *save_array)
{
int i;
- for (i = 0; i < max_layer + 2; i++)
+ for (i = 0; i < max_copper_layer + 2; i++)
{
save_array[i] = PCB->Data->Layer[i].On;
PCB->Data->Layer[i].On = 1;
@@ -143,7 +143,7 @@ void
hid_restore_layer_ons (int *save_array)
{
int i;
- for (i = 0; i < max_layer + 2; i++)
+ for (i = 0; i < max_copper_layer + 2; i++)
PCB->Data->Layer[i].On = save_array[i];
}
@@ -180,9 +180,9 @@ layer_type_to_file_name (int idx)
return "backassembly";
default:
group = GetLayerGroupNumberByNumber(idx);
- if (group == GetLayerGroupNumberByNumber(max_layer+COMPONENT_LAYER))
+ if (group == GetLayerGroupNumberByNumber(component_silk_layer))
return "front";
- else if (group == GetLayerGroupNumberByNumber(max_layer+SOLDER_LAYER))
+ else if (group == GetLayerGroupNumberByNumber(solder_silk_layer))
return "back";
else if (PCB->LayerGroups.Number[group] == 1
&& (strcmp (PCB->Data->Layer[idx].Name, "route") == 0 ||
diff --git a/src/hid/gcode/gcode.c b/src/hid/gcode/gcode.c
index c3c2e4e..7a52a7c 100644
--- a/src/hid/gcode/gcode.c
+++ b/src/hid/gcode/gcode.c
@@ -277,7 +277,7 @@ gcode_choose_groups ()
/* Set entire array to 0 (don't export any layer groups by default */
memset (gcode_export_group, 0, sizeof (gcode_export_group));
- for (n = 0; n < max_layer; n++)
+ for (n = 0; n < max_copper_layer; n++)
{
layer = &PCB->Data->Layer[n];
@@ -458,12 +458,12 @@ gcode_do_export (HID_Attr_Val * options)
gcode_cur_group = i;
/* magic */
- idx = (i >= 0 && i < max_layer) ?
+ idx = (i >= 0 && i < max_group) ?
PCB->LayerGroups.Entries[i][0] : i;
printf ("idx=%d %s\n", idx, layer_type_to_file_name (idx));
is_solder =
(GetLayerGroupNumberByNumber (idx) ==
- GetLayerGroupNumberByNumber (max_layer + SOLDER_LAYER)) ? 1 : 0;
+ GetLayerGroupNumberByNumber (solder_silk_layer)) ? 1 : 0;
save_drill = is_solder; /* save drills for one layer only */
gcode_start_png (gcode_basename, layer_type_to_file_name (idx));
hid_save_and_show_layer_ons (save_ons);
@@ -627,7 +627,7 @@ gcode_do_export (HID_Attr_Val * options)
static int
gcode_set_layer (const char *name, int group, int empty)
{
- int idx = (group >= 0 && group < max_layer) ?
+ int idx = (group >= 0 && group < max_group) ?
PCB->LayerGroups.Entries[group][0] : group;
if (name == 0)
diff --git a/src/hid/gerber/gerber.c b/src/hid/gerber/gerber.c
index fa908ce..e2d9c57 100644
--- a/src/hid/gerber/gerber.c
+++ b/src/hid/gerber/gerber.c
@@ -302,10 +302,10 @@ gerber_get_export_options (int *n)
static int
group_for_layer (int l)
{
- if (l < max_layer + 2 && l >= 0)
+ if (l < max_copper_layer + 2 && l >= 0)
return GetLayerGroupNumberByNumber (l);
/* else something unique */
- return max_layer + 3 + l;
+ return max_group + 3 + l;
}
static int
@@ -380,20 +380,20 @@ gerber_do_export (HID_Attr_Val * options)
}
hid_save_and_show_layer_ons (save_ons);
- for (i = 0; i < max_layer; i++)
+ for (i = 0; i < max_copper_layer; i++)
{
LayerType *layer = PCB->Data->Layer + i;
if (layer->LineN || layer->TextN || layer->ArcN || layer->PolygonN)
print_group[GetLayerGroupNumberByNumber (i)] = 1;
}
- print_group[GetLayerGroupNumberByNumber (max_layer)] = 1;
- print_group[GetLayerGroupNumberByNumber (max_layer + 1)] = 1;
- for (i = 0; i < max_layer; i++)
+ print_group[GetLayerGroupNumberByNumber (solder_silk_layer)] = 1;
+ print_group[GetLayerGroupNumberByNumber (component_silk_layer)] = 1;
+ for (i = 0; i < max_copper_layer; i++)
if (print_group[GetLayerGroupNumberByNumber (i)])
print_layer[i] = 1;
memcpy (saved_layer_stack, LayerStack, sizeof (LayerStack));
- qsort (LayerStack, max_layer, sizeof (LayerStack[0]), layer_sort);
+ qsort (LayerStack, max_copper_layer, sizeof (LayerStack[0]), layer_sort);
linewidth = -1;
lastcap = -1;
lastgroup = -1;
@@ -453,12 +453,12 @@ gerber_set_layer (const char *name, int group, int empty)
char *cp;
int idx = (group >= 0
&& group <
- max_layer) ? PCB->LayerGroups.Entries[group][0] : group;
+ max_group) ? PCB->LayerGroups.Entries[group][0] : group;
if (name == 0)
name = PCB->Data->Layer[idx].Name;
- if (idx >= 0 && idx < max_layer && !print_layer[idx])
+ if (idx >= 0 && idx < max_copper_layer && !print_layer[idx])
return 0;
if (strcmp (name, "invisible") == 0)
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 58c2635..7d59672 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -388,20 +388,20 @@ int
ghid_set_layer (const char *name, int group, int empty)
{
int idx = group;
- if (idx >= 0 && idx < max_layer)
+ if (idx >= 0 && idx < max_group)
{
int n = PCB->LayerGroups.Number[group];
for (idx = 0; idx < n-1; idx ++)
{
int ni = PCB->LayerGroups.Entries[group][idx];
- if (ni >= 0 && ni < max_layer + 2
+ if (ni >= 0 && ni < max_copper_layer + 2
&& PCB->Data->Layer[ni].On)
break;
}
idx = PCB->LayerGroups.Entries[group][idx];
}
- if (idx >= 0 && idx < max_layer + 2)
+ if (idx >= 0 && idx < max_copper_layer + 2)
return /*pinout ? 1 : */ PCB->Data->Layer[idx].On;
if (idx < 0)
{
@@ -1520,8 +1520,8 @@ SwapSides (int argc, char **argv, int x, int y)
gint flipd;
int do_flip_x = 0;
int do_flip_y = 0;
- int comp_group = GetLayerGroupNumberByNumber (max_layer + COMPONENT_LAYER);
- int solder_group = GetLayerGroupNumberByNumber (max_layer + SOLDER_LAYER);
+ int comp_group = GetLayerGroupNumberByNumber (component_silk_layer);
+ int solder_group = GetLayerGroupNumberByNumber (solder_silk_layer);
int active_group = GetLayerGroupNumberByNumber (LayerStack[0]);
int comp_showing =
PCB->Data->Layer[PCB->LayerGroups.Entries[comp_group][0]].On;
diff --git a/src/hid/gtk/gui-config.c b/src/hid/gtk/gui-config.c
index 5e8121b..36277eb 100644
--- a/src/hid/gtk/gui-config.c
+++ b/src/hid/gtk/gui-config.c
@@ -1430,16 +1430,16 @@ make_layer_group_string (LayerGroupType * lg)
string = g_string_new ("");
- for (group = 0; group < max_layer; group++)
+ for (group = 0; group < max_group; group++)
{
if (lg->Number[group] == 0)
continue;
for (entry = 0; entry < lg->Number[group]; entry++)
{
layer = lg->Entries[group][entry];
- if (layer == max_layer + COMPONENT_LAYER)
+ if (layer == component_silk_layer)
string = g_string_append (string, "c");
- else if (layer == max_layer + SOLDER_LAYER)
+ else if (layer == solder_silk_layer)
string = g_string_append (string, "s");
else
g_string_append_printf (string, "%d", layer + 1);
@@ -1447,7 +1447,7 @@ make_layer_group_string (LayerGroupType * lg)
if (entry != lg->Number[group] - 1)
string = g_string_append (string, ",");
}
- if (group != max_layer - 1)
+ if (group != max_group - 1)
string = g_string_append (string, ":");
}
return g_string_free (string, FALSE); /* Don't free string->str */
@@ -1471,7 +1471,7 @@ config_layers_apply (void)
/* Get each layer name entry and dup if modified into the PCB layer names
| and, if to use as default, the Settings layer names.
*/
- for (i = 0; i < max_layer; ++i)
+ for (i = 0; i < max_copper_layer; ++i)
{
layer = &PCB->Data->Layer[i];
s = ghid_entry_get_text (layer_entry[i]);
@@ -1494,17 +1494,17 @@ config_layers_apply (void)
{
/* clear all entries and read layer by layer
*/
- for (group = 0; group < max_layer; group++)
+ for (group = 0; group < max_group; group++)
layer_groups.Number[group] = 0;
- for (i = 0; i < max_layer + 2; i++)
+ for (i = 0; i < max_copper_layer + 2; i++)
{
group = config_layer_group[i] - 1;
layer_groups.Entries[group][layer_groups.Number[group]++] = i;
- if (i == max_layer + COMPONENT_LAYER)
+ if (i == component_silk_layer)
componentgroup = group;
- else if (i == max_layer + SOLDER_LAYER)
+ else if (i == solder_silk_layer)
soldergroup = group;
}
@@ -1536,7 +1536,7 @@ config_layers_apply (void)
s = make_layer_group_string (&PCB->LayerGroups);
if (dup_string (&Settings.Groups, s))
{
- ParseGroupString (Settings.Groups, &Settings.LayerGroups, max_layer);
+ ParseGroupString (Settings.Groups, &Settings.LayerGroups, max_copper_layer);
ghidgui->config_modified = TRUE;
}
g_free (s);
@@ -1551,7 +1551,7 @@ config_layer_group_button_state_update (void)
/* Set button active corresponding to layer group state.
*/
groups_holdoff = TRUE;
- for (g = 0; g < max_layer; g++)
+ for (g = 0; g < max_group; g++)
for (i = 0; i < layer_groups.Number[g]; i++)
{
/* printf("layer %d in group %d\n", layer_groups.Entries[g][i], g +1); */
@@ -1604,7 +1604,7 @@ ghid_config_groups_changed(void)
gtk_widget_show (scrolled_window);
- table = gtk_table_new (max_layer + 3, max_layer + 1, FALSE);
+ table = gtk_table_new (max_copper_layer + 3, max_group + 1, FALSE);
config_groups_table = table;
gtk_table_set_row_spacings (GTK_TABLE (table), 3);
gtk_scrolled_window_add_with_viewport (
@@ -1618,7 +1618,7 @@ ghid_config_groups_changed(void)
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1);
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
- for (i = 1; i < max_layer + 1; ++i)
+ for (i = 1; i < max_group + 1; ++i)
{
if (i < 10)
snprintf (buf, sizeof (buf), " %d", i);
@@ -1631,16 +1631,16 @@ ghid_config_groups_changed(void)
/* Create a row of radio toggle buttons for layer. So each layer
| can have an active radio button set for the group it needs to be in.
*/
- for (layer = 0; layer < max_layer + 2; ++layer)
+ for (layer = 0; layer < max_copper_layer + 2; ++layer)
{
- if (layer == max_layer + COMPONENT_LAYER)
+ if (layer == component_silk_layer)
name = _("component side");
- else if (layer == max_layer + SOLDER_LAYER)
+ else if (layer == solder_silk_layer)
name = _("solder side");
else
name = UNKNOWN (PCB->Data->Layer[layer].Name);
- if (layer >= max_layer)
+ if (layer >= max_copper_layer)
{
label = gtk_label_new (name);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
@@ -1658,7 +1658,7 @@ ghid_config_groups_changed(void)
}
group = NULL;
- for (i = 0; i < max_layer; ++i)
+ for (i = 0; i < max_group; ++i)
{
snprintf (buf, sizeof (buf), "%2.2d", i+1);
button = gtk_radio_button_new_with_label (group, buf);
diff --git a/src/hid/gtk/gui-output-events.c b/src/hid/gtk/gui-output-events.c
index 7cc764e..6164415 100644
--- a/src/hid/gtk/gui-output-events.c
+++ b/src/hid/gtk/gui-output-events.c
@@ -781,7 +781,7 @@ describe_location (LocationType X, LocationType Y)
/* don't mess with silk objects! */
if (type & SILK_TYPE &&
- GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1) >= max_layer)
+ GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1) >= max_copper_layer)
return NULL;
if (type == PIN_TYPE || type == PAD_TYPE)
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 76ac977..9c30a93 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -376,7 +376,7 @@ ghid_update_toggle_flags ()
a = gtk_action_group_get_action (ghidgui->main_actions, tmpnm);
if (a != NULL)
{
- g_object_set_property (G_OBJECT (a), "visible", (i >= max_layer && i < MAX_LAYER) ? &setfalse : &settrue);
+ g_object_set_property (G_OBJECT (a), "visible", (i >= max_copper_layer && i < MAX_LAYER) ? &setfalse : &settrue);
}
}
@@ -1048,7 +1048,7 @@ ghid_make_programmed_menu_actions ()
{
layer_process (NULL, &text, NULL, i);
#ifdef DEBUG_MENUS
- printf ("ghid_make_programmed_menu_actions(): Added #%2d \"%s\". max_layer = %d, MAX_LAYER = %d\n", i, text, max_layer, MAX_LAYER);
+ printf ("ghid_make_programmed_menu_actions(): Added #%2d \"%s\". max_copper_layer = %d, MAX_LAYER = %d\n", i, text, max_copper_layer, MAX_LAYER);
#endif
/* name, stock_id, label, accelerator, tooltip, callback */
layerview_toggle_entries[i].name = g_strdup_printf ("%s%d", LAYERVIEW, i);
@@ -1347,7 +1347,7 @@ layer_select_button_cb (GtkWidget * widget, LayerButtonSet * lb)
PCB->SilkActive = (lb->index == LAYER_BUTTON_SILK);
PCB->RatDraw = (lb->index == LAYER_BUTTON_RATS);
- if (lb->index < max_layer)
+ if (lb->index < max_copper_layer)
ChangeGroupVisibility (lb->index, true, true);
layer_select_button_index = lb->index;
@@ -1419,10 +1419,10 @@ layer_enable_button_cb (GtkWidget * widget, gpointer data)
| Xt PCB code.
*/
if ((group = GetGroupOfLayer (layer)) ==
- GetGroupOfLayer (MIN (max_layer, INDEXOFCURRENT)))
+ GetGroupOfLayer (MIN (max_copper_layer, INDEXOFCURRENT)))
{
- for (i = (layer + 1) % (max_layer + 1); i != layer;
- i = (i + 1) % (max_layer + 1))
+ for (i = (layer + 1) % (max_copper_layer + 1); i != layer;
+ i = (i + 1) % (max_copper_layer + 1))
if (PCB->Data->Layer[i].On == true &&
GetGroupOfLayer (i) != group)
break;
@@ -1491,7 +1491,7 @@ ghid_show_layer_buttons(void)
for (i = 0; i < MAX_LAYER; ++i)
{
lb = &layer_buttons[i];
- if (i < max_layer)
+ if (i < max_copper_layer)
{
gtk_widget_show(lb->layer_enable_button);
gtk_widget_show(lb->radio_select_button);
@@ -1619,7 +1619,7 @@ ghid_layer_enable_buttons_update (void)
/* Update layer button labels and active state to state inside of PCB
*/
layer_enable_button_cb_hold_off = TRUE;
- for (i = 0; i < max_layer; ++i)
+ for (i = 0; i < max_copper_layer; ++i)
{
lb = &layer_buttons[i];
s = UNKNOWN (PCB->Data->Layer[i].Name);
@@ -1724,7 +1724,7 @@ ghid_layer_buttons_update (void)
else
layer = PCB->SilkActive ? LAYER_BUTTON_SILK : LayerStack[0];
- if (layer < max_layer)
+ if (layer < max_copper_layer)
active = PCB->Data->Layer[layer].On;
else if (layer == LAYER_BUTTON_SILK)
active = PCB->ElementOn;
@@ -1754,7 +1754,7 @@ ghid_layer_buttons_update (void)
if (a != NULL)
{
- g_object_set_property (G_OBJECT (a), "visible", (i >= max_layer && i < MAX_LAYER) ? &setfalse : &settrue);
+ g_object_set_property (G_OBJECT (a), "visible", (i >= max_copper_layer && i < MAX_LAYER) ? &setfalse : &settrue);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (a), (set && (i == layer) ) ? TRUE : FALSE);
g_object_set_property (G_OBJECT (a), "label", &setlabel);
}
@@ -1763,7 +1763,7 @@ ghid_layer_buttons_update (void)
a = gtk_action_group_get_action (ghidgui->main_actions, tmpnm);
if (a != NULL)
{
- g_object_set_property (G_OBJECT (a), "visible", (i >= max_layer && i < MAX_LAYER) ? &setfalse : &settrue);
+ g_object_set_property (G_OBJECT (a), "visible", (i >= max_copper_layer && i < MAX_LAYER) ? &setfalse : &settrue);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (a), set ? TRUE : FALSE);
g_value_set_string (&setlabel, text);
g_object_set_property (G_OBJECT (a), "label", &setlabel);
@@ -2811,7 +2811,7 @@ ToggleView (int argc, char **argv, int x, int y)
else
{
l = -1;
- for (i = 0; i < max_layer + 2; i++)
+ for (i = 0; i < max_copper_layer + 2; i++)
if (strcmp (argv[0], PCB->Data->Layer[i].Name) == 0)
{
l = i;
diff --git a/src/hid/lesstif/dialogs.c b/src/hid/lesstif/dialogs.c
index 6ab4b78..544a718 100644
--- a/src/hid/lesstif/dialogs.c
+++ b/src/hid/lesstif/dialogs.c
@@ -1368,10 +1368,10 @@ lgbutton_cb (Widget w, int ij, void *cbs)
{
int layer, group, k;
- layer = ij / max_layer;
- group = ij % max_layer;
+ layer = ij / max_group;
+ group = ij % max_group;
group = MoveLayerToGroup (layer, group);
- for (k = 0; k < max_layer; k++)
+ for (k = 0; k < max_group; k++)
{
if (k == group)
XmToggleButtonSetState (lgbuttons[layer][k], 1, 0);
@@ -1400,20 +1400,20 @@ lgbutton_expose (Widget w, XtPointer u, XmDrawingAreaCallbackStruct *cbs)
XSetForeground (display, lg_gc, lgr.bg);
XFillRectangle (display, win, lg_gc, 0, 0, lg_width, lg_height);
XSetForeground (display, lg_gc, lgr.fg);
- for (i=0; i<max_layer; i++)
+ for (i = 0; i < max_group; i++)
XDrawLine(display, win, lg_gc, lg_c[i], 0, lg_c[i], lg_height);
- for (i=1; i<max_layer+2; i++)
+ for (i = 1; i < max_copper_layer + 2; i++)
XDrawLine(display, win, lg_gc, lg_label_width, lg_r[i], lg_width, lg_r[i]);
- for (i=0; i<max_layer+2; i++)
+ for (i = 0; i < max_copper_layer + 2; i++)
{
int dir;
XCharStruct size;
int swidth;
const char *name;
- if (i == max_layer)
+ if (i == solder_silk_layer)
name = SOLDER_SIDE_NAME;
- else if (i == max_layer + 1)
+ else if (i == component_silk_layer)
name = COMPONENT_SIDE_NAME;
else
name = PCB->Data->Layer[i].Name;
@@ -1425,7 +1425,7 @@ lgbutton_expose (Widget w, XtPointer u, XmDrawingAreaCallbackStruct *cbs)
name, strlen(name));
}
XSetForeground (display, lg_gc, lgr.sel);
- for (i=0; i<max_layer+2; i++)
+ for (i = 0; i < max_copper_layer + 2; i++)
{
int c = lg_setcol[i];
int x1 = lg_c[c] + 2;
@@ -1442,8 +1442,8 @@ lgbutton_input (Widget w, XtPointer u, XmDrawingAreaCallbackStruct *cbs)
int layer, group;
if (cbs->event->type != ButtonPress)
return;
- layer = cbs->event->xbutton.y * (max_layer+2) / lg_height;
- group = (cbs->event->xbutton.x - lg_label_width) * max_layer / (lg_width - lg_label_width);
+ layer = cbs->event->xbutton.y * (max_copper_layer + 2) / lg_height;
+ group = (cbs->event->xbutton.x - lg_label_width) * max_group / (lg_width - lg_label_width);
group = MoveLayerToGroup (layer, group);
lg_setcol[layer] = group;
lgbutton_expose (w, 0, 0);
@@ -1462,10 +1462,10 @@ lgbutton_resize (Widget w, XtPointer u, XmDrawingAreaCallbackStruct *cbs)
lg_width = width;
lg_height = height;
- for (i=0; i<=max_layer; i++)
- lg_c[i] = lg_label_width + (lg_width - lg_l...
[truncated message content] |
|
From: <gi...@gp...> - 2010-09-10 05:54:51
|
The branch, master has been updated
via d7be5538da245ccdbd5e2c50d0231fb2d154e9ac (commit)
from 76dbbd1b14b75f455ccd80166c9e3f3830ec609a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/lesstif/main.c | 38 ++++++++++++++++++++++++++------------
1 files changed, 26 insertions(+), 12 deletions(-)
=================
Commit Messages
=================
commit d7be5538da245ccdbd5e2c50d0231fb2d154e9ac
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Fix lesstif SwapSides magic layer option.
If the first layer in the layer group is silk, the swap sides
key won't auto-toggle the solder and component groups, nor properly
activate them if it does. Add code to find a visible *copper* layer
in the layer group and use that.
:100644 100644 c270992... 390e128... M src/hid/lesstif/main.c
=========
Changes
=========
commit d7be5538da245ccdbd5e2c50d0231fb2d154e9ac
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Fix lesstif SwapSides magic layer option.
If the first layer in the layer group is silk, the swap sides
key won't auto-toggle the solder and component groups, nor properly
activate them if it does. Add code to find a visible *copper* layer
in the layer group and use that.
diff --git a/src/hid/lesstif/main.c b/src/hid/lesstif/main.c
index c270992..390e128 100644
--- a/src/hid/lesstif/main.c
+++ b/src/hid/lesstif/main.c
@@ -544,16 +544,34 @@ side'' of the board.
%end-doc */
static int
+group_showing (int g, int *c)
+{
+ int i, l;
+ *c = PCB->LayerGroups.Entries[g][0];
+ for (i=0; i<PCB->LayerGroups.Number[g]; i++)
+ {
+ l = PCB->LayerGroups.Entries[g][i];
+ if (l >= 0 && l < max_layer)
+ {
+ *c = l;
+ if (PCB->Data->Layer[l].On)
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static int
SwapSides (int argc, char **argv, int x, int y)
{
int old_shown_side = Settings.ShowSolderSide;
int comp_group = GetLayerGroupNumberByNumber (max_layer + COMPONENT_LAYER);
int solder_group = GetLayerGroupNumberByNumber (max_layer + SOLDER_LAYER);
int active_group = GetLayerGroupNumberByNumber (LayerStack[0]);
- int comp_showing =
- PCB->Data->Layer[PCB->LayerGroups.Entries[comp_group][0]].On;
- int solder_showing =
- PCB->Data->Layer[PCB->LayerGroups.Entries[solder_group][0]].On;
+ int comp_layer;
+ int solder_layer;
+ int comp_showing = group_showing (comp_group, &comp_layer);
+ int solder_showing = group_showing (solder_group, &solder_layer);
if (argc > 0)
{
@@ -606,10 +624,8 @@ SwapSides (int argc, char **argv, int x, int y)
if (active_group == comp_group)
{
if (comp_showing && !solder_showing)
- ChangeGroupVisibility (PCB->LayerGroups.Entries[comp_group][0], 0,
- 0);
- ChangeGroupVisibility (PCB->LayerGroups.Entries[solder_group][0], 1,
- 1);
+ ChangeGroupVisibility (comp_layer, 0, 0);
+ ChangeGroupVisibility (solder_layer, 1, 1);
}
}
else
@@ -617,10 +633,8 @@ SwapSides (int argc, char **argv, int x, int y)
if (active_group == solder_group)
{
if (solder_showing && !comp_showing)
- ChangeGroupVisibility (PCB->LayerGroups.Entries[solder_group][0], 0,
- 0);
- ChangeGroupVisibility (PCB->LayerGroups.Entries[comp_group][0], 1,
- 1);
+ ChangeGroupVisibility (solder_layer, 0, 0);
+ ChangeGroupVisibility (comp_layer, 1, 1);
}
}
}
|
|
From: <gi...@gp...> - 2010-09-09 15:16:25
|
The branch, master has been updated
via 76dbbd1b14b75f455ccd80166c9e3f3830ec609a (commit)
via 4fa4c4be2ced2a5742f49373f6914a33bd2f845d (commit)
from e9f45c42af6fa5770186f44fb6be8a60f061dc93 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/find.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit 76dbbd1b14b75f455ccd80166c9e3f3830ec609a
Author: Ineiev <in...@gm...>
Commit: Peter Clifton <pc...@ca...>
find.c: Add RATLINE_TYPE to switch statement in BuildObjectList
Part of Ineiev's patch from:
http://archives.seul.org/geda/user/Nov-2009/msg00456.html
Modified-by: Peter Clifton <pc...@ca...>
:100644 100644 f682fd8... e00e2ad... M src/find.c
commit 4fa4c4be2ced2a5742f49373f6914a33bd2f845d
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Fix crash due to uninitalised variable in DRC check Bug #3033772
Andrew Armenia noted that the second pointer returned from
BuildObjectList(), "object_type_list" would be left uninitialised
if the object type was not encountered. A subsequent call to
free() in DRCFind() would then cause memory corruption.
The issue was originally reported by Ineiev:
http://archives.seul.org/geda/user/Nov-2009/msg00456.html
That patch addresses the lack of a RATLINE_TYPE in the BuildObjectType
function, but does not prevent a segfault for other unknown types.
:100644 100644 593be70... f682fd8... M src/find.c
=========
Changes
=========
commit 76dbbd1b14b75f455ccd80166c9e3f3830ec609a
Author: Ineiev <in...@gm...>
Commit: Peter Clifton <pc...@ca...>
find.c: Add RATLINE_TYPE to switch statement in BuildObjectList
Part of Ineiev's patch from:
http://archives.seul.org/geda/user/Nov-2009/msg00456.html
Modified-by: Peter Clifton <pc...@ca...>
diff --git a/src/find.c b/src/find.c
index f682fd8..e00e2ad 100644
--- a/src/find.c
+++ b/src/find.c
@@ -4493,6 +4493,7 @@ BuildObjectList (int *object_count, long int **object_id_list, int **object_type
case VIA_TYPE:
case PAD_TYPE:
case ELEMENT_TYPE:
+ case RATLINE_TYPE:
*object_count = 1;
*object_id_list = malloc (sizeof (long int));
*object_type_list = malloc (sizeof (int));
@@ -4501,7 +4502,9 @@ BuildObjectList (int *object_count, long int **object_id_list, int **object_type
return;
default:
- return;
+ fprintf (stderr,
+ _("Internal error in BuildObjectList: unknown object type %i\n"),
+ thing_type);
}
}
commit 4fa4c4be2ced2a5742f49373f6914a33bd2f845d
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Fix crash due to uninitalised variable in DRC check Bug #3033772
Andrew Armenia noted that the second pointer returned from
BuildObjectList(), "object_type_list" would be left uninitialised
if the object type was not encountered. A subsequent call to
free() in DRCFind() would then cause memory corruption.
The issue was originally reported by Ineiev:
http://archives.seul.org/geda/user/Nov-2009/msg00456.html
That patch addresses the lack of a RATLINE_TYPE in the BuildObjectType
function, but does not prevent a segfault for other unknown types.
diff --git a/src/find.c b/src/find.c
index 593be70..f682fd8 100644
--- a/src/find.c
+++ b/src/find.c
@@ -4482,6 +4482,7 @@ BuildObjectList (int *object_count, long int **object_id_list, int **object_type
{
*object_count = 0;
*object_id_list = NULL;
+ *object_type_list = NULL;
switch (thing_type)
{
|
|
From: <gi...@gp...> - 2010-09-09 02:07:12
|
The branch, master has been updated
via e9f45c42af6fa5770186f44fb6be8a60f061dc93 (commit)
via 1afc64a8f6d929e7c40c75032efcaa58334bfcb2 (commit)
from 9768e060fad7bc3dfc366da76ea1db8154005018 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/misc.c | 117 ++++++++++++++++++++++++++------------------------------
src/parse_y.y | 2 -
2 files changed, 54 insertions(+), 65 deletions(-)
=================
Commit Messages
=================
commit e9f45c42af6fa5770186f44fb6be8a60f061dc93
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Fix arc bounding box math.
Calculations for Arc bounding boxes weren't taking into account
the wide range of possible starting arcs. This patch uses modulus
to force angles into canonical forms and iterates through quadrants
to capture the full extents of each arc.
:100644 100644 5599d82... 34d103c... M src/misc.c
commit 1afc64a8f6d929e7c40c75032efcaa58334bfcb2
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Fix typo in parse_y.y
A typo in parse_y.y was causing the documentation to be corrupted.
:100644 100644 a5b2d23... f4fc367... M src/parse_y.y
=========
Changes
=========
commit e9f45c42af6fa5770186f44fb6be8a60f061dc93
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Fix arc bounding box math.
Calculations for Arc bounding boxes weren't taking into account
the wide range of possible starting arcs. This patch uses modulus
to force angles into canonical forms and iterates through quadrants
to capture the full extents of each arc.
diff --git a/src/misc.c b/src/misc.c
index 5599d82..34d103c 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1255,85 +1255,76 @@ void
SetArcBoundingBox (ArcTypePtr Arc)
{
register double ca1, ca2, sa1, sa2;
- register LocationType ang1, ang2;
+ double minx, maxx, miny, maxy;
+ register LocationType ang1, ang2, delta, a;
register LocationType width;
/* first put angles into standard form */
if (Arc->Delta > 360)
Arc->Delta = 360;
- ang1 = Arc->StartAngle;
- ang2 = Arc->StartAngle + Arc->Delta;
- if (Arc->Delta < 0)
+ if (Arc->Delta < -360)
+ Arc->Delta = -360;
+
+ if (Arc->Delta > 0)
{
- LocationType temp;
- temp = ang1;
- ang1 = ang2;
- ang2 = temp;
+ ang1 = Arc->StartAngle;
+ delta = Arc->Delta;
}
- if (ang1 < 0)
+ else
{
- ang1 += 360;
- ang2 += 360;
+ ang1 = Arc->StartAngle + Arc->Delta;
+ delta = -Arc->Delta;
}
+ if (ang1 < 0)
+ ang1 = 360 - ((-ang1) % 360);
+ else
+ ang1 = ang1 % 360;
+
+ ang2 = ang1 + delta;
+
/* calculate sines, cosines */
- switch (ang1)
- {
- case 0:
- ca1 = 1.0;
- sa1 = 0;
- break;
- case 90:
- ca1 = 0;
- sa1 = 1.0;
- break;
- case 180:
- ca1 = -1.0;
- sa1 = 0;
- break;
- case 270:
- ca1 = 0;
- sa1 = -1.0;
- break;
- default:
- ca1 = M180 * (double) ang1;
- sa1 = sin (ca1);
- ca1 = cos (ca1);
- }
- switch (ang2)
+ ca1 = M180 * (double) ang1;
+ sa1 = sin (ca1);
+ ca1 = cos (ca1);
+
+ minx = maxx = ca1;
+ miny = maxy = sa1;
+
+ ca2 = M180 * (double) ang2;
+ sa2 = sin (ca2);
+ ca2 = cos (ca2);
+
+ minx = MIN (minx, ca2);
+ maxx = MAX (maxx, ca2);
+ miny = MIN (miny, sa2);
+ maxy = MAX (maxy, sa2);
+
+ for (a = ang1 - ang1 % 90 + 90; a < ang2; a += 90)
{
- case 0:
- ca2 = 1.0;
- sa2 = 0;
- break;
- case 90:
- ca2 = 0;
- sa2 = 1.0;
- break;
- case 180:
- ca2 = -1.0;
- sa2 = 0;
- break;
- case 270:
- ca2 = 0;
- sa2 = -1.0;
- break;
- default:
- ca2 = M180 * (double) ang2;
- sa2 = sin (ca2);
- ca2 = cos (ca2);
+ switch (a % 360)
+ {
+ case 0:
+ maxx = 1;
+ break;
+ case 90:
+ maxy = 1;
+ break;
+ case 180:
+ minx = -1;
+ break;
+ case 270:
+ miny = -1;
+ break;
+ }
}
- Arc->BoundingBox.X2 = Arc->X - Arc->Width *
- ((ang1 < 180 && ang2 > 180) ? -1 : MIN (ca1, ca2));
+ Arc->BoundingBox.X2 = Arc->X - Arc->Width * minx;
- Arc->BoundingBox.X1 = Arc->X - Arc->Width *
- ((ang1 < 360 && ang2 > 360) ? 1 : MAX (ca1, ca2));
+ Arc->BoundingBox.X1 = Arc->X - Arc->Width * maxx;
- Arc->BoundingBox.Y2 = Arc->Y + Arc->Height *
- ((ang1 < 90 && ang2 > 90) ? 1 : MAX (sa1, sa2));
+ Arc->BoundingBox.Y2 = Arc->Y + Arc->Height * maxy;
- Arc->BoundingBox.Y1 = Arc->Y + Arc->Height *
- ((ang1 < 270 && ang2 > 270) ? -1 : MIN (sa1, sa2));
+ Arc->BoundingBox.Y1 = Arc->Y + Arc->Height * miny;
width = (Arc->Thickness + Arc->Clearance) / 2;
Arc->BoundingBox.X1 -= width;
commit 1afc64a8f6d929e7c40c75032efcaa58334bfcb2
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Fix typo in parse_y.y
A typo in parse_y.y was causing the documentation to be corrupted.
diff --git a/src/parse_y.y b/src/parse_y.y
index a5b2d23..f4fc367 100644
--- a/src/parse_y.y
+++ b/src/parse_y.y
@@ -278,8 +278,6 @@ T_FILEVERSION '[' NUMBER ']'
}
;
-/* %start-doc pcbfile Grid
-
/* %start-doc pcbfile PCB
@syntax
|
|
From: <gi...@gp...> - 2010-09-08 03:31:22
|
The branch, master has been updated
via 9768e060fad7bc3dfc366da76ea1db8154005018 (commit)
from ede84819b39e07be001791c243cceacb6d4a61ed (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gtkhid-main.c | 16 +++++++++++++---
src/hid/lesstif/main.c | 10 +++++++++-
2 files changed, 22 insertions(+), 4 deletions(-)
=================
Commit Messages
=================
commit 9768e060fad7bc3dfc366da76ea1db8154005018
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Fix layer visibility logic for some boards.
If the Groups() line listed the c/s layer before the copper layer,
disabling silk would also disable the copper. This change searches
the entire layer group looking for any layer that might need to be
drawn, and uses that as the exemplar instead of blindly choosing the
first layer in the list.
:100644 100644 8c3ff67... 58c2635... M src/hid/gtk/gtkhid-main.c
:100644 100644 3c4ef12... c270992... M src/hid/lesstif/main.c
=========
Changes
=========
commit 9768e060fad7bc3dfc366da76ea1db8154005018
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Fix layer visibility logic for some boards.
If the Groups() line listed the c/s layer before the copper layer,
disabling silk would also disable the copper. This change searches
the entire layer group looking for any layer that might need to be
drawn, and uses that as the exemplar instead of blindly choosing the
first layer in the list.
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 8c3ff67..58c2635 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -387,9 +387,19 @@ ghid_invalidate_all ()
int
ghid_set_layer (const char *name, int group, int empty)
{
- int idx = (group >= 0
- && group <
- max_layer) ? PCB->LayerGroups.Entries[group][0] : group;
+ int idx = group;
+ if (idx >= 0 && idx < max_layer)
+ {
+ int n = PCB->LayerGroups.Number[group];
+ for (idx = 0; idx < n-1; idx ++)
+ {
+ int ni = PCB->LayerGroups.Entries[group][idx];
+ if (ni >= 0 && ni < max_layer + 2
+ && PCB->Data->Layer[ni].On)
+ break;
+ }
+ idx = PCB->LayerGroups.Entries[group][idx];
+ }
if (idx >= 0 && idx < max_layer + 2)
return /*pinout ? 1 : */ PCB->Data->Layer[idx].On;
diff --git a/src/hid/lesstif/main.c b/src/hid/lesstif/main.c
index 3c4ef12..c270992 100644
--- a/src/hid/lesstif/main.c
+++ b/src/hid/lesstif/main.c
@@ -2814,7 +2814,15 @@ lesstif_set_layer (const char *name, int group, int empty)
int idx = group;
if (idx >= 0 && idx < max_layer)
{
- idx = PCB->LayerGroups.Entries[idx][0];
+ int n = PCB->LayerGroups.Number[group];
+ for (idx = 0; idx < n-1; idx ++)
+ {
+ int ni = PCB->LayerGroups.Entries[group][idx];
+ if (ni >= 0 && ni < max_layer + 2
+ && PCB->Data->Layer[ni].On)
+ break;
+ }
+ idx = PCB->LayerGroups.Entries[group][idx];
#if 0
if (idx == LayerStack[0]
|| GetLayerGroupNumberByNumber (idx) ==
|
|
From: <gi...@gp...> - 2010-09-01 19:15:32
|
The branch, master has been updated
via ede84819b39e07be001791c243cceacb6d4a61ed (commit)
via 945cfd557f973d46127038636805a18c96ad0572 (commit)
via a923d869c230bcc78799ed927cd390f9a15cbca9 (commit)
via ad57581a4a4674b8fec8f6a9f296bd71f751c1fc (commit)
via b0b6bf90b1cd78f9e8e850d26fb48ff9b1bb5088 (commit)
from 0a654a3009972f24a121e0d34d2b299190f44f05 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/action.c | 308 +++++++++++++++++++++++++++++++++++++++-------------
src/gpcb-menu.res | 8 ++
src/misc.c | 30 +++++-
src/misc.h | 4 +
src/pcb-menu.res | 8 ++
5 files changed, 278 insertions(+), 80 deletions(-)
=================
Commit Messages
=================
commit ede84819b39e07be001791c243cceacb6d4a61ed
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Add import settings to menus
At the bottom of the Settings menu, add a submenu for import settings
for placing new elements.
:100644 100644 e92a59a... bd9acac... M src/gpcb-menu.res
:100644 100644 1166439... dcba346... M src/pcb-menu.res
commit 945cfd557f973d46127038636805a18c96ad0572
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Store units for import::disperse
If the user specified the dispersement as "123mm" for example,
store that string as-is for convenience.
:100644 100644 595e103... 32e294c... M src/action.c
commit a923d869c230bcc78799ed927cd390f9a15cbca9
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Enhance GetValue
Allow cm and in as units. Allow the units to be part of the value
string or separate.
:100644 100644 55b5e63... 5599d82... M src/misc.c
commit ad57581a4a4674b8fec8f6a9f296bd71f751c1fc
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Add new-part-location to import
Adds import::newX, import::newY, and import::disperse attributes.
These determine where new parts are located when they're added to
the layout, including some random variation to keep them from being
all on exactly the same spot. Parameters were added to Import()
to set these:
In @code{Import()} is called with @code{setnewpoint} then the location
of new components can be specified. This is where parts show up when
they're added to the board. The default is the center of the board.
@table @code
@item Import(setnewpoint)
Prompts the user to click on the board somewhere, uses that point. If
called by a hotkey, uses the current location of the crosshair.
@item Import(setnewpoint,mark)
Uses the location of the mark. If no mark is present, the point is
not changed.
@item Import(setnewpoint,center)
Resets the point to the center of the board.
@item Import(setnewpoint,X,Y,units)
Sets the point to the specific coordinates given. Example:
@code{Import(setnewpoint,50,25,mm)}
@end table
Note that the X and Y locations are stored in attributes named
@code{import::newX} and @code{import::newY} so you could change them
manually if you wished.
Calling @code{Import(setdisperse,D,units)} sets how much the newly
placed elements are dispersed relative to the set point. For example,
@code{Import(setdisperse,10,mm)} will offset each part randomly up to
10mm away from the point. The default dispersion is 1/10th of the
smallest board dimension. Dispersion is saved in the
@code{import::disperse} attribute.
:100644 100644 0a85391... 595e103... M src/action.c
commit b0b6bf90b1cd78f9e8e850d26fb48ff9b1bb5088
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Add AttributeRemove functions
Add AttributeRemoveFromList() and the wrapper AttributeRemove()
:100644 100644 dfbb1d7... 55b5e63... M src/misc.c
:100644 100644 d58e12e... bb88a21... M src/misc.h
=========
Changes
=========
commit ede84819b39e07be001791c243cceacb6d4a61ed
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Add import settings to menus
At the bottom of the Settings menu, add a submenu for import settings
for placing new elements.
diff --git a/src/gpcb-menu.res b/src/gpcb-menu.res
index e92a59a..bd9acac 100644
--- a/src/gpcb-menu.res
+++ b/src/gpcb-menu.res
@@ -217,6 +217,14 @@ MainMenu =
{"Check polygons" checked=checkplanes Display(ToggleCheckPlanes)}
-
{"Vendor drill mapping" ToggleVendor() checked=VendorMapOn}
+ {"Import Settings"
+ {"New elements added at..." foreground=grey50 sensitive=false}
+ {" Center" Import(setnewpoint,center)}
+ {" Mark" Import(setnewpoint,mark)}
+ {" Crosshair" Import(setnewpoint)}
+ -
+ {"Set Dispersion" Import(setdisperse)}
+ }
}
#
diff --git a/src/pcb-menu.res b/src/pcb-menu.res
index 1166439..dcba346 100644
--- a/src/pcb-menu.res
+++ b/src/pcb-menu.res
@@ -212,6 +212,14 @@ MainMenu =
{"Pinout shows number" checked=shownumber Display(ToggleName)}
{"Pins/Via show Name/Number" Display(PinOrPadName) a={"D" "<Key>d"}}
{"Enable vendor drill mapping" ToggleVendor() checked=VendorMapOn}
+ {"Import Settings"
+ {"New elements added at..." foreground=grey50 sensitive=false}
+ {" Center" Import(setnewpoint,center)}
+ {" Mark" Import(setnewpoint,mark)}
+ {" Crosshair" Import(setnewpoint)}
+ -
+ {"Set Dispersion" Import(setdisperse)}
+ }
}
{Select
commit 945cfd557f973d46127038636805a18c96ad0572
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Store units for import::disperse
If the user specified the dispersement as "123mm" for example,
store that string as-is for convenience.
diff --git a/src/action.c b/src/action.c
index 595e103..32e294c 100644
--- a/src/action.c
+++ b/src/action.c
@@ -7603,17 +7603,23 @@ ActionImport (int argc, char **argv, int x, int y)
{
const char *ds, *units;
int d, r;
+ char buf[50];
ds = ARG (1);
units = ARG (2);
- if (ds)
+ if (!ds)
+ {
+ const char *as = AttributeGet (PCB, "import::disperse");
+ ds = gui->prompt_for("Enter dispersion:", as ? as : "0");
+ }
+ if (units)
{
- char buf[50];
- d = GetValue (ds, units, &r);
- sprintf (buf, "%d", d);
+ sprintf(buf, "%s%s", ds, units);
AttributePut (PCB, "import::disperse", buf);
- return 0;
}
+ else
+ AttributePut (PCB, "import::disperse", ds);
+ return 0;
}
if (mode && strcasecmp (mode, "setnewpoint") == 0)
commit a923d869c230bcc78799ed927cd390f9a15cbca9
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Enhance GetValue
Allow cm and in as units. Allow the units to be part of the value
string or separate.
diff --git a/src/misc.c b/src/misc.c
index 55b5e63..5599d82 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -110,7 +110,8 @@ static struct
float
GetValue (char *val, char *units, bool * absolute)
{
- float value;
+ double value;
+ int n = -1;
/* if the first character is a sign we have to add the
* value to the current one
@@ -118,7 +119,8 @@ GetValue (char *val, char *units, bool * absolute)
if (*val == '=')
{
*absolute = true;
- value = atof (val + 1);
+ sscanf (val+1, "%lf%n", &value, &n);
+ n++;
}
else
{
@@ -126,14 +128,21 @@ GetValue (char *val, char *units, bool * absolute)
*absolute = true;
else
*absolute = false;
- value = atof (val);
+ sscanf (val, "%lf%n", &value, &n);
}
+ if (!units && n > 0)
+ units = val + n;
+
if (units && *units)
{
if (strncasecmp (units, "mm", 2) == 0)
value *= MM_TO_COOR;
+ else if (strncasecmp (units, "cm", 2) == 0)
+ value *= MM_TO_COOR * 10;
else if (strncasecmp (units, "mil", 3) == 0)
value *= 100;
+ else if (strncasecmp (units, "in", 3) == 0)
+ value *= 100000;
}
return value;
}
commit ad57581a4a4674b8fec8f6a9f296bd71f751c1fc
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Add new-part-location to import
Adds import::newX, import::newY, and import::disperse attributes.
These determine where new parts are located when they're added to
the layout, including some random variation to keep them from being
all on exactly the same spot. Parameters were added to Import()
to set these:
In @code{Import()} is called with @code{setnewpoint} then the location
of new components can be specified. This is where parts show up when
they're added to the board. The default is the center of the board.
@table @code
@item Import(setnewpoint)
Prompts the user to click on the board somewhere, uses that point. If
called by a hotkey, uses the current location of the crosshair.
@item Import(setnewpoint,mark)
Uses the location of the mark. If no mark is present, the point is
not changed.
@item Import(setnewpoint,center)
Resets the point to the center of the board.
@item Import(setnewpoint,X,Y,units)
Sets the point to the specific coordinates given. Example:
@code{Import(setnewpoint,50,25,mm)}
@end table
Note that the X and Y locations are stored in attributes named
@code{import::newX} and @code{import::newY} so you could change them
manually if you wished.
Calling @code{Import(setdisperse,D,units)} sets how much the newly
placed elements are dispersed relative to the set point. For example,
@code{Import(setdisperse,10,mm)} will offset each part randomly up to
10mm away from the point. The default dispersion is 1/10th of the
smallest board dimension. Dispersion is saved in the
@code{import::disperse} attribute.
diff --git a/src/action.c b/src/action.c
index 0a85391..595e103 100644
--- a/src/action.c
+++ b/src/action.c
@@ -7009,6 +7009,24 @@ them.
%end-doc */
static int
+parse_layout_attribute_units (char *name, int def)
+{
+ const char *as, *units = NULL;
+ int n = 0, v, r;
+
+ as = AttributeGet (PCB, name);
+ if (!as)
+ return def;
+
+ sscanf (as, "%d%n", &v, &n);
+ units = as + n;
+ if (! *units)
+ units = NULL;
+ v = GetValue (as, units, &r);
+ return v;
+}
+
+static int
ActionElementList (int argc, char **argv, int x, int y)
{
ElementType *e = NULL;
@@ -7076,14 +7094,38 @@ ActionElementList (int argc, char **argv, int x, int y)
if (!e)
{
+ int nx, ny, d;
+ char *as;
+
#ifdef DEBUG
printf(" ... Footprint not on board, need to add it.\n");
#endif
/* Not on board, need to add it. */
if (LoadFootprint(argc, args, x, y))
return 1;
+
+ nx = PCB->MaxWidth / 2;
+ ny = PCB->MaxHeight / 2;
+ d = MIN (PCB->MaxWidth, PCB->MaxHeight) / 10;
+
+ nx = parse_layout_attribute_units ("import::newX", nx);
+ ny = parse_layout_attribute_units ("import::newY", ny);
+ d = parse_layout_attribute_units ("import::disperse", d);
+
+ nx += random () % (d*2) - d;
+ ny += random () % (d*2) - d;
+
+ if (nx < 0)
+ nx = 0;
+ if (nx >= PCB->MaxWidth)
+ nx = PCB->MaxWidth - 1;
+ if (ny < 0)
+ ny = 0;
+ if (ny >= PCB->MaxHeight)
+ ny = PCB->MaxHeight - 1;
+
/* Place components onto center of board. */
- if (CopyPastebufferToLayout (PCB->MaxWidth/2, PCB->MaxHeight/2))
+ if (CopyPastebufferToLayout (nx, ny))
SetChangedFlag (true);
}
@@ -7236,82 +7278,6 @@ ActionExecCommand (int argc, char **argv, int x, int y)
}
/* ---------------------------------------------------------------- */
-static const char import_syntax[] =
- "Import()\n"
- "Import([gnetlist|make[,source,source,...]])\n";
-
-static const char import_help[] = "Import schematics";
-
-/* %start-doc actions Import
-
-Imports element and netlist data from the schematics (or some other
-source). The first parameter, which is optional, is the mode. If not
-specified, the @code{import::mode} attribute in the PCB is used.
-@code{gnetlist} means gnetlist is used to obtain the information from
-the schematics. @code{make} invokes @code{make}, assuming the user
-has a @code{Makefile} in the current directory. The @code{Makefile}
-will be invoked with the following variables set:
-
-@table @code
-
-@item PCB
-The name of the .pcb file
-
-@item SRCLIST
-A space-separated list of source files
-
-@item OUT
-The name of the file in which to put the command script, which may
-contain any @pcb{} actions. By default, this is a temporary file
-selected by @pcb{}, but if you specify an @code{import::outfile}
-attribute, that file name is used instead (and not automatically
-deleted afterwards).
-
-@end table
-
-The target specified to be built is the first of these that apply:
-
-@itemize @bullet
-
-@item
-The target specified by an @code{import::target} attribute.
-
-@item
-The output file specified by an @code{import::outfile} attribute.
-
-@item
-If nothing else is specified, the target is @code{pcb_import}.
-
-@end itemize
-
-If you specify an @code{import::makefile} attribute, then "-f <that
-file>" will be added to the command line.
-
-If you specify the mode, you may also specify the source files
-(schematics). If you do not specify any, the list of schematics is
-obtained by reading the @code{import::src@var{N}} attributes (like
-@code{import::src0}, @code{import::src1}, etc).
-
-For compatibility with future extensions to the import file format,
-the generated file @emph{must not} start with the two characters
-@code{#%}.
-
-If a temporary file is needed the @code{TMPDIR} environment variable
-is used to select its location.
-
-Note that the programs @code{gnetlist} and @code{make} may be
-overridden by the user via the @code{make-program} and @code{gnetlist}
-@code{pcb} settings (i.e. in @code{~/.pcb/settings} or on the command
-line).
-
-If @pcb{} cannot determine which schematic(s) to import from, the GUI
-is called to let user choose (see @code{ImportGUI()}).
-
-Note that Import() doesn't delete anything - after an Import, elements
-which shouldn't be on the board are selected and may be removed once
-it's determined that the deletion is appropriate.
-
-%end-doc */
static int
pcb_spawnvp (char **argv)
@@ -7503,6 +7469,123 @@ tempfile_unlink (char * name)
}
/* ---------------------------------------------------------------- */
+static const char import_syntax[] =
+ "Import()\n"
+ "Import([gnetlist|make[,source,source,...]])\n"
+ "Import(setnewpoint[,(mark|center|X,Y)])\n"
+ "Import(setdisperse,D,units)\n";
+
+static const char import_help[] = "Import schematics";
+
+/* %start-doc actions Import
+
+Imports element and netlist data from the schematics (or some other
+source). The first parameter, which is optional, is the mode. If not
+specified, the @code{import::mode} attribute in the PCB is used.
+@code{gnetlist} means gnetlist is used to obtain the information from
+the schematics. @code{make} invokes @code{make}, assuming the user
+has a @code{Makefile} in the current directory. The @code{Makefile}
+will be invoked with the following variables set:
+
+@table @code
+
+@item PCB
+The name of the .pcb file
+
+@item SRCLIST
+A space-separated list of source files
+
+@item OUT
+The name of the file in which to put the command script, which may
+contain any @pcb{} actions. By default, this is a temporary file
+selected by @pcb{}, but if you specify an @code{import::outfile}
+attribute, that file name is used instead (and not automatically
+deleted afterwards).
+
+@end table
+
+The target specified to be built is the first of these that apply:
+
+@itemize @bullet
+
+@item
+The target specified by an @code{import::target} attribute.
+
+@item
+The output file specified by an @code{import::outfile} attribute.
+
+@item
+If nothing else is specified, the target is @code{pcb_import}.
+
+@end itemize
+
+If you specify an @code{import::makefile} attribute, then "-f <that
+file>" will be added to the command line.
+
+If you specify the mode, you may also specify the source files
+(schematics). If you do not specify any, the list of schematics is
+obtained by reading the @code{import::src@var{N}} attributes (like
+@code{import::src0}, @code{import::src1}, etc).
+
+For compatibility with future extensions to the import file format,
+the generated file @emph{must not} start with the two characters
+@code{#%}.
+
+If a temporary file is needed the @code{TMPDIR} environment variable
+is used to select its location.
+
+Note that the programs @code{gnetlist} and @code{make} may be
+overridden by the user via the @code{make-program} and @code{gnetlist}
+@code{pcb} settings (i.e. in @code{~/.pcb/settings} or on the command
+line).
+
+If @pcb{} cannot determine which schematic(s) to import from, the GUI
+is called to let user choose (see @code{ImportGUI()}).
+
+Note that Import() doesn't delete anything - after an Import, elements
+which shouldn't be on the board are selected and may be removed once
+it's determined that the deletion is appropriate.
+
+In @code{Import()} is called with @code{setnewpoint} then the location
+of new components can be specified. This is where parts show up when
+they're added to the board. The default is the center of the board.
+
+@table @code
+
+@item Import(setnewpoint)
+
+Prompts the user to click on the board somewhere, uses that point. If
+called by a hotkey, uses the current location of the crosshair.
+
+@item Import(setnewpoint,mark)
+
+Uses the location of the mark. If no mark is present, the point is
+not changed.
+
+@item Import(setnewpoint,center)
+
+Resets the point to the center of the board.
+
+@item Import(setnewpoint,X,Y,units)
+
+Sets the point to the specific coordinates given. Example:
+@code{Import(setnewpoint,50,25,mm)}
+
+@end table
+
+Note that the X and Y locations are stored in attributes named
+@code{import::newX} and @code{import::newY} so you could change them
+manually if you wished.
+
+Calling @code{Import(setdisperse,D,units)} sets how much the newly
+placed elements are dispersed relative to the set point. For example,
+@code{Import(setdisperse,10,mm)} will offset each part randomly up to
+10mm away from the point. The default dispersion is 1/10th of the
+smallest board dimension. Dispersion is saved in the
+@code{import::disperse} attribute.
+
+%end-doc */
+
static int
ActionImport (int argc, char **argv, int x, int y)
{
@@ -7515,6 +7598,71 @@ ActionImport (int argc, char **argv, int x, int y)
#endif
mode = ARG (0);
+
+ if (mode && strcasecmp (mode, "setdisperse") == 0)
+ {
+ const char *ds, *units;
+ int d, r;
+
+ ds = ARG (1);
+ units = ARG (2);
+ if (ds)
+ {
+ char buf[50];
+ d = GetValue (ds, units, &r);
+ sprintf (buf, "%d", d);
+ AttributePut (PCB, "import::disperse", buf);
+ return 0;
+ }
+ }
+
+ if (mode && strcasecmp (mode, "setnewpoint") == 0)
+ {
+ const char *xs, *ys, *units;
+ int x, y;
+ char buf[50];
+
+ xs = ARG (1);
+ ys = ARG (2);
+ units = ARG (3);
+
+ if (!xs)
+ {
+ gui->get_coords (_("Click on a location"), &x, &y);
+ }
+ else if (strcasecmp (xs, "center") == 0)
+ {
+ AttributeRemove (PCB, "import::newX");
+ AttributeRemove (PCB, "import::newY");
+ return;
+ }
+ else if (strcasecmp (xs, "mark") == 0)
+ {
+ if (Marked.status)
+ {
+ x = Marked.X;
+ y = Marked.Y;
+ }
+ }
+ else if (ys)
+ {
+ int r;
+ x = GetValue (xs, units, &r);
+ y = GetValue (ys, units, &r);
+ }
+ else
+ {
+ Message ("Bad syntax for Import(setnewpoint)");
+ return 1;
+ }
+
+ sprintf (buf, "%d", x);
+ AttributePut (PCB, "import::newX", buf);
+ sprintf (buf, "%d", y);
+ AttributePut (PCB, "import::newY", buf);
+ return 0;
+ }
+
if (! mode)
mode = AttributeGet (PCB, "import::mode");
if (! mode)
commit b0b6bf90b1cd78f9e8e850d26fb48ff9b1bb5088
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Add AttributeRemove functions
Add AttributeRemoveFromList() and the wrapper AttributeRemove()
diff --git a/src/misc.c b/src/misc.c
index dfbb1d7..55b5e63 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1919,6 +1919,21 @@ AttributePutToList (AttributeListType *list, char *name, char *value, int replac
return 0;
}
+void
+AttributeRemoveFromList(AttributeListType *list, char *name)
+{
+ int i, j;
+ for (i=0; i<list->Number; i++)
+ if (strcmp (name, list->List[i].name) == 0)
+ {
+ free (list->List[i].name);
+ free (list->List[i].value);
+ for (j=i; j<list->Number-i; j++)
+ list->List[j] = list->List[j+1];
+ list->Number --;
+ }
+}
+
const char *
diff --git a/src/misc.h b/src/misc.h
index d58e12e..bb88a21 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -91,6 +91,10 @@ int AttributePutToList (AttributeListType *list, char *name, char *value, int re
#define AttributeGet(OBJ,name) AttributeGetFromList (&(OBJ->Attributes), name)
/* Simplistic version: Takes a pointer to an object, sets attributes in it. */
#define AttributePut(OBJ,name,value) AttributePutToList (&(OBJ->Attributes), name, value, 1)
+/* Remove an attribute by name. */
+void AttributeRemoveFromList(AttributeListType *list, char *name);
+/* Simplistic version of Remove. */
+#define AttributeRemove(OBJ, name) AttributeRemoveFromList (&(OBJ->Attributes), name)
/* For passing modified flags to other functions. */
FlagType MakeFlags (unsigned int);
|
|
From: <gi...@gp...> - 2010-08-28 02:19:03
|
The branch, master has been updated
via 0a654a3009972f24a121e0d34d2b299190f44f05 (commit)
via 1f12bf6731eef9d8dbebcf3910d43da3e58561bb (commit)
from 43c21e3578e828fa63416e763f8267b1479a79c4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gui-top-window.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
=================
Commit Messages
=================
commit 0a654a3009972f24a121e0d34d2b299190f44f05
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove unused colour allocation for "BlackPixel"
:100644 100644 9fd146e... 76ac977... M src/hid/gtk/gui-top-window.c
commit 1f12bf6731eef9d8dbebcf3910d43da3e58561bb
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove unused extern HID ghid_hid from gui-top-window.c
:100644 100644 3d3896f... 9fd146e... M src/hid/gtk/gui-top-window.c
=========
Changes
=========
commit 0a654a3009972f24a121e0d34d2b299190f44f05
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove unused colour allocation for "BlackPixel"
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 9fd146e..76ac977 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -222,7 +222,7 @@ GhidGui _ghidgui, *ghidgui = NULL;
GHidPort ghid_port, *gport;
-static GdkColor WhitePixel, BlackPixel;
+static GdkColor WhitePixel;
static gchar *bg_image_file;
@@ -2502,7 +2502,6 @@ ghid_create_pcb_widgets (void)
GError *err = NULL;
gdk_color_parse ("white", &WhitePixel);
- gdk_color_parse ("black", &BlackPixel);
if (bg_image_file)
ghidgui->bg_pixbuf = gdk_pixbuf_new_from_file(bg_image_file, &err);
commit 1f12bf6731eef9d8dbebcf3910d43da3e58561bb
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove unused extern HID ghid_hid from gui-top-window.c
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 3d3896f..9fd146e 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -218,8 +218,6 @@ static ToggleFlagType *tflags = 0;
static int n_tflags = 0;
static int max_tflags = 0;
-extern HID ghid_hid;
-
GhidGui _ghidgui, *ghidgui = NULL;
GHidPort ghid_port, *gport;
|
|
From: <gi...@gp...> - 2010-08-25 17:48:54
|
The branch, master has been updated
via 43c21e3578e828fa63416e763f8267b1479a79c4 (commit)
from f44e131e610bded26cf7ac6ef5c955a916df5f03 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/draw.c | 29 -----------------------------
1 files changed, 0 insertions(+), 29 deletions(-)
=================
Commit Messages
=================
commit 43c21e3578e828fa63416e763f8267b1479a79c4
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
draw.c: Remove the unused "Erasing" flag / counter
This variable tracks whether the object being drawn is to be erased.
It is never actually tested, so remove it.
:100644 100644 a763d3c... 1a576bc... M src/draw.c
=========
Changes
=========
commit 43c21e3578e828fa63416e763f8267b1479a79c4
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
draw.c: Remove the unused "Erasing" flag / counter
This variable tracks whether the object being drawn is to be erased.
It is never actually tested, so remove it.
diff --git a/src/draw.c b/src/draw.c
index a763d3c..1a576bc 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -77,7 +77,6 @@ FloatPolyType, *FloatPolyTypePtr;
*/
static BoxType Block;
static bool Gathering = true;
-static int Erasing = 0;
static int doing_pinout = 0;
static bool doing_assy = false;
@@ -2092,12 +2091,10 @@ DrawElementPinsAndPads (ElementTypePtr Element, int unused)
void
EraseVia (PinTypePtr Via)
{
- Erasing++;
gui->set_color (Output.fgGC, Settings.BackgroundColor);
DrawPinOrViaLowLevel (Via, false);
if (TEST_FLAG (DISPLAYNAMEFLAG, Via))
DrawPinOrViaNameLowLevel (Via);
- Erasing--;
}
/* ---------------------------------------------------------------------------
@@ -2106,7 +2103,6 @@ EraseVia (PinTypePtr Via)
void
EraseRat (RatTypePtr Rat)
{
- Erasing++;
gui->set_color (Output.fgGC, Settings.BackgroundColor);
if (TEST_FLAG(VIAFLAG, Rat))
{
@@ -2121,7 +2117,6 @@ EraseRat (RatTypePtr Rat)
}
else
DrawLineLowLevel ((LineTypePtr) Rat);
- Erasing--;
}
@@ -2131,10 +2126,8 @@ EraseRat (RatTypePtr Rat)
void
EraseViaName (PinTypePtr Via)
{
- Erasing++;
gui->set_color (Output.fgGC, Settings.BackgroundColor);
DrawPinOrViaNameLowLevel (Via);
- Erasing--;
}
/* ---------------------------------------------------------------------------
@@ -2143,12 +2136,10 @@ EraseViaName (PinTypePtr Via)
void
ErasePad (PadTypePtr Pad)
{
- Erasing++;
gui->set_color (Output.fgGC, Settings.BackgroundColor);
DrawPadLowLevel (Output.fgGC, Pad, false, false);
if (TEST_FLAG (DISPLAYNAMEFLAG, Pad))
DrawPadNameLowLevel (Pad);
- Erasing--;
}
/* ---------------------------------------------------------------------------
@@ -2157,10 +2148,8 @@ ErasePad (PadTypePtr Pad)
void
ErasePadName (PadTypePtr Pad)
{
- Erasing++;
gui->set_color (Output.fgGC, Settings.BackgroundColor);
DrawPadNameLowLevel (Pad);
- Erasing--;
}
/* ---------------------------------------------------------------------------
@@ -2169,12 +2158,10 @@ ErasePadName (PadTypePtr Pad)
void
ErasePin (PinTypePtr Pin)
{
- Erasing++;
gui->set_color (Output.fgGC, Settings.BackgroundColor);
DrawPinOrViaLowLevel (Pin, false);
if (TEST_FLAG (DISPLAYNAMEFLAG, Pin))
DrawPinOrViaNameLowLevel (Pin);
- Erasing--;
}
/* ---------------------------------------------------------------------------
@@ -2183,10 +2170,8 @@ ErasePin (PinTypePtr Pin)
void
ErasePinName (PinTypePtr Pin)
{
- Erasing++;
gui->set_color (Output.fgGC, Settings.BackgroundColor);
DrawPinOrViaNameLowLevel (Pin);
- Erasing--;
}
/* ---------------------------------------------------------------------------
@@ -2195,10 +2180,8 @@ ErasePinName (PinTypePtr Pin)
void
EraseLine (LineTypePtr Line)
{
- Erasing++;
gui->set_color (Output.fgGC, Settings.BackgroundColor);
DrawLineLowLevel (Line);
- Erasing--;
}
/* ---------------------------------------------------------------------------
@@ -2209,10 +2192,8 @@ EraseArc (ArcTypePtr Arc)
{
if (!Arc->Thickness)
return;
- Erasing++;
gui->set_color (Output.fgGC, Settings.BackgroundColor);
DrawArcLowLevel (Arc);
- Erasing--;
}
/* ---------------------------------------------------------------------------
@@ -2222,7 +2203,6 @@ void
EraseText (LayerTypePtr Layer, TextTypePtr Text)
{
int min_silk_line;
- Erasing++;
gui->set_color (Output.fgGC, Settings.BackgroundColor);
if (Layer == & PCB->Data->SILKLAYER
|| Layer == & PCB->Data->BACKSILKLAYER)
@@ -2230,7 +2210,6 @@ EraseText (LayerTypePtr Layer, TextTypePtr Text)
else
min_silk_line = PCB->minWid;
DrawTextLowLevel (Text, min_silk_line);
- Erasing--;
}
/* ---------------------------------------------------------------------------
@@ -2239,10 +2218,8 @@ EraseText (LayerTypePtr Layer, TextTypePtr Text)
void
ErasePolygon (PolygonTypePtr Polygon)
{
- Erasing++;
gui->set_color (Output.fgGC, Settings.BackgroundColor);
DrawPolygonLowLevel (Polygon);
- Erasing--;
}
/* ---------------------------------------------------------------------------
@@ -2251,7 +2228,6 @@ ErasePolygon (PolygonTypePtr Polygon)
void
EraseElement (ElementTypePtr Element)
{
- Erasing++;
/* set color and draw lines, arcs, text and pins */
gui->set_color (Output.fgGC, Settings.BackgroundColor);
ELEMENTLINE_LOOP (Element);
@@ -2267,7 +2243,6 @@ EraseElement (ElementTypePtr Element)
if (!TEST_FLAG (HIDENAMEFLAG, Element))
DrawTextLowLevel (&ELEMENT_TEXT (PCB, Element), PCB->minSlk);
EraseElementPinsAndPads (Element);
- Erasing--;
}
/* ---------------------------------------------------------------------------
@@ -2276,7 +2251,6 @@ EraseElement (ElementTypePtr Element)
void
EraseElementPinsAndPads (ElementTypePtr Element)
{
- Erasing++;
gui->set_color (Output.fgGC, Settings.BackgroundColor);
PIN_LOOP (Element);
{
@@ -2292,7 +2266,6 @@ EraseElementPinsAndPads (ElementTypePtr Element)
DrawPadNameLowLevel (pad);
}
END_LOOP;
- Erasing--;
}
/* ---------------------------------------------------------------------------
@@ -2303,10 +2276,8 @@ EraseElementName (ElementTypePtr Element)
{
if (TEST_FLAG (HIDENAMEFLAG, Element))
return;
- Erasing++;
gui->set_color (Output.fgGC, Settings.BackgroundColor);
DrawTextLowLevel (&ELEMENT_TEXT (PCB, Element), PCB->minSlk);
- Erasing--;
}
|
|
From: <gi...@gp...> - 2010-08-25 17:36:39
|
The branch, master has been updated
via f44e131e610bded26cf7ac6ef5c955a916df5f03 (commit)
via f096227f70f76d813b6d07494617ce66715c9c9b (commit)
via 6eb1db9998872af14b89eafc26b9741caaf074c8 (commit)
from 6438ea7a47f0179564644cf5aa570bda70c07661 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/data.c | 1 -
src/data.h | 2 --
src/draw.c | 32 +++++++++++++-------------------
3 files changed, 13 insertions(+), 22 deletions(-)
=================
Commit Messages
=================
commit f44e131e610bded26cf7ac6ef5c955a916df5f03
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
draw.c: Initialise integer counters with 0, not "false".
For the "doing_assy" flag, fix its type to "bool" rather than "int".
:100644 100644 03724f5... a763d3c... M src/draw.c
commit f096227f70f76d813b6d07494617ce66715c9c9b
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
draw.c: Remove "HaveGathered" parameter from DrawLineLowLevel()
This is superflous, as it is only passed as TRUE when the Gathering
variable it overrides is known to be FALSE anyway.
:100644 100644 7311fb6... 03724f5... M src/draw.c
commit 6eb1db9998872af14b89eafc26b9741caaf074c8
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Remove unused global variable "render", and "extern bool RedrawOnEnter"
The "render" variable was set and reset, but was not used anywhere.
:100644 100644 d07413f... 73e53f2... M src/data.c
:100644 100644 101e3db... ce27339... M src/data.h
:100644 100644 1bbbaa1... 7311fb6... M src/draw.c
=========
Changes
=========
commit f44e131e610bded26cf7ac6ef5c955a916df5f03
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
draw.c: Initialise integer counters with 0, not "false".
For the "doing_assy" flag, fix its type to "bool" rather than "int".
diff --git a/src/draw.c b/src/draw.c
index 03724f5..a763d3c 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -77,10 +77,10 @@ FloatPolyType, *FloatPolyTypePtr;
*/
static BoxType Block;
static bool Gathering = true;
-static int Erasing = false;
+static int Erasing = 0;
-static int doing_pinout = false;
-static int doing_assy = false;
+static int doing_pinout = 0;
+static bool doing_assy = false;
static const BoxType *clip_box = NULL;
/* ---------------------------------------------------------------------------
commit f096227f70f76d813b6d07494617ce66715c9c9b
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
draw.c: Remove "HaveGathered" parameter from DrawLineLowLevel()
This is superflous, as it is only passed as TRUE when the Gathering
variable it overrides is known to be FALSE anyway.
diff --git a/src/draw.c b/src/draw.c
index 7311fb6..03724f5 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -97,7 +97,7 @@ static void DrawPlainVia (PinTypePtr, bool);
static void DrawPinOrViaNameLowLevel (PinTypePtr);
static void DrawPadLowLevel (hidGC, PadTypePtr, bool, bool);
static void DrawPadNameLowLevel (PadTypePtr);
-static void DrawLineLowLevel (LineTypePtr, bool);
+static void DrawLineLowLevel (LineTypePtr);
static void DrawRegularText (LayerTypePtr, TextTypePtr, int);
static void DrawPolygonLowLevel (PolygonTypePtr);
static void DrawArcLowLevel (ArcTypePtr);
@@ -1497,9 +1497,9 @@ ClearPad (PadTypePtr Pad, bool mask)
* lowlevel drawing routine for lines
*/
static void
-DrawLineLowLevel (LineTypePtr Line, bool HaveGathered)
+DrawLineLowLevel (LineTypePtr Line)
{
- if (Gathering && !HaveGathered)
+ if (Gathering)
{
AddPart (Line);
return;
@@ -1570,7 +1570,7 @@ DrawTextLowLevel (TextTypePtr Text, int min_line_width)
newline.Point1.Y += Text->Y;
newline.Point2.X += Text->X;
newline.Point2.Y += Text->Y;
- DrawLineLowLevel (&newline, true);
+ DrawLineLowLevel (&newline);
}
/* move on to next cursor position */
@@ -1656,7 +1656,7 @@ DrawElementPackageLowLevel (ElementTypePtr Element, int unused)
/* draw lines, arcs, text and pins */
ELEMENTLINE_LOOP (Element);
{
- DrawLineLowLevel (line, false);
+ DrawLineLowLevel (line);
}
END_LOOP;
ARC_LOOP (Element);
@@ -1818,7 +1818,7 @@ DrawLine (LayerTypePtr Layer, LineTypePtr Line, int unused)
else
gui->set_color (Output.fgGC, Layer->Color);
}
- DrawLineLowLevel (Line, false);
+ DrawLineLowLevel (Line);
}
/* ---------------------------------------------------------------------------
@@ -1867,7 +1867,7 @@ DrawRat (RatTypePtr Line, int unused)
}
}
else
- DrawLineLowLevel ((LineTypePtr) Line, false);
+ DrawLineLowLevel ((LineTypePtr) Line);
}
/* ---------------------------------------------------------------------------
@@ -2120,7 +2120,7 @@ EraseRat (RatTypePtr Rat)
w * 2, w * 2, 0, 360);
}
else
- DrawLineLowLevel ((LineTypePtr) Rat, false);
+ DrawLineLowLevel ((LineTypePtr) Rat);
Erasing--;
}
@@ -2197,7 +2197,7 @@ EraseLine (LineTypePtr Line)
{
Erasing++;
gui->set_color (Output.fgGC, Settings.BackgroundColor);
- DrawLineLowLevel (Line, false);
+ DrawLineLowLevel (Line);
Erasing--;
}
@@ -2256,7 +2256,7 @@ EraseElement (ElementTypePtr Element)
gui->set_color (Output.fgGC, Settings.BackgroundColor);
ELEMENTLINE_LOOP (Element);
{
- DrawLineLowLevel (line, false);
+ DrawLineLowLevel (line);
}
END_LOOP;
ARC_LOOP (Element);
commit 6eb1db9998872af14b89eafc26b9741caaf074c8
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Remove unused global variable "render", and "extern bool RedrawOnEnter"
The "render" variable was set and reset, but was not used anywhere.
diff --git a/src/data.c b/src/data.c
index d07413f..73e53f2 100644
--- a/src/data.c
+++ b/src/data.c
@@ -56,7 +56,6 @@ int LayerStack[MAX_LAYER]; /* determines the layer draw order */
BufferType Buffers[MAX_BUFFER]; /* my buffers */
LibraryType Library; /* the library */
bool Bumped; /* if the undo serial number has changed */
-bool render; /* whether or not to re-render the pixmap */
LocationType Xorig, Yorig; /* origin offset for drawing in pixmap */
diff --git a/src/data.h b/src/data.h
index 101e3db..ce27339 100644
--- a/src/data.h
+++ b/src/data.h
@@ -68,8 +68,6 @@ extern char *InputTranslations;
extern int addedLines;
extern int LayerStack[MAX_LAYER];
-extern bool RedrawOnEnter;
-extern bool render;
extern bool Bumped;
extern FlagType no_flags;
diff --git a/src/draw.c b/src/draw.c
index 1bbbaa1..7311fb6 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -187,9 +187,6 @@ UpdateAll (void)
void
Draw (void)
{
-
- render = true;
-
HideCrosshair (true);
/* clear and create event if not drawing to a pixmap
@@ -217,7 +214,6 @@ RedrawOutput (BoxTypePtr area)
void
ClearAndRedrawOutput (void)
{
- render = true;
Gathering = false;
UpdateAll ();
}
@@ -235,7 +231,6 @@ Redraw (bool ClearWindow, BoxTypePtr screen_area)
{
gui->invalidate_all ();
Gathering = true;
- render = false;
}
static int
@@ -2420,7 +2415,6 @@ hid_expose_callback (HID * hid, BoxType * region, void *item)
Output.bgGC = gui->make_gc ();
Output.pmGC = gui->make_gc ();
- render = true;
Gathering = false;
/*printf("\033[32mhid_expose_callback, s=%p %d\033[0m\n", &(SWAP_IDENT), SWAP_IDENT); */
|
|
From: <gi...@gp...> - 2010-08-24 17:39:25
|
The branch, master has been updated
via 6438ea7a47f0179564644cf5aa570bda70c07661 (commit)
via 939be83ee0e40ee61644917cc135697b7f7e3263 (commit)
via 0455a344b71347bc664faad1a3c57197c44da909 (commit)
via aa01ed6e4c80b4d56d711f954cfb0ebd04bec403 (commit)
from 04d8ae5526d9d2660572972d0cbeaf0ec53a8878 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gui-output-events.c | 12 +++++--
src/hid/gtk/gui-utils.c | 63 +--------------------------------------
src/hid/gtk/gui.h | 6 ----
3 files changed, 10 insertions(+), 71 deletions(-)
=================
Commit Messages
=================
commit 6438ea7a47f0179564644cf5aa570bda70c07661
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Track previous state of crosshair attachements when undrawing
For correctness - this doesn't necessarily fix any rendering bugs.
:100644 100644 7230aa3... 7cc764e... M src/hid/gtk/gui-output-events.c
commit 939be83ee0e40ee61644917cc135697b7f7e3263
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Simplify ghid_draw_area_update()
If the rect passed is NULL, we can simply pass that on to
gdk_window_invalidate_rect() which will invalidate the whole area.
:100644 100644 1902c62... 3d93d19... M src/hid/gtk/gui-utils.c
commit 0455a344b71347bc664faad1a3c57197c44da909
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove unused functions relating to string display
Removes ghid_string_markup_extents() and ghid_string_markup()
:100644 100644 5b85111... 1902c62... M src/hid/gtk/gui-utils.c
:100644 100644 0a2e747... 7686106... M src/hid/gtk/gui.h
commit aa01ed6e4c80b4d56d711f954cfb0ebd04bec403
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove unused ghid_draw_area_clear() function
:100644 100644 b72b82d... 5b85111... M src/hid/gtk/gui-utils.c
=========
Changes
=========
commit 6438ea7a47f0179564644cf5aa570bda70c07661
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Track previous state of crosshair attachements when undrawing
For correctness - this doesn't necessarily fix any rendering bugs.
diff --git a/src/hid/gtk/gui-output-events.c b/src/hid/gtk/gui-output-events.c
index 7230aa3..7cc764e 100644
--- a/src/hid/gtk/gui-output-events.c
+++ b/src/hid/gtk/gui-output-events.c
@@ -407,6 +407,7 @@ ghid_show_crosshair (gboolean show)
{
gint x, y;
static gint x_prev = -1, y_prev = -1;
+ static gboolean draw_markers, draw_markers_prev = FALSE;
static GdkGC *xor_gc;
static GdkColor cross_color;
@@ -429,7 +430,7 @@ ghid_show_crosshair (gboolean show)
if (x_prev >= 0)
{
draw_crosshair (xor_gc, x_prev, y_prev);
- if (ghidgui->auto_pan_on && have_crosshair_attachments ())
+ if (draw_markers_prev)
{
gdk_draw_rectangle (gport->drawing_area->window, xor_gc, TRUE,
0, y_prev - VCD, VCD, VCW);
@@ -445,7 +446,8 @@ ghid_show_crosshair (gboolean show)
if (x >= 0 && show)
{
draw_crosshair (xor_gc, x, y);
- if (ghidgui->auto_pan_on && have_crosshair_attachments ())
+ draw_markers = ghidgui->auto_pan_on && have_crosshair_attachments ();
+ if (draw_markers)
{
gdk_draw_rectangle (gport->drawing_area->window, xor_gc, TRUE,
0, y - VCD, VCD, VCW);
@@ -458,9 +460,13 @@ ghid_show_crosshair (gboolean show)
}
x_prev = x;
y_prev = y;
+ draw_markers_prev = draw_markers;
}
else
- x_prev = y_prev = -1;
+ {
+ x_prev = y_prev = -1;
+ draw_markers_prev = FALSE;
+ }
}
static gboolean
commit 939be83ee0e40ee61644917cc135697b7f7e3263
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Simplify ghid_draw_area_update()
If the rect passed is NULL, we can simply pass that on to
gdk_window_invalidate_rect() which will invalidate the whole area.
diff --git a/src/hid/gtk/gui-utils.c b/src/hid/gtk/gui-utils.c
index 1902c62..3d93d19 100644
--- a/src/hid/gtk/gui-utils.c
+++ b/src/hid/gtk/gui-utils.c
@@ -152,19 +152,7 @@ ghid_button_state (GdkModifierType * state)
void
ghid_draw_area_update (GHidPort * port, GdkRectangle * rect)
{
- GdkRectangle update_rect;
-
- if (rect)
- update_rect = *rect;
- else
- {
- update_rect.x = 0;
- update_rect.y = 0;
- update_rect.width = port->width;
- update_rect.height = port->height;
- }
- gdk_window_invalidate_rect (port->drawing_area->window, &update_rect,
- FALSE);
+ gdk_window_invalidate_rect (port->drawing_area->window, rect, FALSE);
}
commit 0455a344b71347bc664faad1a3c57197c44da909
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove unused functions relating to string display
Removes ghid_string_markup_extents() and ghid_string_markup()
diff --git a/src/hid/gtk/gui-utils.c b/src/hid/gtk/gui-utils.c
index 5b85111..1902c62 100644
--- a/src/hid/gtk/gui-utils.c
+++ b/src/hid/gtk/gui-utils.c
@@ -168,42 +168,6 @@ ghid_draw_area_update (GHidPort * port, GdkRectangle * rect)
}
-void
-ghid_string_markup_extents (PangoFontDescription * font_desc, gchar * string,
- gint * width, gint * height)
-{
- PangoLayout *layout;
- gint w, h;
- GHidPort *out = &ghid_port;
-
- layout = gtk_widget_create_pango_layout (out->top_window, NULL);
- pango_layout_set_font_description (layout, font_desc);
- pango_layout_set_markup (layout, string, strlen (string));
- pango_layout_get_pixel_size (layout, &w, &h);
- g_object_unref (layout);
-
- if (*width)
- *width = w;
- if (*height)
- *height = h;
-}
-
-void
-ghid_draw_string_markup (GdkDrawable * drawable,
- PangoFontDescription * font_desc,
- GdkGC * gc, gint x, gint y, gchar * string)
-{
- PangoLayout *layout;
- GHidPort *out = &ghid_port;
-
- layout = gtk_widget_create_pango_layout (out->top_window, NULL);
- pango_layout_set_font_description (layout, font_desc);
- pango_layout_set_markup (layout, string, strlen (string));
- gdk_draw_layout (drawable, gc, x, y, layout);
- g_object_unref (layout);
-}
-
-
gchar *
ghid_get_color_name (GdkColor * color)
{
diff --git a/src/hid/gtk/gui.h b/src/hid/gtk/gui.h
index 0a2e747..7686106 100644
--- a/src/hid/gtk/gui.h
+++ b/src/hid/gtk/gui.h
@@ -377,12 +377,6 @@ gboolean ghid_mod1_is_pressed (void);
gboolean ghid_shift_is_pressed (void);
void ghid_draw_area_update (GHidPort * out, GdkRectangle * rect);
-void ghid_string_markup_extents (PangoFontDescription * font_desc,
- gchar * string, gint * width, gint * height);
-void ghid_draw_string_markup (GdkDrawable * drawable,
- PangoFontDescription * font_desc,
- GdkGC * gc, gint x, gint y, gchar * string);
-
gchar *ghid_get_color_name (GdkColor * color);
void ghid_map_color_string (gchar * color_string, GdkColor * color);
void ghid_button_set_text (GtkWidget * button, gchar * text);
commit aa01ed6e4c80b4d56d711f954cfb0ebd04bec403
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove unused ghid_draw_area_clear() function
diff --git a/src/hid/gtk/gui-utils.c b/src/hid/gtk/gui-utils.c
index b72b82d..5b85111 100644
--- a/src/hid/gtk/gui-utils.c
+++ b/src/hid/gtk/gui-utils.c
@@ -149,19 +149,6 @@ ghid_button_state (GdkModifierType * state)
return bs;
}
-#ifdef FIXME
-void
-ghid_draw_area_clear (GHidPort * out, gboolean to_screen)
-{
- gdk_gc_set_foreground (out->bgGC, &Settings.BackgroundColor);
- gdk_draw_rectangle (out->pixmap, out->bgGC, TRUE,
- 0, 0, out->Width, out->Height);
- if (to_screen)
- gdk_draw_rectangle (out->drawing_area->window, out->bgGC, TRUE,
- 0, 0, out->Width, out->Height);
-}
-#endif /* FIXME */
-
void
ghid_draw_area_update (GHidPort * port, GdkRectangle * rect)
{
|
|
From: <gi...@gp...> - 2010-08-24 17:38:33
|
The branch, master has been updated
discards 83c2866494fa9d9ad39e68b290bb74ac76333b6f (commit)
discards abde5a811c4fec02f1a9f0109bc73a06d69398e6 (commit)
discards daa542d3e1286ac390a034fe0c8d455c402a62c1 (commit)
discards 9045d1b2ab5916ad9c1a3ac58eacf19e47dca201 (commit)
discards 5b59be1fe0f9e3c489368840ba415902146715d4 (commit)
discards 4c05b67ed980813f0e9397b285f6687568e032fa (commit)
discards 1507957219673fad9ba2ea52f64964ed9b036337 (commit)
discards e94479d7210870e7c52a95b5becfc1244dd7fdd3 (commit)
discards 264989905adddfadc4875d37be4331c6d0e18f4f (commit)
discards 4aed6d529217fcde9078026f100237b39249f390 (commit)
discards 193adfc2ca0d6365d4fa881c3870b88a1509d98b (commit)
discards 2d553c21045125dafb33137ae21adf4d5efc9314 (commit)
discards 8b162eca5ba77e4b9f06436a9fa7f9311532a61d (commit)
discards 2e09009091271e4efa7a3496a637e79427d714ac (commit)
discards 911388136478f1a12eb0cd7338ce165a8c12fc88 (commit)
discards 7bb66d19ddb72f6f17eb1295d6723d00729a71c8 (commit)
discards 06a432e7d509472c95fa0287de2c7d3f33c3933c (commit)
discards eee43264a941ef1084a8888ec31325d6a37bae6c (commit)
discards fe8e6a53ff8a0028360888f7927108ca7ffa498b (commit)
discards 880d3643711b332899e36fe7b3b9c0eeae3bc4af (commit)
discards a76a26a2362b1a6ad5a8d8841d942f483bb16f20 (commit)
discards 802d52c2c9ad48781f1e6662cacb60fe20f64157 (commit)
discards 5118760e196039dad5eded4c1624254660963c9c (commit)
discards 1ad90700d1900a90c4537bb51889c3979dd47c9e (commit)
discards 2ffaef15bdf630c0c10db23c17d6ce3cb1b157fe (commit)
discards fa86f244887fca50ad7487b377fecf64b0c44bb1 (commit)
discards 701effca7fe31d6ab3a778e8cac6f9d39b35f06f (commit)
discards 60aa80d5720b54939f37a225eba66aed1a483ec2 (commit)
discards 454639bf87001fd157269185fad73c3faf00196b (commit)
discards b846ecafd19c062bc9e85a8d425c024d49fe32cc (commit)
discards 0296d3e1d08407747605103f0b99dcbeb168a331 (commit)
discards 0366b21ab674253f0567013bfe618429f028e3df (commit)
discards fd1833e21b0b93851dce69218160d2d22a0cc97e (commit)
discards efed4d20f64ddf37ad80e563ddb9710b2eef8535 (commit)
discards 275346d1b0a54347bd52ec364982a133f161700e (commit)
discards c1ecaf676017a12d1d7c278af53d600a2c9f8e1b (commit)
discards 1b63d27b652009e7a6581c869fc021e73013ab2a (commit)
discards 09ed7763b9805678da73dd81a8c7f79d370741c7 (commit)
discards 56567acb4aa14cc324809c83f4dce6b0ae4cf944 (commit)
discards 44d00a5bee19f5b438524f7d1a7d71740f27368e (commit)
discards b55ae28e513f02657aaa6196e3d44d96a2c4759c (commit)
discards 91849e58d99465bb9ec916f6594ae89ff90219ed (commit)
discards d4fd0a435f87c637e902787bd274a8e624a2b204 (commit)
discards a34d7e1b87354c65e3d13dcf8225c1b1e02efa68 (commit)
discards ed7c2aa282fff2306d3a5451934bbb9402e4836c (commit)
discards 83c0c7d5eec7431e854592d0d14a0eb0b3dbc456 (commit)
discards 7c6ae5c49c59275e712efa453688c140f741fb3c (commit)
from 83c2866494fa9d9ad39e68b290bb74ac76333b6f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
configure.ac | 60 +--
configure.ac.system | 164 ----
globalconst.h | 2 -
po/POTFILES.in | 2 -
src/Makefile.am | 49 +-
src/action.c | 141 ++--
src/action.h | 2 +-
src/autoroute.c | 57 +-
src/buffer.c | 194 ++---
src/cairo/cairo-bentley-ottmann.c | 1569 ------------------------------
src/cairo/cairo-combsort-private.h | 71 --
src/cairo/cairo-compiler-private.h | 203 ----
src/cairo/cairo-fixed-private.h | 290 ------
src/cairo/cairo-fixed-type-private.h | 75 --
src/cairo/cairo-freelist-private.h | 150 ---
src/cairo/cairo-freelist.c | 176 ----
src/cairo/cairo-malloc-private.h | 148 ---
src/cairo/cairo-minimal.h | 208 ----
src/cairo/cairo-traps-private.h | 152 ---
src/cairo/cairo-traps.c | 438 ---------
src/cairo/cairo-types-private.h | 206 ----
src/cairo/cairo-wideint-private.h | 329 -------
src/cairo/cairo-wideint-type-private.h | 153 ---
src/cairo/cairo-wideint.c | 819 ----------------
src/cairo/cairoint-minimal.h | 146 ---
src/change.c | 263 ++---
src/change.h | 2 +-
src/const.h | 14 +-
src/copy.c | 53 +-
src/copy.h | 4 +-
src/create.c | 77 +-
src/create.h | 9 +-
src/crosshair.c | 333 ++-----
src/draw.c | 224 +----
src/draw.h | 15 -
src/file.c | 17 +-
src/find.c | 273 ++-----
src/find.h | 3 +-
src/flags.c | 5 +-
src/global.h | 73 +-
src/gpcb-menu.res | 4 +-
src/hid.h | 1 -
src/hid/common/hidgl.c | 796 ----------------
src/hid/common/hidgl.h | 85 --
src/hid/common/trackball.c | 324 -------
src/hid/common/trackball.h | 78 --
src/hid/gcode/gcode.c | 2 +-
src/hid/gerber/gerber.c | 5 +-
src/hid/gtk/gtkhid-gl.c | 570 -----------
src/hid/gtk/gtkhid-main.c | 168 ++--
src/hid/gtk/gui-drc-window.c | 20 +-
src/hid/gtk/gui-icons-mode-buttons.data | 4 +-
src/hid/gtk/gui-misc.c | 4 +-
src/hid/gtk/gui-output-events.c | 1448 ++--------------------------
src/hid/gtk/gui-pinout-preview.c | 100 +--
src/hid/gtk/gui-render-pixmap.c | 76 +--
src/hid/gtk/gui-top-window.c | 63 +--
src/hid/gtk/gui-trackball.c | 423 --------
src/hid/gtk/gui-trackball.h | 71 --
src/hid/gtk/gui.h | 41 +-
src/hid/gtk/snavi.c | 187 ----
src/hid/gtk/snavi.h | 6 -
src/hid/nelma/nelma.c | 6 +-
src/hid/png/png.c | 6 +-
src/hid/ps/eps.c | 6 +-
src/hid/ps/ps.c | 6 +-
src/insert.c | 50 +-
src/insert.h | 2 +-
src/macro.h | 37 +-
src/mirror.c | 7 +-
src/misc.c | 68 +-
src/misc.h | 1 -
src/move.c | 175 ++--
src/move.h | 7 +-
src/mymem.c | 147 +---
src/mymem.h | 10 +-
src/parse_y.y | 39 +-
src/pcb-menu.res | 4 +-
src/polyarea.h | 1 -
src/polygon.c | 1006 +++++++++++++++-----
src/polygon.h | 23 +-
src/polygon1.c | 1122 ++++------------------
src/pour.c | 1590 -------------------------------
src/pour.h | 55 --
src/puller.c | 16 +-
src/rats.c | 30 +-
src/remove.c | 187 ++--
src/remove.h | 4 +-
src/report.c | 35 +-
src/report.h | 4 +-
src/rotate.c | 28 +-
src/rotate.h | 2 +-
src/search.c | 176 +---
src/search.h | 6 -
src/select.c | 107 +--
src/select.h | 2 +-
src/set.c | 6 +-
src/strflags.c | 4 +-
src/sweep.h | 4 -
src/undo.c | 119 ++--
src/undo.h | 4 +-
101 files changed, 2188 insertions(+), 14559 deletions(-)
delete mode 100644 configure.ac.system
delete mode 100644 src/cairo/cairo-bentley-ottmann.c
delete mode 100644 src/cairo/cairo-combsort-private.h
delete mode 100644 src/cairo/cairo-compiler-private.h
delete mode 100644 src/cairo/cairo-fixed-private.h
delete mode 100644 src/cairo/cairo-fixed-type-private.h
delete mode 100644 src/cairo/cairo-freelist-private.h
delete mode 100644 src/cairo/cairo-freelist.c
delete mode 100644 src/cairo/cairo-malloc-private.h
delete mode 100644 src/cairo/cairo-minimal.h
delete mode 100644 src/cairo/cairo-traps-private.h
delete mode 100644 src/cairo/cairo-traps.c
delete mode 100644 src/cairo/cairo-types-private.h
delete mode 100644 src/cairo/cairo-wideint-private.h
delete mode 100644 src/cairo/cairo-wideint-type-private.h
delete mode 100644 src/cairo/cairo-wideint.c
delete mode 100644 src/cairo/cairoint-minimal.h
delete mode 100644 src/hid/common/hidgl.c
delete mode 100644 src/hid/common/hidgl.h
delete mode 100644 src/hid/common/trackball.c
delete mode 100644 src/hid/common/trackball.h
delete mode 100644 src/hid/gtk/gtkhid-gl.c
delete mode 100644 src/hid/gtk/gui-trackball.c
delete mode 100644 src/hid/gtk/gui-trackball.h
delete mode 100644 src/hid/gtk/snavi.c
delete mode 100644 src/hid/gtk/snavi.h
delete mode 100644 src/pour.c
delete mode 100644 src/pour.h
delete mode 100644 src/sweep.h
=================
Commit Messages
=================
=========
Changes
=========
|
|
From: <gi...@gp...> - 2010-08-15 23:31:07
|
The branch, master has been updated
via 04d8ae5526d9d2660572972d0cbeaf0ec53a8878 (commit)
via 148680c87c58ee7e6ab44c7bbb6a6c6927478b67 (commit)
via a33ca03099f2010fcb6cfe61edbb4c09303653aa (commit)
via 55ab14d1b62783e4daa687ef33521e7739b7398f (commit)
via 76a44ff86dc19a352c15bb17f4727c3f3fe1ec4e (commit)
from fcb24561236102bbb7a7e891b97cdc6f38ea5a47 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gtkhid-main.c | 8 ++------
src/hid/gtk/gui-top-window.c | 22 +++++++++++++---------
src/hid/lesstif/main.c | 9 +++++++--
src/hid/lesstif/menu.c | 13 +++----------
src/main.c | 29 +++++++++++++++++++++++++++++
5 files changed, 54 insertions(+), 27 deletions(-)
=================
Commit Messages
=================
commit 04d8ae5526d9d2660572972d0cbeaf0ec53a8878
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Merge GTK attributes.
Since the new help system only allows one attribute (i.e. command
line) list per HID, combine the two GTK lists into one.
:100644 100644 8db91c8... 3d3896f... M src/hid/gtk/gui-top-window.c
commit 148680c87c58ee7e6ab44c7bbb6a6c6927478b67
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Merge lesstif attributes.
Since the new help system only allows one attribute (i.e. command
line) list per HID, combine the two Lesstif lists into one.
:100644 100644 f423fb2... 3c4ef12... M src/hid/lesstif/main.c
:100644 100644 59ab80b... 5a43fa8... M src/hid/lesstif/menu.c
commit a33ca03099f2010fcb6cfe61edbb4c09303653aa
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Print all command line options with help.
Keep track of which attributes we've printed as part of the HID
help. After that, print any remaining attributes we know about
that we haven't already printed.
:100644 100644 3340c7f... ba8c959... M src/main.c
commit 55ab14d1b62783e4daa687ef33521e7739b7398f
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Export GTK attributes.
The new help system uses export attribute lists for help,
so the Lesstif HID needs to export them.
:100644 100644 05b2c91... 8c3ff67... M src/hid/gtk/gtkhid-main.c
:100644 100644 4c00c13... 8db91c8... M src/hid/gtk/gui-top-window.c
commit 76a44ff86dc19a352c15bb17f4727c3f3fe1ec4e
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Export lesstif attributes.
The new help system uses export attribute lists for help,
so the Lesstif HID needs to export them.
:100644 100644 e16397e... f423fb2... M src/hid/lesstif/main.c
=========
Changes
=========
commit 04d8ae5526d9d2660572972d0cbeaf0ec53a8878
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Merge GTK attributes.
Since the new help system only allows one attribute (i.e. command
line) list per HID, combine the two GTK lists into one.
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 8db91c8..3d3896f 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -2591,7 +2591,10 @@ ghid_create_listener (void)
/* ------------------------------------------------------------ */
+
static int stdin_listen = 0;
+static char *pcbmenu_path = "gpcb-menu.res";
+
HID_Attribute ghid_attribute_list[] = {
{"listen", "Listen for actions on stdin",
HID_Boolean, 0, 0, {0, 0, 0}, 0, &stdin_listen},
@@ -2601,6 +2604,9 @@ HID_Attribute ghid_attribute_list[] = {
HID_String, 0, 0, {0, 0, 0}, 0, &bg_image_file},
#define HA_bg_image 1
+{"pcb-menu", "Location of gpcb-menu.res file",
+ HID_String, 0, 0, {0, PCBLIBDIR "/gpcb-menu.res", 0}, 0, &pcbmenu_path}
+#define HA_pcbmenu 2
};
REGISTER_ATTRIBUTES (ghid_attribute_list)
@@ -2887,15 +2893,6 @@ HID_Action gtk_topwindow_action_list[] = {
REGISTER_ACTIONS (gtk_topwindow_action_list)
-static char *pcbmenu_path = "gpcb-menu.res";
-
-static HID_Attribute pcbmenu_attr[] = {
-{"pcb-menu", "Location of gpcb-menu.res file",
- HID_String, 0, 0, {0, PCBLIBDIR "/gpcb-menu.res", 0}, 0, &pcbmenu_path}
-};
-
-REGISTER_ATTRIBUTES (pcbmenu_attr)
-
/*
* This function is used to check if a specified hotkey in the menu
* resource file is "special". In this case "special" means that gtk
commit 148680c87c58ee7e6ab44c7bbb6a6c6927478b67
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Merge lesstif attributes.
Since the new help system only allows one attribute (i.e. command
line) list per HID, combine the two Lesstif lists into one.
diff --git a/src/hid/lesstif/main.c b/src/hid/lesstif/main.c
index f423fb2..3c4ef12 100644
--- a/src/hid/lesstif/main.c
+++ b/src/hid/lesstif/main.c
@@ -167,6 +167,7 @@ static int n;
static int use_private_colormap = 0;
static int stdin_listen = 0;
static char *background_image_file = 0;
+char *lesstif_pcbmenu_path = "pcb-menu.res";
HID_Attribute lesstif_attribute_list[] = {
{"install", "Install private colormap",
@@ -179,8 +180,11 @@ HID_Attribute lesstif_attribute_list[] = {
{"bg-image", "Background Image",
HID_String, 0, 0, {0, 0, 0}, 0, &background_image_file},
-#define HA_bg_image 1
+#define HA_bg_image 2
+ {"pcb-menu", "Location of pcb-menu.res file",
+ HID_String, 0, 0, {0, PCBLIBDIR "/pcb-menu.res", 0}, 0, &lesstif_pcbmenu_path}
+#define HA_pcbmenu 3
};
REGISTER_ATTRIBUTES (lesstif_attribute_list)
diff --git a/src/hid/lesstif/menu.c b/src/hid/lesstif/menu.c
index 59ab80b..5a43fa8 100644
--- a/src/hid/lesstif/menu.c
+++ b/src/hid/lesstif/menu.c
@@ -1401,14 +1401,7 @@ add_resource_to_menu (Widget menu, Resource * node, XtCallbackProc callback)
}
}
-static char *pcbmenu_path = "pcb-menu.res";
-
-static HID_Attribute pcbmenu_attr[] = {
- {"pcb-menu", "Location of pcb-menu.res file",
- HID_String, 0, 0, {0, PCBLIBDIR "/pcb-menu.res", 0}, 0, &pcbmenu_path}
-};
-
-REGISTER_ATTRIBUTES(pcbmenu_attr)
+extern char *lesstif_pcbmenu_path;
Widget
lesstif_menu (Widget parent, char *name, Arg * margs, int mn)
@@ -1441,8 +1434,8 @@ lesstif_menu (Widget parent, char *name, Arg * margs, int mn)
filename = "pcb-menu.res";
else if (home_pcbmenu != NULL && (access (home_pcbmenu, R_OK) == 0))
filename = home_pcbmenu;
- else if (access (pcbmenu_path, R_OK) == 0)
- filename = pcbmenu_path;
+ else if (access (lesstif_pcbmenu_path, R_OK) == 0)
+ filename = lesstif_pcbmenu_path;
else
filename = 0;
commit a33ca03099f2010fcb6cfe61edbb4c09303653aa
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Print all command line options with help.
Keep track of which attributes we've printed as part of the HID
help. After that, print any remaining attributes we know about
that we haven't already printed.
diff --git a/src/main.c b/src/main.c
index 3340c7f..ba8c959 100644
--- a/src/main.c
+++ b/src/main.c
@@ -142,6 +142,13 @@ u (const char *fmt, ...)
va_end (ap);
}
+typedef struct UsageNotes {
+ struct UsageNotes *next;
+ HID_Attribute *seen;
+} UsageNotes;
+
+static UsageNotes *usage_notes = NULL;
+
static void
usage_attr (HID_Attribute * a)
{
@@ -202,6 +209,7 @@ usage_hid (HID * h)
{
HID_Attribute *attributes;
int i, n_attributes = 0;
+ UsageNotes *note;
if (h->gui)
{
@@ -215,6 +223,11 @@ usage_hid (HID * h)
attributes = exporter->get_export_options (&n_attributes);
exporter = NULL;
}
+
+ note = (UsageNotes *) MyMalloc (sizeof (UsageNotes), "usage_hid");
+ note->next = usage_notes;
+ note->seen = attributes;
+ usage_notes = note;
for (i = 0; i < n_attributes; i++)
usage_attr (attributes + i);
@@ -224,6 +237,8 @@ static void
usage (void)
{
HID **hl = hid_enumerate ();
+ HID_AttrNode *ha;
+ UsageNotes *note;
int i;
int n_printer = 0, n_gui = 0, n_exporter = 0;
@@ -264,6 +279,20 @@ usage (void)
for (i = 0; hl[i]; i++)
if (hl[i]->exporter)
usage_hid (hl[i]);
+
+ u ("\nCommon options:");
+ for (ha = hid_attr_nodes; ha; ha = ha->next)
+ {
+ for (note = usage_notes; note && note->seen != ha->attributes; note = note->next)
+ ;
+ if (note)
+ continue;
+ for (i = 0; i < ha->n; i++)
+ {
+ usage_attr (ha->attributes + i);
+ }
+ }
+
exit (1);
}
commit 55ab14d1b62783e4daa687ef33521e7739b7398f
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Export GTK attributes.
The new help system uses export attribute lists for help,
so the Lesstif HID needs to export them.
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 05b2c91..8c3ff67 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -311,12 +311,6 @@ zoom_by (double factor, int x, int y)
/* ------------------------------------------------------------ */
-HID_Attribute *
-ghid_get_export_options (int *n_ret)
-{
- return NULL;
-}
-
void
ghid_invalidate_lr (int left, int right, int top, int bottom)
{
@@ -1128,6 +1122,8 @@ HID_DRC_GUI ghid_drc_gui = {
ghid_drc_window_throw_dialog,
};
+extern HID_Attribute *ghid_get_export_options (int *);
+
HID ghid_hid = {
sizeof (HID),
"gtk",
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 4c00c13..8db91c8 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -2605,6 +2605,13 @@ HID_Attribute ghid_attribute_list[] = {
REGISTER_ATTRIBUTES (ghid_attribute_list)
+HID_Attribute *
+ghid_get_export_options (int *n_ret)
+{
+ *n_ret = sizeof (ghid_attribute_list) / sizeof (HID_Attribute);
+ return ghid_attribute_list;
+}
+
/* Create top level window for routines that will need top_window
| before ghid_create_pcb_widgets() is called.
*/
commit 76a44ff86dc19a352c15bb17f4727c3f3fe1ec4e
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Export lesstif attributes.
The new help system uses export attribute lists for help,
so the Lesstif HID needs to export them.
diff --git a/src/hid/lesstif/main.c b/src/hid/lesstif/main.c
index e16397e..f423fb2 100644
--- a/src/hid/lesstif/main.c
+++ b/src/hid/lesstif/main.c
@@ -1091,7 +1091,8 @@ DrawBackgroundImage ()
static HID_Attribute *
lesstif_get_export_options (int *n)
{
- return 0;
+ *n = sizeof (lesstif_attribute_list) / sizeof (HID_Attribute);
+ return lesstif_attribute_list;
}
static void
|
|
From: <gi...@gp...> - 2010-08-15 06:08:25
|
The branch, master has been updated
via fcb24561236102bbb7a7e891b97cdc6f38ea5a47 (commit)
from ca88ff9c45d72fa7954ebccb717e7d2cb5d602a8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/action.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit fcb24561236102bbb7a7e891b97cdc6f38ea5a47
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Check for NULL element name when adding attributes.
When setting element attributes, if the element is as yet unnamed,
use an "unnamed element" title instead of segfaulting.
:100644 100644 961decf... 0a85391... M src/action.c
=========
Changes
=========
commit fcb24561236102bbb7a7e891b97cdc6f38ea5a47
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Check for NULL element name when adding attributes.
When setting element attributes, if the element is as yet unnamed,
use an "unnamed element" title instead of segfaulting.
diff --git a/src/action.c b/src/action.c
index 961decf..0a85391 100644
--- a/src/action.c
+++ b/src/action.c
@@ -7821,8 +7821,15 @@ ActionAttributes (int argc, char **argv, int x, int y)
}
}
- buf = (char *) malloc (strlen (NAMEONPCB_NAME(e)) + strlen ("Element X Attributes"));
- sprintf(buf, "Element %s Attributes", NAMEONPCB_NAME(e));
+ if (NAMEONPCB_NAME(e))
+ {
+ buf = (char *) malloc (strlen (NAMEONPCB_NAME(e)) + strlen ("Element X Attributes"));
+ sprintf(buf, "Element %s Attributes", NAMEONPCB_NAME(e));
+ }
+ else
+ {
+ buf = strdup ("Unnamed Element Attributes");
+ }
gui->edit_attributes(buf, &(e->Attributes));
free (buf);
break;
|
|
From: <gi...@gp...> - 2010-08-15 05:59:08
|
The branch, master has been updated
via ca88ff9c45d72fa7954ebccb717e7d2cb5d602a8 (commit)
from acb36057bb3a7dc0899ce34e1ef50685f8de3640 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
po/ru.po | 2 +-
src/hid/gtk/gui-dialog.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit ca88ff9c45d72fa7954ebccb717e7d2cb5d602a8
Author: Robert Spanton <rsp...@ze...>
Commit: DJ Delorie <dj...@de...>
Add a keyboard shortcut to pcb's "close without saving" option
This patch adds a keyboard mnemonic to the "close without saving"
option in the close confirmation dialog box.
:100644 100644 aa7d90c... 0fa6ea8... M po/ru.po
:100644 100644 1697324... ec91233... M src/hid/gtk/gui-dialog.c
=========
Changes
=========
commit ca88ff9c45d72fa7954ebccb717e7d2cb5d602a8
Author: Robert Spanton <rsp...@ze...>
Commit: DJ Delorie <dj...@de...>
Add a keyboard shortcut to pcb's "close without saving" option
This patch adds a keyboard mnemonic to the "close without saving"
option in the close confirmation dialog box.
diff --git a/po/ru.po b/po/ru.po
index aa7d90c..0fa6ea8 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -3488,7 +3488,7 @@ msgid "If you don't save, all your changes will be permanently lost."
msgstr "ÐÑли Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð½Ðµ бÑдÑÑ ÑоÑ
ÑаненÑ, они бÑдÑÑ Ð±ÐµÐ·Ð²Ð¾Ð·Ð²ÑаÑно ÑÑеÑÑнÑ."
#: ../src/hid/gtk/gui-dialog.c:227
-msgid "Close without saving"
+msgid "Close _without saving"
msgstr "ÐакÑÑÑÑ Ð±ÐµÐ· ÑоÑ
ÑанениÑ"
#: ../src/hid/gtk/gui-drc-window.c:228
diff --git a/src/hid/gtk/gui-dialog.c b/src/hid/gtk/gui-dialog.c
index 1697324..ec91233 100644
--- a/src/hid/gtk/gui-dialog.c
+++ b/src/hid/gtk/gui-dialog.c
@@ -224,7 +224,7 @@ ghid_dialog_close_confirm ()
GTK_BUTTONS_NONE, NULL);
gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), str);
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
- _("Close without saving"), GTK_RESPONSE_NO,
+ _("Close _without saving"), GTK_RESPONSE_NO,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_SAVE, GTK_RESPONSE_YES,
NULL);
|
|
From: <gi...@gp...> - 2010-08-15 05:42:01
|
The branch, master has been updated
via acb36057bb3a7dc0899ce34e1ef50685f8de3640 (commit)
via 24d8575e838110aca9c10aad0aca8afd7219a1a0 (commit)
from 149be27757ce66a2384c35c93bc41fe3b256b11d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/action.c | 6 +++++-
src/buffer.c | 18 ++++++++++++++----
src/gpcb-menu.res | 1 +
src/pcb-menu.res | 1 +
4 files changed, 21 insertions(+), 5 deletions(-)
=================
Commit Messages
=================
commit acb36057bb3a7dc0899ce34e1ef50685f8de3640
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Update Import() docs
Fix capitalization. Mention that elements that should be removed
are left, but selected, after an Import.
:100644 100644 12745d1... 961decf... M src/action.c
commit 24d8575e838110aca9c10aad0aca8afd7219a1a0
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Add FreeRotateBuffer to the Menu
Modify FreeRotateBuffer() to prompt the user if no angle is passed.
Add an entry to the menus to call it that way.
:100644 100644 7b8bce8... b6d1e2b... M src/buffer.c
:100644 100644 0db5aad... e92a59a... M src/gpcb-menu.res
:100644 100644 0df4b7f... 1166439... M src/pcb-menu.res
=========
Changes
=========
commit acb36057bb3a7dc0899ce34e1ef50685f8de3640
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Update Import() docs
Fix capitalization. Mention that elements that should be removed
are left, but selected, after an Import.
diff --git a/src/action.c b/src/action.c
index 12745d1..961decf 100644
--- a/src/action.c
+++ b/src/action.c
@@ -7242,7 +7242,7 @@ static const char import_syntax[] =
static const char import_help[] = "Import schematics";
-/* %start-doc actions import
+/* %start-doc actions Import
Imports element and netlist data from the schematics (or some other
source). The first parameter, which is optional, is the mode. If not
@@ -7307,6 +7307,10 @@ line).
If @pcb{} cannot determine which schematic(s) to import from, the GUI
is called to let user choose (see @code{ImportGUI()}).
+Note that Import() doesn't delete anything - after an Import, elements
+which shouldn't be on the board are selected and may be removed once
+it's determined that the deletion is appropriate.
+
%end-doc */
static int
commit 24d8575e838110aca9c10aad0aca8afd7219a1a0
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Add FreeRotateBuffer to the Menu
Modify FreeRotateBuffer() to prompt the user if no angle is passed.
Add an entry to the menus to call it that way.
diff --git a/src/buffer.c b/src/buffer.c
index 7b8bce8..b6d1e2b 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1426,22 +1426,32 @@ FreeRotateBuffer (BufferTypePtr Buffer, double Angle)
/* -------------------------------------------------------------------------- */
static const char freerotatebuffer_syntax[] =
- "FreeRotateBuffer(Angle)";
+ "FreeRotateBuffer([Angle])";
static const char freerotatebuffer_help[] =
"Rotates the current paste buffer contents by the specified angle. The\n"
- "angle is given in degrees.\n";
+ "angle is given in degrees. If no angle is given, the user is prompted\n"
+ "for one.\n";
/* %start-doc actions FreeRotateBuffer
-Rotates the contents of the pastebuffer by an arbitrary angle.
+Rotates the contents of the pastebuffer by an arbitrary angle. If no
+angle is given, the user is prompted for one.
+
%end-doc */
int
ActionFreeRotateBuffer(int argc, char **argv, int x, int y)
{
HideCrosshair(false);
- FreeRotateBuffer(PASTEBUFFER, strtod(argv[0], 0));
+ char *angle_s;
+
+ if (argc < 1)
+ angle_s = gui->prompt_for ("Enter Rotation (degrees, CCW):", "0");
+ else
+ angle_s = argv[0];
+
+ FreeRotateBuffer(PASTEBUFFER, strtod(angle_s, 0));
RestoreCrosshair(false);
return 0;
}
diff --git a/src/gpcb-menu.res b/src/gpcb-menu.res
index 0db5aad..e92a59a 100644
--- a/src/gpcb-menu.res
+++ b/src/gpcb-menu.res
@@ -287,6 +287,7 @@ MainMenu =
{"Rotate buffer 90 deg CCW" Mode(PasteBuffer) PasteBuffer(Rotate,1)
a={"Shift-F7" "Shift<Key>F7"}}
{"Rotate buffer 90 deg CW" Mode(PasteBuffer) PasteBuffer(Rotate,3)}
+ {"Arbitrarily Rotate Buffer" Mode(PasteBuffer) FreeRotateBuffer()}
{"Mirror buffer (up/down)" Mode(PasteBuffer) PasteBuffer(Mirror)}
{"Mirror buffer (left/right)" Mode(PasteBuffer) PasteBuffer(Rotate,1)
PasteBuffer(Mirror) PasteBuffer(Rotate,3)}
diff --git a/src/pcb-menu.res b/src/pcb-menu.res
index 0df4b7f..1166439 100644
--- a/src/pcb-menu.res
+++ b/src/pcb-menu.res
@@ -272,6 +272,7 @@ MainMenu =
{"Rotate buffer 90 deg CCW" Mode(PasteBuffer) PasteBuffer(Rotate,1)
a={"Shift-F7" "Shift<Key>F7"}}
{"Rotate buffer 90 deg CW" Mode(PasteBuffer) PasteBuffer(Rotate,3)}
+ {"Arbitrarily Rotate Buffer" Mode(PasteBuffer) FreeRotateBuffer()}
{"Mirror buffer (up/down)" Mode(PasteBuffer) PasteBuffer(Mirror)}
{"Mirror buffer (left/right)" Mode(PasteBuffer) PasteBuffer(Rotate,1)
PasteBuffer(Mirror) PasteBuffer(Rotate,3)}
|
|
From: <gi...@gp...> - 2010-08-15 04:24:44
|
The branch, master has been updated
via 149be27757ce66a2384c35c93bc41fe3b256b11d (commit)
via f040d22940c0d4de724923e3b2aadb4afe9f6239 (commit)
from 97c150e44a768b873946b62b36bad430c9a1b8a0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/action.c | 4 ++--
tools/gnet-pcbfwd.scm | 22 ++++++++++++++++------
2 files changed, 18 insertions(+), 8 deletions(-)
=================
Commit Messages
=================
commit 149be27757ce66a2384c35c93bc41fe3b256b11d
Author: kai-martin <km...@bi...>
Commit: DJ Delorie <dj...@de...>
modified: action.c (fix element name position on import schematic)
:100644 100644 5f1c7a1... 12745d1... M src/action.c
commit f040d22940c0d4de724923e3b2aadb4afe9f6239
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Quote strings
Quote all strings that might contains commas or close parens,
to avoid syntax errors when those names are passed to actions.
:100644 100644 360859f... 29274a6... M tools/gnet-pcbfwd.scm
=========
Changes
=========
commit 149be27757ce66a2384c35c93bc41fe3b256b11d
Author: kai-martin <km...@bi...>
Commit: DJ Delorie <dj...@de...>
modified: action.c (fix element name position on import schematic)
diff --git a/src/action.c b/src/action.c
index 5f1c7a1..12745d1 100644
--- a/src/action.c
+++ b/src/action.c
@@ -7112,8 +7112,8 @@ ActionElementList (int argc, char **argv, int x, int y)
for (i=0; i<MAX_ELEMENTNAMES; i++)
{
- pe->Name[i].X = e->Name[i].X - mx;
- pe->Name[i].Y = e->Name[i].Y - my;
+ pe->Name[i].X = e->Name[i].X - mx + pe->MarkX ;
+ pe->Name[i].Y = e->Name[i].Y - my + pe->MarkY ;
pe->Name[i].Direction = e->Name[i].Direction;
pe->Name[i].Scale = e->Name[i].Scale;
}
commit f040d22940c0d4de724923e3b2aadb4afe9f6239
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Quote strings
Quote all strings that might contains commas or close parens,
to avoid syntax errors when those names are passed to actions.
diff --git a/tools/gnet-pcbfwd.scm b/tools/gnet-pcbfwd.scm
index 360859f..29274a6 100644
--- a/tools/gnet-pcbfwd.scm
+++ b/tools/gnet-pcbfwd.scm
@@ -19,6 +19,7 @@
;; PCB forward annotation script
+(use-modules (ice-9 regex))
(use-modules (ice-9 format))
;; This is a list of attributes which are propogated to the pcb
@@ -32,6 +33,12 @@
"vendor_part_number"
))
+(define (pcbfwd:quote-string s)
+ (string-append "\""
+ (regexp-substitute/global #f "\"" s 'pre "\\\"" 'post)
+ "\"")
+ )
+
(define (pcbfwd:pinfmt pin)
(format #f "~a-~a" (car pin) (car (cdr pin)))
)
@@ -52,9 +59,9 @@
(if (not (null? attrs))
(let ((attr (car attrs)))
(format port "ElementSetAttr(~a,~a,~a)~%"
- refdes
- attr
- (gnetlist:get-package-attribute refdes attr))
+ (pcbfwd:quote-string refdes)
+ (pcbfwd:quote-string attr)
+ (pcbfwd:quote-string (gnetlist:get-package-attribute refdes attr)))
(pcbfwd:each-attr refdes (cdr attrs) port))))
;; write out the pins for a particular component
@@ -68,7 +75,7 @@
(pinnum #f)
)
(display "ChangePinName(" port)
- (display package port)
+ (display (pcbfwd:quote-string package) port)
(display ", " port)
(set! pinnum (gnetlist:get-attribute-by-pinnumber package pin "pinnumber"))
@@ -80,7 +87,7 @@
(if (string=? label "unknown")
(set! label pinnum)
)
- (display label port)
+ (display (pcbfwd:quote-string label) port)
(display ")\n" port)
)
(pcbfwd:component_pins port package (cdr pins))
@@ -96,7 +103,10 @@
(footprint (gnetlist:get-package-attribute refdes "footprint"))
)
- (format port "ElementList(Need,~a,~a,~a)~%" refdes footprint value)
+ (format port "ElementList(Need,~a,~a,~a)~%"
+ (pcbfwd:quote-string refdes)
+ (pcbfwd:quote-string footprint)
+ (pcbfwd:quote-string value))
(pcbfwd:each-attr refdes pcbfwd:element-attrs port)
(pcbfwd:component_pins port refdes (gnetlist:get-pins refdes))
|