[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: g_smob.c
User: werner
Date: 06/12/12 12:32:58
Modified: . Tag: autonumber g_smob.c o_arc_basic.c
o_box_basic.c o_bus_basic.c o_circle_basic.c
o_complex_basic.c o_line_basic.c o_net_basic.c
o_picture.c o_pin_basic.c o_text_basic.c s_attrib.c
s_clib.c s_papersizes.c s_toplevel.c
Log:
sync autonumber branch with trunk
Revision Changes Path
No revision
No revision
1.9.2.1 +29 -1 eda/geda/gaf/libgeda/src/g_smob.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: g_smob.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/g_smob.c,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -b -r1.9 -r1.9.2.1
--- g_smob.c 1 Nov 2006 16:11:27 -0000 1.9
+++ g_smob.c 12 Dec 2006 17:32:56 -0000 1.9.2.1
@@ -220,6 +220,7 @@
g_get_attrib_name_value);
scm_c_define_gsubr ("get-attribute-bounds", 1, 0, 0, g_get_attrib_bounds);
+ scm_c_define_gsubr ("get-attribute-angle", 1, 0, 0, g_get_attrib_angle);
return;
@@ -231,7 +232,7 @@
* I got top and bottom values reversed from world_get_complex_bounds,
* so don\'t rely on the position in the list.
* \param[in] attrib_smob the attribute.
- * \return a list of the bounds of the <B>object smob</B>.
+ * \return a list of the bounds of the <B>attrib smob</B>.
* The list has the format: ( (left right) (top bottom) )
*/
SCM g_get_attrib_bounds(SCM attrib_smob)
@@ -266,6 +267,33 @@
return returned;
}
+/*! \brief Get the angle of an attribute.
+ * \par Function Description
+ * Get the angle of an attribute.
+ * \param[in] attrib_smob the attribute.
+ * \return the angle of the <B>attrib smob</B>.
+ */
+SCM g_get_attrib_angle(SCM attrib_smob)
+{
+ TOPLEVEL *w_current;
+ struct st_attrib_smob *attribute;
+
+ SCM_ASSERT ( SCM_NIMP(attrib_smob) &&
+ ((long) SCM_CAR(attrib_smob) == attrib_smob_tag),
+ attrib_smob, SCM_ARG1, "get-attribute-angle");
+
+ attribute = (struct st_attrib_smob *)SCM_CDR(attrib_smob);
+ w_current = attribute->world;
+
+ SCM_ASSERT ( attribute &&
+ attribute->attribute &&
+ attribute->attribute->object &&
+ attribute->attribute->object->text,
+ attrib_smob, SCM_ARG1, "get-attribute-angle");
+
+ return SCM_MAKINUM(attribute->attribute->object->text->angle);
+}
+
/*! \brief Free object smob memory.
* \par Function Description
* Free the memory allocated by the object smob and return its size.
1.29.4.1 +17 -12 eda/geda/gaf/libgeda/src/o_arc_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_arc_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_arc_basic.c,v
retrieving revision 1.29
retrieving revision 1.29.4.1
diff -u -b -r1.29 -r1.29.4.1
--- o_arc_basic.c 22 Sep 2006 18:48:07 -0000 1.29
+++ o_arc_basic.c 12 Dec 2006 17:32:56 -0000 1.29.4.1
@@ -119,10 +119,8 @@
/* new_node->graphical = arc; eventually */
- /* \todo questionable cast */
- new_node->draw_func = (void *) arc_draw_func;
- /* \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = arc_draw_func;
+ new_node->sel_func = select_func;
/* \note
* The new object is linked to the object given in parameter object_list
@@ -867,43 +865,50 @@
}
#endif
arc_width = o_current->line_width; /* Added instead of above */
- if (arc_width <= 2) arc_width = 2;
+ if(arc_width <=2) {
+ if(w_current->line_style == THICK) {
+ arc_width=LINE_WIDTH;
+ } else {
+ arc_width=2;
+ }
+ }
+
length = o_current->line_length;
space = o_current->line_space;
switch(o_current->line_type) {
case(TYPE_SOLID):
length = -1; space = -1;
- outl_func = (void *) o_arc_print_solid;
+ outl_func = o_arc_print_solid;
break;
case(TYPE_DOTTED):
length = -1;
- outl_func = (void *) o_arc_print_dotted;
+ outl_func = o_arc_print_dotted;
break;
case(TYPE_DASHED):
- outl_func = (void *) o_arc_print_dashed;
+ outl_func = o_arc_print_dashed;
break;
case(TYPE_CENTER):
- outl_func = (void *) o_arc_print_center;
+ outl_func = o_arc_print_center;
break;
case(TYPE_PHANTOM):
- outl_func = (void *) o_arc_print_phantom;
+ outl_func = o_arc_print_phantom;
break;
case(TYPE_ERASE):
/* Unused for now, print it solid */
length = -1; space = -1;
- outl_func = (void *) o_arc_print_solid;
+ outl_func = o_arc_print_solid;
break;
}
if((space == 0) || (length == 0)) {
length = -1; space = -1;
- outl_func = (void *) o_arc_print_solid;
+ outl_func = o_arc_print_solid;
}
(*outl_func)(w_current, fp,
1.24.4.1 +22 -17 eda/geda/gaf/libgeda/src/o_box_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_box_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_box_basic.c,v
retrieving revision 1.24
retrieving revision 1.24.4.1
diff -u -b -r1.24 -r1.24.4.1
--- o_box_basic.c 22 Sep 2006 18:48:07 -0000 1.24
+++ o_box_basic.c 12 Dec 2006 17:32:57 -0000 1.24.4.1
@@ -119,10 +119,8 @@
o_set_fill_options(w_current, new_node,
FILLING_HOLLOW, -1, -1, -1, -1, -1);
- /* \todo questionable cast */
- new_node->draw_func = (void *) box_draw_func;
- /* \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = box_draw_func;
+ new_node->sel_func = select_func;
/* compute the bounding box */
o_box_recalc(w_current, new_node);
@@ -893,43 +891,50 @@
* case.
*/
line_width = o_current->line_width;
- if(line_width <=2) line_width=2;
+
+ if(line_width <=2) {
+ if(w_current->line_style == THICK) {
+ line_width=LINE_WIDTH;
+ } else {
+ line_width=2;
+ }
+ }
length = o_current->line_length;
space = o_current->line_space;
switch(o_current->line_type) {
case(TYPE_SOLID):
length = -1; space = -1;
- outl_func = (void *) o_box_print_solid;
+ outl_func = o_box_print_solid;
break;
case(TYPE_DOTTED):
length = -1;
- outl_func = (void *) o_box_print_dotted;
+ outl_func = o_box_print_dotted;
break;
case(TYPE_DASHED):
- outl_func = (void *) o_box_print_dashed;
+ outl_func = o_box_print_dashed;
break;
case(TYPE_CENTER):
- outl_func = (void *) o_box_print_center;
+ outl_func = o_box_print_center;
break;
case(TYPE_PHANTOM):
- outl_func = (void *) o_box_print_phantom;
+ outl_func = o_box_print_phantom;
break;
case(TYPE_ERASE):
/* Unused for now, print it solid */
length = -1; space = -1;
- outl_func = (void *) o_box_print_solid;
+ outl_func = o_box_print_solid;
break;
}
if((length == 0) || (space == 0)) {
length = -1; space = -1;
- outl_func = (void *) o_box_print_solid;
+ outl_func = o_box_print_solid;
}
(*outl_func)(w_current, fp,
@@ -962,16 +967,16 @@
angle1 = -1; pitch1 = 1;
angle2 = -1; pitch2 = 1;
fill_width = -1;
- fill_func = (void *) o_box_print_filled;
+ fill_func = o_box_print_filled;
break;
case(FILLING_MESH):
- fill_func = (void *) o_box_print_mesh;
+ fill_func = o_box_print_mesh;
break;
case(FILLING_HATCH):
angle2 = -1; pitch2 = 1;
- fill_func = (void *) o_box_print_hatch;
+ fill_func = o_box_print_hatch;
break;
case(FILLING_VOID):
@@ -979,7 +984,7 @@
angle1 = -1; pitch1 = 1;
angle2 = -1; pitch2 = 1;
fill_width = -1;
- fill_func = (void *) o_box_print_filled;
+ fill_func = o_box_print_filled;
break;
case(FILLING_HOLLOW):
/* nop */
@@ -990,7 +995,7 @@
if((pitch1 <= 0) || (pitch2 <= 0)) {
angle1 = -1; pitch1 = 1;
angle2 = -1; pitch2 = 1;
- fill_func = (void *) o_box_print_filled;
+ fill_func = o_box_print_filled;
}
(*fill_func)(w_current, fp,
1.15.4.1 +4 -4 eda/geda/gaf/libgeda/src/o_bus_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_bus_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_bus_basic.c,v
retrieving revision 1.15
retrieving revision 1.15.4.1
diff -u -b -r1.15 -r1.15.4.1
--- o_bus_basic.c 22 Sep 2006 18:48:07 -0000 1.15
+++ o_bus_basic.c 12 Dec 2006 17:32:57 -0000 1.15.4.1
@@ -146,10 +146,8 @@
new_node->right = right;
new_node->bottom = bottom;
- /*! \todo questionable cast */
- new_node->draw_func = (void *) bus_draw_func;
- /*! \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = bus_draw_func;
+ new_node->sel_func = select_func;
object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
@@ -836,6 +834,8 @@
object->top = top;
object->right = right;
object->bottom = bottom;
+
+ s_tile_update_object(w_current, object);
}
1.25.4.1 +21 -17 eda/geda/gaf/libgeda/src/o_circle_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_circle_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_circle_basic.c,v
retrieving revision 1.25
retrieving revision 1.25.4.1
diff -u -b -r1.25 -r1.25.4.1
--- o_circle_basic.c 22 Sep 2006 18:48:07 -0000 1.25
+++ o_circle_basic.c 12 Dec 2006 17:32:57 -0000 1.25.4.1
@@ -113,10 +113,8 @@
o_set_fill_options(w_current, new_node,
FILLING_HOLLOW, -1, -1, -1, -1, -1);
- /* \todo questionable cast */
- new_node->draw_func = (void *) circle_draw_func;
- /* \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = circle_draw_func;
+ new_node->sel_func = select_func;
/* compute the bounding box and screen coords */
o_circle_recalc(w_current, new_node);
@@ -830,43 +828,49 @@
* in such a case.
*/
circle_width = o_current->line_width;
- if(circle_width <= 2) circle_width=2;
+ if(circle_width <=2) {
+ if(w_current->line_style == THICK) {
+ circle_width=LINE_WIDTH;
+ } else {
+ circle_width=2;
+ }
+ }
length = o_current->line_length;
space = o_current->line_space;
switch(o_current->line_type) {
case(TYPE_SOLID):
length = -1; space = -1;
- outl_func = (void *) o_circle_print_solid;
+ outl_func = o_circle_print_solid;
break;
case(TYPE_DOTTED):
length = -1;
- outl_func = (void *) o_circle_print_dotted;
+ outl_func = o_circle_print_dotted;
break;
case(TYPE_DASHED):
- outl_func = (void *) o_circle_print_dashed;
+ outl_func = o_circle_print_dashed;
break;
case(TYPE_CENTER):
- outl_func = (void *) o_circle_print_center;
+ outl_func = o_circle_print_center;
break;
case(TYPE_PHANTOM):
- outl_func = (void *) o_circle_print_phantom;
+ outl_func = o_circle_print_phantom;
break;
case(TYPE_ERASE):
/* Unused for now print it solid */
length = -1; space = -1;
- outl_func = (void *) o_circle_print_solid;
+ outl_func = o_circle_print_solid;
break;
}
if((length == 0) || (space == 0)) {
length = -1; space = -1;
- outl_func = (void *) o_circle_print_solid;
+ outl_func = o_circle_print_solid;
}
(*outl_func)(w_current, fp,
@@ -899,16 +903,16 @@
angle1 = -1; pitch1 = 1;
angle2 = -1; pitch2 = 1;
fill_width = -1;
- fill_func = (void *) o_circle_print_filled;
+ fill_func = o_circle_print_filled;
break;
case(FILLING_MESH):
- fill_func = (void *) o_circle_print_mesh;
+ fill_func = o_circle_print_mesh;
break;
case(FILLING_HATCH):
angle2 = -1; pitch2 = 1;
- fill_func = (void *) o_circle_print_hatch;
+ fill_func = o_circle_print_hatch;
break;
case(FILLING_VOID):
@@ -916,7 +920,7 @@
angle1 = -1; pitch1 = 1;
angle2 = -1; pitch2 = 1;
fill_width = -1;
- fill_func = (void *) o_circle_print_filled;
+ fill_func = o_circle_print_filled;
break;
case(FILLING_HOLLOW):
@@ -927,7 +931,7 @@
if((pitch1 <= 0) || (pitch2 <= 0)) {
angle1 = -1; pitch1 = 1;
angle2 = -1; pitch2 = 1;
- fill_func = (void *) o_circle_print_filled;
+ fill_func = o_circle_print_filled;
}
(*fill_func)(w_current, fp,
1.27.4.1 +67 -33 eda/geda/gaf/libgeda/src/o_complex_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_complex_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_complex_basic.c,v
retrieving revision 1.27
retrieving revision 1.27.4.1
diff -u -b -r1.27 -r1.27.4.1
--- o_complex_basic.c 6 Aug 2006 16:45:31 -0000 1.27
+++ o_complex_basic.c 12 Dec 2006 17:32:57 -0000 1.27.4.1
@@ -220,85 +220,121 @@
}
-/*! \brief
- * \par Function Description
+/*! \brief Return the bounds of the given object.
+ * \par Given an object, calcule the bounds coordinates.
+ * \param [in] w_current The toplevel structure.
+ * \param [in] o_current The object to look the bounds for.
+ * \param [out] left pointer to the left coordinate of the object.
+ * \param [out] top pointer to the top coordinate of the object.
+ * \param [out] right pointer to the right coordinate of the object.
+ * \param [out] bottom pointer to the bottom coordinate of the object.
*
*/
-void world_get_complex_bounds(TOPLEVEL *w_current, OBJECT *complex,
- int *left, int *top, int *right, int *bottom)
+void world_get_single_object_bounds(TOPLEVEL *w_current, OBJECT *o_current,
+ int *left, int *top,
+ int *right, int *bottom)
{
- OBJECT *o_current=NULL;
- int rleft, rtop, rright, rbottom;
-
- *left = rleft = w_current->init_right;
- *top = rtop = w_current->init_bottom;;
- *right = rright = 0;
- *bottom = rbottom = 0;
-
- o_current = complex;
-
- while ( o_current != NULL ) {
+ if (o_current != NULL ) {
switch(o_current->type) {
case(OBJ_LINE):
- world_get_line_bounds(w_current, o_current->line, &rleft, &rtop, &rright, &rbottom);
+ world_get_line_bounds(w_current, o_current->line,
+ left, top, right, bottom);
break;
case(OBJ_NET):
/* same as a line (diff name)*/
- world_get_net_bounds(w_current, o_current->line, &rleft, &rtop, &rright, &rbottom);
+ world_get_net_bounds(w_current, o_current->line,
+ left, top, right, bottom);
break;
case(OBJ_BUS):
/* same as a line (diff name)*/
- world_get_bus_bounds(w_current, o_current->line, &rleft, &rtop, &rright, &rbottom);
+ world_get_bus_bounds(w_current, o_current->line,
+ left, top, right, bottom);
break;
case(OBJ_BOX):
- world_get_box_bounds(w_current, o_current->box, &rleft, &rtop, &rright, &rbottom);
+ world_get_box_bounds(w_current, o_current->box,
+ left, top, right, bottom);
break;
case(OBJ_PICTURE):
- world_get_picture_bounds(w_current, o_current->picture, &rleft, &rtop, &rright, &rbottom);
+ world_get_picture_bounds(w_current, o_current->picture,
+ left, top, right, bottom);
break;
case(OBJ_CIRCLE):
- world_get_circle_bounds(w_current, o_current->circle, &rleft, &rtop, &rright, &rbottom);
+ world_get_circle_bounds(w_current, o_current->circle,
+ left, top, right, bottom);
break;
case(OBJ_COMPLEX):
case(OBJ_PLACEHOLDER):
/* recursive objects ?*/
- world_get_complex_bounds(w_current, o_current->complex->prim_objs, &rleft, &rtop, &rright, &rbottom);
+ world_get_complex_bounds(w_current, o_current->complex->prim_objs,
+ left, top, right, bottom);
break;
case(OBJ_TEXT):
/* only do bounding boxes for visible or doing show hidden text */
/* you might lose some attrs though */
if (o_current->visibility == VISIBLE ||
- (o_current->visibility == INVISIBLE && w_current->show_hidden_text)) {
- world_get_text_bounds(w_current, o_current, &rleft, &rtop, &rright, &rbottom);
+ (o_current->visibility == INVISIBLE &&
+ w_current->show_hidden_text)) {
+ world_get_text_bounds(w_current, o_current,
+ left, top, right, bottom);
}
break;
case(OBJ_PIN):
- world_get_pin_bounds(w_current, o_current->line, &rleft, &rtop, &rright, &rbottom);
+ world_get_pin_bounds(w_current, o_current->line,
+ left, top, right, bottom);
break;
case(OBJ_ARC):
- world_get_arc_bounds(w_current, o_current, &rleft, &rtop, &rright, &rbottom);
+ world_get_arc_bounds(w_current, o_current,
+ left, top, right, bottom);
break;
default:
break;
}
+ }
+}
+
+
+/*! \brief Return the bounds of the given complex (or list of OBJECTs).
+ * \par Given a complex (list of objects), calcule the bounds coordinates.
+ * \param [in] w_current The toplevel structure.
+ * \param [in] complex The list of objects to look the bounds for.
+ * \param [out] left pointer to the left coordinate of the object.
+ * \param [out] top pointer to the top coordinate of the object.
+ * \param [out] right pointer to the right coordinate of the object.
+ * \param [out] bottom pointer to the bottom coordinate of the object.
+ */
+void world_get_complex_bounds(TOPLEVEL *w_current, OBJECT *complex,
+ int *left, int *top, int *right, int *bottom)
+{
+ OBJECT *o_current=NULL;
+ int rleft, rtop, rright, rbottom;
+
+ *left = rleft = w_current->init_right;
+ *top = rtop = w_current->init_bottom;;
+ *right = rright = 0;
+ *bottom = rbottom = 0;
+
+ o_current = complex;
+
+ while ( o_current != NULL ) {
+ world_get_single_object_bounds (w_current, o_current,
+ &rleft, &rtop, &rright, &rbottom);
if (rleft < *left) *left = rleft;
if (rtop < *top) *top = rtop;
if (rright > *right) *right = rright;
if (rbottom > *bottom) *bottom = rbottom;
-
o_current=o_current->next;
}
@@ -446,11 +482,10 @@
&new_node->complex->screen_x,
&new_node->complex->screen_y);
- /*! \todo questionable caste? */
- new_node->draw_func = (void *) complex_draw_func;
+ new_node->draw_func = complex_draw_func;
if (selectable) {
- new_node->sel_func = (void *) select_func;
+ new_node->sel_func = select_func;
} else {
new_node->sel_func = NULL;
}
@@ -680,12 +715,11 @@
new_node->color = color;
- /*! \todo questionable cast */
- new_node->draw_func = (void *) complex_draw_func;
+ new_node->draw_func = complex_draw_func;
/* (for a title block) an object that isn't selectable */
if (selectable) {
- new_node->sel_func = (void *) select_func;
+ new_node->sel_func = select_func;
} else {
new_node->sel_func = NULL;
}
1.24.4.1 +17 -12 eda/geda/gaf/libgeda/src/o_line_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_line_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_line_basic.c,v
retrieving revision 1.24
retrieving revision 1.24.4.1
diff -u -b -r1.24 -r1.24.4.1
--- o_line_basic.c 22 Sep 2006 18:48:07 -0000 1.24
+++ o_line_basic.c 12 Dec 2006 17:32:57 -0000 1.24.4.1
@@ -100,10 +100,8 @@
o_set_fill_options(w_current, new_node,
FILLING_HOLLOW, -1, -1, -1, -1, -1);
- /* \todo questionable cast */
- new_node->draw_func = (void *) line_draw_func;
- /* \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = line_draw_func;
+ new_node->sel_func = select_func;
/* compute bounding box and screen coords */
o_line_recalc(w_current, new_node);
@@ -807,43 +805,50 @@
* solid to avoid and endless loop produced by other functions.
*/
line_width = o_current->line_width;
- if(line_width <= 2) line_width = 2;
+ if(line_width <=2) {
+ if(w_current->line_style == THICK) {
+ line_width=LINE_WIDTH;
+ } else {
+ line_width=2;
+ }
+ }
+
length = o_current->line_length;
space = o_current->line_space;
switch(o_current->line_type) {
case(TYPE_SOLID):
length = -1; space = -1;
- outl_func = (void *) o_line_print_solid;
+ outl_func = o_line_print_solid;
break;
case(TYPE_DOTTED):
length = -1;
- outl_func = (void *) o_line_print_dotted;
+ outl_func = o_line_print_dotted;
break;
case(TYPE_DASHED):
- outl_func = (void *) o_line_print_dashed;
+ outl_func = o_line_print_dashed;
break;
case(TYPE_CENTER):
- outl_func = (void *) o_line_print_center;
+ outl_func = o_line_print_center;
break;
case(TYPE_PHANTOM):
- outl_func = (void *) o_line_print_phantom;
+ outl_func = o_line_print_phantom;
break;
case(TYPE_ERASE):
/* Unused for now, print it solid */
length = -1; space = -1;
- outl_func = (void *) o_line_print_solid;
+ outl_func = o_line_print_solid;
break;
}
if((length == 0) || (space == 0)) {
length = -1; space = -1;
- outl_func = (void *) o_line_print_solid;
+ outl_func = o_line_print_solid;
}
(*outl_func)(w_current, fp,
1.31.4.1 +2 -4 eda/geda/gaf/libgeda/src/o_net_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_net_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_net_basic.c,v
retrieving revision 1.31
retrieving revision 1.31.4.1
diff -u -b -r1.31 -r1.31.4.1
--- o_net_basic.c 22 Sep 2006 18:48:07 -0000 1.31
+++ o_net_basic.c 12 Dec 2006 17:32:57 -0000 1.31.4.1
@@ -180,10 +180,8 @@
new_node->right = right;
new_node->bottom = bottom;
- /* \todo questionable cast */
- new_node->draw_func = (void *) net_draw_func;
- /* \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = net_draw_func;
+ new_node->sel_func = select_func;
object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
1.4.4.1 +2 -4 eda/geda/gaf/libgeda/src/o_picture.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_picture.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_picture.c,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -u -b -r1.4 -r1.4.4.1
--- o_picture.c 6 Aug 2006 16:45:31 -0000 1.4
+++ o_picture.c 12 Dec 2006 17:32:57 -0000 1.4.4.1
@@ -442,10 +442,8 @@
w_current->pixbuf_wh_ratio = 0;
*/
- /* \todo questionable cast */
- new_node->draw_func = (void *) picture_draw_func;
- /* \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = picture_draw_func;
+ new_node->sel_func = select_func;
/* compute the bounding picture */
o_picture_recalc(w_current, new_node);
1.23.4.1 +2 -4 eda/geda/gaf/libgeda/src/o_pin_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_pin_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_pin_basic.c,v
retrieving revision 1.23
retrieving revision 1.23.4.1
diff -u -b -r1.23 -r1.23.4.1
--- o_pin_basic.c 22 Sep 2006 18:48:07 -0000 1.23
+++ o_pin_basic.c 12 Dec 2006 17:32:57 -0000 1.23.4.1
@@ -142,10 +142,8 @@
new_node->right = right;
new_node->bottom = bottom;
- /*! \todo questionable cast */
- new_node->draw_func = (void *) pin_draw_func;
- /*! \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = pin_draw_func;
+ new_node->sel_func = select_func;
new_node->pin_type = pin_type;
new_node->whichend = whichend;
1.23.4.1 +2 -4 eda/geda/gaf/libgeda/src/o_text_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_text_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_text_basic.c,v
retrieving revision 1.23
retrieving revision 1.23.4.1
diff -u -b -r1.23 -r1.23.4.1
--- o_text_basic.c 17 Oct 2006 10:02:27 -0000 1.23
+++ o_text_basic.c 12 Dec 2006 17:32:57 -0000 1.23.4.1
@@ -912,10 +912,8 @@
new_node->text = text;
- /* \todo questionable cast */
- new_node->draw_func = (void *) text_draw_func;
- /* \todo questionable cast */
- new_node->sel_func = (void *) select_func;
+ new_node->draw_func = text_draw_func;
+ new_node->sel_func = select_func;
new_node->color = color;
new_node->visibility = visibility;
1.11.4.1 +0 -2 eda/geda/gaf/libgeda/src/s_attrib.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: s_attrib.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/s_attrib.c,v
retrieving revision 1.11
retrieving revision 1.11.4.1
diff -u -b -r1.11 -r1.11.4.1
--- s_attrib.c 15 Jul 2006 17:00:51 -0000 1.11
+++ s_attrib.c 12 Dec 2006 17:32:57 -0000 1.11.4.1
@@ -151,8 +151,6 @@
{
if (counter < attrib_index) {
return(attrib[counter].attrib_name);
- } else {
- return(NULL);
}
return(NULL);
1.18.4.1 +17 -15 eda/geda/gaf/libgeda/src/s_clib.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: s_clib.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/s_clib.c,v
retrieving revision 1.18
retrieving revision 1.18.4.1
diff -u -b -r1.18 -r1.18.4.1
--- s_clib.c 5 Jul 2006 03:13:38 -0000 1.18
+++ s_clib.c 12 Dec 2006 17:32:57 -0000 1.18.4.1
@@ -54,7 +54,7 @@
void s_clib_free (void);
-static GSList *clib_directories = NULL;
+static GList *clib_directories = NULL;
static GHashTable *clib_cache = NULL;
@@ -85,7 +85,7 @@
g_free (key);
if (value != NULL) {
/* value is a singly-linked list of strings */
- g_slist_foreach (value, (GFunc)g_free, NULL);
+ g_list_foreach (value, (GFunc)g_free, NULL);
g_slist_free ((GSList*)value);
}
}
@@ -97,8 +97,8 @@
void s_clib_free (void)
{
if (clib_directories != NULL) {
- g_slist_foreach (clib_directories, (GFunc)g_free, NULL);
- g_slist_free (clib_directories);
+ g_list_foreach (clib_directories, (GFunc)g_free, NULL);
+ g_list_free (clib_directories);
clib_directories = NULL;
}
@@ -119,13 +119,13 @@
void s_clib_add_directory (const gchar *directory)
{
/* search for directory in clib_directories */
- if (!g_slist_find_custom (clib_directories,
+ if (!g_list_find_custom (clib_directories,
directory,
(GCompareFunc) g_strcasecmp))
{
/* directory not yet in the list of known directories */
/* add directory to list */
- clib_directories = g_slist_append (clib_directories,
+ clib_directories = g_list_append (clib_directories,
g_strdup (directory));
}
@@ -141,7 +141,7 @@
* The returned value is owned by libgeda and must not be modified or freed.
*
*/
-const GSList *s_clib_get_directories()
+const GList *s_clib_get_directories()
{
return clib_directories;
}
@@ -162,7 +162,7 @@
GSList *ret = NULL;
/* check directory is in clib_directories */
- if (g_slist_find_custom (clib_directories,
+ if (g_list_find_custom (clib_directories,
directory,
(GCompareFunc) g_strcasecmp) == NULL)
{
@@ -218,7 +218,8 @@
*/
const GSList *s_clib_search_basename(const gchar *basename)
{
- GSList *ret, *tmp;
+ GSList *ret;
+ GList *tmp;
/* first check if basename is in cache */
ret = g_hash_table_lookup (clib_cache, basename);
@@ -228,7 +229,8 @@
}
/* looks like we have to search for basename in the library */
- for (tmp = clib_directories; tmp != NULL; tmp = g_slist_next (tmp)) {
+ for (tmp = g_list_last(clib_directories);
+ tmp != NULL; tmp = g_list_previous (tmp)) {
gchar *dir_name = (gchar*)tmp->data;
gchar *file_name = g_strconcat (dir_name,
G_DIR_SEPARATOR_S,
1.11.4.1 +0 -2 eda/geda/gaf/libgeda/src/s_papersizes.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: s_papersizes.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/s_papersizes.c,v
retrieving revision 1.11
retrieving revision 1.11.4.1
diff -u -b -r1.11 -r1.11.4.1
--- s_papersizes.c 15 Jul 2006 17:00:51 -0000 1.11
+++ s_papersizes.c 12 Dec 2006 17:32:57 -0000 1.11.4.1
@@ -156,8 +156,6 @@
{
if (counter < papersizes_index) {
return(papersizes[counter].papersize_name);
- } else {
- return(NULL);
}
return(NULL);
1.12.4.1 +2 -0 eda/geda/gaf/libgeda/src/s_toplevel.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: s_toplevel.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/s_toplevel.c,v
retrieving revision 1.12
retrieving revision 1.12.4.1
diff -u -b -r1.12 -r1.12.4.1
--- s_toplevel.c 4 Oct 2006 19:10:30 -0000 1.12
+++ s_toplevel.c 12 Dec 2006 17:32:57 -0000 1.12.4.1
@@ -184,6 +184,7 @@
toplevel->middle_label = NULL;
toplevel->right_label = NULL;
toplevel->filename_label = NULL;
+ toplevel->grid_label = NULL;
toplevel->status_label = NULL;
toplevel->toolbar_select = NULL;
@@ -292,6 +293,7 @@
toplevel->pin_style = 0;
toplevel->net_style = 0;
toplevel->bus_style = 0;
+ toplevel->line_style = 0;
toplevel->zoom_with_pan = 0;
toplevel->actionfeedback_mode = OUTLINE;
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs