diff --git a/src/actions.c b/src/actions.c index 423b4cef..cc22c199 100644 --- a/src/actions.c +++ b/src/actions.c @@ -51,7 +51,7 @@ unsigned int hash_file(const char *f, int skip_path_lines) /* skip lines of type: '** sch_path: ...' or '-- sch_path: ...' or '// sym_path: ...' */ if(skip_path_lines && strlen(line) > 14) { if(!strncmp(line+2, " sch_path: ", 11) || !strncmp(line+2, " sym_path: ", 11) ) { - my_free(_ALLOC_ID_, &line); + my_free(0, &line); continue; } } @@ -60,7 +60,7 @@ unsigned int hash_file(const char *f, int skip_path_lines) /* skip CRs so hashes will match on unix / windows */ if(line[i] == '\r') { cr = 1; - my_free(_ALLOC_ID_, &line); + my_free(1, &line); continue; } else if(line[i] == '\n' && cr) { cr = 0; @@ -70,7 +70,7 @@ unsigned int hash_file(const char *f, int skip_path_lines) } h += (h << 5) + (unsigned char)line[i]; } - my_free(_ALLOC_ID_, &line); + my_free(2, &line); } if(cr) h += (h << 5) + '\r'; /* file ends with \r not followed by \n: keep it */ fclose(fd); @@ -461,7 +461,7 @@ void ask_new_file(void) remove_symbols(); load_schematic(1, f,1); /* 20180925.1 */ tclvareval("update_recent_file {", f, "}", NULL); - my_strdup(_ALLOC_ID_, &xctx->sch_path[xctx->currsch],"."); + my_strdup(3, &xctx->sch_path[xctx->currsch],"."); xctx->sch_path_hash[xctx->currsch] = 0; xctx->sch_inst_number[xctx->currsch] = 1; zoom_full(1, 0, 1, 0.97); @@ -479,60 +479,60 @@ void remove_symbol(int j) xSymbol save; dbg(1,"clearing symbol %s\n", xctx->sym[j].name); - my_free(_ALLOC_ID_, &xctx->sym[j].prop_ptr); - my_free(_ALLOC_ID_, &xctx->sym[j].templ); - my_free(_ALLOC_ID_, &xctx->sym[j].type); - my_free(_ALLOC_ID_, &xctx->sym[j].name); + my_free(4, &xctx->sym[j].prop_ptr); + my_free(5, &xctx->sym[j].templ); + my_free(6, &xctx->sym[j].type); + my_free(7, &xctx->sym[j].name); /* /20150409 */ for(c=0;csym[j].polygons[c];i++) { if(xctx->sym[j].poly[c][i].prop_ptr != NULL) { - my_free(_ALLOC_ID_, &xctx->sym[j].poly[c][i].prop_ptr); + my_free(8, &xctx->sym[j].poly[c][i].prop_ptr); } - my_free(_ALLOC_ID_, &xctx->sym[j].poly[c][i].x); - my_free(_ALLOC_ID_, &xctx->sym[j].poly[c][i].y); - my_free(_ALLOC_ID_, &xctx->sym[j].poly[c][i].selected_point); + my_free(9, &xctx->sym[j].poly[c][i].x); + my_free(10, &xctx->sym[j].poly[c][i].y); + my_free(11, &xctx->sym[j].poly[c][i].selected_point); } - my_free(_ALLOC_ID_, &xctx->sym[j].poly[c]); + my_free(12, &xctx->sym[j].poly[c]); xctx->sym[j].polygons[c] = 0; for(i=0;isym[j].lines[c];i++) { if(xctx->sym[j].line[c][i].prop_ptr != NULL) { - my_free(_ALLOC_ID_, &xctx->sym[j].line[c][i].prop_ptr); + my_free(13, &xctx->sym[j].line[c][i].prop_ptr); } } - my_free(_ALLOC_ID_, &xctx->sym[j].line[c]); + my_free(14, &xctx->sym[j].line[c]); xctx->sym[j].lines[c] = 0; for(i=0;isym[j].arcs[c];i++) { if(xctx->sym[j].arc[c][i].prop_ptr != NULL) { - my_free(_ALLOC_ID_, &xctx->sym[j].arc[c][i].prop_ptr); + my_free(15, &xctx->sym[j].arc[c][i].prop_ptr); } } - my_free(_ALLOC_ID_, &xctx->sym[j].arc[c]); + my_free(16, &xctx->sym[j].arc[c]); xctx->sym[j].arcs[c] = 0; for(i=0;isym[j].rects[c];i++) { if(xctx->sym[j].rect[c][i].prop_ptr != NULL) { - my_free(_ALLOC_ID_, &xctx->sym[j].rect[c][i].prop_ptr); + my_free(17, &xctx->sym[j].rect[c][i].prop_ptr); } set_rect_extraptr(0, &xctx->sym[j].rect[c][i]); } - my_free(_ALLOC_ID_, &xctx->sym[j].rect[c]); + my_free(18, &xctx->sym[j].rect[c]); xctx->sym[j].rects[c] = 0; } for(i=0;isym[j].texts;i++) { if(xctx->sym[j].text[i].prop_ptr != NULL) { - my_free(_ALLOC_ID_, &xctx->sym[j].text[i].prop_ptr); + my_free(19, &xctx->sym[j].text[i].prop_ptr); } if(xctx->sym[j].text[i].txt_ptr != NULL) { - my_free(_ALLOC_ID_, &xctx->sym[j].text[i].txt_ptr); + my_free(20, &xctx->sym[j].text[i].txt_ptr); } if(xctx->sym[j].text[i].font != NULL) { - my_free(_ALLOC_ID_, &xctx->sym[j].text[i].font); + my_free(21, &xctx->sym[j].text[i].font); } } - my_free(_ALLOC_ID_, &xctx->sym[j].text); + my_free(22, &xctx->sym[j].text); xctx->sym[j].texts = 0; save = xctx->sym[j]; /* save cleared symbol slot */ @@ -589,7 +589,7 @@ int set_text_flags(xText *t) t->vcenter = 0; t->layer = -1; if(t->prop_ptr) { - my_strdup(_ALLOC_ID_, &t->font, get_tok_value(t->prop_ptr, "font", 0)); + my_strdup(23, &t->font, get_tok_value(t->prop_ptr, "font", 0)); str = get_tok_value(t->prop_ptr, "hcenter", 0); t->hcenter = strcmp(str, "true") ? 0 : 1; str = get_tok_value(t->prop_ptr, "vcenter", 0); @@ -618,7 +618,7 @@ int set_rect_extraptr(int what, xRect *drptr) if(drptr->flags & 1024) { /* embedded image */ if(!drptr->extraptr) { xEmb_image *d; - d = my_malloc(_ALLOC_ID_, sizeof(xEmb_image)); + d = my_malloc(24, sizeof(xEmb_image)); d->image = NULL; drptr->extraptr = d; } @@ -628,7 +628,7 @@ int set_rect_extraptr(int what, xRect *drptr) if(drptr->extraptr) { xEmb_image *d = drptr->extraptr; if(d->image) cairo_surface_destroy(d->image); - my_free(_ALLOC_ID_, &drptr->extraptr); + my_free(25, &drptr->extraptr); } } } @@ -642,55 +642,55 @@ void clear_drawing(void) xctx->graph_lastsel = -1; del_inst_table(); del_wire_table(); - my_free(_ALLOC_ID_, &xctx->schtedaxprop); - my_free(_ALLOC_ID_, &xctx->schsymbolprop); - my_free(_ALLOC_ID_, &xctx->schprop); - my_free(_ALLOC_ID_, &xctx->schvhdlprop); - my_free(_ALLOC_ID_, &xctx->version_string); - if(xctx->header_text) my_free(_ALLOC_ID_, &xctx->header_text); - my_free(_ALLOC_ID_, &xctx->schverilogprop); + my_free(26, &xctx->schtedaxprop); + my_free(27, &xctx->schsymbolprop); + my_free(28, &xctx->schprop); + my_free(29, &xctx->schvhdlprop); + my_free(30, &xctx->version_string); + if(xctx->header_text) my_free(31, &xctx->header_text); + my_free(32, &xctx->schverilogprop); for(i=0;iwires;i++) { - my_free(_ALLOC_ID_, &xctx->wire[i].prop_ptr); - my_free(_ALLOC_ID_, &xctx->wire[i].node); + my_free(33, &xctx->wire[i].prop_ptr); + my_free(34, &xctx->wire[i].node); } xctx->wires = 0; for(i=0;iinstances;i++) { - my_free(_ALLOC_ID_, &xctx->inst[i].prop_ptr); - my_free(_ALLOC_ID_, &xctx->inst[i].name); - my_free(_ALLOC_ID_, &xctx->inst[i].instname); - my_free(_ALLOC_ID_, &xctx->inst[i].lab); + my_free(35, &xctx->inst[i].prop_ptr); + my_free(36, &xctx->inst[i].name); + my_free(37, &xctx->inst[i].instname); + my_free(38, &xctx->inst[i].lab); delete_inst_node(i); } xctx->instances = 0; for(i=0;itexts;i++) { - my_free(_ALLOC_ID_, &xctx->text[i].font); - my_free(_ALLOC_ID_, &xctx->text[i].prop_ptr); - my_free(_ALLOC_ID_, &xctx->text[i].txt_ptr); + my_free(39, &xctx->text[i].font); + my_free(40, &xctx->text[i].prop_ptr); + my_free(41, &xctx->text[i].txt_ptr); } xctx->texts = 0; for(i=0;ilines[i];j++) { - my_free(_ALLOC_ID_, &xctx->line[i][j].prop_ptr); + my_free(42, &xctx->line[i][j].prop_ptr); } for(j=0;jrects[i];j++) { - my_free(_ALLOC_ID_, &xctx->rect[i][j].prop_ptr); + my_free(43, &xctx->rect[i][j].prop_ptr); set_rect_extraptr(0, &xctx->rect[i][j]); } for(j=0;jarcs[i];j++) { - my_free(_ALLOC_ID_, &xctx->arc[i][j].prop_ptr); + my_free(44, &xctx->arc[i][j].prop_ptr); } for(j=0;jpolygons[i]; j++) { - my_free(_ALLOC_ID_, &xctx->poly[i][j].x); - my_free(_ALLOC_ID_, &xctx->poly[i][j].y); - my_free(_ALLOC_ID_, &xctx->poly[i][j].prop_ptr); - my_free(_ALLOC_ID_, &xctx->poly[i][j].selected_point); + my_free(45, &xctx->poly[i][j].x); + my_free(46, &xctx->poly[i][j].y); + my_free(47, &xctx->poly[i][j].prop_ptr); + my_free(48, &xctx->poly[i][j].selected_point); } xctx->lines[i] = 0; xctx->arcs[i] = 0; @@ -825,8 +825,8 @@ void attach_labels_to_inst(int interactive) /* offloaded from callback.c 201710 int use_label_prefix; int found=0; - my_strdup(_ALLOC_ID_, &symname_pin, tcleval("rel_sym_path [find_file lab_pin.sym]")); - my_strdup(_ALLOC_ID_, &symname_wire, tcleval("rel_sym_path [find_file lab_wire.sym]")); + my_strdup(49, &symname_pin, tcleval("rel_sym_path [find_file lab_pin.sym]")); + my_strdup(50, &symname_wire, tcleval("rel_sym_path [find_file lab_wire.sym]")); if(symname_pin && symname_wire) { rebuild_selected_array(); k = xctx->lastsel; @@ -834,8 +834,8 @@ void attach_labels_to_inst(int interactive) /* offloaded from callback.c 201710 prepare_netlist_structs(0); for(j=0;jsel_array[j].type==ELEMENT) { found=1; - my_strdup(_ALLOC_ID_, &prop, xctx->inst[xctx->sel_array[j].n].instname); - my_strcat(_ALLOC_ID_, &prop, "_"); + my_strdup(51, &prop, xctx->inst[xctx->sel_array[j].n].instname); + my_strcat(52, &prop, "_"); tclsetvar("custom_label_prefix",prop); if(interactive && !do_all_inst) { @@ -843,7 +843,7 @@ void attach_labels_to_inst(int interactive) /* offloaded from callback.c 201710 tcleval("attach_labels_to_inst"); if(!strcmp(tclgetvar("rcode"),"") ) { bbox(END, 0., 0., 0., 0.); - my_free(_ALLOC_ID_, &prop); + my_free(53, &prop); return; } } @@ -857,7 +857,7 @@ void attach_labels_to_inst(int interactive) /* offloaded from callback.c 201710 use_label_prefix = atoi(tclgetvar("use_label_prefix")); rot_txt = tclgetvar("rotated_text"); if(strcmp(rot_txt,"")) rotated_text=atoi(rot_txt); - my_strdup(_ALLOC_ID_, &type,(xctx->inst[xctx->sel_array[j].n].ptr+ xctx->sym)->type); + my_strdup(54, &type,(xctx->inst[xctx->sel_array[j].n].ptr+ xctx->sym)->type); if( type && IS_LABEL_OR_PIN(type) ) { continue; } @@ -877,7 +877,7 @@ void attach_labels_to_inst(int interactive) /* offloaded from callback.c 201710 rct=symbol->rect[PINLAYER]; for(i=0;i labname=%s\n", labname); pinx0 = (rct[i].x1+rct[i].x2)/2; @@ -921,13 +921,13 @@ void attach_labels_to_inst(int interactive) /* offloaded from callback.c 201710 wptr = wptr->next; } if(!skip) { - my_strdup(_ALLOC_ID_, &prop, "name=p1 lab="); + my_strdup(56, &prop, "name=p1 lab="); if(use_label_prefix) { - my_strcat(_ALLOC_ID_, &prop, (char *)tclgetvar("custom_label_prefix")); + my_strcat(57, &prop, (char *)tclgetvar("custom_label_prefix")); } /* /20171005 */ - my_strcat(_ALLOC_ID_, &prop, labname); + my_strcat(58, &prop, labname); dir ^= flip; /* 20101129 20111030 */ if(rotated_text ==-1) { rot1=rot; @@ -946,9 +946,9 @@ void attach_labels_to_inst(int interactive) /* offloaded from callback.c 201710 dbg(1, "attach_labels_to_inst(): %d %.16g %.16g %s\n", i, pinx0, piny0,labname); } } - my_free(_ALLOC_ID_, &prop); - my_free(_ALLOC_ID_, &labname); - my_free(_ALLOC_ID_, &type); + my_free(59, &prop); + my_free(60, &labname); + my_free(61, &type); if(!found) return; /* draw things */ bbox(SET , 0.0 , 0.0 , 0.0 , 0.0); @@ -958,8 +958,8 @@ void attach_labels_to_inst(int interactive) /* offloaded from callback.c 201710 fprintf(errfp, "attach_labels_to_inst(): location of schematic labels not found\n"); tcleval("alert_ {attach_labels_to_inst(): location of schematic labels not found} {}"); } - my_free(_ALLOC_ID_, &symname_pin); - my_free(_ALLOC_ID_, &symname_wire); + my_free(62, &symname_pin); + my_free(63, &symname_wire); } void delete_files(void) @@ -1038,7 +1038,7 @@ int place_symbol(int pos, const char *symbol_name, double x, double y, short rot xctx->inst[n].instname=NULL; xctx->inst[n].lab=NULL; dbg(1, "place_symbol(): entering my_strdup: name=%s\n",name); /* 03-02-2000 */ - my_strdup2(_ALLOC_ID_, &xctx->inst[n].name ,name); + my_strdup2(64, &xctx->inst[n].name ,name); dbg(1, "place_symbol(): done my_strdup: name=%s\n",name); /* 03-02-2000 */ /* xctx->inst[n].x0=symbol_name ? x : xctx->mousex_snap; */ /* xctx->inst[n].y0=symbol_name ? y : xctx->mousey_snap; */ @@ -1067,7 +1067,7 @@ int place_symbol(int pos, const char *symbol_name, double x, double y, short rot type = xctx->sym[xctx->inst[n].ptr].type; cond= !type || !IS_LABEL_SH_OR_PIN(type); if(cond) xctx->inst[n].flags|=2; - else my_strdup(_ALLOC_ID_, &xctx->inst[n].lab, get_tok_value(xctx->inst[n].prop_ptr,"lab",0)); + else my_strdup(65, &xctx->inst[n].lab, get_tok_value(xctx->inst[n].prop_ptr,"lab",0)); xctx->inst[n].embed = !strcmp(get_tok_value(xctx->inst[n].prop_ptr, "embed", 2), "true"); if(first_call && (draw_sym & 3) ) bbox(START, 0.0 , 0.0 , 0.0 , 0.0); xctx->instances++; /* must be updated before calling symbol_bbox() */ @@ -1216,25 +1216,25 @@ void get_sch_from_sym(char *filename, xSymbol *sym) strstr(xctx->current_dirname, "https://") == xctx->current_dirname) { web_url = 1; } - my_strdup2(_ALLOC_ID_, &str_tmp, get_tok_value(sym->prop_ptr, "schematic", 2)); + my_strdup2(66, &str_tmp, get_tok_value(sym->prop_ptr, "schematic", 2)); if(str_tmp[0]) { /* @symname in schematic attribute will be replaced with symbol name */ if( (ptr = strstr(str_tmp, "@symname"))) { *ptr = '\0'; - my_strdup2(_ALLOC_ID_, &sch, str_tmp); - my_strcat(_ALLOC_ID_, &sch, sym->name); + my_strdup2(67, &sch, str_tmp); + my_strcat(68, &sch, sym->name); ptr += 8; - my_strcat(_ALLOC_ID_, &sch, ptr); + my_strcat(69, &sch, ptr); } else { - my_strdup2(_ALLOC_ID_, &sch, str_tmp); + my_strdup2(70, &sch, str_tmp); } dbg(1, "get_sch_from_sym(): sch=%s\n", sch); - my_strdup2(_ALLOC_ID_, &sch, tcl_hook2(&sch)); + my_strdup2(71, &sch, tcl_hook2(&sch)); dbg(1, "get_sch_from_sym(): after tcl_hook2 sch=%s\n", sch); /* for schematics referenced from web symbols do not build absolute path */ if(web_url) my_strncpy(filename, sch, PATH_MAX); else my_strncpy(filename, abs_sym_path(sch, ""), PATH_MAX); - my_free(_ALLOC_ID_, &sch); + my_free(72, &sch); } else { if(tclgetboolvar("search_schematic")) { /* for schematics referenced from web symbols do not build absolute path */ @@ -1246,7 +1246,7 @@ void get_sch_from_sym(char *filename, xSymbol *sym) else my_strncpy(filename, add_ext(abs_sym_path(sym->name, ""), ".sch"), PATH_MAX); } } - my_free(_ALLOC_ID_, &str_tmp); + my_free(73, &str_tmp); dbg(1, "get_sch_from_sym(): sym->name=%s, filename=%s\n", sym->name, filename); } @@ -1319,11 +1319,11 @@ int descend_schematic(int instnumber) str = ""; inst_mult = 1; } - my_strdup(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], xctx->sch_path[xctx->currsch]); + my_strdup(74, &xctx->sch_path[xctx->currsch+1], xctx->sch_path[xctx->currsch]); xctx->sch_path_hash[xctx->currsch+1] =0; - my_strdup(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].prop_ptr, + my_strdup(75, &xctx->hier_attr[xctx->currsch].prop_ptr, xctx->inst[n].prop_ptr); - my_strdup(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].templ, + my_strdup(76, &xctx->hier_attr[xctx->currsch].templ, get_tok_value((xctx->inst[n].ptr+ xctx->sym)->prop_ptr, "template", 0)); inst_number = 1; if(inst_mult > 1) { /* on multiple instances ask where to descend, to correctly evaluate @@ -1337,7 +1337,7 @@ int descend_schematic(int instnumber) inum = tclresult(); dbg(1, "descend_schematic(): inum=%s\n", inum); if(!inum[0]) { - my_free(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1]); + my_free(77, &xctx->sch_path[xctx->currsch+1]); xctx->sch_path_hash[xctx->currsch+1] =0; return 0; } @@ -1350,9 +1350,9 @@ int descend_schematic(int instnumber) if(inst_number <1 || inst_number > inst_mult) inst_number = 1; } dbg(1,"descend_schematic(): inst_number=%d\n", inst_number); - my_strcat(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], find_nth(str, ",", inst_number)); + my_strcat(78, &xctx->sch_path[xctx->currsch+1], find_nth(str, ",", inst_number)); dbg(1,"descend_schematic(): inst_number=%d\n", inst_number); - my_strcat(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], "."); + my_strcat(79, &xctx->sch_path[xctx->currsch+1], "."); xctx->sch_inst_number[xctx->currsch+1] = inst_number; dbg(1, "descend_schematic(): current path: %s\n", xctx->sch_path[xctx->currsch+1]); dbg(1, "descend_schematic(): inst_number=%d\n", inst_number); @@ -2114,7 +2114,7 @@ void change_layer() if(xctx->rectcolor != xctx->text[n].layer) { char *p; set_modify(1); - my_strdup(_ALLOC_ID_, &xctx->text[n].prop_ptr, + my_strdup(80, &xctx->text[n].prop_ptr, subst_token(xctx->text[n].prop_ptr, "layer", dtoa(xctx->rectcolor) )); xctx->text[n].layer = xctx->rectcolor; p = xctx->text[n].prop_ptr; @@ -2338,8 +2338,8 @@ void new_polygon(int what) if(xctx->nl_points >= xctx->nl_maxpoints-1) { /* check storage for 2 xctx->nl_points */ xctx->nl_maxpoints = (1+xctx->nl_points / CADCHUNKALLOC) * CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &xctx->nl_polyx, sizeof(double)*xctx->nl_maxpoints); - my_realloc(_ALLOC_ID_, &xctx->nl_polyy, sizeof(double)*xctx->nl_maxpoints); + my_realloc(81, &xctx->nl_polyx, sizeof(double)*xctx->nl_maxpoints); + my_realloc(82, &xctx->nl_polyy, sizeof(double)*xctx->nl_maxpoints); } if( what & PLACE ) { @@ -2386,8 +2386,8 @@ void new_polygon(int what) drawtemppolygon(xctx->gc[xctx->rectcolor], NOW, xctx->nl_polyx, xctx->nl_polyy, xctx->nl_points); xctx->ui_state &= ~STARTPOLYGON; drawpolygon(xctx->rectcolor, NOW, xctx->nl_polyx, xctx->nl_polyy, xctx->nl_points, 0, 0); - my_free(_ALLOC_ID_, &xctx->nl_polyx); - my_free(_ALLOC_ID_, &xctx->nl_polyy); + my_free(83, &xctx->nl_polyx); + my_free(84, &xctx->nl_polyy); xctx->nl_maxpoints = xctx->nl_points = 0; } if(what & RUBBER) @@ -2426,7 +2426,7 @@ int text_bbox(const char *str, double xscale, double yscale, ww=0.; hh=1.; c=0; *cairo_lines=1; - my_strdup2(_ALLOC_ID_, &s, str); + my_strdup2(85, &s, str); str_ptr = s; while( s && s[c] ) { if(s[c] == '\n') { @@ -2449,7 +2449,7 @@ int text_bbox(const char *str, double xscale, double yscale, maxw = ext.x_advance > ext.width ? ext.x_advance : ext.width; if(maxw > ww) ww= maxw; } - my_free(_ALLOC_ID_, &s); + my_free(86, &s); hh = hh*fext.height * cairo_font_line_spacing; *cairo_longest_line = ww; @@ -2606,7 +2606,7 @@ int place_text(int draw_text, double mx, double my) t->txt_ptr=NULL; t->prop_ptr=NULL; /* 20111006 added missing initialization of pointer */ t->font=NULL; - my_strdup(_ALLOC_ID_, &t->txt_ptr, txt); + my_strdup(87, &t->txt_ptr, txt); t->x0=mx; t->y0=my; t->rot=0; @@ -2614,7 +2614,7 @@ int place_text(int draw_text, double mx, double my) t->sel=0; t->xscale= atof(tclgetvar("hsize")); t->yscale= atof(tclgetvar("vsize")); - my_strdup(_ALLOC_ID_, &t->prop_ptr, (char *)tclgetvar("props")); + my_strdup(88, &t->prop_ptr, (char *)tclgetvar("props")); /* debug ... */ /* t->prop_ptr=NULL; */ dbg(1, "place_text(): done text input\n"); diff --git a/src/callback.c b/src/callback.c index 97c42123..7ded7a33 100644 --- a/src/callback.c +++ b/src/callback.c @@ -583,8 +583,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int if(fabs(xctx->my_double_save - xctx->mousey_snap) > fabs(gr->dcy * delta) * delta_threshold) { yy1 = gr->ypos1 + (xctx->my_double_save - xctx->mousey_snap) / gr->dcy; yy2 = gr->ypos2 + (xctx->my_double_save - xctx->mousey_snap) / gr->dcy; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "ypos1", dtoa(yy1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "ypos2", dtoa(yy2))); + my_strdup(89, &r->prop_ptr, subst_token(r->prop_ptr, "ypos1", dtoa(yy1))); + my_strdup(90, &r->prop_ptr, subst_token(r->prop_ptr, "ypos2", dtoa(yy2))); xctx->my_double_save = xctx->mousey_snap; need_redraw = 1; } @@ -594,8 +594,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int if(fabs(xctx->my_double_save - xctx->mousey_snap) > fabs(gr->cy * delta) * delta_threshold) { yy1 = gr->gy1 + (xctx->my_double_save - xctx->mousey_snap) / gr->cy; yy2 = gr->gy2 + (xctx->my_double_save - xctx->mousey_snap) / gr->cy; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(yy1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(yy2))); + my_strdup(91, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(yy1))); + my_strdup(92, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(yy2))); xctx->my_double_save = xctx->mousey_snap; need_redraw = 1; } @@ -611,8 +611,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int if(fabs(xctx->mx_double_save - xctx->mousex_snap) > fabs(gr->cx * delta) * delta_threshold) { xx1 = gr->gx1 + (xctx->mx_double_save - xctx->mousex_snap) / gr->cx; xx2 = gr->gx2 + (xctx->mx_double_save - xctx->mousex_snap) / gr->cx; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); + my_strdup(93, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); + my_strdup(94, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); need_redraw = 1; } } @@ -626,16 +626,16 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int delta = gr->posh * 0.05; yy1 = gr->ypos1 + delta; yy2 = gr->ypos2 + delta; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "ypos1", dtoa(yy1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "ypos2", dtoa(yy2))); + my_strdup(95, &r->prop_ptr, subst_token(r->prop_ptr, "ypos1", dtoa(yy1))); + my_strdup(96, &r->prop_ptr, subst_token(r->prop_ptr, "ypos2", dtoa(yy2))); need_redraw = 1; } else { delta = gr->gh/ gr->divy; delta_threshold = 1.0; yy1 = gr->gy1 + delta * delta_threshold; yy2 = gr->gy2 + delta * delta_threshold; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(yy1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(yy2))); + my_strdup(97, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(yy1))); + my_strdup(98, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(yy2))); need_redraw = 1; } } @@ -646,8 +646,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int delta_threshold = 0.05; xx1 = gr->gx1 - delta * delta_threshold; xx2 =gr->gx2 - delta * delta_threshold; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); + my_strdup(99, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); + my_strdup(100, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); need_redraw = 1; } } @@ -657,7 +657,7 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int const char *unlocked = strstr(get_tok_value(r->prop_ptr, "flags", 0), "unlocked"); if(i == xctx->graph_master || !unlocked) { gr->dataset = track_dset; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "dataset", my_itoa(track_dset))); + my_strdup(101, &r->prop_ptr, subst_token(r->prop_ptr, "dataset", my_itoa(track_dset))); } if((xctx->graph_flags & 4) && tclgetboolvar("live_cursor2_backannotate")) { if(i == xctx->graph_master) backannotate_at_cursor_b_pos(r, gr); @@ -679,8 +679,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int double var = delta * 0.2; yy2 = gr->gy2 + var * b / delta; yy1 = gr->gy1 - var * a / delta; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(yy1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(yy2))); + my_strdup(102, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(yy1))); + my_strdup(103, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(yy2))); need_redraw = 1; } } else { @@ -688,8 +688,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int delta_threshold = 0.05; xx1 = gr->gx1 - delta * delta_threshold; xx2 = gr->gx2 - delta * delta_threshold; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); + my_strdup(104, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); + my_strdup(105, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); need_redraw = 1; } } @@ -701,16 +701,16 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int delta = gr->posh * 0.05; yy1 = gr->ypos1 - delta; yy2 = gr->ypos2 - delta; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "ypos1", dtoa(yy1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "ypos2", dtoa(yy2))); + my_strdup(106, &r->prop_ptr, subst_token(r->prop_ptr, "ypos1", dtoa(yy1))); + my_strdup(107, &r->prop_ptr, subst_token(r->prop_ptr, "ypos2", dtoa(yy2))); need_redraw = 1; } else { delta = gr->gh / gr->divy; delta_threshold = 1.0; yy1 = gr->gy1 - delta * delta_threshold; yy2 = gr->gy2 - delta * delta_threshold; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(yy1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(yy2))); + my_strdup(108, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(yy1))); + my_strdup(109, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(yy2))); need_redraw = 1; } } @@ -721,8 +721,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int delta_threshold = 0.05; xx1 = gr->gx1 + delta * delta_threshold; xx2 = gr->gx2 + delta * delta_threshold; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); + my_strdup(110, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); + my_strdup(111, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); need_redraw = 1; } } @@ -738,8 +738,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int double var = delta * 0.2; yy2 = gr->gy2 - var * b / delta; yy1 = gr->gy1 + var * a / delta; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(yy1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(yy2))); + my_strdup(112, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(yy1))); + my_strdup(113, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(yy2))); need_redraw = 1; } } else { @@ -747,8 +747,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int delta_threshold = 0.05; xx1 = gr->gx1 + delta * delta_threshold; xx2 = gr->gx2 + delta * delta_threshold; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); + my_strdup(114, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); + my_strdup(115, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); need_redraw = 1; } } @@ -763,8 +763,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int double var = delta * 0.05; yy2 = gr->ypos2 + var * b / delta; yy1 = gr->ypos1 - var * a / delta; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "ypos1", dtoa(yy1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "ypos2", dtoa(yy2))); + my_strdup(116, &r->prop_ptr, subst_token(r->prop_ptr, "ypos1", dtoa(yy1))); + my_strdup(117, &r->prop_ptr, subst_token(r->prop_ptr, "ypos2", dtoa(yy2))); need_redraw = 1; } else { @@ -775,8 +775,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int double var = delta * 0.2; yy2 = gr->gy2 + var * b / delta; yy1 = gr->gy1 - var * a / delta; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(yy1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(yy2))); + my_strdup(118, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(yy1))); + my_strdup(119, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(yy2))); need_redraw = 1; } } @@ -786,8 +786,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int double var = 0.2 * gr->gw; xx2 = gr->gx2 + var * (1 - zoom_m); xx1 = gr->gx1 - var * zoom_m; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); + my_strdup(120, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); + my_strdup(121, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); need_redraw = 1; } } @@ -799,8 +799,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int double var = 0.2 * gr->gw; xx2 = gr->gx2 + var * (1 - zoom_m); xx1 = gr->gx1 - var * zoom_m; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); + my_strdup(122, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); + my_strdup(123, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); need_redraw = 1; } } @@ -816,8 +816,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int double var = delta * 0.05; yy2 = gr->ypos2 - var * b / delta; yy1 = gr->ypos1 + var * a / delta; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "ypos1", dtoa(yy1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "ypos2", dtoa(yy2))); + my_strdup(124, &r->prop_ptr, subst_token(r->prop_ptr, "ypos1", dtoa(yy1))); + my_strdup(125, &r->prop_ptr, subst_token(r->prop_ptr, "ypos2", dtoa(yy2))); need_redraw = 1; } else { double m = G_Y(xctx->mousey); @@ -827,8 +827,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int double var = delta * 0.2; yy2 = gr->gy2 - var * b / delta; yy1 = gr->gy1 + var * a / delta; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(yy1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(yy2))); + my_strdup(126, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(yy1))); + my_strdup(127, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(yy2))); need_redraw = 1; } } @@ -838,8 +838,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int double var = 0.2 * gr->gw; xx2 = gr->gx2 - var * (1 - zoom_m); xx1 = gr->gx1 + var * zoom_m; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); + my_strdup(128, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); + my_strdup(129, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); need_redraw = 1; } } @@ -851,8 +851,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int double var = 0.2 * gr->gw; xx2 = gr->gx2 - var * (1 - zoom_m); xx1 = gr->gx1 + var * zoom_m; - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); + my_strdup(130, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); + my_strdup(131, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); need_redraw = 1; } } @@ -870,8 +870,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int double min=0.0, max=0.0; int first = 1; char *saves, *sptr, *stok, *sweep = NULL, *saven, *nptr, *ntok, *node = NULL; - my_strdup2(_ALLOC_ID_, &node, get_tok_value(r->prop_ptr,"node",0)); - my_strdup2(_ALLOC_ID_, &sweep, get_tok_value(r->prop_ptr,"sweep",0)); + my_strdup2(132, &node, get_tok_value(r->prop_ptr,"node",0)); + my_strdup2(133, &sweep, get_tok_value(r->prop_ptr,"sweep",0)); nptr = node; sptr = sweep; start = (gr->gx1 <= gr->gx2) ? gr->gx1 : gr->gx2; @@ -889,9 +889,9 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int if(!bus_msb) { char *express = NULL; if(strstr(ntok, ";")) { - my_strdup2(_ALLOC_ID_, &express, find_nth(ntok, ";", 2)); + my_strdup2(134, &express, find_nth(ntok, ";", 2)); } else { - my_strdup2(_ALLOC_ID_, &express, ntok); + my_strdup2(135, &express, ntok); } if(strpbrk(express, " \n\t")) { /* just probe a single point to get the index. custom data column already calculated */ @@ -899,7 +899,7 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int } else { j = get_raw_index(express); } - my_free(_ALLOC_ID_, &express); + my_free(136, &express); } if(j >= 0) { int ofs = 0; @@ -926,15 +926,15 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int if(max == min) max += 0.01; min = floor_to_n_digits(min, 2); max = ceil_to_n_digits(max, 2); - my_free(_ALLOC_ID_, &node); - my_free(_ALLOC_ID_, &sweep); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(min))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(max))); + my_free(137, &node); + my_free(138, &sweep); + my_strdup(139, &r->prop_ptr, subst_token(r->prop_ptr, "y1", dtoa(min))); + my_strdup(140, &r->prop_ptr, subst_token(r->prop_ptr, "y2", dtoa(max))); need_redraw = 1; } else { /* digital plot */ - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "ypos1", + my_strdup(141, &r->prop_ptr, subst_token(r->prop_ptr, "ypos1", get_tok_value(r->prop_ptr, "y1", 0) )); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "ypos2", + my_strdup(142, &r->prop_ptr, subst_token(r->prop_ptr, "ypos2", get_tok_value(r->prop_ptr, "y2", 0) )); need_redraw = 1; } @@ -951,8 +951,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int xx1 = mylog10(xx1); xx2 = mylog10(xx2); } - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); + my_strdup(143, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); + my_strdup(144, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); need_redraw = 1; } } @@ -987,8 +987,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int xx2 = pp + delta / 2.0; */ - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); + my_strdup(145, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); + my_strdup(146, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); need_redraw = 1; } } @@ -1016,8 +1016,8 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int if(xx1 == xx2) xx2 += 1e-6; */ - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); - my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); + my_strdup(147, &r->prop_ptr, subst_token(r->prop_ptr, "x1", dtoa(xx1))); + my_strdup(148, &r->prop_ptr, subst_token(r->prop_ptr, "x2", dtoa(xx2))); need_redraw = 1; } } @@ -2063,11 +2063,11 @@ int callback(const char *winpath, int event, int mx, int my, KeySym key, if(!tool) { tool = atoi(tclgetvar("sim(spicewave,default)")); my_snprintf(str, S(str), "sim(spicewave,%d,name)", tool); - my_strdup(_ALLOC_ID_, &tool_name, tclgetvar(str)); + my_strdup(149, &tool_name, tclgetvar(str)); dbg(1,"callback(): tool_name=%s\n", tool_name); if(strstr(tool_name, "Gaw")) tool=GAW; else if(strstr(tool_name, "Bespice")) tool=BESPICE; - my_free(_ALLOC_ID_, &tool_name); + my_free(150, &tool_name); } } if(tool) { diff --git a/src/check.c b/src/check.c index 7474495d..9e9d3bb7 100644 --- a/src/check.c +++ b/src/check.c @@ -189,14 +189,14 @@ void trim_wires(void) xctx->wire[xctx->wires].y2=y0; xctx->wire[xctx->wires].sel=0; xctx->wire[xctx->wires].prop_ptr=NULL; - my_strdup(_ALLOC_ID_, &xctx->wire[xctx->wires].prop_ptr, xctx->wire[j].prop_ptr); + my_strdup(151, &xctx->wire[xctx->wires].prop_ptr, xctx->wire[j].prop_ptr); if(!strcmp(get_tok_value(xctx->wire[xctx->wires].prop_ptr,"bus",0), "true")) xctx->wire[xctx->wires].bus=1; else xctx->wire[xctx->wires].bus=0; xctx->wire[xctx->wires].node=NULL; - my_strdup(_ALLOC_ID_, &xctx->wire[xctx->wires].node, xctx->wire[j].node); + my_strdup(152, &xctx->wire[xctx->wires].node, xctx->wire[j].node); xctx->wire[j].x1 = x0; xctx->wire[j].y1 = y0; hash_wire(XINSERT, xctx->wires, 0); @@ -212,7 +212,7 @@ void trim_wires(void) } /* dbg(1, "trim_wires(): break: %g\n", timer(1)); */ /* reduce included wires */ - my_realloc(_ALLOC_ID_, &wireflag, xctx->wires*sizeof(unsigned short)); + my_realloc(153, &wireflag, xctx->wires*sizeof(unsigned short)); memset(wireflag, 0, xctx->wires*sizeof(unsigned short)); for(i=0;iwires;i++) { if(wireflag[i]) continue; @@ -255,8 +255,8 @@ void trim_wires(void) if(wireflag[i]) { j++; /* hash_wire(XDELETE, i, 0);*/ /* can not be done since wire deletions change wire idexes in array */ - my_free(_ALLOC_ID_, &xctx->wire[i].prop_ptr); - my_free(_ALLOC_ID_, &xctx->wire[i].node); + my_free(154, &xctx->wire[i].prop_ptr); + my_free(155, &xctx->wire[i].node); continue; } if(j) { @@ -273,7 +273,7 @@ void trim_wires(void) /* after wire deletions full rehash is needed */ hash_wires(); - my_realloc(_ALLOC_ID_, &wireflag, xctx->wires*sizeof(unsigned short)); + my_realloc(156, &wireflag, xctx->wires*sizeof(unsigned short)); memset(wireflag, 0, xctx->wires*sizeof(unsigned short)); /* dbg(1, "trim_wires(): hash_wires_2: %g\n", timer(1)); */ @@ -351,8 +351,8 @@ void trim_wires(void) if(wireflag[i]) { j++; /* hash_wire(XDELETE, i, 0);*/ /* can not be done since wire deletions change wire idexes in array */ - my_free(_ALLOC_ID_, &xctx->wire[i].prop_ptr); - my_free(_ALLOC_ID_, &xctx->wire[i].node); + my_free(157, &xctx->wire[i].prop_ptr); + my_free(158, &xctx->wire[i].node); continue; } if(j) { @@ -374,7 +374,7 @@ void trim_wires(void) } } while(changed); dbg(1, "trim_wires(): doloops=%d changed=%d\n", doloops, changed); - my_free(_ALLOC_ID_, &wireflag); + my_free(159, &wireflag); update_conn_cues(WIRELAYER, 0, 0); } @@ -413,14 +413,14 @@ void break_wires_at_pins(void) xctx->wire[xctx->wires].y2=y0; xctx->wire[xctx->wires].sel=0; xctx->wire[xctx->wires].prop_ptr=NULL; - my_strdup(_ALLOC_ID_, &xctx->wire[xctx->wires].prop_ptr, xctx->wire[i].prop_ptr); + my_strdup(160, &xctx->wire[xctx->wires].prop_ptr, xctx->wire[i].prop_ptr); if(!strcmp(get_tok_value(xctx->wire[xctx->wires].prop_ptr,"bus",0), "true")) xctx->wire[xctx->wires].bus=1; else xctx->wire[xctx->wires].bus=0; xctx->wire[xctx->wires].node=NULL; hash_wire(XINSERT, xctx->wires, 0); /* insertion happens at beginning of list */ - my_strdup(_ALLOC_ID_, &xctx->wire[xctx->wires].node, xctx->wire[i].node); + my_strdup(161, &xctx->wire[xctx->wires].node, xctx->wire[i].node); xctx->need_reb_sel_arr=1; xctx->wires++; xctx->wire[i].x1 = x0; @@ -469,7 +469,7 @@ void break_wires_at_pins(void) xctx->wire[xctx->wires].y2=y0; xctx->wire[xctx->wires].sel=0; xctx->wire[xctx->wires].prop_ptr=NULL; - my_strdup(_ALLOC_ID_, &xctx->wire[xctx->wires].prop_ptr, xctx->wire[i].prop_ptr); + my_strdup(162, &xctx->wire[xctx->wires].prop_ptr, xctx->wire[i].prop_ptr); if(!strcmp(get_tok_value(xctx->wire[xctx->wires].prop_ptr,"bus",0), "true")) xctx->wire[xctx->wires].bus=1; else diff --git a/src/draw.c b/src/draw.c index d155b02c..a1c4537e 100644 --- a/src/draw.c +++ b/src/draw.c @@ -304,7 +304,7 @@ void draw_string(int layer, int what, const char *str, short rot, short flip, in dbg(1, "draw_string(): size * mooz=%g height=%g ascent=%g descent=%g\n", size * xctx->mooz, fext.height, fext.ascent, fext.descent); llength=0; - my_strdup2(_ALLOC_ID_, &sss, str); + my_strdup2(163, &sss, str); tt=ss=sss; for(;;) { c=*ss; @@ -325,7 +325,7 @@ void draw_string(int layer, int what, const char *str, short rot, short flip, in } ss++; } - my_free(_ALLOC_ID_, &sss); + my_free(164, &sss); } #else /* !HAS_CAIRO */ @@ -504,16 +504,16 @@ void draw_symbol(int what,int c, int n,int layer,short tmp_flip, short rot, for(j=0;j< symptr->polygons[layer];j++) { polygon = &(symptr->poly[layer])[j]; - x = my_malloc(_ALLOC_ID_, sizeof(double) * polygon->points); - y = my_malloc(_ALLOC_ID_, sizeof(double) * polygon->points); + x = my_malloc(165, sizeof(double) * polygon->points); + y = my_malloc(166, sizeof(double) * polygon->points); for(k=0;kpoints;k++) { ROTATION(rot, flip, 0.0,0.0,polygon->x[k],polygon->y[k],x[k],y[k]); x[k]+= x0; y[k] += y0; } drawpolygon(c, NOW, x, y, polygon->points, polygon->fill, polygon->dash); /* added fill */ - my_free(_ALLOC_ID_, &x); - my_free(_ALLOC_ID_, &y); + my_free(167, &x); + my_free(168, &y); } for(j=0;j< symptr->arcs[layer];j++) { @@ -683,16 +683,16 @@ void draw_temp_symbol(int what, GC gc, int n,int layer,short tmp_flip, short rot { /* scope block so we declare some auxiliary arrays for coord transforms. 20171115 */ int k; - double *x = my_malloc(_ALLOC_ID_, sizeof(double) * polygon->points); - double *y = my_malloc(_ALLOC_ID_, sizeof(double) * polygon->points); + double *x = my_malloc(169, sizeof(double) * polygon->points); + double *y = my_malloc(170, sizeof(double) * polygon->points); for(k=0;kpoints;k++) { ROTATION(rot, flip, 0.0,0.0,polygon->x[k],polygon->y[k],x[k],y[k]); x[k] += x0; y[k] += y0; } drawtemppolygon(gc, NOW, x, y, polygon->points); - my_free(_ALLOC_ID_, &x); - my_free(_ALLOC_ID_, &y); + my_free(171, &x); + my_free(172, &y); } } @@ -1504,7 +1504,7 @@ void drawpolygon(int c, int what, double *x, double *y, int points, int poly_fil return; } if(!xctx->only_probes && (x2-x1)<1.0 && (y2-y1)<1.0) return; - p = my_malloc(_ALLOC_ID_, sizeof(XPoint) * points); + p = my_malloc(173, sizeof(XPoint) * points); if(what) { for(i=0;igc[c], INT_WIDTH(xctx->lw) ,LineSolid, LINECAP , LINEJOIN); } - my_free(_ALLOC_ID_, &p); + my_free(174, &p); } void drawtemppolygon(GC g, int what, double *x, double *y, int points) @@ -1551,7 +1551,7 @@ void drawtemppolygon(GC g, int what, double *x, double *y, int points) y1=Y_TO_SCREEN(y1); x2=X_TO_SCREEN(x2); y2=Y_TO_SCREEN(y2); - p = my_malloc(_ALLOC_ID_, sizeof(XPoint) * points); + p = my_malloc(175, sizeof(XPoint) * points); if( rectclip(xctx->areax1,xctx->areay1,xctx->areax2,xctx->areay2,&x1,&y1,&x2,&y2) ) { for(i=0;iwindow, g, p, points, CoordModeOrigin); } - my_free(_ALLOC_ID_, &p); + my_free(176, &p); } void drawrect(int c, int what, double rectx1,double recty1,double rectx2,double recty2, int dash) @@ -1834,9 +1834,9 @@ static SPICE_DATA **get_bus_idx_array(const char *ntok, int *n_bits) *n_bits = count_items(ntok, ";,", "") - 1; /* dbg(0, "get_bus_idx_array(): ntok=%s\n", ntok); */ /* dbg(0, "get_bus_idx_array(): *n_bits=%d\n", *n_bits); */ - idx_arr = my_malloc(_ALLOC_ID_, (*n_bits) * sizeof(SPICE_DATA *)); + idx_arr = my_malloc(177, (*n_bits) * sizeof(SPICE_DATA *)); p = 0; - my_strdup2(_ALLOC_ID_, &ntok_copy, ntok); + my_strdup2(178, &ntok_copy, ntok); nptr = ntok_copy; my_strtok_r(nptr, ";,", "", &saven); /*strip off bus name (1st field) */ while( (bit_name = my_strtok_r(NULL, ";,", "", &saven)) ) { @@ -1850,7 +1850,7 @@ static SPICE_DATA **get_bus_idx_array(const char *ntok, int *n_bits) /* dbg(0, "get_bus_idx_array(): bit_name=%s, p=%d\n", bit_name, p); */ p++; } - my_free(_ALLOC_ID_, &ntok_copy); + my_free(179, &ntok_copy); return idx_arr; } @@ -2333,18 +2333,18 @@ static void draw_graph_variables(int wcnt, int wave_color, int n_nodes, int swee char *ntok_ptr = NULL; char *alias_ptr = NULL; if(strstr(ntok, ";")) { - my_strdup2(_ALLOC_ID_, &alias_ptr, find_nth(ntok, ";", 1)); - my_strdup2(_ALLOC_ID_, &ntok_ptr, find_nth(ntok, ";", 2)); + my_strdup2(180, &alias_ptr, find_nth(ntok, ";", 1)); + my_strdup2(181, &ntok_ptr, find_nth(ntok, ";", 2)); } else { - my_strdup2(_ALLOC_ID_, &alias_ptr, ntok); - my_strdup2(_ALLOC_ID_, &ntok_ptr, ntok); + my_strdup2(182, &alias_ptr, ntok); + my_strdup2(183, &ntok_ptr, ntok); } if(gr->unity != 1.0) my_snprintf(tmpstr, S(tmpstr), "%s[%c]", alias_ptr, gr->unity_suffix); else my_snprintf(tmpstr, S(tmpstr), "%s", alias_ptr); - my_free(_ALLOC_ID_, &alias_ptr); - my_free(_ALLOC_ID_, &ntok_ptr); + my_free(184, &alias_ptr); + my_free(185, &ntok_ptr); } if(gr->digital) { double xt = gr->x1 - 15 * gr->txtsizelab; @@ -2474,8 +2474,8 @@ int embed_rawfile(const char *rawfile) xctx->push_undo(); set_modify(1); ptr = base64_from_file(rawfile, &len); - my_strdup2(_ALLOC_ID_, &i->prop_ptr, subst_token(i->prop_ptr, "spice_data", ptr)); - my_free(_ALLOC_ID_, &ptr); + my_strdup2(186, &i->prop_ptr, subst_token(i->prop_ptr, "spice_data", ptr)); + my_free(187, &ptr); } return res; } @@ -2499,9 +2499,9 @@ int edit_wave_attributes(int what, int i, Graph_ctx *gr) xRect *r = &xctx->rect[GRIDLAYER][i]; /* get plot data */ - my_strdup2(_ALLOC_ID_, &node, get_tok_value(r->prop_ptr,"node",0)); - my_strdup2(_ALLOC_ID_, &color, get_tok_value(r->prop_ptr,"color",0)); - my_strdup2(_ALLOC_ID_, &sweep, get_tok_value(r->prop_ptr,"sweep",0)); + my_strdup2(188, &node, get_tok_value(r->prop_ptr,"node",0)); + my_strdup2(189, &color, get_tok_value(r->prop_ptr,"color",0)); + my_strdup2(190, &sweep, get_tok_value(r->prop_ptr,"sweep",0)); nptr = node; cptr = color; sptr = sweep; @@ -2539,10 +2539,10 @@ int edit_wave_attributes(int what, int i, Graph_ctx *gr) } else { if(gr->hilight_wave == wcnt) { gr->hilight_wave = -1; - my_strdup2(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "hilight_wave", my_itoa(gr->hilight_wave))); + my_strdup2(191, &r->prop_ptr, subst_token(r->prop_ptr, "hilight_wave", my_itoa(gr->hilight_wave))); } else { gr->hilight_wave = wcnt; - my_strdup2(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "hilight_wave", my_itoa(gr->hilight_wave))); + my_strdup2(192, &r->prop_ptr, subst_token(r->prop_ptr, "hilight_wave", my_itoa(gr->hilight_wave))); } } } @@ -2564,19 +2564,19 @@ int edit_wave_attributes(int what, int i, Graph_ctx *gr) } else { if(gr->hilight_wave == wcnt) { gr->hilight_wave = -1; - my_strdup2(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "hilight_wave", my_itoa(gr->hilight_wave))); + my_strdup2(193, &r->prop_ptr, subst_token(r->prop_ptr, "hilight_wave", my_itoa(gr->hilight_wave))); } else { gr->hilight_wave = wcnt; - my_strdup2(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "hilight_wave", my_itoa(gr->hilight_wave))); + my_strdup2(194, &r->prop_ptr, subst_token(r->prop_ptr, "hilight_wave", my_itoa(gr->hilight_wave))); } } } } wcnt++; } /* while( (ntok = my_strtok_r(nptr, "\n\t ", "", &saven)) ) */ - my_free(_ALLOC_ID_, &node); - my_free(_ALLOC_ID_, &color); - my_free(_ALLOC_ID_, &sweep); + my_free(195, &node); + my_free(196, &color); + my_free(197, &sweep); return ret; } @@ -2661,8 +2661,8 @@ int find_closest_wave(int i, Graph_ctx *gr) yval = G_Y(xctx->mousey); xval = G_X(xctx->mousex); /* get data to plot */ - my_strdup2(_ALLOC_ID_, &node, get_tok_value(r->prop_ptr,"node",0)); - my_strdup2(_ALLOC_ID_, &sweep, get_tok_value(r->prop_ptr,"sweep",0)); + my_strdup2(198, &node, get_tok_value(r->prop_ptr,"node",0)); + my_strdup2(199, &sweep, get_tok_value(r->prop_ptr,"sweep",0)); nptr = node; sptr = sweep; /* process each node given in "node" attribute, get also associated sweep var if any*/ @@ -2684,9 +2684,9 @@ int find_closest_wave(int i, Graph_ctx *gr) expression = 0; if(xctx->graph_values) { if(strstr(ntok, ";")) { - my_strdup2(_ALLOC_ID_, &express, find_nth(ntok, ";", 2)); + my_strdup2(200, &express, find_nth(ntok, ";", 2)); } else { - my_strdup2(_ALLOC_ID_, &express, ntok); + my_strdup2(201, &express, ntok); } if(strpbrk(express, " \n\t")) { expression = 1; @@ -2768,9 +2768,9 @@ int find_closest_wave(int i, Graph_ctx *gr) wcnt++; } /* while( (ntok = my_strtok_r(nptr, "\n\t ", "", &saven)) ) */ dbg(0, "closest dataset=%d\n", closest_dataset); - if(express) my_free(_ALLOC_ID_, &express); - my_free(_ALLOC_ID_, &node); - my_free(_ALLOC_ID_, &sweep); + if(express) my_free(202, &express); + my_free(203, &node); + my_free(204, &sweep); return closest_dataset; } @@ -2821,9 +2821,9 @@ void draw_graph(int i, const int flags, Graph_ctx *gr, void *ct) /* graph box, gridlines and axes */ draw_graph_grid(gr, ct); /* get data to plot */ - my_strdup2(_ALLOC_ID_, &node, get_tok_value(r->prop_ptr,"node",0)); - my_strdup2(_ALLOC_ID_, &color, get_tok_value(r->prop_ptr,"color",0)); - my_strdup2(_ALLOC_ID_, &sweep, get_tok_value(r->prop_ptr,"sweep",0)); + my_strdup2(205, &node, get_tok_value(r->prop_ptr,"node",0)); + my_strdup2(206, &color, get_tok_value(r->prop_ptr,"color",0)); + my_strdup2(207, &sweep, get_tok_value(r->prop_ptr,"sweep",0)); nptr = node; cptr = color; sptr = sweep; @@ -2831,7 +2831,7 @@ void draw_graph(int i, const int flags, Graph_ctx *gr, void *ct) /* process each node given in "node" attribute, get also associated color/sweep var if any*/ while( (ntok = my_strtok_r(nptr, "\n\t ", "\"", &saven)) ) { if(strstr(ntok, ",")) { - my_strdup2(_ALLOC_ID_, &bus_msb, find_nth(ntok, ";,", 2)); + my_strdup2(208, &bus_msb, find_nth(ntok, ";,", 2)); } ctok = my_strtok_r(cptr, " ", "", &savec); stok = my_strtok_r(sptr, "\t\n ", "\"", &saves); @@ -2852,9 +2852,9 @@ void draw_graph(int i, const int flags, Graph_ctx *gr, void *ct) expression = 0; if(xctx->graph_values && !bus_msb) { if(strstr(ntok, ";")) { - my_strdup2(_ALLOC_ID_, &express, find_nth(ntok, ";", 2)); + my_strdup2(209, &express, find_nth(ntok, ";", 2)); } else { - my_strdup2(_ALLOC_ID_, &express, ntok); + my_strdup2(210, &express, ntok); } if(strpbrk(express, " \n\t")) { expression = 1; @@ -2893,7 +2893,7 @@ void draw_graph(int i, const int flags, Graph_ctx *gr, void *ct) else wave_color = wc; first = -1; poly_npoints = 0; - my_realloc(_ALLOC_ID_, &point, xctx->graph_npoints[dset] * sizeof(XPoint)); + my_realloc(211, &point, xctx->graph_npoints[dset] * sizeof(XPoint)); /* Process "npoints" simulation items * p loop split repeated 2 timed (for x and y points) to preserve cache locality */ prev_prev_x = prev_x = 0; @@ -2967,16 +2967,16 @@ void draw_graph(int i, const int flags, Graph_ctx *gr, void *ct) if(measure_p != -1) show_node_measures(measure_p, measure_x, measure_prev_x, bus_msb, wave_color, idx, idx_arr, n_bits, n_nodes, ntok, wcnt, gr); - my_free(_ALLOC_ID_, &point); - if(idx_arr) my_free(_ALLOC_ID_, &idx_arr); + my_free(212, &point); + if(idx_arr) my_free(213, &idx_arr); } /* if( expression || (idx = get_raw_index(bus_msb ? bus_msb : express)) != -1 ) */ wcnt++; - if(bus_msb) my_free(_ALLOC_ID_, &bus_msb); + if(bus_msb) my_free(214, &bus_msb); } /* while( (ntok = my_strtok_r(nptr, "\n\t ", "", &saven)) ) */ - if(express) my_free(_ALLOC_ID_, &express); - my_free(_ALLOC_ID_, &node); - my_free(_ALLOC_ID_, &color); - my_free(_ALLOC_ID_, &sweep); + if(express) my_free(215, &express); + my_free(216, &node); + my_free(217, &color); + my_free(218, &sweep); } /* if(flags & 8) */ bbox(START, 0.0, 0.0, 0.0, 0.0); bbox(ADD, gr->rx1, gr->ry1, gr->rx2, gr->ry2); @@ -3069,7 +3069,7 @@ static cairo_status_t png_writer(void *in_closure, const unsigned char *in_data, png_to_byte_closure_t *closure = (png_to_byte_closure_t *) in_closure; if(!in_data) return CAIRO_STATUS_WRITE_ERROR; if(closure->pos + length > closure->size) { - my_realloc(_ALLOC_ID_, &closure->buffer, closure->pos + length + 65536); + my_realloc(219, &closure->buffer, closure->pos + length + 65536); closure->size = closure->pos + length + 65536; } memcpy(closure->buffer + closure->pos, in_data, length); @@ -3116,7 +3116,7 @@ void draw_image(int dr, xRect *r, double *x1, double *y1, double *x2, double *y2 cairo_save(xctx->cairo_save_ctx); } my_strncpy(filename, get_tok_value(r->prop_ptr, "image", 0), S(filename)); - my_strdup(_ALLOC_ID_, &filter, get_tok_value(r->prop_ptr, "filter", 0)); + my_strdup(220, &filter, get_tok_value(r->prop_ptr, "filter", 0)); /* read PNG from in-memory buffer ... */ if(emb_ptr && emb_ptr->image) { @@ -3131,7 +3131,7 @@ void draw_image(int dr, xRect *r, double *x1, double *y1, double *x2, double *y2 closure.buffer = NULL; filterdata = (char *)base64_decode(attr, strlen(attr), &filtersize); filter_data(filterdata, filtersize, (char **)&closure.buffer, &data_size, filter); - my_free(_ALLOC_ID_, &filterdata); + my_free(221, &filterdata); } else { closure.buffer = base64_decode(attr, strlen(attr), &data_size); } @@ -3139,7 +3139,7 @@ void draw_image(int dr, xRect *r, double *x1, double *y1, double *x2, double *y2 closure.size = data_size; /* should not be necessary */ emb_ptr->image = cairo_image_surface_create_from_png_stream(png_reader, &closure); if(closure.buffer == NULL) dbg(0, "draw_image(): image creation failed\n"); - my_free(_ALLOC_ID_, &closure.buffer); + my_free(222, &closure.buffer); dbg(1, "draw_image(): length2 = %d\n", closure.pos); /* ... or read PNG from file (image attribute) */ } else if(filename[0] && !stat(filename, &buf)) { @@ -3155,7 +3155,7 @@ void draw_image(int dr, xRect *r, double *x1, double *y1, double *x2, double *y2 if(filtersize) { fd = fopen(filename, "r"); if(fd) { - filterdata = my_malloc(_ALLOC_ID_, filtersize); + filterdata = my_malloc(223, filtersize); fread(filterdata, filtersize, 1, fd); fclose(fd); } @@ -3166,7 +3166,7 @@ void draw_image(int dr, xRect *r, double *x1, double *y1, double *x2, double *y2 closure.pos = 0; emb_ptr->image = cairo_image_surface_create_from_png_stream(png_reader, &closure); image_data = base64_encode((unsigned char *)filterdata, filtersize, &olength, 0); - my_free(_ALLOC_ID_, &filterdata); + my_free(224, &filterdata); } else { closure.buffer = NULL; closure.size = 0; @@ -3175,25 +3175,25 @@ void draw_image(int dr, xRect *r, double *x1, double *y1, double *x2, double *y2 /* write PNG to in-memory buffer */ cairo_surface_write_to_png_stream(emb_ptr->image, png_writer, &closure); image_data = base64_encode(closure.buffer, closure.pos, &olength, 0); - my_free(_ALLOC_ID_, &closure.buffer); + my_free(225, &closure.buffer); } /* put base64 encoded data to rect image_data attrinute */ - my_strdup2(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "image_data", image_data)); - my_free(_ALLOC_ID_, &image_data); + my_strdup2(226, &r->prop_ptr, subst_token(r->prop_ptr, "image_data", image_data)); + my_free(227, &image_data); if(cairo_surface_status(emb_ptr->image) != CAIRO_STATUS_SUCCESS) { - my_free(_ALLOC_ID_, &filter); + my_free(228, &filter); return; } dbg(1, "draw_image(): length3 = %d\n", closure.pos); } else { - my_free(_ALLOC_ID_, &filter); + my_free(229, &filter); return; } if(cairo_surface_status(emb_ptr->image) != CAIRO_STATUS_SUCCESS) { - my_free(_ALLOC_ID_, &filter); + my_free(230, &filter); return; } - my_free(_ALLOC_ID_, &filter); + my_free(231, &filter); ptr = get_tok_value(r->prop_ptr, "alpha", 0); alpha = 1.0; if(ptr[0]) alpha = atof(ptr); @@ -3328,7 +3328,7 @@ void svg_embedded_graph(FILE *fd, xRect *r, double rx1, double ry1, double rx2, closure.pos = 0; cairo_surface_write_to_png_stream(png_sfc, png_writer, &closure); ptr = base64_encode(closure.buffer, closure.pos, &olength, 1); - my_free(_ALLOC_ID_, &closure.buffer); + my_free(232, &closure.buffer); cairo_surface_destroy(png_sfc); xctx->draw_pixmap=1; xctx->draw_window=save_draw_window; @@ -3351,7 +3351,7 @@ void svg_embedded_graph(FILE *fd, xRect *r, double rx1, double ry1, double rx2, "xlink:href=\"data:image/png;base64,%s\"/>\n", 0.0, 0.0, w, h, transform, ptr); } - my_free(_ALLOC_ID_, &ptr); + my_free(233, &ptr); #endif } diff --git a/src/editprop.c b/src/editprop.c index 5a67fc22..25ba8646 100644 --- a/src/editprop.c +++ b/src/editprop.c @@ -66,7 +66,7 @@ char *my_fgets(FILE *fd) size_t len; while(fgets(buf, SIZE, fd)) { - my_strcat(_ALLOC_ID_, &s, buf); + my_strcat(234, &s, buf); len = strlen(buf); if(buf[len - 1] == '\n') break; } @@ -126,7 +126,7 @@ size_t my_strdup(int id, char **dest, const char *src) /* empty source string -- dbg(3,"my_strdup(%d,): duplicated string %s\n", id, src); return len-1; } else if(*dest) { - my_free(_ALLOC_ID_, dest); + my_free(235, dest); dbg(3,"my_strdup(%d,): freed destination ptr\n", id); } @@ -139,7 +139,7 @@ void my_strndup(int id, char **dest, const char *src, size_t n) /* empty source { if(*dest!=NULL) { dbg(3," my_strndup: calling my_free\n"); - my_free(_ALLOC_ID_, dest); + my_free(236, dest); } if(src!=NULL && src[0]!='\0') { @@ -303,7 +303,7 @@ size_t my_strdup2(int id, char **dest, const char *src) /* 20150409 duplicates a dbg(3,"my_strdup2(%d,): duplicated string %s\n", id, src); return len-1; } else if(*dest) { - my_free(_ALLOC_ID_, dest); + my_free(237, dest); dbg(3,"my_strdup2(%d,): freed destination ptr\n", id); } return 0; @@ -584,12 +584,12 @@ void set_inst_prop(int i) ptr = (xctx->inst[i].ptr+ xctx->sym)->templ; dbg(1, "set_inst_prop(): i=%d, name=%s, prop_ptr = %s, template=%s\n", i, xctx->inst[i].name, xctx->inst[i].prop_ptr, ptr); - my_strdup(_ALLOC_ID_, &xctx->inst[i].prop_ptr, ptr); - my_strdup2(_ALLOC_ID_, &xctx->inst[i].instname, get_tok_value(ptr, "name",0)); + my_strdup(238, &xctx->inst[i].prop_ptr, ptr); + my_strdup2(239, &xctx->inst[i].instname, get_tok_value(ptr, "name",0)); if(xctx->inst[i].instname[0]) { - my_strdup(_ALLOC_ID_, &tmp, xctx->inst[i].prop_ptr); + my_strdup(240, &tmp, xctx->inst[i].prop_ptr); new_prop_string(i, tmp, 0, tclgetboolvar("disable_unique_names")); - my_free(_ALLOC_ID_, &tmp); + my_free(241, &tmp); } } @@ -600,7 +600,7 @@ static void edit_rect_property(int x) const char *dash, *fill; int preserve; char *oldprop=NULL; - my_strdup(_ALLOC_ID_, &oldprop, xctx->rect[xctx->sel_array[0].col][xctx->sel_array[0].n].prop_ptr); + my_strdup(242, &oldprop, xctx->rect[xctx->sel_array[0].col][xctx->sel_array[0].n].prop_ptr); if(oldprop && oldprop[0]) { tclsetvar("retval",oldprop); } else { @@ -629,7 +629,7 @@ static void edit_rect_property(int x) set_different_token(&xctx->rect[c][n].prop_ptr, (char *) tclgetvar("retval"), oldprop, 0, 0); } else { - my_strdup(_ALLOC_ID_, &xctx->rect[c][n].prop_ptr, + my_strdup(243, &xctx->rect[c][n].prop_ptr, (char *) tclgetvar("retval")); } set_rect_flags(&xctx->rect[c][n]); /* set cached .flags bitmask from on attributes */ @@ -665,7 +665,7 @@ static void edit_rect_property(int x) bbox(END , 0.0 , 0.0 , 0.0 , 0.0); } } - my_free(_ALLOC_ID_, &oldprop); + my_free(244, &oldprop); } static void edit_line_property(void) @@ -674,7 +674,7 @@ static void edit_line_property(void) const char *dash; int preserve; char *oldprop=NULL; - my_strdup(_ALLOC_ID_, &oldprop, xctx->line[xctx->sel_array[0].col][xctx->sel_array[0].n].prop_ptr); + my_strdup(245, &oldprop, xctx->line[xctx->sel_array[0].col][xctx->sel_array[0].n].prop_ptr); if(oldprop && oldprop[0]) { tclsetvar("retval", oldprop); } else { @@ -698,7 +698,7 @@ static void edit_line_property(void) set_different_token(&xctx->line[c][n].prop_ptr, (char *) tclgetvar("retval"), oldprop, 0, 0); } else { - my_strdup(_ALLOC_ID_, &xctx->line[c][n].prop_ptr, + my_strdup(246, &xctx->line[c][n].prop_ptr, (char *) tclgetvar("retval")); } xctx->line[c][n].bus = !strcmp(get_tok_value(xctx->line[c][n].prop_ptr,"bus",0), "true"); @@ -719,7 +719,7 @@ static void edit_line_property(void) draw(); bbox(END , 0.0 , 0.0 , 0.0 , 0.0); } - my_free(_ALLOC_ID_, &oldprop); + my_free(247, &oldprop); } @@ -730,7 +730,7 @@ static void edit_wire_property(void) char *oldprop=NULL; const char *bus_ptr; - my_strdup(_ALLOC_ID_, &oldprop, xctx->wire[xctx->sel_array[0].n].prop_ptr); + my_strdup(248, &oldprop, xctx->wire[xctx->sel_array[0].n].prop_ptr); if(oldprop && oldprop[0]) { tclsetvar("retval", oldprop); } else { @@ -758,7 +758,7 @@ static void edit_wire_property(void) set_different_token(&xctx->wire[k].prop_ptr, (char *) tclgetvar("retval"), oldprop, 0, 0); } else { - my_strdup(_ALLOC_ID_, &xctx->wire[k].prop_ptr,(char *) tclgetvar("retval")); + my_strdup(249, &xctx->wire[k].prop_ptr,(char *) tclgetvar("retval")); } bus_ptr = get_tok_value(xctx->wire[k].prop_ptr,"bus",0); if(!strcmp(bus_ptr, "true")) { @@ -783,7 +783,7 @@ static void edit_wire_property(void) draw(); bbox(END , 0.0 , 0.0 , 0.0 , 0.0); } - my_free(_ALLOC_ID_, &oldprop); + my_free(250, &oldprop); } static void edit_arc_property(void) @@ -795,7 +795,7 @@ static void edit_arc_property(void) const char *dash; int preserve; - my_strdup(_ALLOC_ID_, &oldprop, xctx->arc[xctx->sel_array[0].col][xctx->sel_array[0].n].prop_ptr); + my_strdup(251, &oldprop, xctx->arc[xctx->sel_array[0].col][xctx->sel_array[0].n].prop_ptr); if(oldprop && oldprop[0]) { tclsetvar("retval", oldprop); } else { @@ -819,7 +819,7 @@ static void edit_arc_property(void) set_different_token(&xctx->arc[c][i].prop_ptr, (char *) tclgetvar("retval"), oldprop, 0, 0); } else { - my_strdup(_ALLOC_ID_, &xctx->arc[c][i].prop_ptr, (char *) tclgetvar("retval")); + my_strdup(252, &xctx->arc[c][i].prop_ptr, (char *) tclgetvar("retval")); } old_fill = xctx->arc[c][i].fill; if( !strcmp(get_tok_value(xctx->arc[c][i].prop_ptr,"fill",0),"true") ) @@ -864,7 +864,7 @@ static void edit_polygon_property(void) int preserve; dbg(1, "edit_property(): input property:\n"); - my_strdup(_ALLOC_ID_, &oldprop, xctx->poly[xctx->sel_array[0].col][xctx->sel_array[0].n].prop_ptr); + my_strdup(253, &oldprop, xctx->poly[xctx->sel_array[0].col][xctx->sel_array[0].n].prop_ptr); if(oldprop && oldprop[0]) { tclsetvar("retval", oldprop); } else { @@ -887,7 +887,7 @@ static void edit_polygon_property(void) if(oldprop && preserve == 1) { set_different_token(&xctx->poly[c][i].prop_ptr, (char *) tclgetvar("retval"), oldprop, 0, 0); } else { - my_strdup(_ALLOC_ID_, &xctx->poly[c][i].prop_ptr, (char *) tclgetvar("retval")); + my_strdup(254, &xctx->poly[c][i].prop_ptr, (char *) tclgetvar("retval")); } old_fill = xctx->poly[c][i].fill; old_dash = xctx->poly[c][i].dash; @@ -942,7 +942,7 @@ static void edit_text_property(int x) dbg(1, "edit_text_property(): entering\n"); sel = xctx->sel_array[0].n; - my_strdup(_ALLOC_ID_, &oldprop, xctx->text[sel].prop_ptr); + my_strdup(255, &oldprop, xctx->text[sel].prop_ptr); if(oldprop && oldprop[0]) tclsetvar("props", oldprop); else @@ -1035,23 +1035,23 @@ static void edit_text_property(int x) (fabs(yy1 - pcy) < cg*3 || fabs(yy2 - pcy) < cg*3) ) ) { if(x==0) - my_strdup(_ALLOC_ID_, &xctx->rect[PINLAYER][l].prop_ptr, + my_strdup(256, &xctx->rect[PINLAYER][l].prop_ptr, subst_token(xctx->rect[PINLAYER][l].prop_ptr, "name", (char *) tclgetvar("retval")) ); else - my_strdup(_ALLOC_ID_, &xctx->rect[PINLAYER][l].prop_ptr, + my_strdup(257, &xctx->rect[PINLAYER][l].prop_ptr, subst_token(xctx->rect[PINLAYER][l].prop_ptr, "name", (char *) tclgetvar("retval")) ); } } } - my_strdup(_ALLOC_ID_, &xctx->text[sel].txt_ptr, (char *) tclgetvar("retval")); + my_strdup(258, &xctx->text[sel].txt_ptr, (char *) tclgetvar("retval")); } if(x==0 && props_changed) { if(oldprop && preserve) set_different_token(&xctx->text[sel].prop_ptr, (char *) tclgetvar("props"), oldprop, 0, 0); else - my_strdup(_ALLOC_ID_, &xctx->text[sel].prop_ptr,(char *) tclgetvar("props")); + my_strdup(259, &xctx->text[sel].prop_ptr,(char *) tclgetvar("props")); set_text_flags(&xctx->text[sel]); } if(size_changed) { @@ -1078,7 +1078,7 @@ static void edit_text_property(int x) draw(); bbox(END,0.0,0.0,0.0,0.0); } - my_free(_ALLOC_ID_, &oldprop); + my_free(260, &oldprop); } /* x=0 use text widget x=1 use vim editor */ @@ -1101,19 +1101,19 @@ static void update_symbol(const char *result, int x) *ii=xctx->sel_array[0].n; if(!result) { dbg(1, "update_symbol(): edit symbol prop aborted\n"); - my_free(_ALLOC_ID_, &xctx->old_prop); + my_free(261, &xctx->old_prop); return; } /* create new_prop updated attribute string */ if(*netl_com && x==1) { - my_strdup(_ALLOC_ID_, &new_prop, + my_strdup(262, &new_prop, subst_token(xctx->old_prop, "value", (char *) tclgetvar("retval") ) ); dbg(1, "update_symbol(): new_prop=%s\n", new_prop); dbg(1, "update_symbol(): tcl retval==%s\n", tclgetvar("retval")); } else { - my_strdup(_ALLOC_ID_, &new_prop, (char *) tclgetvar("retval")); + my_strdup(263, &new_prop, (char *) tclgetvar("retval")); dbg(1, "update_symbol(): new_prop=%s\n", new_prop); } my_strncpy(symbol, (char *) tclgetvar("symbol") , S(symbol)); @@ -1154,7 +1154,7 @@ static void update_symbol(const char *result, int x) delete_inst_node(*ii); /* 20180208 fix crashing bug: delete node info if changing symbol */ /* if number of pins is different we must delete these data *before* */ /* changing ysmbol, otherwise *ii might end up deleting non allocated data. */ - my_strdup2(_ALLOC_ID_, &xctx->inst[*ii].name, rel_sym_path(symbol)); + my_strdup2(264, &xctx->inst[*ii].name, rel_sym_path(symbol)); xctx->inst[*ii].ptr=sym_number; /* update instance to point to new symbol */ } bbox(ADD, xctx->inst[*ii].x1, xctx->inst[*ii].y1, @@ -1166,13 +1166,13 @@ static void update_symbol(const char *result, int x) dbg(1, "update_symbol(): no_change_props=%d\n", no_change_props); if(only_different) { char * ss=NULL; - my_strdup(_ALLOC_ID_, &ss, xctx->inst[*ii].prop_ptr); + my_strdup(265, &ss, xctx->inst[*ii].prop_ptr); if( set_different_token(&ss, new_prop, xctx->old_prop, 0, 0) ) { if(!pushed) { xctx->push_undo(); pushed=1;} - my_strdup(_ALLOC_ID_, &xctx->inst[*ii].prop_ptr, ss); + my_strdup(266, &xctx->inst[*ii].prop_ptr, ss); set_modify(1); } - my_free(_ALLOC_ID_, &ss); + my_free(267, &ss); } else { if(new_prop) { @@ -1180,39 +1180,39 @@ static void update_symbol(const char *result, int x) dbg(1, "update_symbol(): changing prop: |%s| -> |%s|\n", xctx->inst[*ii].prop_ptr, new_prop); if(!pushed) { xctx->push_undo(); pushed=1;} - my_strdup(_ALLOC_ID_, &xctx->inst[*ii].prop_ptr, new_prop); + my_strdup(268, &xctx->inst[*ii].prop_ptr, new_prop); set_modify(1); } } else { if(!pushed) { xctx->push_undo(); pushed=1;} - my_strdup(_ALLOC_ID_, &xctx->inst[*ii].prop_ptr, ""); + my_strdup(269, &xctx->inst[*ii].prop_ptr, ""); set_modify(1); } } } /* if symbol changed ensure instance name (with new prefix char) is unique */ /* preserve backslashes in name ----------------------------------->. */ - my_strdup(_ALLOC_ID_, &name, get_tok_value(xctx->inst[*ii].prop_ptr, "name", 1)); + my_strdup(270, &name, get_tok_value(xctx->inst[*ii].prop_ptr, "name", 1)); if(name && name[0] ) { dbg(1, "update_symbol(): prefix!='\\0', name=%s\n", name); /* 20110325 only modify prefix if prefix not NUL */ if(prefix) name[0]=(char)prefix; /* change prefix if changing symbol type; */ dbg(1, "update_symbol(): name=%s, inst[*ii].prop_ptr=%s\n", name, xctx->inst[*ii].prop_ptr); - my_strdup(_ALLOC_ID_, &ptr,subst_token(xctx->inst[*ii].prop_ptr, "name", name) ); + my_strdup(271, &ptr,subst_token(xctx->inst[*ii].prop_ptr, "name", name) ); /* set name of current inst */ if(!pushed) { xctx->push_undo(); pushed=1;} if(!k) hash_all_names(); new_prop_string(*ii, ptr, k, tclgetboolvar("disable_unique_names")); /* set new prop_ptr */ } else { - my_strdup2(_ALLOC_ID_, &xctx->inst[*ii].instname, ""); + my_strdup2(272, &xctx->inst[*ii].instname, ""); } type=xctx->sym[xctx->inst[*ii].ptr].type; cond= !type || !IS_LABEL_SH_OR_PIN(type); if(cond) xctx->inst[*ii].flags |= 2; /* bit 1: flag for different textlayer for pin/labels */ else { xctx->inst[*ii].flags &= ~2; - my_strdup(_ALLOC_ID_, &xctx->inst[*ii].lab, + my_strdup(273, &xctx->inst[*ii].lab, get_tok_value(xctx->inst[*ii].prop_ptr, "lab",0)); } if(!strcmp(get_tok_value(xctx->inst[*ii].prop_ptr,"highlight",0), "true")) @@ -1236,10 +1236,10 @@ static void update_symbol(const char *result, int x) dbg(1, "update_symbol(): redrawing inst_ptr.txtprop string\n"); draw(); bbox(END,0.0,0.0,0.0,0.0); - my_free(_ALLOC_ID_, &name); - my_free(_ALLOC_ID_, &ptr); - my_free(_ALLOC_ID_, &new_prop); - my_free(_ALLOC_ID_, &xctx->old_prop); + my_free(274, &name); + my_free(275, &ptr); + my_free(276, &new_prop); + my_free(277, &xctx->old_prop); } /* x=0 use text widget x=1 use vim editor */ @@ -1264,12 +1264,12 @@ static void edit_symbol_property(int x) else { tclsetvar("retval",""); } - my_strdup(_ALLOC_ID_, &xctx->old_prop, xctx->inst[*ii].prop_ptr); + my_strdup(278, &xctx->old_prop, xctx->inst[*ii].prop_ptr); tclsetvar("symbol",xctx->inst[*ii].name); if(x==0) { tcleval("edit_prop {Input property:}"); - my_strdup(_ALLOC_ID_, &result, tclresult()); + my_strdup(279, &result, tclresult()); } else { /* edit_vi_netlist_prop will replace \" with " before editing, @@ -1278,11 +1278,11 @@ static void edit_symbol_property(int x) if(*netl_com && x==1) tcleval("edit_vi_netlist_prop {Input property:}"); else if(x==1) tcleval("edit_vi_prop {Input property:}"); else if(x==2) tcleval("viewdata $::retval"); - my_strdup(_ALLOC_ID_, &result, tclresult()); + my_strdup(280, &result, tclresult()); } dbg(1, "edit_symbol_property(): before update_symbol, modified=%d\n", xctx->modified); update_symbol(result, x); - my_free(_ALLOC_ID_, &result); + my_free(281, &result); dbg(1, "edit_symbol_property(): done update_symbol, modified=%d\n", xctx->modified); *ii=-1; } @@ -1355,7 +1355,7 @@ char *str_replace(const char *s, const char *rep, const char *with) size_t with_len; if(s==NULL || rep == NULL || with == NULL || rep[0] == '\0') { - my_free(_ALLOC_ID_, &result); + my_free(282, &result); size = 0; return NULL; } @@ -1364,7 +1364,7 @@ char *str_replace(const char *s, const char *rep, const char *with) dbg(1, "str_replace(): %s, %s, %s\n", s, rep, with); if( size == 0 ) { size = CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &result, size); + my_realloc(283, &result, size); } while(*s) { STR_ALLOC(&result, result_pos + with_len + 1, &size); @@ -1436,9 +1436,9 @@ void edit_property(int x) dbg(1, "edit_property(): done executing edit_vi_prop, result=%s\n",tclresult()); dbg(1, "edit_property(): rcode=%s\n",tclgetvar("rcode") ); - my_strdup(_ALLOC_ID_, &new_prop, (char *) tclgetvar("retval")); + my_strdup(284, &new_prop, (char *) tclgetvar("retval")); tclsetvar("retval", new_prop); - my_free(_ALLOC_ID_, &new_prop); + my_free(285, &new_prop); if(strcmp(tclgetvar("rcode"),"") ) @@ -1446,27 +1446,27 @@ void edit_property(int x) if(xctx->netlist_type==CAD_SYMBOL_ATTRS && (!xctx->schsymbolprop || strcmp(xctx->schsymbolprop, tclgetvar("retval") ) ) ) { set_modify(1); xctx->push_undo(); - my_strdup(_ALLOC_ID_, &xctx->schsymbolprop, (char *) tclgetvar("retval")); + my_strdup(286, &xctx->schsymbolprop, (char *) tclgetvar("retval")); } else if(xctx->netlist_type==CAD_VERILOG_NETLIST && (!xctx->schverilogprop || strcmp(xctx->schverilogprop, tclgetvar("retval") ) ) ) { set_modify(1); xctx->push_undo(); - my_strdup(_ALLOC_ID_, &xctx->schverilogprop, (char *) tclgetvar("retval")); + my_strdup(287, &xctx->schverilogprop, (char *) tclgetvar("retval")); } else if(xctx->netlist_type==CAD_SPICE_NETLIST && (!xctx->schprop || strcmp(xctx->schprop, tclgetvar("retval") ) ) ) { set_modify(1); xctx->push_undo(); - my_strdup(_ALLOC_ID_, &xctx->schprop, (char *) tclgetvar("retval")); + my_strdup(288, &xctx->schprop, (char *) tclgetvar("retval")); } else if(xctx->netlist_type==CAD_TEDAX_NETLIST && (!xctx->schtedaxprop || strcmp(xctx->schtedaxprop, tclgetvar("retval") ) ) ) { set_modify(1); xctx->push_undo(); - my_strdup(_ALLOC_ID_, &xctx->schtedaxprop, (char *) tclgetvar("retval")); + my_strdup(289, &xctx->schtedaxprop, (char *) tclgetvar("retval")); } else if(xctx->netlist_type==CAD_VHDL_NETLIST && (!xctx->schvhdlprop || strcmp(xctx->schvhdlprop, tclgetvar("retval") ) ) ) { set_modify(1); xctx->push_undo(); - my_strdup(_ALLOC_ID_, &xctx->schvhdlprop, (char *) tclgetvar("retval")); + my_strdup(290, &xctx->schvhdlprop, (char *) tclgetvar("retval")); } } diff --git a/src/expandlabel.y b/src/expandlabel.y index 9517a8d7..1bc0a014 100644 --- a/src/expandlabel.y +++ b/src/expandlabel.y @@ -69,13 +69,13 @@ static char *expandlabel_strdup(char *src) char *ptr; if(src==NULL || src[0]=='\0') { ptr=NULL; - my_strdup(_ALLOC_ID_, &ptr,""); + my_strdup(291, &ptr,""); return ptr; } else { ptr=NULL; - my_strdup(_ALLOC_ID_, &ptr,src); + my_strdup(292, &ptr,src); dbg(3, "expandlabel_strdup(): duplicated %lu string %s\n",(unsigned long)ptr,src); return ptr; } @@ -89,7 +89,7 @@ static char *expandlabel_strcat(char *s1, char *s2) if(s1) l1=strlen(s1); if(s2) l2=strlen(s2); - res=my_malloc(_ALLOC_ID_, l1+l2+1); /* 2 strings plus '\0' */ + res=my_malloc(293, l1+l2+1); /* 2 strings plus '\0' */ if(s1) memcpy(res, s1, l1); if(s2) memcpy(res + l1 , s2, l2+1); else memcpy(res + l1 , "", 1); @@ -104,7 +104,7 @@ static char *expandlabel_strcat_char(char *s1, char c, char *s2) if(s1) l1=strlen(s1); if(s2) l2=strlen(s2); - res=my_malloc(_ALLOC_ID_, l1+l2+2); /* 2 strings plus 'c' and '\0' */ + res=my_malloc(294, l1+l2+2); /* 2 strings plus 'c' and '\0' */ if(s1) memcpy(res, s1, l1); res[l1] = c; if(s2) memcpy(res + l1 + 1, s2, l2+1); @@ -127,7 +127,7 @@ static char *expandlabel_strmult2(int n, char *s) if(n==0) return expandlabel_strdup(""); len=strlen(s); prev=s; - ss = str=my_malloc(_ALLOC_ID_, (len+1)*n); + ss = str=my_malloc(295, (len+1)*n); str[0]='\0'; for(pos=s;pos<=s+len;pos++) { if(*pos==',' || *pos=='\0') { @@ -161,7 +161,7 @@ static char *expandlabel_strmult(int n, char *s) if(n==0) return expandlabel_strdup(""); len=strlen(s); - str=pos=my_malloc(_ALLOC_ID_, (len+1)*n); + str=pos=my_malloc(296, (len+1)*n); for(i=1;i<=n;i++) { /* strcpy(pos,s); */ @@ -179,8 +179,8 @@ static char *expandlabel_strbus(char *s, int *n) int tmplen; char *res=NULL; char *tmp=NULL; - my_realloc(_ALLOC_ID_, &res, n[0]*(strlen(s)+20)); - my_realloc(_ALLOC_ID_, &tmp, strlen(s)+30); + my_realloc(297, &res, n[0]*(strlen(s)+20)); + my_realloc(298, &tmp, strlen(s)+30); l=0; for(i=1;iinst[i].y0; rot = xctx->inst[i].rot; flip = xctx->inst[i].flip; - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(331, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if(!type) continue; no_of_pin_rects = (xctx->inst[i].ptr+ xctx->sym)->rects[PINLAYER]; @@ -169,7 +169,7 @@ void find_closest_net_or_symbol_pin(double mx,double my, double *x, double *y) } *x = min_dist_x; *y = min_dist_y; - my_free(_ALLOC_ID_, &type); + my_free(332, &type); } static void find_closest_arc(double mx,double my) diff --git a/src/font.c b/src/font.c index 1c32f3f9..55887210 100644 --- a/src/font.c +++ b/src/font.c @@ -38,7 +38,7 @@ void compile_font(void) select_inside(code*FONTOFFSET-1,-FONTHEIGHT-1, code*FONTOFFSET+FONTWIDTH+1,FONTWHITESPACE + FONTDESCENT+1, 1); rebuild_selected_array(); - character[code] = my_calloc(_ALLOC_ID_, xctx->lastsel*4+1, sizeof(double)); + character[code] = my_calloc(333, xctx->lastsel*4+1, sizeof(double)); character[code][0] = (double)xctx->lastsel; dbg(2, "compile_font(): character[%d][]={%.16g",code,character[code][0]); for(i=0;ilastsel;i++) diff --git a/src/hash_iterator.c b/src/hash_iterator.c index 874e013d..7437b54a 100644 --- a/src/hash_iterator.c +++ b/src/hash_iterator.c @@ -28,7 +28,7 @@ void init_inst_iterator(Iterator_ctx *ctx, double x1, double y1, double x2, doub dbg(3, "init_inst_iterator(): instances=%d\n", xctx->instances); if(xctx->instances) { - my_realloc(_ALLOC_ID_, &ctx->instflag, xctx->instances*sizeof(unsigned short)); + my_realloc(334, &ctx->instflag, xctx->instances*sizeof(unsigned short)); memset(ctx->instflag, 0, xctx->instances*sizeof(unsigned short)); } /* calculate square 4 1st corner of drawing area */ @@ -72,7 +72,7 @@ Instentry *inst_iterator_next(Iterator_ctx *ctx) ctx->tmpj = ctx->j % NBOXES; if(ctx->tmpj < 0) ctx->tmpj += NBOXES; ctx->instanceptr = xctx->inst_spatial_table[ctx->tmpi][ctx->tmpj]; } else { - my_free(_ALLOC_ID_, &ctx->instflag); + my_free(335, &ctx->instflag); return NULL; } } @@ -83,7 +83,7 @@ void init_wire_iterator(Iterator_ctx *ctx, double x1, double y1, double x2, doub ctx->wireflag = NULL; dbg(3, "init_wire_iterator(): wires=%d\n", xctx->wires); if(xctx->wires) { - my_realloc(_ALLOC_ID_, &ctx->wireflag, xctx->wires*sizeof(unsigned short)); + my_realloc(336, &ctx->wireflag, xctx->wires*sizeof(unsigned short)); memset(ctx->wireflag, 0, xctx->wires*sizeof(unsigned short)); } /* calculate square 4 1st corner of drawing area */ @@ -127,7 +127,7 @@ Wireentry *wire_iterator_next(Iterator_ctx *ctx) ctx->tmpj = ctx->j % NBOXES; if(ctx->tmpj < 0) ctx->tmpj += NBOXES; ctx->wireptr = xctx->wire_spatial_table[ctx->tmpi][ctx->tmpj]; } else { - my_free(_ALLOC_ID_, &ctx->wireflag); + my_free(337, &ctx->wireflag); return NULL; } } diff --git a/src/hilight.c b/src/hilight.c index 13ccb001..216a2137 100644 --- a/src/hilight.c +++ b/src/hilight.c @@ -48,9 +48,9 @@ static void hilight_hash_free_entry(Hilight_hashentry *entry) Hilight_hashentry *tmp; while(entry) { tmp = entry->next; - my_free(_ALLOC_ID_, &entry->token); - my_free(_ALLOC_ID_, &entry->path); - my_free(_ALLOC_ID_, &entry); + my_free(338, &entry->token); + my_free(339, &entry->path); + my_free(340, &entry); entry = tmp; } } @@ -92,11 +92,11 @@ static Hilight_hashentry *hilight_hash_lookup(const char *token, int value, int size_t lenp = strlen(xctx->sch_path[xctx->currsch]) + 1; if( what==XINSERT || what == XINSERT_NOREPLACE) { /* insert data */ s=sizeof( Hilight_hashentry ); - entry= (Hilight_hashentry *)my_malloc(_ALLOC_ID_, s ); + entry= (Hilight_hashentry *)my_malloc(341, s ); entry->next = NULL; - entry->token = my_malloc(_ALLOC_ID_, lent); + entry->token = my_malloc(342, lent); memcpy(entry->token, token, lent); - entry->path = my_malloc(_ALLOC_ID_, lenp); + entry->path = my_malloc(343, lenp); memcpy(entry->path, xctx->sch_path[xctx->currsch], lenp); entry->oldvalue = value-1000; /* no old value, set different value anyway*/ entry->value = value; @@ -111,9 +111,9 @@ static Hilight_hashentry *hilight_hash_lookup(const char *token, int value, int !strcmp(xctx->sch_path[xctx->currsch], entry->path) ) { /* found matching tok */ if(what==XDELETE) { /* remove token from the hash table ... */ saveptr=entry->next; - my_free(_ALLOC_ID_, &entry->token); - my_free(_ALLOC_ID_, &entry->path); - my_free(_ALLOC_ID_, &entry); + my_free(344, &entry->token); + my_free(345, &entry->path); + my_free(346, &entry); *preventry=saveptr; } else if(what == XINSERT ) { entry->oldvalue = entry->value; @@ -134,11 +134,11 @@ Hilight_hashentry *inst_hilight_hash_lookup(const char *token, int value, int wh size_t len = strlen(token) + 2; /* token plus one more character and \0 */ Hilight_hashentry *entry; dbg(1, "inst_hilight_hash_lookup: token=%s value=%d what=%d\n", token, value, what); - inst_tok = my_malloc(_ALLOC_ID_, len); + inst_tok = my_malloc(347, len); /* instance name uglyfication: add a space at beginning so it will never match a valid net name */ my_snprintf(inst_tok, len, " %s", token); entry = hilight_hash_lookup(inst_tok, value, what); - my_free(_ALLOC_ID_, &inst_tok); + my_free(348, &inst_tok); return entry; } @@ -156,7 +156,7 @@ Hilight_hashentry *bus_hilight_hash_lookup(const char *token, int value, int wha ptr1=hilight_hash_lookup(token, value, what); return ptr1; } - my_strdup(_ALLOC_ID_, &string, expandlabel(token,&mult)); + my_strdup(349, &string, expandlabel(token,&mult)); if(string==NULL) { return NULL; } @@ -179,7 +179,7 @@ Hilight_hashentry *bus_hilight_hash_lookup(const char *token, int value, int wha string_ptr++; } /* if something found return first pointer */ - my_free(_ALLOC_ID_, &string); + my_free(350, &string); return ptr2; } @@ -191,11 +191,11 @@ void display_hilights(char **str) for(i=0;ihilight_table[i]; while(entry) { - if(!first) my_strcat(_ALLOC_ID_, str, " "); - my_strcat(_ALLOC_ID_, str,"{"); - my_strcat(_ALLOC_ID_, str, entry->path+1); - my_strcat(_ALLOC_ID_, str, entry->token); - my_strcat(_ALLOC_ID_, str,"}"); + if(!first) my_strcat(351, str, " "); + my_strcat(352, str,"{"); + my_strcat(353, str, entry->path+1); + my_strcat(354, str, entry->token); + my_strcat(355, str,"}"); first = 0; entry = entry->next; } @@ -271,12 +271,12 @@ void create_plot_cmd(void) if(exists) { viewer = atoi(tclgetvar("sim(spicewave,default)")); my_snprintf(tcl_str, S(tcl_str), "sim(spicewave,%d,name)", viewer); - my_strdup(_ALLOC_ID_, &viewer_name, tclgetvar(tcl_str)); + my_strdup(356, &viewer_name, tclgetvar(tcl_str)); dbg(1,"create_plot_cmd(): viewer_name=%s\n", viewer_name); if(strstr(viewer_name, "Gaw")) viewer=GAW; else if(strstr(viewer_name, "Bespice")) viewer=BESPICE; else if(strstr(viewer_name, "Ngspice")) viewer=NGSPICE; - my_free(_ALLOC_ID_, &viewer_name); + my_free(357, &viewer_name); } if(!exists || !viewer) return; my_snprintf(plotfile, S(plotfile), "%s/xplot", tclgetvar("netlist_dir")); @@ -310,24 +310,24 @@ void create_plot_cmd(void) fprintf(fd, "%s", str); fprintf(fd, "\n"); first = 1; - my_free(_ALLOC_ID_, &str); + my_free(358, &str); } fprintf(fd, "set color%d=rgb:%s\n", idx, color_str); if(first) { - my_strcat(_ALLOC_ID_, &str, "plot "); + my_strcat(359, &str, "plot "); first = 0; } - my_strcat(_ALLOC_ID_, &str, "\""); - my_strcat(_ALLOC_ID_, &str, (entry->path)+1); - my_strcat(_ALLOC_ID_, &str, tok); - my_strcat(_ALLOC_ID_, &str, "\" "); + my_strcat(360, &str, "\""); + my_strcat(361, &str, (entry->path)+1); + my_strcat(362, &str, tok); + my_strcat(363, &str, "\" "); } if(viewer == GAW) { char *t=NULL, *p=NULL; sprintf(color_str, "%02x%02x%02x", xctx->xcolor_array[c].red>>8, xctx->xcolor_array[c].green>>8, xctx->xcolor_array[c].blue>>8); - my_strdup(_ALLOC_ID_, &t, tok); - my_strdup2(_ALLOC_ID_, &p, (entry->path)+1); + my_strdup(364, &t, tok); + my_strdup2(365, &p, (entry->path)+1); if(simtype == 0 ) { /* spice */ tclvareval("puts $gaw_fd {copyvar v(", strtolower(p), strtolower(t), ") sel #", color_str, "}\nvwait gaw_fd\n", NULL); @@ -340,15 +340,15 @@ void create_plot_cmd(void) tclvareval("puts $gaw_fd {copyvar ", strtoupper(p), strtoupper(t), " sel #", color_str, "}\nvwait gaw_fd\n", NULL); } - my_free(_ALLOC_ID_, &p); - my_free(_ALLOC_ID_, &t); + my_free(366, &p); + my_free(367, &t); } if(viewer == BESPICE) { char *t=NULL, *p=NULL; sprintf(color_str, "%d %d %d", xctx->xcolor_array[c].red>>8, xctx->xcolor_array[c].green>>8, xctx->xcolor_array[c].blue>>8); - my_strdup(_ALLOC_ID_, &t, tok); - my_strdup2(_ALLOC_ID_, &p, (entry->path)+1); + my_strdup(368, &t, tok); + my_strdup2(369, &p, (entry->path)+1); if(simtype == 0 ) { /* spice */ tclvareval( @@ -384,8 +384,8 @@ void create_plot_cmd(void) "\" \"\"}", NULL); } - my_free(_ALLOC_ID_, &p); - my_free(_ALLOC_ID_, &t); + my_free(370, &p); + my_free(371, &t); } } entry = entry->next; @@ -394,7 +394,7 @@ void create_plot_cmd(void) if(viewer == NGSPICE) { fprintf(fd, "%s", str); fprintf(fd, "\nremcirc\n.endc\n"); - my_free(_ALLOC_ID_, &str); + my_free(372, &str); fclose(fd); } if(viewer == GAW) { @@ -434,16 +434,16 @@ void hilight_net_pin_mismatches(void) for(k=0; klastsel; k++) { if(xctx->sel_array[k].type!=ELEMENT) continue; j = xctx->sel_array[k].n ; - my_strdup(_ALLOC_ID_, &type,(xctx->inst[j].ptr+ xctx->sym)->type); + my_strdup(373, &type,(xctx->inst[j].ptr+ xctx->sym)->type); if( type && IS_LABEL_SH_OR_PIN(type)) break; symbol = xctx->sym + xctx->inst[j].ptr; npin = symbol->rects[PINLAYER]; rct=symbol->rect[PINLAYER]; dbg(1, "hilight_net_pin_mismatches(): \n"); for(i=0;ihilight_nets) propagate_hilights(1, 0, XINSERT_NOREPLACE); redraw_hilights(0); } @@ -481,11 +481,11 @@ void hilight_parent_pins(void) for(j=0;jinst[i].node[j]) continue; - my_strdup(_ALLOC_ID_, &net_node, expandlabel(xctx->inst[i].node[j], &net_mult)); + my_strdup(381, &net_node, expandlabel(xctx->inst[i].node[j], &net_mult)); dbg(1, "hilight_parent_pins(): net_node=%s\n", net_node); pin_name = get_tok_value((xctx->inst[i].ptr+ xctx->sym)->rect[PINLAYER][j].prop_ptr,"name",0); if(!pin_name[0]) continue; - my_strdup(_ALLOC_ID_, &pin_node, expandlabel(pin_name, &mult)); + my_strdup(382, &pin_node, expandlabel(pin_name, &mult)); dbg(1, "hilight_parent_pins(): pin_node=%s\n", pin_node); for(k = 1; k<=mult; k++) { @@ -504,8 +504,8 @@ void hilight_parent_pins(void) } } } - my_free(_ALLOC_ID_, &pin_node); - my_free(_ALLOC_ID_, &net_node); + my_free(383, &pin_node); + my_free(384, &net_node); } void hilight_child_pins(void) @@ -527,11 +527,11 @@ void hilight_child_pins(void) dbg(1, "hilight_child_pins(): inst_number=%d\n", inst_number); if(!xctx->inst[i].node[j]) continue; - my_strdup(_ALLOC_ID_, &net_node, expandlabel(xctx->inst[i].node[j], &net_mult)); + my_strdup(385, &net_node, expandlabel(xctx->inst[i].node[j], &net_mult)); dbg(1, "hilight_child_pins(): net_node=%s\n", net_node); pin_name = get_tok_value((xctx->inst[i].ptr+ xctx->sym)->rect[PINLAYER][j].prop_ptr,"name",0); if(!pin_name[0]) continue; - my_strdup(_ALLOC_ID_, &pin_node, expandlabel(pin_name, &mult)); + my_strdup(386, &pin_node, expandlabel(pin_name, &mult)); dbg(1, "hilight_child_pins(): pin_node=%s\n", pin_node); for(k = 1; k<=mult; k++) { dbg(1, "hilight_child_pins(): looking nth net:%d, k=%d, inst_number=%d, mult=%d\n", @@ -552,8 +552,8 @@ void hilight_child_pins(void) } } /* for(k..) */ } - my_free(_ALLOC_ID_, &pin_node); - my_free(_ALLOC_ID_, &net_node); + my_free(387, &pin_node); + my_free(388, &net_node); } @@ -615,7 +615,7 @@ int search(const char *tok, const char *val, int sub, int sel) } else if(!strcmp(tok,"cell::propstring")) { has_token = (str = (xctx->inst[i].ptr+ xctx->sym)->prop_ptr) ? 1 : 0; } else if(!strncmp(tok,"cell::", 6)) { /* cell::xxx looks for xxx in global symbol attributes */ - my_strdup(_ALLOC_ID_, &tmpname,get_tok_value((xctx->inst[i].ptr+ xctx->sym)->prop_ptr,tok+6,0)); + my_strdup(389, &tmpname,get_tok_value((xctx->inst[i].ptr+ xctx->sym)->prop_ptr,tok+6,0)); has_token = xctx->tok_size; if(tmpname) { str = tmpname; @@ -768,7 +768,7 @@ int search(const char *tok, const char *val, int sub, int sel) regfree(&re); #endif xctx->draw_window = save_draw; - my_free(_ALLOC_ID_, &tmpname); + my_free(390, &tmpname); return found; } @@ -796,7 +796,7 @@ static void drill_hilight(int mode) hilight_connected_inst = en_hi && ((xctx->inst[i].flags & HILIGHT_CONN) || (symbol->flags & HILIGHT_CONN)); for(j=0; jinst[i].instname, j, netname, mult); for(k = 1; k <= mult; k++) { @@ -807,7 +807,7 @@ static void drill_hilight(int mode) xctx->inst[i].color = entry->value; inst_hilight_hash_lookup(xctx->inst[i].instname, entry->value, XINSERT_NOREPLACE); } - my_strdup(_ALLOC_ID_, &propagate_str, get_tok_value(rct[j].prop_ptr, "propag", 0)); + my_strdup(392, &propagate_str, get_tok_value(rct[j].prop_ptr, "propag", 0)); if(propagate_str) { int n = 1; const char *propag; @@ -822,7 +822,7 @@ static void drill_hilight(int mode) } /* expandlabel(rct[propagate].name, &pinmult); */ /* get net to propagate hilight to...*/ - my_strdup2(_ALLOC_ID_, &propagated_net, net_name(i, propagate, &mult2, 1, 0)); + my_strdup2(393, &propagated_net, net_name(i, propagate, &mult2, 1, 0)); netbitname = find_nth(propagated_net, ",", k); dbg(1, "netbitname=%s\n", netbitname); /* add net to highlight list */ @@ -837,9 +837,9 @@ static void drill_hilight(int mode) } /* for(i...) */ if(!found) break; } /* while(1) */ - my_free(_ALLOC_ID_, &netname); - if(propagated_net) my_free(_ALLOC_ID_, &propagated_net); - if(propagate_str) my_free(_ALLOC_ID_, &propagate_str); + my_free(394, &netname); + if(propagated_net) my_free(395, &propagated_net); + if(propagate_str) my_free(396, &propagate_str); } int hilight_netname(const char *name) @@ -879,9 +879,9 @@ static void send_net_to_bespice(int simtype, const char *node) sprintf(color_str, "%d %d %d", xctx->xcolor_array[c].red>>8, xctx->xcolor_array[c].green>>8, xctx->xcolor_array[c].blue>>8); expanded_tok = expandlabel(tok, &tok_mult); - my_strdup2(_ALLOC_ID_, &p, xctx->sch_path[xctx->currsch]+1); + my_strdup2(397, &p, xctx->sch_path[xctx->currsch]+1); for(k=1; k<=tok_mult; k++) { - my_strdup(_ALLOC_ID_, &t, find_nth(expanded_tok, ",", k)); + my_strdup(398, &t, find_nth(expanded_tok, ",", k)); if(simtype == 0 ) { /* spice */ tclvareval( "puts $bespice_server_getdata(sock) ", @@ -917,8 +917,8 @@ static void send_net_to_bespice(int simtype, const char *node) NULL); } } - my_free(_ALLOC_ID_, &p); - my_free(_ALLOC_ID_, &t); + my_free(399, &p); + my_free(400, &t); } } @@ -939,7 +939,7 @@ static void send_net_to_graph(char **s, int simtype, const char *node) int start_level; c = get_color(xctx->hilight_color); expanded_tok = expandlabel(tok, &tok_mult); - my_strdup2(_ALLOC_ID_, &p, xctx->sch_path[xctx->currsch]+1); + my_strdup2(401, &p, xctx->sch_path[xctx->currsch]+1); path = p; start_level = sch_waves_loaded(); if(path) { @@ -952,20 +952,20 @@ static void send_net_to_graph(char **s, int simtype, const char *node) } strtolower(path); for(k=1; k<=tok_mult; k++) { - my_strdup(_ALLOC_ID_, &t, find_nth(expanded_tok, ",", k)); + my_strdup(402, &t, find_nth(expanded_tok, ",", k)); strtolower(t); if(simtype == 0 ) { /* ngspice */ dbg(1, "%s%s color=%d\n", path, t, c); my_snprintf(ss, S(ss), "%s%s %d ", path, t, c); - my_strcat(_ALLOC_ID_, s, ss); + my_strcat(403, s, ss); } else { /* Xyce */ my_snprintf(ss, S(ss), "%s%s %d", path, t, c); - my_strcat(_ALLOC_ID_, s, ss); + my_strcat(404, s, ss); } } - my_free(_ALLOC_ID_, &p); - my_free(_ALLOC_ID_, &t); + my_free(405, &p); + my_free(406, &t); } } @@ -990,11 +990,11 @@ static void send_net_to_gaw(int simtype, const char *node) expanded_tok = expandlabel(tok, &tok_mult); tcleval("setup_tcp_gaw"); if(tclresult()[0] == '0') return; - my_strdup2(_ALLOC_ID_, &p, xctx->sch_path[xctx->currsch]+1); + my_strdup2(407, &p, xctx->sch_path[xctx->currsch]+1); path = p; strtolower(path); for(k=1; k<=tok_mult; k++) { - my_strdup(_ALLOC_ID_, &t, find_nth(expanded_tok, ",", k)); + my_strdup(408, &t, find_nth(expanded_tok, ",", k)); strtolower(t); if(simtype == 0 ) { /* ngspice */ tclvareval("puts $gaw_fd {copyvar v(", path, t, @@ -1004,8 +1004,8 @@ static void send_net_to_gaw(int simtype, const char *node) ") sel #", color_str, "}\nvwait gaw_fd\n", NULL); } } - my_free(_ALLOC_ID_, &p); - my_free(_ALLOC_ID_, &t); + my_free(409, &p); + my_free(410, &t); } } @@ -1028,9 +1028,9 @@ static void send_current_to_bespice(int simtype, const char *node) sprintf(color_str, "%d %d %d", xctx->xcolor_array[c].red>>8, xctx->xcolor_array[c].green>>8, xctx->xcolor_array[c].blue>>8); expanded_tok = expandlabel(tok, &tok_mult); - my_strdup2(_ALLOC_ID_, &p, xctx->sch_path[xctx->currsch]+1); + my_strdup2(411, &p, xctx->sch_path[xctx->currsch]+1); for(k=1; k<=tok_mult; k++) { - my_strdup(_ALLOC_ID_, &t, find_nth(expanded_tok, ",", k)); + my_strdup(412, &t, find_nth(expanded_tok, ",", k)); if(!simtype) { /* spice */ tclvareval( "puts $bespice_server_getdata(sock) ", @@ -1071,8 +1071,8 @@ static void send_current_to_bespice(int simtype, const char *node) NULL); } } - my_free(_ALLOC_ID_, &p); - my_free(_ALLOC_ID_, &t); + my_free(413, &p); + my_free(414, &t); } static void send_current_to_graph(char **s, int simtype, const char *node) @@ -1087,7 +1087,7 @@ static void send_current_to_graph(char **s, int simtype, const char *node) tok = node; c = get_color(xctx->hilight_color); expanded_tok = expandlabel(tok, &tok_mult); - my_strdup2(_ALLOC_ID_, &p, xctx->sch_path[xctx->currsch]+1); + my_strdup2(415, &p, xctx->sch_path[xctx->currsch]+1); path = p; start_level = sch_waves_loaded(); if(path) { @@ -1101,22 +1101,22 @@ static void send_current_to_graph(char **s, int simtype, const char *node) strtolower(path); there_is_hierarchy = (strstr(path, ".") != NULL); for(k=1; k<=tok_mult; k++) { - my_strdup(_ALLOC_ID_, &t, find_nth(expanded_tok, ",", k)); + my_strdup(416, &t, find_nth(expanded_tok, ",", k)); strtolower(t); if(!simtype) { /* ngspice */ my_snprintf(ss, S(ss), "i(%s%s%s) %d", there_is_hierarchy ? "v." : "", path, t, c); - my_strcat(_ALLOC_ID_, s, ss); + my_strcat(417, s, ss); } else { /* Xyce */ /* my_snprintf(ss, S(ss), "%s%s%s#branch %d", there_is_hierarchy ? "v." : "", path, (there_is_hierarchy ? t+1 : t) , c); */ my_snprintf(ss, S(ss), "i(%s%s) %d", path, t, c); - my_strcat(_ALLOC_ID_, s, ss); + my_strcat(418, s, ss); } } - my_free(_ALLOC_ID_, &p); - my_free(_ALLOC_ID_, &t); + my_free(419, &p); + my_free(420, &t); } static void send_current_to_gaw(int simtype, const char *node) @@ -1136,12 +1136,12 @@ static void send_current_to_gaw(int simtype, const char *node) expanded_tok = expandlabel(tok, &tok_mult); tcleval("setup_tcp_gaw"); if(tclresult()[0] == '0') return; - my_strdup2(_ALLOC_ID_, &p, xctx->sch_path[xctx->currsch]+1); + my_strdup2(421, &p, xctx->sch_path[xctx->currsch]+1); path = p; strtolower(path); there_is_hierarchy = (xctx->currsch > 0); for(k=1; k<=tok_mult; k++) { - my_strdup(_ALLOC_ID_, &t, find_nth(expanded_tok, ",", k)); + my_strdup(422, &t, find_nth(expanded_tok, ",", k)); strtolower(t); if(!simtype) { /* spice */ tclvareval("puts $gaw_fd {copyvar i(", there_is_hierarchy ? "v." : "", path, t, @@ -1161,8 +1161,8 @@ static void send_current_to_gaw(int simtype, const char *node) " sel #", color_str, "}\nvwait gaw_fd\n", NULL); } } - my_free(_ALLOC_ID_, &p); - my_free(_ALLOC_ID_, &t); + my_free(423, &p); + my_free(424, &t); } /* hilight/clear pin/label instances attached to hilight nets, or instances with "hilight=true" @@ -1438,21 +1438,21 @@ static void create_simdata(void) int i, j; const char *str; free_simdata(); - my_realloc(_ALLOC_ID_, &xctx->simdata, xctx->instances * sizeof(Simdata)); + my_realloc(425, &xctx->simdata, xctx->instances * sizeof(Simdata)); xctx->simdata_ninst = xctx->instances; for(i = 0; i < xctx->instances; i++) { xSymbol *symbol = xctx->inst[i].ptr + xctx->sym; int npin = symbol->rects[PINLAYER]; xctx->simdata[i].pin = NULL; - if(npin) my_realloc(_ALLOC_ID_, &xctx->simdata[i].pin, npin * sizeof(Simdata_pin)); + if(npin) my_realloc(426, &xctx->simdata[i].pin, npin * sizeof(Simdata_pin)); xctx->simdata[i].npin = npin; for(j = 0; j < npin; j++) { char function[20]; xctx->simdata[i].pin[j].function=NULL; xctx->simdata[i].pin[j].go_to=NULL; my_snprintf(function, S(function), "function%d", j); - my_strdup(_ALLOC_ID_, &xctx->simdata[i].pin[j].function, get_tok_value(symbol->prop_ptr, function, 0)); - my_strdup(_ALLOC_ID_, &xctx->simdata[i].pin[j].go_to, + my_strdup(427, &xctx->simdata[i].pin[j].function, get_tok_value(symbol->prop_ptr, function, 0)); + my_strdup(428, &xctx->simdata[i].pin[j].go_to, get_tok_value(symbol->rect[PINLAYER][j].prop_ptr, "goto", 0)); str = get_tok_value(symbol->rect[PINLAYER][j].prop_ptr, "clock", 0); xctx->simdata[i].pin[j].clock = str[0] ? str[0] - '0' : -1; @@ -1468,12 +1468,12 @@ void free_simdata(void) for(i = 0; i < xctx->simdata_ninst; i++) { /* can not use xctx->instances if a new sch is loaded */ int npin = xctx->simdata[i].npin; for(j = 0; j < npin; j++) { - my_free(_ALLOC_ID_, &xctx->simdata[i].pin[j].function); - my_free(_ALLOC_ID_, &xctx->simdata[i].pin[j].go_to); + my_free(429, &xctx->simdata[i].pin[j].function); + my_free(430, &xctx->simdata[i].pin[j].go_to); } - if(npin) my_free(_ALLOC_ID_, &xctx->simdata[i].pin); + if(npin) my_free(431, &xctx->simdata[i].pin); } - my_free(_ALLOC_ID_, &xctx->simdata); + my_free(432, &xctx->simdata); } xctx->simdata_ninst = 0; } @@ -1594,7 +1594,7 @@ static void propagate_logic() if( tclresult()[0] == '1') break; iter++; } /* while(1) */ - /* my_free(_ALLOC_ID_, &propagated_net); */ + /* my_free(433, &propagated_net); */ } void logic_set(int value, int num) @@ -1713,7 +1713,7 @@ void hilight_net(int viewer) } if( viewer == XSCHEM_GRAPH && s) { tclvareval("graph_add_nodes_from_list {", s, "}", NULL); - my_free(_ALLOC_ID_, &s); + my_free(434, &s); } if(!incr_hi) incr_hilight_color(); if(xctx->hilight_nets) propagate_hilights(1, 0, XINSERT_NOREPLACE); @@ -1945,14 +1945,14 @@ void print_hilight_net(int show) fprintf(errfp, "print_hilight_net(): can not create tmpfile %s\n", filename_ptr); return; } - my_strdup(_ALLOC_ID_, &filetmp2, filename_ptr); + my_strdup(435, &filetmp2, filename_ptr); fclose(fd); if(!(fd = open_tmpfile("hilight1_", &filename_ptr))) { fprintf(errfp, "print_hilight_net(): can not create tmpfile %s\n", filename_ptr); - my_free(_ALLOC_ID_, &filetmp2); + my_free(436, &filetmp2); return; } - my_strdup(_ALLOC_ID_, &filetmp1, filename_ptr); + my_strdup(437, &filetmp1, filename_ptr); my_snprintf(cmd, S(cmd), "awk -f \"%s/order_labels.awk\"", tclgetvar("XSCHEM_SHAREDIR")); my_snprintf(cmd2, S(cmd2), "%s %s > %s", cmd, filetmp1, filetmp2); my_snprintf(cmd3, S(cmd3), "awk -f \"%s/sort_labels.awk\" %s", tclgetvar("XSCHEM_SHAREDIR"), filetmp1); @@ -2025,8 +2025,8 @@ void print_hilight_net(int show) xctx->prep_hi_structs=0; xctx->prep_net_structs=0; - my_free(_ALLOC_ID_, &filetmp1); - my_free(_ALLOC_ID_, &filetmp2); + my_free(438, &filetmp1); + my_free(439, &filetmp2); } void list_hilights(void) diff --git a/src/in_memory_undo.c b/src/in_memory_undo.c index f9dc28b2..25d86e5b 100644 --- a/src/in_memory_undo.c +++ b/src/in_memory_undo.c @@ -28,9 +28,9 @@ static void free_undo_lines(int slot) for(c = 0;cuslot[slot].lines[c]; i++) { - my_free(_ALLOC_ID_, &xctx->uslot[slot].lptr[c][i].prop_ptr); + my_free(440, &xctx->uslot[slot].lptr[c][i].prop_ptr); } - my_free(_ALLOC_ID_, &xctx->uslot[slot].lptr[c]); + my_free(441, &xctx->uslot[slot].lptr[c]); xctx->uslot[slot].lines[c] = 0; } } @@ -41,9 +41,9 @@ static void free_undo_rects(int slot) for(c = 0;cuslot[slot].rects[c]; i++) { - my_free(_ALLOC_ID_, &xctx->uslot[slot].bptr[c][i].prop_ptr); + my_free(442, &xctx->uslot[slot].bptr[c][i].prop_ptr); } - my_free(_ALLOC_ID_, &xctx->uslot[slot].bptr[c]); + my_free(443, &xctx->uslot[slot].bptr[c]); xctx->uslot[slot].rects[c] = 0; } } @@ -54,12 +54,12 @@ static void free_undo_polygons(int slot) for(c = 0;cuslot[slot].polygons[c]; i++) { - my_free(_ALLOC_ID_, &xctx->uslot[slot].pptr[c][i].prop_ptr); - my_free(_ALLOC_ID_, &xctx->uslot[slot].pptr[c][i].x); - my_free(_ALLOC_ID_, &xctx->uslot[slot].pptr[c][i].y); - my_free(_ALLOC_ID_, &xctx->uslot[slot].pptr[c][i].selected_point); + my_free(444, &xctx->uslot[slot].pptr[c][i].prop_ptr); + my_free(445, &xctx->uslot[slot].pptr[c][i].x); + my_free(446, &xctx->uslot[slot].pptr[c][i].y); + my_free(447, &xctx->uslot[slot].pptr[c][i].selected_point); } - my_free(_ALLOC_ID_, &xctx->uslot[slot].pptr[c]); + my_free(448, &xctx->uslot[slot].pptr[c]); xctx->uslot[slot].polygons[c] = 0; } } @@ -70,9 +70,9 @@ static void free_undo_arcs(int slot) for(c = 0;cuslot[slot].arcs[c]; i++) { - my_free(_ALLOC_ID_, &xctx->uslot[slot].aptr[c][i].prop_ptr); + my_free(449, &xctx->uslot[slot].aptr[c][i].prop_ptr); } - my_free(_ALLOC_ID_, &xctx->uslot[slot].aptr[c]); + my_free(450, &xctx->uslot[slot].aptr[c]); xctx->uslot[slot].arcs[c] = 0; } } @@ -82,9 +82,9 @@ static void free_undo_wires(int slot) int i; for(i = 0;iuslot[slot].wires; i++) { - my_free(_ALLOC_ID_, &xctx->uslot[slot].wptr[i].prop_ptr); + my_free(451, &xctx->uslot[slot].wptr[i].prop_ptr); } - my_free(_ALLOC_ID_, &xctx->uslot[slot].wptr); + my_free(452, &xctx->uslot[slot].wptr); xctx->uslot[slot].wires = 0; } @@ -93,11 +93,11 @@ static void free_undo_texts(int slot) int i; for(i = 0;iuslot[slot].texts; i++) { - my_free(_ALLOC_ID_, &xctx->uslot[slot].tptr[i].prop_ptr); - my_free(_ALLOC_ID_, &xctx->uslot[slot].tptr[i].txt_ptr); - my_free(_ALLOC_ID_, &xctx->uslot[slot].tptr[i].font); + my_free(453, &xctx->uslot[slot].tptr[i].prop_ptr); + my_free(454, &xctx->uslot[slot].tptr[i].txt_ptr); + my_free(455, &xctx->uslot[slot].tptr[i].font); } - my_free(_ALLOC_ID_, &xctx->uslot[slot].tptr); + my_free(456, &xctx->uslot[slot].tptr); xctx->uslot[slot].texts = 0; } @@ -106,12 +106,12 @@ static void free_undo_instances(int slot) int i; for(i = 0;iuslot[slot].instances; i++) { - my_free(_ALLOC_ID_, &xctx->uslot[slot].iptr[i].name); - my_free(_ALLOC_ID_, &xctx->uslot[slot].iptr[i].prop_ptr); - my_free(_ALLOC_ID_, &xctx->uslot[slot].iptr[i].instname); - my_free(_ALLOC_ID_, &xctx->uslot[slot].iptr[i].lab); + my_free(457, &xctx->uslot[slot].iptr[i].name); + my_free(458, &xctx->uslot[slot].iptr[i].prop_ptr); + my_free(459, &xctx->uslot[slot].iptr[i].instname); + my_free(460, &xctx->uslot[slot].iptr[i].lab); } - my_free(_ALLOC_ID_, &xctx->uslot[slot].iptr); + my_free(461, &xctx->uslot[slot].iptr); xctx->uslot[slot].instances = 0; } @@ -123,70 +123,70 @@ static void free_undo_symbols(int slot) symbols = xctx->uslot[slot].symbols; for(i = 0;i < symbols; i++) { sym = &xctx->uslot[slot].symptr[i]; - my_free(_ALLOC_ID_, &sym->name); - my_free(_ALLOC_ID_, &sym->prop_ptr); - my_free(_ALLOC_ID_, &sym->type); - my_free(_ALLOC_ID_, &sym->templ); + my_free(462, &sym->name); + my_free(463, &sym->prop_ptr); + my_free(464, &sym->type); + my_free(465, &sym->templ); for(c = 0;cpolygons[c];j++) { if(sym->poly[c][j].prop_ptr != NULL) { - my_free(_ALLOC_ID_, &sym->poly[c][j].prop_ptr); + my_free(466, &sym->poly[c][j].prop_ptr); } - my_free(_ALLOC_ID_, &sym->poly[c][j].x); - my_free(_ALLOC_ID_, &sym->poly[c][j].y); - my_free(_ALLOC_ID_, &sym->poly[c][j].selected_point); + my_free(467, &sym->poly[c][j].x); + my_free(468, &sym->poly[c][j].y); + my_free(469, &sym->poly[c][j].selected_point); } - my_free(_ALLOC_ID_, &sym->poly[c]); + my_free(470, &sym->poly[c]); sym->polygons[c] = 0; for(j = 0;jlines[c];j++) { if(sym->line[c][j].prop_ptr != NULL) { - my_free(_ALLOC_ID_, &sym->line[c][j].prop_ptr); + my_free(471, &sym->line[c][j].prop_ptr); } } - my_free(_ALLOC_ID_, &sym->line[c]); + my_free(472, &sym->line[c]); sym->lines[c] = 0; for(j = 0;jarcs[c];j++) { if(sym->arc[c][j].prop_ptr != NULL) { - my_free(_ALLOC_ID_, &sym->arc[c][j].prop_ptr); + my_free(473, &sym->arc[c][j].prop_ptr); } } - my_free(_ALLOC_ID_, &sym->arc[c]); + my_free(474, &sym->arc[c]); sym->arcs[c] = 0; for(j = 0;jrects[c];j++) { if(sym->rect[c][j].prop_ptr != NULL) { - my_free(_ALLOC_ID_, &sym->rect[c][j].prop_ptr); + my_free(475, &sym->rect[c][j].prop_ptr); } } - my_free(_ALLOC_ID_, &sym->rect[c]); + my_free(476, &sym->rect[c]); sym->rects[c] = 0; } for(j = 0;jtexts;j++) { if(sym->text[j].prop_ptr != NULL) { - my_free(_ALLOC_ID_, &sym->text[j].prop_ptr); + my_free(477, &sym->text[j].prop_ptr); } if(sym->text[j].txt_ptr != NULL) { - my_free(_ALLOC_ID_, &sym->text[j].txt_ptr); + my_free(478, &sym->text[j].txt_ptr); } if(sym->text[j].font != NULL) { - my_free(_ALLOC_ID_, &sym->text[j].font); + my_free(479, &sym->text[j].font); } } - my_free(_ALLOC_ID_, &sym->text); + my_free(480, &sym->text); sym->texts = 0; - my_free(_ALLOC_ID_, &sym->line); - my_free(_ALLOC_ID_, &sym->rect); - my_free(_ALLOC_ID_, &sym->poly); - my_free(_ALLOC_ID_, &sym->arc); - my_free(_ALLOC_ID_, &sym->lines); - my_free(_ALLOC_ID_, &sym->rects); - my_free(_ALLOC_ID_, &sym->polygons); - my_free(_ALLOC_ID_, &sym->arcs); + my_free(481, &sym->line); + my_free(482, &sym->rect); + my_free(483, &sym->poly); + my_free(484, &sym->arc); + my_free(485, &sym->lines); + my_free(486, &sym->rects); + my_free(487, &sym->polygons); + my_free(488, &sym->arcs); } - my_free(_ALLOC_ID_, &xctx->uslot[slot].symptr); + my_free(489, &xctx->uslot[slot].symptr); xctx->uslot[slot].symbols = 0; } @@ -197,14 +197,14 @@ static void mem_init_undo(void) dbg(1, "mem_init_undo(): undo_initialized = %d\n", xctx->undo_initialized); if(!xctx->undo_initialized) { for(slot = 0;slotuslot[slot].lines = my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->uslot[slot].rects = my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->uslot[slot].arcs = my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->uslot[slot].polygons = my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->uslot[slot].lptr = my_calloc(_ALLOC_ID_, cadlayers, sizeof(xLine *)); - xctx->uslot[slot].bptr = my_calloc(_ALLOC_ID_, cadlayers, sizeof(xRect *)); - xctx->uslot[slot].aptr = my_calloc(_ALLOC_ID_, cadlayers, sizeof(xArc *)); - xctx->uslot[slot].pptr = my_calloc(_ALLOC_ID_, cadlayers, sizeof(xPoly *)); + xctx->uslot[slot].lines = my_calloc(490, cadlayers, sizeof(int)); + xctx->uslot[slot].rects = my_calloc(491, cadlayers, sizeof(int)); + xctx->uslot[slot].arcs = my_calloc(492, cadlayers, sizeof(int)); + xctx->uslot[slot].polygons = my_calloc(493, cadlayers, sizeof(int)); + xctx->uslot[slot].lptr = my_calloc(494, cadlayers, sizeof(xLine *)); + xctx->uslot[slot].bptr = my_calloc(495, cadlayers, sizeof(xRect *)); + xctx->uslot[slot].aptr = my_calloc(496, cadlayers, sizeof(xArc *)); + xctx->uslot[slot].pptr = my_calloc(497, cadlayers, sizeof(xPoly *)); } xctx->undo_initialized = 1; } @@ -239,14 +239,14 @@ void mem_delete_undo(void) if(!xctx->undo_initialized) return; mem_clear_undo(); for(slot = 0;slotuslot[slot].lines); - my_free(_ALLOC_ID_, &xctx->uslot[slot].rects); - my_free(_ALLOC_ID_, &xctx->uslot[slot].arcs); - my_free(_ALLOC_ID_, &xctx->uslot[slot].polygons); - my_free(_ALLOC_ID_, &xctx->uslot[slot].lptr); - my_free(_ALLOC_ID_, &xctx->uslot[slot].bptr); - my_free(_ALLOC_ID_, &xctx->uslot[slot].aptr); - my_free(_ALLOC_ID_, &xctx->uslot[slot].pptr); + my_free(498, &xctx->uslot[slot].lines); + my_free(499, &xctx->uslot[slot].rects); + my_free(500, &xctx->uslot[slot].arcs); + my_free(501, &xctx->uslot[slot].polygons); + my_free(502, &xctx->uslot[slot].lptr); + my_free(503, &xctx->uslot[slot].bptr); + my_free(504, &xctx->uslot[slot].aptr); + my_free(505, &xctx->uslot[slot].pptr); } xctx->undo_initialized = 0; } @@ -261,11 +261,11 @@ void mem_push_undo(void) mem_init_undo(); slot = xctx->cur_undo_ptr%MAX_UNDO; - my_strdup(_ALLOC_ID_, &xctx->uslot[slot].gptr, xctx->schvhdlprop); - my_strdup(_ALLOC_ID_, &xctx->uslot[slot].vptr, xctx->schverilogprop); - my_strdup(_ALLOC_ID_, &xctx->uslot[slot].sptr, xctx->schprop); - my_strdup(_ALLOC_ID_, &xctx->uslot[slot].kptr, xctx->schsymbolprop); - my_strdup(_ALLOC_ID_, &xctx->uslot[slot].eptr, xctx->schtedaxprop); + my_strdup(506, &xctx->uslot[slot].gptr, xctx->schvhdlprop); + my_strdup(507, &xctx->uslot[slot].vptr, xctx->schverilogprop); + my_strdup(508, &xctx->uslot[slot].sptr, xctx->schprop); + my_strdup(509, &xctx->uslot[slot].kptr, xctx->schsymbolprop); + my_strdup(510, &xctx->uslot[slot].eptr, xctx->schtedaxprop); free_undo_lines(slot); free_undo_rects(slot); @@ -281,15 +281,15 @@ void mem_push_undo(void) memcpy(xctx->uslot[slot].arcs, xctx->arcs, sizeof(xctx->arcs[0]) * cadlayers); memcpy(xctx->uslot[slot].polygons, xctx->polygons, sizeof(xctx->polygons[0]) * cadlayers); for(c = 0;cuslot[slot].lptr[c] = my_calloc(_ALLOC_ID_, xctx->lines[c], sizeof(xLine)); - xctx->uslot[slot].bptr[c] = my_calloc(_ALLOC_ID_, xctx->rects[c], sizeof(xRect)); - xctx->uslot[slot].pptr[c] = my_calloc(_ALLOC_ID_, xctx->polygons[c], sizeof(xPoly)); - xctx->uslot[slot].aptr[c] = my_calloc(_ALLOC_ID_, xctx->arcs[c], sizeof(xArc)); + xctx->uslot[slot].lptr[c] = my_calloc(511, xctx->lines[c], sizeof(xLine)); + xctx->uslot[slot].bptr[c] = my_calloc(512, xctx->rects[c], sizeof(xRect)); + xctx->uslot[slot].pptr[c] = my_calloc(513, xctx->polygons[c], sizeof(xPoly)); + xctx->uslot[slot].aptr[c] = my_calloc(514, xctx->arcs[c], sizeof(xArc)); } - xctx->uslot[slot].wptr = my_calloc(_ALLOC_ID_, xctx->wires, sizeof(xWire)); - xctx->uslot[slot].tptr = my_calloc(_ALLOC_ID_, xctx->texts, sizeof(xText)); - xctx->uslot[slot].iptr = my_calloc(_ALLOC_ID_, xctx->instances, sizeof(xInstance)); - xctx->uslot[slot].symptr = my_calloc(_ALLOC_ID_, xctx->symbols, sizeof(xSymbol)); + xctx->uslot[slot].wptr = my_calloc(515, xctx->wires, sizeof(xWire)); + xctx->uslot[slot].tptr = my_calloc(516, xctx->texts, sizeof(xText)); + xctx->uslot[slot].iptr = my_calloc(517, xctx->instances, sizeof(xInstance)); + xctx->uslot[slot].symptr = my_calloc(518, xctx->symbols, sizeof(xSymbol)); xctx->uslot[slot].texts = xctx->texts; xctx->uslot[slot].instances = xctx->instances; xctx->uslot[slot].symbols = xctx->symbols; @@ -300,34 +300,34 @@ void mem_push_undo(void) for(i = 0;ilines[c];i++) { xctx->uslot[slot].lptr[c][i] = xctx->line[c][i]; xctx->uslot[slot].lptr[c][i].prop_ptr = NULL; - my_strdup(_ALLOC_ID_, &xctx->uslot[slot].lptr[c][i].prop_ptr, xctx->line[c][i].prop_ptr); + my_strdup(519, &xctx->uslot[slot].lptr[c][i].prop_ptr, xctx->line[c][i].prop_ptr); } /* rects */ for(i = 0;irects[c];i++) { xctx->uslot[slot].bptr[c][i] = xctx->rect[c][i]; xctx->uslot[slot].bptr[c][i].prop_ptr = NULL; xctx->uslot[slot].bptr[c][i].extraptr = NULL; - my_strdup(_ALLOC_ID_, &xctx->uslot[slot].bptr[c][i].prop_ptr, xctx->rect[c][i].prop_ptr); + my_strdup(520, &xctx->uslot[slot].bptr[c][i].prop_ptr, xctx->rect[c][i].prop_ptr); } /* arcs */ for(i = 0;iarcs[c];i++) { xctx->uslot[slot].aptr[c][i] = xctx->arc[c][i]; xctx->uslot[slot].aptr[c][i].prop_ptr = NULL; - my_strdup(_ALLOC_ID_, &xctx->uslot[slot].aptr[c][i].prop_ptr, xctx->arc[c][i].prop_ptr); + my_strdup(521, &xctx->uslot[slot].aptr[c][i].prop_ptr, xctx->arc[c][i].prop_ptr); } /*polygons */ for(i = 0;ipolygons[c];i++) { int points = xctx->poly[c][i].points; xctx->uslot[slot].pptr[c][i] = xctx->poly[c][i]; xctx->uslot[slot].pptr[c][i].prop_ptr = NULL; - xctx->uslot[slot].pptr[c][i].x = my_malloc(_ALLOC_ID_, points * sizeof(double)); - xctx->uslot[slot].pptr[c][i].y = my_malloc(_ALLOC_ID_, points * sizeof(double)); - xctx->uslot[slot].pptr[c][i].selected_point = my_malloc(_ALLOC_ID_, points * sizeof(unsigned short)); + xctx->uslot[slot].pptr[c][i].x = my_malloc(522, points * sizeof(double)); + xctx->uslot[slot].pptr[c][i].y = my_malloc(523, points * sizeof(double)); + xctx->uslot[slot].pptr[c][i].selected_point = my_malloc(524, points * sizeof(unsigned short)); memcpy(xctx->uslot[slot].pptr[c][i].x, xctx->poly[c][i].x, points * sizeof(double)); memcpy(xctx->uslot[slot].pptr[c][i].y, xctx->poly[c][i].y, points * sizeof(double)); memcpy(xctx->uslot[slot].pptr[c][i].selected_point, xctx->poly[c][i].selected_point, points * sizeof(unsigned short)); - my_strdup(_ALLOC_ID_, &xctx->uslot[slot].pptr[c][i].prop_ptr, xctx->poly[c][i].prop_ptr); + my_strdup(525, &xctx->uslot[slot].pptr[c][i].prop_ptr, xctx->poly[c][i].prop_ptr); } } /* instances */ @@ -338,10 +338,10 @@ void mem_push_undo(void) xctx->uslot[slot].iptr[i].instname = NULL; xctx->uslot[slot].iptr[i].lab = NULL; xctx->uslot[slot].iptr[i].node = NULL; - my_strdup(_ALLOC_ID_, &xctx->uslot[slot].iptr[i].lab, xctx->inst[i].lab); - my_strdup2(_ALLOC_ID_, &xctx->uslot[slot].iptr[i].instname, xctx->inst[i].instname); - my_strdup(_ALLOC_ID_, &xctx->uslot[slot].iptr[i].prop_ptr, xctx->inst[i].prop_ptr); - my_strdup2(_ALLOC_ID_, &xctx->uslot[slot].iptr[i].name, xctx->inst[i].name); + my_strdup(526, &xctx->uslot[slot].iptr[i].lab, xctx->inst[i].lab); + my_strdup2(527, &xctx->uslot[slot].iptr[i].instname, xctx->inst[i].instname); + my_strdup(528, &xctx->uslot[slot].iptr[i].prop_ptr, xctx->inst[i].prop_ptr); + my_strdup2(529, &xctx->uslot[slot].iptr[i].name, xctx->inst[i].name); } /* symbols */ @@ -352,19 +352,19 @@ void mem_push_undo(void) sym->prop_ptr = NULL; sym->type = NULL; sym->templ = NULL; - my_strdup2(_ALLOC_ID_, &sym->name, xctx->sym[i].name); - my_strdup2(_ALLOC_ID_, &sym->type, xctx->sym[i].type); - my_strdup2(_ALLOC_ID_, &sym->templ, xctx->sym[i].templ); - my_strdup2(_ALLOC_ID_, &sym->prop_ptr, xctx->sym[i].prop_ptr); - sym->line = my_calloc(_ALLOC_ID_, cadlayers, sizeof(xLine *)); - sym->poly = my_calloc(_ALLOC_ID_, cadlayers, sizeof(xPoly *)); - sym->arc = my_calloc(_ALLOC_ID_, cadlayers, sizeof(xArc *)); - sym->rect = my_calloc(_ALLOC_ID_, cadlayers, sizeof(xRect *)); - sym->lines = my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - sym->rects = my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - sym->arcs = my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - sym->polygons = my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - sym->text = my_calloc(_ALLOC_ID_, xctx->sym[i].texts, sizeof(xText)); + my_strdup2(530, &sym->name, xctx->sym[i].name); + my_strdup2(531, &sym->type, xctx->sym[i].type); + my_strdup2(532, &sym->templ, xctx->sym[i].templ); + my_strdup2(533, &sym->prop_ptr, xctx->sym[i].prop_ptr); + sym->line = my_calloc(534, cadlayers, sizeof(xLine *)); + sym->poly = my_calloc(535, cadlayers, sizeof(xPoly *)); + sym->arc = my_calloc(536, cadlayers, sizeof(xArc *)); + sym->rect = my_calloc(537, cadlayers, sizeof(xRect *)); + sym->lines = my_calloc(538, cadlayers, sizeof(int)); + sym->rects = my_calloc(539, cadlayers, sizeof(int)); + sym->arcs = my_calloc(540, cadlayers, sizeof(int)); + sym->polygons = my_calloc(541, cadlayers, sizeof(int)); + sym->text = my_calloc(542, xctx->sym[i].texts, sizeof(xText)); memcpy(sym->lines, xctx->sym[i].lines, sizeof(sym->lines[0]) * cadlayers); memcpy(sym->rects, xctx->sym[i].rects, sizeof(sym->rects[0]) * cadlayers); @@ -372,37 +372,37 @@ void mem_push_undo(void) memcpy(sym->polygons, xctx->sym[i].polygons, sizeof(sym->polygons[0]) * cadlayers); for(c = 0;cline[c] = my_calloc(_ALLOC_ID_, xctx->sym[i].lines[c], sizeof(xLine)); + sym->line[c] = my_calloc(543, xctx->sym[i].lines[c], sizeof(xLine)); for(j = 0; j < xctx->sym[i].lines[c]; j++) { sym->line[c][j] = xctx->sym[i].line[c][j]; sym->line[c][j].prop_ptr = NULL; - my_strdup(_ALLOC_ID_, &sym->line[c][j].prop_ptr, xctx->sym[i].line[c][j].prop_ptr); + my_strdup(544, &sym->line[c][j].prop_ptr, xctx->sym[i].line[c][j].prop_ptr); } /* symbol rects */ - sym->rect[c] = my_calloc(_ALLOC_ID_, xctx->sym[i].rects[c], sizeof(xRect)); + sym->rect[c] = my_calloc(545, xctx->sym[i].rects[c], sizeof(xRect)); for(j = 0; j < xctx->sym[i].rects[c]; j++) { sym->rect[c][j] = xctx->sym[i].rect[c][j]; sym->rect[c][j].prop_ptr = NULL; sym->rect[c][j].extraptr = NULL; - my_strdup(_ALLOC_ID_, &sym->rect[c][j].prop_ptr, xctx->sym[i].rect[c][j].prop_ptr); + my_strdup(546, &sym->rect[c][j].prop_ptr, xctx->sym[i].rect[c][j].prop_ptr); } /* symbol arcs */ - sym->arc[c] = my_calloc(_ALLOC_ID_, xctx->sym[i].arcs[c], sizeof(xArc)); + sym->arc[c] = my_calloc(547, xctx->sym[i].arcs[c], sizeof(xArc)); for(j = 0; j < xctx->sym[i].arcs[c]; j++) { sym->arc[c][j] = xctx->sym[i].arc[c][j]; sym->arc[c][j].prop_ptr = NULL; - my_strdup(_ALLOC_ID_, &sym->arc[c][j].prop_ptr, xctx->sym[i].arc[c][j].prop_ptr); + my_strdup(548, &sym->arc[c][j].prop_ptr, xctx->sym[i].arc[c][j].prop_ptr); } /* symbol polygons */ - sym->poly[c] = my_calloc(_ALLOC_ID_, xctx->sym[i].polygons[c], sizeof(xPoly)); + sym->poly[c] = my_calloc(549, xctx->sym[i].polygons[c], sizeof(xPoly)); for(j = 0; j < xctx->sym[i].polygons[c]; j++) { int points = xctx->sym[i].poly[c][j].points; sym->poly[c][j] = xctx->sym[i].poly[c][j]; sym->poly[c][j].prop_ptr = NULL; - sym->poly[c][j].x = my_malloc(_ALLOC_ID_, points * sizeof(double)); - sym->poly[c][j].y = my_malloc(_ALLOC_ID_, points * sizeof(double)); - sym->poly[c][j].selected_point = my_malloc(_ALLOC_ID_, points * sizeof(unsigned short)); - my_strdup(_ALLOC_ID_, &sym->poly[c][j].prop_ptr, xctx->sym[i].poly[c][j].prop_ptr); + sym->poly[c][j].x = my_malloc(550, points * sizeof(double)); + sym->poly[c][j].y = my_malloc(551, points * sizeof(double)); + sym->poly[c][j].selected_point = my_malloc(552, points * sizeof(unsigned short)); + my_strdup(553, &sym->poly[c][j].prop_ptr, xctx->sym[i].poly[c][j].prop_ptr); memcpy(sym->poly[c][j].x, xctx->sym[i].poly[c][j].x, points * sizeof(double)); memcpy(sym->poly[c][j].y, xctx->sym[i].poly[c][j].y, points * sizeof(double)); memcpy(sym->poly[c][j].selected_point, xctx->sym[i].poly[c][j].selected_point, @@ -415,9 +415,9 @@ void mem_push_undo(void) sym->text[j].prop_ptr = NULL; sym->text[j].txt_ptr = NULL; sym->text[j].font = NULL; - my_strdup(_ALLOC_ID_, &sym->text[j].prop_ptr, xctx->sym[i].text[j].prop_ptr); - my_strdup(_ALLOC_ID_, &sym->text[j].txt_ptr, xctx->sym[i].text[j].txt_ptr); - my_strdup(_ALLOC_ID_, &sym->text[j].font, xctx->sym[i].text[j].font); + my_strdup(554, &sym->text[j].prop_ptr, xctx->sym[i].text[j].prop_ptr); + my_strdup(555, &sym->text[j].txt_ptr, xctx->sym[i].text[j].txt_ptr); + my_strdup(556, &sym->text[j].font, xctx->sym[i].text[j].font); } } @@ -427,9 +427,9 @@ void mem_push_undo(void) xctx->uslot[slot].tptr[i].prop_ptr = NULL; xctx->uslot[slot].tptr[i].txt_ptr = NULL; xctx->uslot[slot].tptr[i].font = NULL; - my_strdup(_ALLOC_ID_, &xctx->uslot[slot].tptr[i].prop_ptr, xctx->text[i].prop_ptr); - my_strdup(_ALLOC_ID_, &xctx->uslot[slot].tptr[i].txt_ptr, xctx->text[i].txt_ptr); - my_strdup(_ALLOC_ID_, &xctx->uslot[slot].tptr[i].font, xctx->text[i].font); + my_strdup(557, &xctx->uslot[slot].tptr[i].prop_ptr, xctx->text[i].prop_ptr); + my_strdup(558, &xctx->uslot[slot].tptr[i].txt_ptr, xctx->text[i].txt_ptr); + my_strdup(559, &xctx->uslot[slot].tptr[i].font, xctx->text[i].font); } /* wires */ @@ -437,7 +437,7 @@ void mem_push_undo(void) xctx->uslot[slot].wptr[i] = xctx->wire[i]; xctx->uslot[slot].wptr[i].prop_ptr = NULL; xctx->uslot[slot].wptr[i].node = NULL; - my_strdup(_ALLOC_ID_, &xctx->uslot[slot].wptr[i].prop_ptr, xctx->wire[i].prop_ptr); + my_strdup(560, &xctx->uslot[slot].wptr[i].prop_ptr, xctx->wire[i].prop_ptr); } @@ -480,78 +480,78 @@ void mem_pop_undo(int redo, int set_modify_status) slot = xctx->cur_undo_ptr%MAX_UNDO; clear_drawing(); unselect_all(1); - my_free(_ALLOC_ID_, &xctx->wire); - my_free(_ALLOC_ID_, &xctx->text); - my_free(_ALLOC_ID_, &xctx->inst); + my_free(561, &xctx->wire); + my_free(562, &xctx->text); + my_free(563, &xctx->inst); for(i = 0;irect[i]); - my_free(_ALLOC_ID_, &xctx->line[i]); - my_free(_ALLOC_ID_, &xctx->poly[i]); - my_free(_ALLOC_ID_, &xctx->arc[i]); + my_free(564, &xctx->rect[i]); + my_free(565, &xctx->line[i]); + my_free(566, &xctx->poly[i]); + my_free(567, &xctx->arc[i]); } remove_symbols(); for(i = 0;imaxs;i++) { - my_free(_ALLOC_ID_, &xctx->sym[i].line); - my_free(_ALLOC_ID_, &xctx->sym[i].rect); - my_free(_ALLOC_ID_, &xctx->sym[i].arc); - my_free(_ALLOC_ID_, &xctx->sym[i].poly); - my_free(_ALLOC_ID_, &xctx->sym[i].lines); - my_free(_ALLOC_ID_, &xctx->sym[i].polygons); - my_free(_ALLOC_ID_, &xctx->sym[i].arcs); - my_free(_ALLOC_ID_, &xctx->sym[i].rects); + my_free(568, &xctx->sym[i].line); + my_free(569, &xctx->sym[i].rect); + my_free(570, &xctx->sym[i].arc); + my_free(571, &xctx->sym[i].poly); + my_free(572, &xctx->sym[i].lines); + my_free(573, &xctx->sym[i].polygons); + my_free(574, &xctx->sym[i].arcs); + my_free(575, &xctx->sym[i].rects); } - my_free(_ALLOC_ID_, &xctx->sym); + my_free(576, &xctx->sym); - my_strdup(_ALLOC_ID_, &xctx->schvhdlprop, xctx->uslot[slot].gptr); - my_strdup(_ALLOC_ID_, &xctx->schverilogprop, xctx->uslot[slot].vptr); - my_strdup(_ALLOC_ID_, &xctx->schprop, xctx->uslot[slot].sptr); - my_strdup(_ALLOC_ID_, &xctx->schsymbolprop, xctx->uslot[slot].kptr); - my_strdup(_ALLOC_ID_, &xctx->schtedaxprop, xctx->uslot[slot].eptr); + my_strdup(577, &xctx->schvhdlprop, xctx->uslot[slot].gptr); + my_strdup(578, &xctx->schverilogprop, xctx->uslot[slot].vptr); + my_strdup(579, &xctx->schprop, xctx->uslot[slot].sptr); + my_strdup(580, &xctx->schsymbolprop, xctx->uslot[slot].kptr); + my_strdup(581, &xctx->schtedaxprop, xctx->uslot[slot].eptr); for(c = 0;cmaxl[c] = xctx->lines[c] = xctx->uslot[slot].lines[c]; - xctx->line[c] = my_calloc(_ALLOC_ID_, xctx->lines[c], sizeof(xLine)); + xctx->line[c] = my_calloc(582, xctx->lines[c], sizeof(xLine)); for(i = 0;ilines[c];i++) { xctx->line[c][i] = xctx->uslot[slot].lptr[c][i]; xctx->line[c][i].prop_ptr = NULL; - my_strdup(_ALLOC_ID_, &xctx->line[c][i].prop_ptr, xctx->uslot[slot].lptr[c][i].prop_ptr); + my_strdup(583, &xctx->line[c][i].prop_ptr, xctx->uslot[slot].lptr[c][i].prop_ptr); } /* rects */ xctx->maxr[c] = xctx->rects[c] = xctx->uslot[slot].rects[c]; - xctx->rect[c] = my_calloc(_ALLOC_ID_, xctx->rects[c], sizeof(xRect)); + xctx->rect[c] = my_calloc(584, xctx->rects[c], sizeof(xRect)); for(i = 0;irects[c];i++) { xctx->rect[c][i] = xctx->uslot[slot].bptr[c][i]; xctx->rect[c][i].prop_ptr = NULL; xctx->rect[c][i].extraptr = NULL; - my_strdup(_ALLOC_ID_, &xctx->rect[c][i].prop_ptr, xctx->uslot[slot].bptr[c][i].prop_ptr); + my_strdup(585, &xctx->rect[c][i].prop_ptr, xctx->uslot[slot].bptr[c][i].prop_ptr); } /* arcs */ xctx->maxa[c] = xctx->arcs[c] = xctx->uslot[slot].arcs[c]; - xctx->arc[c] = my_calloc(_ALLOC_ID_, xctx->arcs[c], sizeof(xArc)); + xctx->arc[c] = my_calloc(586, xctx->arcs[c], sizeof(xArc)); for(i = 0;iarcs[c];i++) { xctx->arc[c][i] = xctx->uslot[slot].aptr[c][i]; xctx->arc[c][i].prop_ptr = NULL; - my_strdup(_ALLOC_ID_, &xctx->arc[c][i].prop_ptr, xctx->uslot[slot].aptr[c][i].prop_ptr); + my_strdup(587, &xctx->arc[c][i].prop_ptr, xctx->uslot[slot].aptr[c][i].prop_ptr); } /* polygons */ xctx->maxp[c] = xctx->polygons[c] = xctx->uslot[slot].polygons[c]; - xctx->poly[c] = my_calloc(_ALLOC_ID_, xctx->polygons[c], sizeof(xPoly)); + xctx->poly[c] = my_calloc(588, xctx->polygons[c], sizeof(xPoly)); for(i = 0;ipolygons[c];i++) { int points = xctx->uslot[slot].pptr[c][i].points; xctx->poly[c][i] = xctx->uslot[slot].pptr[c][i]; xctx->poly[c][i].prop_ptr = NULL; - my_strdup(_ALLOC_ID_, &xctx->poly[c][i].prop_ptr, xctx->uslot[slot].pptr[c][i].prop_ptr); - xctx->poly[c][i].x = my_malloc(_ALLOC_ID_, points * sizeof(double)); - xctx->poly[c][i].y = my_malloc(_ALLOC_ID_, points * sizeof(double)); - xctx->poly[c][i].selected_point = my_malloc(_ALLOC_ID_, points * sizeof(unsigned short)); + my_strdup(589, &xctx->poly[c][i].prop_ptr, xctx->uslot[slot].pptr[c][i].prop_ptr); + xctx->poly[c][i].x = my_malloc(590, points * sizeof(double)); + xctx->poly[c][i].y = my_malloc(591, points * sizeof(double)); + xctx->poly[c][i].selected_point = my_malloc(592, points * sizeof(unsigned short)); memcpy(xctx->poly[c][i].x, xctx->uslot[slot].pptr[c][i].x, points * sizeof(double)); memcpy(xctx->poly[c][i].y, xctx->uslot[slot].pptr[c][i].y, points * sizeof(double)); memcpy(xctx->poly[c][i].selected_point, xctx->uslot[slot].pptr[c][i].selected_point, @@ -561,22 +561,22 @@ void mem_pop_undo(int redo, int set_modify_status) /* instances */ xctx->maxi = xctx->instances = xctx->uslot[slot].instances; - xctx->inst = my_calloc(_ALLOC_ID_, xctx->instances, sizeof(xInstance)); + xctx->inst = my_calloc(593, xctx->instances, sizeof(xInstance)); for(i = 0;iinstances;i++) { xctx->inst[i] = xctx->uslot[slot].iptr[i]; xctx->inst[i].prop_ptr = NULL; xctx->inst[i].name = NULL; xctx->inst[i].instname = NULL; xctx->inst[i].lab = NULL; - my_strdup(_ALLOC_ID_, &xctx->inst[i].prop_ptr, xctx->uslot[slot].iptr[i].prop_ptr); - my_strdup2(_ALLOC_ID_, &xctx->inst[i].name, xctx->uslot[slot].iptr[i].name); - my_strdup2(_ALLOC_ID_, &xctx->inst[i].instname, xctx->uslot[slot].iptr[i].instname); - my_strdup(_ALLOC_ID_, &xctx->inst[i].lab, xctx->uslot[slot].iptr[i].lab); + my_strdup(594, &xctx->inst[i].prop_ptr, xctx->uslot[slot].iptr[i].prop_ptr); + my_strdup2(595, &xctx->inst[i].name, xctx->uslot[slot].iptr[i].name); + my_strdup2(596, &xctx->inst[i].instname, xctx->uslot[slot].iptr[i].instname); + my_strdup(597, &xctx->inst[i].lab, xctx->uslot[slot].iptr[i].lab); } /* symbols */ xctx->maxs = xctx->symbols = xctx->uslot[slot].symbols; - xctx->sym = my_calloc(_ALLOC_ID_, xctx->symbols, sizeof(xSymbol)); + xctx->sym = my_calloc(598, xctx->symbols, sizeof(xSymbol)); for(i = 0;isymbols;i++) { sym = &xctx->uslot[slot].symptr[i]; @@ -585,20 +585,20 @@ void mem_pop_undo(int redo, int set_modify_status) xctx->sym[i].prop_ptr = NULL; xctx->sym[i].type = NULL; xctx->sym[i].templ = NULL; - my_strdup2(_ALLOC_ID_, &xctx->sym[i].name, sym->name); - my_strdup2(_ALLOC_ID_, &xctx->sym[i].type, sym->type); - my_strdup2(_ALLOC_ID_, &xctx->sym[i].templ, sym->templ); - my_strdup2(_ALLOC_ID_, &xctx->sym[i].prop_ptr, sym->prop_ptr); + my_strdup2(599, &xctx->sym[i].name, sym->name); + my_strdup2(600, &xctx->sym[i].type, sym->type); + my_strdup2(601, &xctx->sym[i].templ, sym->templ); + my_strdup2(602, &xctx->sym[i].prop_ptr, sym->prop_ptr); - xctx->sym[i].line = my_calloc(_ALLOC_ID_, cadlayers, sizeof(xLine *)); - xctx->sym[i].poly = my_calloc(_ALLOC_ID_, cadlayers, sizeof(xPoly *)); - xctx->sym[i].arc = my_calloc(_ALLOC_ID_, cadlayers, sizeof(xArc *)); - xctx->sym[i].rect = my_calloc(_ALLOC_ID_, cadlayers, sizeof(xRect *)); - xctx->sym[i].lines = my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->sym[i].rects = my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->sym[i].arcs = my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->sym[i].polygons = my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->sym[i].text = my_calloc(_ALLOC_ID_, xctx->sym[i].texts, sizeof(xText)); + xctx->sym[i].line = my_calloc(603, cadlayers, sizeof(xLine *)); + xctx->sym[i].poly = my_calloc(604, cadlayers, sizeof(xPoly *)); + xctx->sym[i].arc = my_calloc(605, cadlayers, sizeof(xArc *)); + xctx->sym[i].rect = my_calloc(606, cadlayers, sizeof(xRect *)); + xctx->sym[i].lines = my_calloc(607, cadlayers, sizeof(int)); + xctx->sym[i].rects = my_calloc(608, cadlayers, sizeof(int)); + xctx->sym[i].arcs = my_calloc(609, cadlayers, sizeof(int)); + xctx->sym[i].polygons = my_calloc(610, cadlayers, sizeof(int)); + xctx->sym[i].text = my_calloc(611, xctx->sym[i].texts, sizeof(xText)); memcpy(xctx->sym[i].lines, sym->lines, sizeof(sym->lines[0]) * cadlayers); memcpy(xctx->sym[i].rects, sym->rects, sizeof(sym->rects[0]) * cadlayers); @@ -607,41 +607,41 @@ void mem_pop_undo(int redo, int set_modify_status) for(c = 0;csym[i].line[c] = my_calloc(_ALLOC_ID_, sym->lines[c], sizeof(xLine)); + xctx->sym[i].line[c] = my_calloc(612, sym->lines[c], sizeof(xLine)); for(j = 0; j < xctx->sym[i].lines[c]; j++) { xctx->sym[i].line[c][j] = sym->line[c][j]; xctx->sym[i].line[c][j].prop_ptr = NULL; - my_strdup(_ALLOC_ID_, & xctx->sym[i].line[c][j].prop_ptr, sym->line[c][j].prop_ptr); + my_strdup(613, & xctx->sym[i].line[c][j].prop_ptr, sym->line[c][j].prop_ptr); } /* symbol rects */ - xctx->sym[i].rect[c] = my_calloc(_ALLOC_ID_, sym->rects[c], sizeof(xRect)); + xctx->sym[i].rect[c] = my_calloc(614, sym->rects[c], sizeof(xRect)); for(j = 0; j < xctx->sym[i].rects[c]; j++) { xctx->sym[i].rect[c][j] = sym->rect[c][j]; xctx->sym[i].rect[c][j].prop_ptr = NULL; xctx->sym[i].rect[c][j].extraptr = NULL; - my_strdup(_ALLOC_ID_, & xctx->sym[i].rect[c][j].prop_ptr, sym->rect[c][j].prop_ptr); + my_strdup(615, & xctx->sym[i].rect[c][j].prop_ptr, sym->rect[c][j].prop_ptr); } /* symbol arcs */ - xctx->sym[i].arc[c] = my_calloc(_ALLOC_ID_, sym->arcs[c], sizeof(xArc)); + xctx->sym[i].arc[c] = my_calloc(616, sym->arcs[c], sizeof(xArc)); for(j = 0; j < xctx->sym[i].arcs[c]; j++) { xctx->sym[i].arc[c][j] = sym->arc[c][j]; xctx->sym[i].arc[c][j].prop_ptr = NULL; - my_strdup(_ALLOC_ID_, & xctx->sym[i].arc[c][j].prop_ptr, sym->arc[c][j].prop_ptr); + my_strdup(617, & xctx->sym[i].arc[c][j].prop_ptr, sym->arc[c][j].prop_ptr); } /* symbol polygons */ - xctx->sym[i].poly[c] = my_calloc(_ALLOC_ID_, sym->polygons[c], sizeof(xPoly)); + xctx->sym[i].poly[c] = my_calloc(618, sym->polygons[c], sizeof(xPoly)); for(j = 0; j < xctx->sym[i].polygons[c]; j++) { int points = sym->poly[c][j].points; xctx->sym[i].poly[c][j] = sym->poly[c][j]; xctx->sym[i].poly[c][j].prop_ptr = NULL; - xctx->sym[i].poly[c][j].x = my_malloc(_ALLOC_ID_, points * sizeof(double)); - xctx->sym[i].poly[c][j].y = my_malloc(_ALLOC_ID_, points * sizeof(double)); - xctx->sym[i].poly[c][j].selected_point = my_malloc(_ALLOC_ID_, points * sizeof(unsigned short)); + xctx->sym[i].poly[c][j].x = my_malloc(619, points * sizeof(double)); + xctx->sym[i].poly[c][j].y = my_malloc(620, points * sizeof(double)); + xctx->sym[i].poly[c][j].selected_point = my_malloc(621, points * sizeof(unsigned short)); memcpy(xctx->sym[i].poly[c][j].x, sym->poly[c][j].x, points * sizeof(double)); memcpy(xctx->sym[i].poly[c][j].y, sym->poly[c][j].y, points * sizeof(double)); memcpy(xctx->sym[i].poly[c][j].selected_point, sym->poly[c][j].selected_point, points * sizeof(unsigned short)); - my_strdup(_ALLOC_ID_, & xctx->sym[i].poly[c][j].prop_ptr, sym->poly[c][j].prop_ptr); + my_strdup(622, & xctx->sym[i].poly[c][j].prop_ptr, sym->poly[c][j].prop_ptr); } } /* symbol texts */ @@ -650,33 +650,33 @@ void mem_pop_undo(int redo, int set_modify_status) xctx->sym[i].text[j].prop_ptr = NULL; xctx->sym[i].text[j].txt_ptr = NULL; xctx->sym[i].text[j].font = NULL; - my_strdup(_ALLOC_ID_, &xctx->sym[i].text[j].prop_ptr, sym->text[j].prop_ptr); - my_strdup(_ALLOC_ID_, &xctx->sym[i].text[j].txt_ptr, sym->text[j].txt_ptr); - my_strdup(_ALLOC_ID_, &xctx->sym[i].text[j].font, sym->text[j].font); + my_strdup(623, &xctx->sym[i].text[j].prop_ptr, sym->text[j].prop_ptr); + my_strdup(624, &xctx->sym[i].text[j].txt_ptr, sym->text[j].txt_ptr); + my_strdup(625, &xctx->sym[i].text[j].font, sym->text[j].font); } } /* texts */ xctx->maxt = xctx->texts = xctx->uslot[slot].texts; - xctx->text = my_calloc(_ALLOC_ID_, xctx->texts, sizeof(xText)); + xctx->text = my_calloc(626, xctx->texts, sizeof(xText)); for(i = 0;itexts;i++) { xctx->text[i] = xctx->uslot[slot].tptr[i]; xctx->text[i].txt_ptr = NULL; xctx->text[i].font = NULL; xctx->text[i].prop_ptr = NULL; - my_strdup(_ALLOC_ID_, &xctx->text[i].prop_ptr, xctx->uslot[slot].tptr[i].prop_ptr); - my_strdup(_ALLOC_ID_, &xctx->text[i].txt_ptr, xctx->uslot[slot].tptr[i].txt_ptr); - my_strdup(_ALLOC_ID_, &xctx->text[i].font, xctx->uslot[slot].tptr[i].font); + my_strdup(627, &xctx->text[i].prop_ptr, xctx->uslot[slot].tptr[i].prop_ptr); + my_strdup(628, &xctx->text[i].txt_ptr, xctx->uslot[slot].tptr[i].txt_ptr); + my_strdup(629, &xctx->text[i].font, xctx->uslot[slot].tptr[i].font); } /* wires */ xctx->maxw = xctx->wires = xctx->uslot[slot].wires; - xctx->wire = my_calloc(_ALLOC_ID_, xctx->wires, sizeof(xWire)); + xctx->wire = my_calloc(630, xctx->wires, sizeof(xWire)); for(i = 0;iwires;i++) { xctx->wire[i] = xctx->uslot[slot].wptr[i]; xctx->wire[i].prop_ptr = NULL; xctx->wire[i].node = NULL; - my_strdup(_ALLOC_ID_, &xctx->wire[i].prop_ptr, xctx->uslot[slot].wptr[i].prop_ptr); + my_strdup(631, &xctx->wire[i].prop_ptr, xctx->uslot[slot].wptr[i].prop_ptr); } /* unnecessary since in_memory_undo saves all symbols */ /* link_symbols_to_instances(-1); */ diff --git a/src/main.c b/src/main.c index a8419f1a..6505c45c 100644 --- a/src/main.c +++ b/src/main.c @@ -71,7 +71,7 @@ static void child_handler(int signum) int main(int argc, char **argv) { int i; - my_strdup(_ALLOC_ID_, &xschem_executable, argv[0]); + my_strdup(632, &xschem_executable, argv[0]); signal(SIGINT, sig_handler); signal(SIGSEGV, sig_handler); signal(SIGILL, sig_handler); @@ -94,10 +94,10 @@ int main(int argc, char **argv) cli_opt_argc = argc; - cli_opt_argv = my_malloc(_ALLOC_ID_, cli_opt_argc * sizeof(char *)); + cli_opt_argv = my_malloc(633, cli_opt_argc * sizeof(char *)); for(i = 0; i < cli_opt_argc; i++) { cli_opt_argv[i] = NULL; - my_strdup(_ALLOC_ID_, &cli_opt_argv[i], argv[i]); + my_strdup(634, &cli_opt_argv[i], argv[i]); } diff --git a/src/move.c b/src/move.c index 7d9be95d..4412560e 100644 --- a/src/move.c +++ b/src/move.c @@ -104,8 +104,8 @@ void check_collapsing_objects() { if(xctx->wire[i].x1==xctx->wire[i].x2 && xctx->wire[i].y1 == xctx->wire[i].y2) { - my_free(_ALLOC_ID_, &xctx->wire[i].prop_ptr); - my_free(_ALLOC_ID_, &xctx->wire[i].node); + my_free(635, &xctx->wire[i].prop_ptr); + my_free(636, &xctx->wire[i].node); found=1; j++; continue; @@ -125,7 +125,7 @@ void check_collapsing_objects() { if(xctx->line[c][i].x1==xctx->line[c][i].x2 && xctx->line[c][i].y1 == xctx->line[c][i].y2) { - my_free(_ALLOC_ID_, &xctx->line[c][i].prop_ptr); + my_free(637, &xctx->line[c][i].prop_ptr); found=1; j++; continue; @@ -144,7 +144,7 @@ void check_collapsing_objects() { if(xctx->rect[c][i].x1==xctx->rect[c][i].x2 || xctx->rect[c][i].y1 == xctx->rect[c][i].y2) { - my_free(_ALLOC_ID_, &xctx->rect[c][i].prop_ptr); + my_free(638, &xctx->rect[c][i].prop_ptr); set_rect_extraptr(0, &xctx->rect[c][i]); found=1; j++; @@ -296,8 +296,8 @@ void draw_selection(GC g, int interruptable) break; case POLYGON: { - double *x = my_malloc(_ALLOC_ID_, sizeof(double) *xctx->poly[c][n].points); - double *y = my_malloc(_ALLOC_ID_, sizeof(double) *xctx->poly[c][n].points); + double *x = my_malloc(639, sizeof(double) *xctx->poly[c][n].points); + double *y = my_malloc(640, sizeof(double) *xctx->poly[c][n].points); if(xctx->poly[c][n].sel==SELECTED || xctx->poly[c][n].sel==SELECTED1) { for(k=0;kpoly[c][n].points; k++) { if( xctx->poly[c][n].sel==SELECTED || xctx->poly[c][n].selected_point[k]) { @@ -317,8 +317,8 @@ void draw_selection(GC g, int interruptable) } drawtemppolygon(g, NOW, x, y, xctx->poly[c][n].points); } - my_free(_ALLOC_ID_, &x); - my_free(_ALLOC_ID_, &y); + my_free(641, &x); + my_free(642, &y); } break; @@ -497,7 +497,7 @@ void find_inst_to_be_redrawn(int what) dbg(1,"find_inst_to_be_redrawn(): what=%d\n", what); if(what & 16) { - my_free(_ALLOC_ID_, &xctx->inst_redraw_table); + my_free(643, &xctx->inst_redraw_table); xctx->inst_redraw_table_size = 0; if((s_pnetname || xctx->hilight_nets)) int_hash_free(&xctx->node_redraw_table); return; @@ -530,7 +530,7 @@ void find_inst_to_be_redrawn(int what) } /* if(!(what & 8)) */ if(!xctx->inst_redraw_table || xctx->instances > xctx->inst_redraw_table_size) { - my_realloc(_ALLOC_ID_, &xctx->inst_redraw_table, xctx->instances * sizeof(unsigned char)); + my_realloc(644, &xctx->inst_redraw_table, xctx->instances * sizeof(unsigned char)); xctx->inst_redraw_table_size = xctx->instances; } for(i=0; i < xctx->instances; i++) { @@ -631,11 +631,11 @@ void copy_objects(int what) xctx->move_rot = xctx->move_flip = 0; xctx->deltax = xctx->deltay = 0.; xctx->ui_state&=~STARTCOPY; - my_strdup(_ALLOC_ID_, &str, user_conf_dir); - my_strcat(_ALLOC_ID_, &str, "/.selection.sch"); + my_strdup(645, &str, user_conf_dir); + my_strcat(646, &str, "/.selection.sch"); xunlink(str); update_symbol_bboxes(0, 0); - my_free(_ALLOC_ID_, &str); + my_free(647, &str); } if(what & RUBBER) /* draw objects while moving */ { @@ -795,8 +795,8 @@ void copy_objects(int what) { xPoly *p = &xctx->poly[c][n]; double bx1 = 0.0, by1 = 0.0, bx2 = 0.0, by2 = 0.0; - double *x = my_malloc(_ALLOC_ID_, sizeof(double) *p->points); - double *y = my_malloc(_ALLOC_ID_, sizeof(double) *p->points); + double *x = my_malloc(648, sizeof(double) *p->points); + double *y = my_malloc(649, sizeof(double) *p->points); int j; for(j=0; jpoints; j++) { if( p->sel==SELECTED || p->selected_point[j]) { @@ -820,8 +820,8 @@ void copy_objects(int what) xctx->sel_array[i].n=xctx->polygons[c]; store_poly(-1, x, y, p->points, c, p->sel, p->prop_ptr); p->sel=0; - my_free(_ALLOC_ID_, &x); - my_free(_ALLOC_ID_, &y); + my_free(650, &x); + my_free(651, &y); } break; case ARC: @@ -893,7 +893,7 @@ void copy_objects(int what) xctx->text[n].x0, xctx->text[n].y0, xctx->rx1,xctx->ry1); } xctx->text[xctx->texts].txt_ptr=NULL; - my_strdup(_ALLOC_ID_, &xctx->text[xctx->texts].txt_ptr,xctx->text[n].txt_ptr); + my_strdup(652, &xctx->text[xctx->texts].txt_ptr,xctx->text[n].txt_ptr); xctx->text[n].sel=0; dbg(2, "copy_objects(): current str=%s\n", xctx->text[xctx->texts].txt_ptr); @@ -905,7 +905,7 @@ void copy_objects(int what) xctx->text[xctx->texts].sel=SELECTED; xctx->text[xctx->texts].prop_ptr=NULL; xctx->text[xctx->texts].font=NULL; - my_strdup(_ALLOC_ID_, &xctx->text[xctx->texts].prop_ptr, xctx->text[n].prop_ptr); + my_strdup(653, &xctx->text[xctx->texts].prop_ptr, xctx->text[n].prop_ptr); set_text_flags(&xctx->text[xctx->texts]); xctx->text[xctx->texts].xscale=xctx->text[n].xscale; xctx->text[xctx->texts].yscale=xctx->text[n].yscale; @@ -961,13 +961,13 @@ void copy_objects(int what) xctx->inst[xctx->instances].lab=NULL; xctx->inst[xctx->instances].node=NULL; xctx->inst[xctx->instances].name=NULL; - my_strdup2(_ALLOC_ID_, &xctx->inst[xctx->instances].name, xctx->inst[n].name); - my_strdup(_ALLOC_ID_, &xctx->inst[xctx->instances].prop_ptr, xctx->inst[n].prop_ptr); + my_strdup2(654, &xctx->inst[xctx->instances].name, xctx->inst[n].name); + my_strdup(655, &xctx->inst[xctx->instances].prop_ptr, xctx->inst[n].prop_ptr); /* - * my_strdup2(_ALLOC_ID_, &xctx->inst[xctx->instances].instname, get_tok_value(xctx->inst[n].prop_ptr, "name",0)); + * my_strdup2(656, &xctx->inst[xctx->instances].instname, get_tok_value(xctx->inst[n].prop_ptr, "name",0)); */ xctx->inst[xctx->instances].instname = NULL; /* will be set in new_prop_string() */ - my_strdup(_ALLOC_ID_, &xctx->inst[xctx->instances].lab, xctx->inst[n].lab); + my_strdup(657, &xctx->inst[xctx->instances].lab, xctx->inst[n].lab); xctx->inst[n].sel=0; xctx->inst[xctx->instances].embed = xctx->inst[n].embed; xctx->inst[xctx->instances].flags = xctx->inst[n].flags; diff --git a/src/netlist.c b/src/netlist.c index 0405a7b9..a26f0501 100644 --- a/src/netlist.c +++ b/src/netlist.c @@ -30,7 +30,7 @@ static void instdelete(int n, int x, int y) prevptr = &xctx->inst_spatial_table[x][y]; while( (*prevptr)->n != n) prevptr = &(*prevptr)->next; saveptr = (*prevptr)->next; - my_free(_ALLOC_ID_, prevptr); + my_free(658, prevptr); *prevptr = saveptr; } @@ -38,7 +38,7 @@ static void instinsert(int n, int x, int y) { Instentry *ptr, *newptr; ptr=xctx->inst_spatial_table[x][y]; - newptr=my_malloc(_ALLOC_ID_, sizeof(Instentry)); + newptr=my_malloc(659, sizeof(Instentry)); newptr->next=ptr; newptr->n=n; xctx->inst_spatial_table[x][y]=newptr; @@ -50,7 +50,7 @@ static Instentry *delinstentry(Instentry *t) Instentry *tmp; while( t ) { tmp = t->next; - my_free(_ALLOC_ID_, &t); + my_free(660, &t); t = tmp; } return NULL; @@ -132,7 +132,7 @@ static void instpindelete(int n,int pin, int x, int y) while(ptr) { if(ptr->n == n && ptr->pin == pin) { saveptr = ptr->next; - my_free(_ALLOC_ID_, &ptr); + my_free(661, &ptr); *prevptr = saveptr; return; } @@ -147,7 +147,7 @@ static void instpininsert(int n,int pin, double x0, double y0, int x, int y) Instpinentry *ptr, *newptr; ptr=xctx->instpin_spatial_table[x][y]; - newptr=my_malloc(_ALLOC_ID_, sizeof(Instpinentry)); + newptr=my_malloc(662, sizeof(Instpinentry)); newptr->next=ptr; newptr->n=n; newptr->x0=x0; @@ -164,7 +164,7 @@ static Instpinentry *delinstpinentry(Instpinentry *t) while(t) { tmp = t->next; - my_free(_ALLOC_ID_, &t); + my_free(663, &t); t = tmp; } return NULL; @@ -187,7 +187,7 @@ static void wiredelete(int n, int x, int y) prevptr = &xctx->wire_spatial_table[x][y]; while( (*prevptr)->n != n) prevptr = &(*prevptr)->next; saveptr = (*prevptr)->next; - my_free(_ALLOC_ID_, prevptr); + my_free(664, prevptr); *prevptr = saveptr; } @@ -196,7 +196,7 @@ static void wireinsert(int n, int x, int y) Wireentry *ptr, *newptr; ptr=xctx->wire_spatial_table[x][y]; - newptr=my_malloc(_ALLOC_ID_, sizeof(Wireentry)); + newptr=my_malloc(665, sizeof(Wireentry)); newptr->next=ptr; newptr->n=n; xctx->wire_spatial_table[x][y]=newptr; @@ -209,7 +209,7 @@ static Wireentry *delwireentry(Wireentry *t) while( t ) { tmp = t->next; - my_free(_ALLOC_ID_, &t); + my_free(666, &t); t = tmp; } return NULL; @@ -487,18 +487,18 @@ int record_global_node(int what, FILE *fp, char *node) if(what == 3) return 0; /* node is not a global */ if(max_globals>=size_globals) { size_globals+=CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &globals, size_globals*sizeof(char *) ); + my_realloc(667, &globals, size_globals*sizeof(char *) ); } globals[max_globals]=NULL; - my_strdup(_ALLOC_ID_, &globals[max_globals], node); + my_strdup(668, &globals[max_globals], node); max_globals++; } else if(what == 0 || what == 2) { for(i=0;inetlist_type == CAD_SPICE_NETLIST) fprintf(fp, ".GLOBAL %s\n", globals[i]); if(what == 0 && xctx->netlist_type == CAD_TEDAX_NETLIST) fprintf(fp, "__GLOBAL__ %s\n", globals[i]); - my_free(_ALLOC_ID_, &globals[i]); + my_free(669, &globals[i]); } - my_free(_ALLOC_ID_, &globals); + my_free(670, &globals); size_globals=max_globals=0; } return 0; @@ -535,7 +535,7 @@ int get_unnamed_node(int what, int mult,int node) dbg(2, "get_unnamed_node(): what=%d mult=%d node=%d\n", what, mult, node); if(what==0) { /* initialize unnamed node data structures */ xctx->new_node=0; - my_free(_ALLOC_ID_, &xctx->node_mult); + my_free(671, &xctx->node_mult); xctx->node_mult_size=0; return 0; } @@ -549,7 +549,7 @@ int get_unnamed_node(int what, int mult,int node) if(xctx->new_node >= xctx->node_mult_size) { /* enlarge array and zero it */ int oldsize = xctx->node_mult_size; xctx->node_mult_size = xctx->new_node + CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &xctx->node_mult, sizeof(xctx->node_mult[0]) * xctx->node_mult_size ); + my_realloc(672, &xctx->node_mult, sizeof(xctx->node_mult[0]) * xctx->node_mult_size ); memset(xctx->node_mult + oldsize, 0, (xctx->node_mult_size - oldsize) * sizeof(xctx->node_mult[0])); } xctx->node_mult[xctx->new_node]=mult; @@ -585,7 +585,7 @@ static void name_generics() dbg(2, "prepare_netlist_structs(): naming generics from attached labels\n"); if(for_netlist) for (i=0;isym)->type); + my_strdup(673, &type,(inst[i].ptr+ xctx->sym)->type); if(type && !IS_LABEL_OR_PIN(type) ) { if((generic_rects = (inst[i].ptr+ xctx->sym)->rects[GENERICLAYER]) > 0) { rects = (inst[i].ptr+ xctx->sym)->rects[PINLAYER]; @@ -609,12 +609,12 @@ static void name_generics() if((inst[n].ptr+ xctx->sym)->type && inst[n].node[p] != NULL && !strcmp((inst[n].ptr+ xctx->sym)->type, "label")) { dbg(2, "prepare_netlist_structs(): naming generic %s\n", inst[n].node[p]); - my_strdup(_ALLOC_ID_, &inst[i].node[j], get_tok_value(inst[n].prop_ptr,"value",0) ); + my_strdup(674, &inst[i].node[j], get_tok_value(inst[n].prop_ptr,"value",0) ); if(!for_netlist) { - my_strdup(_ALLOC_ID_, &sig_type,""); + my_strdup(675, &sig_type,""); bus_node_hash_lookup(inst[n].node[p],"", XINSERT, 1, sig_type,"", "",""); } else { - my_strdup(_ALLOC_ID_, &sig_type,get_tok_value( + my_strdup(676, &sig_type,get_tok_value( (inst[i].ptr+ xctx->sym)->rect[GENERICLAYER][j-rects].prop_ptr, "sig_type",0)); /* insert generic label in hash table as a port so it will not */ /* be declared as a signal in the vhdl netlist. this is a workaround */ @@ -630,7 +630,7 @@ static void name_generics() } /* end if( rects=...>0) */ } /* end if(type not a label nor pin)... */ } /* end for(i...) */ - if(type) my_free(_ALLOC_ID_, &type); + if(type) my_free(677, &type); } static void signal_short( const char *tag, const char *n1, const char *n2) @@ -659,7 +659,7 @@ static void set_inst_node(int i, int j, const char *node) dbg(1, "set_inst_node(): inst %s pin %d <-- %s\n", inst[i].instname, j, node); expandlabel(inst[i].instname, &inst_mult); - my_strdup(_ALLOC_ID_, &inst[i].node[j], node); + my_strdup(678, &inst[i].node[j], node); if(!for_netlist) { bus_node_hash_lookup(inst[i].node[j],"", XINSERT, 0,"","","",""); } else { @@ -741,8 +741,8 @@ static void wirecheck(int k) /* recursive routine */ touch(wire[n].x1, wire[n].y1, wire[n].x2, wire[n].y2, wire[k].x2, wire[k].y2); if( touches ) { if(!wire[n].node) { - my_strdup(_ALLOC_ID_, &wire[n].node, wire[k].node); - my_strdup(_ALLOC_ID_, &wire[n].prop_ptr, subst_token(wire[n].prop_ptr, "lab", wire[n].node)); + my_strdup(679, &wire[n].node, wire[k].node); + my_strdup(680, &wire[n].prop_ptr, subst_token(wire[n].prop_ptr, "lab", wire[n].node)); name_attached_inst_to_net(n, tmpi, tmpj); wirecheck(n); /* recursive check */ } else { @@ -762,8 +762,8 @@ static void name_attached_nets(double x0, double y0, int sqx, int sqy, const cha int n = wptr->n; if(touch(wire[n].x1, wire[n].y1, wire[n].x2, wire[n].y2, x0,y0)) { if(!wire[n].node) { - my_strdup(_ALLOC_ID_, &wire[n].node, node); - my_strdup(_ALLOC_ID_, &wire[n].prop_ptr, subst_token(wire[n].prop_ptr, "lab", wire[n].node)); + my_strdup(681, &wire[n].node, node); + my_strdup(682, &wire[n].prop_ptr, subst_token(wire[n].prop_ptr, "lab", wire[n].node)); wirecheck(n); } else { if(for_netlist>0) signal_short("Net", wire[n].node, node); @@ -812,8 +812,8 @@ static int find_pass_through_symbols(int what, int ninst) int *symtable = NULL; if(what == 0 ) { /* initialize */ - pt_symbol = my_calloc(_ALLOC_ID_, xctx->symbols, sizeof(int)); - symtable = my_calloc(_ALLOC_ID_, xctx->symbols, sizeof(int)); + pt_symbol = my_calloc(683, xctx->symbols, sizeof(int)); + symtable = my_calloc(684, xctx->symbols, sizeof(int)); for(i = 0; i < instances; i++) { k = inst[i].ptr; if( k < 0 || symtable[k] ) continue; @@ -829,13 +829,13 @@ static int find_pass_through_symbols(int what, int ninst) int_hash_free(&table); if(pt_symbol[k]) dbg(1, "duplicated pins: %s\n", xctx->sym[i].name); } - my_free(_ALLOC_ID_, &symtable); + my_free(685, &symtable); } else if(what ==1) { /* query */ k = inst[ninst].ptr; if(k >=0 && pt_symbol[k]) return 1; return 0; } else if(what ==2) { /* cleanup */ - my_free(_ALLOC_ID_, &pt_symbol); + my_free(686, &pt_symbol); } return -1; } @@ -855,7 +855,7 @@ static void instcheck(int n, int p) int k = inst[n].ptr; int rects = xctx->sym[k].rects[PINLAYER]; char *pin_name = NULL; - my_strdup(_ALLOC_ID_, &pin_name, get_tok_value(xctx->sym[k].rect[PINLAYER][p].prop_ptr, "name", 0)); + my_strdup(687, &pin_name, get_tok_value(xctx->sym[k].rect[PINLAYER][p].prop_ptr, "name", 0)); if(p >= rects) return; for(j = 0; j < rects; j++) { const char *other_pin; @@ -875,7 +875,7 @@ static void instcheck(int n, int p) } } } - my_free(_ALLOC_ID_, &pin_name); + my_free(688, &pin_name); } } @@ -911,7 +911,7 @@ static void name_nodes_of_pins_labels_and_propagate() /* name ipin opin label node fields from prop_ptr attributes */ if(inst[i].ptr<0) continue; - my_strdup(_ALLOC_ID_, &type,(inst[i].ptr+ xctx->sym)->type); + my_strdup(689, &type,(inst[i].ptr+ xctx->sym)->type); if(print_erc && (!inst[i].instname || !inst[i].instname[0]) && !get_tok_value((inst[i].ptr+ xctx->sym)->templ, "name", 0)[0] ) { @@ -950,28 +950,28 @@ static void name_nodes_of_pins_labels_and_propagate() strcmp(get_tok_value(inst[i].prop_ptr,"tedax_ignore",0),"true")==0 ) continue; } port=0; - my_strdup2(_ALLOC_ID_, &dir, ""); + my_strdup2(690, &dir, ""); if(strcmp(type,"label")) { /* instance is a port (not a label) */ port=1; /* 20071204 only define a dir property if instance is not a label */ if(for_netlist) - my_strdup2(_ALLOC_ID_, &dir, get_tok_value( (inst[i].ptr+ xctx->sym)->rect[PINLAYER][0].prop_ptr, "dir",0)); + my_strdup2(691, &dir, get_tok_value( (inst[i].ptr+ xctx->sym)->rect[PINLAYER][0].prop_ptr, "dir",0)); } else { /* handle global nodes (global=1 set as symbol property) 28032003 */ - my_strdup(_ALLOC_ID_, &global_node,get_tok_value((inst[i].ptr+ xctx->sym)->prop_ptr,"global",0)); + my_strdup(692, &global_node,get_tok_value((inst[i].ptr+ xctx->sym)->prop_ptr,"global",0)); /*20071204 if instance is a label dont define a dir property for more precise erc checking */ } /* obtain ipin/opin/label signal type (default: std_logic) */ if(for_netlist) { - my_strdup(_ALLOC_ID_, &sig_type,get_tok_value(inst[i].prop_ptr,"sig_type",0)); - my_strdup(_ALLOC_ID_, &verilog_type,get_tok_value(inst[i].prop_ptr,"verilog_type",0)); - my_strdup(_ALLOC_ID_, &value,get_tok_value(inst[i].prop_ptr,"value",0)); - my_strdup(_ALLOC_ID_, &class,get_tok_value(inst[i].prop_ptr,"class",0)); + my_strdup(693, &sig_type,get_tok_value(inst[i].prop_ptr,"sig_type",0)); + my_strdup(694, &verilog_type,get_tok_value(inst[i].prop_ptr,"verilog_type",0)); + my_strdup(695, &value,get_tok_value(inst[i].prop_ptr,"value",0)); + my_strdup(696, &class,get_tok_value(inst[i].prop_ptr,"class",0)); } - my_strdup(_ALLOC_ID_, &inst[i].node[0], inst[i].lab); + my_strdup(697, &inst[i].node[0], inst[i].lab); if(!(inst[i].node[0])) { - my_strdup(_ALLOC_ID_, &inst[i].node[0], get_tok_value((inst[i].ptr+ xctx->sym)->templ, "lab",0)); + my_strdup(698, &inst[i].node[0], get_tok_value((inst[i].ptr+ xctx->sym)->templ, "lab",0)); dbg(1, "prepare_netlist_structs(): no lab attr on instance, pick from symbol: %s\n", inst[i].node[0]); } /* handle global nodes (global=1 set as symbol property) 28032003 */ @@ -992,14 +992,14 @@ static void name_nodes_of_pins_labels_and_propagate() name_attached_inst(i, x0, y0, sqx, sqy, inst[i].node[0]); } /* if(type && ... */ } /* for(i=0;iwire[i].node, tmp_str); - my_strdup(_ALLOC_ID_, &xctx->wire[i].prop_ptr, subst_token(xctx->wire[i].prop_ptr, "lab", tmp_str)); + my_strdup(706, &xctx->wire[i].node, tmp_str); + my_strdup(707, &xctx->wire[i].prop_ptr, subst_token(xctx->wire[i].prop_ptr, "lab", tmp_str)); /* insert unnamed wire name in hash table */ bus_node_hash_lookup(tmp_str, "", XINSERT, 0,"","","",""); wirecheck(i); @@ -1081,7 +1081,7 @@ static void reset_node_data_and_rehash() (inst[i].ptr+ xctx->sym)->rects[GENERICLAYER]; if(rects > 0) { - inst[i].node = my_malloc(_ALLOC_ID_, sizeof(char *) * rects); + inst[i].node = my_malloc(708, sizeof(char *) * rects); for (j=0;j 0 ) { for(j=0;j< rects ;j++) - my_free(_ALLOC_ID_, &xctx->inst[i].node[j]); - my_free(_ALLOC_ID_, &xctx->inst[i].node ); + my_free(709, &xctx->inst[i].node[j]); + my_free(710, &xctx->inst[i].node ); } } @@ -1151,7 +1151,7 @@ void delete_netlist_structs(void) } for(i=0;iwires;i++) { - my_free(_ALLOC_ID_, &xctx->wire[i].node); + my_free(711, &xctx->wire[i].node); } /* erase inst and wire topological hash tables */ del_inst_pin_table(); @@ -1318,21 +1318,21 @@ int sym_vs_sch_pins() } load_ascii_string(&tmp,fd); symbol = match_symbol(name); - my_strdup(_ALLOC_ID_, &type, xctx->sym[symbol].type); + my_strdup(712, &type, xctx->sym[symbol].type); if(type && IS_PIN(type)) { - my_strdup(_ALLOC_ID_, &lab, expandlabel(get_tok_value(tmp, "lab", 0), &mult)); + my_strdup(713, &lab, expandlabel(get_tok_value(tmp, "lab", 0), &mult)); if(pin_cnt >= lab_array_size) { lab_array_size += CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &lab_array, lab_array_size * sizeof(char *)); + my_realloc(714, &lab_array, lab_array_size * sizeof(char *)); } lab_array[pin_cnt] = NULL; - my_strdup(_ALLOC_ID_, &(lab_array[pin_cnt]), lab); + my_strdup(715, &(lab_array[pin_cnt]), lab); pin_cnt++; pin_match = 0; for(j=0; j < rects; j++) { - my_strdup(_ALLOC_ID_, &pin_name, + my_strdup(716, &pin_name, expandlabel(get_tok_value(xctx->sym[i].rect[PINLAYER][j].prop_ptr, "name", 0), &mult)); - my_strdup(_ALLOC_ID_, &pin_dir, get_tok_value(xctx->sym[i].rect[PINLAYER][j].prop_ptr, "dir", 0)); + my_strdup(717, &pin_dir, get_tok_value(xctx->sym[i].rect[PINLAYER][j].prop_ptr, "dir", 0)); if( pin_name && !strcmp(pin_name, lab)) { if(!( ( !strcmp(type, "ipin") && !strcmp(pin_dir, "in") ) || @@ -1406,7 +1406,7 @@ int sym_vs_sch_pins() } } for(j=0; j < rects; j++) { - my_strdup(_ALLOC_ID_, &pin_name, + my_strdup(718, &pin_name, expandlabel(get_tok_value(xctx->sym[i].rect[PINLAYER][j].prop_ptr, "name", 0), &mult)); pin_match = 0; for(k=0; ksymbols > n_syms) remove_symbol(xctx->symbols - 1); diff --git a/src/node_hash.c b/src/node_hash.c index c412da84..0c4552aa 100644 --- a/src/node_hash.c +++ b/src/node_hash.c @@ -59,16 +59,16 @@ static Node_hashentry *node_hash_lookup(const char *token, const char *dir,int w if( what==XINSERT ) /* insert data */ { s=sizeof( Node_hashentry ); - entry=(Node_hashentry *)my_malloc(_ALLOC_ID_, s); + entry=(Node_hashentry *)my_malloc(726, s); entry->next = NULL; entry->token = entry->sig_type = entry->verilog_type = entry->value = entry->class = entry->orig_tok = NULL; - my_strdup(_ALLOC_ID_, &(entry->token),token); - if(sig_type &&sig_type[0]) my_strdup(_ALLOC_ID_, &(entry->sig_type), sig_type); - if(verilog_type &&verilog_type[0]) my_strdup(_ALLOC_ID_, &(entry->verilog_type), verilog_type); - if(class && class[0]) my_strdup(_ALLOC_ID_, &(entry->class), class); - if(orig_tok && orig_tok[0]) my_strdup(_ALLOC_ID_, &(entry->orig_tok), orig_tok); - if(value && value[0]) my_strdup(_ALLOC_ID_, &(entry->value), value); + my_strdup(727, &(entry->token),token); + if(sig_type &&sig_type[0]) my_strdup(728, &(entry->sig_type), sig_type); + if(verilog_type &&verilog_type[0]) my_strdup(729, &(entry->verilog_type), verilog_type); + if(class && class[0]) my_strdup(730, &(entry->class), class); + if(orig_tok && orig_tok[0]) my_strdup(731, &(entry->orig_tok), orig_tok); + if(value && value[0]) my_strdup(732, &(entry->value), value); entry->d.port=d.port; entry->d.in=d.in; entry->d.out=d.out; @@ -87,13 +87,13 @@ static Node_hashentry *node_hash_lookup(const char *token, const char *dir,int w if(what==XDELETE) /* remove token from the hash table ... */ { saveptr=entry->next; - my_free(_ALLOC_ID_, &entry->token); - my_free(_ALLOC_ID_, &entry->verilog_type); - my_free(_ALLOC_ID_, &entry->sig_type); - my_free(_ALLOC_ID_, &entry->class); - my_free(_ALLOC_ID_, &entry->orig_tok); - my_free(_ALLOC_ID_, &entry->value); - my_free(_ALLOC_ID_, &entry); + my_free(733, &entry->token); + my_free(734, &entry->verilog_type); + my_free(735, &entry->sig_type); + my_free(736, &entry->class); + my_free(737, &entry->orig_tok); + my_free(738, &entry->value); + my_free(739, &entry); *preventry=saveptr; return NULL; } @@ -104,11 +104,11 @@ static Node_hashentry *node_hash_lookup(const char *token, const char *dir,int w entry->d.out+=d.out; entry->d.inout+=d.inout; if(sig_type && sig_type[0] !='\0') - my_strdup(_ALLOC_ID_, &(entry->sig_type), sig_type); + my_strdup(740, &(entry->sig_type), sig_type); if(verilog_type && verilog_type[0] !='\0') - my_strdup(_ALLOC_ID_, &(entry->verilog_type), verilog_type); + my_strdup(741, &(entry->verilog_type), verilog_type); if(value && value[0] !='\0') - my_strdup(_ALLOC_ID_, &(entry->value), value); + my_strdup(742, &(entry->value), value); dbg(3, "node_hash_lookup(): hashing %s : value=%s\n\n", entry->token, entry->value? entry->value:"NULL"); return entry; @@ -132,12 +132,12 @@ Node_hashentry *bus_node_hash_lookup(const char *token, const char *dir, int wha if(token==NULL || token[0] == 0) return NULL; if( token[0] == '#') { - my_strdup(_ALLOC_ID_, &string, token); + my_strdup(743, &string, token); } else { dbg(3, "bus_node_hash_lookup(): expanding node: %s\n", token); - my_strdup(_ALLOC_ID_, &string, expandlabel(token,&mult)); + my_strdup(744, &string, expandlabel(token,&mult)); dbg(3, "bus_node_hash_lookup(): done expanding node: %s\n", token); } if(string==NULL) return NULL; @@ -159,7 +159,7 @@ Node_hashentry *bus_node_hash_lookup(const char *token, const char *dir, int wha string_ptr++; } /* if something found return first pointer */ - my_free(_ALLOC_ID_, &string); + my_free(745, &string); return ptr2; } @@ -169,13 +169,13 @@ static void node_hash_free_entry(Node_hashentry *entry) while(entry) { tmp = entry->next; - my_free(_ALLOC_ID_, &entry->token); - my_free(_ALLOC_ID_, &entry->verilog_type); - my_free(_ALLOC_ID_, &entry->sig_type); - my_free(_ALLOC_ID_, &entry->class); - my_free(_ALLOC_ID_, &entry->orig_tok); - my_free(_ALLOC_ID_, &entry->value); - my_free(_ALLOC_ID_, &entry); + my_free(746, &entry->token); + my_free(747, &entry->verilog_type); + my_free(748, &entry->sig_type); + my_free(749, &entry->class); + my_free(750, &entry->orig_tok); + my_free(751, &entry->value); + my_free(752, &entry); entry = tmp; } } @@ -278,9 +278,9 @@ void print_vhdl_signals(FILE *fd) dbg(2, "print_vhdl_signals(): node: %s mult: %d value=%s \n\n", ptr->token,mult, ptr->value?ptr->value:"NULL"); if( ptr->class && ptr->class[0] ) - my_strdup(_ALLOC_ID_, &class, ptr->class); + my_strdup(753, &class, ptr->class); else - my_strdup(_ALLOC_ID_, &class, "signal"); + my_strdup(754, &class, "signal"); if(mult>1) { for(j=mult-1;j>=0;j--) { fprintf(fd, "%s %s[%d] : ", class, ptr->token[0]=='#' ? ptr->token+1 : ptr->token,j); @@ -310,7 +310,7 @@ void print_vhdl_signals(FILE *fd) } } if(found) fprintf(fd, "\n" ); - my_free(_ALLOC_ID_, &class); + my_free(755, &class); } diff --git a/src/options.c b/src/options.c index 9b0461f2..c7753e04 100644 --- a/src/options.c +++ b/src/options.c @@ -71,11 +71,11 @@ static void check_opt(char *opt, char *optval, int type) } else if( (type == LONG && !strcmp("preinit", opt)) ) { dbg(1, "process_options(): passing tcl command to interpreter: %s\n", optval); - if(optval) my_strdup(_ALLOC_ID_, &cli_opt_preinit_command, optval); + if(optval) my_strdup(756, &cli_opt_preinit_command, optval); } else if( (type == LONG && !strcmp("tcl", opt)) ) { dbg(1, "process_options(): passing tcl command to interpreter: %s\n", optval); - if(optval) my_strdup(_ALLOC_ID_, &cli_opt_tcl_command, optval); + if(optval) my_strdup(757, &cli_opt_tcl_command, optval); } else if( (type == LONG && !strcmp("script", opt)) ) { dbg(1, "process_options(): passing tcl script file to interpreter: %s\n", optval); @@ -83,7 +83,7 @@ static void check_opt(char *opt, char *optval, int type) } else if( (type == LONG && !strcmp("command", opt)) ) { dbg(1, "process_options(): passing tcl command to interpreter: %s\n", optval); - if(optval) my_strdup(_ALLOC_ID_, &cli_opt_tcl_post_command, optval); + if(optval) my_strdup(758, &cli_opt_tcl_post_command, optval); } else if( (type == LONG && !strcmp("diff", opt)) ) { dbg(1, "process_options(): diff with: %s\n", optval); diff --git a/src/parselabel.l b/src/parselabel.l index aedb4931..f0aa29dc 100644 --- a/src/parselabel.l +++ b/src/parselabel.l @@ -66,7 +66,7 @@ extern int yylex(); void clear_expandlabel_data(void) { - my_free(_ALLOC_ID_, &dest_string.str); + my_free(759, &dest_string.str); } static void str_char_replace(char s[], char chr, char repl_chr) @@ -95,7 +95,7 @@ void parse(const char *s) const char *expandlabel(const char *s, int *m) { YY_BUFFER_STATE buf; - my_free(_ALLOC_ID_, &dest_string.str); /* 30102004 delete 'memory' of previous execution */ + my_free(760, &dest_string.str); /* 30102004 delete 'memory' of previous execution */ if(dbg_var >= 3) fprintf(errfp, "expandlabel(): entering\n"); buf=yy_scan_string(s); @@ -106,13 +106,13 @@ const char *expandlabel(const char *s, int *m) size_t l; yyparse_error = -1; l = strlen(s)+400; - cmd = my_malloc(_ALLOC_ID_, l); + cmd = my_malloc(761, l); fprintf(errfp, "syntax error in %s\n", s); my_snprintf(cmd, l, "tk_messageBox -icon error -type ok -parent [xschem get topwindow] " "-message {Syntax error in identifier expansion: %s\nschematic:\n%s}", s, xctx->sch[xctx->currsch]); if(has_x) tcleval(cmd); - my_free(_ALLOC_ID_, &cmd); + my_free(762, &cmd); } if(dbg_var >= 3) @@ -209,14 +209,14 @@ ID_EXT_PARENTHESIS ([-~"#+/=_a-zA-Z][-#!@\\/:.=_+a-zA-Z0-9]*\([-~"#!@\\/:.=_+a-z /* recognize AA[aa:bb:33] or AA[33:cc:dd] or AA[aa..bb..11] .... */ ({IDX_ID}{DDOT}{IDX_ID_N}{DDOT}{IDX_ID_N})|({IDX_ID_N}{DDOT}{IDX_ID}{DDOT}{IDX_ID_N})|({IDX_ID_N}{DDOT}{IDX_ID_N}{DDOT}{IDX_ID}) { yylval.ptr.str=NULL; - my_strdup(_ALLOC_ID_, &yylval.ptr.str, yytext); + my_strdup(763, &yylval.ptr.str, yytext); if(dbg_var >= 3) fprintf(errfp, "yylex(): B_NAME3: |%s|\n", yytext); return B_NAME; } ({IDX_ID}{CLN}{IDX_ID_N}{CLN}{IDX_ID_N})|({IDX_ID_N}{CLN}{IDX_ID}{CLN}{IDX_ID_N})|({IDX_ID_N}{CLN}{IDX_ID_N}{CLN}{IDX_ID}) { yylval.ptr.str=NULL; - my_strdup(_ALLOC_ID_, &yylval.ptr.str, yytext); + my_strdup(764, &yylval.ptr.str, yytext); if(dbg_var >= 3) fprintf(errfp, "yylex(): B_NAME2: |%s|\n", yytext); return B_NAME; } @@ -224,7 +224,7 @@ ID_EXT_PARENTHESIS ([-~"#+/=_a-zA-Z][-#!@\\/:.=_+a-zA-Z0-9]*\([-~"#!@\\/:.=_+a-z /* recognize AA[width-1:0], AA[0:width-1], AA[width-1..4], AA[3..width+3], AA[aa:bb] AA[aa..bb] */ ({IDX_ID}{CLN}{IDX_ID_N})|({IDX_ID_N}{CLN}{IDX_ID})|({IDX_ID}{DDOT}{IDX_ID_N})|({IDX_ID_N}{DDOT}{IDX_ID}) { yylval.ptr.str=NULL; - my_strdup(_ALLOC_ID_, &yylval.ptr.str, yytext); + my_strdup(765, &yylval.ptr.str, yytext); if(dbg_var >= 3) fprintf(errfp, "yylex(): B_NAME1: |%s|\n", yytext); return B_NAME; } @@ -234,7 +234,7 @@ ID_EXT_PARENTHESIS ([-~"#+/=_a-zA-Z][-#!@\\/:.=_+a-zA-Z0-9]*\([-~"#!@\\/:.=_+a-z ^\*.* { yylval.ptr.str=NULL; /*19102004 */ if(dbg_var >= 3) fprintf(errfp, "yylex(): B_LINE: |%s|\n",yytext); - my_strdup(_ALLOC_ID_, &yylval.ptr.str, yytext); /* freed after use in expandlabel.y */ + my_strdup(766, &yylval.ptr.str, yytext); /* freed after use in expandlabel.y */ BEGIN(INITIAL); return B_LINE; } @@ -248,7 +248,7 @@ ID_EXT_PARENTHESIS ([-~"#+/=_a-zA-Z][-#!@\\/:.=_+a-zA-Z0-9]*\([-~"#!@\\/:.=_+a-z /* a number: if not a multiplier nor a node index return as a node name */ {INT} { yylval.ptr.str=NULL; - my_strdup(_ALLOC_ID_, &yylval.ptr.str, yytext); + my_strdup(767, &yylval.ptr.str, yytext); if(dbg_var >= 3) fprintf(errfp, "yylex(): B_NAME4: |%s|\n", yytext); BEGIN(INITIAL); return B_NAME; @@ -267,7 +267,7 @@ ID_EXT_PARENTHESIS ([-~"#+/=_a-zA-Z][-#!@\\/:.=_+a-zA-Z0-9]*\([-~"#!@\\/:.=_+a-z /* recognize the most esotheric identifiers */ {ID_NUM}|{ID_EXT_PARENTHESIS} { yylval.ptr.str=NULL;/*19102004 */ - my_strdup(_ALLOC_ID_, &yylval.ptr.str, yytext); /* freed after use in expandlabel.y */ + my_strdup(768, &yylval.ptr.str, yytext); /* freed after use in expandlabel.y */ if(dbg_var >= 3) fprintf(errfp, "yylex(): B_NAME0: |%s|\n", yytext); BEGIN(INITIAL); return B_NAME; diff --git a/src/paste.c b/src/paste.c index 219adf4e..7b5a1fba 100644 --- a/src/paste.c +++ b/src/paste.c @@ -64,7 +64,7 @@ static void merge_wire(FILE *fd) } load_ascii_string( &ptr, fd); storeobject(-1, x1,y1,x2,y2,WIRE,0,SELECTED,ptr); - my_free(_ALLOC_ID_, &ptr); + my_free(769, &ptr); select_wire(i, SELECTED, 1); } @@ -177,17 +177,17 @@ static void merge_polygon(FILE *fd) ptr[i].y=NULL; ptr[i].selected_point=NULL; ptr[i].prop_ptr=NULL; - ptr[i].x = my_calloc(_ALLOC_ID_, points, sizeof(double)); - ptr[i].y = my_calloc(_ALLOC_ID_, points, sizeof(double)); - ptr[i].selected_point= my_calloc(_ALLOC_ID_, points, sizeof(unsigned short)); + ptr[i].x = my_calloc(770, points, sizeof(double)); + ptr[i].y = my_calloc(771, points, sizeof(double)); + ptr[i].selected_point= my_calloc(772, points, sizeof(unsigned short)); ptr[i].points=points; ptr[i].sel=0; for(j=0;jinst[i].name, rel_sym_path(tmp)); - else my_strdup(_ALLOC_ID_, &xctx->inst[i].name,tmp); + if(tmp[0] == '/') my_strdup(776, &xctx->inst[i].name, rel_sym_path(tmp)); + else my_strdup(777, &xctx->inst[i].name,tmp); #else - my_strdup(_ALLOC_ID_, &xctx->inst[i].name, rel_sym_path(tmp)); + my_strdup(778, &xctx->inst[i].name, rel_sym_path(tmp)); #endif - my_free(_ALLOC_ID_, &tmp); + my_free(779, &tmp); if(fscanf(fd, "%lf %lf %hd %hd",&xctx->inst[i].x0, &xctx->inst[i].y0,&xctx->inst[i].rot, &xctx->inst[i].flip) < 4) { fprintf(errfp,"WARNING: missing fields for INSTANCE object, ignoring.\n"); read_line(fd, 0); @@ -284,7 +284,7 @@ static void merge_inst(int k,FILE *fd) if(!strcmp(get_tok_value(xctx->inst[i].prop_ptr,"highlight",0), "true")) xctx->inst[i].flags |= HILIGHT_CONN; xctx->inst[i].embed = !strcmp(get_tok_value(xctx->inst[i].prop_ptr, "embed", 2), "true"); - my_free(_ALLOC_ID_, &prop_ptr); + my_free(780, &prop_ptr); xctx->instances++; set_modify(1); } @@ -407,7 +407,7 @@ void merge_file(int selection_load, const char ext[]) xctx->mousex_snap = 0.; xctx->mousey_snap = 0.; } - my_free(_ALLOC_ID_, &aux_ptr); + my_free(781, &aux_ptr); link_symbols_to_instances(old); /* in case of paste/merge will set instances .sel to SELECTED */ fclose(fd); xctx->ui_state |= STARTMERGE; diff --git a/src/psprint.c b/src/psprint.c index 3e5e96ca..e544a885 100644 --- a/src/psprint.c +++ b/src/psprint.c @@ -127,8 +127,8 @@ void ps_drawPNG(xRect* r, double x1, double y1, double x2, double y2, int rot, i quality_attr = get_tok_value(r->prop_ptr, "jpg_quality", 0); if(quality_attr[0]) quality = atoi(quality_attr); } - my_strdup(_ALLOC_ID_, &filter, get_tok_value(r->prop_ptr, "filter", 0)); - image_data_len = my_strdup2(_ALLOC_ID_, &image_data64_ptr, get_tok_value(r->prop_ptr, "image_data", 0)); + my_strdup(782, &filter, get_tok_value(r->prop_ptr, "filter", 0)); + image_data_len = my_strdup2(783, &image_data64_ptr, get_tok_value(r->prop_ptr, "image_data", 0)); if (filter) { size_t filtersize = 0; @@ -136,13 +136,13 @@ void ps_drawPNG(xRect* r, double x1, double y1, double x2, double y2, int rot, i closure.buffer = NULL; filterdata = (char*)base64_decode(image_data64_ptr, image_data_len, &filtersize); filter_data(filterdata, filtersize, (char**)&closure.buffer, &data_size, filter); - my_free(_ALLOC_ID_, &filterdata); + my_free(784, &filterdata); } else { closure.buffer = base64_decode(image_data64_ptr, image_data_len, &data_size); } - my_free(_ALLOC_ID_, &filter); - my_free(_ALLOC_ID_, &image_data64_ptr); + my_free(785, &filter); + my_free(786, &image_data64_ptr); closure.pos = 0; closure.size = data_size; /* should not be necessary */ surface = cairo_image_surface_create_from_png_stream(png_reader, &closure); @@ -151,7 +151,7 @@ void ps_drawPNG(xRect* r, double x1, double y1, double x2, double y2, int rot, i png_size_y = cairo_image_surface_get_height(surface); cairo_surface_flush(surface); - my_free(_ALLOC_ID_, &closure.buffer); + my_free(787, &closure.buffer); png_data = cairo_image_surface_get_data(surface); invertImage = !strcmp(get_tok_value(r->prop_ptr, "InvertOnExport", 0), "true"); @@ -245,7 +245,7 @@ void ps_drawPNG(xRect* r, double x1, double y1, double x2, double y2, int rot, i fprintf(fd, "grestore\n"); cairo_surface_destroy(surface); - my_free(_ALLOC_ID_, &ascii85EncodedJpeg); + my_free(788, &ascii85EncodedJpeg); free(jpgData); #endif } @@ -377,7 +377,7 @@ void ps_embedded_graph(xRect* r, double rx1, double ry1, double rx2, double ry2) fprintf(fd, "grestore\n"); - my_free(_ALLOC_ID_, &ascii85EncodedJpeg); + my_free(789, &ascii85EncodedJpeg); #endif } @@ -671,7 +671,7 @@ static void ps_draw_string(int layer, const char *str, short rot, short flip, in if(rot == 3 && flip == 1 ) { x=textx1;} } llength=0; - my_strdup2(_ALLOC_ID_, &sss, str); + my_strdup2(790, &sss, str); tt=ss=sss; for(;;) { c=*ss; @@ -689,7 +689,7 @@ static void ps_draw_string(int layer, const char *str, short rot, short flip, in } ss++; } - my_free(_ALLOC_ID_, &sss); + my_free(791, &sss); } static void old_ps_draw_string(int gctext, const char *str, @@ -854,16 +854,16 @@ static void ps_draw_symbol(int n,int layer, int what, short tmp_flip, short rot, polygon = ((xctx->inst[n].ptr+ xctx->sym)->poly[layer])[j]; { /* scope block so we declare some auxiliary arrays for coord transforms. 20171115 */ int k; - double *x = my_malloc(_ALLOC_ID_, sizeof(double) * polygon.points); - double *y = my_malloc(_ALLOC_ID_, sizeof(double) * polygon.points); + double *x = my_malloc(792, sizeof(double) * polygon.points); + double *y = my_malloc(793, sizeof(double) * polygon.points); for(k=0;k 0) { *olen += n; @@ -147,14 +147,14 @@ int filter_data(const char *din, const size_t ilen, oalloc = *olen + bufsize + 1; /* add extra space for final '\0' */ oalloc = ((oalloc << 2) + oalloc) >> 2; /* size up 1.25x */ dbg(1, "filter_data() read %ld bytes, reallocate dout to %ld bytes, bufsize=%ld\n", n, oalloc, bufsize); - my_realloc(_ALLOC_ID_, dout, oalloc); + my_realloc(801, dout, oalloc); } } if(*olen) (*dout)[*olen] = '\0'; /* so (if ascii) it can be used as a string */ } if(n < 0 || !*olen) { if(oalloc) { - my_free(_ALLOC_ID_, dout); + my_free(802, dout); *olen = 0; } fprintf(stderr, "no data read\n"); @@ -202,7 +202,7 @@ char *base64_encode(const unsigned char *data, const size_t input_length, size_t *output_length = 4 * ((input_length + 2) / 3); alloc_length = (1 + (*output_length / 4096)) * 4096; - encoded_data = my_malloc(_ALLOC_ID_, alloc_length); + encoded_data = my_malloc(803, alloc_length); if (encoded_data == NULL) return NULL; cnt = 0; @@ -214,7 +214,7 @@ char *base64_encode(const unsigned char *data, const size_t input_length, size_t if(j + 10 >= alloc_length) { dbg(1, "alloc-length=%ld, j=%d, output_length=%ld\n", alloc_length, j, *output_length); alloc_length += 4096; - my_realloc(_ALLOC_ID_, &encoded_data, alloc_length); + my_realloc(804, &encoded_data, alloc_length); } if(brk && ( (cnt & 31) == 0) ) { *output_length += 1; @@ -261,7 +261,7 @@ unsigned char *base64_decode(const char *data, const size_t input_length, size_t padding = 0; if (data[input_length - 1] == '=') padding++; if (data[input_length - 2] == '=') padding++; - decoded_data = my_malloc(_ALLOC_ID_, *output_length); + decoded_data = my_malloc(805, *output_length); if (decoded_data == NULL) return NULL; cnt = 0; for (i = 0, j = 0; i < input_length;) { @@ -304,12 +304,12 @@ unsigned char *ascii85_encode(const unsigned char *data, const size_t input_leng int padding = (4-(input_length % 4))%4; static unsigned int pow85[] = {1, 85, 7225, 614125, 52200625}; - unsigned char *paddedData = my_calloc(_ALLOC_ID_, input_length+padding, 1); + unsigned char *paddedData = my_calloc(806, input_length+padding, 1); unsigned char *encoded_data; int i, idx = 0; memcpy( paddedData, data, input_length); *output_length = 5*(input_length+padding)/4; - encoded_data = my_malloc(_ALLOC_ID_, *output_length +1); + encoded_data = my_malloc(807, *output_length +1); encoded_data[*output_length]=0; for (i = 0; i < input_length+padding; i+=4) { @@ -342,7 +342,7 @@ unsigned char *ascii85_encode(const unsigned char *data, const size_t input_leng encoded_data[idx]=b85_enc[encoded_data[idx]]; idx++; } - my_free(_ALLOC_ID_, &paddedData); + my_free(808, &paddedData); *output_length-=padding; encoded_data[*output_length]=0; return encoded_data; @@ -367,11 +367,11 @@ static void read_binary_block(FILE *fd) } /* read buffer */ - tmp = my_calloc(_ALLOC_ID_, xctx->graph_nvars, (sizeof(double *) )); + tmp = my_calloc(809, xctx->graph_nvars, (sizeof(double *) )); /* allocate storage for binary block, add one data column for custom data plots */ - if(!xctx->graph_values) xctx->graph_values = my_calloc(_ALLOC_ID_, xctx->graph_nvars + 1, sizeof(SPICE_DATA *)); + if(!xctx->graph_values) xctx->graph_values = my_calloc(810, xctx->graph_nvars + 1, sizeof(SPICE_DATA *)); for(p = 0 ; p <= xctx->graph_nvars; p++) { - my_realloc(_ALLOC_ID_, + my_realloc(811, &xctx->graph_values[p], (offset + xctx->graph_npoints[xctx->graph_datasets]) * sizeof(SPICE_DATA)); } /* read binary block */ @@ -399,7 +399,7 @@ static void read_binary_block(FILE *fd) xctx->graph_values[v][offset + p] = (float)tmp[v]; } } - my_free(_ALLOC_ID_, &tmp); + my_free(812, &tmp); } /* parse ascii raw header section: @@ -436,7 +436,7 @@ static int read_dataset(FILE *fd, const char *type) xctx->graph_sim_type = NULL; dbg(1, "read_dataset(): type=%s\n", type ? type : ""); while((line = my_fgets(fd))) { - my_strdup2(_ALLOC_ID_, &lowerline, line); + my_strdup2(813, &lowerline, line); strtolower(lowerline); /* this is an ASCII raw file. We don't handle this (yet) */ if(!strcmp(line, "Values:\n") || !strcmp(line, "Values:\r\n")) { @@ -514,7 +514,7 @@ static int read_dataset(FILE *fd, const char *type) return 1; } if(xctx->graph_sim_type) { - my_realloc(_ALLOC_ID_, &xctx->graph_npoints, (xctx->graph_datasets+1) * sizeof(int)); + my_realloc(814, &xctx->graph_npoints, (xctx->graph_datasets+1) * sizeof(int)); xctx->graph_npoints[xctx->graph_datasets] = npoints; /* multi-point OP is equivalent to a DC sweep. Change xctx->graph_sim_type */ if(xctx->graph_npoints[xctx->graph_datasets] > 1 && !strcmp(xctx->graph_sim_type, "op") ) { @@ -551,7 +551,7 @@ static int read_dataset(FILE *fd, const char *type) return 1; } if(xctx->graph_sim_type) { - my_realloc(_ALLOC_ID_, &xctx->graph_npoints, (xctx->graph_datasets+1) * sizeof(int)); + my_realloc(815, &xctx->graph_npoints, (xctx->graph_datasets+1) * sizeof(int)); xctx->graph_npoints[xctx->graph_datasets] = npoints; /* multi-point OP is equivalent to a DC sweep. Change xctx->graph_sim_type */ if(xctx->graph_npoints[xctx->graph_datasets] > 1 && !strcmp(xctx->graph_sim_type, "op") ) { @@ -561,8 +561,8 @@ static int read_dataset(FILE *fd, const char *type) } if(xctx->graph_sim_type && !done_header && variables) { /* get the list of lines with index and node name */ - if(!xctx->graph_names) xctx->graph_names = my_calloc(_ALLOC_ID_, xctx->graph_nvars, sizeof(char *)); - my_realloc(_ALLOC_ID_, &varname, strlen(line) + 1) ; + if(!xctx->graph_names) xctx->graph_names = my_calloc(816, xctx->graph_nvars, sizeof(char *)); + my_realloc(817, &varname, strlen(line) + 1) ; n = sscanf(line, "%d %s", &i, varname); /* read index and name of saved waveform */ if(n < 2) { dbg(0, "read_dataset(): WAARNING: malformed raw file, aborting\n"); @@ -577,7 +577,7 @@ static int read_dataset(FILE *fd, const char *type) ptr++; } if(xctx->graph_sim_type && !strcmp(xctx->graph_sim_type, "ac")) { /* AC */ - my_strcat(_ALLOC_ID_, &xctx->graph_names[i << 1], varname); + my_strcat(818, &xctx->graph_names[i << 1], varname); int_hash_lookup(&xctx->graph_raw_table, xctx->graph_names[i << 1], (i << 1), XINSERT_NOREPLACE); if(strstr(varname, "v(") == varname || strstr(varname, "i(") == varname) my_mstrcat(664, &xctx->graph_names[(i << 1) + 1], "ph(", varname + 2, NULL); @@ -585,7 +585,7 @@ static int read_dataset(FILE *fd, const char *type) my_mstrcat(540, &xctx->graph_names[(i << 1) + 1], "ph(", varname, ")", NULL); int_hash_lookup(&xctx->graph_raw_table, xctx->graph_names[(i << 1) + 1], (i << 1) + 1, XINSERT_NOREPLACE); } else { - my_strcat(_ALLOC_ID_, &xctx->graph_names[i], varname); + my_strcat(819, &xctx->graph_names[i], varname); int_hash_lookup(&xctx->graph_raw_table, xctx->graph_names[i], i, XINSERT_NOREPLACE); } /* use hash table to store index number of variables */ @@ -595,10 +595,10 @@ static int read_dataset(FILE *fd, const char *type) if(xctx->graph_sim_type && !strncmp(line, "Variables:", 10)) { variables = 1 ; } - my_free(_ALLOC_ID_, &line); + my_free(820, &line); } /* while((line = my_fgets(fd)) */ - my_free(_ALLOC_ID_, &lowerline); - my_free(_ALLOC_ID_, &varname); + my_free(821, &lowerline); + my_free(822, &varname); if(exit_status == 0 && xctx->graph_datasets && xctx->graph_npoints) { dbg(dbglev, "raw file read: datasets=%d, last dataset points=%d, nvars=%d\n", xctx->graph_datasets, xctx->graph_npoints[xctx->graph_datasets-1], xctx->graph_nvars); @@ -615,21 +615,21 @@ void free_rawfile(int dr) if(xctx->graph_names) { deleted = 1; for(i = 0 ; i < xctx->graph_nvars; i++) { - my_free(_ALLOC_ID_, &xctx->graph_names[i]); + my_free(823, &xctx->graph_names[i]); } - my_free(_ALLOC_ID_, &xctx->graph_names); + my_free(824, &xctx->graph_names); } if(xctx->graph_values) { deleted = 1; /* free also extra column for custom data plots */ for(i = 0 ; i <= xctx->graph_nvars; i++) { - my_free(_ALLOC_ID_, &xctx->graph_values[i]); + my_free(825, &xctx->graph_values[i]); } - my_free(_ALLOC_ID_, &xctx->graph_values); + my_free(826, &xctx->graph_values); } - if(xctx->graph_npoints) my_free(_ALLOC_ID_, &xctx->graph_npoints); + if(xctx->graph_npoints) my_free(827, &xctx->graph_npoints); xctx->graph_allpoints = 0; - if(xctx->graph_raw_schname) my_free(_ALLOC_ID_, &xctx->graph_raw_schname); + if(xctx->graph_raw_schname) my_free(828, &xctx->graph_raw_schname); xctx->graph_raw_level = -1; tclsetintvar("graph_raw_level", -1); xctx->graph_datasets = 0; @@ -652,11 +652,11 @@ char *base64_from_file(const char *f, size_t *length) len = st.st_size; fd = fopen(f, fopen_read_mode); if(fd) { - s = my_malloc(_ALLOC_ID_, len); + s = my_malloc(829, len); fread(s, len, 1, fd); fclose(fd); b64s = base64_encode(s, len, length, 1); - my_free(_ALLOC_ID_, &s); + my_free(830, &s); } else { dbg(0, "base64_from_file(): failed to open file %s for reading\n", f); @@ -688,7 +688,7 @@ int raw_read_from_attr(const char *type) s = base64_decode(b64_spice_data, length, &decoded_length); fwrite(s, decoded_length, 1, fd); fclose(fd); - my_free(_ALLOC_ID_, &s); + my_free(831, &s); res = raw_read(tmp_filename, type); unlink(tmp_filename); } else { @@ -713,7 +713,7 @@ int raw_read(const char *f, const char *type) if(fd) { if((res = read_dataset(fd, type)) == 1) { int i; - my_strdup2(_ALLOC_ID_, &xctx->graph_raw_schname, xctx->sch[xctx->currsch]); + my_strdup2(832, &xctx->graph_raw_schname, xctx->sch[xctx->currsch]); xctx->graph_raw_level = xctx->currsch; tclsetintvar("graph_raw_level", xctx->currsch); xctx->graph_allpoints = 0; @@ -780,7 +780,10 @@ int table_read(const char *f) /* read data line by line */ while((line = my_fgets(fd))) { int empty = 1; - if(line[0] == '#') continue; /* skip comments */ + if(line[0] == '#') { + my_free(833, &line); + continue; /* skip comments */ + } line_ptr = line; while(*line_ptr) { /* non empty line ? */ if(*line_ptr != ' ' && *line_ptr != '\t' && *line_ptr != '\n') empty = 0; @@ -789,9 +792,11 @@ int table_read(const char *f) if(empty && prev_empty) { /* second empty line: start new dataset */ xctx->graph_datasets++; dataset_points = 0; + my_free(834, &line); continue; } else if(empty) { prev_empty = 1; + my_free(835, &line); continue; } prev_empty = 0; @@ -801,12 +806,12 @@ int table_read(const char *f) line_ptr = NULL; dbg(1,"%s ", line_tok); if(nline == 0) { /* header line */ - my_realloc(_ALLOC_ID_, &xctx->graph_names, (field + 1) * sizeof(char *)); + my_realloc(836, &xctx->graph_names, (field + 1) * sizeof(char *)); xctx->graph_names[field] = NULL; - my_strcat(_ALLOC_ID_, &xctx->graph_names[field], line_tok); + my_strcat(837, &xctx->graph_names[field], line_tok); int_hash_lookup(&xctx->graph_raw_table, xctx->graph_names[field], field, XINSERT_NOREPLACE); } else { /* data line */ - my_realloc(_ALLOC_ID_, &xctx->graph_values[field], (npoints + 1) * sizeof(SPICE_DATA)); + my_realloc(838, &xctx->graph_values[field], (npoints + 1) * sizeof(SPICE_DATA)); xctx->graph_values[field][npoints] = (float)atof(line_tok); xctx->graph_npoints[xctx->graph_datasets - 1] = dataset_points + 1; } @@ -820,15 +825,16 @@ int table_read(const char *f) dbg(1, "\n"); nline++; if(nline == 1) { - xctx->graph_values = my_calloc(_ALLOC_ID_, xctx->graph_nvars + 1, sizeof(SPICE_DATA *)); - my_realloc(_ALLOC_ID_, &xctx->graph_npoints, (xctx->graph_datasets+1) * sizeof(int)); + xctx->graph_values = my_calloc(839, xctx->graph_nvars + 1, sizeof(SPICE_DATA *)); + my_realloc(840, &xctx->graph_npoints, (xctx->graph_datasets+1) * sizeof(int)); xctx->graph_datasets++; } + my_free(841, &line); } xctx->graph_allpoints = 0; if(res == 1) { int i; - my_strdup2(_ALLOC_ID_, &xctx->graph_raw_schname, xctx->sch[xctx->currsch]); + my_strdup2(842, &xctx->graph_raw_schname, xctx->sch[xctx->currsch]); xctx->graph_raw_level = xctx->currsch; tclsetintvar("graph_raw_level", xctx->currsch); xctx->graph_allpoints = 0; @@ -842,7 +848,6 @@ int table_read(const char *f) dbg(0, "table_read(): no useful data found\n"); } fclose(fd); - my_free(_ALLOC_ID_, &line); return res; } dbg(0, "raw_read(): failed to open file %s for reading\n", f); @@ -899,18 +904,18 @@ static double ravg_store(int what , int i, int p, int last, double value) } else if(what == 1) { if(i >= imax) { int new_size = i + 4; - my_realloc(_ALLOC_ID_, &arr, sizeof(double *) * new_size); + my_realloc(843, &arr, sizeof(double *) * new_size); for(j = imax; j < new_size; j++) { - arr[j] = my_calloc(_ALLOC_ID_, last + 1, sizeof(double)); + arr[j] = my_calloc(844, last + 1, sizeof(double)); } imax = new_size; } arr[i][p] = value; } else if(what == 0 && imax) { for(j = 0; j < imax; j++) { - my_free(_ALLOC_ID_, &arr[j]); + my_free(845, &arr[j]); } - my_free(_ALLOC_ID_, &arr); + my_free(846, &arr); imax = 0; } return 0.0; @@ -968,13 +973,13 @@ int plot_raw_custom_data(int sweep_idx, int first, int last, const char *expr) SPICE_DATA *x = xctx->graph_values[sweep_idx]; SPICE_DATA *sweepx = xctx->graph_values[0]; - my_strdup2(_ALLOC_ID_, &ntok_copy, expr); + my_strdup2(847, &ntok_copy, expr); ntok_ptr = ntok_copy; dbg(1, "plot_raw_custom_data(): expr=%s\n", expr); while( (n = my_strtok_r(ntok_ptr, " \t\n", "", &ntok_save)) ) { if(stackptr1 >= STACKMAX -2) { dbg(0, "stack overflow in graph expression parsing. Interrupted\n"); - my_free(_ALLOC_ID_, &ntok_copy); + my_free(848, &ntok_copy); return -1; } ntok_ptr = NULL; @@ -1028,7 +1033,7 @@ int plot_raw_custom_data(int sweep_idx, int first, int last, const char *expr) idx = get_raw_index(n); if(idx == -1) { dbg(1, "plot_raw_custom_data(): no data found: %s\n", n); - my_free(_ALLOC_ID_, &ntok_copy); + my_free(849, &ntok_copy); return -1; /* no data found in raw file */ } stack1[stackptr1].i = SPICE_NODE; @@ -1037,7 +1042,7 @@ int plot_raw_custom_data(int sweep_idx, int first, int last, const char *expr) } dbg(1, " plot_raw_custom_data(): stack1= %d\n", stack1[stackptr1 - 1].i); } /* while(n = my_strtok_r(...) */ - my_free(_ALLOC_ID_, &ntok_copy); + my_free(850, &ntok_copy); for(p = first ; p <= last; p++) { stackptr2 = 0; for(i = 0; i < stackptr1; i++) { @@ -1369,7 +1374,7 @@ void read_record(int firstchar, FILE *fp, int dbg_level) } } dbg(dbg_level, "END SKIP RECORD\n"); - my_free(_ALLOC_ID_, &str); + my_free(851, &str); } /* skip line of text from file, stopping before '\n' or EOF */ @@ -1498,7 +1503,7 @@ void save_ascii_string(const char *ptr, FILE *fd, int newline) if(ptr == NULL) { if( fd == NULL) { /* used to clear static data */ - my_free(_ALLOC_ID_, &strbuf); + my_free(852, &strbuf); strbuf_size = 0; return; } @@ -1507,11 +1512,11 @@ void save_ascii_string(const char *ptr, FILE *fd, int newline) return; } len = strlen(ptr) + CADCHUNKALLOC; - if(strbuf_size < len ) my_realloc(_ALLOC_ID_, &strbuf, (strbuf_size = len)); + if(strbuf_size < len ) my_realloc(853, &strbuf, (strbuf_size = len)); strbuf[strbuf_pos++] = '{'; while( (c = *ptr++) ) { - if(strbuf_pos > strbuf_size - 6) my_realloc(_ALLOC_ID_, &strbuf, (strbuf_size += CADCHUNKALLOC)); + if(strbuf_pos > strbuf_size - 6) my_realloc(854, &strbuf, (strbuf_size += CADCHUNKALLOC)); if( c=='\\' || c=='{' || c=='}') strbuf[strbuf_pos++] = '\\'; strbuf[strbuf_pos++] = (char)c; } @@ -1601,15 +1606,15 @@ static void save_inst(FILE *fd, int select_only) inst=xctx->inst; oldversion = !strcmp(xctx->file_version, "1.0"); for(i=0;isymbols;i++) xctx->sym[i].flags &=~EMBEDDED; - embedded_saved = my_calloc(_ALLOC_ID_, xctx->symbols, sizeof(int)); + embedded_saved = my_calloc(855, xctx->symbols, sizeof(int)); for(i=0;iinstances;i++) { if (select_only && inst[i].sel != SELECTED) continue; fputs("C ", fd); if(oldversion) { - my_strdup2(_ALLOC_ID_, &tmp, add_ext(inst[i].name, ".sym")); + my_strdup2(856, &tmp, add_ext(inst[i].name, ".sym")); save_ascii_string(tmp, fd, 0); - my_free(_ALLOC_ID_, &tmp); + my_free(857, &tmp); } else { save_ascii_string(inst[i].name, fd, 0); } @@ -1623,7 +1628,7 @@ static void save_inst(FILE *fd, int select_only) xctx->sym[inst[i].ptr].flags |= EMBEDDED; } } - my_free(_ALLOC_ID_, &embedded_saved); + my_free(858, &embedded_saved); } static void save_wire(FILE *fd, int select_only) @@ -1735,12 +1740,12 @@ static void write_xschem_file(FILE *fd) size_t tmpstring_size; char *header_ptr = xctx->header_text ? xctx->header_text : ""; tmpstring_size = strlen(header_ptr) + 100; - tmpstring = my_malloc(_ALLOC_ID_, tmpstring_size); + tmpstring = my_malloc(859, tmpstring_size); my_snprintf(tmpstring, tmpstring_size, "xschem version=%s file_version=%s\n%s", XSCHEM_VERSION, XSCHEM_FILE_VERSION, header_ptr); fprintf(fd, "v "); save_ascii_string(tmpstring, fd, 1); - my_free(_ALLOC_ID_, &tmpstring); + my_free(860, &tmpstring); if(xctx->schvhdlprop && !xctx->schsymbolprop) { get_tok_value(xctx->schvhdlprop,"type",0); @@ -1845,12 +1850,12 @@ static void load_inst(int k, FILE *fd) xctx->inst[i].name=NULL; /* avoid as much as possible calls to rel_sym_path (slow) */ #ifdef __unix__ - if(name[0] == '/') my_strdup2(_ALLOC_ID_, &xctx->inst[i].name, rel_sym_path(name)); - else my_strdup2(_ALLOC_ID_, &xctx->inst[i].name, name); + if(name[0] == '/') my_strdup2(861, &xctx->inst[i].name, rel_sym_path(name)); + else my_strdup2(862, &xctx->inst[i].name, name); #else - my_strdup2(_ALLOC_ID_, &xctx->inst[i].name, rel_sym_path(name)); + my_strdup2(863, &xctx->inst[i].name, rel_sym_path(name)); #endif - my_free(_ALLOC_ID_, &tmp); + my_free(864, &tmp); if(fscanf(fd, "%lf %lf %hd %hd", &xctx->inst[i].x0, &xctx->inst[i].y0, &xctx->inst[i].rot, &xctx->inst[i].flip) < 4) { fprintf(errfp,"WARNING: missing fields for INSTANCE object, ignoring.\n"); @@ -1865,8 +1870,8 @@ static void load_inst(int k, FILE *fd) xctx->inst[i].lab=NULL; /* assigned in link_symbols_to_instances */ xctx->inst[i].node=NULL; load_ascii_string(&prop_ptr,fd); - my_strdup(_ALLOC_ID_, &xctx->inst[i].prop_ptr, prop_ptr); - my_strdup2(_ALLOC_ID_, &xctx->inst[i].instname, get_tok_value(xctx->inst[i].prop_ptr, "name", 0)); + my_strdup(865, &xctx->inst[i].prop_ptr, prop_ptr); + my_strdup2(866, &xctx->inst[i].instname, get_tok_value(xctx->inst[i].prop_ptr, "name", 0)); if(!strcmp(get_tok_value(xctx->inst[i].prop_ptr,"highlight",0), "true")) xctx->inst[i].flags |= HILIGHT_CONN; @@ -1875,7 +1880,7 @@ static void load_inst(int k, FILE *fd) xctx->inst[i].embed = !strcmp(get_tok_value(xctx->inst[i].prop_ptr, "embed", 2), "true"); xctx->instances++; } - my_free(_ALLOC_ID_, &prop_ptr); + my_free(867, &prop_ptr); } static void load_polygon(FILE *fd) @@ -1902,17 +1907,17 @@ static void load_polygon(FILE *fd) ptr[i].y=NULL; ptr[i].selected_point=NULL; ptr[i].prop_ptr=NULL; - ptr[i].x = my_calloc(_ALLOC_ID_, points, sizeof(double)); - ptr[i].y = my_calloc(_ALLOC_ID_, points, sizeof(double)); - ptr[i].selected_point= my_calloc(_ALLOC_ID_, points, sizeof(unsigned short)); + ptr[i].x = my_calloc(868, points, sizeof(double)); + ptr[i].y = my_calloc(869, points, sizeof(double)); + ptr[i].selected_point= my_calloc(870, points, sizeof(unsigned short)); ptr[i].points=points; ptr[i].sel=0; for(j=0;jversion_string, "xschem")) && (ptr2 - xctx->version_string < 50)) { - my_strdup2(_ALLOC_ID_, &ptr, subst_token(xctx->version_string, "xschem", NULL)); + my_strdup2(874, &ptr, subst_token(xctx->version_string, "xschem", NULL)); } - my_strdup2(_ALLOC_ID_, &ptr, subst_token(ptr, "version", NULL)); - my_strdup2(_ALLOC_ID_, &ptr, subst_token(ptr, "file_version", NULL)); + my_strdup2(875, &ptr, subst_token(ptr, "version", NULL)); + my_strdup2(876, &ptr, subst_token(ptr, "file_version", NULL)); ptr2 = ptr; while(*ptr2 == ' ' || *ptr2 =='\t') ptr2++; /* strip leading spaces */ if(*ptr2 == '\n') ptr2++; /* strip leading newline */ - my_strdup2(_ALLOC_ID_, &xctx->header_text, ptr2); - my_free(_ALLOC_ID_,&ptr); + my_strdup2(877, &xctx->header_text, ptr2); + my_free(878,&ptr); } dbg(1, "read_xschem_file(): file_version=%s\n", xctx->file_version); break; @@ -2137,7 +2142,7 @@ static void read_xschem_file(FILE *fd) break; case '[': found=0; - my_strdup(_ALLOC_ID_, &xctx->inst[xctx->instances-1].prop_ptr, + my_strdup(879, &xctx->inst[xctx->instances-1].prop_ptr, subst_token(xctx->inst[xctx->instances-1].prop_ptr, "embed", "true")); if(xctx->inst[xctx->instances-1].name) { my_snprintf(name_embedded, S(name_embedded), "%s/.xschem_embedded_%d_%s", @@ -2153,7 +2158,7 @@ static void read_xschem_file(FILE *fd) /* if loading file coming back from embedded symbol delete temporary file */ /* symbol from this temp file has already been loaded in go_back() */ if(!xctx->x_strcmp(name_embedded, xctx->sym[i].name)) { - my_strdup2(_ALLOC_ID_, &xctx->sym[i].name, xctx->inst[xctx->instances-1].name); + my_strdup2(880, &xctx->sym[i].name, xctx->inst[xctx->instances-1].name); xunlink(name_embedded); found=1;break; } @@ -2209,13 +2214,13 @@ void load_ascii_string(char **ptr, FILE *fd) for(;;) { - if(i+5>strlength) my_realloc(_ALLOC_ID_, &str,(strlength+=CADCHUNKALLOC)); + if(i+5>strlength) my_realloc(881, &str,(strlength+=CADCHUNKALLOC)); c=fgetc(fd); if (c=='\r') continue; if(c==EOF) { fprintf(errfp, "EOF reached, malformed {...} string input, missing close brace\n"); - my_free(_ALLOC_ID_, ptr); - my_free(_ALLOC_ID_, &str); + my_free(882, ptr); + my_free(883, &str); return; } if(begin) { @@ -2235,9 +2240,9 @@ void load_ascii_string(char **ptr, FILE *fd) } else if(c=='{') begin=1; } dbg(2, "load_ascii_string(): string read=%s\n",str? str:""); - my_strdup(_ALLOC_ID_, ptr, str); + my_strdup(884, ptr, str); dbg(2, "load_ascii_string(): loaded %s\n",*ptr? *ptr:""); - my_free(_ALLOC_ID_, &str); + my_free(885, &str); } void make_symbol(void) @@ -2367,7 +2372,7 @@ void link_symbols_to_instances(int from) /* from >= 0 : linking symbols from pas if(cond) xctx->inst[i].flags|=2; /* ordinary symbol */ else { xctx->inst[i].flags &=~2; /* label or pin */ - my_strdup(_ALLOC_ID_, &xctx->inst[i].lab, get_tok_value(xctx->inst[i].prop_ptr,"lab",0)); + my_strdup(886, &xctx->inst[i].lab, get_tok_value(xctx->inst[i].prop_ptr,"lab",0)); } } /* symbol_bbox() might call translate() that might call prepare_netlist_structs() that @@ -2531,7 +2536,7 @@ void delete_undo(void) xunlink(diff_name); } rmdir(xctx->undo_dirname); - my_free(_ALLOC_ID_, &xctx->undo_dirname); + my_free(887, &xctx->undo_dirname); xctx->undo_initialized = 0; } @@ -2540,7 +2545,7 @@ static void init_undo(void) { if(!xctx->undo_initialized) { /* create undo directory */ - if( !my_strdup(_ALLOC_ID_, &xctx->undo_dirname, create_tmpdir("xschem_undo_") )) { + if( !my_strdup(888, &xctx->undo_dirname, create_tmpdir("xschem_undo_") )) { dbg(0, "xinit(): problems creating tmp undo dir, Undo will be disabled\n"); dbg(0, "init_undo(): Check permissions in %s\n", tclgetvar("XSCHEM_TMP_DIR")); xctx->no_undo = 1; /* disable undo */ @@ -2756,7 +2761,7 @@ static void get_sym_type(const char *symname, char **type, /* first look in already loaded symbols in xctx->sym[] array... */ for(i=0;isymbols;i++) { if(xctx->x_strcmp(symname, xctx->sym[i].name) == 0) { - my_strdup2(_ALLOC_ID_, type, xctx->sym[i].type); + my_strdup2(889, type, xctx->sym[i].type); found = 1; break; } @@ -2777,7 +2782,7 @@ static void get_sym_type(const char *symname, char **type, if(fd==NULL) { dbg(1, "get_sym_type(): Symbol not found: %s\n",name); - my_strdup2(_ALLOC_ID_, type, ""); + my_strdup2(890, type, ""); } else { char *globalprop=NULL; int fscan_ret; @@ -2791,12 +2796,12 @@ static void get_sym_type(const char *symname, char **type, case 'G': load_ascii_string(&globalprop,fd); if(!found) { - my_strdup2(_ALLOC_ID_, type, get_tok_value(globalprop, "type", 0)); + my_strdup2(891, type, get_tok_value(globalprop, "type", 0)); } break; case 'K': load_ascii_string(&globalprop,fd); - my_strdup2(_ALLOC_ID_, type, get_tok_value(globalprop, "type", 0)); + my_strdup2(892, type, get_tok_value(globalprop, "type", 0)); if(type[0]) found = 1; break; case 'B': @@ -2825,8 +2830,8 @@ static void get_sym_type(const char *symname, char **type, } read_line(fd, 0); /* discard any remaining characters till (but not including) newline */ } - my_free(_ALLOC_ID_, &globalprop); - my_free(_ALLOC_ID_, &rect.prop_ptr); + my_free(893, &globalprop); + my_free(894, &rect.prop_ptr); if(!embed_fd) fclose(fd); } } @@ -2857,7 +2862,7 @@ static void align_sch_pins_with_sym(const char *name, int pos) name, symname); fail = 1; } - rect = (xRect *) my_malloc(_ALLOC_ID_, sizeof(xRect) * sym_n_pins); + rect = (xRect *) my_malloc(895, sizeof(xRect) * sym_n_pins); dbg(1, "align_sch_pins_with_sym(): symbol: %s\n", symname); for(i=0; i < xctx->sym[pos].rects[PINLAYER]; i++) { Int_hashentry *entry; @@ -2878,10 +2883,10 @@ static void align_sch_pins_with_sym(const char *name, int pos) xctx->sym[pos].rect[PINLAYER][i] = rect[i]; } } - my_free(_ALLOC_ID_, &rect); + my_free(896, &rect); } int_hash_free(&pintable); - my_free(_ALLOC_ID_, &symtype); + my_free(897, &symtype); } } @@ -2895,14 +2900,14 @@ static void add_pinlayer_boxes(int *lastr, xRect **bb, char *pin_label = NULL; i = lastr[PINLAYER]; - my_realloc(_ALLOC_ID_, &bb[PINLAYER], (i + 1) * sizeof(xRect)); + my_realloc(898, &bb[PINLAYER], (i + 1) * sizeof(xRect)); bb[PINLAYER][i].x1 = i_x0 - 2.5; bb[PINLAYER][i].x2 = i_x0 + 2.5; bb[PINLAYER][i].y1 = i_y0 - 2.5; bb[PINLAYER][i].y2 = i_y0 + 2.5; RECTORDER(bb[PINLAYER][i].x1, bb[PINLAYER][i].y1, bb[PINLAYER][i].x2, bb[PINLAYER][i].y2); bb[PINLAYER][i].prop_ptr = NULL; label = get_tok_value(prop_ptr, "lab", 0); save = strlen(label)+30; - pin_label = my_malloc(_ALLOC_ID_, save); + pin_label = my_malloc(899, save); pin_label[0] = '\0'; if (!strcmp(symtype, "ipin")) { my_snprintf(pin_label, save, "name=%s dir=in ", label); @@ -2911,15 +2916,15 @@ static void add_pinlayer_boxes(int *lastr, xRect **bb, } else if (!strcmp(symtype, "iopin")) { my_snprintf(pin_label, save, "name=%s dir=inout ", label); } - my_strdup(_ALLOC_ID_, &bb[PINLAYER][i].prop_ptr, pin_label); + my_strdup(900, &bb[PINLAYER][i].prop_ptr, pin_label); bb[PINLAYER][i].flags = 0; bb[PINLAYER][i].extraptr = 0; bb[PINLAYER][i].dash = 0; bb[PINLAYER][i].sel = 0; /* add to symbol pins remaining attributes from schematic pins, except name= and lab= */ - my_strdup(_ALLOC_ID_, &pin_label, get_sym_template(prop_ptr, "lab")); /* remove name=... and lab=... */ - my_strcat(_ALLOC_ID_, &bb[PINLAYER][i].prop_ptr, pin_label); - my_free(_ALLOC_ID_, &pin_label); + my_strdup(901, &pin_label, get_sym_template(prop_ptr, "lab")); /* remove name=... and lab=... */ + my_strcat(902, &bb[PINLAYER][i].prop_ptr, pin_label); + my_free(903, &pin_label); lastr[PINLAYER]++; } @@ -3082,14 +3087,14 @@ int load_sym_def(const char *name, FILE *embed_fd) short inst_rot, inst_flip; char *symname = NULL; char tag[1]; - int *lastl = my_malloc(_ALLOC_ID_, cadlayers * sizeof(lastl)); - int *lastr = my_malloc(_ALLOC_ID_, cadlayers * sizeof(int)); - int *lastp = my_malloc(_ALLOC_ID_, cadlayers * sizeof(int)); - int *lasta = my_malloc(_ALLOC_ID_, cadlayers * sizeof(int)); - xLine **ll = my_malloc(_ALLOC_ID_, cadlayers * sizeof(xLine *)); - xRect **bb = my_malloc(_ALLOC_ID_, cadlayers * sizeof(xRect *)); - xArc **aa = my_malloc(_ALLOC_ID_, cadlayers * sizeof(xArc *)); - xPoly **pp = my_malloc(_ALLOC_ID_, cadlayers * sizeof(xPoly *)); + int *lastl = my_malloc(904, cadlayers * sizeof(lastl)); + int *lastr = my_malloc(905, cadlayers * sizeof(int)); + int *lastp = my_malloc(906, cadlayers * sizeof(int)); + int *lasta = my_malloc(907, cadlayers * sizeof(int)); + xLine **ll = my_malloc(908, cadlayers * sizeof(xLine *)); + xRect **bb = my_malloc(909, cadlayers * sizeof(xRect *)); + xArc **aa = my_malloc(910, cadlayers * sizeof(xArc *)); + xPoly **pp = my_malloc(911, cadlayers * sizeof(xPoly *)); int lastt; xText *tt; int endfile; @@ -3105,7 +3110,7 @@ int load_sym_def(const char *name, FILE *embed_fd) recursion_counter++; dbg(1, "l_s_d(): loading name=%s\n", name); lcc=NULL; - my_realloc(_ALLOC_ID_, &lcc, (level + 1) * sizeof(Lcc)); + my_realloc(912, &lcc, (level + 1) * sizeof(Lcc)); max_level = level + 1; if(!strcmp(xctx->file_version,"1.0")) { my_strncpy(sympath, abs_sym_path(name, ".sym"), S(sympath)); @@ -3150,7 +3155,7 @@ int load_sym_def(const char *name, FILE *embed_fd) symbol[symbols].type = NULL; symbol[symbols].templ = NULL; symbol[symbols].name=NULL; - my_strdup2(_ALLOC_ID_, &symbol[symbols].name,name); + my_strdup2(913, &symbol[symbols].name,name); /* read symbol from file */ while(1) { @@ -3159,8 +3164,8 @@ int load_sym_def(const char *name, FILE *embed_fd) if (level) { dbg(1, "l_s_d(): fclose1, level=%d, fd=%p\n", level, lcc[level].fd); fclose(lcc[level].fd); - my_free(_ALLOC_ID_, &lcc[level].prop_ptr); - my_free(_ALLOC_ID_, &lcc[level].symname); + my_free(914, &lcc[level].prop_ptr); + my_free(915, &lcc[level].symname); --level; continue; } else break; @@ -3194,9 +3199,9 @@ int load_sym_def(const char *name, FILE *embed_fd) if (level==0) { load_ascii_string(&symbol[symbols].prop_ptr, lcc[level].fd); if(!symbol[symbols].prop_ptr) break; - my_strdup2(_ALLOC_ID_, &symbol[symbols].templ, + my_strdup2(916, &symbol[symbols].templ, get_tok_value(symbol[symbols].prop_ptr, "template", 0)); - my_strdup2(_ALLOC_ID_, &symbol[symbols].type, + my_strdup2(917, &symbol[symbols].type, get_tok_value(symbol[symbols].prop_ptr, "type",0)); if(!strcmp(get_tok_value(symbol[symbols].prop_ptr,"highlight",0), "true")) symbol[symbols].flags |= HILIGHT_CONN; @@ -3211,9 +3216,9 @@ int load_sym_def(const char *name, FILE *embed_fd) if (level==0 && !symbol[symbols].prop_ptr) { load_ascii_string(&symbol[symbols].prop_ptr, lcc[level].fd); if(!symbol[symbols].prop_ptr) break; - my_strdup2(_ALLOC_ID_, &symbol[symbols].templ, + my_strdup2(918, &symbol[symbols].templ, get_tok_value(symbol[symbols].prop_ptr, "template", 0)); - my_strdup2(_ALLOC_ID_, &symbol[symbols].type, + my_strdup2(919, &symbol[symbols].type, get_tok_value(symbol[symbols].prop_ptr, "type",0)); if(!strcmp(get_tok_value(symbol[symbols].prop_ptr,"highlight",0), "true")) symbol[symbols].flags |= HILIGHT_CONN; @@ -3231,7 +3236,7 @@ int load_sym_def(const char *name, FILE *embed_fd) continue; } i=lastl[c]; - my_realloc(_ALLOC_ID_, &ll[c],(i+1)*sizeof(xLine)); + my_realloc(920, &ll[c],(i+1)*sizeof(xLine)); if(fscanf(lcc[level].fd, "%lf %lf %lf %lf ",&ll[c][i].x1, &ll[c][i].y1, &ll[c][i].x2, &ll[c][i].y2) < 4 ) { fprintf(errfp,"l_s_d(): WARNING: missing fields for LINE object, ignoring\n"); @@ -3274,10 +3279,10 @@ int load_sym_def(const char *name, FILE *embed_fd) continue; } i=lastp[c]; - my_realloc(_ALLOC_ID_, &pp[c],(i+1)*sizeof(xPoly)); - pp[c][i].x = my_calloc(_ALLOC_ID_, poly_points, sizeof(double)); - pp[c][i].y = my_calloc(_ALLOC_ID_, poly_points, sizeof(double)); - pp[c][i].selected_point = my_calloc(_ALLOC_ID_, poly_points, sizeof(unsigned short)); + my_realloc(921, &pp[c],(i+1)*sizeof(xPoly)); + pp[c][i].x = my_calloc(922, poly_points, sizeof(double)); + pp[c][i].y = my_calloc(923, poly_points, sizeof(double)); + pp[c][i].selected_point = my_calloc(924, poly_points, sizeof(unsigned short)); pp[c][i].points = poly_points; for(k=0;k0 && c == PINLAYER) c = 7; /* Don't care about pins inside SYM: set on different layer */ i=lastr[c]; - my_realloc(_ALLOC_ID_, &bb[c],(i+1)*sizeof(xRect)); + my_realloc(926, &bb[c],(i+1)*sizeof(xRect)); if(fscanf(lcc[level].fd, "%lf %lf %lf %lf ",&bb[c][i].x1, &bb[c][i].y1, &bb[c][i].x2, &bb[c][i].y2) < 4 ) { fprintf(errfp,"l_s_d(): WARNING: missing fields for Box object, ignoring\n"); @@ -3380,7 +3385,7 @@ int load_sym_def(const char *name, FILE *embed_fd) load_ascii_string( &bb[c][i].prop_ptr, lcc[level].fd); /* don't load graphs of LCC schematic instances */ if(strstr(get_tok_value(bb[c][i].prop_ptr, "flags", 0), "graph")) { - my_free(_ALLOC_ID_, &bb[c][i].prop_ptr); + my_free(927, &bb[c][i].prop_ptr); continue; } dbg(2, "l_s_d(): loaded rect: ptr=%lx\n", (unsigned long)bb[c]); @@ -3400,7 +3405,7 @@ int load_sym_def(const char *name, FILE *embed_fd) break; case 'T': i=lastt; - my_realloc(_ALLOC_ID_, &tt,(i+1)*sizeof(xText)); + my_realloc(928, &tt,(i+1)*sizeof(xText)); tt[i].txt_ptr=NULL; tt[i].font=NULL; load_ascii_string(&tt[i].txt_ptr, lcc[level].fd); @@ -3415,7 +3420,7 @@ int load_sym_def(const char *name, FILE *embed_fd) const char* tmp = translate2(lcc, level, tt[i].txt_ptr); dbg(1, "l_s_d(): txt2: tt[i].txt_ptr=%s, i=%d\n", tt[i].txt_ptr, i); rot = lcc[level].rot; flip = lcc[level].flip; - my_strdup2(_ALLOC_ID_, &tt[i].txt_ptr, tmp); + my_strdup2(929, &tt[i].txt_ptr, tmp); dbg(1, "l_s_d(): txt3: tt[i].txt_ptr=%s, i=%d\n", tt[i].txt_ptr, i); /* allow annotation inside LCC instances. */ if(!strcmp(tt[i].txt_ptr, "@spice_get_voltage")) { @@ -3427,16 +3432,16 @@ int load_sym_def(const char *name, FILE *embed_fd) int i; for(i = 1; i ) */ - my_realloc(_ALLOC_ID_, &tt[i].txt_ptr, new_size); + my_realloc(932, &tt[i].txt_ptr, new_size); my_snprintf(tt[i].txt_ptr, new_size, "@spice_get_voltage(%s%s)", path ? path : "", lab); - my_free(_ALLOC_ID_, &path); + my_free(933, &path); dbg(1, " --> tt[i].txt_ptr=%s\n", tt[i].txt_ptr); } if(!strcmp(tt[i].txt_ptr, "@spice_get_current")) { @@ -3448,16 +3453,16 @@ int load_sym_def(const char *name, FILE *embed_fd) int i; for(i = 1; i ) */ - my_realloc(_ALLOC_ID_, &tt[i].txt_ptr, new_size); + my_realloc(936, &tt[i].txt_ptr, new_size); my_snprintf(tt[i].txt_ptr, new_size, "@spice_get_current(%s%s)", path ? path : "", dev); - my_free(_ALLOC_ID_, &path); + my_free(937, &path); dbg(1, " --> tt[i].txt_ptr=%s\n", tt[i].txt_ptr); } ROTATION(rot, flip, 0.0, 0.0, tt[i].x0, tt[i].y0, rx1, ry1); @@ -3471,7 +3476,7 @@ int load_sym_def(const char *name, FILE *embed_fd) if(level > 0 && symtype && !strcmp(symtype, "label")) { char lay[30]; my_snprintf(lay, S(lay), " layer=%d", WIRELAYER); - my_strcat(_ALLOC_ID_, &tt[i].prop_ptr, lay); + my_strcat(938, &tt[i].prop_ptr, lay); } dbg(1, "l_s_d(): loaded text : t=%s p=%s\n", tt[i].txt_ptr, tt[i].prop_ptr ? tt[i].prop_ptr : "NULL"); set_text_flags(&tt[i]); @@ -3479,7 +3484,7 @@ int load_sym_def(const char *name, FILE *embed_fd) break; case 'N': /* store wires as lines on layer WIRELAYER. */ i = lastl[WIRELAYER]; - my_realloc(_ALLOC_ID_, &ll[WIRELAYER],(i+1)*sizeof(xLine)); + my_realloc(939, &ll[WIRELAYER],(i+1)*sizeof(xLine)); if(fscanf(lcc[level].fd, "%lf %lf %lf %lf ",&ll[WIRELAYER][i].x1, &ll[WIRELAYER][i].y1, &ll[WIRELAYER][i].x2, &ll[WIRELAYER][i].y2) < 4 ) { fprintf(errfp,"l_s_d(): WARNING: missing fields for LINE object, ignoring\n"); @@ -3582,7 +3587,7 @@ int load_sym_def(const char *name, FILE *embed_fd) } if(fd_tmp) { if (level+1 >= max_level) { - my_realloc(_ALLOC_ID_, &lcc, (max_level + 1) * sizeof(Lcc)); + my_realloc(940, &lcc, (max_level + 1) * sizeof(Lcc)); max_level++; } ++level; @@ -3609,8 +3614,8 @@ int load_sym_def(const char *name, FILE *embed_fd) lcc[level].x0 += lcc[(level-1)].x0; lcc[level].y0 += lcc[(level-1)].y0; } - my_strdup(_ALLOC_ID_, &lcc[level].prop_ptr, prop_ptr); - my_strdup(_ALLOC_ID_, &lcc[level].symname, symname); + my_strdup(941, &lcc[level].prop_ptr, prop_ptr); + my_strdup(942, &lcc[level].symname, symname); dbg(1, "level incremented: level=%d, symname=%s, prop_ptr=%s sympath=%s\n", level, symname, prop_ptr, sympath); } @@ -3624,8 +3629,8 @@ int load_sym_def(const char *name, FILE *embed_fd) break; case ']': if(level) { - my_free(_ALLOC_ID_, &lcc[level].prop_ptr); - my_free(_ALLOC_ID_, &lcc[level].symname); + my_free(943, &lcc[level].prop_ptr); + my_free(944, &lcc[level].symname); --level; } else { endfile=1; @@ -3670,19 +3675,19 @@ int load_sym_def(const char *name, FILE *embed_fd) /* given a .sch file used as instance in LCC schematics, order its pin * as in corresponding .sym file if it exists */ align_sch_pins_with_sym(name, symbols); - my_free(_ALLOC_ID_, &prop_ptr); - my_free(_ALLOC_ID_, &lastl); - my_free(_ALLOC_ID_, &lastr); - my_free(_ALLOC_ID_, &lastp); - my_free(_ALLOC_ID_, &lasta); - my_free(_ALLOC_ID_, &ll); - my_free(_ALLOC_ID_, &bb); - my_free(_ALLOC_ID_, &aa); - my_free(_ALLOC_ID_, &pp); - my_free(_ALLOC_ID_, &lcc); - my_free(_ALLOC_ID_, &aux_ptr); - my_free(_ALLOC_ID_, &symname); - my_free(_ALLOC_ID_, &symtype); + my_free(945, &prop_ptr); + my_free(946, &lastl); + my_free(947, &lastr); + my_free(948, &lastp); + my_free(949, &lasta); + my_free(950, &ll); + my_free(951, &bb); + my_free(952, &aa); + my_free(953, &pp); + my_free(954, &lcc); + my_free(955, &aux_ptr); + my_free(956, &symname); + my_free(957, &symtype); recursion_counter--; sort_symbol_pins(xctx->sym[xctx->symbols].rect[PINLAYER], xctx->sym[xctx->symbols].rects[PINLAYER], @@ -3747,20 +3752,20 @@ void create_sch_from_sym(void) char *sch = NULL; size_t ln; - my_strdup(_ALLOC_ID_, &pinname[0], tcleval("rel_sym_path [find_file ipin.sym]")); - my_strdup(_ALLOC_ID_, &pinname[1], tcleval("rel_sym_path [find_file opin.sym]")); - my_strdup(_ALLOC_ID_, &pinname[2], tcleval("rel_sym_path [find_file iopin.sym]")); - my_strdup(_ALLOC_ID_, &generic_pin, tcleval("rel_sym_path [find_file generic_pin.sym]")); + my_strdup(958, &pinname[0], tcleval("rel_sym_path [find_file ipin.sym]")); + my_strdup(959, &pinname[1], tcleval("rel_sym_path [find_file opin.sym]")); + my_strdup(960, &pinname[2], tcleval("rel_sym_path [find_file iopin.sym]")); + my_strdup(961, &generic_pin, tcleval("rel_sym_path [find_file generic_pin.sym]")); if(pinname[0] && pinname[1] && pinname[2] && generic_pin) { rebuild_selected_array(); if(xctx->lastsel > 1) return; if(xctx->lastsel==1 && xctx->sel_array[0].type==ELEMENT) { - my_strdup2(_ALLOC_ID_, &sch, + my_strdup2(962, &sch, get_tok_value((xctx->inst[xctx->sel_array[0].n].ptr+ xctx->sym)->prop_ptr, "schematic",0 )); my_strncpy(schname, abs_sym_path(sch, ""), S(schname)); - my_free(_ALLOC_ID_, &sch); + my_free(963, &sch); if(!schname[0]) { my_strncpy(schname, add_ext(abs_sym_path(xctx->inst[xctx->sel_array[0].n].name, ""), ".sch"), S(schname)); @@ -3792,13 +3797,13 @@ void create_sch_from_sym(void) rct = ptr->rect[GENERICLAYER]; ypos=0; for(i=0;ilastsel...) */ - my_free(_ALLOC_ID_, &dir); - my_free(_ALLOC_ID_, &prop); - my_free(_ALLOC_ID_, &sub2_prop); - my_free(_ALLOC_ID_, &str); + my_free(970, &dir); + my_free(971, &prop); + my_free(972, &sub2_prop); + my_free(973, &str); } else { fprintf(errfp, "create_sch_from_sym(): location of schematic pins not found\n"); tcleval("alert_ {create_sch_from_sym(): location of schematic pins not found} {}"); } - my_free(_ALLOC_ID_, &pinname[0]); - my_free(_ALLOC_ID_, &pinname[1]); - my_free(_ALLOC_ID_, &pinname[2]); - my_free(_ALLOC_ID_, &generic_pin); + my_free(974, &pinname[0]); + my_free(975, &pinname[1]); + my_free(976, &pinname[2]); + my_free(977, &generic_pin); } void descend_symbol(void) @@ -3877,18 +3882,18 @@ void descend_symbol(void) } else return; /* build up current hierarchy path */ - my_strdup(_ALLOC_ID_, &str, xctx->inst[n].instname); - my_strdup(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], xctx->sch_path[xctx->currsch]); - my_strcat(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], str); - my_strcat(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], "."); + my_strdup(978, &str, xctx->inst[n].instname); + my_strdup(979, &xctx->sch_path[xctx->currsch+1], xctx->sch_path[xctx->currsch]); + my_strcat(980, &xctx->sch_path[xctx->currsch+1], str); + my_strcat(981, &xctx->sch_path[xctx->currsch+1], "."); xctx->sch_path_hash[xctx->currsch+1] = 0; - my_strdup(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].prop_ptr, + my_strdup(982, &xctx->hier_attr[xctx->currsch].prop_ptr, xctx->inst[n].prop_ptr); - my_strdup(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].templ, + my_strdup(983, &xctx->hier_attr[xctx->currsch].templ, get_tok_value((xctx->inst[n].ptr+ xctx->sym)->prop_ptr, "template", 0)); xctx->sch_inst_number[xctx->currsch+1] = 1; - my_free(_ALLOC_ID_, &str); + my_free(984, &str); xctx->previous_instance[xctx->currsch]=n; xctx->zoom_array[xctx->currsch].x=xctx->xorigin; xctx->zoom_array[xctx->currsch].y=xctx->yorigin; diff --git a/src/scheduler.c b/src/scheduler.c index 8ae953e4..38e749e7 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -670,7 +670,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg char *str = NULL; display_hilights(&str); Tcl_SetResult(interp, str, TCL_VOLATILE); - my_free(_ALLOC_ID_, &str); + my_free(985, &str); } else if(!strcmp(argv[1], "draw_graph")) { @@ -763,10 +763,10 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg l = expandlabel(argv[2], &tmp); llen = strlen(l); dbg(1, "l=%s\n", l ? l : ""); - result = my_malloc(_ALLOC_ID_, llen + 30); + result = my_malloc(986, llen + 30); my_snprintf(result, llen + 30, "%s %d", l, tmp); Tcl_SetResult(interp, result, TCL_VOLATILE); - my_free(_ALLOC_ID_, &result); + my_free(987, &result); } } else { cmd_found = 0;} @@ -1148,7 +1148,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg Tcl_SetResult(interp, (xctx->inst[inst].ptr+ xctx->sym)->rect[PINLAYER][n].prop_ptr, TCL_VOLATILE); } else { tmp = 100 + strlen(argv[4]) + strlen(argv[5]); - subtok = my_malloc(_ALLOC_ID_,tmp); + subtok = my_malloc(988,tmp); my_snprintf(subtok, tmp, "%s(%s)", argv[5], argv[4]); value = get_tok_value(xctx->inst[inst].prop_ptr,subtok,0); if(!value[0]) { @@ -1167,7 +1167,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg } Tcl_SetResult(interp, (char *)value, TCL_VOLATILE); } - my_free(_ALLOC_ID_, &subtok); + my_free(989, &subtok); } } /* xschem getprop symbol lm358.sym [type] */ @@ -1221,9 +1221,9 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg if(argc < 4) {Tcl_SetResult(interp, "Missing arguments", TCL_STATIC);return TCL_ERROR;} if(argc == 5) t = atoi(argv[4]); else t = 0; - my_strdup(_ALLOC_ID_, &s, get_tok_value(argv[2], argv[3], t)); + my_strdup(990, &s, get_tok_value(argv[2], argv[3], t)); Tcl_SetResult(interp, s, TCL_VOLATILE); - my_free(_ALLOC_ID_, &s); + my_free(991, &s); } else if(!strcmp(argv[1], "get_tok_size") ) @@ -1534,7 +1534,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg rct=symbol->rect[PINLAYER]; /* slotted devices: name= U1:2, pinnumber=2:5 */ slot = -1; - tmpstr = my_malloc(_ALLOC_ID_, sizeof(xctx->inst[i].instname)); + tmpstr = my_malloc(992, sizeof(xctx->inst[i].instname)); if((ss=strchr(xctx->inst[i].instname, ':')) ) { sscanf(ss+1, "%s", tmpstr); if(isonlydigit(tmpstr)) { @@ -1557,7 +1557,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg piny0 += y0; my_snprintf(num, S(num), "{%s} %g %g", get_tok_value(rct[p].prop_ptr, "name", 0), pinx0, piny0); Tcl_SetResult(interp, num, TCL_VOLATILE); - my_free(_ALLOC_ID_, &tmpstr); + my_free(993, &tmpstr); } else if(!strcmp(argv[1], "instance_pins")) @@ -1575,10 +1575,10 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg pin = get_tok_value((xctx->inst[i].ptr+ xctx->sym)->rect[PINLAYER][p].prop_ptr, "name",0); if(!pin[0]) pin = "--ERROR--"; my_mstrcat(655, &pins, "{", pin, "}", NULL); - if(p< no_of_pins-1) my_strcat(_ALLOC_ID_, &pins, " "); + if(p< no_of_pins-1) my_strcat(994, &pins, " "); } Tcl_SetResult(interp, pins, TCL_VOLATILE); - my_free(_ALLOC_ID_, &pins); + my_free(995, &pins); } else if(!strcmp(argv[1], "instance_pos")) @@ -1634,7 +1634,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg } } Tcl_SetResult(interp, pins ? pins : "", TCL_VOLATILE); - my_free(_ALLOC_ID_, &pins); + my_free(996, &pins); } else { cmd_found = 0;} break; @@ -1673,7 +1673,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg Tcl_ResetResult(interp); hier_psprint(&res, 2); Tcl_SetResult(interp, res, TCL_VOLATILE); - my_free(_ALLOC_ID_, &res); + my_free(997, &res); } else if(!strcmp(argv[1], "list_hilights")) @@ -1739,7 +1739,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg dbg(1, "scheduler: undo_reset=%d\n", undo_reset); load_schematic(load_symbols, f, undo_reset); tclvareval("update_recent_file {", f, "}", NULL); - my_strdup(_ALLOC_ID_, &xctx->sch_path[xctx->currsch], "."); + my_strdup(998, &xctx->sch_path[xctx->currsch], "."); xctx->sch_path_hash[xctx->currsch] = 0; xctx->sch_inst_number[xctx->currsch] = 1; if(nofullzoom) draw(); @@ -2369,15 +2369,15 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg delete_inst_node(inst); /* 20180208 fix crashing bug: delete node info if changing symbol */ /* if number of pins is different we must delete these data *before* */ /* changing ysmbol, otherwise i might end up deleting non allocated data. */ - my_strdup2(_ALLOC_ID_, &xctx->inst[inst].name, rel_sym_path(symbol)); + my_strdup2(999, &xctx->inst[inst].name, rel_sym_path(symbol)); xctx->inst[inst].ptr=sym_number; bbox(ADD, xctx->inst[inst].x1, xctx->inst[inst].y1, xctx->inst[inst].x2, xctx->inst[inst].y2); - my_strdup(_ALLOC_ID_, &name, xctx->inst[inst].instname); + my_strdup(1000, &name, xctx->inst[inst].instname); if(name && name[0] ) { /* 20110325 only modify prefix if prefix not NUL */ if(prefix) name[0]=(char)prefix; /* change prefix if changing symbol type; */ - my_strdup(_ALLOC_ID_, &ptr,subst_token(xctx->inst[inst].prop_ptr, "name", name) ); + my_strdup(1001, &ptr,subst_token(xctx->inst[inst].prop_ptr, "name", name) ); hash_all_names(); new_prop_string(inst, ptr,0, tclgetboolvar("disable_unique_names")); /* set new prop_ptr */ type=xctx->sym[xctx->inst[inst].ptr].type; @@ -2385,12 +2385,12 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg if(cond) xctx->inst[inst].flags|=2; else { xctx->inst[inst].flags &=~2; - my_strdup(_ALLOC_ID_, &xctx->inst[inst].lab, get_tok_value(xctx->inst[inst].prop_ptr, "lab", 0)); + my_strdup(1002, &xctx->inst[inst].lab, get_tok_value(xctx->inst[inst].prop_ptr, "lab", 0)); } xctx->inst[inst].embed = !strcmp(get_tok_value(xctx->inst[inst].prop_ptr, "embed", 2), "true"); - my_free(_ALLOC_ID_, &ptr); + my_free(1003, &ptr); } - my_free(_ALLOC_ID_, &name); + my_free(1004, &name); /* new symbol bbox after prop changes (may change due to text length) */ symbol_bbox(inst, &xctx->inst[inst].x1, &xctx->inst[inst].y1, &xctx->inst[inst].x2, &xctx->inst[inst].y2); bbox(ADD, xctx->inst[inst].x1, xctx->inst[inst].y1, xctx->inst[inst].x2, xctx->inst[inst].y2); @@ -2552,7 +2552,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg if(exists) { viewer = atoi(tclgetvar("sim(spicewave,default)")); my_snprintf(tcl_str, S(tcl_str), "sim(spicewave,%d,name)", viewer); - my_strdup(_ALLOC_ID_, &viewer_name, tclgetvar(tcl_str)); + my_strdup(1005, &viewer_name, tclgetvar(tcl_str)); dbg(1, "send_to_viewer: viewer_name=%s\n", viewer_name); if(strstr(viewer_name, "Gaw")) viewer=GAW; else if(strstr(viewer_name, "Bespice")) viewer=BESPICE; @@ -2560,7 +2560,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg hilight_net(viewer); redraw_hilights(0); } - my_free(_ALLOC_ID_, &viewer_name); + my_free(1006, &viewer_name); } Tcl_ResetResult(interp); } @@ -2586,12 +2586,12 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg xctx->draw_window=atoi(argv[3]); } else if(!strcmp(argv[2], "format")) { - my_strdup(_ALLOC_ID_, &xctx->format, argv[3]); + my_strdup(1007, &xctx->format, argv[3]); } else if(!strcmp(argv[2], "header_text")) { if(!xctx->header_text || strcmp(xctx->header_text, argv[3])) { set_modify(1); xctx->push_undo(); - my_strdup2(_ALLOC_ID_, &xctx->header_text, argv[3]); + my_strdup2(1008, &xctx->header_text, argv[3]); } } else if(!strcmp(argv[2], "hide_symbols")) { @@ -2668,10 +2668,10 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg { char *s = NULL; if(argc < 5) {Tcl_SetResult(interp, "Missing arguments", TCL_STATIC);return TCL_ERROR;} - my_strdup(_ALLOC_ID_, &s, argv[2]); + my_strdup(1009, &s, argv[2]); set_different_token(&s, argv[3], argv[4], 0, 0); Tcl_SetResult(interp, s, TCL_VOLATILE); - my_free(_ALLOC_ID_, &s); + my_free(1010, &s); } else if(!strcmp(argv[1], "set_modify")) @@ -2733,7 +2733,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg if(cond) xctx->inst[inst].flags|=2; else { xctx->inst[inst].flags &=~2; - my_strdup(_ALLOC_ID_, &xctx->inst[inst].lab, get_tok_value(xctx->inst[inst].prop_ptr, "lab", 0)); + my_strdup(1011, &xctx->inst[inst].lab, get_tok_value(xctx->inst[inst].prop_ptr, "lab", 0)); } xctx->inst[inst].embed = !strcmp(get_tok_value(xctx->inst[inst].prop_ptr, "embed", 2), "true"); if(!fast) { @@ -2788,14 +2788,14 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg if(strcmp(argv[6], get_tok_value(r->prop_ptr, argv[5], 0))) { change_done = 1; if(fast == 3 || fast == 0) xctx->push_undo(); - my_strdup2(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, argv[5], argv[6])); + my_strdup2(1012, &r->prop_ptr, subst_token(r->prop_ptr, argv[5], argv[6])); } } else { get_tok_value(r->prop_ptr, argv[5], 0); if(xctx->tok_size) { change_done = 1; if(fast == 3 || fast == 0) xctx->push_undo(); - my_strdup2(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, argv[5], NULL)); /* delete attr */ + my_strdup2(1013, &r->prop_ptr, subst_token(r->prop_ptr, argv[5], NULL)); /* delete attr */ } } if(change_done) set_modify(1); @@ -2850,14 +2850,14 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg if(strcmp(argv[5], get_tok_value(t->prop_ptr, argv[4], 0))) { change_done = 1; if(fast == 3 || fast == 0) xctx->push_undo(); - my_strdup2(_ALLOC_ID_, &t->prop_ptr, subst_token(t->prop_ptr, argv[4], argv[5])); + my_strdup2(1014, &t->prop_ptr, subst_token(t->prop_ptr, argv[4], argv[5])); } } else { get_tok_value(t->prop_ptr, argv[4], 0); if(xctx->tok_size) { change_done = 1; if(fast == 3 || fast == 0) xctx->push_undo(); - my_strdup2(_ALLOC_ID_, &t->prop_ptr, subst_token(t->prop_ptr, argv[4], NULL)); /* delete attr */ + my_strdup2(1015, &t->prop_ptr, subst_token(t->prop_ptr, argv[4], NULL)); /* delete attr */ } } if(change_done) set_modify(1); @@ -2900,9 +2900,9 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg { char *s=NULL; if(argc < 5) {Tcl_SetResult(interp, "Missing arguments", TCL_STATIC);return TCL_ERROR;} - my_strdup(_ALLOC_ID_, &s, subst_token(argv[2], argv[3], strcmp(argv[4], "NULL") ? argv[4] : NULL)); + my_strdup(1016, &s, subst_token(argv[2], argv[3], strcmp(argv[4], "NULL") ? argv[4] : NULL)); Tcl_SetResult(interp, s, TCL_VOLATILE); - my_free(_ALLOC_ID_, &s); + my_free(1017, &s); } else if(!strcmp(argv[1], "symbol_in_new_window")) @@ -3296,10 +3296,10 @@ int tclvareval(const char *script, ...) va_list args; va_start(args, script); - size = my_strcat(_ALLOC_ID_, &str, script); + size = my_strcat(1018, &str, script); dbg(1, "tclvareval(): script=%s, str=%s, size=%d\n", script, str, size); while( (p = va_arg(args, const char *)) ) { - size = my_strcat(_ALLOC_ID_, &str, p); + size = my_strcat(1019, &str, p); dbg(1, "tclvareval(): p=%s, str=%s, size=%d\n", p, str, size); } return_code = Tcl_EvalEx(interp, str, (int)size, TCL_EVAL_GLOBAL); @@ -3308,6 +3308,6 @@ int tclvareval(const char *script, ...) dbg(0, "tclvareval(): error executing %s: %s\n", str, tclresult()); Tcl_ResetResult(interp); } - my_free(_ALLOC_ID_, &str); + my_free(1020, &str); return return_code; } diff --git a/src/select.c b/src/select.c index 1f29bb42..78d72a2a 100644 --- a/src/select.c +++ b/src/select.c @@ -233,7 +233,7 @@ static void del_rect_line_arc_poly(void) if(c == GRIDLAYER) xctx->graph_lastsel = -1; /* invalidate last selected graph */ j++; bbox(ADD, xctx->rect[c][i].x1, xctx->rect[c][i].y1, xctx->rect[c][i].x2, xctx->rect[c][i].y2); - my_free(_ALLOC_ID_, &xctx->rect[c][i].prop_ptr); + my_free(1021, &xctx->rect[c][i].prop_ptr); set_rect_extraptr(0, &xctx->rect[c][i]); set_modify(1); continue; @@ -260,7 +260,7 @@ static void del_rect_line_arc_poly(void) bbox(ADD, xctx->line[c][i].x1, xctx->line[c][i].y1 , xctx->line[c][i].x2 , xctx->line[c][i].y2 ); } set_modify(1); - my_free(_ALLOC_ID_, &xctx->line[c][i].prop_ptr); + my_free(1022, &xctx->line[c][i].prop_ptr); continue; } if(j) @@ -284,7 +284,7 @@ static void del_rect_line_arc_poly(void) arc_bbox(xctx->arc[c][i].x, xctx->arc[c][i].y, xctx->arc[c][i].r, xctx->arc[c][i].a, xctx->arc[c][i].b, &tmp.x1, &tmp.y1, &tmp.x2, &tmp.y2); bbox(ADD, tmp.x1, tmp.y1, tmp.x2, tmp.y2); - my_free(_ALLOC_ID_, &xctx->arc[c][i].prop_ptr); + my_free(1023, &xctx->arc[c][i].prop_ptr); set_modify(1); continue; } @@ -312,10 +312,10 @@ static void del_rect_line_arc_poly(void) } j++; bbox(ADD, x1, y1, x2, y2); - my_free(_ALLOC_ID_, &xctx->poly[c][i].prop_ptr); - my_free(_ALLOC_ID_, &xctx->poly[c][i].x); - my_free(_ALLOC_ID_, &xctx->poly[c][i].y); - my_free(_ALLOC_ID_, &xctx->poly[c][i].selected_point); + my_free(1024, &xctx->poly[c][i].prop_ptr); + my_free(1025, &xctx->poly[c][i].x); + my_free(1026, &xctx->poly[c][i].y); + my_free(1027, &xctx->poly[c][i].selected_point); /*fprintf(errfp, "bbox: %.16g %.16g %.16g %.16g\n", x1, y1, x2, y2); */ set_modify(1); continue; @@ -368,9 +368,9 @@ void delete(int to_push_undo) } #endif bbox(ADD, xx1, yy1, xx2, yy2 ); - my_free(_ALLOC_ID_, &xctx->text[i].prop_ptr); - my_free(_ALLOC_ID_, &xctx->text[i].font); - my_free(_ALLOC_ID_, &xctx->text[i].txt_ptr); + my_free(1028, &xctx->text[i].prop_ptr); + my_free(1029, &xctx->text[i].font); + my_free(1030, &xctx->text[i].txt_ptr); set_modify(1); j++; continue; @@ -392,12 +392,12 @@ void delete(int to_push_undo) set_modify(1); if(xctx->inst[i].prop_ptr != NULL) { - my_free(_ALLOC_ID_, &xctx->inst[i].prop_ptr); + my_free(1031, &xctx->inst[i].prop_ptr); } delete_inst_node(i); - my_free(_ALLOC_ID_, &xctx->inst[i].name); - my_free(_ALLOC_ID_, &xctx->inst[i].instname); - my_free(_ALLOC_ID_, &xctx->inst[i].lab); + my_free(1032, &xctx->inst[i].name); + my_free(1033, &xctx->inst[i].instname); + my_free(1034, &xctx->inst[i].lab); j++; continue; } @@ -432,8 +432,8 @@ void delete(int to_push_undo) bbox(ADD, xctx->wire[i].x1-ov, y1 , xctx->wire[i].x2+ov , y2 ); } - my_free(_ALLOC_ID_, &xctx->wire[i].prop_ptr); - my_free(_ALLOC_ID_, &xctx->wire[i].node); + my_free(1035, &xctx->wire[i].prop_ptr); + my_free(1036, &xctx->wire[i].node); set_modify(1); continue; diff --git a/src/spice_netlist.c b/src/spice_netlist.c index a9510d1d..659f8b90 100644 --- a/src/spice_netlist.c +++ b/src/spice_netlist.c @@ -55,10 +55,10 @@ void hier_psprint(char **res, int what) /* netlister driver */ zoom_full(0, 0, 1, 0.97); if(what & 1) ps_draw(2); /* page */ if(what & 2) { /* print cellname */ - my_strcat(_ALLOC_ID_, res, hier_psprint_mtime(xctx->sch[xctx->currsch])); - my_strcat(_ALLOC_ID_, res, " {"); - my_strcat(_ALLOC_ID_, res, xctx->sch[xctx->currsch]); - my_strcat(_ALLOC_ID_, res, "}\n"); + my_strcat(1037, res, hier_psprint_mtime(xctx->sch[xctx->currsch])); + my_strcat(1038, res, " {"); + my_strcat(1039, res, xctx->sch[xctx->currsch]); + my_strcat(1040, res, "}\n"); } dbg(1,"--> %s\n", skip_dir( xctx->sch[xctx->currsch]) ); unselect_all(1); @@ -66,8 +66,8 @@ void hier_psprint(char **res, int what) /* netlister driver */ /* reload data without popping undo stack, this populates embedded symbols if any */ xctx->pop_undo(2, 0); /* link_symbols_to_instances(-1); */ /* done in xctx->pop_undo() */ - my_strdup(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], xctx->sch_path[xctx->currsch]); - my_strcat(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], "->netlisting"); + my_strdup(1041, &xctx->sch_path[xctx->currsch+1], xctx->sch_path[xctx->currsch]); + my_strcat(1042, &xctx->sch_path[xctx->currsch+1], "->netlisting"); xctx->sch_path_hash[xctx->currsch+1] = 0; xctx->currsch++; subckt_name=NULL; @@ -76,13 +76,13 @@ void hier_psprint(char **res, int what) /* netlister driver */ int flag; /* for printing we process also symbols that have *_ignore attribute */ if(!xctx->sym[i].type || !xctx->sym[i].name || !xctx->sym[i].name[0]) continue; /* can not descend into */ - my_strdup2(_ALLOC_ID_, &abs_path, abs_sym_path(xctx->sym[i].name, "")); + my_strdup2(1043, &abs_path, abs_sym_path(xctx->sym[i].name, "")); if(what & 1) flag = check_lib(2, abs_path); /* noprint_libs */ else flag = check_lib(4, abs_path); /* nolist_libs */ if(strcmp(xctx->sym[i].type,"subcircuit")==0 && flag) { /* xctx->sym can be SCH or SYM, use hash to avoid writing duplicate subckt */ - my_strdup(_ALLOC_ID_, &subckt_name, get_cell(xctx->sym[i].name, 0)); + my_strdup(1044, &subckt_name, get_cell(xctx->sym[i].name, 0)); if (str_hash_lookup(&subckt_table, subckt_name, "", XLOOKUP)==NULL) { str_hash_lookup(&subckt_table, subckt_name, "", XINSERT); @@ -92,18 +92,18 @@ void hier_psprint(char **res, int what) /* netlister driver */ zoom_full(0, 0, 1, 0.97); if(what & 1) ps_draw(2); /* page */ if(what & 2) { /* print cellname */ - my_strcat(_ALLOC_ID_, res, hier_psprint_mtime(xctx->sch[xctx->currsch])); - my_strcat(_ALLOC_ID_, res, " {"); - my_strcat(_ALLOC_ID_, res, xctx->sch[xctx->currsch]); - my_strcat(_ALLOC_ID_, res, "}\n"); + my_strcat(1045, res, hier_psprint_mtime(xctx->sch[xctx->currsch])); + my_strcat(1046, res, " {"); + my_strcat(1047, res, xctx->sch[xctx->currsch]); + my_strcat(1048, res, "}\n"); } dbg(1,"--> %s\n", skip_dir( xctx->sch[xctx->currsch]) ); } } } - my_free(_ALLOC_ID_, &abs_path); + my_free(1049, &abs_path); str_hash_free(&subckt_table); - my_free(_ALLOC_ID_, &subckt_name); + my_free(1050, &subckt_name); my_strncpy(xctx->sch[xctx->currsch] , "", S(xctx->sch[xctx->currsch])); xctx->currsch--; unselect_all(1); @@ -122,18 +122,18 @@ static char *model_name(const char *m) char *modelname = NULL; int n; size_t l = strlen(m) + 1; - my_strdup(_ALLOC_ID_, &m_lower, m); + my_strdup(1051, &m_lower, m); strtolower(m_lower); - my_realloc(_ALLOC_ID_, &modelname, l); - my_realloc(_ALLOC_ID_, &model_name_result, l); + my_realloc(1052, &modelname, l); + my_realloc(1053, &model_name_result, l); n = sscanf(m_lower, " %s %s", model_name_result, modelname); if(n<2) my_strncpy(model_name_result, m_lower, l); else { /* build a hash key value with no spaces to make device_model attributes with different spaces equivalent*/ - my_strcat(_ALLOC_ID_, &model_name_result, modelname); + my_strcat(1054, &model_name_result, modelname); } - my_free(_ALLOC_ID_, &modelname); - my_free(_ALLOC_ID_, &m_lower); + my_free(1055, &modelname); + my_free(1056, &m_lower); return model_name_result; } @@ -156,7 +156,7 @@ static void spice_netlist(FILE *fd, int spice_stop ) if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "spice_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1057, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && IS_PIN(type) ) { if(top_sub && !flag) { fprintf(fd, "*.PININFO "); @@ -181,7 +181,7 @@ static void spice_netlist(FILE *fd, int spice_stop ) if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "spice_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1058, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && !IS_LABEL_OR_PIN(type) ) { /* already done in global_spice_netlist */ @@ -202,11 +202,11 @@ static void spice_netlist(FILE *fd, int spice_stop ) m = get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "device_model", 0); if(m[0]) str_hash_lookup(&model_table, model_name(m), m, XINSERT); } - my_free(_ALLOC_ID_, &model_name_result); + my_free(1059, &model_name_result); } } } - my_free(_ALLOC_ID_, &type); + my_free(1060, &type); } if(!spice_stop && !xctx->netlist_count) redraw_hilights(0); /* draw_hilight_net(1); */ } @@ -272,11 +272,11 @@ void global_spice_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "spice_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); - my_strdup(_ALLOC_ID_, &place,get_tok_value((xctx->inst[i].ptr+ xctx->sym)->prop_ptr,"place",0)); + my_strdup(1061, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1062, &place,get_tok_value((xctx->inst[i].ptr+ xctx->sym)->prop_ptr,"place",0)); if( type && !strcmp(type,"netlist_commands") ) { if(!place) { - my_strdup(_ALLOC_ID_, &place,get_tok_value(xctx->inst[i].prop_ptr,"place",0)); + my_strdup(1063, &place,get_tok_value(xctx->inst[i].prop_ptr,"place",0)); } if(place && !strcmp(place, "header" )) { if(first == 0) fprintf(fd,"**** begin user header code\n"); @@ -305,7 +305,7 @@ void global_spice_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "spice_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1064, &type,(xctx->inst[i].ptr+ xctx->sym)->type); dbg(1, "global_spice_netlist(): |%s|\n", type); /* if( type && !strcmp(type,"netlist_options") ) { @@ -331,11 +331,11 @@ void global_spice_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "spice_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); - my_strdup(_ALLOC_ID_, &place,get_tok_value((xctx->inst[i].ptr+ xctx->sym)->prop_ptr,"place",0)); + my_strdup(1065, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1066, &place,get_tok_value((xctx->inst[i].ptr+ xctx->sym)->prop_ptr,"place",0)); if( type && !strcmp(type,"netlist_commands") ) { if(!place) { - my_strdup(_ALLOC_ID_, &place,get_tok_value(xctx->inst[i].prop_ptr,"place",0)); + my_strdup(1067, &place,get_tok_value(xctx->inst[i].prop_ptr,"place",0)); } if(!place || (strcmp(place, "end") && strcmp(place, "header")) ) { if(first == 0) fprintf(fd,"**** begin user architecture code\n"); @@ -376,7 +376,7 @@ void global_spice_netlist(int global) /* netlister driver */ /* warning if two symbols perfectly overlapped */ warning_overlapped_symbols(0); /* preserve current level instance flags before descending hierarchy for netlisting, restore later */ - stored_flags = my_calloc(_ALLOC_ID_, xctx->instances, sizeof(unsigned int)); + stored_flags = my_calloc(1068, xctx->instances, sizeof(unsigned int)); for(i=0;iinstances;i++) stored_flags[i] = xctx->inst[i].color; if(global) @@ -388,8 +388,8 @@ void global_spice_netlist(int global) /* netlister driver */ dbg(1, "global_spice_netlist(): invoking pop_undo(2, 0)\n"); xctx->pop_undo(2, 0); /* link_symbols_to_instances(-1); */ /* done in xctx->pop_undo() */ - my_strdup(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], xctx->sch_path[xctx->currsch]); - my_strcat(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], "->netlisting"); + my_strdup(1069, &xctx->sch_path[xctx->currsch+1], xctx->sch_path[xctx->currsch]); + my_strcat(1070, &xctx->sch_path[xctx->currsch+1], "->netlisting"); xctx->sch_path_hash[xctx->currsch+1] = 0; xctx->currsch++; @@ -399,11 +399,11 @@ void global_spice_netlist(int global) /* netlister driver */ { if( strcmp(get_tok_value(xctx->sym[i].prop_ptr,"spice_ignore",0),"true")==0 ) continue; if(!xctx->sym[i].type) continue; - my_strdup(_ALLOC_ID_, &abs_path, abs_sym_path(xctx->sym[i].name, "")); + my_strdup(1071, &abs_path, abs_sym_path(xctx->sym[i].name, "")); if(strcmp(xctx->sym[i].type,"subcircuit")==0 && check_lib(1, abs_path)) { /* xctx->sym can be SCH or SYM, use hash to avoid writing duplicate subckt */ - my_strdup(_ALLOC_ID_, &subckt_name, get_cell(xctx->sym[i].name, 0)); + my_strdup(1072, &subckt_name, get_cell(xctx->sym[i].name, 0)); if (str_hash_lookup(&subckt_table, subckt_name, "", XLOOKUP)==NULL) { str_hash_lookup(&subckt_table, subckt_name, "", XINSERT); @@ -416,10 +416,10 @@ void global_spice_netlist(int global) /* netlister driver */ spice_block_netlist(fd, i); } } - my_free(_ALLOC_ID_, &abs_path); + my_free(1073, &abs_path); } str_hash_free(&subckt_table); - my_free(_ALLOC_ID_, &subckt_name); + my_free(1074, &subckt_name); /*clear_drawing(); */ my_strncpy(xctx->sch[xctx->currsch] , "", S(xctx->sch[xctx->currsch])); xctx->currsch--; @@ -437,7 +437,7 @@ void global_spice_netlist(int global) /* netlister driver */ for(i=0;iinstances; i++) xctx->inst[i].color = stored_flags[i]; propagate_hilights(1, 0, XINSERT_NOREPLACE); draw_hilight_net(1); - my_free(_ALLOC_ID_, &stored_flags); + my_free(1075, &stored_flags); /* print globals nodes found in netlist 28032003 */ if(!split_f) record_global_node(0,fd,NULL); @@ -452,15 +452,15 @@ void global_spice_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "spice_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); - my_strdup(_ALLOC_ID_, &place,get_tok_value((xctx->inst[i].ptr+ xctx->sym)->prop_ptr,"place",0)); + my_strdup(1076, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1077, &place,get_tok_value((xctx->inst[i].ptr+ xctx->sym)->prop_ptr,"place",0)); if( type && !strcmp(type,"netlist_commands") ) { if(place && !strcmp(place, "end" )) { if(first == 0) fprintf(fd,"**** begin user architecture code\n"); first++; print_spice_element(fd, i) ; } else { - my_strdup(_ALLOC_ID_, &place,get_tok_value(xctx->inst[i].prop_ptr,"place",0)); + my_strdup(1078, &place,get_tok_value(xctx->inst[i].prop_ptr,"place",0)); if(place && !strcmp(place, "end" )) { if(first == 0) fprintf(fd,"**** begin user architecture code\n"); first++; @@ -503,8 +503,8 @@ void global_spice_netlist(int global) /* netlister driver */ } if(!debug_var) xunlink(netl_filename); } - my_free(_ALLOC_ID_, &type); - my_free(_ALLOC_ID_, &place); + my_free(1079, &type); + my_free(1080, &place); xctx->netlist_count = 0; } @@ -547,7 +547,7 @@ void spice_block_netlist(FILE *fd, int i) fprintf(fd, ".subckt %s ",skip_dir(xctx->sym[i].name)); print_spice_subckt_nodes(fd, i); - my_strdup(_ALLOC_ID_, &extra, get_tok_value(xctx->sym[i].prop_ptr,"extra",0) ); + my_strdup(1081, &extra, get_tok_value(xctx->sym[i].prop_ptr,"extra",0) ); /* this is now done in print_spice_subckt_nodes */ /* * fprintf(fd, "%s ", extra ? extra : "" ); @@ -555,7 +555,7 @@ void spice_block_netlist(FILE *fd, int i) /* 20081206 new get_sym_template does not return token=value pairs where token listed in extra */ fprintf(fd, "%s", get_sym_template(xctx->sym[i].templ, extra)); - my_free(_ALLOC_ID_, &extra); + my_free(1082, &extra); fprintf(fd, "\n"); spice_stop ? load_schematic(0,filename, 0) : load_schematic(1,filename, 0); @@ -617,12 +617,12 @@ Str_hashentry *str_hash_lookup(Str_hashtable *hashtable, const char *token, cons if(what==XINSERT || what == XINSERT_NOREPLACE) /* insert data */ { s=sizeof( Str_hashentry ); - entry=(Str_hashentry *)my_malloc(_ALLOC_ID_, s); + entry=(Str_hashentry *)my_malloc(1083, s); entry->next=NULL; entry->token=NULL; entry->value=NULL; - my_strdup(_ALLOC_ID_, &entry->token, token); - my_strdup(_ALLOC_ID_, &entry->value, value); + my_strdup(1084, &entry->token, token); + my_strdup(1085, &entry->value, value); entry->hash=hashcode; *preventry=entry; } @@ -633,13 +633,13 @@ Str_hashentry *str_hash_lookup(Str_hashtable *hashtable, const char *token, cons if(what==XDELETE) /* remove token from the hash table ... */ { saveptr=entry->next; - my_free(_ALLOC_ID_, &entry->token); - my_free(_ALLOC_ID_, &entry->value); - my_free(_ALLOC_ID_, &entry); + my_free(1086, &entry->token); + my_free(1087, &entry->value); + my_free(1088, &entry); *preventry=saveptr; } else if(value && what == XINSERT ) { - my_strdup(_ALLOC_ID_, &entry->value, value); + my_strdup(1089, &entry->value, value); } return entry; /* found matching entry, return the address */ } @@ -654,7 +654,7 @@ void str_hash_init(Str_hashtable *hashtable, int size) dbg(0, "str_hash_init(): Warning hash table not empty, possible data leak\n"); } hashtable->size = size; - hashtable->table = my_calloc(_ALLOC_ID_, size, sizeof(Str_hashentry *)); + hashtable->table = my_calloc(1090, size, sizeof(Str_hashentry *)); } static void str_hash_free_entry(Str_hashentry *entry) @@ -662,9 +662,9 @@ static void str_hash_free_entry(Str_hashentry *entry) Str_hashentry *tmp; while( entry ) { tmp = entry -> next; - my_free(_ALLOC_ID_, &(entry->token)); - my_free(_ALLOC_ID_, &(entry->value)); - my_free(_ALLOC_ID_, &entry); + my_free(1091, &(entry->token)); + my_free(1092, &(entry->value)); + my_free(1093, &entry); entry = tmp; } } @@ -680,7 +680,7 @@ void str_hash_free(Str_hashtable *hashtable) str_hash_free_entry( table[i] ); table[i] = NULL; } - if(hashtable->table) my_free(_ALLOC_ID_, &(hashtable->table)); + if(hashtable->table) my_free(1094, &(hashtable->table)); hashtable->size = 0; } } @@ -718,10 +718,10 @@ Int_hashentry *int_hash_lookup(Int_hashtable *hashtable, const char *token, cons if(what==XINSERT || what == XINSERT_NOREPLACE) /* insert data */ { s=sizeof( Int_hashentry ); - entry=(Int_hashentry *)my_malloc(_ALLOC_ID_, s); + entry=(Int_hashentry *)my_malloc(1095, s); entry->next=NULL; entry->token=NULL; - my_strdup(_ALLOC_ID_, &entry->token, token); + my_strdup(1096, &entry->token, token); entry->value = value; entry->hash=hashcode; *preventry=entry; @@ -733,8 +733,8 @@ Int_hashentry *int_hash_lookup(Int_hashtable *hashtable, const char *token, cons if(what==XDELETE) /* remove token from the hash table ... */ { saveptr=entry->next; - my_free(_ALLOC_ID_, &entry->token); - my_free(_ALLOC_ID_, &entry); + my_free(1097, &entry->token); + my_free(1098, &entry); *preventry=saveptr; } else if(what == XINSERT ) { @@ -753,7 +753,7 @@ void int_hash_init(Int_hashtable *hashtable, int size) dbg(0, "int_hash_init(): Warning hash table not empty, possible data leak\n"); } hashtable->size = size; - hashtable->table = my_calloc(_ALLOC_ID_, size, sizeof(Int_hashentry *)); + hashtable->table = my_calloc(1099, size, sizeof(Int_hashentry *)); } static void int_hash_free_entry(Int_hashentry *entry) @@ -761,8 +761,8 @@ static void int_hash_free_entry(Int_hashentry *entry) Int_hashentry *tmp; while( entry ) { tmp = entry -> next; - my_free(_ALLOC_ID_, &(entry->token)); - my_free(_ALLOC_ID_, &entry); + my_free(1100, &(entry->token)); + my_free(1101, &entry); entry = tmp; } } @@ -778,7 +778,7 @@ void int_hash_free(Int_hashtable *hashtable) int_hash_free_entry( table[i] ); table[i] = NULL; } - my_free(_ALLOC_ID_, &(hashtable->table)); + my_free(1102, &(hashtable->table)); hashtable->size = 0; } } @@ -818,10 +818,10 @@ Ptr_hashentry *ptr_hash_lookup(Ptr_hashtable *hashtable, const char *token, void if(what==XINSERT || what == XINSERT_NOREPLACE) /* insert data */ { s=sizeof( Ptr_hashentry ); - entry=(Ptr_hashentry *)my_malloc(_ALLOC_ID_, s); + entry=(Ptr_hashentry *)my_malloc(1103, s); entry->next=NULL; entry->token=NULL; - my_strdup(_ALLOC_ID_, &entry->token, token); + my_strdup(1104, &entry->token, token); entry->value = value; entry->hash=hashcode; *preventry=entry; @@ -833,8 +833,8 @@ Ptr_hashentry *ptr_hash_lookup(Ptr_hashtable *hashtable, const char *token, void if(what==XDELETE) /* remove token from the hash table ... */ { saveptr=entry->next; - my_free(_ALLOC_ID_, &entry->token); - my_free(_ALLOC_ID_, &entry); + my_free(1105, &entry->token); + my_free(1106, &entry); *preventry=saveptr; } else if(what == XINSERT ) { @@ -853,7 +853,7 @@ void ptr_hash_init(Ptr_hashtable *hashtable, int size) dbg(0, "ptr_hash_init(): Warning hash table not empty, possible data leak\n"); } hashtable->size = size; - hashtable->table = my_calloc(_ALLOC_ID_, size, sizeof(Ptr_hashentry *)); + hashtable->table = my_calloc(1107, size, sizeof(Ptr_hashentry *)); } static void ptr_hash_free_entry(Ptr_hashentry *entry) @@ -861,8 +861,8 @@ static void ptr_hash_free_entry(Ptr_hashentry *entry) Ptr_hashentry *tmp; while( entry ) { tmp = entry -> next; - my_free(_ALLOC_ID_, &(entry->token)); - my_free(_ALLOC_ID_, &entry); + my_free(1108, &(entry->token)); + my_free(1109, &entry); entry = tmp; } } @@ -878,7 +878,7 @@ void ptr_hash_free(Ptr_hashtable *hashtable) ptr_hash_free_entry( table[i] ); table[i] = NULL; } - my_free(_ALLOC_ID_, &(hashtable->table)); + my_free(1110, &(hashtable->table)); hashtable->size = 0; } } diff --git a/src/store.c b/src/store.c index 5c4b12c8..98548fa6 100644 --- a/src/store.c +++ b/src/store.c @@ -28,7 +28,7 @@ void check_wire_storage(void) if(xctx->wires >= xctx->maxw) { xctx->maxw=(1+xctx->wires / CADMAXWIRES)*CADMAXWIRES; - my_realloc(_ALLOC_ID_, &xctx->wire, sizeof(xWire)*xctx->maxw); + my_realloc(1111, &xctx->wire, sizeof(xWire)*xctx->maxw); } } @@ -37,7 +37,7 @@ void check_selected_storage(void) if(xctx->lastsel >= xctx->maxsel) { xctx->maxsel=(1+xctx->lastsel / MAXGROUP) * MAXGROUP; - my_realloc(_ALLOC_ID_, &xctx->sel_array, sizeof(Selected)*xctx->maxsel); + my_realloc(1112, &xctx->sel_array, sizeof(Selected)*xctx->maxsel); } } @@ -46,7 +46,7 @@ void check_text_storage(void) if(xctx->texts >= xctx->maxt) { xctx->maxt=(1 + xctx->texts / CADMAXTEXT) * CADMAXTEXT; - my_realloc(_ALLOC_ID_, &xctx->text, sizeof(xText)*xctx->maxt); + my_realloc(1113, &xctx->text, sizeof(xText)*xctx->maxt); } } @@ -58,42 +58,42 @@ void check_symbol_storage(void) dbg(1, "check_symbol_storage(): more than maxs, %s\n", xctx->sch[xctx->currsch] ); xctx->maxs=(1 + xctx->symbols / ELEMDEF) * ELEMDEF; - my_realloc(_ALLOC_ID_, &xctx->sym, sizeof(xSymbol)*xctx->maxs); + my_realloc(1114, &xctx->sym, sizeof(xSymbol)*xctx->maxs); for(i=xctx->symbols;imaxs;i++) { - xctx->sym[i].poly=my_calloc(_ALLOC_ID_, cadlayers, sizeof(xPoly *)); + xctx->sym[i].poly=my_calloc(1115, cadlayers, sizeof(xPoly *)); if(xctx->sym[i].poly==NULL){ fprintf(errfp, "check_symbol_storage(): calloc error\n");tcleval( "exit"); } - xctx->sym[i].arc=my_calloc(_ALLOC_ID_, cadlayers, sizeof(xArc *)); + xctx->sym[i].arc=my_calloc(1116, cadlayers, sizeof(xArc *)); if(xctx->sym[i].arc==NULL){ fprintf(errfp, "check_symbol_storage(): calloc error\n");tcleval( "exit"); } - xctx->sym[i].line=my_calloc(_ALLOC_ID_, cadlayers, sizeof(xLine *)); + xctx->sym[i].line=my_calloc(1117, cadlayers, sizeof(xLine *)); if(xctx->sym[i].line==NULL){ fprintf(errfp, "check_symbol_storage(): calloc error\n");tcleval( "exit"); } - xctx->sym[i].rect=my_calloc(_ALLOC_ID_, cadlayers, sizeof(xRect *)); + xctx->sym[i].rect=my_calloc(1118, cadlayers, sizeof(xRect *)); if(xctx->sym[i].rect==NULL){ fprintf(errfp, "check_symbol_storage(): calloc error\n");tcleval( "exit"); } - xctx->sym[i].lines=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); + xctx->sym[i].lines=my_calloc(1119, cadlayers, sizeof(int)); if(xctx->sym[i].lines==NULL){ fprintf(errfp, "check_symbol_storage(): calloc error\n");tcleval( "exit"); } - xctx->sym[i].rects=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); + xctx->sym[i].rects=my_calloc(1120, cadlayers, sizeof(int)); if(xctx->sym[i].rects==NULL){ fprintf(errfp, "check_symbol_storage(): calloc error\n");tcleval( "exit"); } - xctx->sym[i].polygons=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); + xctx->sym[i].polygons=my_calloc(1121, cadlayers, sizeof(int)); if(xctx->sym[i].polygons==NULL){ fprintf(errfp, "check_symbol_storage(): calloc error\n");tcleval( "exit"); } - xctx->sym[i].arcs=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); + xctx->sym[i].arcs=my_calloc(1122, cadlayers, sizeof(int)); if(xctx->sym[i].arcs==NULL){ fprintf(errfp, "check_symbol_storage(): calloc error\n");tcleval( "exit"); } @@ -109,7 +109,7 @@ void check_inst_storage(void) if(xctx->instances >= xctx->maxi) { xctx->maxi=(1 + xctx->instances / ELEMINST) * ELEMINST; - my_realloc(_ALLOC_ID_, &xctx->inst, sizeof(xInstance)*xctx->maxi); + my_realloc(1123, &xctx->inst, sizeof(xInstance)*xctx->maxi); #ifdef ZERO_REALLOC memset(xctx->inst + xctx->instances, 0, sizeof(xInstance) * (xctx->maxi - xctx->instances)); #endif @@ -121,7 +121,7 @@ void check_arc_storage(int c) if(xctx->arcs[c] >= xctx->maxa[c]) { xctx->maxa[c]=(1 + xctx->arcs[c] / CADMAXOBJECTS) * CADMAXOBJECTS; - my_realloc(_ALLOC_ID_, &xctx->arc[c], sizeof(xArc)*xctx->maxa[c]); + my_realloc(1124, &xctx->arc[c], sizeof(xArc)*xctx->maxa[c]); #ifdef ZERO_REALLOC memset(xctx->arc[c] + xctx->arcs[c], 0, sizeof(xArc) * (xctx->maxa[c] - xctx->arcs[c])); #endif @@ -133,7 +133,7 @@ void check_box_storage(int c) if(xctx->rects[c] >= xctx->maxr[c]) { xctx->maxr[c]=(1 + xctx->rects[c] / CADMAXOBJECTS) * CADMAXOBJECTS; - my_realloc(_ALLOC_ID_, &xctx->rect[c], sizeof(xRect)*xctx->maxr[c]); + my_realloc(1125, &xctx->rect[c], sizeof(xRect)*xctx->maxr[c]); #ifdef ZERO_REALLOC memset(xctx->rect[c] + xctx->rects[c], 0, sizeof(xRect) * (xctx->maxr[c] - xctx->rects[c])); #endif @@ -145,7 +145,7 @@ void check_line_storage(int c) if(xctx->lines[c] >= xctx->maxl[c]) { xctx->maxl[c]=(1 + xctx->lines[c] / CADMAXOBJECTS) * CADMAXOBJECTS; - my_realloc(_ALLOC_ID_, &xctx->line[c], sizeof(xLine)*xctx->maxl[c]); + my_realloc(1126, &xctx->line[c], sizeof(xLine)*xctx->maxl[c]); #ifdef ZERO_REALLOC memset(xctx->line[c] + xctx->lines[c], 0, sizeof(xLine) * (xctx->maxl[c] - xctx->lines[c])); #endif @@ -157,7 +157,7 @@ void check_polygon_storage(int c) if(xctx->polygons[c] >= xctx->maxp[c]) { xctx->maxp[c]=(1 + xctx->polygons[c] / CADMAXOBJECTS) * CADMAXOBJECTS; - my_realloc(_ALLOC_ID_, &xctx->poly[c], sizeof(xPoly)*xctx->maxp[c]); + my_realloc(1127, &xctx->poly[c], sizeof(xPoly)*xctx->maxp[c]); #ifdef ZERO_REALLOC memset(xctx->poly[c] + xctx->polygons[c], 0, sizeof(xPoly) * (xctx->maxp[c] - xctx->polygons[c])); #endif @@ -185,7 +185,7 @@ void store_arc(int pos, double x, double y, double r, double a, double b, xctx->arc[rectc][n].a = a; xctx->arc[rectc][n].b = b; xctx->arc[rectc][n].prop_ptr = NULL; - my_strdup(_ALLOC_ID_, &xctx->arc[rectc][n].prop_ptr, prop_ptr); + my_strdup(1128, &xctx->arc[rectc][n].prop_ptr, prop_ptr); xctx->arc[rectc][n].sel = sel; if( !strcmp(get_tok_value(xctx->arc[rectc][n].prop_ptr,"fill",0),"true") ) xctx->arc[rectc][n].fill =1; @@ -223,10 +223,10 @@ void store_poly(int pos, double *x, double *y, int points, unsigned int rectc, xctx->poly[rectc][n].y=NULL; xctx->poly[rectc][n].selected_point=NULL; xctx->poly[rectc][n].prop_ptr=NULL; - xctx->poly[rectc][n].x= my_calloc(_ALLOC_ID_, points, sizeof(double)); - xctx->poly[rectc][n].y= my_calloc(_ALLOC_ID_, points, sizeof(double)); - xctx->poly[rectc][n].selected_point= my_calloc(_ALLOC_ID_, points, sizeof(unsigned short)); - my_strdup(_ALLOC_ID_, &xctx->poly[rectc][n].prop_ptr, prop_ptr); + xctx->poly[rectc][n].x= my_calloc(1129, points, sizeof(double)); + xctx->poly[rectc][n].y= my_calloc(1130, points, sizeof(double)); + xctx->poly[rectc][n].selected_point= my_calloc(1131, points, sizeof(unsigned short)); + my_strdup(1132, &xctx->poly[rectc][n].prop_ptr, prop_ptr); for(j=0;jpoly[rectc][n].x[j] = x[j]; xctx->poly[rectc][n].y[j] = y[j]; @@ -276,7 +276,7 @@ void storeobject(int pos, double x1,double y1,double x2,double y2, xctx->line[rectc][n].y1=y1; xctx->line[rectc][n].y2=y2; xctx->line[rectc][n].prop_ptr=NULL; - my_strdup(_ALLOC_ID_, &xctx->line[rectc][n].prop_ptr, prop_ptr); + my_strdup(1133, &xctx->line[rectc][n].prop_ptr, prop_ptr); xctx->line[rectc][n].sel=sel; if( prop_ptr && !strcmp(get_tok_value(prop_ptr, "bus", 0), "true") ) xctx->line[rectc][n].bus = 1; @@ -309,7 +309,7 @@ void storeobject(int pos, double x1,double y1,double x2,double y2, xctx->rect[rectc][n].y2=y2; xctx->rect[rectc][n].prop_ptr=NULL; xctx->rect[rectc][n].extraptr=NULL; - my_strdup(_ALLOC_ID_, &xctx->rect[rectc][n].prop_ptr, prop_ptr); + my_strdup(1134, &xctx->rect[rectc][n].prop_ptr, prop_ptr); xctx->rect[rectc][n].sel=sel; if(prop_ptr && (dash = get_tok_value(prop_ptr,"dash",0))[0]) { int d = atoi(dash); @@ -349,7 +349,7 @@ void storeobject(int pos, double x1,double y1,double x2,double y2, xctx->wire[n].node=NULL; xctx->wire[n].end1=0; xctx->wire[n].end2=0; - my_strdup(_ALLOC_ID_, &xctx->wire[n].prop_ptr, prop_ptr); + my_strdup(1135, &xctx->wire[n].prop_ptr, prop_ptr); if(prop_ptr && !strcmp(get_tok_value(prop_ptr,"bus",0), "true")) xctx->wire[n].bus=1; else xctx->wire[n].bus=0; xctx->wire[n].sel=sel; diff --git a/src/svgdraw.c b/src/svgdraw.c index dfd2ef0b..599b7698 100644 --- a/src/svgdraw.c +++ b/src/svgdraw.c @@ -291,7 +291,7 @@ static void svg_draw_string(int layer, const char *str, short rot, short flip, i if(rot == 3 && flip == 1 ) { x=textx1;} } llength=0; - my_strdup2(_ALLOC_ID_, &sss, str); + my_strdup2(1136, &sss, str); tt=ss=sss; for(;;) { c=*ss; @@ -309,7 +309,7 @@ static void svg_draw_string(int layer, const char *str, short rot, short flip, i } ss++; } - my_free(_ALLOC_ID_, &sss); + my_free(1137, &sss); } @@ -489,16 +489,16 @@ static void svg_draw_symbol(int c, int n,int layer,short tmp_flip, short rot, polygon = (symptr->poly[layer])[j]; { /* scope block so we declare some auxiliary arrays for coord transforms. 20171115 */ int k; - double *x = my_malloc(_ALLOC_ID_, sizeof(double) * polygon.points); - double *y = my_malloc(_ALLOC_ID_, sizeof(double) * polygon.points); + double *x = my_malloc(1138, sizeof(double) * polygon.points); + double *y = my_malloc(1139, sizeof(double) * polygon.points); for(k=0;karcs[layer];j++) { @@ -647,7 +647,7 @@ void svg_draw(void) else return; } svg_restore_lw(); - svg_colors=my_calloc(_ALLOC_ID_, cadlayers, sizeof(Svg_color)); + svg_colors=my_calloc(1142, cadlayers, sizeof(Svg_color)); if(svg_colors==NULL){ fprintf(errfp, "svg_draw(): calloc error\n"); return; @@ -674,7 +674,7 @@ void svg_draw(void) } my_strncpy(xctx->plotfile,"", S(xctx->plotfile)); - unused_layer = my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); + unused_layer = my_calloc(1143, cadlayers, sizeof(int)); #if 0 * /* Determine used layers. Disabled since we want hilight colors */ * for(c=0;c\n"); fclose(fd); tclsetboolvar("draw_grid", old_grid); - my_free(_ALLOC_ID_, &svg_colors); - my_free(_ALLOC_ID_, &unused_layer); + my_free(1144, &svg_colors); + my_free(1145, &unused_layer); Tcl_SetResult(interp,"",TCL_STATIC); } diff --git a/src/tedax_netlist.c b/src/tedax_netlist.c index 761c95cb..d9321074 100644 --- a/src/tedax_netlist.c +++ b/src/tedax_netlist.c @@ -40,7 +40,7 @@ static void tedax_netlist(FILE *fd, int tedax_stop ) if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "tedax_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1146, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && IS_PIN(type) ) { print_tedax_element(fd, i) ; /* this is the element line */ } @@ -52,7 +52,7 @@ static void tedax_netlist(FILE *fd, int tedax_stop ) if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "tedax_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1147, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && !IS_LABEL_OR_PIN(type) ) { /* already done in global_tedax_netlist */ @@ -68,7 +68,7 @@ static void tedax_netlist(FILE *fd, int tedax_stop ) } } } - my_free(_ALLOC_ID_, &type); + my_free(1148, &type); } if(!tedax_stop && !xctx->netlist_count) redraw_hilights(0); /* draw_hilight_net(1); */ } @@ -92,7 +92,7 @@ static void tedax_block_netlist(FILE *fd, int i) fprintf(fd, "begin netlist v1 %s\n",skip_dir(xctx->sym[i].name)); print_tedax_subckt(fd, i); - my_strdup(_ALLOC_ID_, &extra, get_tok_value(xctx->sym[i].prop_ptr,"extra",0) ); + my_strdup(1149, &extra, get_tok_value(xctx->sym[i].prop_ptr,"extra",0) ); /* this is now done in print_spice_subckt */ /* * fprintf(fd, "%s ", extra ? extra : "" ); @@ -100,7 +100,7 @@ static void tedax_block_netlist(FILE *fd, int i) /* 20081206 new get_sym_template does not return token=value pairs where token listed in extra */ fprintf(fd, "%s", get_sym_template(xctx->sym[i].templ, extra)); - my_free(_ALLOC_ID_, &extra); + my_free(1150, &extra); fprintf(fd, "\n"); load_schematic(1,filename, 0); tedax_netlist(fd, tedax_stop); @@ -175,7 +175,7 @@ void global_tedax_netlist(int global) /* netlister driver */ /* warning if two symbols perfectly overlapped */ warning_overlapped_symbols(0); /* preserve current level instance flags before descending hierarchy for netlisting, restore later */ - stored_flags = my_calloc(_ALLOC_ID_, xctx->instances, sizeof(unsigned int)); + stored_flags = my_calloc(1151, xctx->instances, sizeof(unsigned int)); for(i=0;iinstances;i++) stored_flags[i] = xctx->inst[i].color; if(global) /* was if(global) ... 20180901 no hierarchical tEDAx netlist for now */ @@ -186,8 +186,8 @@ void global_tedax_netlist(int global) /* netlister driver */ /* reload data without popping undo stack, this populates embedded symbols if any */ xctx->pop_undo(2, 0); /* link_symbols_to_instances(-1); */ /* done in xctx->pop_undo() */ - my_strdup(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], xctx->sch_path[xctx->currsch]); - my_strcat(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], "->netlisting"); + my_strdup(1152, &xctx->sch_path[xctx->currsch+1], xctx->sch_path[xctx->currsch]); + my_strcat(1153, &xctx->sch_path[xctx->currsch+1], "->netlisting"); xctx->sch_path_hash[xctx->currsch+1] = 0; xctx->currsch++; @@ -196,13 +196,13 @@ void global_tedax_netlist(int global) /* netlister driver */ { if( strcmp(get_tok_value(xctx->sym[i].prop_ptr,"tedax_ignore",0),"true")==0 ) continue; if(!xctx->sym[i].type) continue; - my_strdup2(_ALLOC_ID_, &abs_path, abs_sym_path(xctx->sym[i].name, "")); + my_strdup2(1154, &abs_path, abs_sym_path(xctx->sym[i].name, "")); if(strcmp(xctx->sym[i].type,"subcircuit")==0 && check_lib(1, abs_path)) { tedax_block_netlist(fd, i); } } - my_free(_ALLOC_ID_, &abs_path); + my_free(1155, &abs_path); /*clear_drawing(); */ my_strncpy(xctx->sch[xctx->currsch] , "", S(xctx->sch[xctx->currsch])); xctx->currsch--; @@ -219,7 +219,7 @@ void global_tedax_netlist(int global) /* netlister driver */ for(i=0;iinstances; i++) xctx->inst[i].color = stored_flags[i]; propagate_hilights(1, 0, XINSERT_NOREPLACE); draw_hilight_net(1); - my_free(_ALLOC_ID_, &stored_flags); + my_free(1156, &stored_flags); /* print globals nodes found in netlist 28032003 */ record_global_node(0,fd,NULL); diff --git a/src/token.c b/src/token.c index 7db7d668..52febe71 100644 --- a/src/token.c +++ b/src/token.c @@ -50,15 +50,15 @@ void hash_all_names(void) int_hash_init(&xctx->inst_table, HASHSIZE); for(i=0; iinstances; i++) { if(xctx->inst[i].instname && xctx->inst[i].instname[0]) { - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1157, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if(!type) continue; - my_strdup(_ALLOC_ID_, &upinst, xctx->inst[i].instname); + my_strdup(1158, &upinst, xctx->inst[i].instname); strtoupper(upinst); int_hash_lookup(&xctx->inst_table, upinst, i, XINSERT); } } - my_free(_ALLOC_ID_, &upinst); - my_free(_ALLOC_ID_, &type); + my_free(1159, &upinst); + my_free(1160, &type); } const char *tcl_hook2(char **res) @@ -68,13 +68,13 @@ const char *tcl_hook2(char **res) char *unescaped_res; if(res == NULL || *res == NULL) { - my_free(_ALLOC_ID_, &result); + my_free(1161, &result); return empty; } if(strstr(*res, "tcleval(") == *res) { unescaped_res = str_replace(*res, "\\}", "}"); tclvareval("tclpropeval2 {", unescaped_res, "}" , NULL); - my_strdup2(_ALLOC_ID_, &result, tclresult()); + my_strdup2(1162, &result, tclresult()); /* dbg(0, "tcl_hook2: return: %s\n", result);*/ return result; } else { @@ -114,9 +114,9 @@ void check_unique_names(int rename) first = 1; for(i=0;iinstances;i++) { if(xctx->inst[i].instname && xctx->inst[i].instname[0]) { - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1163, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if(!type) continue; - my_strdup(_ALLOC_ID_, &upinst, xctx->inst[i].instname); + my_strdup(1164, &upinst, xctx->inst[i].instname); strtoupper(upinst); if( (entry = int_hash_lookup(&xctx->inst_table, upinst, i, XINSERT_NOREPLACE) ) && entry->value != i) { dbg(1, "check_unique_names(): found duplicate: i=%d name=%s\n", i, xctx->inst[i].instname); @@ -135,19 +135,19 @@ void check_unique_names(int rename) } } if( (xctx->inst[i].color != -10000) && rename) { - my_strdup(_ALLOC_ID_, &tmp, xctx->inst[i].prop_ptr); + my_strdup(1165, &tmp, xctx->inst[i].prop_ptr); new_prop_string(i, tmp, newpropcnt++, 0); - my_strdup(_ALLOC_ID_, &upinst, xctx->inst[i].instname); + my_strdup(1166, &upinst, xctx->inst[i].instname); strtoupper(upinst); int_hash_lookup(&xctx->inst_table, upinst, i, XINSERT); symbol_bbox(i, &xctx->inst[i].x1, &xctx->inst[i].y1, &xctx->inst[i].x2, &xctx->inst[i].y2); bbox(ADD, xctx->inst[i].x1, xctx->inst[i].y1, xctx->inst[i].x2, xctx->inst[i].y2); - my_free(_ALLOC_ID_, &tmp); + my_free(1167, &tmp); } } } /* for(i...) */ - my_free(_ALLOC_ID_, &upinst); - my_free(_ALLOC_ID_, &type); + my_free(1168, &upinst); + my_free(1169, &type); if(rename == 1 && xctx->hilight_nets) { bbox(SET,0.0,0.0,0.0,0.0); draw(); @@ -202,8 +202,8 @@ int set_different_token(char **s,const char *new, const char *old, int object, i if(new==NULL) return 0; sizeval = sizetok = CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &token, sizetok); - my_realloc(_ALLOC_ID_, &value, sizeval); + my_realloc(1170, &token, sizetok); + my_realloc(1171, &value, sizeval); /* parse new string and add / change attributes that are missing / different from old */ while(1) { @@ -231,7 +231,7 @@ int set_different_token(char **s,const char *new, const char *old, int object, i value_pos=0; if(strcmp(value, get_tok_value(old,token,1))) { mod=1; - my_strdup(_ALLOC_ID_, s, subst_token(*s, token, value) ); + my_strdup(1172, s, subst_token(*s, token, value) ); } state=TOK_BEGIN; } @@ -266,7 +266,7 @@ int set_different_token(char **s,const char *new, const char *old, int object, i get_tok_value(new,token,1); if(xctx->tok_size == 0 ) { mod=1; - my_strdup(_ALLOC_ID_, s, subst_token(*s, token, NULL) ); + my_strdup(1173, s, subst_token(*s, token, NULL) ); } } else if(state==TOK_END) { value[value_pos]='\0'; @@ -276,8 +276,8 @@ int set_different_token(char **s,const char *new, const char *old, int object, i escape = (c=='\\' && !escape); if(c=='\0') break; } - my_free(_ALLOC_ID_, &token); - my_free(_ALLOC_ID_, &value); + my_free(1174, &token); + my_free(1175, &value); return mod; } @@ -296,12 +296,12 @@ const char *list_tokens(const char *s, int with_quotes) int escape=0; if(s==NULL) { - my_free(_ALLOC_ID_, &token); + my_free(1176, &token); sizetok = 0; return ""; } sizetok = CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &token, sizetok); + my_realloc(1177, &token, sizetok); token[0] = '\0'; while(1) { c=*s++; @@ -367,8 +367,8 @@ const char *get_tok_value(const char *s,const char *tok, int with_quotes) xctx->tok_size = 0; if(s==NULL) { if(tok == NULL) { - my_free(_ALLOC_ID_, &result); - my_free(_ALLOC_ID_, &token); + my_free(1178, &result); + my_free(1179, &token); size = sizetok = 0; dbg(2, "get_tok_value(): clear static data\n"); } @@ -377,8 +377,8 @@ const char *get_tok_value(const char *s,const char *tok, int with_quotes) /* dbg(0, "get_tok_value(): looking for <%s> in <%.30s>\n",tok,s); */ if( size == 0 ) { sizetok = size = CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &result, size); - my_realloc(_ALLOC_ID_, &token, sizetok); + my_realloc(1180, &result, size); + my_realloc(1181, &token, sizetok); } while(1) { c=*s++; @@ -391,11 +391,11 @@ const char *get_tok_value(const char *s,const char *tok, int with_quotes) /* don't use STR_ALLOC() for efficiency reasons */ if(value_pos>=size) { size+=CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &result,size); + my_realloc(1182, &result,size); } if(token_pos>=sizetok) { sizetok+=CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &token,sizetok); + my_realloc(1183, &token,sizetok); } if(c=='"') { if(!escape) quote=!quote; @@ -459,15 +459,15 @@ const char *get_sym_template(char *s,char *extra) dbg(1, "get_sym_template(): s=%s, extra=%s\n", s, extra); if(s==NULL) { - my_free(_ALLOC_ID_, &result); + my_free(1184, &result); return ""; } l = strlen(s); STR_ALLOC(&result, l+1, &sizeres); result[0] = '\0'; sizetok = sizeval = CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &value,sizeval); - my_realloc(_ALLOC_ID_, &token,sizetok); + my_realloc(1185, &value,sizeval); + my_realloc(1186, &token,sizetok); while(1) { c=*s++; space=SPACE(c) ; @@ -516,8 +516,8 @@ const char *get_sym_template(char *s,char *extra) break; } } - my_free(_ALLOC_ID_, &value); - my_free(_ALLOC_ID_, &token); + my_free(1187, &value); + my_free(1188, &token); return result; } @@ -538,20 +538,20 @@ static char *get_pin_attr_from_inst(int inst, int pin, const char *attr) size_t tok_val_len; tok_val_len = strlen(str); attr_size = strlen(attr); - my_strdup(_ALLOC_ID_, &pinname, str); - pname =my_malloc(_ALLOC_ID_, tok_val_len + attr_size + 30); + my_strdup(1189, &pinname, str); + pname =my_malloc(1190, tok_val_len + attr_size + 30); my_snprintf(pname, tok_val_len + attr_size + 30, "%s(%s)", attr, pinname); - my_free(_ALLOC_ID_, &pinname); + my_free(1191, &pinname); str = get_tok_value(xctx->inst[inst].prop_ptr, pname, 0); - my_free(_ALLOC_ID_, &pname); - if(xctx->tok_size) my_strdup2(_ALLOC_ID_, &pin_attr_value, str); + my_free(1192, &pname); + if(xctx->tok_size) my_strdup2(1193, &pin_attr_value, str); else { - pnumber = my_malloc(_ALLOC_ID_, attr_size + 100); + pnumber = my_malloc(1194, attr_size + 100); my_snprintf(pnumber, attr_size + 100, "%s(%d)", attr, pin); str = get_tok_value(xctx->inst[inst].prop_ptr, pnumber, 0); dbg(1, "get_pin_attr_from_inst(): pnumber=%s\n", pnumber); - my_free(_ALLOC_ID_, &pnumber); - if(xctx->tok_size) my_strdup2(_ALLOC_ID_, &pin_attr_value, str); + my_free(1195, &pnumber); + if(xctx->tok_size) my_strdup2(1196, &pin_attr_value, str); } } return pin_attr_value; /* caller is responsible for freeing up storage for pin_attr_value */ @@ -583,19 +583,19 @@ void new_prop_string(int i, const char *old_prop, int fast, int dis_uniq_names) } if(old_prop==NULL) { - my_free(_ALLOC_ID_, &xctx->inst[i].prop_ptr); - my_strdup2(_ALLOC_ID_, &xctx->inst[i].instname, ""); + my_free(1197, &xctx->inst[i].prop_ptr); + my_strdup2(1198, &xctx->inst[i].instname, ""); return; } - old_name_len = my_strdup(_ALLOC_ID_, &old_name,get_tok_value(old_prop,"name",0) ); /* added old_name_len */ - my_strdup(_ALLOC_ID_, &up_old_name, old_name); + old_name_len = my_strdup(1199, &old_name,get_tok_value(old_prop,"name",0) ); /* added old_name_len */ + my_strdup(1200, &up_old_name, old_name); strtoupper(up_old_name); if(old_name==NULL) { - my_strdup(_ALLOC_ID_, &xctx->inst[i].prop_ptr, old_prop); /* changed to copy old props if no name */ - my_strdup2(_ALLOC_ID_, &xctx->inst[i].instname, ""); - my_free(_ALLOC_ID_, &up_old_name); + my_strdup(1201, &xctx->inst[i].prop_ptr, old_prop); /* changed to copy old props if no name */ + my_strdup2(1202, &xctx->inst[i].instname, ""); + my_free(1203, &up_old_name); return; } xctx->prefix=old_name[0]; @@ -604,17 +604,17 @@ void new_prop_string(int i, const char *old_prop, int fast, int dis_uniq_names) if(dis_uniq_names || (entry = int_hash_lookup(&xctx->inst_table, up_old_name, i, XLOOKUP))==NULL || entry->value == i) { - my_strdup(_ALLOC_ID_, &xctx->inst[i].prop_ptr, old_prop); - my_strdup2(_ALLOC_ID_, &xctx->inst[i].instname, old_name); + my_strdup(1204, &xctx->inst[i].prop_ptr, old_prop); + my_strdup2(1205, &xctx->inst[i].instname, old_name); int_hash_lookup(&xctx->inst_table, up_old_name, i, XINSERT); - my_free(_ALLOC_ID_, &old_name); - my_free(_ALLOC_ID_, &up_old_name); + my_free(1206, &old_name); + my_free(1207, &up_old_name); return; } - old_name_base = my_malloc(_ALLOC_ID_, old_name_len+1); + old_name_base = my_malloc(1208, old_name_len+1); n = sscanf(old_name, "%[^[0-9]",old_name_base); tmp=find_bracket(old_name); - my_realloc(_ALLOC_ID_, &new_name, old_name_len + 40); /* strlen(old_name)+40); */ + my_realloc(1209, &new_name, old_name_len + 40); /* strlen(old_name)+40); */ qq=fast ? last[(int)xctx->prefix] : 1; for(q=qq;;q++) { @@ -623,7 +623,7 @@ void new_prop_string(int i, const char *old_prop, int fast, int dis_uniq_names) } else { /* goes here if weird name set for example to name=[3:0] or name=12 */ my_snprintf(new_name, old_name_len + 40, "%c%d%s", xctx->prefix,q, tmp); } - my_strdup(_ALLOC_ID_, &up_new_name, new_name); + my_strdup(1210, &up_new_name, new_name); strtoupper(up_new_name); if((entry = int_hash_lookup(&xctx->inst_table, up_new_name, i, XLOOKUP)) == NULL || entry->value == i) { @@ -631,17 +631,17 @@ void new_prop_string(int i, const char *old_prop, int fast, int dis_uniq_names) break; } } - my_free(_ALLOC_ID_, &old_name_base); + my_free(1211, &old_name_base); tmp2 = subst_token(old_prop, "name", new_name); if(strcmp(tmp2, old_prop) ) { - my_strdup(_ALLOC_ID_, &xctx->inst[i].prop_ptr, tmp2); - my_strdup2(_ALLOC_ID_, &xctx->inst[i].instname, new_name); + my_strdup(1212, &xctx->inst[i].prop_ptr, tmp2); + my_strdup2(1213, &xctx->inst[i].instname, new_name); int_hash_lookup(&xctx->inst_table, up_new_name, i, XINSERT); /* reinsert in hash */ } - my_free(_ALLOC_ID_, &old_name); - my_free(_ALLOC_ID_, &up_old_name); - my_free(_ALLOC_ID_, &new_name); - my_free(_ALLOC_ID_, &up_new_name); + my_free(1214, &old_name); + my_free(1215, &up_old_name); + my_free(1216, &new_name); + my_free(1217, &up_new_name); } @@ -693,22 +693,22 @@ static void print_vhdl_primitive(FILE *fd, int inst) /* netlist primitives, 200 int no_of_pins=0; char *fmt_attr = NULL; - my_strdup(_ALLOC_ID_, &template, (xctx->inst[inst].ptr + xctx->sym)->templ); - my_strdup(_ALLOC_ID_, &name, xctx->inst[inst].instname); + my_strdup(1218, &template, (xctx->inst[inst].ptr + xctx->sym)->templ); + my_strdup(1219, &name, xctx->inst[inst].instname); fmt_attr = xctx->format ? xctx->format : "vhdl_format"; - if(!name) my_strdup(_ALLOC_ID_, &name, get_tok_value(template, "name", 0)); + if(!name) my_strdup(1220, &name, get_tok_value(template, "name", 0)); /* allow format string override in instance */ - my_strdup(_ALLOC_ID_, &format, get_tok_value(xctx->inst[inst].prop_ptr, fmt_attr, 2)); + my_strdup(1221, &format, get_tok_value(xctx->inst[inst].prop_ptr, fmt_attr, 2)); if(!format && strcmp(fmt_attr, "vhdl_format")) - my_strdup(_ALLOC_ID_, &format, get_tok_value(xctx->inst[inst].prop_ptr, "vhdl_format", 2)); + my_strdup(1222, &format, get_tok_value(xctx->inst[inst].prop_ptr, "vhdl_format", 2)); if(!format) - my_strdup(_ALLOC_ID_, &format, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, fmt_attr, 2)); + my_strdup(1223, &format, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, fmt_attr, 2)); if(!format && strcmp(fmt_attr, "vhdl_format")) - my_strdup(_ALLOC_ID_, &format, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, "vhdl_format", 2)); + my_strdup(1224, &format, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, "vhdl_format", 2)); if((name==NULL) || (format==NULL) ) { - my_free(_ALLOC_ID_, &template); - my_free(_ALLOC_ID_, &name); - my_free(_ALLOC_ID_, &format); + my_free(1225, &template); + my_free(1226, &name); + my_free(1227, &format); return; /*do no netlist unwanted insts(no format) */ } no_of_pins= (xctx->inst[inst].ptr + xctx->sym)->rects[PINLAYER]; @@ -851,12 +851,12 @@ static void print_vhdl_primitive(FILE *fd, int inst) /* netlist primitives, 200 size_t s; char *tclcmd=NULL; s = token_pos + strlen(name) + strlen(xctx->inst[inst].name) + 100; - tclcmd = my_malloc(_ALLOC_ID_, s); + tclcmd = my_malloc(1228, s); Tcl_ResetResult(interp); my_snprintf(tclcmd, s, "tclpropeval {%s} {%s} {%s}", token, name, xctx->inst[inst].name); tcleval(tclcmd); fprintf(fd, "%s", tclresult()); - my_free(_ALLOC_ID_, &tclcmd); + my_free(1229, &tclcmd); } if(c!='%' && c!='@' && c!='\0' ) fputc(c,fd); @@ -872,10 +872,10 @@ static void print_vhdl_primitive(FILE *fd, int inst) /* netlist primitives, 200 break ; } } - my_free(_ALLOC_ID_, &template); - my_free(_ALLOC_ID_, &format); - my_free(_ALLOC_ID_, &name); - my_free(_ALLOC_ID_, &token); + my_free(1230, &template); + my_free(1231, &format); + my_free(1232, &name); + my_free(1233, &token); } const char *subst_token(const char *s, const char *tok, const char *new_val) @@ -898,26 +898,26 @@ const char *subst_token(const char *s, const char *tok, const char *new_val) size_t new_val_len; if(s==NULL && tok == NULL){ - my_free(_ALLOC_ID_, &result); + my_free(1234, &result); return ""; } if((tok == NULL || tok[0]=='\0') && s ){ - my_strdup2(_ALLOC_ID_, &result, s); + my_strdup2(1235, &result, s); return result; } /* quote new_val if it contains newlines and not "name" token */ if(new_val) { new_val_len = strlen(new_val); if(strcmp(tok, "name") && !is_quoted(new_val) && strpbrk(new_val, ";\n \t")) { - new_val_copy = my_malloc(_ALLOC_ID_, new_val_len+3); + new_val_copy = my_malloc(1236, new_val_len+3); my_snprintf(new_val_copy, new_val_len+3, "\"%s\"", new_val); } - else my_strdup(_ALLOC_ID_, &new_val_copy, new_val); + else my_strdup(1237, &new_val_copy, new_val); } else new_val_copy = NULL; dbg(1, "subst_token(): %s, %s, %s\n", s ? s : "", tok ? tok : "", new_val ? new_val : ""); sizetok = size = CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &result, size); - my_realloc(_ALLOC_ID_, &token, sizetok); + my_realloc(1238, &result, size); + my_realloc(1239, &token, sizetok); result[0] = '\0'; while( s ) { c=*s++; @@ -1042,8 +1042,8 @@ const char *subst_token(const char *s, const char *tok, const char *new_val) } } dbg(2, "subst_token(): returning: %s\n",result); - my_free(_ALLOC_ID_, &token); - my_free(_ALLOC_ID_, &new_val_copy); + my_free(1240, &token); + my_free(1241, &new_val_copy); return result; } @@ -1139,13 +1139,13 @@ void print_vhdl_element(FILE *fd, int inst) print_vhdl_primitive(fd, inst); return; } - my_strdup(_ALLOC_ID_, &name,xctx->inst[inst].instname); - if(!name) my_strdup(_ALLOC_ID_, &name, get_tok_value(template, "name", 0)); + my_strdup(1242, &name,xctx->inst[inst].instname); + if(!name) my_strdup(1243, &name, get_tok_value(template, "name", 0)); if(name==NULL) { - my_free(_ALLOC_ID_, &name); + my_free(1244, &name); return; } - my_strdup(_ALLOC_ID_, &template, (xctx->inst[inst].ptr + xctx->sym)->templ); + my_strdup(1245, &template, (xctx->inst[inst].ptr + xctx->sym)->templ); no_of_pins= (xctx->inst[inst].ptr + xctx->sym)->rects[PINLAYER]; no_of_generics= (xctx->inst[inst].ptr + xctx->sym)->rects[GENERICLAYER]; @@ -1164,7 +1164,7 @@ void print_vhdl_element(FILE *fd, int inst) tmp=0; /* 20080213 use generic_type property to decide if some properties are strings, see later */ - my_strdup(_ALLOC_ID_, &generic_type, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr,"generic_type", 0)); + my_strdup(1246, &generic_type, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr,"generic_type", 0)); while(1) { @@ -1229,10 +1229,10 @@ void print_vhdl_element(FILE *fd, int inst) /* print generic map */ for(i=0;iinst[inst].ptr + xctx->sym)->rect[GENERICLAYER][i].prop_ptr,"type",0)); - my_strdup(_ALLOC_ID_, &generic_value, xctx->inst[inst].node[no_of_pins+i] ); - /*my_strdup(_ALLOC_ID_, &generic_value, get_tok_value( */ + my_strdup(1248, &generic_value, xctx->inst[inst].node[no_of_pins+i] ); + /*my_strdup(1249, &generic_value, get_tok_value( */ /* (xctx->inst[inst].ptr + xctx->sym)->rect[GENERICLAYER][i].prop_ptr,"value") ); */ str_ptr = get_tok_value( (xctx->inst[inst].ptr + xctx->sym)->rect[GENERICLAYER][i].prop_ptr,"name",0); @@ -1271,12 +1271,12 @@ void print_vhdl_element(FILE *fd, int inst) int_hash_free(&table); fprintf(fd, "\n);\n\n"); dbg(2, "print_vhdl_element(): ------- end ------ \n"); - my_free(_ALLOC_ID_, &name); - my_free(_ALLOC_ID_, &generic_value); - my_free(_ALLOC_ID_, &generic_type); - my_free(_ALLOC_ID_, &template); - my_free(_ALLOC_ID_, &value); - my_free(_ALLOC_ID_, &token); + my_free(1250, &name); + my_free(1251, &generic_value); + my_free(1252, &generic_type); + my_free(1253, &template); + my_free(1254, &value); + my_free(1255, &token); } void print_generic(FILE *fd, char *ent_or_comp, int symbol) @@ -1293,12 +1293,12 @@ void print_generic(FILE *fd, char *ent_or_comp, int symbol) int escape=0; int token_number=0; - my_strdup(_ALLOC_ID_, &template, xctx->sym[symbol].templ); + my_strdup(1256, &template, xctx->sym[symbol].templ); if( !template || !(template[0]) ) { - my_free(_ALLOC_ID_, &template); + my_free(1257, &template); return; } - my_strdup(_ALLOC_ID_, &generic_type, get_tok_value(xctx->sym[symbol].prop_ptr,"generic_type",0)); + my_strdup(1258, &generic_type, get_tok_value(xctx->sym[symbol].prop_ptr,"generic_type",0)); dbg(2, "print_generic(): symbol=%d template=%s \n", symbol, template); fprintf(fd, "%s %s ",ent_or_comp, skip_dir(xctx->sym[symbol].name)); @@ -1342,7 +1342,7 @@ void print_generic(FILE *fd, char *ent_or_comp, int symbol) token_number++; value[value_pos]='\0'; value_pos=0; - my_strdup(_ALLOC_ID_, &type, get_tok_value(generic_type,token,0)); + my_strdup(1259, &type, get_tok_value(generic_type,token,0)); if(value[0] != '\0') /* token has a value */ { @@ -1369,9 +1369,9 @@ void print_generic(FILE *fd, char *ent_or_comp, int symbol) for(i=0;isym[symbol].rects[GENERICLAYER];i++) { - my_strdup(_ALLOC_ID_, &generic_type, + my_strdup(1260, &generic_type, get_tok_value(xctx->sym[symbol].rect[GENERICLAYER][i].prop_ptr,"generic_type",0)); - my_strdup(_ALLOC_ID_, &generic_value, + my_strdup(1261, &generic_value, get_tok_value(xctx->sym[symbol].rect[GENERICLAYER][i].prop_ptr,"value", 0) ); str_tmp = get_tok_value(xctx->sym[symbol].rect[GENERICLAYER][i].prop_ptr,"name",0); if(!tmp) fprintf(fd, "generic (\n"); @@ -1383,12 +1383,12 @@ void print_generic(FILE *fd, char *ent_or_comp, int symbol) tmp=1; } if(tmp) fprintf(fd, "\n);\n"); - my_free(_ALLOC_ID_, &template); - my_free(_ALLOC_ID_, &value); - my_free(_ALLOC_ID_, &token); - my_free(_ALLOC_ID_, &type); - my_free(_ALLOC_ID_, &generic_type); - my_free(_ALLOC_ID_, &generic_value); + my_free(1262, &template); + my_free(1263, &value); + my_free(1264, &token); + my_free(1265, &type); + my_free(1266, &generic_type); + my_free(1267, &generic_value); } @@ -1403,13 +1403,13 @@ void print_verilog_param(FILE *fd, int symbol) int token_number=0; char *extra = NULL; - my_strdup(_ALLOC_ID_, &template, xctx->sym[symbol].templ); /* 20150409 20171103 */ + my_strdup(1268, &template, xctx->sym[symbol].templ); /* 20150409 20171103 */ if( !template || !(template[0]) ) { - my_free(_ALLOC_ID_, &template); + my_free(1269, &template); return; } - my_strdup(_ALLOC_ID_, &generic_type, get_tok_value(xctx->sym[symbol].prop_ptr,"generic_type",0)); - my_strdup(_ALLOC_ID_, &extra, get_tok_value(xctx->sym[symbol].prop_ptr,"extra",0) ); + my_strdup(1270, &generic_type, get_tok_value(xctx->sym[symbol].prop_ptr,"generic_type",0)); + my_strdup(1271, &extra, get_tok_value(xctx->sym[symbol].prop_ptr,"extra",0) ); dbg(2, "print_verilog_param(): symbol=%d template=%s \n", symbol, template); s=template; @@ -1471,11 +1471,11 @@ void print_verilog_param(FILE *fd, int symbol) break ; } } - my_free(_ALLOC_ID_, &template); - my_free(_ALLOC_ID_, &generic_type); - my_free(_ALLOC_ID_, &value); - my_free(_ALLOC_ID_, &token); - my_free(_ALLOC_ID_, &extra); + my_free(1272, &template); + my_free(1273, &generic_type); + my_free(1274, &value); + my_free(1275, &token); + my_free(1276, &extra); } @@ -1514,18 +1514,18 @@ void print_spice_subckt_nodes(FILE *fd, int symbol) const char *tclres, *fmt_attr = NULL; fmt_attr = xctx->format ? xctx->format : "format"; - my_strdup(_ALLOC_ID_, &format1, get_tok_value(xctx->sym[symbol].prop_ptr, fmt_attr, 2)); + my_strdup(1277, &format1, get_tok_value(xctx->sym[symbol].prop_ptr, fmt_attr, 2)); if(!format1 && strcmp(fmt_attr, "format") ) - my_strdup(_ALLOC_ID_, &format1, get_tok_value(xctx->sym[symbol].prop_ptr, "format", 2)); + my_strdup(1278, &format1, get_tok_value(xctx->sym[symbol].prop_ptr, "format", 2)); dbg(1, "print_spice_subckt(): format1=%s\n", format1); if(format1 && strstr(format1, "tcleval(") == format1) { tclres = tcl_hook2(&format1); - if(!strcmp(tclres, "?\n")) my_strdup(_ALLOC_ID_, &format, format1 + 8); - else my_strdup(_ALLOC_ID_, &format, tclres); + if(!strcmp(tclres, "?\n")) my_strdup(1279, &format, format1 + 8); + else my_strdup(1280, &format, tclres); } else { - my_strdup(_ALLOC_ID_, &format, format1); + my_strdup(1281, &format, format1); } - if(format1) my_free(_ALLOC_ID_, &format1); + if(format1) my_free(1282, &format1); dbg(1, "print_spice_subckt(): format=%s\n", format); if( format==NULL ) { return; /* no format */ @@ -1628,9 +1628,9 @@ void print_spice_subckt_nodes(FILE *fd, int symbol) break ; } } - my_free(_ALLOC_ID_, &format1); - my_free(_ALLOC_ID_, &format); - my_free(_ALLOC_ID_, &token); + my_free(1283, &format1); + my_free(1284, &format); + my_free(1285, &token); } int print_spice_element(FILE *fd, int inst) @@ -1654,27 +1654,27 @@ int print_spice_element(FILE *fd, int inst) const char *fmt_attr = NULL; size = CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &result, size); + my_realloc(1286, &result, size); result[0] = '\0'; - my_strdup(_ALLOC_ID_, &template, (xctx->inst[inst].ptr + xctx->sym)->templ); - my_strdup(_ALLOC_ID_, &name,xctx->inst[inst].instname); - if (!name) my_strdup(_ALLOC_ID_, &name, get_tok_value(template, "name", 0)); + my_strdup(1287, &template, (xctx->inst[inst].ptr + xctx->sym)->templ); + my_strdup(1288, &name,xctx->inst[inst].instname); + if (!name) my_strdup(1289, &name, get_tok_value(template, "name", 0)); /* allow format string override in instance */ fmt_attr = xctx->format ? xctx->format : "format"; - my_strdup(_ALLOC_ID_, &format, get_tok_value(xctx->inst[inst].prop_ptr, fmt_attr, 2)); + my_strdup(1290, &format, get_tok_value(xctx->inst[inst].prop_ptr, fmt_attr, 2)); if(!format && strcmp(fmt_attr, "format") ) - my_strdup(_ALLOC_ID_, &format, get_tok_value(xctx->inst[inst].prop_ptr, "format", 2)); + my_strdup(1291, &format, get_tok_value(xctx->inst[inst].prop_ptr, "format", 2)); if(!format) - my_strdup(_ALLOC_ID_, &format, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, fmt_attr, 2)); + my_strdup(1292, &format, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, fmt_attr, 2)); if(!format && strcmp(fmt_attr, "format")) - my_strdup(_ALLOC_ID_, &format, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, "format", 2)); + my_strdup(1293, &format, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, "format", 2)); if ((name==NULL) || (format==NULL)) { - my_free(_ALLOC_ID_, &template); - my_free(_ALLOC_ID_, &format); - my_free(_ALLOC_ID_, &name); - my_free(_ALLOC_ID_, &result); + my_free(1294, &template); + my_free(1295, &format); + my_free(1296, &name); + my_free(1297, &result); return 0; /* do no netlist unwanted insts(no format) */ } no_of_pins= (xctx->inst[inst].ptr + xctx->sym)->rects[PINLAYER]; @@ -1725,7 +1725,7 @@ int print_spice_element(FILE *fd, int inst) tok_val_len = strlen(value); if(!strcmp(token, "@spiceprefix")) { - my_realloc(_ALLOC_ID_, &spiceprefixtag, tok_val_len+22); + my_realloc(1298, &spiceprefixtag, tok_val_len+22); my_snprintf(spiceprefixtag, tok_val_len+22, "**** spice_prefix %s\n", value); value = spiceprefixtag; } @@ -1736,8 +1736,8 @@ int print_spice_element(FILE *fd, int inst) /* if (!strncmp(value,"tcleval(", 8)) { dbg(1, "print_spice_element(): value=%s\n", value); - my_strdup2(_ALLOC_ID_, &translatedvalue, value); - my_strdup2(_ALLOC_ID_, &translatedvalue, translate(inst, translatedvalue)); + my_strdup2(1299, &translatedvalue, value); + my_strdup2(1300, &translatedvalue, translate(inst, translatedvalue)); value = translatedvalue; } */ @@ -1886,7 +1886,7 @@ int print_spice_element(FILE *fd, int inst) char *tclcmd=NULL; const char *res; s = token_pos + strlen(name) + strlen(xctx->inst[inst].name) + 100; - tclcmd = my_malloc(_ALLOC_ID_, s); + tclcmd = my_malloc(1301, s); Tcl_ResetResult(interp); my_snprintf(tclcmd, s, "tclpropeval {%s} {%s} {%s}", token, name, xctx->inst[inst].name); dbg(1, "print_spice_element(): tclpropeval {%s} {%s} {%s}", token, name, xctx->inst[inst].name); @@ -1897,7 +1897,7 @@ int print_spice_element(FILE *fd, int inst) STR_ALLOC(&result, tmp + result_pos, &size); result_pos += my_snprintf(result + result_pos, tmp, "%s", res); /* fprintf(fd, "%s", tclresult()); */ - my_free(_ALLOC_ID_, &tclcmd); + my_free(1302, &tclcmd); } /* /20171029 */ @@ -1927,7 +1927,7 @@ int print_spice_element(FILE *fd, int inst) /* do one level of substitutions to resolve @params and equations*/ if(result && strstr(result, "tcleval(")== result) { dbg(1, "print_spice_element(): before translate() result=%s\n", result); - my_strdup(_ALLOC_ID_, &result, translate(inst, result)); + my_strdup(1303, &result, translate(inst, result)); dbg(1, "print_spice_element(): after translate() result=%s\n", result); } @@ -1945,19 +1945,19 @@ int print_spice_element(FILE *fd, int inst) * c++; * if(!*c) break; * } - * my_strdup2(_ALLOC_ID_, &result, translate(inst, result+5)); + * my_strdup2(1304, &result, translate(inst, result+5)); * } #endif if(result) fprintf(fd, "%s", result); - my_free(_ALLOC_ID_, &template); - my_free(_ALLOC_ID_, &format); - my_free(_ALLOC_ID_, &name); - my_free(_ALLOC_ID_, &token); - my_free(_ALLOC_ID_, &result); - my_free(_ALLOC_ID_, &spiceprefixtag); - /* my_free(_ALLOC_ID_, &translatedvalue); */ + my_free(1305, &template); + my_free(1306, &format); + my_free(1307, &name); + my_free(1308, &token); + my_free(1309, &result); + my_free(1310, &spiceprefixtag); + /* my_free(1311, &translatedvalue); */ return 1; } @@ -1983,24 +1983,24 @@ void print_tedax_element(FILE *fd, int inst) int no_of_pins=0; int subcircuit = 0; - my_strdup(_ALLOC_ID_, &extra, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr,"extra",0)); - my_strdup(_ALLOC_ID_, &extra_pinnumber, get_tok_value(xctx->inst[inst].prop_ptr,"extra_pinnumber",0)); - if(!extra_pinnumber) my_strdup(_ALLOC_ID_, &extra_pinnumber, + my_strdup(1312, &extra, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr,"extra",0)); + my_strdup(1313, &extra_pinnumber, get_tok_value(xctx->inst[inst].prop_ptr,"extra_pinnumber",0)); + if(!extra_pinnumber) my_strdup(1314, &extra_pinnumber, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr,"extra_pinnumber",0)); - my_strdup(_ALLOC_ID_, &template, + my_strdup(1315, &template, (xctx->inst[inst].ptr + xctx->sym)->templ); - my_strdup(_ALLOC_ID_, &numslots, get_tok_value(xctx->inst[inst].prop_ptr,"numslots",0)); - if(!numslots) my_strdup(_ALLOC_ID_, &numslots, get_tok_value(template,"numslots",0)); - if(!numslots) my_strdup(_ALLOC_ID_, &numslots, "1"); + my_strdup(1316, &numslots, get_tok_value(xctx->inst[inst].prop_ptr,"numslots",0)); + if(!numslots) my_strdup(1317, &numslots, get_tok_value(template,"numslots",0)); + if(!numslots) my_strdup(1318, &numslots, "1"); - my_strdup(_ALLOC_ID_, &name,xctx->inst[inst].instname); + my_strdup(1319, &name,xctx->inst[inst].instname); /* my_strdup(xxx, &name,get_tok_value(xctx->inst[inst].prop_ptr,"name",0)); */ - if(!name) my_strdup(_ALLOC_ID_, &name, get_tok_value(template, "name", 0)); + if(!name) my_strdup(1320, &name, get_tok_value(template, "name", 0)); /* allow format string override in instance */ - my_strdup(_ALLOC_ID_, &format, get_tok_value(xctx->inst[inst].prop_ptr,"tedax_format",2)); + my_strdup(1321, &format, get_tok_value(xctx->inst[inst].prop_ptr,"tedax_format",2)); if(!format || !format[0]) - my_strdup(_ALLOC_ID_, &format, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr,"tedax_format",2)); + my_strdup(1322, &format, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr,"tedax_format",2)); no_of_pins= (xctx->inst[inst].ptr + xctx->sym)->rects[PINLAYER]; if( !format && !strcmp((xctx->inst[inst].ptr + xctx->sym)->type, "subcircuit") ) { @@ -2017,15 +2017,15 @@ void print_tedax_element(FILE *fd, int inst) fprintf(fd, "__subcircuit__ %s %s\n", skip_dir(xctx->inst[inst].name), xctx->inst[inst].instname); int_hash_init(&table, 37); for(i=0;iinst[inst].ptr + xctx->sym)->rect[PINLAYER][i].prop_ptr,"name",0)); - my_strdup2(_ALLOC_ID_, &pin, expandlabel(pinname, &pin_mult)); + my_strdup2(1325, &pin, expandlabel(pinname, &pin_mult)); if(!int_hash_lookup(&table, pinname, 1, XINSERT_NOREPLACE)) { dbg(1, "#net=%s pinname=%s pin=%s net_mult=%d pin_mult=%d\n", net, pinname, pin, net_mult, pin_mult); for(n = 0; n < net_mult; n++) { - my_strdup(_ALLOC_ID_, &netbit, find_nth(net, ",", n+1)); - my_strdup(_ALLOC_ID_, &pinbit, find_nth(pin, ",", n+1)); + my_strdup(1326, &netbit, find_nth(net, ",", n+1)); + my_strdup(1327, &pinbit, find_nth(pin, ",", n+1)); fprintf(fd, "__map__ %s -> %s\n", pinbit ? pinbit : "__UNCONNECTED_PIN__", netbit ? netbit : "__UNCONNECTED_PIN__"); @@ -2033,21 +2033,21 @@ void print_tedax_element(FILE *fd, int inst) } } int_hash_free(&table); - my_free(_ALLOC_ID_, &net); - my_free(_ALLOC_ID_, &pin); - my_free(_ALLOC_ID_, &pinname); - my_free(_ALLOC_ID_, &pinbit); - my_free(_ALLOC_ID_, &netbit); + my_free(1328, &net); + my_free(1329, &pin); + my_free(1330, &pinname); + my_free(1331, &pinbit); + my_free(1332, &netbit); fprintf(fd, "\n"); } if(name==NULL || !format || !format[0]) { - my_free(_ALLOC_ID_, &extra); - my_free(_ALLOC_ID_, &extra_pinnumber); - my_free(_ALLOC_ID_, &template); - my_free(_ALLOC_ID_, &numslots); - my_free(_ALLOC_ID_, &format); - my_free(_ALLOC_ID_, &name); + my_free(1333, &extra); + my_free(1334, &extra_pinnumber); + my_free(1335, &template); + my_free(1336, &numslots); + my_free(1337, &format); + my_free(1338, &name); return; } @@ -2057,10 +2057,10 @@ void print_tedax_element(FILE *fd, int inst) char *pinnumber; pinnumber = get_pin_attr_from_inst(inst, i, "pinnumber"); if(!pinnumber) { - my_strdup2(_ALLOC_ID_, &pinnumber, + my_strdup2(1339, &pinnumber, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->rect[PINLAYER][i].prop_ptr,"pinnumber",0)); } - if(!xctx->tok_size) my_strdup(_ALLOC_ID_, &pinnumber, "--UNDEF--"); + if(!xctx->tok_size) my_strdup(1340, &pinnumber, "--UNDEF--"); tmp = net_name(inst,i, &multip, 0, 1); if(tmp && !strstr(tmp, "__UNCONNECTED_PIN__")) { fprintf(fd, "conn %s %s %s %s %d\n", @@ -2070,7 +2070,7 @@ void print_tedax_element(FILE *fd, int inst) pinnumber, i+1); } - my_free(_ALLOC_ID_, &pinnumber); + my_free(1341, &pinnumber); } if(extra){ @@ -2210,8 +2210,8 @@ void print_tedax_element(FILE *fd, int inst) if( strchr(token, ':') ) { int n; - char *subtok = my_malloc(_ALLOC_ID_, sizetok * sizeof(char)); - char *subtok2 = my_malloc(_ALLOC_ID_, sizetok * sizeof(char)+20); + char *subtok = my_malloc(1342, sizetok * sizeof(char)); + char *subtok2 = my_malloc(1343, sizetok * sizeof(char)+20); subtok[0]='\0'; n=-1; sscanf(token+2, "%d:%s", &n, subtok); @@ -2232,8 +2232,8 @@ void print_tedax_element(FILE *fd, int inst) fprintf(fd, "%s", value); } } - my_free(_ALLOC_ID_, &subtok); - my_free(_ALLOC_ID_, &subtok2); + my_free(1344, &subtok); + my_free(1345, &subtok2); } else { /* reference by pin number instead of pin name, allows faster lookup of the attached net name */ /* @#n --> return net name attached to pin of index 'n' */ @@ -2249,12 +2249,12 @@ void print_tedax_element(FILE *fd, int inst) size_t s; char *tclcmd=NULL; s = token_pos + strlen(name) + strlen(xctx->inst[inst].name) + 100; - tclcmd = my_malloc(_ALLOC_ID_, s); + tclcmd = my_malloc(1346, s); Tcl_ResetResult(interp); my_snprintf(tclcmd, s, "tclpropeval {%s} {%s} {%s}", token, name, xctx->inst[inst].name); tcleval(tclcmd); fprintf(fd, "%s", tclresult()); - my_free(_ALLOC_ID_, &tclcmd); + my_free(1347, &tclcmd); /* fprintf(errfp, "%s\n", tclcmd); */ } /* /20171029 */ @@ -2272,13 +2272,13 @@ void print_tedax_element(FILE *fd, int inst) } } /* if(format) */ if(!subcircuit) fprintf(fd,"end_inst\n"); - my_free(_ALLOC_ID_, &extra); - my_free(_ALLOC_ID_, &extra_pinnumber); - my_free(_ALLOC_ID_, &template); - my_free(_ALLOC_ID_, &numslots); - my_free(_ALLOC_ID_, &format); - my_free(_ALLOC_ID_, &name); - my_free(_ALLOC_ID_, &token); + my_free(1348, &extra); + my_free(1349, &extra_pinnumber); + my_free(1350, &template); + my_free(1351, &numslots); + my_free(1352, &format); + my_free(1353, &name); + my_free(1354, &token); } /* print verilog element if verilog_format is specified */ @@ -2297,25 +2297,25 @@ static void print_verilog_primitive(FILE *fd, int inst) /* netlist switch level int symbol = xctx->inst[inst].ptr; const char *fmt_attr = NULL; - my_strdup(_ALLOC_ID_, &template, + my_strdup(1355, &template, (xctx->inst[inst].ptr + xctx->sym)->templ); - my_strdup(_ALLOC_ID_, &name,xctx->inst[inst].instname); - if(!name) my_strdup(_ALLOC_ID_, &name, get_tok_value(template, "name", 0)); + my_strdup(1356, &name,xctx->inst[inst].instname); + if(!name) my_strdup(1357, &name, get_tok_value(template, "name", 0)); fmt_attr = xctx->format ? xctx->format : "verilog_format"; /* allow format string override in instance */ - my_strdup(_ALLOC_ID_, &format, get_tok_value(xctx->inst[inst].prop_ptr, fmt_attr, 2)); + my_strdup(1358, &format, get_tok_value(xctx->inst[inst].prop_ptr, fmt_attr, 2)); if(!format && strcmp(fmt_attr, "verilog_format") ) - my_strdup(_ALLOC_ID_, &format, get_tok_value(xctx->inst[inst].prop_ptr, "verilog_format", 2)); + my_strdup(1359, &format, get_tok_value(xctx->inst[inst].prop_ptr, "verilog_format", 2)); if(!format || !format[0]) - my_strdup(_ALLOC_ID_, &format, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, fmt_attr, 2)); + my_strdup(1360, &format, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, fmt_attr, 2)); if(!format && strcmp(fmt_attr, "verilog_format")) - my_strdup(_ALLOC_ID_, &format, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, "verilog_format", 2)); + my_strdup(1361, &format, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, "verilog_format", 2)); if((name==NULL) || (format==NULL) ) { - my_free(_ALLOC_ID_, &template); - my_free(_ALLOC_ID_, &name); - my_free(_ALLOC_ID_, &format); + my_free(1362, &template); + my_free(1363, &name); + my_free(1364, &format); return; /*do no netlist unwanted insts(no format) */ } no_of_pins= (xctx->inst[inst].ptr + xctx->sym)->rects[PINLAYER]; @@ -2452,12 +2452,12 @@ static void print_verilog_primitive(FILE *fd, int inst) /* netlist switch level size_t s; char *tclcmd=NULL; s = token_pos + strlen(name) + strlen(xctx->inst[inst].name) + 100; - tclcmd = my_malloc(_ALLOC_ID_, s); + tclcmd = my_malloc(1365, s); Tcl_ResetResult(interp); my_snprintf(tclcmd, s, "tclpropeval {%s} {%s} {%s}", token, name, xctx->inst[inst].name); tcleval(tclcmd); fprintf(fd, "%s", tclresult()); - my_free(_ALLOC_ID_, &tclcmd); + my_free(1366, &tclcmd); } if(c!='%' && c!='@' && c!='\0') fputc(c,fd); if(c == '@' || c == '%') s--; @@ -2471,10 +2471,10 @@ static void print_verilog_primitive(FILE *fd, int inst) /* netlist switch level break ; } } - my_free(_ALLOC_ID_, &template); - my_free(_ALLOC_ID_, &format); - my_free(_ALLOC_ID_, &name); - my_free(_ALLOC_ID_, &token); + my_free(1367, &template); + my_free(1368, &format); + my_free(1369, &name); + my_free(1370, &token); } /* verilog module instantiation: @@ -2519,35 +2519,35 @@ void print_verilog_element(FILE *fd, int inst) return; } - my_strdup(_ALLOC_ID_, &name,xctx->inst[inst].instname); - if(!name) my_strdup(_ALLOC_ID_, &name, get_tok_value(template, "name", 0)); + my_strdup(1371, &name,xctx->inst[inst].instname); + if(!name) my_strdup(1372, &name, get_tok_value(template, "name", 0)); if(name==NULL) { - my_free(_ALLOC_ID_, &name); + my_free(1373, &name); return; } /* verilog_extra is the list of additional nodes passed as attributes */ - my_strdup(_ALLOC_ID_, &v_extra, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, "verilog_extra", 0)); + my_strdup(1374, &v_extra, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, "verilog_extra", 0)); /* extra is the list of attributes NOT to consider as instance parameters */ - my_strdup(_ALLOC_ID_, &extra, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, "extra", 0)); - my_strdup(_ALLOC_ID_, &verilogprefix, + my_strdup(1375, &extra, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, "extra", 0)); + my_strdup(1376, &verilogprefix, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, "verilogprefix", 0)); if(verilogprefix) { - my_strdup(_ALLOC_ID_, &symname, verilogprefix); - my_strcat(_ALLOC_ID_, &symname, skip_dir(xctx->inst[inst].name)); + my_strdup(1377, &symname, verilogprefix); + my_strcat(1378, &symname, skip_dir(xctx->inst[inst].name)); } else { - my_strdup(_ALLOC_ID_, &symname, skip_dir(xctx->inst[inst].name)); + my_strdup(1379, &symname, skip_dir(xctx->inst[inst].name)); } - my_free(_ALLOC_ID_, &verilogprefix); - my_strdup(_ALLOC_ID_, &template, (xctx->inst[inst].ptr + xctx->sym)->templ); + my_free(1380, &verilogprefix); + my_strdup(1381, &template, (xctx->inst[inst].ptr + xctx->sym)->templ); no_of_pins= (xctx->inst[inst].ptr + xctx->sym)->rects[PINLAYER]; /* 20080915 use generic_type property to decide if some properties are strings, see later */ - my_strdup(_ALLOC_ID_, &generic_type, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr,"generic_type",0)); + my_strdup(1382, &generic_type, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr,"generic_type",0)); s=xctx->inst[inst].prop_ptr; /* print instance subckt */ dbg(2, "print_verilog_element(): printing inst name & subcircuit name\n"); fprintf(fd, "%s\n", symname); - my_free(_ALLOC_ID_, &symname); + my_free(1383, &symname); /* -------- print generics passed as properties */ tmp=0; while(1) @@ -2659,13 +2659,13 @@ void print_verilog_element(FILE *fd, int inst) fprintf(fd, "\n);\n\n"); dbg(2, "print_verilog_element(): ------- end ------ \n"); - my_free(_ALLOC_ID_, &name); - my_free(_ALLOC_ID_, &generic_type); - my_free(_ALLOC_ID_, &template); - my_free(_ALLOC_ID_, &value); - my_free(_ALLOC_ID_, &token); - my_free(_ALLOC_ID_, &extra); - my_free(_ALLOC_ID_, &v_extra); + my_free(1384, &name); + my_free(1385, &generic_type); + my_free(1386, &template); + my_free(1387, &value); + my_free(1388, &token); + my_free(1389, &extra); + my_free(1390, &v_extra); } @@ -2689,14 +2689,14 @@ const char *net_name(int i, int j, int *multip, int hash_prefix_unnamed_net, int } if(xctx->inst[i].node && xctx->inst[i].node[j] == NULL) { - my_strdup(_ALLOC_ID_, &pinname, get_tok_value( sym->rect[PINLAYER][j].prop_ptr,"name",0)); + my_strdup(1391, &pinname, get_tok_value( sym->rect[PINLAYER][j].prop_ptr,"name",0)); /* before reporting unconnected pin try to locate duplicated pin and use it if found */ for(k = 0; k < no_of_pins; k++) { const char *duplicated_pinname; if(k == j) continue; duplicated_pinname = get_tok_value( sym->rect[PINLAYER][k].prop_ptr,"name",0); if(!strcmp(duplicated_pinname , pinname)) { - my_strdup(_ALLOC_ID_, &pinname, duplicated_pinname); + my_strdup(1392, &pinname, duplicated_pinname); j = k; break; } @@ -2705,7 +2705,7 @@ const char *net_name(int i, int j, int *multip, int hash_prefix_unnamed_net, int if(xctx->inst[i].node && xctx->inst[i].node[j] == NULL) { expandlabel(pinname, multip); - if(pinname) my_free(_ALLOC_ID_, &pinname); + if(pinname) my_free(1393, &pinname); if(erc) { my_snprintf(errstr, S(errstr), "Warning: unconnected pin, Inst idx: %d, Pin idx: %d Inst:%s\n", i, j, xctx->inst[i].instname ) ; @@ -2723,7 +2723,7 @@ const char *net_name(int i, int j, int *multip, int hash_prefix_unnamed_net, int return expandlabel(unconn, &tmp); } else { /* xctx->inst[i].node[j] not NULL */ - if(pinname) my_free(_ALLOC_ID_, &pinname); + if(pinname) my_free(1394, &pinname); if((xctx->inst[i].node[j])[0] == '#') /* unnamed net */ { /* get unnamed node multiplicity ( minimum multip found in circuit) */ @@ -2778,14 +2778,14 @@ char *find_nth(const char *str, const char *sep, int n) int count = -1; if(!str) { - my_free(_ALLOC_ID_, &result); + my_free(1395, &result); result_size = 0; return NULL; } len = strlen(str) + 1; if(len > result_size) { result_size = len + CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &result, result_size); + my_realloc(1396, &result, result_size); } memcpy(result, str, len); i = 0; @@ -2845,7 +2845,7 @@ const char *translate(int inst, const char* s) s_pnetname = tclgetboolvar("show_pin_net_names"); sp_prefix = tclgetboolvar("spiceprefix"); if(!s) { - my_free(_ALLOC_ID_, &result); + my_free(1397, &result); return empty; } @@ -2853,7 +2853,7 @@ const char *translate(int inst, const char* s) level = xctx->currsch; lcc = xctx->hier_attr; size=CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &result,size); + my_realloc(1398, &result,size); result[0]='\0'; dbg(1, "translate(): substituting props in <%s>, instance <%s>\n", @@ -2924,8 +2924,8 @@ const char *translate(int inst, const char* s) } } else if(token[0]=='@' && token[1]=='#') { int n; - char *pin_attr = my_malloc(_ALLOC_ID_, sizetok * sizeof(char)); - char *pin_num_or_name = my_malloc(_ALLOC_ID_, sizetok * sizeof(char)); + char *pin_attr = my_malloc(1399, sizetok * sizeof(char)); + char *pin_num_or_name = my_malloc(1400, sizetok * sizeof(char)); pin_num_or_name[0]='\0'; pin_attr[0]='\0'; @@ -2949,7 +2949,7 @@ const char *translate(int inst, const char* s) pin_attr_value = get_pin_attr_from_inst(inst, n, pin_attr); /* get pin_attr from instance pin attribute string */ if(!pin_attr_value) { - my_strdup(_ALLOC_ID_, &pin_attr_value, + my_strdup(1401, &pin_attr_value, get_tok_value((xctx->inst[inst].ptr + xctx->sym)->rect[PINLAYER][n].prop_ptr, pin_attr, 0)); } } @@ -2961,21 +2961,21 @@ const char *translate(int inst, const char* s) if(s_pnetname && (!strcmp(get_tok_value(instprop, "net_name", 0), "true") || !strcmp(get_tok_value(symprop, "net_name", 0), "true"))) { prepare_netlist_structs(0); - my_strdup2(_ALLOC_ID_, &pin_attr_value, + my_strdup2(1402, &pin_attr_value, xctx->inst[inst].node && xctx->inst[inst].node[n] ? xctx->inst[inst].node[n] : "?"); /* do not show net_name: set to empty string */ } else { - my_strdup2(_ALLOC_ID_, &pin_attr_value, ""); + my_strdup2(1403, &pin_attr_value, ""); } } - if(!pin_attr_value ) my_strdup(_ALLOC_ID_, &pin_attr_value, "--UNDEF--"); + if(!pin_attr_value ) my_strdup(1404, &pin_attr_value, "--UNDEF--"); value = pin_attr_value; /* recognize slotted devices: instname = "U3:3", value = "a:b:c:d" --> value = "c" */ if(value && value[0] != 0 && !strcmp(pin_attr, "pinnumber") ) { char *ss; int slot; char *tmpstr = NULL; - tmpstr = my_malloc(_ALLOC_ID_, sizeof(xctx->inst[inst].instname)); + tmpstr = my_malloc(1405, sizeof(xctx->inst[inst].instname)); if( (ss=strchr(xctx->inst[inst].instname, ':')) ) { sscanf(ss+1, "%s", tmpstr); if(isonlydigit(tmpstr)) { @@ -2983,16 +2983,16 @@ const char *translate(int inst, const char* s) if(strstr(value,":")) value = find_nth(value, ":", slot); } } - my_free(_ALLOC_ID_, &tmpstr); + my_free(1406, &tmpstr); } tmp=strlen(value); STR_ALLOC(&result, tmp + result_pos, &size); memcpy(result+result_pos, value, tmp+1); result_pos+=tmp; - my_free(_ALLOC_ID_, &pin_attr_value); + my_free(1407, &pin_attr_value); } - my_free(_ALLOC_ID_, &pin_attr); - my_free(_ALLOC_ID_, &pin_num_or_name); + my_free(1408, &pin_attr); + my_free(1409, &pin_num_or_name); } else if(strcmp(token,"@sch_last_modified")==0) { get_sch_from_sym(file_name, xctx->inst[inst].ptr + xctx->sym); @@ -3075,7 +3075,7 @@ const char *translate(int inst, const char* s) len = strlen(path) + strlen(net) + 1; dbg(1, "translate() @spice_get_voltage: inst=%s\n", xctx->inst[inst].instname); dbg(1, " net=%s, pin_prop_ptr=%s\n", net, pin_prop_ptr); - fqnet = my_malloc(_ALLOC_ID_, len); + fqnet = my_malloc(1410, len); my_snprintf(fqnet, len, "%s%s", path, net); strtolower(fqnet); dbg(1, "translate() @spice_get_voltage: fqnet=%s start_level=%d\n", fqnet, start_level); @@ -3097,7 +3097,7 @@ const char *translate(int inst, const char* s) result_pos += len; } dbg(1, "inst %d, net=%s, fqnet=%s idx=%d valstr=%s\n", inst, net, fqnet, idx, valstr); - my_free(_ALLOC_ID_, &fqnet); + my_free(1411, &fqnet); } } } @@ -3122,13 +3122,13 @@ const char *translate(int inst, const char* s) if(*path == '.') skip++; path++; } - net = my_malloc(_ALLOC_ID_, tmp); + net = my_malloc(1412, tmp); n = sscanf(token + 19, "%[^)]", net); if(n == 1) { strtolower(net); len = strlen(path) + strlen(xctx->inst[inst].instname) + strlen(net) + 2; dbg(1, "net=%s\n", net); - fqnet = my_malloc(_ALLOC_ID_, len); + fqnet = my_malloc(1413, len); my_snprintf(fqnet, len, "%s%s.%s", path, xctx->inst[inst].instname, net); strtolower(fqnet); dbg(1, "translate(): net=%s, fqnet=%s start_level=%d\n", net, fqnet, start_level); @@ -3150,9 +3150,9 @@ const char *translate(int inst, const char* s) result_pos += len; } dbg(1, "inst %d, net=%s, fqnet=%s idx=%d valstr=%s\n", inst, net, fqnet, idx, valstr); - my_free(_ALLOC_ID_, &fqnet); + my_free(1414, &fqnet); } - my_free(_ALLOC_ID_, &net); + my_free(1415, &net); } } } @@ -3175,14 +3175,14 @@ const char *translate(int inst, const char* s) if(*path == '.') skip++; path++; } - dev = my_malloc(_ALLOC_ID_, tmp); + dev = my_malloc(1416, tmp); n = sscanf(token + 19, "%[^)]", dev); if(n == 1) { strtolower(dev); len = strlen(path) + strlen(xctx->inst[inst].instname) + strlen(dev) + 21; /* some extra chars for i(..) wrapper */ dbg(1, "dev=%s\n", dev); - fqdev = my_malloc(_ALLOC_ID_, len); + fqdev = my_malloc(1417, len); if(!sim_is_xyce) { int prefix, vsource; char *prefix_ptr = strrchr(dev, '.'); /* last '.' in dev */ @@ -3217,9 +3217,9 @@ const char *translate(int inst, const char* s) result_pos += len; } dbg(1, "inst %d, dev=%s, fqdev=%s idx=%d valstr=%s\n", inst, dev, fqdev, idx, valstr); - my_free(_ALLOC_ID_, &fqdev); + my_free(1418, &fqdev); } /* if(n == 1) */ - my_free(_ALLOC_ID_, &dev); + my_free(1419, &dev); } /* if(path) */ } /* if((start_level = sch_waves_loaded()) >= 0 && xctx->graph_annotate_p>=0) */ } @@ -3248,13 +3248,13 @@ const char *translate(int inst, const char* s) net1 = net_name(inst, 0, &multip, 0, 0); len = strlen(path) + strlen(net1) + 1; dbg(1, "net1=%s\n", net1); - fqnet1 = my_malloc(_ALLOC_ID_, len); + fqnet1 = my_malloc(1420, len); my_snprintf(fqnet1, len, "%s%s", path, net1); strtolower(fqnet1); net2 = net_name(inst, 1, &multip, 0, 0); len = strlen(path) + strlen(net2) + 1; dbg(1, "net2=%s\n", net2); - fqnet2 = my_malloc(_ALLOC_ID_, len); + fqnet2 = my_malloc(1421, len); my_snprintf(fqnet2, len, "%s%s", path, net2); strtolower(fqnet2); dbg(1, "translate(): fqnet1=%s start_level=%d\n", fqnet1, start_level); @@ -3283,8 +3283,8 @@ const char *translate(int inst, const char* s) } dbg(1, "inst %d, fqnet1=%s fqnet2=%s idx1=%d idx2=%d, val1=%g val2=%g valstr=%s\n", inst, fqnet1, fqnet2, idx1, idx2, val1, val2, valstr); - my_free(_ALLOC_ID_, &fqnet1); - my_free(_ALLOC_ID_, &fqnet2); + my_free(1422, &fqnet1); + my_free(1423, &fqnet2); } } } @@ -3307,11 +3307,11 @@ const char *translate(int inst, const char* s) if(*path == '.') skip++; path++; } - my_strdup2(_ALLOC_ID_, &dev, xctx->inst[inst].instname); + my_strdup2(1424, &dev, xctx->inst[inst].instname); strtolower(dev); len = strlen(path) + strlen(dev) + 21; /* some extra chars for i(..) wrapper */ dbg(1, "dev=%s\n", dev); - fqdev = my_malloc(_ALLOC_ID_, len); + fqdev = my_malloc(1425, len); if(!sim_is_xyce) { int prefix=dev[0]; int vsource = (prefix == 'v') || (prefix == 'e'); @@ -3347,8 +3347,8 @@ const char *translate(int inst, const char* s) result_pos += len; } dbg(1, "inst %d, dev=%s, fqdev=%s idx=%d valstr=%s\n", inst, dev, fqdev, idx, valstr); - my_free(_ALLOC_ID_, &fqdev); - my_free(_ALLOC_ID_, &dev); + my_free(1426, &fqdev); + my_free(1427, &dev); } } } @@ -3408,18 +3408,18 @@ const char *translate(int inst, const char* s) } } else { int i = level; - my_strdup2(_ALLOC_ID_, &value1, value); + my_strdup2(1428, &value1, value); /* recursive substitution of value using parent level prop_str attributes */ while(i > 0) { const char *tok = get_tok_value(lcc[i-1].prop_ptr, value1, 0); if(xctx->tok_size && tok[0]) { dbg(1, "tok=%s\n", tok); - my_strdup2(_ALLOC_ID_, &value1, tok); + my_strdup2(1429, &value1, tok); } else { tok = get_tok_value(lcc[i-1].templ, value1, 0); if(xctx->tok_size && tok[0]) { dbg(1, "from parent template: tok=%s\n", tok); - my_strdup2(_ALLOC_ID_, &value1, tok); + my_strdup2(1430, &value1, tok); } } dbg(1, "2 translate(): lcc[%d].prop_ptr=%s, value1=%s\n", i-1, lcc[i-1].prop_ptr, value1); @@ -3429,7 +3429,7 @@ const char *translate(int inst, const char* s) STR_ALLOC(&result, tmp + result_pos, &size); memcpy(result+result_pos, value1, tmp+1); result_pos+=tmp; - my_free(_ALLOC_ID_, &value1); + my_free(1431, &value1); } } token_pos = 0; @@ -3445,7 +3445,7 @@ const char *translate(int inst, const char* s) } } dbg(2, "translate(): returning %s\n", result); - my_free(_ALLOC_ID_, &token); + my_free(1432, &token); /* if result is like: 'tcleval(some_string)' pass it thru tcl evaluation so expressions * can be calculated */ @@ -3463,11 +3463,11 @@ const char *translate2(Lcc *lcc, int level, char* s) char *token = NULL, *value = NULL; if(!s) { - my_free(_ALLOC_ID_, &result); + my_free(1433, &result); return empty; } size = CADCHUNKALLOC; - my_realloc(_ALLOC_ID_, &result, size); + my_realloc(1434, &result, size); result[0] = '\0'; dbg(1, "translate2(): s=%s, level=%d\n", s, level); while (1) { @@ -3494,13 +3494,13 @@ const char *translate2(Lcc *lcc, int level, char* s) dbg(1, "translate2(): lcc[%d].prop_ptr=%s token=%s\n", level, lcc[level].prop_ptr, token); /* if spiceprefix==0 and token == @spiceprefix then set empty value */ if(!tclgetboolvar("spiceprefix") && !strcmp(token, "@spiceprefix")) { - if(value) my_free(_ALLOC_ID_, &value); + if(value) my_free(1435, &value); xctx->tok_size = 0; } else if(token[0] == '@' && (token[1] == '@' || token[1] == '#')) { /* get rid of pin attribute info */ - if(value) my_free(_ALLOC_ID_, &value); + if(value) my_free(1436, &value); xctx->tok_size = 0; } else { - my_strdup2(_ALLOC_ID_, &value, get_tok_value(lcc[level].prop_ptr, token + 1, 0)); + my_strdup2(1437, &value, get_tok_value(lcc[level].prop_ptr, token + 1, 0)); dbg(1, "translate2(): lcc[%d].prop_ptr=%s value=%s\n", level, lcc[level].prop_ptr, value); } if(xctx->tok_size && value[0]) { @@ -3510,7 +3510,7 @@ const char *translate2(Lcc *lcc, int level, char* s) const char *upperval = get_tok_value(lcc[i-1].prop_ptr, value, 0); dbg(1, "translate2(): lcc[%d].prop_ptr=%s upperval=%s\n", i-1, lcc[i-1].prop_ptr, upperval); if(xctx->tok_size && upperval[0]) { - my_strdup2(_ALLOC_ID_, &value, upperval); + my_strdup2(1438, &value, upperval); } else { break; } @@ -3534,20 +3534,20 @@ const char *translate2(Lcc *lcc, int level, char* s) } else if(strcmp(token,"@path")==0) { char *path = NULL; - my_strdup2(_ALLOC_ID_, &path, "@path@name\\."); + my_strdup2(1439, &path, "@path@name\\."); if(level > 1) { /* add parent LCC instance names (X1, Xinv etc) */ int i; for(i = 1; i inst[i].ptr+ xctx->sym)->type); + my_strdup(1445, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && ( !IS_LABEL_OR_PIN(type) && strcmp(type,"netlist_commands")&& @@ -66,7 +66,7 @@ static void verilog_netlist(FILE *fd , int verilog_stop) else print_verilog_element(fd, i) ; /* this is the element line */ } } - my_free(_ALLOC_ID_, &type); + my_free(1446, &type); } dbg(1, "verilog_netlist(): end\n"); if(!verilog_stop && !xctx->netlist_count) redraw_hilights(0); /*draw_hilight_net(1); */ @@ -129,14 +129,14 @@ void global_verilog_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "verilog_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1447, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && (strcmp(type,"timescale")==0 || strcmp(type,"verilog_preprocessor")==0) ) { str_tmp = get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr , fmt_attr, 2); if(!str_tmp[0] && strcmp(fmt_attr, "verilog_format")) str_tmp = get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "verilog_format", 2); - my_strdup(_ALLOC_ID_, &tmp_string, str_tmp); + my_strdup(1448, &tmp_string, str_tmp); fprintf(fd, "%s\n", str_tmp ? translate(i, tmp_string) : "(NULL)"); } } @@ -163,7 +163,7 @@ void global_verilog_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "verilog_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1449, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && (strcmp(type,"opin"))==0) { if(tmp) fprintf(fd, " ,\n"); @@ -181,7 +181,7 @@ void global_verilog_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "verilog_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1450, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && (strcmp(type,"iopin"))==0) { if(tmp) fprintf(fd, " ,\n"); @@ -199,7 +199,7 @@ void global_verilog_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "verilog_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1451, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && (strcmp(type,"ipin"))==0) { if(tmp) fprintf(fd, " ,\n"); @@ -231,12 +231,12 @@ void global_verilog_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "verilog_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1452, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && (strcmp(type,"opin"))==0) { - my_strdup(_ALLOC_ID_, &port_value,get_tok_value(xctx->inst[i].prop_ptr,"value",0)); - my_strdup(_ALLOC_ID_, &sig_type,get_tok_value(xctx->inst[i].prop_ptr,"verilog_type",0)); - if(!sig_type || sig_type[0]=='\0') my_strdup(_ALLOC_ID_, &sig_type,"wire"); /* 20070720 changed reg to wire */ + my_strdup(1453, &port_value,get_tok_value(xctx->inst[i].prop_ptr,"value",0)); + my_strdup(1454, &sig_type,get_tok_value(xctx->inst[i].prop_ptr,"verilog_type",0)); + if(!sig_type || sig_type[0]=='\0') my_strdup(1455, &sig_type,"wire"); /* 20070720 changed reg to wire */ str_tmp = xctx->inst[i].lab ? xctx->inst[i].lab : ""; fprintf(fd, " output %s ;\n", str_tmp ? str_tmp : "(NULL)"); fprintf(fd, " %s %s ", sig_type, str_tmp ? str_tmp : "(NULL)"); @@ -254,12 +254,12 @@ void global_verilog_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "verilog_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1456, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && (strcmp(type,"iopin"))==0) { - my_strdup(_ALLOC_ID_, &port_value,get_tok_value(xctx->inst[i].prop_ptr,"value",0)); - my_strdup(_ALLOC_ID_, &sig_type,get_tok_value(xctx->inst[i].prop_ptr,"verilog_type",0)); - if(!sig_type || sig_type[0]=='\0') my_strdup(_ALLOC_ID_, &sig_type,"wire"); + my_strdup(1457, &port_value,get_tok_value(xctx->inst[i].prop_ptr,"value",0)); + my_strdup(1458, &sig_type,get_tok_value(xctx->inst[i].prop_ptr,"verilog_type",0)); + if(!sig_type || sig_type[0]=='\0') my_strdup(1459, &sig_type,"wire"); str_tmp = xctx->inst[i].lab ? xctx->inst[i].lab : ""; fprintf(fd, " inout %s ;\n", str_tmp ? str_tmp : "(NULL)"); fprintf(fd, " %s %s ", sig_type, str_tmp ? str_tmp : "(NULL)"); @@ -277,12 +277,12 @@ void global_verilog_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "verilog_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1460, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && (strcmp(type,"ipin"))==0) { - my_strdup(_ALLOC_ID_, &port_value,get_tok_value(xctx->inst[i].prop_ptr,"value",0)); - my_strdup(_ALLOC_ID_, &sig_type,get_tok_value(xctx->inst[i].prop_ptr,"verilog_type",0)); - if(!sig_type || sig_type[0]=='\0') my_strdup(_ALLOC_ID_, &sig_type,"wire"); + my_strdup(1461, &port_value,get_tok_value(xctx->inst[i].prop_ptr,"value",0)); + my_strdup(1462, &sig_type,get_tok_value(xctx->inst[i].prop_ptr,"verilog_type",0)); + if(!sig_type || sig_type[0]=='\0') my_strdup(1463, &sig_type,"wire"); str_tmp = xctx->inst[i].lab ? xctx->inst[i].lab : ""; fprintf(fd, " input %s ;\n", str_tmp ? str_tmp : ""); fprintf(fd, " %s %s ", sig_type, str_tmp ? str_tmp : ""); @@ -303,7 +303,7 @@ void global_verilog_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "verilog_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1464, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if(type && !strcmp(type,"netlist_commands")) { fprintf(fd, "%s\n", get_tok_value(xctx->inst[i].prop_ptr,"value", 0)); } @@ -332,7 +332,7 @@ void global_verilog_netlist(int global) /* netlister driver */ /* warning if two symbols perfectly overlapped */ warning_overlapped_symbols(0); /* preserve current level instance flags before descending hierarchy for netlisting, restore later */ - stored_flags = my_calloc(_ALLOC_ID_, xctx->instances, sizeof(unsigned int)); + stored_flags = my_calloc(1465, xctx->instances, sizeof(unsigned int)); for(i=0;iinstances;i++) stored_flags[i] = xctx->inst[i].color; if(global) @@ -343,8 +343,8 @@ void global_verilog_netlist(int global) /* netlister driver */ /* reload data without popping undo stack, this populates embedded symbols if any */ xctx->pop_undo(2, 0); /* link_symbols_to_instances(-1); */ /* done in xctx->pop_undo() */ - my_strdup(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], xctx->sch_path[xctx->currsch]); - my_strcat(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], "->netlisting"); + my_strdup(1466, &xctx->sch_path[xctx->currsch+1], xctx->sch_path[xctx->currsch]); + my_strcat(1467, &xctx->sch_path[xctx->currsch+1], "->netlisting"); xctx->sch_path_hash[xctx->currsch+1] = 0; xctx->currsch++; @@ -354,10 +354,10 @@ void global_verilog_netlist(int global) /* netlister driver */ { if( strcmp(get_tok_value(xctx->sym[i].prop_ptr,"verilog_ignore",0),"true")==0 ) continue; if(!xctx->sym[i].type) continue; - my_strdup2(_ALLOC_ID_, &abs_path, abs_sym_path(xctx->sym[i].name, "")); + my_strdup2(1468, &abs_path, abs_sym_path(xctx->sym[i].name, "")); if(strcmp(xctx->sym[i].type,"subcircuit")==0 && check_lib(1, abs_path)) { /* xctx->sym can be SCH or SYM, use hash to avoid writing duplicate subckt */ - my_strdup(_ALLOC_ID_, &subckt_name, get_cell(xctx->sym[i].name, 0)); + my_strdup(1469, &subckt_name, get_cell(xctx->sym[i].name, 0)); if (str_hash_lookup(&subckt_table, subckt_name, "", XLOOKUP)==NULL) { str_hash_lookup(&subckt_table, subckt_name, "", XINSERT); @@ -371,9 +371,9 @@ void global_verilog_netlist(int global) /* netlister driver */ } } } - my_free(_ALLOC_ID_, &abs_path); + my_free(1470, &abs_path); str_hash_free(&subckt_table); - my_free(_ALLOC_ID_, &subckt_name); + my_free(1471, &subckt_name); my_strncpy(xctx->sch[xctx->currsch] , "", S(xctx->sch[xctx->currsch])); xctx->currsch--; unselect_all(1); @@ -388,7 +388,7 @@ void global_verilog_netlist(int global) /* netlister driver */ for(i=0;iinstances; i++) xctx->inst[i].color = stored_flags[i]; propagate_hilights(1, 0, XINSERT_NOREPLACE); draw_hilight_net(1); - my_free(_ALLOC_ID_, &stored_flags); + my_free(1472, &stored_flags); dbg(1, "global_verilog_netlist(): starting awk on netlist!\n"); if(!split_f) { @@ -403,10 +403,10 @@ void global_verilog_netlist(int global) /* netlister driver */ } if(debug_var == 0 ) xunlink(netl_filename); } - my_free(_ALLOC_ID_, &sig_type); - my_free(_ALLOC_ID_, &port_value); - my_free(_ALLOC_ID_, &tmp_string); - my_free(_ALLOC_ID_, &type); + my_free(1473, &sig_type); + my_free(1474, &port_value); + my_free(1475, &tmp_string); + my_free(1476, &type); xctx->netlist_count = 0; } @@ -454,8 +454,8 @@ void verilog_block_netlist(FILE *fd, int i) } else { Int_hashtable table = {NULL, 0}; int_hash_init(&table, 37); - my_strdup(_ALLOC_ID_, &extra, get_tok_value(xctx->sym[i].prop_ptr, "verilog_extra", 0)); - my_strdup(_ALLOC_ID_, &extra2, get_tok_value(xctx->sym[i].prop_ptr, "verilog_extra", 0)); + my_strdup(1477, &extra, get_tok_value(xctx->sym[i].prop_ptr, "verilog_extra", 0)); + my_strdup(1478, &extra2, get_tok_value(xctx->sym[i].prop_ptr, "verilog_extra", 0)); fprintf(fd, "// sch_path: %s\n", filename); verilog_stop? load_schematic(0,filename, 0) : load_schematic(1,filename, 0); /* print verilog timescale and preprocessor directives 10102004 */ @@ -467,32 +467,32 @@ void verilog_block_netlist(FILE *fd, int i) if(!strcmp(get_tok_value( (xctx->inst[j].ptr+ xctx->sym)->prop_ptr, "verilog_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[j].ptr+ xctx->sym)->type); + my_strdup(1479, &type,(xctx->inst[j].ptr+ xctx->sym)->type); if( type && ( strcmp(type,"timescale")==0 || strcmp(type,"verilog_preprocessor")==0) ) { str_tmp = get_tok_value( (xctx->inst[j].ptr+ xctx->sym)->prop_ptr, fmt_attr, 2); if(!str_tmp[0] && strcmp(fmt_attr, "verilog_format")) str_tmp = get_tok_value( (xctx->inst[j].ptr+ xctx->sym)->prop_ptr, "verilog_format", 2); - my_strdup(_ALLOC_ID_, &tmp_string, str_tmp); + my_strdup(1480, &tmp_string, str_tmp); fprintf(fd, "%s\n", str_tmp ? translate(j, tmp_string) : "(NULL)"); } } - my_strdup(_ALLOC_ID_, &verilogprefix, + my_strdup(1481, &verilogprefix, get_tok_value(xctx->sym[i].prop_ptr, "verilogprefix", 0)); if(verilogprefix) { - my_strdup(_ALLOC_ID_, &symname, verilogprefix); - my_strcat(_ALLOC_ID_, &symname, skip_dir(xctx->sym[i].name)); + my_strdup(1482, &symname, verilogprefix); + my_strcat(1483, &symname, skip_dir(xctx->sym[i].name)); } else { - my_strdup(_ALLOC_ID_, &symname, skip_dir(xctx->sym[i].name)); + my_strdup(1484, &symname, skip_dir(xctx->sym[i].name)); } - my_free(_ALLOC_ID_, &verilogprefix); + my_free(1485, &verilogprefix); fprintf(fd, "module %s (\n", symname); - my_free(_ALLOC_ID_, &symname); + my_free(1486, &symname); /*print_generic(fd, "entity", i); */ dbg(1, "verilog_block_netlist(): entity ports\n"); @@ -531,15 +531,15 @@ void verilog_block_netlist(FILE *fd, int i) for(j=0;jsym[i].rects[PINLAYER];j++) { if(strcmp(get_tok_value(xctx->sym[i].rect[PINLAYER][j].prop_ptr,"verilog_ignore",0), "true")) { - my_strdup(_ALLOC_ID_, &sig_type,get_tok_value( + my_strdup(1487, &sig_type,get_tok_value( xctx->sym[i].rect[PINLAYER][j].prop_ptr,"verilog_type",0)); - my_strdup(_ALLOC_ID_, &port_value, + my_strdup(1488, &port_value, get_tok_value(xctx->sym[i].rect[PINLAYER][j].prop_ptr,"value", 0) ); - my_strdup(_ALLOC_ID_, &dir_tmp, get_tok_value(xctx->sym[i].rect[PINLAYER][j].prop_ptr,"dir",0) ); + my_strdup(1489, &dir_tmp, get_tok_value(xctx->sym[i].rect[PINLAYER][j].prop_ptr,"dir",0) ); if(strcmp(dir_tmp,"in")){ - if(!sig_type || sig_type[0]=='\0') my_strdup(_ALLOC_ID_, &sig_type,"wire"); /* 20070720 changed reg to wire */ + if(!sig_type || sig_type[0]=='\0') my_strdup(1490, &sig_type,"wire"); /* 20070720 changed reg to wire */ } else { - if(!sig_type || sig_type[0]=='\0') my_strdup(_ALLOC_ID_, &sig_type,"wire"); + if(!sig_type || sig_type[0]=='\0') my_strdup(1491, &sig_type,"wire"); } str_tmp = get_tok_value(xctx->sym[i].rect[PINLAYER][j].prop_ptr,"name",0); if(!int_hash_lookup(&table, str_tmp, 1, XINSERT_NOREPLACE)) { @@ -574,7 +574,7 @@ void verilog_block_netlist(FILE *fd, int i) if(xctx->netlist_count && !strcmp(get_tok_value(xctx->inst[l].prop_ptr, "only_toplevel", 0), "true")) continue; - my_strdup(_ALLOC_ID_, &type,(xctx->inst[l].ptr+ xctx->sym)->type); + my_strdup(1492, &type,(xctx->inst[l].ptr+ xctx->sym)->type); if(type && !strcmp(type,"netlist_commands")) { fprintf(fd, "%s\n", get_tok_value(xctx->inst[l].prop_ptr,"value", 0)); } @@ -585,13 +585,13 @@ void verilog_block_netlist(FILE *fd, int i) } fprintf(fd,"---- end user architecture code\n"); fprintf(fd, "endmodule\n"); - my_free(_ALLOC_ID_, &dir_tmp); - my_free(_ALLOC_ID_, &sig_type); - my_free(_ALLOC_ID_, &port_value); - my_free(_ALLOC_ID_, &type); - my_free(_ALLOC_ID_, &tmp_string); - my_free(_ALLOC_ID_, &extra); - my_free(_ALLOC_ID_, &extra2); + my_free(1493, &dir_tmp); + my_free(1494, &sig_type); + my_free(1495, &port_value); + my_free(1496, &type); + my_free(1497, &tmp_string); + my_free(1498, &extra); + my_free(1499, &extra2); } /* if(!sym_def[0]) */ if(split_f) { int save; diff --git a/src/vhdl_netlist.c b/src/vhdl_netlist.c index e27c1f6e..21f07e4c 100644 --- a/src/vhdl_netlist.c +++ b/src/vhdl_netlist.c @@ -63,7 +63,7 @@ static void vhdl_netlist(FILE *fd , int vhdl_stop) if(!strcmp(get_tok_value( (xctx->inst[l].ptr+ xctx->sym)->prop_ptr, "vhdl_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[l].ptr+ xctx->sym)->type); + my_strdup(1500, &type,(xctx->inst[l].ptr+ xctx->sym)->type); if( type && (strcmp(type,"attributes"))==0) { if(xctx->inst[l].prop_ptr) fprintf(fd, "\n%s\n", xctx->inst[l].prop_ptr); @@ -83,7 +83,7 @@ static void vhdl_netlist(FILE *fd , int vhdl_stop) continue; } dbg(2, "vhdl_netlist(): into the netlisting loop\n"); - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1501, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && ( !IS_LABEL_OR_PIN(type) && strcmp(type,"generic")&& @@ -106,7 +106,7 @@ static void vhdl_netlist(FILE *fd , int vhdl_stop) } } } - if(type) my_free(_ALLOC_ID_, &type); + if(type) my_free(1502, &type); dbg(1, "vhdl_netlist(): end\n"); if(!vhdl_stop && !xctx->netlist_count) redraw_hilights(0); /* draw_hilight_net(1); */ } @@ -167,7 +167,7 @@ void global_vhdl_netlist(int global) /* netlister driver */ } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1503, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && (strcmp(type,"package"))==0) { if(xctx->inst[i].prop_ptr) { /* */ @@ -186,7 +186,7 @@ void global_vhdl_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "vhdl_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1504, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && (strcmp(type,"use"))==0) { if(xctx->inst[i].prop_ptr) fprintf(fd, "%s\n", xctx->inst[i].prop_ptr); @@ -255,9 +255,9 @@ void global_vhdl_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "vhdl_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &sig_type,get_tok_value(xctx->inst[i].prop_ptr,"sig_type",0)); - if(!sig_type || sig_type[0]=='\0') my_strdup(_ALLOC_ID_, &sig_type,"std_logic"); - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1505, &sig_type,get_tok_value(xctx->inst[i].prop_ptr,"sig_type",0)); + if(!sig_type || sig_type[0]=='\0') my_strdup(1506, &sig_type,"std_logic"); + my_strdup(1507, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && (strcmp(type,"opin"))==0) { str_tmp = xctx->inst[i].lab ? xctx->inst[i].lab : ""; @@ -276,9 +276,9 @@ void global_vhdl_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "vhdl_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &sig_type,get_tok_value(xctx->inst[i].prop_ptr,"sig_type",0)); - if(!sig_type || sig_type[0]=='\0') my_strdup(_ALLOC_ID_, &sig_type,"std_logic"); - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1508, &sig_type,get_tok_value(xctx->inst[i].prop_ptr,"sig_type",0)); + if(!sig_type || sig_type[0]=='\0') my_strdup(1509, &sig_type,"std_logic"); + my_strdup(1510, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && (strcmp(type,"iopin"))==0) { str_tmp = xctx->inst[i].lab ? xctx->inst[i].lab : ""; @@ -297,9 +297,9 @@ void global_vhdl_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "vhdl_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &sig_type,get_tok_value(xctx->inst[i].prop_ptr,"sig_type",0)); - if(!sig_type || sig_type[0]=='\0') my_strdup(_ALLOC_ID_, &sig_type,"std_logic"); - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1511, &sig_type,get_tok_value(xctx->inst[i].prop_ptr,"sig_type",0)); + if(!sig_type || sig_type[0]=='\0') my_strdup(1512, &sig_type,"std_logic"); + my_strdup(1513, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && (strcmp(type,"ipin"))==0) { str_tmp = xctx->inst[i].lab ? xctx->inst[i].lab : ""; @@ -319,7 +319,7 @@ void global_vhdl_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "vhdl_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1514, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if( type && (strcmp(type,"port_attributes"))==0) { if(xctx->inst[i].prop_ptr) fprintf(fd, "%s\n", xctx->inst[i].prop_ptr); @@ -339,7 +339,7 @@ void global_vhdl_netlist(int global) /* netlister driver */ if( strcmp(get_tok_value(xctx->sym[j].prop_ptr,"vhdl_ignore",0),"true")==0 ) continue; if(!xctx->sym[j].type || (strcmp(xctx->sym[j].type,"primitive")!=0 && strcmp(xctx->sym[j].type,"subcircuit")!=0)) continue; - my_strdup(_ALLOC_ID_, &abs_path, abs_sym_path(xctx->sym[j].name, "")); + my_strdup(1515, &abs_path, abs_sym_path(xctx->sym[j].name, "")); if(( strcmp(xctx->sym[j].type,"subcircuit")==0 || strcmp(xctx->sym[j].type,"primitive")==0 @@ -347,7 +347,7 @@ void global_vhdl_netlist(int global) /* netlister driver */ ) { /* xctx->sym can be SCH or SYM, use hash to avoid writing duplicate subckt */ - my_strdup(_ALLOC_ID_, &subckt_name, get_cell(xctx->sym[j].name, 0)); + my_strdup(1516, &subckt_name, get_cell(xctx->sym[j].name, 0)); if (str_hash_lookup(&subckt_table, subckt_name, "", XLOOKUP)==NULL) { Int_hashtable table = {NULL, 0}; str_hash_lookup(&subckt_table, subckt_name, "", XINSERT); @@ -360,12 +360,12 @@ void global_vhdl_netlist(int global) /* netlister driver */ for(i=0;isym[j].rects[PINLAYER];i++) { if(strcmp(get_tok_value(xctx->sym[j].rect[PINLAYER][i].prop_ptr,"vhdl_ignore",0), "true")) { - my_strdup(_ALLOC_ID_, &sig_type,get_tok_value( + my_strdup(1517, &sig_type,get_tok_value( xctx->sym[j].rect[PINLAYER][i].prop_ptr,"sig_type",0)); - my_strdup(_ALLOC_ID_, &port_value, + my_strdup(1518, &port_value, get_tok_value(xctx->sym[j].rect[PINLAYER][i].prop_ptr,"value", 0) ); - if(!sig_type || sig_type[0]=='\0') my_strdup(_ALLOC_ID_, &sig_type,"std_logic"); - my_strdup(_ALLOC_ID_, &dir_tmp, get_tok_value(xctx->sym[j].rect[PINLAYER][i].prop_ptr,"dir",0) ); + if(!sig_type || sig_type[0]=='\0') my_strdup(1519, &sig_type,"std_logic"); + my_strdup(1520, &dir_tmp, get_tok_value(xctx->sym[j].rect[PINLAYER][i].prop_ptr,"dir",0) ); str_tmp = get_tok_value(xctx->sym[j].rect[PINLAYER][i].prop_ptr,"name",0); if(!int_hash_lookup(&table, str_tmp, 1, XINSERT_NOREPLACE)) { if(!tmp) fprintf(fd, "port (\n"); @@ -375,7 +375,7 @@ void global_vhdl_netlist(int global) /* netlister driver */ fprintf(fd," := %s", port_value); tmp=1; } - my_free(_ALLOC_ID_, &dir_tmp); + my_free(1521, &dir_tmp); } } int_hash_free(&table); @@ -383,10 +383,10 @@ void global_vhdl_netlist(int global) /* netlister driver */ fprintf(fd, "end component ;\n\n"); } } - my_free(_ALLOC_ID_, &abs_path); + my_free(1522, &abs_path); } str_hash_free(&subckt_table); - my_free(_ALLOC_ID_, &subckt_name); + my_free(1523, &subckt_name); dbg(1, "global_vhdl_netlist(): netlisting top level\n"); vhdl_netlist(fd, 0); @@ -398,7 +398,7 @@ void global_vhdl_netlist(int global) /* netlister driver */ if(!strcmp(get_tok_value( (xctx->inst[i].ptr+ xctx->sym)->prop_ptr, "vhdl_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); + my_strdup(1524, &type,(xctx->inst[i].ptr+ xctx->sym)->type); if(type && !strcmp(type,"netlist_commands")) { fprintf(fd, "%s\n", get_tok_value(xctx->inst[i].prop_ptr,"value", 0)); } @@ -426,7 +426,7 @@ void global_vhdl_netlist(int global) /* netlister driver */ /* warning if two symbols perfectly overlapped */ warning_overlapped_symbols(0); /* preserve current level instance flags before descending hierarchy for netlisting, restore later */ - stored_flags = my_calloc(_ALLOC_ID_, xctx->instances, sizeof(unsigned int)); + stored_flags = my_calloc(1525, xctx->instances, sizeof(unsigned int)); for(i=0;iinstances;i++) stored_flags[i] = xctx->inst[i].color; if(global) @@ -438,8 +438,8 @@ void global_vhdl_netlist(int global) /* netlister driver */ /* reload data without popping undo stack, this populates embedded symbols if any */ xctx->pop_undo(2, 0); /* link_symbols_to_instances(-1); */ /* done in xctx->pop_undo() */ - my_strdup(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], xctx->sch_path[xctx->currsch]); - my_strcat(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], "->netlisting"); + my_strdup(1526, &xctx->sch_path[xctx->currsch+1], xctx->sch_path[xctx->currsch]); + my_strcat(1527, &xctx->sch_path[xctx->currsch+1], "->netlisting"); xctx->sch_path_hash[xctx->currsch+1] = 0; xctx->currsch++; @@ -449,11 +449,11 @@ void global_vhdl_netlist(int global) /* netlister driver */ { if( strcmp(get_tok_value(xctx->sym[i].prop_ptr,"vhdl_ignore",0),"true")==0 ) continue; if(!xctx->sym[i].type) continue; - my_strdup(_ALLOC_ID_, &abs_path, abs_sym_path(xctx->sym[i].name, "")); + my_strdup(1528, &abs_path, abs_sym_path(xctx->sym[i].name, "")); if(strcmp(xctx->sym[i].type,"subcircuit")==0 && check_lib(1, abs_path)) { /* xctx->sym can be SCH or SYM, use hash to avoid writing duplicate subckt */ - my_strdup(_ALLOC_ID_, &subckt_name, get_cell(xctx->sym[i].name, 0)); + my_strdup(1529, &subckt_name, get_cell(xctx->sym[i].name, 0)); if (str_hash_lookup(&subckt_table, subckt_name, "", XLOOKUP)==NULL) { str_hash_lookup(&subckt_table, subckt_name, "", XINSERT); @@ -466,10 +466,10 @@ void global_vhdl_netlist(int global) /* netlister driver */ vhdl_block_netlist(fd, i); } } - my_free(_ALLOC_ID_, &abs_path); + my_free(1530, &abs_path); } str_hash_free(&subckt_table); - my_free(_ALLOC_ID_, &subckt_name); + my_free(1531, &subckt_name); my_strncpy(xctx->sch[xctx->currsch] , "", S(xctx->sch[xctx->currsch])); xctx->currsch--; unselect_all(1); @@ -484,7 +484,7 @@ void global_vhdl_netlist(int global) /* netlister driver */ for(i=0;iinstances; i++) xctx->inst[i].color = stored_flags[i]; propagate_hilights(1, 0, XINSERT_NOREPLACE); draw_hilight_net(1); - my_free(_ALLOC_ID_, &stored_flags); + my_free(1532, &stored_flags); dbg(1, "global_vhdl_netlist(): starting awk on netlist!\n"); if(!split_f) { fclose(fd); @@ -498,9 +498,9 @@ void global_vhdl_netlist(int global) /* netlister driver */ } if(!debug_var) xunlink(netl_filename); } - my_free(_ALLOC_ID_, &sig_type); - my_free(_ALLOC_ID_, &type); - my_free(_ALLOC_ID_, &port_value); + my_free(1533, &sig_type); + my_free(1534, &type); + my_free(1535, &port_value); xctx->netlist_count = 0; } @@ -584,12 +584,12 @@ void vhdl_block_netlist(FILE *fd, int i) for(j=0;jsym[i].rects[PINLAYER];j++) { if(strcmp(get_tok_value(xctx->sym[i].rect[PINLAYER][j].prop_ptr,"vhdl_ignore",0), "true")) { - my_strdup(_ALLOC_ID_, &sig_type, + my_strdup(1536, &sig_type, get_tok_value(xctx->sym[i].rect[PINLAYER][j].prop_ptr,"sig_type",0)); - my_strdup(_ALLOC_ID_, &port_value, + my_strdup(1537, &port_value, get_tok_value(xctx->sym[i].rect[PINLAYER][j].prop_ptr,"value", 0) ); - if(!sig_type || sig_type[0]=='\0') my_strdup(_ALLOC_ID_, &sig_type,"std_logic"); - my_strdup(_ALLOC_ID_, &dir_tmp, get_tok_value(xctx->sym[i].rect[PINLAYER][j].prop_ptr,"dir",0) ); + if(!sig_type || sig_type[0]=='\0') my_strdup(1538, &sig_type,"std_logic"); + my_strdup(1539, &dir_tmp, get_tok_value(xctx->sym[i].rect[PINLAYER][j].prop_ptr,"dir",0) ); str_tmp = get_tok_value(xctx->sym[i].rect[PINLAYER][j].prop_ptr,"name",0); if(!int_hash_lookup(&table, str_tmp, 1, XINSERT_NOREPLACE)) { if(tmp) fprintf(fd, " ;\n"); @@ -600,7 +600,7 @@ void vhdl_block_netlist(FILE *fd, int i) fprintf(fd," := %s", port_value); tmp=1; } - my_free(_ALLOC_ID_, &dir_tmp); + my_free(1540, &dir_tmp); } } int_hash_free(&table); @@ -614,7 +614,7 @@ void vhdl_block_netlist(FILE *fd, int i) if(!strcmp(get_tok_value( (xctx->inst[l].ptr+ xctx->sym)->prop_ptr, "vhdl_ignore",0 ), "true") ) { continue; } - my_strdup(_ALLOC_ID_, &type,(xctx->inst[l].ptr+ xctx->sym)->type); + my_strdup(1541, &type,(xctx->inst[l].ptr+ xctx->sym)->type); if( type && (strcmp(type,"port_attributes"))==0) { if(xctx->inst[l].prop_ptr) fprintf(fd, "%s\n", xctx->inst[l].prop_ptr); @@ -637,7 +637,7 @@ void vhdl_block_netlist(FILE *fd, int i) if(!xctx->sym[j].type || (strcmp(xctx->sym[j].type,"primitive")!=0 && strcmp(xctx->sym[j].type,"subcircuit")!=0)) continue; - my_strdup2(_ALLOC_ID_, &abs_path, abs_sym_path(xctx->sym[i].name, "")); + my_strdup2(1542, &abs_path, abs_sym_path(xctx->sym[i].name, "")); if(( strcmp(xctx->sym[j].type,"subcircuit")==0 || strcmp(xctx->sym[j].type,"primitive")==0) && check_lib(1, abs_path) ) { @@ -665,19 +665,19 @@ void vhdl_block_netlist(FILE *fd, int i) for(k=0;ksym[j].rects[PINLAYER];k++) { if(strcmp(get_tok_value(xctx->sym[j].rect[PINLAYER][k].prop_ptr,"vhdl_ignore",0), "true")) { - my_strdup(_ALLOC_ID_, &sig_type,get_tok_value( + my_strdup(1543, &sig_type,get_tok_value( xctx->sym[j].rect[PINLAYER][k].prop_ptr,"sig_type",0)); - my_strdup(_ALLOC_ID_, &port_value, + my_strdup(1544, &port_value, get_tok_value(xctx->sym[j].rect[PINLAYER][k].prop_ptr,"value", 0) ); - if(!sig_type || sig_type[0]=='\0') my_strdup(_ALLOC_ID_, &sig_type,"std_logic"); - my_strdup(_ALLOC_ID_, &dir_tmp, get_tok_value(xctx->sym[j].rect[PINLAYER][k].prop_ptr,"dir",0) ); + if(!sig_type || sig_type[0]=='\0') my_strdup(1545, &sig_type,"std_logic"); + my_strdup(1546, &dir_tmp, get_tok_value(xctx->sym[j].rect[PINLAYER][k].prop_ptr,"dir",0) ); str_tmp = get_tok_value(xctx->sym[j].rect[PINLAYER][k].prop_ptr,"name",0); if(!int_hash_lookup(&table, str_tmp, 1, XINSERT_NOREPLACE)) { if(!tmp) fprintf(fd, "port (\n"); if(tmp) fprintf(fd, " ;\n"); fprintf(fd," %s : %s %s",str_tmp, dir_tmp ? dir_tmp : "", sig_type); - my_free(_ALLOC_ID_, &dir_tmp); + my_free(1547, &dir_tmp); if(port_value &&port_value[0]) fprintf(fd," := %s", port_value); tmp=1; } @@ -689,7 +689,7 @@ void vhdl_block_netlist(FILE *fd, int i) } } /* for(j...) */ } /* if(!vhdl_stop) */ - my_free(_ALLOC_ID_, &abs_path); + my_free(1548, &abs_path); dbg(1, "vhdl_block_netlist(): netlisting %s\n", skip_dir( xctx->sch[xctx->currsch])); vhdl_netlist(fd, vhdl_stop); fprintf(fd,"//// begin user architecture code\n"); @@ -703,7 +703,7 @@ void vhdl_block_netlist(FILE *fd, int i) if(xctx->netlist_count && !strcmp(get_tok_value(xctx->inst[l].prop_ptr, "only_toplevel", 0), "true")) continue; - my_strdup(_ALLOC_ID_, &type,(xctx->inst[l].ptr+ xctx->sym)->type); + my_strdup(1549, &type,(xctx->inst[l].ptr+ xctx->sym)->type); if(type && !strcmp(type,"netlist_commands")) { fprintf(fd, "%s\n", get_tok_value(xctx->inst[l].prop_ptr,"value", 0)); } @@ -711,9 +711,9 @@ void vhdl_block_netlist(FILE *fd, int i) if(xctx->schvhdlprop && xctx->schvhdlprop[0]) fprintf(fd, "%s\n", xctx->schvhdlprop); fprintf(fd, "end arch_%s ;\n\n", skip_dir(xctx->sym[i].name) ); /* skip_dir( xctx->sch[xctx->currsch]) ); */ - my_free(_ALLOC_ID_, &sig_type); - my_free(_ALLOC_ID_, &port_value); - my_free(_ALLOC_ID_, &type); + my_free(1550, &sig_type); + my_free(1551, &port_value); + my_free(1552, &type); } /* if(!sym_def[0]) */ if(split_f) { int save; diff --git a/src/xinit.c b/src/xinit.c index f5fc670e..7b58e0d0 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -290,7 +290,7 @@ static void init_color_array(double dim, double dim_bg) if(g>0xff) g=0xff; if(b>0xff) b=0xff; my_snprintf(s, S(s), "#%02x%02x%02x", r, g, b); - my_strdup(_ALLOC_ID_, &xctx->color_array[i], s); + my_strdup(1553, &xctx->color_array[i], s); } } @@ -322,64 +322,64 @@ static void free_xschem_data() xctx->delete_undo(); free_simdata(); - my_free(_ALLOC_ID_, &xctx->node_table); - my_free(_ALLOC_ID_, &xctx->inst_table); - my_free(_ALLOC_ID_, &xctx->hilight_table); + my_free(1554, &xctx->node_table); + my_free(1555, &xctx->inst_table); + my_free(1556, &xctx->hilight_table); - my_free(_ALLOC_ID_, &xctx->wire); - my_free(_ALLOC_ID_, &xctx->text); - my_free(_ALLOC_ID_, &xctx->inst); + my_free(1557, &xctx->wire); + my_free(1558, &xctx->text); + my_free(1559, &xctx->inst); for(i=0;irect[i]); - my_free(_ALLOC_ID_, &xctx->line[i]); - my_free(_ALLOC_ID_, &xctx->poly[i]); - my_free(_ALLOC_ID_, &xctx->arc[i]); + my_free(1560, &xctx->rect[i]); + my_free(1561, &xctx->line[i]); + my_free(1562, &xctx->poly[i]); + my_free(1563, &xctx->arc[i]); } for(i=0;imaxs;i++) { - my_free(_ALLOC_ID_, &xctx->sym[i].line); - my_free(_ALLOC_ID_, &xctx->sym[i].rect); - my_free(_ALLOC_ID_, &xctx->sym[i].arc); - my_free(_ALLOC_ID_, &xctx->sym[i].poly); - my_free(_ALLOC_ID_, &xctx->sym[i].lines); - my_free(_ALLOC_ID_, &xctx->sym[i].polygons); - my_free(_ALLOC_ID_, &xctx->sym[i].arcs); - my_free(_ALLOC_ID_, &xctx->sym[i].rects); + my_free(1564, &xctx->sym[i].line); + my_free(1565, &xctx->sym[i].rect); + my_free(1566, &xctx->sym[i].arc); + my_free(1567, &xctx->sym[i].poly); + my_free(1568, &xctx->sym[i].lines); + my_free(1569, &xctx->sym[i].polygons); + my_free(1570, &xctx->sym[i].arcs); + my_free(1571, &xctx->sym[i].rects); } - my_free(_ALLOC_ID_, &xctx->sym); - my_free(_ALLOC_ID_, &xctx->rect); - my_free(_ALLOC_ID_, &xctx->line); - my_free(_ALLOC_ID_, &xctx->poly); - my_free(_ALLOC_ID_, &xctx->arc); - my_free(_ALLOC_ID_, &xctx->rects); - my_free(_ALLOC_ID_, &xctx->polygons); - my_free(_ALLOC_ID_, &xctx->arcs); - my_free(_ALLOC_ID_, &xctx->lines); - my_free(_ALLOC_ID_, &xctx->maxr); - my_free(_ALLOC_ID_, &xctx->maxp); - my_free(_ALLOC_ID_, &xctx->maxa); - my_free(_ALLOC_ID_, &xctx->maxl); - my_free(_ALLOC_ID_, &xctx->sel_array); + my_free(1572, &xctx->sym); + my_free(1573, &xctx->rect); + my_free(1574, &xctx->line); + my_free(1575, &xctx->poly); + my_free(1576, &xctx->arc); + my_free(1577, &xctx->rects); + my_free(1578, &xctx->polygons); + my_free(1579, &xctx->arcs); + my_free(1580, &xctx->lines); + my_free(1581, &xctx->maxr); + my_free(1582, &xctx->maxp); + my_free(1583, &xctx->maxa); + my_free(1584, &xctx->maxl); + my_free(1585, &xctx->sel_array); for(i=0;isch_path[i]) my_free(_ALLOC_ID_, &xctx->sch_path[i]); - if(xctx->hier_attr[i].templ) my_free(_ALLOC_ID_, &xctx->hier_attr[i].templ); - if(xctx->hier_attr[i].prop_ptr) my_free(_ALLOC_ID_, &xctx->hier_attr[i].prop_ptr); - if(xctx->hier_attr[i].symname) my_free(_ALLOC_ID_, &xctx->hier_attr[i].symname); + if(xctx->sch_path[i]) my_free(1586, &xctx->sch_path[i]); + if(xctx->hier_attr[i].templ) my_free(1587, &xctx->hier_attr[i].templ); + if(xctx->hier_attr[i].prop_ptr) my_free(1588, &xctx->hier_attr[i].prop_ptr); + if(xctx->hier_attr[i].symname) my_free(1589, &xctx->hier_attr[i].symname); } - my_free(_ALLOC_ID_, &xctx->gridpoint); - my_free(_ALLOC_ID_, &xctx->biggridpoint); - my_free(_ALLOC_ID_, &xctx->gc); - my_free(_ALLOC_ID_, &xctx->gcstipple); - for(i=0;icolor_array[i]); - my_free(_ALLOC_ID_, &xctx->color_array); - my_free(_ALLOC_ID_, &xctx->enable_layer); - my_free(_ALLOC_ID_, &xctx->active_layer); - my_free(_ALLOC_ID_, &xctx->top_path); - my_free(_ALLOC_ID_, &xctx->current_win_path); - my_free(_ALLOC_ID_, &xctx->fill_type); - my_free(_ALLOC_ID_, &xctx->format); - if(xctx->inst_redraw_table) my_free(_ALLOC_ID_, &xctx->inst_redraw_table); - my_free(_ALLOC_ID_, &xctx); + my_free(1590, &xctx->gridpoint); + my_free(1591, &xctx->biggridpoint); + my_free(1592, &xctx->gc); + my_free(1593, &xctx->gcstipple); + for(i=0;icolor_array[i]); + my_free(1595, &xctx->color_array); + my_free(1596, &xctx->enable_layer); + my_free(1597, &xctx->active_layer); + my_free(1598, &xctx->top_path); + my_free(1599, &xctx->current_win_path); + my_free(1600, &xctx->fill_type); + my_free(1601, &xctx->format); + if(xctx->inst_redraw_table) my_free(1602, &xctx->inst_redraw_table); + my_free(1603, &xctx); } static void create_gc(void) @@ -409,7 +409,7 @@ static void alloc_xschem_data(const char *top_path, const char *win_path) { int i, j; - xctx = my_calloc(_ALLOC_ID_, 1, sizeof(Xschem_ctx)); + xctx = my_calloc(1604, 1, sizeof(Xschem_ctx)); xctx->cur_undo_ptr = 0; xctx->head_undo_ptr = 0; xctx->tail_undo_ptr = 0; @@ -498,10 +498,10 @@ static void alloc_xschem_data(const char *top_path, const char *win_path) xctx->inst_spatial_table[i][j] = NULL; } } - xctx->node_table = my_calloc(_ALLOC_ID_, HASHSIZE, sizeof(Node_hashentry *)); + xctx->node_table = my_calloc(1605, HASHSIZE, sizeof(Node_hashentry *)); xctx->inst_table.table = NULL; xctx->inst_table.size = 0; - xctx->hilight_table = my_calloc(_ALLOC_ID_, HASHSIZE, sizeof(Hilight_hashentry *)); + xctx->hilight_table = my_calloc(1606, HASHSIZE, sizeof(Hilight_hashentry *)); xctx->inst_redraw_table = NULL; xctx->inst_redraw_table_size = 0; @@ -551,30 +551,30 @@ static void alloc_xschem_data(const char *top_path, const char *win_path) xctx->hier_attr[i].symname = NULL; xctx->hier_attr[i].fd = NULL; } - my_strdup(_ALLOC_ID_, &xctx->sch_path[0],"."); + my_strdup(1607, &xctx->sch_path[0],"."); xctx->sch_inst_number[0] = 1; xctx->maxt=CADMAXTEXT; xctx->maxw=CADMAXWIRES; xctx->maxi=ELEMINST; xctx->maxs=ELEMDEF; - xctx->text=my_calloc(_ALLOC_ID_, xctx->maxt,sizeof(xText)); - xctx->wire=my_calloc(_ALLOC_ID_, xctx->maxw,sizeof(xWire)); - xctx->inst=my_calloc(_ALLOC_ID_, xctx->maxi , sizeof(xInstance) ); - xctx->sym=my_calloc(_ALLOC_ID_, xctx->maxs , sizeof(xSymbol) ); + xctx->text=my_calloc(1608, xctx->maxt,sizeof(xText)); + xctx->wire=my_calloc(1609, xctx->maxw,sizeof(xWire)); + xctx->inst=my_calloc(1610, xctx->maxi , sizeof(xInstance) ); + xctx->sym=my_calloc(1611, xctx->maxs , sizeof(xSymbol) ); for(i=0;imaxs;i++) { - xctx->sym[i].line=my_calloc(_ALLOC_ID_, cadlayers, sizeof(xLine *)); - xctx->sym[i].poly=my_calloc(_ALLOC_ID_, cadlayers, sizeof(xPoly *)); - xctx->sym[i].arc=my_calloc(_ALLOC_ID_, cadlayers, sizeof(xArc *)); - xctx->sym[i].rect=my_calloc(_ALLOC_ID_, cadlayers, sizeof(xRect *)); - xctx->sym[i].lines=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->sym[i].rects=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->sym[i].arcs=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->sym[i].polygons=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); + xctx->sym[i].line=my_calloc(1612, cadlayers, sizeof(xLine *)); + xctx->sym[i].poly=my_calloc(1613, cadlayers, sizeof(xPoly *)); + xctx->sym[i].arc=my_calloc(1614, cadlayers, sizeof(xArc *)); + xctx->sym[i].rect=my_calloc(1615, cadlayers, sizeof(xRect *)); + xctx->sym[i].lines=my_calloc(1616, cadlayers, sizeof(int)); + xctx->sym[i].rects=my_calloc(1617, cadlayers, sizeof(int)); + xctx->sym[i].arcs=my_calloc(1618, cadlayers, sizeof(int)); + xctx->sym[i].polygons=my_calloc(1619, cadlayers, sizeof(int)); } - xctx->maxr=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->maxa=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->maxp=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->maxl=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); + xctx->maxr=my_calloc(1620, cadlayers, sizeof(int)); + xctx->maxa=my_calloc(1621, cadlayers, sizeof(int)); + xctx->maxp=my_calloc(1622, cadlayers, sizeof(int)); + xctx->maxl=my_calloc(1623, cadlayers, sizeof(int)); for(i=0;imaxr[i]=CADMAXOBJECTS; @@ -582,25 +582,25 @@ static void alloc_xschem_data(const char *top_path, const char *win_path) xctx->maxl[i]=CADMAXOBJECTS; xctx->maxa[i]=CADMAXOBJECTS; } - xctx->rect=my_calloc(_ALLOC_ID_, cadlayers, sizeof(xRect *)); - xctx->line=my_calloc(_ALLOC_ID_, cadlayers, sizeof(xLine *)); - xctx->poly=my_calloc(_ALLOC_ID_, cadlayers, sizeof(xPoly *)); - xctx->arc=my_calloc(_ALLOC_ID_, cadlayers, sizeof(xArc *)); + xctx->rect=my_calloc(1624, cadlayers, sizeof(xRect *)); + xctx->line=my_calloc(1625, cadlayers, sizeof(xLine *)); + xctx->poly=my_calloc(1626, cadlayers, sizeof(xPoly *)); + xctx->arc=my_calloc(1627, cadlayers, sizeof(xArc *)); for(i=0;irect[i]=my_calloc(_ALLOC_ID_, xctx->maxr[i],sizeof(xRect)); - xctx->arc[i]=my_calloc(_ALLOC_ID_, xctx->maxa[i],sizeof(xArc)); - xctx->poly[i]=my_calloc(_ALLOC_ID_, xctx->maxp[i],sizeof(xPoly)); - xctx->line[i]=my_calloc(_ALLOC_ID_, xctx->maxl[i],sizeof(xLine)); + xctx->rect[i]=my_calloc(1628, xctx->maxr[i],sizeof(xRect)); + xctx->arc[i]=my_calloc(1629, xctx->maxa[i],sizeof(xArc)); + xctx->poly[i]=my_calloc(1630, xctx->maxp[i],sizeof(xPoly)); + xctx->line[i]=my_calloc(1631, xctx->maxl[i],sizeof(xLine)); } - xctx->rects=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->polygons=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->arcs=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); - xctx->lines=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); + xctx->rects=my_calloc(1632, cadlayers, sizeof(int)); + xctx->polygons=my_calloc(1633, cadlayers, sizeof(int)); + xctx->arcs=my_calloc(1634, cadlayers, sizeof(int)); + xctx->lines=my_calloc(1635, cadlayers, sizeof(int)); xctx->maxsel=MAXGROUP; - xctx->sel_array=my_calloc(_ALLOC_ID_, xctx->maxsel, sizeof(Selected)); - xctx->biggridpoint=(XSegment*)my_calloc(_ALLOC_ID_, CADMAXGRIDPOINTS,sizeof(XSegment)); - xctx->gridpoint=(XPoint*)my_calloc(_ALLOC_ID_, CADMAXGRIDPOINTS,sizeof(XPoint)); + xctx->sel_array=my_calloc(1636, xctx->maxsel, sizeof(Selected)); + xctx->biggridpoint=(XSegment*)my_calloc(1637, CADMAXGRIDPOINTS,sizeof(XSegment)); + xctx->gridpoint=(XPoint*)my_calloc(1638, CADMAXGRIDPOINTS,sizeof(XPoint)); xctx->enable_drill = 0; xctx->prev_set_modify = -1; xctx->pending_fullzoom = 0; @@ -620,21 +620,21 @@ static void alloc_xschem_data(const char *top_path, const char *win_path) xctx->edit_sym_i = -1; xctx->netlist_commands = 0; xctx->draw_pixmap = 1; - xctx->gc=my_calloc(_ALLOC_ID_, cadlayers, sizeof(GC)); - xctx->gcstipple=my_calloc(_ALLOC_ID_, cadlayers, sizeof(GC)); - xctx->color_array=my_calloc(_ALLOC_ID_, cadlayers, sizeof(char*)); - xctx->enable_layer=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); + xctx->gc=my_calloc(1639, cadlayers, sizeof(GC)); + xctx->gcstipple=my_calloc(1640, cadlayers, sizeof(GC)); + xctx->color_array=my_calloc(1641, cadlayers, sizeof(char*)); + xctx->enable_layer=my_calloc(1642, cadlayers, sizeof(int)); xctx->n_active_layers = 0; - xctx->active_layer=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); + xctx->active_layer=my_calloc(1643, cadlayers, sizeof(int)); xctx->hide_symbols = 0; xctx->netlist_type = CAD_SPICE_NETLIST; xctx->format = NULL; /* custom format string for netlist, otherwise use * "format", "verilog_format", "vhdl_format", "tedax_format" */ xctx->top_path = NULL; xctx->current_win_path = NULL; - my_strdup2(_ALLOC_ID_, &xctx->top_path, top_path); - my_strdup2(_ALLOC_ID_, &xctx->current_win_path, win_path); - xctx->fill_type=my_calloc(_ALLOC_ID_, cadlayers, sizeof(int)); + my_strdup2(1644, &xctx->top_path, top_path); + my_strdup2(1645, &xctx->current_win_path, win_path); + xctx->fill_type=my_calloc(1646, cadlayers, sizeof(int)); xctx->case_insensitive = 0; xctx->show_hidden_texts = 0; xctx->x_strcmp = strcmp; @@ -697,7 +697,7 @@ int compare_schematics(const char *f) /* HASH SCHEMATIC 1 */ for(i = 0; i < xctx->instances; i++) { l = 1024 + strlen(xctx->inst[i].prop_ptr ? xctx->inst[i].prop_ptr : ""); - my_realloc(_ALLOC_ID_, &s, l); + my_realloc(1647, &s, l); my_snprintf(s, l, "C %s %g %g %d %d %s", xctx->inst[i].name, xctx->inst[i].x0, xctx->inst[i].y0, xctx->inst[i].rot, xctx->inst[i].flip, xctx->inst[i].prop_ptr ? xctx->inst[i].prop_ptr : ""); @@ -706,7 +706,7 @@ int compare_schematics(const char *f) for(i=0;iwires;i++) { l =1024 + strlen(xctx->wire[i].prop_ptr ? xctx->wire[i].prop_ptr : ""); - my_realloc(_ALLOC_ID_, &s, l); + my_realloc(1648, &s, l); my_snprintf(s, l, "N %g %g %g %g", xctx->wire[i].x1, xctx->wire[i].y1, xctx->wire[i].x2, xctx->wire[i].y2); int_hash_lookup(&table1, s, i, XINSERT_NOREPLACE); @@ -759,7 +759,7 @@ int compare_schematics(const char *f) /* HASH SCHEMATIC 2 , CHECK SCHEMATIC 2 WITH SCHEMATIC 1 */ for(i = 0; i < xctx->instances; i++) { l = 1024 + strlen(xctx->inst[i].prop_ptr ? xctx->inst[i].prop_ptr : ""); - my_realloc(_ALLOC_ID_, &s, l); + my_realloc(1649, &s, l); my_snprintf(s, l, "C %s %g %g %d %d %s", xctx->inst[i].name, xctx->inst[i].x0, xctx->inst[i].y0, xctx->inst[i].rot, xctx->inst[i].flip, xctx->inst[i].prop_ptr ? xctx->inst[i].prop_ptr : ""); @@ -776,7 +776,7 @@ int compare_schematics(const char *f) for(i=0;iwires;i++) { l =1024 + strlen(xctx->wire[i].prop_ptr ? xctx->wire[i].prop_ptr : ""); - my_realloc(_ALLOC_ID_, &s, l); + my_realloc(1650, &s, l); my_snprintf(s, l, "N %g %g %g %g", xctx->wire[i].x1, xctx->wire[i].y1, xctx->wire[i].x2, xctx->wire[i].y2); int_hash_lookup(&table2, s, i, XINSERT_NOREPLACE); @@ -805,7 +805,7 @@ int compare_schematics(const char *f) /* CHECK SCHEMATIC 1 WITH SCHEMATIC 2*/ for(i = 0; i < xctx->instances; i++) { l = 1024 + strlen(xctx->inst[i].prop_ptr ? xctx->inst[i].prop_ptr : ""); - my_realloc(_ALLOC_ID_,&s, l); + my_realloc(1651,&s, l); my_snprintf(s, l, "C %s %g %g %d %d %s", xctx->inst[i].name, xctx->inst[i].x0, xctx->inst[i].y0, xctx->inst[i].rot, xctx->inst[i].flip, xctx->inst[i].prop_ptr ? xctx->inst[i].prop_ptr : ""); @@ -819,7 +819,7 @@ int compare_schematics(const char *f) for(i=0;iwires;i++) { l = 1024 + strlen(xctx->wire[i].prop_ptr ? xctx->wire[i].prop_ptr : ""); - my_realloc(_ALLOC_ID_, &s, l); + my_realloc(1652, &s, l); my_snprintf(s, l, "N %g %g %g %g", xctx->wire[i].x1, xctx->wire[i].y1, xctx->wire[i].x2, xctx->wire[i].y2); found = int_hash_lookup(&table2, s, i, XLOOKUP); @@ -833,7 +833,7 @@ int compare_schematics(const char *f) int_hash_free(&table2); rebuild_selected_array(); draw_selection(xctx->gc[SELLAYER], 0); - my_free(_ALLOC_ID_, &s); + my_free(1653, &s); return ret; } @@ -863,18 +863,18 @@ static void xwin_exit(void) #else for(i = 0; i < cadlayers; i++) Tk_FreePixmap(display, pixmap[i]); #endif - my_free(_ALLOC_ID_, &pixmap); + my_free(1654, &pixmap); } dbg(1, "xwin_exit(): clearing drawing data structures\n"); /* global context - graphic preferences/settings */ for(i=0;ifill_type array that is used in create_gc() to set fill styles */ @@ -1168,7 +1168,7 @@ void preview_window(const char *what, const char *win_path, const char *fname) } Tk_DestroyWindow(tkpre_window); - my_free(_ALLOC_ID_, ¤t_file); + my_free(1665, ¤t_file); xctx = save_xctx; /* restore schematic */ save_xctx = NULL; set_modify(-1); @@ -2017,22 +2017,22 @@ int Tcl_AppInit(Tcl_Interp *inter) if (atoi(tclresult()) == 0) { running_in_src_dir = 1; /* no bin, so it's running in Visual studio source directory*/ - my_strdup(_ALLOC_ID_, &up_hier, "../../.."); + my_strdup(1666, &up_hier, "../../.."); } - else my_strdup(_ALLOC_ID_, &up_hier, ".."); - /* my_strcat(_ALLOC_ID_, &win_xschem_library_path, "."); */ + else my_strdup(1667, &up_hier, ".."); + /* my_strcat(1668, &win_xschem_library_path, "."); */ for (i = 0; i < WIN_XSCHEM_LIBRARY_PATH_NUM; ++i) { my_snprintf(tmp, S(tmp),"%s/%s/%s", install_dir, up_hier, WIN_XSCHEM_LIBRARY_PATH[i]); - if (i > 0) my_strcat(_ALLOC_ID_, &win_xschem_library_path, "\;"); - my_strcat(_ALLOC_ID_, &win_xschem_library_path, tmp); + if (i > 0) my_strcat(1669, &win_xschem_library_path, "\;"); + my_strcat(1670, &win_xschem_library_path, tmp); } my_snprintf(tmp, S(tmp), "set tmp2 {%s}; " "while {[regsub {([^/]*\\.*[^./]+[^/]*)/\\.\\./?} $tmp2 {} tmp2]} {}; ", win_xschem_library_path); const char *result2 = tcleval(tmp); const char *win_xschem_library_path_clean = tclgetvar("tmp2"); tclsetvar("XSCHEM_LIBRARY_PATH", win_xschem_library_path_clean); - my_free(_ALLOC_ID_, &win_xschem_library_path); - my_free(_ALLOC_ID_, &up_hier); + my_free(1671, &win_xschem_library_path); + my_free(1672, &up_hier); char *xschem_sharedir=NULL; if ((xschem_sharedir=getenv("XSCHEM_SHAREDIR")) != NULL) { if (!stat(xschem_sharedir, &buf)) { @@ -2219,7 +2219,7 @@ int Tcl_AppInit(Tcl_Interp *inter) /* */ /* resolve absolute pathname of xschem (argv[0]) for future usage */ - my_strdup(_ALLOC_ID_, &xschem_executable, get_file_path(xschem_executable)); + my_strdup(1673, &xschem_executable, get_file_path(xschem_executable)); dbg(1, "Tcl_AppInit(): resolved xschem_executable=%s\n", xschem_executable); @@ -2249,12 +2249,12 @@ int Tcl_AppInit(Tcl_Interp *inter) alloc_xschem_data("", ".drw"); /* global context / graphic preferences/settings */ - pixdata=my_calloc(_ALLOC_ID_, cadlayers, sizeof(char*)); + pixdata=my_calloc(1674, cadlayers, sizeof(char*)); for(i=0;iplotfile, cli_opt_plotfile, S(xctx->plotfile)); xctx->draw_window = tclgetintvar("draw_window"); diff --git a/src/xschem.h b/src/xschem.h index 99589e16..a2e7c103 100644 --- a/src/xschem.h +++ b/src/xschem.h @@ -368,7 +368,7 @@ do { \ register size_t __str_alloc_tmp__ = add; \ if( __str_alloc_tmp__ >= *size) { \ *size = __str_alloc_tmp__ + CADCHUNKALLOC; \ - my_realloc(_ALLOC_ID_, dest_string, *size); \ + my_realloc(1677, dest_string, *size); \ } \ } while(0)