[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: i_basic.c



  User: danmc   
  Date: 06/12/06 23:24:18

  Modified:    .        i_basic.c o_arc.c o_box.c o_circle.c o_line.c
                        x_dialog.c x_log.c
  Log:
  Fix a whole bunch of pointer casts which were not right.  They didn't seem 
  
  to be causing failures but were causing tons of warnings.  Also remove a
  
  spurious ";" following a function definition and address some "code can't
  
  be reached" warnings.
  
  
  
  
  Revision  Changes    Path
  1.16      +1 -1      eda/geda/gaf/gschem/src/i_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: i_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/i_basic.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -b -r1.15 -r1.16
  --- i_basic.c	5 Dec 2006 03:04:31 -0000	1.15
  +++ i_basic.c	7 Dec 2006 04:24:17 -0000	1.16
  @@ -266,7 +266,7 @@
    *
    */
   void i_update_middle_button(TOPLEVEL *w_current,
  -			    void *func_ptr, const char *string)
  +			    void (*func_ptr)(gpointer, guint, GtkWidget*), const char *string)
   {
     char *temp_string;
   
  
  
  
  1.26      +7 -7      eda/geda/gaf/gschem/src/o_arc.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_arc.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_arc.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -b -r1.25 -r1.26
  --- o_arc.c	21 Oct 2006 13:56:23 -0000	1.25
  +++ o_arc.c	7 Dec 2006 04:24:17 -0000	1.26
  @@ -151,25 +151,25 @@
     case TYPE_SOLID:
       length = -1;
       space = -1;
  -    draw_func = (void *) o_arc_draw_solid;
  +    draw_func = o_arc_draw_solid;
       break;
   			
     case TYPE_DOTTED:
       length = -1; /* AVH changed o_arc_draw_dotted to use */
       /* space parameter only */
  -    draw_func = (void *) o_arc_draw_dotted;
  +    draw_func = o_arc_draw_dotted;
       break;
   			
     case TYPE_DASHED:
  -    draw_func = (void *) o_arc_draw_dashed;
  +    draw_func = o_arc_draw_dashed;
       break;
   			
     case TYPE_CENTER:
  -    draw_func = (void *) o_arc_draw_center;
  +    draw_func = o_arc_draw_center;
       break;
   			
     case TYPE_PHANTOM:
  -    draw_func = (void *) o_arc_draw_phantom;
  +    draw_func = o_arc_draw_phantom;
       break;
   			
     case TYPE_ERASE:
  @@ -179,13 +179,13 @@
       length = -1;
       space = -1;
       arc_width = 0; /* just to be careful */
  -    draw_func = (void *) o_arc_draw_solid;
  +    draw_func = o_arc_draw_solid;
       fprintf(stderr, _("Unknown type for arc !\n"));
       break;
     }
   
     if((length == 0) || (space == 0))
  -    draw_func = (void *) o_arc_draw_solid;
  +    draw_func =  o_arc_draw_solid;
   
     (*draw_func)(w_current->window, w_current->gc, color,
                  arc_end,
  
  
  
  1.24      +13 -13    eda/geda/gaf/gschem/src/o_box.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_box.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_box.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -b -r1.23 -r1.24
  --- o_box.c	21 Oct 2006 13:56:24 -0000	1.23
  +++ o_box.c	7 Dec 2006 04:24:17 -0000	1.24
  @@ -148,24 +148,24 @@
       case TYPE_SOLID:
         length = -1;
         space = -1;
  -      draw_func = (void *) o_box_draw_solid;
  +      draw_func = o_box_draw_solid;
         break;
   
       case TYPE_DOTTED:
         length = -1; /* ..._draw_dotted only space is used */
  -      draw_func = (void *) o_box_draw_dotted;
  +      draw_func = o_box_draw_dotted;
         break;
   
       case TYPE_DASHED:
  -      draw_func = (void *) o_box_draw_dashed;
  +      draw_func = o_box_draw_dashed;
         break;
   
       case TYPE_CENTER:
  -      draw_func = (void *) o_box_draw_center;
  +      draw_func = o_box_draw_center;
         break;
   
       case TYPE_PHANTOM:
  -      draw_func = (void *) o_box_draw_phantom;
  +      draw_func = o_box_draw_phantom;
         break;
   
       case TYPE_ERASE:
  @@ -175,13 +175,13 @@
         length = -1;
         space = -1;
         line_width = 0; /* just to be careful */
  -      draw_func = (void *) o_box_draw_solid;
  +      draw_func = o_box_draw_solid;
         fprintf(stderr, _("Unknown type for box !\n"));
         break;
     }
   
     if((length == 0) || (space == 0))
  -  draw_func = (void *) o_box_draw_solid;
  +  draw_func = o_box_draw_solid;
   	
     (*draw_func)(w_current->window, w_current->gc, color, box_end,
                  FALSE,
  @@ -244,35 +244,35 @@
          * possible as it would prevent any hollow box from having its grips
          * drawn
          */
  -      fill_func = (void *) o_box_fill_hollow;
  +      fill_func = o_box_fill_hollow;
         break;
   		
       case FILLING_FILL:
         angle1 = -1; angle2 = -1;
         pitch1 = 1; pitch2 = 1;
  -      fill_func = (void *) o_box_fill_fill;
  +      fill_func = o_box_fill_fill;
         break;
   			
       case FILLING_MESH:
  -      fill_func = (void *) o_box_fill_mesh;
  +      fill_func = o_box_fill_mesh;
         break;
   
       case FILLING_HATCH:
         angle2 = -1;
         pitch2 = 1;
  -      fill_func = (void *) o_box_fill_hatch;
  +      fill_func = o_box_fill_hatch;
         break;
   			
       case FILLING_VOID:
       default:
         angle1 = -1; angle2 = -1;
         pitch1 = 1; pitch2 = 1;
  -      fill_func = (void *) o_box_fill_hollow;
  +      fill_func = o_box_fill_hollow;
         fprintf(stderr, _("Unknown type for box (fill)!\n"));
     }
   
     if((pitch1 <= 0) || (pitch2 <= 0)) {
  -    fill_func = (void *) o_box_fill_fill;
  +    fill_func = o_box_fill_fill;
     }
   
     (*fill_func)(w_current->window, w_current->gc, color,
  
  
  
  1.22      +13 -13    eda/geda/gaf/gschem/src/o_circle.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_circle.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_circle.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -b -r1.21 -r1.22
  --- o_circle.c	21 Oct 2006 13:56:24 -0000	1.21
  +++ o_circle.c	7 Dec 2006 04:24:17 -0000	1.22
  @@ -140,24 +140,24 @@
       case TYPE_SOLID:
       length = -1;
       space = -1;
  -    draw_func = (void *) o_arc_draw_solid;
  +    draw_func = o_arc_draw_solid;
       break;
   			
       case TYPE_DOTTED:
       length = -1; /* ..._draw_dotted only space used */
  -    draw_func = (void *) o_arc_draw_dotted;
  +    draw_func = o_arc_draw_dotted;
       break;
   			
       case TYPE_DASHED:
  -    draw_func = (void *) o_arc_draw_dashed;
  +    draw_func = o_arc_draw_dashed;
       break;
   			
       case TYPE_CENTER:
  -    draw_func = (void *) o_arc_draw_center;
  +    draw_func = o_arc_draw_center;
       break;
   			
       case TYPE_PHANTOM:
  -    draw_func = (void *) o_arc_draw_phantom;
  +    draw_func = o_arc_draw_phantom;
       break;
   			
       case TYPE_ERASE:
  @@ -168,12 +168,12 @@
       space = -1;
       circle_width = 0; /* just to be careful */
       fprintf(stderr, _("Unknown type for circle!\n"));
  -    draw_func = (void *) o_arc_draw_solid;			
  +    draw_func = o_arc_draw_solid;			
       break;
     }
   
     if((length == 0) || (space == 0))
  -  draw_func = (void *) o_arc_draw_solid;
  +  draw_func = o_arc_draw_solid;
   	
     (*draw_func)(w_current->window, w_current->gc, color,
                  circle_end,
  @@ -231,35 +231,35 @@
          * a test before the call. Simply putting a return here instead is not
          * possible as it would prevent any hollow circle from having its grips
          */
  -      fill_func = (void *) o_circle_fill_hollow;
  +      fill_func = o_circle_fill_hollow;
         break;
   		
       case FILLING_FILL:
         angle1 = -1; angle2 = -1;
         pitch1 = 1; pitch2 = 1;
  -      fill_func = (void *) o_circle_fill_fill;
  +      fill_func = o_circle_fill_fill;
         break;
   			
       case FILLING_MESH:
  -      fill_func = (void *) o_circle_fill_mesh;
  +      fill_func = o_circle_fill_mesh;
         break;
   
       case FILLING_HATCH:
         angle2 = -1;
         pitch2 = 1;
  -      fill_func = (void *) o_circle_fill_hatch;
  +      fill_func = o_circle_fill_hatch;
         break;
   			
       case FILLING_VOID:
       default:
         angle1 = -1; angle2 = -1;
         pitch1 = 1; pitch2 = 1;
  -      fill_func = (void *) o_circle_fill_hollow;			
  +      fill_func = o_circle_fill_hollow;			
         fprintf(stderr, _("Unknown type for circle (fill)!\n"));
     }
   
     if((pitch1 <= 0) || (pitch2 <= 0)) {
  -    fill_func = (void *) o_circle_fill_fill;
  +    fill_func = o_circle_fill_fill;
     }
   
     (*fill_func)(w_current->window, w_current->gc, color,
  
  
  
  1.23      +7 -7      eda/geda/gaf/gschem/src/o_line.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_line.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_line.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -b -r1.22 -r1.23
  --- o_line.c	21 Oct 2006 13:56:25 -0000	1.22
  +++ o_line.c	7 Dec 2006 04:24:17 -0000	1.23
  @@ -128,24 +128,24 @@
       case TYPE_SOLID:
         length = -1;
         space = -1;
  -      draw_func = (void *) o_line_draw_solid;
  +      draw_func = o_line_draw_solid;
         break;
   			
       case TYPE_DOTTED:
         length = -1; /* in ..._draw_dotted, length is unused */
  -      draw_func = (void *) o_line_draw_dotted;
  +      draw_func = o_line_draw_dotted;
         break;
   			
       case TYPE_DASHED:
  -      draw_func = (void *) o_line_draw_dashed;
  +      draw_func = o_line_draw_dashed;
         break;
   			
       case TYPE_CENTER:
  -      draw_func = (void *) o_line_draw_center;
  +      draw_func = o_line_draw_center;
         break;
   			
       case TYPE_PHANTOM:
  -      draw_func = (void *) o_line_draw_phantom;
  +      draw_func = o_line_draw_phantom;
         break;
   			
       case TYPE_ERASE:
  @@ -157,12 +157,12 @@
         line_width = 0; /* just to be careful */
         fprintf(stderr, _("Unknown type for line (%d) !\n"),
                 o_current->line_type);
  -      draw_func = (void *) o_line_draw_solid;
  +      draw_func = o_line_draw_solid;
         break;
     }
   
     if((length == 0) || (space == 0))
  -  draw_func = (void *) o_line_draw_solid;
  +  draw_func = o_line_draw_solid;
   
     (*draw_func)(w_current->window, w_current->gc, color, line_end,
                  x1, y1, x2, y2, line_width, length, space);
  
  
  
  1.64      +1 -1      eda/geda/gaf/gschem/src/x_dialog.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_dialog.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_dialog.c,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -b -r1.63 -r1.64
  --- x_dialog.c	5 Dec 2006 03:04:31 -0000	1.63
  +++ x_dialog.c	7 Dec 2006 04:24:17 -0000	1.64
  @@ -4727,7 +4727,7 @@
   	                    FALSE, FALSE, 0);
     
     return object;
  -};
  +}
   
   static void
   close_confirmation_dialog_set_property (GObject      *object,
  
  
  
  1.18      +1 -1      eda/geda/gaf/gschem/src/x_log.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_log.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_log.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -b -r1.17 -r1.18
  --- x_log.c	14 Jul 2006 02:23:55 -0000	1.17
  +++ x_log.c	7 Dec 2006 04:24:17 -0000	1.18
  @@ -82,7 +82,7 @@
       log_message (LOG (log_dialog), contents);
       g_free (contents);
   
  -    x_log_update_func = (void*)x_log_message;
  +    x_log_update_func = x_log_message;
      
       if( auto_place_mode )
   	gtk_widget_set_uposition( log_dialog, 10, 10); 
  
  
  


_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs