[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: o_basic.nw
User: danmc
Date: 06/04/23 23:06:57
Modified: . o_basic.nw o_buffer.nw o_copy.nw o_find.nw
o_select.nw o_text.nw x_image.nw x_print.nw
Log:
Repair a segfault introduced by my last commit. This makes sure we always
pass in the correct types to o_select_run_hooks(). For the deselect all,
we just pass in a NULL value for o_current and make sure we detect that.
Revision Changes Path
1.14 +1 -1 eda/geda/devel/gschem/noweb/o_basic.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_basic.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/o_basic.nw,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- o_basic.nw 23 Apr 2006 03:48:27 -0000 1.13
+++ o_basic.nw 24 Apr 2006 03:06:56 -0000 1.14
@@ -225,7 +225,7 @@
o_unselect_all(TOPLEVEL *w_current)
{
if (!w_current->SHIFTKEY) {
- o_select_run_hooks(w_current, w_current->page_current->selection2_head, 2);
+ o_select_run_hooks(w_current, NULL, 2);
o_selection_remove_most(w_current, w_current->page_current->
selection2_head);
}
1.10 +1 -1 eda/geda/devel/gschem/noweb/o_buffer.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_buffer.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/o_buffer.nw,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- o_buffer.nw 23 Apr 2006 03:48:27 -0000 1.9
+++ o_buffer.nw 24 Apr 2006 03:06:56 -0000 1.10
@@ -281,7 +281,7 @@
g_list_free(connected_objects);
connected_objects = NULL;
- o_select_run_hooks(w_current, w_current->page_current->selection2_head, 2);
+ o_select_run_hooks(w_current, NULL, 2);
o_selection_remove_most(w_current,
w_current->page_current->selection2_head);
o_selection_destroy_head(w_current->page_current->selection2_head);
1.12 +1 -1 eda/geda/devel/gschem/noweb/o_copy.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_copy.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/o_copy.nw,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- o_copy.nw 23 Apr 2006 03:48:27 -0000 1.11
+++ o_copy.nw 24 Apr 2006 03:06:56 -0000 1.12
@@ -487,7 +487,7 @@
x_get_darkcolor(w_current->bb_color), TRUE);
}
- o_select_run_hooks(w_current, w_current->page_current->selection2_head, 2);
+ o_select_run_hooks(w_current, NULL, 2);
o_selection_remove_most(w_current,
w_current->page_current->selection2_head);
o_selection_destroy_head(w_current->page_current->selection2_head);
1.8 +1 -1 eda/geda/devel/gschem/noweb/o_find.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_find.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/o_find.nw,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- o_find.nw 23 Apr 2006 03:48:27 -0000 1.7
+++ o_find.nw 24 Apr 2006 03:06:56 -0000 1.8
@@ -135,7 +135,7 @@
#if DEBUG
o_selection_print_all( w_current->page_current->selection2_head);
#endif
- o_select_run_hooks(w_current, w_current->page_current->selection2_head, 2);
+ o_select_run_hooks(w_current, NULL, 2);
o_selection_remove_most(w_current,
w_current->page_current->selection2_head);
}
1.10 +14 -16 eda/geda/devel/gschem/noweb/o_select.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_select.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/o_select.nw,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- o_select.nw 23 Apr 2006 03:48:27 -0000 1.9
+++ o_select.nw 24 Apr 2006 03:06:56 -0000 1.10
@@ -105,6 +105,7 @@
* between schematics and PCB layout or schematics and simulation results.
*/
if ( (scm_hook_empty_p(select_component_hook) == SCM_BOOL_F)
+ && o_current
&& (o_current->type == OBJ_COMPLEX)
&& flag == 1 )
{
@@ -119,6 +120,7 @@
* between schematics and PCB layout or schematics and simulation results.
*/
if ( (scm_hook_empty_p(deselect_component_hook) == SCM_BOOL_F)
+ && o_current
&& (o_current->type == OBJ_COMPLEX)
&& flag == 0 )
{
@@ -133,6 +135,7 @@
* between schematics and PCB layout or schematics and simulation results.
*/
if ( (scm_hook_empty_p(select_net_hook) == SCM_BOOL_F)
+ && o_current
&& (o_current->type == OBJ_NET)
&& flag == 1)
{
@@ -147,6 +150,7 @@
* between schematics and PCB layout or schematics and simulation results.
*/
if ( (scm_hook_empty_p(select_net_hook) == SCM_BOOL_F)
+ && o_current
&& (o_current->type == OBJ_NET)
&& flag == 0)
{
@@ -197,7 +201,7 @@
/* condition: for both multiple and single object added */
/* result: remove all objects from selection */
if (count == 0 && !CONTROLKEY) {
- o_select_run_hooks(w_current, w_current->page_current->selection2_head, 2);
+ o_select_run_hooks(w_current, NULL, 2);
o_selection_remove_most(w_current,
w_current->page_current->selection2_head);
}
@@ -206,8 +210,7 @@
} /* end shift key switch */
/* object not select, add it to the selection list */
- o_select_run_hooks(w_current->page_current->selection2_head,
- o_current, 1);
+ o_select_run_hooks(w_current, o_current, 1);
o_selection_add(w_current->page_current->selection2_head,
o_current);
@@ -223,8 +226,7 @@
/* condition: not doing multiple */
/* result: remove object from selection */
if (type != MULTIPLE) {
- o_select_run_hooks(w_current->page_current->selection2_head,
- o_current, 0);
+ o_select_run_hooks(w_current, o_current, 0);
o_selection_remove(
w_current->page_current->selection2_head,
o_current);
@@ -240,12 +242,11 @@
/* 1st result: remove all objects from selection */
/* 2nd result: add object to selection */
if (type == MULTIPLE && count == 0 && !CONTROLKEY) {
- o_select_run_hooks(w_current, w_current->page_current->selection2_head, 2);
+ o_select_run_hooks(w_current, NULL, 2);
o_selection_remove_most(w_current,
w_current->page_current->selection2_head);
- o_select_run_hooks(w_current->page_current->selection2_head,
- o_current, 1);
+ o_select_run_hooks(w_current, o_current, 1);
o_selection_add(
w_current->page_current->selection2_head,
o_current);
@@ -256,21 +257,18 @@
/* 1st result: remove all objects from selection */
/* 2nd result: add object to selection list */
if (type == SINGLE && !CONTROLKEY) {
- o_select_run_hooks(w_current, w_current->page_current->selection2_head, 2);
+ o_select_run_hooks(w_current, NULL, 2);
o_selection_remove_most(w_current,
w_current->page_current->selection2_head);
- o_select_run_hooks(
- w_current->page_current->selection2_head,
- o_current, 1);
+ o_select_run_hooks (w_current, o_current, 1);
o_selection_add(
w_current->page_current->selection2_head,
o_current);
}
if (CONTROLKEY) {
- o_select_run_hooks(w_current->page_current->selection2_head,
- o_current, 0);
+ o_select_run_hooks(w_current, o_current, 0);
o_selection_remove(
w_current->page_current->selection2_head,
o_current);
@@ -497,7 +495,7 @@
/* zero, and you need to deselect anything remaining (unless the shift */
/* key was pressed */
if (count == 0 && !SHIFTKEY)
- o_select_run_hooks(w_current, w_current->page_current->selection2_head, 2);
+ o_select_run_hooks(w_current, NULL, 2);
o_selection_remove_most(w_current,
w_current->page_current->selection2_head);
@@ -562,7 +560,7 @@
void
o_select_unselect_all(TOPLEVEL *w_current)
{
- o_select_run_hooks(w_current, w_current->page_current->selection2_head, 2);
+ o_select_run_hooks(w_current, NULL, 2);
o_selection_remove_most(w_current,
w_current->page_current->selection2_head);
}
1.20 +1 -1 eda/geda/devel/gschem/noweb/o_text.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_text.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/o_text.nw,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- o_text.nw 23 Apr 2006 03:48:27 -0000 1.19
+++ o_text.nw 24 Apr 2006 03:06:56 -0000 1.20
@@ -655,7 +655,7 @@
w_current->override_color = -1;
w_current->page_current->CHANGED=1;
- o_select_run_hooks(w_current, w_current->page_current->selection2_head, 2);
+ o_select_run_hooks(w_current, NULL, 2);
o_selection_remove_most(w_current,
w_current->page_current->selection2_head);
o_selection_add(w_current->page_current->selection2_head,
1.23 +1 -1 eda/geda/devel/gschem/noweb/x_image.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_image.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/x_image.nw,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- x_image.nw 23 Apr 2006 03:48:27 -0000 1.22
+++ x_image.nw 24 Apr 2006 03:06:56 -0000 1.23
@@ -361,7 +361,7 @@
page_center_top + (page_height / 2));
/* de select everything first */
- o_select_run_hooks(w_current, w_current->page_current->selection2_head, 2);
+ o_select_run_hooks(w_current, NULL, 2);
o_selection_remove_most(w_current,
w_current->page_current->
selection2_head);
1.17 +1 -1 eda/geda/devel/gschem/noweb/x_print.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_print.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/x_print.nw,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- x_print.nw 23 Apr 2006 03:48:27 -0000 1.16
+++ x_print.nw 24 Apr 2006 03:06:56 -0000 1.17
@@ -356,7 +356,7 @@
if (filename[0] != '\0') {
/* de select everything first */
- o_select_run_hooks(w_current, w_current->page_current->selection2_head, 2);
+ o_select_run_hooks(w_current, NULL, 2);
o_selection_remove_most(w_current,
w_current->page_current->
selection2_head);