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

gEDA-cvs: CVS update: g_netlist.c



  User: ahvezda 
  Date: 06/07/15 22:11:32

  Modified:    .        g_netlist.c g_rc.c gnetlist.c i_vars.c parsecmd.c
                        s_cpinlist.c s_hierarchy.c s_net.c s_netattrib.c
                        s_netlist.c s_rename.c s_traverse.c vams_misc.c
  Log:
  Changed all malloc/free calls to g_malloc/g_free (for consistancy with libgeda)
  
  
  
  
  Revision  Changes    Path
  1.44      +14 -14    eda/geda/gaf/gnetlist/src/g_netlist.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: g_netlist.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/g_netlist.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -b -r1.43 -r1.44
  --- g_netlist.c	22 Apr 2006 20:09:27 -0000	1.43
  +++ g_netlist.c	16 Jul 2006 02:11:31 -0000	1.44
  @@ -281,11 +281,11 @@
   			if (n_current->connected_to) {
   
   			    pairlist = SCM_EOL;
  -			    pin = (char *) malloc(sizeof(char) *
  +			    pin = (char *) g_malloc(sizeof(char) *
   						  strlen(n_current->
   							 connected_to));
   			    uref =
  -				(char *) malloc(sizeof(char) *
  +				(char *) g_malloc(sizeof(char) *
   						strlen(n_current->
   						       connected_to));
   
  @@ -303,8 +303,8 @@
   				connlist = scm_cons (pairlist, connlist);
   			    }
   
  -			    free(uref);
  -			    free(pin);
  +			    g_free(uref);
  +			    g_free(pin);
   			}
   			n_current = n_current->next;
   		    }
  @@ -373,12 +373,12 @@
   				if (n_current->connected_to) {
   
   				    pairlist = SCM_EOL;
  -				    pin = (char *) malloc(sizeof(char) *
  +				    pin = (char *) g_malloc(sizeof(char) *
   							  strlen
   							  (n_current->
   							   connected_to));
   				    uref =
  -					(char *) malloc(sizeof(char) *
  +					(char *) g_malloc(sizeof(char) *
   							strlen(n_current->
   							       connected_to));
   
  @@ -391,8 +391,8 @@
   
   				    pinslist = scm_cons (pairlist, pinslist);
   
  -				    free(uref);
  -				    free(pin);
  +				    g_free(uref);
  +				    g_free(pin);
   				}
   				n_current = n_current->next;
   			    }
  @@ -624,7 +624,7 @@
       scm_return_value = scm_makfrom0str ("unknown");
     }
   
  -  free(pinseq_attrib);
  +  g_free(pinseq_attrib);
   
     return (scm_return_value);
   }
  @@ -728,7 +728,7 @@
   
       if (return_value) {
         scm_return_value = scm_makfrom0str (return_value);
  -      free(return_value);
  +      g_free(return_value);
       } else {
         scm_return_value = scm_makfrom0str ("not found");
       }
  @@ -802,10 +802,10 @@
   		  slot_tmp=g_strdup("1");
   		}
   		slot = g_strconcat ("#d", slot_tmp, NULL);
  -		  free (slot_tmp);
  +		  g_free (slot_tmp);
   		  slot_number = scm_string_to_number(scm_makfrom0str (slot),
                                                SCM_MAKINUM(10));
  -		  free (slot);
  +		  g_free (slot);
   		  if (slot_number != SCM_BOOL_F) {
   		    slots_list = scm_cons (slot_number, slots_list);
   		  }
  @@ -867,10 +867,10 @@
   		  slot_tmp=g_strdup("1");
   		}
   		slot = g_strconcat ("#d", slot_tmp, NULL);
  -		free (slot_tmp);
  +		g_free (slot_tmp);
   		slot_number = scm_string_to_number(scm_makfrom0str (slot),
                                              SCM_MAKINUM(10));
  -		free (slot);
  +		g_free (slot);
   		if (slot_number != SCM_BOOL_F) {
   		  if (scm_member(slot_number, slots_list) ==  SCM_BOOL_F) {
   		    slots_list = scm_cons (slot_number, slots_list);
  
  
  
  1.28      +4 -4      eda/geda/gaf/gnetlist/src/g_rc.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: g_rc.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/g_rc.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -b -r1.27 -r1.28
  --- g_rc.c	4 Feb 2005 23:14:30 -0000	1.27
  +++ g_rc.c	16 Jul 2006 02:11:31 -0000	1.28
  @@ -187,7 +187,7 @@
                 SCM_ARG1, "hierarchy-netname-separator");
   
     if (default_hierarchy_netname_separator) {
  -    free(default_hierarchy_netname_separator);
  +    g_free(default_hierarchy_netname_separator);
     }
   
     default_hierarchy_netname_separator = g_strdup (SCM_STRING_CHARS (name));
  @@ -201,7 +201,7 @@
                 SCM_ARG1, "hierarchy-netattrib-separator");
   
     if (default_hierarchy_netattrib_separator) {
  -    free(default_hierarchy_netattrib_separator);
  +    g_free(default_hierarchy_netattrib_separator);
     }
   
     default_hierarchy_netattrib_separator = g_strdup (SCM_STRING_CHARS (name));
  @@ -215,7 +215,7 @@
                 SCM_ARG1, "hierarchy-uref-separator");
   
     if (default_hierarchy_uref_separator) {
  -    free(default_hierarchy_uref_separator);
  +    g_free(default_hierarchy_uref_separator);
     }
   
     default_hierarchy_uref_separator = g_strdup (SCM_STRING_CHARS (name));
  @@ -262,7 +262,7 @@
                 SCM_ARG1, "unamed-netname");
   
     if (default_unnamed_netname) {
  -    free(default_unnamed_netname);
  +    g_free(default_unnamed_netname);
     }
   
     default_unnamed_netname = g_strdup (SCM_STRING_CHARS (name));
  
  
  
  1.51      +2 -2      eda/geda/gaf/gnetlist/src/gnetlist.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: gnetlist.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/gnetlist.c,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -b -r1.50 -r1.51
  --- gnetlist.c	15 Aug 2005 01:26:49 -0000	1.50
  +++ gnetlist.c	16 Jul 2006 02:11:31 -0000	1.51
  @@ -64,7 +64,7 @@
     
       /* set default output filename */
       output_filename =
  -	(char *) malloc(sizeof(char) * (strlen("output.net") + 1));
  +	(char *) g_malloc(sizeof(char) * (strlen("output.net") + 1));
       strcpy(output_filename, "output.net");
   
   
  @@ -203,7 +203,7 @@
       /* Change back to the directory where we started AGAIN.  This is done */
       /* because the s_traverse functions can change the Current Working Directory. */
       chdir(cwd);
  -    free(cwd);
  +    free(cwd); /* allocated by getcwd, so this should stay as free() */
   
   /* don't need either of these */
   /*	gh_eval_str ("(primitive-load-path \"ice-9/boot-9.scm\")");*/
  
  
  
  1.18      +1 -1      eda/geda/gaf/gnetlist/src/i_vars.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: i_vars.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/i_vars.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -b -r1.17 -r1.18
  --- i_vars.c	4 Feb 2005 23:14:30 -0000	1.17
  +++ i_vars.c	16 Jul 2006 02:11:31 -0000	1.18
  @@ -42,7 +42,7 @@
   
   #define INIT_STR(w, name, str) {                            \
       if ((w)->name) {                                        \
  -        free((w)->name);                                    \
  +        g_free((w)->name);                                  \
       }                                                       \
       (w)->name = g_strdup (((default_ ## name) != NULL) ?    \
                             (default_ ## name) : (str));      \
  
  
  
  1.24      +3 -3      eda/geda/gaf/gnetlist/src/parsecmd.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: parsecmd.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/parsecmd.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -b -r1.23 -r1.24
  --- parsecmd.c	3 Mar 2006 22:53:40 -0000	1.23
  +++ parsecmd.c	16 Jul 2006 02:11:31 -0000	1.24
  @@ -155,7 +155,7 @@
   	    break;
   
   	case 'g':
  -	    guile_proc = (char *) malloc(sizeof(char) *
  +	    guile_proc = (char *) g_malloc(sizeof(char) *
   					 (strlen(optarg) + 1));
   	    strcpy(guile_proc, optarg);
   
  @@ -171,9 +171,9 @@
   
   	case 'o':
   	    if (output_filename) {
  -		free(output_filename);
  +		g_free(output_filename);
   	    }
  -	    output_filename = (char *) malloc(sizeof(char) *
  +	    output_filename = (char *) g_malloc(sizeof(char) *
   					      (strlen(optarg) + 1));
   	    strcpy(output_filename, optarg);
   	    break;
  
  
  
  1.15      +1 -1      eda/geda/gaf/gnetlist/src/s_cpinlist.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: s_cpinlist.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/s_cpinlist.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -b -r1.14 -r1.15
  --- s_cpinlist.c	4 Feb 2005 23:14:30 -0000	1.14
  +++ s_cpinlist.c	16 Jul 2006 02:11:31 -0000	1.15
  @@ -78,7 +78,7 @@
   {
       CPINLIST *new_node;
   
  -    new_node = (CPINLIST *) malloc(sizeof(CPINLIST));
  +    new_node = (CPINLIST *) g_malloc(sizeof(CPINLIST));
   
       /* setup node information */
       new_node->plid = 0;
  
  
  
  1.14      +7 -7      eda/geda/gaf/gnetlist/src/s_hierarchy.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: s_hierarchy.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/s_hierarchy.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- s_hierarchy.c	27 Sep 2005 22:43:40 -0000	1.13
  +++ s_hierarchy.c	16 Jul 2006 02:11:31 -0000	1.14
  @@ -108,17 +108,17 @@
   
   	    pr_current->page_current = p_current;
   
  -	    free(current_filename);
  +	    g_free(current_filename);
   	    pcount++;
   	    current_filename = u_basic_breakup_string(attrib, ',', pcount);
   	}
   
   	if (attrib) {
  -	    free(attrib);
  +	    g_free(attrib);
   	}
   
   	if (current_filename) {
  -	    free(current_filename);
  +	    g_free(current_filename);
   	}
   
   	count++;
  @@ -299,7 +299,7 @@
   			       n_current->connected_to);
   #endif
   			/* can't do frees, since some names are links */
  -/* 		free(n_current->connected_to);*/
  +/* 		g_free(n_current->connected_to);*/
   			n_current->connected_to = NULL;
   		    }
   		}
  @@ -530,7 +530,7 @@
   	    new_uref =
   		s_hierarchy_return_baseuref(pr_current,
   					    nl_current->component_uref);
  -	    free(nl_current->component_uref);
  +	    g_free(nl_current->component_uref);
   	    nl_current->component_uref = new_uref;
   	}
   
  @@ -548,7 +548,7 @@
   		    new_connected_to =
   			g_strdup(n_current->connected_to);
   		    sprintf(new_connected_to, "%s %s", new_uref, pin);
  -		    free(n_current->connected_to);
  +		    g_free(n_current->connected_to);
   		    n_current->connected_to = new_connected_to;
   		}
   		n_current = n_current->next;
  @@ -599,7 +599,7 @@
   
   	cptr = uref;
   
  -	return_value = (char *) malloc(sizeof(char) * (strlen(uref)));
  +	return_value = (char *) g_malloc(sizeof(char) * (strlen(uref)));
   	i = 0;
   	while (cptr != end_of_base) {
   	    return_value[i] = *cptr;
  
  
  
  1.29      +13 -13    eda/geda/gaf/gnetlist/src/s_net.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: s_net.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/s_net.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -b -r1.28 -r1.29
  --- s_net.c	4 Jan 2006 14:36:25 -0000	1.28
  +++ s_net.c	16 Jul 2006 02:11:31 -0000	1.29
  @@ -83,7 +83,7 @@
   {
       NET *new_node;
   
  -    new_node = (NET *) malloc(sizeof(NET));
  +    new_node = (NET *) g_malloc(sizeof(NET));
   
       /* setup node information */
       new_node->net_name = NULL;
  @@ -185,19 +185,19 @@
       uref = s_hierarchy_create_uref(pr_current, temp_uref, hierarchy_tag);
   
       if (uref && pinnum) {
  -	string = (char *) malloc(sizeof(char) *
  +	string = (char *) g_malloc(sizeof(char) *
   				 strlen(uref) + strlen(pinnum) +
   				 strlen("  ") + 1);
   
   	sprintf(string, "%s %s", uref, pinnum);
       } else {
   	if (pinnum) {
  -	    string = (char *) malloc(sizeof(char) *
  +	    string = (char *) g_malloc(sizeof(char) *
   				     strlen(pinnum) +
   				     strlen("POWER") + strlen("  ") + 1);
   	    sprintf(string, "POWER %s", pinnum);
   	} else {
  -	    string = (char *) malloc(sizeof(char) *
  +	    string = (char *) g_malloc(sizeof(char) *
   				     strlen("U?") + strlen("?") +
   				     strlen("  ") + 1 + hierarchy_tag_len);
   
  @@ -206,7 +206,7 @@
   		    s_hierarchy_create_uref(pr_current, "U?",
   					    hierarchy_tag);
   		sprintf(string, "%s ?", misc);
  -		free(misc);
  +		g_free(misc);
   	    } else {
   		sprintf(string, "U? ?");
   	    }
  @@ -216,13 +216,13 @@
       }
   
       if (pinnum)
  -	free(pinnum);
  +	g_free(pinnum);
   
       if (uref)
  -	free(uref);
  +	g_free(uref);
   
       if (temp_uref)
  -	free(temp_uref);
  +	g_free(temp_uref);
   
       return (string);
   }
  @@ -433,7 +433,7 @@
       if (net_head->nid == -1 && net_head->prev == NULL
   	&& net_head->next == NULL) {
   	string =
  -	    (char *) malloc(sizeof(char) * (strlen("unconnected_pin-")) +
  +	    (char *) g_malloc(sizeof(char) * (strlen("unconnected_pin-")) +
   			    10);
   
   	sprintf(string, "unconnected_pin-%d", 
  @@ -455,19 +455,19 @@
   
   	if (netlist_mode == SPICE) {
   	    string =
  -		(char *) malloc(sizeof(char) * (strlen("99999") + 10));
  +		(char *) g_malloc(sizeof(char) * (strlen("99999") + 10));
   	    sprintf(string, "%d", unnamed_net_counter++);
   
   	    return (string);
   	} else {
   	    string =
  -		(char *) malloc(sizeof(char) *
  +		(char *) g_malloc(sizeof(char) *
   				(strlen(pr_current->unnamed_netname) + 10 +
   				 hierarchy_tag_len));
   
   	    if (hierarchy_tag) {
   		temp =
  -		    (char *) malloc(sizeof(char) * (strlen("99999") + 10));
  +		    (char *) g_malloc(sizeof(char) * (strlen("99999") + 10));
   		sprintf(temp, "%s%d", pr_current->unnamed_netname, 
   		        unnamed_net_counter++);
   
  @@ -475,7 +475,7 @@
   		    s_hierarchy_create_netname(pr_current, temp,
   					       hierarchy_tag);
   		strcpy(string, misc);
  -		free(misc);
  +		g_free(misc);
   	    } else {
   		sprintf(string, "%s%d", pr_current->unnamed_netname, 
   			unnamed_net_counter++);
  
  
  
  1.12      +15 -15    eda/geda/gaf/gnetlist/src/s_netattrib.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: s_netattrib.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/s_netattrib.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -b -r1.11 -r1.12
  --- s_netattrib.c	4 Feb 2005 23:14:31 -0000	1.11
  +++ s_netattrib.c	16 Jul 2006 02:11:31 -0000	1.12
  @@ -121,7 +121,7 @@
   		    fprintf(stderr,
   			    "Found a cpinlist head with a netname! [%s]\n",
   			    old_cpin->nets->net_name);
  -		    free(old_cpin->nets->net_name);
  +		    g_free(old_cpin->nets->net_name);
   		}
   
   
  @@ -130,7 +130,7 @@
   						 hierarchy_tag);
   		old_cpin->nets->net_name_has_priority = TRUE;
   		connected_to =
  -		    (char *) malloc(sizeof(char) *
  +		    (char *) g_malloc(sizeof(char) *
   				    (strlen
   				     (netlist->component_uref) +
   				     strlen(current_pin) + 2));
  @@ -138,7 +138,7 @@
   			netlist->component_uref, current_pin);
   		old_cpin->nets->connected_to = g_strdup (connected_to);
   		old_cpin->nets->nid = o_current->sid;
  -		free(connected_to);
  +		g_free(connected_to);
   	    } else {
   
   
  @@ -156,7 +156,7 @@
   						 hierarchy_tag);
   
   		connected_to =
  -		    (char *) malloc(sizeof(char) *
  +		    (char *) g_malloc(sizeof(char) *
   				    (strlen
   				     (netlist->component_uref) +
   				     strlen(current_pin) + 2));
  @@ -171,7 +171,7 @@
   		       hierarchy_tag);
   #endif
   
  -		free(connected_to);
  +		g_free(connected_to);
   	    }
   
   	} else {		/* no uref, means this is a special component */
  @@ -180,7 +180,7 @@
   	current_pin = strtok(NULL, DELIMITERS);
       }
   
  -    free(net_name);
  +    g_free(net_name);
   }
   
   
  @@ -203,7 +203,7 @@
   	if (value) {
   	    s_netattrib_create_pins(pr_current, o_current, netlist, value,
   				    hierarchy_tag);
  -	    free(value);
  +	    g_free(value);
   	}
   	counter++;
   	value = o_attrib_search_name(o_current->complex->prim_objs,
  @@ -215,7 +215,7 @@
   
   
       if (value) {
  -	free(value);
  +	g_free(value);
       }
   
   
  @@ -226,7 +226,7 @@
   	if (value) {
   	    s_netattrib_create_pins(pr_current, o_current, netlist, value,
   				    hierarchy_tag);
  -	    free(value);
  +	    g_free(value);
   	}
   	counter++;
   	value =
  @@ -234,7 +234,7 @@
       }
   
       if (value) {
  -	free(value);
  +	g_free(value);
       }
   }
   
  @@ -285,7 +285,7 @@
   		current_pin = strtok(NULL, DELIMITERS);
   	    }
   
  -	    free(value);
  +	    g_free(value);
   	}
   	counter++;
   	value = o_attrib_search_name(o_current->complex->prim_objs,
  @@ -294,7 +294,7 @@
   
   
       if (value) {
  -	free(value);
  +	g_free(value);
       }
   
   
  @@ -324,7 +324,7 @@
   		    printf("found net_name: _%s_\n", net_name);
   #endif
   		    if (return_value) {
  -			free(return_value);
  +			g_free(return_value);
   			return_value = NULL;
   		    }
   
  @@ -333,7 +333,7 @@
   		current_pin = strtok(NULL, DELIMITERS);
   	    }
   
  -	    free(value);
  +	    g_free(value);
   	}
   	counter++;
   	value =
  @@ -341,7 +341,7 @@
       }
   
       if (value) {
  -	free(value);
  +	g_free(value);
       }
   
       if (return_value) {
  
  
  
  1.20      +3 -3      eda/geda/gaf/gnetlist/src/s_netlist.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: s_netlist.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/s_netlist.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -b -r1.19 -r1.20
  --- s_netlist.c	22 Apr 2006 20:09:27 -0000	1.19
  +++ s_netlist.c	16 Jul 2006 02:11:31 -0000	1.20
  @@ -78,7 +78,7 @@
   {
       NETLIST *new_node;
   
  -    new_node = (NETLIST *) malloc(sizeof(NETLIST));
  +    new_node = (NETLIST *) g_malloc(sizeof(NETLIST));
   
       /* setup node information */
       new_node->nlid = 0;
  @@ -166,7 +166,7 @@
   		if (pl_current->plid != -1 && pl_current->nets) {
   
   		    if (pl_current->net_name) {
  -			free(pl_current->net_name);
  +			g_free(pl_current->net_name);
   		    }
   
   		    verbose_print("n");
  @@ -253,7 +253,7 @@
   	  n_current = pl_current->nets;
   	  while (n_current != NULL) {
   	    if (n_current->net_name) {
  -	      free (n_current->net_name);
  +	      g_free (n_current->net_name);
   	    }	    
   	    n_current->net_name = s_netlist_netname_of_netid(pr_current,
   							     named_netlist,
  
  
  
  1.18      +13 -13    eda/geda/gaf/gnetlist/src/s_rename.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: s_rename.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/s_rename.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -b -r1.17 -r1.18
  --- s_rename.c	4 Jan 2006 14:36:25 -0000	1.17
  +++ s_rename.c	16 Jul 2006 02:11:31 -0000	1.18
  @@ -81,19 +81,19 @@
           {
               if (temp->src) 
               {
  -                free(temp->src);
  +                g_free(temp->src);
               }
               if (temp->dest) 
   	    {
  -                free(temp->dest);
  +                g_free(temp->dest);
               }
   	    to_free = temp;
   	    temp = temp->next;
  -	    free(to_free);
  +	    g_free(to_free);
           }
   	to_free = first_set;
   	first_set = first_set->next_set;
  -	free(to_free);
  +	g_free(to_free);
       }
       last_set = NULL;
   }
  @@ -102,7 +102,7 @@
   {
       SET * new_set;
       
  -    new_set = malloc(sizeof(SET));
  +    new_set = g_malloc(sizeof(SET));
       if (new_set == NULL) 
       {
           fprintf(stderr,"Unable to create a new rename set.\n");
  @@ -193,13 +193,13 @@
                   printf("Found dest [%s] in src [%s] and that had a dest as: [%s]\nSo you want rename [%s] to [%s]\n",
                          dest, temp->src, temp->dest, src, temp->dest);
   #endif
  -                new_rename = malloc(sizeof(RENAME));
  +                new_rename = g_malloc(sizeof(RENAME));
   		if (new_rename)
   		{
   		     new_rename->next = NULL;
  -                     new_rename->src = (char *) malloc(sizeof(char) * (strlen(src) + 1));
  +                     new_rename->src = (char *) g_malloc(sizeof(char) * (strlen(src) + 1));
                        strcpy(new_rename->src, src);
  -                     new_rename->dest = (char *) malloc(sizeof(char) * (strlen(temp->dest) + 1));
  +                     new_rename->dest = (char *) g_malloc(sizeof(char) * (strlen(temp->dest) + 1));
                        strcpy(new_rename->dest, temp->dest);
   		     /* If the rename pair was found then a set already exists, so there's no need the check it */
   		     if (last_set->first_rename == NULL)
  @@ -224,20 +224,20 @@
           /* Check for a valid set */
   	if (first_set == NULL)
   	{
  -	    new_set = malloc(sizeof(SET));
  +	    new_set = g_malloc(sizeof(SET));
   	    if (new_set)
   	    {
   	        memset(new_set,0,sizeof(SET));
   		first_set = last_set = new_set;
   	    }
   	}    
  -        new_rename = malloc(sizeof(RENAME));
  +        new_rename = g_malloc(sizeof(RENAME));
           if (new_rename)
   	{
   	     new_rename->next = NULL;
  -             new_rename->src = (char *) malloc(sizeof(char) * (strlen(src) + 1));
  +             new_rename->src = (char *) g_malloc(sizeof(char) * (strlen(src) + 1));
                strcpy(new_rename->src, src);
  -             new_rename->dest = (char *) malloc(sizeof(char) * (strlen(dest) + 1));
  +             new_rename->dest = (char *) g_malloc(sizeof(char) * (strlen(dest) + 1));
                strcpy(new_rename->dest, dest);
   	     if (last_set->first_rename == NULL)
   	     {
  @@ -270,7 +270,7 @@
   		{
                       if (strcmp(pl_current->net_name, src) == 0) 
   		    {
  -                        pl_current->net_name = malloc(sizeof(char) * (strlen(dest) + 1));
  +                        pl_current->net_name = g_malloc(sizeof(char) * (strlen(dest) + 1));
                           strcpy(pl_current->net_name, dest);
                       }
                   }
  
  
  
  1.43      +8 -8      eda/geda/gaf/gnetlist/src/s_traverse.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: s_traverse.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/s_traverse.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -b -r1.42 -r1.43
  --- s_traverse.c	22 Apr 2006 20:09:27 -0000	1.42
  +++ s_traverse.c	16 Jul 2006 02:11:31 -0000	1.43
  @@ -135,7 +135,7 @@
         if (temp) {
           /* traverse graphical elements, but adding them to the
   	   graphical netlist */
  -        free(temp);
  +        g_free(temp);
   	
   	netlist = s_netlist_return_tail(graphical_netlist_head);
   	is_graphical = TRUE;
  @@ -171,7 +171,7 @@
         }
         
         if (temp_uref) {
  -	free(temp_uref);
  +	g_free(temp_uref);
         }
   
         netlist->object_ptr = o_current;
  @@ -192,7 +192,7 @@
   		  "Could not find refdes on component and could not find any special attributes!\n");
   	  
   	  netlist->component_uref =
  -	    (char *) malloc(sizeof(char) * strlen("U?") +
  +	    (char *) g_malloc(sizeof(char) * strlen("U?") +
   			    1);
   	  strcpy(netlist->component_uref, "U?");
   	} else {
  @@ -202,7 +202,7 @@
   #endif
   	  /* it's a power or some other special symbol */
   	  netlist->component_uref = NULL;
  -	  free(temp);
  +	  g_free(temp);
   	}
   	
         }
  @@ -310,7 +310,7 @@
                                              connected_to,
                                              hierarchy_tag);
                 nets->net_name_has_priority = TRUE;
  -              free(nets->connected_to);
  +              g_free(nets->connected_to);
                 nets->connected_to = NULL;
               }
   #if DEBUG
  @@ -394,7 +394,7 @@
         new_net->net_name =
           s_hierarchy_create_netname(pr_current, temp,
                                      hierarchy_tag);
  -      free(temp);
  +      g_free(temp);
       } else { 
   
         /* search for the old label= attribute */
  @@ -404,7 +404,7 @@
           new_net->net_name =
             s_hierarchy_create_netname(pr_current, temp,
                                        hierarchy_tag);
  -        free(temp);
  +        g_free(temp);
         }
       }
     }
  @@ -437,7 +437,7 @@
                                      nets->connected_to,
                                      hierarchy_tag);
         nets->net_name_has_priority = TRUE;
  -      free(nets->connected_to);
  +      g_free(nets->connected_to);
         nets->connected_to = NULL;
       }
   #if DEBUG
  
  
  
  1.9       +2 -2      eda/geda/gaf/gnetlist/src/vams_misc.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: vams_misc.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/vams_misc.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- vams_misc.c	4 Feb 2005 23:14:31 -0000	1.8
  +++ vams_misc.c	16 Jul 2006 02:11:31 -0000	1.9
  @@ -66,8 +66,8 @@
                                     *list);	
   		      }	
   		   
  -		   if (found_name) free(found_name); 
  -		   if (found_value) free(found_value); 
  +		   if (found_name) g_free(found_name); 
  +		   if (found_value) g_free(found_value); 
   #if DEBUG 
   		    printf("0 _%s_\n", found->text->string);
   		    printf("1 _%s_\n", found_name);
  
  
  


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