The caller assumes that any error would be signaled via errno. A proper
solution would be to allow also for non-errno errors.
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@6004 99fdad57-331a-0410-800a-d7fa5415bdb3
Such names have an invalid size and may trip the Postscript/PDF interpreter.
- postscript.c (ps_pad_name): don't output names consisting only of spaces
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@6002 99fdad57-331a-0410-800a-d7fa5415bdb3
with a selected object but no selected instance. In this case, don't try to
re-select. (Not perfect, but better than the crash this caused so far.)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5999 99fdad57-331a-0410-800a-d7fa5415bdb3
- gui_inst.c (gui_draw_pad_text): box_min and box_max were initialized to
an undefined value, upsetting valgrind and yielding an incorrect
location if pad and hole had the same size
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5994 99fdad57-331a-0410-800a-d7fa5415bdb3
the Debian package is need DESTDIR and Debian also install binary
to /usr/bin/
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5982 99fdad57-331a-0410-800a-d7fa5415bdb3
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
[ changed the location to ./ - manual/ is more about extra data for the
HTML manual. - Werner ]
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5981 99fdad57-331a-0410-800a-d7fa5415bdb3
this can reduce warning "svn: '.' is not a working copy"
when we not in a svn repo.
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5980 99fdad57-331a-0410-800a-d7fa5415bdb3
cores.
- test/structure, test/del_vec, test/frame_ref, test/meas_qual, test/del_frame:
added newline after "unit" directive (reported by Xiangfu Liu)
- test/Common: new function expect_sed for post-processing of test output
- test/tsort: use expect_sed to ignore "(core dumped") after "Aborted"
- test/Common: if there is a file called "core", don't run it
- Makefile (clean): remove test/core
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5978 99fdad57-331a-0410-800a-d7fa5415bdb3
- gui_frame_drag.c (FOR_UNORDERED, drag_var_motion, drag_value_motion,
drag_frame_motion): moved hard to read loop into helper macro
- capitalized SWAP, to make it clear it's a macro and can multiply side-effects
- TODO: updated discussion of open issues
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5971 99fdad57-331a-0410-800a-d7fa5415bdb3
- gui_frame.c (build_frame_label): the root frame doesn't participate in any
form of dragging, so we don't set up dragging for it at all
- gui_frame_drag.c (pick_table_cell, swap_table_cells_by_coord,
swap_table_rows): helper functions for swapping rows in a Gtk table
- gui_frame_drag.c (swap_frames, drag_frame_motion, setup_frame_drag): added
support for reordering of frames by dragging
- gui_frame_drag.c (SWAP, swap_vars, swap_values, swap_rows): removed SWAP().
Use swap() from util.h instead.
- TODO: removed frame ordering entry
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5970 99fdad57-331a-0410-800a-d7fa5415bdb3
inst->base and inst->u.meas.end are swapped, causing fped to crash in vec_at.
Also introduced a universal swap() function.
- util.h (swap): new swap function for arguments of any type
- gui_meas.c (begin_drag_move_meas, draw_move_meas): swap the endpoints if
moving an inverted measurement
- coord.c (sort_coord): use swap() instead of swap_coord
- coord.h, coord.c (swap_coord): removed
- gui_util.c (save_pix_buf): use swap() instead of open-coding the swap
- kicad.c (kicad_centric): use sort_coord instead of "manually" sorting the
coordinates
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5968 99fdad57-331a-0410-800a-d7fa5415bdb3
using frames to encapsulate building blocks, e.g., like macros or functions in
a programming language. Since measurements only know about the frame containing
a vector but not the frames containing that frame, invocations of this frame
from different places can only be distinguished within the min/next/max scheme.
(See the example in README.)
To eliminate this limitation, one needs a way to tell fped to consider a point
only if it has been instantiated through a certain path, e.g., by requiring
some other frames to be visited in its instantiation. This increases the number
of distinct points available for measurements.
The mechanism chosen is to qualify a measurement point with frames that lead to
it. This list of outer frames does not have to include all frames. Without
qualifying, the old behaviour results.
Note that this doesn't cover all possible ways in which a point can appear in
different roles. Multiple frame references can also result from repeating the
same frame reference in the same parent frame. The current qualification
mechanism does not allow such paths to be distinguished. However, one can
always introduce intermediate frames for this purpose.
Furthermore, repetitions create multiple instances of a point, although in what
should be considered the same role.
- fpd.l: make scanner support free-format a little better by switching back to
keyword mode after frame braces. This way, one can write a simple frame in a
single line, which is useful for regression tests.
- fpd.l, fpd.y, README, test/dbg_meas: added %meas directive to print the
result of a measurement
- fpd.y, README: measurements can now be labeled. Note that, due to limitations
of the grammar, the first measurement cannot be labeled.
- error.h, error.c (yywarn): new function for non-fatal diagnostics that always
get reported to standard error
- bitset.h, bitset.c: functions to manipulate variable-size bit sets
- meas.h, fpd.y, README, test/meas_qual: added the means to specify qualifiers
for points used in measurements
- dump.c (print_meas_base, print_meas): dump qualifiers
- delete.c (delete_references, test/del_frame): delete measurements that
reference a frame being deleted in their qualifiers
- obj.h, obj.c (enumerate_frames, instantiate): enumerate all frames so that we
have an index into the bit vector of visited frames
- meas.h, meas.c (reset_samples, meas_post), obj.c (generate_vecs,
generate_frame, instantiate): record the set of frames visited for each
sample
- meas.c (meas_post): only treat two instances of a point as equivalent if the
set of frames visited of one of them is a superset of set of the other. In
this case, keep the union of the two sets.
- meas.h, meas.c (meas_find_min, meas_find_next, meas_find_max),
test/meas_qual: instantiate_meas_pkg only select points for which all frames
in the qualification have been visited
- gui_meas.c (is_min, is_next, is_max, is_a_next): updated for above change
- inst.h, inst.c (curr_frame, propagate_bbox, add_inst, inst_begin_frame,
inst_end_frame, inst_start): renamed curr_frame to frame_instantiating to
avoid clash with curr_frame in fpd.y
- inst.h, inst.c (find_meas_hint): make global
- test/structure, test/del_vec, test/del_frame: fped now warns if a measurement
is in an unlinked frame. Changed regressions tests to avoid this warning.
- test/Common: new function expect_grep to compare only part of the output
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5967 99fdad57-331a-0410-800a-d7fa5415bdb3
output.
- postscript.h (postscript_params): didn't declare this global variable
- postscript.c (ps_package_fullpage): if postscript_params.zoom is non-zero,
scale to this value (instead of auto-scaling)
- fped.c (usage, main): added option "-s scale" to set the scale factor for -P
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5954 99fdad57-331a-0410-800a-d7fa5415bdb3
strings but weren't escaped until now.
- postscript.c: output all Postscript strings with ps_string, which correctly
escapes parentheses and backslashes
- TODO: removed the bug entry
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5952 99fdad57-331a-0410-800a-d7fa5415bdb3
- removed root_frame. "frames" now takes its place.
- removed frame->prev. In those few cases where we need the previous frame (for
deletion and dumping), we walk the list or recurse.
- the list of frames is now in GUI order, not file order.
- when reading the .fpd file, put the root frame first and leave it there.
- instead of walking the frames list and excluding the root frame by testing
frame->name, just start at frames->next
- likewise, instead of testing !frame->name just use frame == frames
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5948 99fdad57-331a-0410-800a-d7fa5415bdb3
to also delete frames and items in other frames than the current one, and added
the corresponding regression tests.
- fpd.y, README: %del can now also delete frames
- test/del_frame: regression test for frame deletion
- fpd.y: moved all debug items into debug_item, so that they can be invoked
after defining measurements
- README: clarified that object labels aren't entirely hidden in the GUI
- delete.c (delete_references): also delete measurements referencing the frame
(test/del_frame)
- fpd.y (dbg_link_frame): described why we need base_frame in addition to
base_vec
- fpd.y, README: %del can now also reach into frames other than the current one
- delete.c (do_delete_vec): also delete references in the root frame, i.e.,
measurements (tests/del_vec)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5947 99fdad57-331a-0410-800a-d7fa5415bdb3
through-hole pads, this could easily make them disappear into the hole. We now
draw them outside the hole.
- gui_inst.c: when showing through-hole pads, gui_draw_pad_text now places the
pad name into the largest area of the pad outside the hole
- test/frame_ref: removed redundant "with" in all titles
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5946 99fdad57-331a-0410-800a-d7fa5415bdb3
fine. Anyway, here's a new debug construct (%frame) and a bunch of new
regression tests.
- fpd.y, fpd.l, README: added new directive %frame to link frames also to other
frames than the current one (like in the GUI)
- gui_tool.h, gui_tool.c: export is_parent_of
- test/frame_ref: regression tests to ensure that frame order remains valid,
even if we reference late from early frames
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5945 99fdad57-331a-0410-800a-d7fa5415bdb3
found in the process. Also taught the regression test system a new trick: the
path to "fped" can be passed in the environment variable FPED. E.g.,
FPED=fped.r5943 make test
- fped.c (usage, main): duplicating the -T option produces a dump to stdout
before exiting (like %dump would)
- test/Common: new command fped_dump to invoked fped with a second -T option
- test/Common: if the environment variable FPED is set, use its content to
invoke fped (default is ../fped)
- test/Common: if the environment variable CWD_PREFIX is set, prepend it to
$FPED if the latter is a relative path
- Makefile (test, tests): set CWD_PREFIX to .., so that the path given in FPED
is valid at the point of invocation
- fpd.y: revised grammar to make "package" optional
- fpd.y: measurements were syntactically allowed inside non-root frame
(test/structure)
- test/structure: test various combinations of the grammatical file structure
- test/tsort: removed all the now unnecessary "package" directives
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5944 99fdad57-331a-0410-800a-d7fa5415bdb3
the topological sort. "make test" or "make tests" invokes the regression tests,
"make valgrind" runs them under valgrind's watchful eyes.
- fped.c (usage, main): added option -T to force batch mode (for regression
testing)
- Makefile, test/Common: added regression test infrastructure
- test/tsort: test cases for the topological sort
- README: added pointer to test/tsort
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5943 99fdad57-331a-0410-800a-d7fa5415bdb3
- gui_style.c (gc_rim): slightly increased brightness when inactive
- kicad.c (kicad_pad): move coordinate transform to new function kicad_centric
- kicad.c: added pads with holes and mechanical holes
- inst.h (struct inst.u.hole), inst.c (inst_hole): added "layers" field, like
for pads
- layer.c (LAYER_COPPER, LAYER_PASTE, LAYER_MASK): renamed to LAYER_*_TOP and
added macros for corresponding bottom layers
- layer.c (refine_layers): mirror top layers of through-hole pads
- layer.h, layer.c (mech_hole_layers): return the layer set for mechanical
layers
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5941 99fdad57-331a-0410-800a-d7fa5415bdb3
- overlap.c (inside, test_overlap): check for instance type
- overlap.c (inside, test_overlap): support hole instances
- README: put a pointer to the GUI description at the beginning
- README, gui.html: documented role and creation of holes
- inst.h: holes can now link to pads and vice versa
- hole.c, obj.c (instantiate): connect holes with pads and apply consistency
checks
- postscript.c: added output for holes
- icons/hole.fig: make hatched surroundings of hole look more round
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5940 99fdad57-331a-0410-800a-d7fa5415bdb3
infrastructure for hole objects. (Postscript and KiCad output are still
missing, and so does sanity checking.)
- gui_tool.c (new_obj_unconnected): set obj->name to NULL
- added hole objects to tool bar, all the various GUI routines, the .fpd
parser, and the .fpd dumper
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5939 99fdad57-331a-0410-800a-d7fa5415bdb3
drag-drop. So we have to explicitly clear "dragging", or the last frame
successfully referenced suddenly becomes unselectable.
- gui_frame_drag.c (drag_canvas_drop): call drag_end to clear "dragging"
- TODO: removed the entry about the frame reference procedure
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5938 99fdad57-331a-0410-800a-d7fa5415bdb3
documentation.
- Makefile, icons/frame_locked.fig, icons/frame_ready.fig: removed the icons of
locked and ready frames
- gui_tool.c: removed the frame tool and all the image handling associated with
it, leaving only the bits in place that are used by frame to canvas dragging
- gui_tool.h, gui_tool.c (tool_frame_update, tool_frame_deleted), gui_canvas.c
(key_press_event), gui_frame.c (popup_del_frame, select_frame): removed
the notifications of frame changes
- gui.html: removed the old clumsy frame reference procedure and described the
new way
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5937 99fdad57-331a-0410-800a-d7fa5415bdb3
avoid accidently dragging away bits the selected item (and confusing the
internal logic of the hover and drag system in the process), we have to make
sure nothing is selected when we enter the canvas.
- gui_canvas.c (canvas_frame_begin): make sure no instance is selected
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5936 99fdad57-331a-0410-800a-d7fa5415bdb3
tool, with all the old code still around, so the code paths are a bit obscure.
- gui_frame_drag.c: use GTK_DEST_DEFAULT_MOTION instead of
GTK_DEST_DEFAULT_HIGHLIGHT
- gui_frame_drag.c: put meat on the frame and canvas drag and drop skeleton
- gui_frame_drag.c (setup_frame_drag, setup_canvas_drag): use GDK_ACTION_COPY
instead of GDK_ACTION_PRIVATE
- gui_frame_drag.h, gui_frame_drag.c (is_dragging_anything): new helper
function to check if we're dragging anything, without specifying what
- gui_canvas.h, gui_canvas.c: added thin interface layer between gui_frame.c
and gui_tool.c
- gui_canvas.c (enter_notify_event, leave_notify_event): return FALSE so that
other widgets can get the events, too
- gui_tool.h, gui_tool.c (tool_hover): return whether we found anything to
hover on
- gui_tool.h, gui_tool.c: added interface for dropping a frame on the canvas
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5932 99fdad57-331a-0410-800a-d7fa5415bdb3