On Tuesday 01 January 2008 04:28:25 Hamish Moffatt wrote: > On Mon, Dec 31, 2007 at 10:39:13PM -0500, Ales Hvezda wrote: > > Just for kicks, I have released a stable snapshot of gEDA/gaf today > > (1.2.1). This snapshot picks up various bug fixes that are worth having > > in a stable release, however, nobody asked for any of them (maybe nobody > > is using 1.2.0?). > > Cool. I started on packaging, but I've encountered a problem. libgeda is > still version 31 so existing gschem binaries will use it. However when > gschem 1.2.0 is run with the libgeda from 1.2.1, it just quietly exits. > strace shows that it is actually segfaulting and catching it.
Hi Hamish,
Although for some reason I can't duplicate this, your problems are probably my
fault; I picked commit 805452b8ce8be5c85fdfc87ba3281192decdbcd9 for stable,
and it changes the ABI.
Please revert it with the attached patch (in a dpatch?) and see if it helps.
Thanks,
Peter
--
Peter Brett
Electronic Systems Engineer
Integral Informatics Ltd
From 7a256af6a6688144178aa05b5ae62edbd17d58ed Mon Sep 17 00:00:00 2001
From: Peter TB Brett <[EMAIL PROTECTED]>
Date: Tue, 1 Jan 2008 08:22:53 +0000
Subject: [PATCH] Revert ABI change.
The ABI was incorrectly altered in commit
1b0e762a8ba1d9822eaffa155a8b92dbce08aaf8. This patch reverts it in
order to maintain ABI compatibility with the 1.2.0 release.
---
gschem/src/o_copy.c | 11 +++--------
libgeda/include/prototype.h | 1 -
libgeda/src/o_arc_basic.c | 13 ++++++++++++-
libgeda/src/o_attrib.c | 24 ------------------------
libgeda/src/o_box_basic.c | 13 ++++++++++++-
libgeda/src/o_bus_basic.c | 14 +++++++++++++-
libgeda/src/o_circle_basic.c | 15 +++++++++++++--
libgeda/src/o_complex_basic.c | 28 ++++++++++++++++++++++++++--
libgeda/src/o_line_basic.c | 14 ++++++++++++--
libgeda/src/o_list.c | 24 +++++++-----------------
libgeda/src/o_net_basic.c | 14 +++++++++++++-
libgeda/src/o_picture.c | 14 ++++++++++++--
libgeda/src/o_pin_basic.c | 13 ++++++++++++-
13 files changed, 135 insertions(+), 63 deletions(-)
diff --git a/gschem/src/o_copy.c b/gschem/src/o_copy.c
index 3253973..a78b810 100644
--- a/gschem/src/o_copy.c
+++ b/gschem/src/o_copy.c
@@ -405,6 +405,9 @@ void o_copy_end(TOPLEVEL *w_current)
w_current,
object->attached_to->copied_to);
#endif
+
+ /* satisfied copy request */
+ object->attached_to->copied_to = NULL;
}
}
@@ -446,14 +449,6 @@ void o_copy_end(TOPLEVEL *w_current)
s_current = s_current->next;
}
- /* Clean up dangling ATTRIB.copied_to pointers */
- s_current = geda_list_get_glist( w_current->page_current->selection_list );
- while(s_current != NULL) {
- object = s_current->data;
- o_attrib_list_copied_to (object->attribs, NULL);
- s_current = g_list_next (s_current);
- }
-
/* This is commented out since it breaks the copy of objects. */
/* Required connection information is thrown away for some reason */
/* Of course, commenting this out, will probably break the rotation */
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index ec9aa4f..8ecd553 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -205,7 +205,6 @@ int o_attrib_count_toplevel(TOPLEVEL *w_current, char *name);
char *o_attrib_search_toplevel_all(PAGE *page_head, char *name);
OBJECT **o_attrib_return_attribs(OBJECT *object_list, OBJECT *sel_object);
void o_attrib_free_returned(OBJECT **found_objects);
-void o_attrib_list_copied_to(ATTRIB *list, OBJECT *to_obj);
/* o_basic.c */
int inside_region(int xmin, int ymin, int xmax, int ymax, int x, int y);
diff --git a/libgeda/src/o_arc_basic.c b/libgeda/src/o_arc_basic.c
index 060a773..f750cb5 100644
--- a/libgeda/src/o_arc_basic.c
+++ b/libgeda/src/o_arc_basic.c
@@ -150,6 +150,7 @@ OBJECT *o_arc_copy(TOPLEVEL *w_current, OBJECT *list_tail,
OBJECT *o_current)
{
OBJECT *new_obj;
+ ATTRIB *a_current;
int color;
if (o_current->saved_color == -1) {
@@ -169,8 +170,18 @@ OBJECT *o_arc_copy(TOPLEVEL *w_current, OBJECT *list_tail,
o_current->line_length, o_current->line_space);
o_set_fill_options(w_current, new_obj,
FILLING_HOLLOW, -1, -1, -1, -1, -1);
+
+ a_current = o_current->attribs;
+ if (a_current) {
+ while (a_current) {
- o_attrib_list_copied_to (o_current->attribs, new_obj);
+ /* head attrib node has prev = NULL */
+ if (a_current->prev != NULL) {
+ a_current->copied_to = new_obj;
+ }
+ a_current = a_current->next;
+ }
+ }
return(new_obj);
}
diff --git a/libgeda/src/o_attrib.c b/libgeda/src/o_attrib.c
index 7b38a75..1e4317d 100644
--- a/libgeda/src/o_attrib.c
+++ b/libgeda/src/o_attrib.c
@@ -2562,27 +2562,3 @@ void o_attrib_free_returned(OBJECT **found_objects)
g_free(found_objects);
}
-
-
-/*! \brief Set the copied_to property on a list of attributes
- * \par Function Description
- * Sets the copied_to property on a list of attributes.
- * Used when copying objects with attributes.
- *
- * \param [in] list List of attributes to set
- * \param [in] to_obj OBEJCT to set copied_to
- */
-void o_attrib_list_copied_to(ATTRIB *list, OBJECT *to_obj)
-{
- ATTRIB *a_current;
-
- a_current = list;
- while ( a_current ) {
-
- /* head attrib node has prev = NULL */
- if (a_current->prev != NULL) {
- a_current->copied_to = to_obj;
- }
- a_current = a_current->next;
- }
-}
diff --git a/libgeda/src/o_box_basic.c b/libgeda/src/o_box_basic.c
index e1f9c22..d700aab 100644
--- a/libgeda/src/o_box_basic.c
+++ b/libgeda/src/o_box_basic.c
@@ -142,6 +142,7 @@ OBJECT *o_box_add(TOPLEVEL *w_current, OBJECT *object_list,
OBJECT *o_box_copy(TOPLEVEL *w_current, OBJECT *list_tail, OBJECT *o_current)
{
OBJECT *new_obj;
+ ATTRIB *a_current;
int color;
if (o_current->saved_color == -1) {
@@ -187,7 +188,17 @@ OBJECT *o_box_copy(TOPLEVEL *w_current, OBJECT *list_tail, OBJECT *o_current)
o_box_recalc(w_current, new_obj);
/* new_obj->attribute = 0;*/
- o_attrib_list_copied_to (o_current->attribs, new_obj);
+ a_current = o_current->attribs;
+ if (a_current) {
+ while ( a_current ) {
+
+ /* head attrib node has prev = NULL */
+ if (a_current->prev != NULL) {
+ a_current->copied_to = new_obj;
+ }
+ a_current = a_current->next;
+ }
+ }
/* return the new tail of the object list */
return(new_obj);
diff --git a/libgeda/src/o_bus_basic.c b/libgeda/src/o_bus_basic.c
index 40ca803..83e97e4 100644
--- a/libgeda/src/o_bus_basic.c
+++ b/libgeda/src/o_bus_basic.c
@@ -245,6 +245,7 @@ void o_bus_translate_world(TOPLEVEL *w_current, int x1, int y1, OBJECT *object)
OBJECT *o_bus_copy(TOPLEVEL *w_current, OBJECT *list_tail, OBJECT *o_current)
{
OBJECT *new_obj;
+ ATTRIB *a_current;
int color;
if (o_current->saved_color == -1) {
@@ -267,7 +268,18 @@ OBJECT *o_bus_copy(TOPLEVEL *w_current, OBJECT *list_tail, OBJECT *o_current)
new_obj->line->x[1] = o_current->line->x[1];
new_obj->line->y[1] = o_current->line->y[1];
- o_attrib_list_copied_to (o_current->attribs, new_obj);
+ a_current = o_current->attribs;
+
+ if (a_current) {
+ while ( a_current ) {
+
+ /* head attrib node has prev = NULL */
+ if (a_current->prev != NULL) {
+ a_current->copied_to = new_obj;
+ }
+ a_current = a_current->next;
+ }
+ }
return(new_obj);
}
diff --git a/libgeda/src/o_circle_basic.c b/libgeda/src/o_circle_basic.c
index fcebc75..a2c0891 100644
--- a/libgeda/src/o_circle_basic.c
+++ b/libgeda/src/o_circle_basic.c
@@ -129,6 +129,7 @@ OBJECT *o_circle_copy(TOPLEVEL *w_current, OBJECT *list_tail,
OBJECT *o_current)
{
OBJECT *new_obj;
+ ATTRIB *a_current;
int color;
if (o_current->saved_color == -1) {
@@ -171,8 +172,18 @@ OBJECT *o_circle_copy(TOPLEVEL *w_current, OBJECT *list_tail,
o_circle_recalc(w_current, new_obj);
/* new_obj->attribute = 0;*/
- o_attrib_list_copied_to (o_current->attribs, new_obj);
-
+ a_current = o_current->attribs;
+ if (a_current) {
+ while ( a_current ) {
+
+ /* head attrib node has prev = NULL */
+ if (a_current->prev != NULL) {
+ a_current->copied_to = new_obj;
+ }
+ a_current = a_current->next;
+ }
+ }
+
return(new_obj);
}
diff --git a/libgeda/src/o_complex_basic.c b/libgeda/src/o_complex_basic.c
index 175a231..03fa010 100644
--- a/libgeda/src/o_complex_basic.c
+++ b/libgeda/src/o_complex_basic.c
@@ -944,6 +944,7 @@ OBJECT *o_complex_copy(TOPLEVEL *w_current, OBJECT *list_tail,
OBJECT *o_current)
{
OBJECT *new_obj=NULL;
+ ATTRIB *a_current;
int color;
int selectable;
const CLibSymbol *clib = NULL;
@@ -978,7 +979,18 @@ OBJECT *o_complex_copy(TOPLEVEL *w_current, OBJECT *list_tail,
/* here you need to create a list of attributes which need to be
* connected to the new list, probably make an attribute list and
* fill it with sid's of the attributes */
- o_attrib_list_copied_to (o_current->attribs, new_obj);
+ a_current = o_current->attribs;
+ if (a_current) {
+ while ( a_current ) {
+
+ /* head attrib node has prev = NULL */
+ if (a_current->prev != NULL) {
+ a_current->copied_to = new_obj;
+ }
+
+ a_current = a_current->next;
+ }
+ }
return(new_obj);
}
@@ -992,6 +1004,7 @@ OBJECT *o_complex_copy_embedded(TOPLEVEL *w_current, OBJECT *list_tail,
{
OBJECT *new_obj=NULL;
OBJECT *temp_list;
+ ATTRIB *a_current;
int color;
int selectable;
@@ -1027,7 +1040,18 @@ OBJECT *o_complex_copy_embedded(TOPLEVEL *w_current, OBJECT *list_tail,
/* here you need to create a list of attributes which need to be
* connected to the new list, probably make an attribute list and
* fill it with sid's of the attributes */
- o_attrib_list_copied_to (o_current->attribs, new_obj);
+ a_current = o_current->attribs;
+ if (a_current) {
+ while ( a_current ) {
+
+ /* head attrib node has prev = NULL */
+ if (a_current->prev != NULL) {
+ a_current->copied_to = new_obj;
+ }
+
+ a_current = a_current->next;
+ }
+ }
return(new_obj);
}
diff --git a/libgeda/src/o_line_basic.c b/libgeda/src/o_line_basic.c
index d091284..3ec08a8 100644
--- a/libgeda/src/o_line_basic.c
+++ b/libgeda/src/o_line_basic.c
@@ -124,6 +124,7 @@ OBJECT *o_line_add(TOPLEVEL *w_current, OBJECT *object_list,
OBJECT *o_line_copy(TOPLEVEL *w_current, OBJECT *list_tail, OBJECT *o_current)
{
OBJECT *new_obj;
+ ATTRIB *a_current;
int color;
if (o_current->saved_color == -1) {
@@ -169,8 +170,17 @@ OBJECT *o_line_copy(TOPLEVEL *w_current, OBJECT *list_tail, OBJECT *o_current)
o_line_recalc(w_current, o_current);
/* new_obj->attribute = 0;*/
- o_attrib_list_copied_to (o_current->attribs, new_obj);
-
+ a_current = o_current->attribs;
+ if (a_current) {
+ while ( a_current ) {
+ /* head attrib node has prev = NULL */
+ if (a_current->prev != NULL) {
+ a_current->copied_to = new_obj;
+ }
+ a_current = a_current->next;
+ }
+ }
+
/* return the new tail of the object list */
return(new_obj);
}
diff --git a/libgeda/src/o_list.c b/libgeda/src/o_list.c
index 64f7397..bb1d7db 100644
--- a/libgeda/src/o_list.c
+++ b/libgeda/src/o_list.c
@@ -219,20 +219,16 @@ OBJECT *o_list_copy_all(TOPLEVEL *w_current, OBJECT *src_list_head,
o_attrib_attach(w_current,
w_current->page_current->object_parent,
dest, src->attached_to->copied_to);
- }
+
+ /* satisfied copy request */
+ src->attached_to->copied_to = NULL;
+ }
}
}
src = src->next;
}
- /* Clean up dangling ATTRIB.copied_to pointers */
- src = src_list_head;
- while(src != NULL) {
- o_attrib_list_copied_to (src->attribs, NULL);
- src = src->next;
- }
-
w_current->ADDING_SEL = adding_sel_save;
w_current->page_current->object_parent = temp_parent;
@@ -340,7 +336,9 @@ OBJECT *o_list_copy_all_selection2(TOPLEVEL *w_current,
o_attrib_attach(w_current,
w_current->page_current->object_parent,
dest, object->attached_to->copied_to);
- }
+ /* satisfied copy request */
+ object->attached_to->copied_to = NULL;
+ }
}
}
@@ -350,14 +348,6 @@ OBJECT *o_list_copy_all_selection2(TOPLEVEL *w_current,
src = src->next;
}
- /* Clean up dangling ATTRIB.copied_to pointers */
- src = src_list_head;
- while(src != NULL) {
- object = src->data;
- o_attrib_list_copied_to (object->attribs, NULL);
- src = g_list_next (src);
- }
-
w_current->ADDING_SEL = adding_sel_save;
w_current->page_current->object_parent = temp_parent;
diff --git a/libgeda/src/o_net_basic.c b/libgeda/src/o_net_basic.c
index 16f8148..89e34cf 100644
--- a/libgeda/src/o_net_basic.c
+++ b/libgeda/src/o_net_basic.c
@@ -258,6 +258,7 @@ OBJECT *o_net_copy(TOPLEVEL *w_current, OBJECT *list_tail,
OBJECT *o_current)
{
OBJECT *new_obj;
+ ATTRIB *a_current;
int color;
if (o_current->saved_color == -1) {
@@ -279,7 +280,18 @@ OBJECT *o_net_copy(TOPLEVEL *w_current, OBJECT *list_tail,
new_obj->line->x[1] = o_current->line->x[1];
new_obj->line->y[1] = o_current->line->y[1];
- o_attrib_list_copied_to (o_current->attribs, new_obj);
+ a_current = o_current->attribs;
+
+ if (a_current) {
+ while (a_current) {
+
+ /* head attrib node has prev = NULL */
+ if (a_current->prev != NULL) {
+ a_current->copied_to = new_obj;
+ }
+ a_current = a_current->next;
+ }
+ }
return (new_obj);
}
diff --git a/libgeda/src/o_picture.c b/libgeda/src/o_picture.c
index a2d72fe..0b0571b 100644
--- a/libgeda/src/o_picture.c
+++ b/libgeda/src/o_picture.c
@@ -759,6 +759,7 @@ OBJECT *o_picture_copy(TOPLEVEL *w_current, OBJECT *list_tail,
OBJECT *o_current)
{
OBJECT *new_obj;
+ ATTRIB *a_current;
int color;
if (o_current->saved_color == -1) {
@@ -815,8 +816,17 @@ OBJECT *o_picture_copy(TOPLEVEL *w_current, OBJECT *list_tail,
o_picture_recalc(w_current, new_obj);
/* new_obj->attribute = 0;*/
- o_attrib_list_copied_to (o_current->attribs, new_obj);
-
+ a_current = o_current->attribs;
+ if (a_current) {
+ while ( a_current ) {
+ /* head attrib node has prev = NULL */
+ if (a_current->prev != NULL) {
+ a_current->copied_to = new_obj;
+ }
+ a_current = a_current->next;
+ }
+ }
+
/* return the new tail of the object list */
return(new_obj);
}
diff --git a/libgeda/src/o_pin_basic.c b/libgeda/src/o_pin_basic.c
index c5945b3..64c8278 100644
--- a/libgeda/src/o_pin_basic.c
+++ b/libgeda/src/o_pin_basic.c
@@ -269,6 +269,7 @@ void o_pin_translate_world(TOPLEVEL *w_current, int x1, int y1, OBJECT *object)
OBJECT *o_pin_copy(TOPLEVEL *w_current, OBJECT *list_tail, OBJECT *o_current)
{
OBJECT *new_obj;
+ ATTRIB *a_current;
int color;
if (o_current->saved_color == -1) {
@@ -288,7 +289,17 @@ OBJECT *o_pin_copy(TOPLEVEL *w_current, OBJECT *list_tail, OBJECT *o_current)
new_obj->line->y[1] = o_current->line->y[1];
/* new_obj->attribute = 0;*/
- o_attrib_list_copied_to (o_current->attribs, new_obj);
+ a_current = o_current->attribs;
+ if (a_current) {
+ while ( a_current ) {
+
+ /* head attrib node has prev = NULL */
+ if (a_current->prev != NULL) {
+ a_current->copied_to = new_obj;
+ }
+ a_current = a_current->next;
+ }
+ }
return(new_obj);
}
--
1.5.3.3
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ geda-dev mailing list [email protected] http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev
