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

gEDA-cvs: CVS update: s_misc.c



  User: sdb     
  Date: 06/08/13 14:24:45

  Modified:    .        s_misc.c s_toplevel.c
  Log:
  Squish bugs created in previous check-in.
  
  
  
  
  Revision  Changes    Path
  1.4       +5 -5      eda/geda/gaf/gattrib/src/s_misc.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: s_misc.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gattrib/src/s_misc.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- s_misc.c	13 Aug 2006 12:31:56 -0000	1.3
  +++ s_misc.c	13 Aug 2006 18:24:45 -0000	1.4
  @@ -79,11 +79,11 @@
    * Gattrib specific utilities
    *------------------------------------------------------------------*/
   
  -char *s_misc_remaining_string(char *string, char delimiter, int count)
  +char *s_misc_remaining_string(gchar *string, gchar delimiter, gint count)
   {
  -  int i;
  -  char *remaining;
  -  char *return_value;
  +  gint i;
  +  gchar *remaining;
  +  gchar *return_value;
   
     /* find count'th delimiter */
     remaining = string;
  @@ -104,7 +104,7 @@
     }
   
     /* copy remainder into allocated return string */
  -  return_value = strdup(remaining);
  +  return_value = g_strdup(remaining);
   
     /* return string */
     return (return_value);
  
  
  
  1.19      +5 -3      eda/geda/gaf/gattrib/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/gattrib/src/s_toplevel.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -b -r1.18 -r1.19
  --- s_toplevel.c	13 Aug 2006 12:31:56 -0000	1.18
  +++ s_toplevel.c	13 Aug 2006 18:24:45 -0000	1.19
  @@ -1,4 +1,4 @@
  -/* $Id: s_toplevel.c,v 1.18 2006/08/13 12:31:56 sdb Exp $ */
  +/* $Id: s_toplevel.c,v 1.19 2006/08/13 18:24:45 sdb Exp $ */
   
   /* gEDA - GPL Electronic Design Automation
    * gattrib -- gEDA component and net attribute manipulation using spreadsheet.
  @@ -1015,9 +1015,11 @@
     printf("        In s_toplevel_update_pin_attribs_in_toplevel, handling entry in master list %s .\n", new_name_value_pair);
   #endif
       new_attrib_name = u_basic_breakup_string(new_name_value_pair, '=', 0);
  -    new_attrib_value = s_misc_remaining_string(new_name_value_pair, '=', 1);
  +    new_attrib_value = u_basic_breakup_string(new_name_value_pair, '=', 1); /* don't use s_misc_remaining_string
  +									     * since pinattribs are only foo=bar. */
       if (strlen(new_attrib_value) == 0) {
  -      g_free(new_attrib_value);   /* I wonder if I should check for non-NULL first?  */
  +      if (new_attrib_value != NULL)
  +	g_free(new_attrib_value);   
         new_attrib_value = NULL;  /* s_misc_remaining_string doesn't return NULL for empty substring. */
       }
       old_attrib_value = o_attrib_search_name_single_count(o_pin, new_attrib_name, 0);
  
  
  


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