clanup / better implementation of previous fix
This commit is contained in:
parent
c52ded63b0
commit
c9f60ce1c8
|
|
@ -906,7 +906,7 @@ static void ps_draw_symbol(int c, int n,int layer, int what, short tmp_flip, sho
|
|||
"/Subtype /Link "
|
||||
"/ANN pdfmark\n",
|
||||
x1, y1, x2, y2,
|
||||
sanitize(get_cell_w_ext(fname, 0)));
|
||||
get_cell_w_ext(sanitize(fname), 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -653,12 +653,7 @@ int spice_block_netlist(FILE *fd, int i, int alert)
|
|||
fprintf(fd, "%s\n", translated_sym_def);
|
||||
my_free(_ALLOC_ID_, &sym_def);
|
||||
} else {
|
||||
const char *s;
|
||||
if(is_generator(name)) {
|
||||
s = get_cell(sanitize(name), 0);
|
||||
} else {
|
||||
s = sanitize(get_cell(name, 0));
|
||||
}
|
||||
const char *s = get_cell(sanitize(name), 0);
|
||||
fprintf(fd, "** sch_path: %s\n", sanitized_abs_sym_path(filename, ""));
|
||||
fprintf(fd, ".subckt %s ", s);
|
||||
print_spice_subckt_nodes(fd, i);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static int tedax_block_netlist(FILE *fd, int i, int alert)
|
|||
else fprintf(fd, "## sym_path: %s\n", sanitized_abs_sym_path(xctx->sym[i].name, ""));
|
||||
fprintf(fd, "## sch_path: %s\n", sanitized_abs_sym_path(filename, ""));
|
||||
|
||||
fprintf(fd, "begin netlist v1 %s\n",sanitize(get_cell(xctx->sym[i].name, 0)));
|
||||
fprintf(fd, "begin netlist v1 %s\n",get_cell(sanitize(xctx->sym[i].name), 0));
|
||||
print_tedax_subckt(fd, i);
|
||||
|
||||
my_strdup(_ALLOC_ID_, &extra, get_tok_value(xctx->sym[i].prop_ptr,"extra",0) );
|
||||
|
|
|
|||
|
|
@ -116,6 +116,11 @@ const char *sanitize(const char *name)
|
|||
{
|
||||
static char *s = NULL;
|
||||
static char *empty="";
|
||||
|
||||
if(!is_generator(name)) {
|
||||
my_strdup2(_ALLOC_ID_, &s, name);
|
||||
return s;
|
||||
}
|
||||
if(name == NULL) {
|
||||
my_free(_ALLOC_ID_, &s);
|
||||
return empty;
|
||||
|
|
@ -1634,7 +1639,7 @@ void print_generic(FILE *fd, char *ent_or_comp, int symbol)
|
|||
my_strdup(_ALLOC_ID_, &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, sanitize(get_cell(xctx->sym[symbol].name, 0)));
|
||||
fprintf(fd, "%s %s ",ent_or_comp, get_cell(sanitize(xctx->sym[symbol].name), 0));
|
||||
if(!strcmp(ent_or_comp,"entity"))
|
||||
fprintf(fd, "is\n");
|
||||
else
|
||||
|
|
|
|||
|
|
@ -297,8 +297,8 @@ int global_vhdl_netlist(int global, int alert) /* netlister driver */
|
|||
|
||||
fprintf(fd,"end %s ;\n\n", get_cell( xctx->sch[xctx->currsch], 0) );
|
||||
fprintf(fd,"architecture arch_%s of %s is\n\n",
|
||||
sanitize(get_cell( xctx->sch[xctx->currsch], 0)),
|
||||
sanitize(get_cell( xctx->sch[xctx->currsch], 0)));
|
||||
get_cell( sanitize(xctx->sch[xctx->currsch]), 0),
|
||||
get_cell( sanitize(xctx->sch[xctx->currsch]), 0));
|
||||
|
||||
dbg(1, "global_vhdl_netlist(): printing top level used components\n");
|
||||
/* print all components */
|
||||
|
|
@ -615,12 +615,12 @@ int vhdl_block_netlist(FILE *fd, int i, int alert)
|
|||
if(xctx->inst[l].prop_ptr) fprintf(fd, "%s\n", xctx->inst[l].prop_ptr);
|
||||
}
|
||||
}
|
||||
fprintf(fd,"end %s ;\n\n", sanitize(get_cell(xctx->sym[i].name, 0)) );
|
||||
fprintf(fd,"end %s ;\n\n", get_cell(sanitize(xctx->sym[i].name), 0) );
|
||||
|
||||
dbg(1, "vhdl_block_netlist(): architecture\n");
|
||||
fprintf(fd,"architecture arch_%s of %s is\n\n",
|
||||
sanitize(get_cell(xctx->sym[i].name, 0)),
|
||||
sanitize(get_cell(xctx->sym[i].name, 0)) );
|
||||
get_cell(sanitize(xctx->sym[i].name), 0),
|
||||
get_cell(sanitize(xctx->sym[i].name), 0) );
|
||||
/* get_cell( xctx->sch[xctx->currsch], 0), get_cell( xctx->sch[xctx->currsch], 0)); */
|
||||
/* load current schematic to print used components */
|
||||
|
||||
|
|
@ -704,7 +704,7 @@ int vhdl_block_netlist(FILE *fd, int i, int alert)
|
|||
}
|
||||
|
||||
if(xctx->schvhdlprop && xctx->schvhdlprop[0]) fprintf(fd, "%s\n", xctx->schvhdlprop);
|
||||
fprintf(fd, "end arch_%s ;\n\n", sanitize(get_cell(xctx->sym[i].name, 0)) );
|
||||
fprintf(fd, "end arch_%s ;\n\n", get_cell(sanitize(xctx->sym[i].name), 0) );
|
||||
my_free(_ALLOC_ID_, &sig_type);
|
||||
my_free(_ALLOC_ID_, &port_value);
|
||||
my_free(_ALLOC_ID_, &type);
|
||||
|
|
|
|||
Loading…
Reference in New Issue