fix hier_psprint() to handle all previous enhancements
This commit is contained in:
parent
7a16859702
commit
07fcdfbde4
|
|
@ -1212,7 +1212,8 @@ const char *get_sym_name(int inst, int ext)
|
||||||
const char *sym, *sch;
|
const char *sym, *sch;
|
||||||
|
|
||||||
sch = get_tok_value(xctx->inst[inst].prop_ptr, "schematic", 0);
|
sch = get_tok_value(xctx->inst[inst].prop_ptr, "schematic", 0);
|
||||||
if(xctx->tok_size) { /* token exists */
|
if(!sch[0]) sch = get_tok_value((xctx->inst[inst].ptr + xctx->sym)->prop_ptr, "schematic", 0);
|
||||||
|
if(xctx->tok_size) { /* token exists */
|
||||||
if(ext) sym = get_cell_w_ext(add_ext(rel_sym_path(sch), ".sym"), 0);
|
if(ext) sym = get_cell_w_ext(add_ext(rel_sym_path(sch), ".sym"), 0);
|
||||||
else sym = skip_dir(add_ext(rel_sym_path(sch), ".sym"));
|
else sym = skip_dir(add_ext(rel_sym_path(sch), ".sym"));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -804,7 +804,7 @@ static void ps_draw_symbol(int n,int layer, int what, short tmp_flip, short rot,
|
||||||
"/Subtype /Link "
|
"/Subtype /Link "
|
||||||
"/ANN pdfmark\n",
|
"/ANN pdfmark\n",
|
||||||
x1, y1, x2, y2,
|
x1, y1, x2, y2,
|
||||||
add_ext(get_sym_name(n, 0), ".sch"));
|
sanitize(get_sym_name(n, 0)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1075,8 +1075,7 @@ void create_ps(char **psfile, int what)
|
||||||
fprintf(fd,
|
fprintf(fd,
|
||||||
"[ "
|
"[ "
|
||||||
"/Dest /%s "
|
"/Dest /%s "
|
||||||
"/DEST pdfmark\n", get_cell_w_ext(xctx->current_name, 0));
|
"/DEST pdfmark\n", get_cell_w_ext(sanitize(xctx->current_name), 0));
|
||||||
|
|
||||||
scaley = scale = (pagey-2 * margin) / dy;
|
scaley = scale = (pagey-2 * margin) / dy;
|
||||||
dbg(1, "scale=%g pagex=%g pagey=%g dx=%g dy=%g\n", scale, pagex, pagey, dx, dy);
|
dbg(1, "scale=%g pagex=%g pagey=%g dx=%g dy=%g\n", scale, pagex, pagey, dx, dy);
|
||||||
if(dx * scale > (pagex - 2 * margin)) {
|
if(dx * scale > (pagex - 2 * margin)) {
|
||||||
|
|
|
||||||
|
|
@ -85,12 +85,13 @@ void hier_psprint(char **res, int what) /* netlister driver */
|
||||||
{
|
{
|
||||||
/* xctx->sym can be SCH or SYM, use hash to avoid writing duplicate subckt */
|
/* 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(_ALLOC_ID_, &subckt_name, get_cell(xctx->sym[i].name, 0));
|
||||||
if (str_hash_lookup(&subckt_table, subckt_name, "", XLOOKUP)==NULL)
|
get_sch_from_sym(filename, xctx->sym + i, -1);
|
||||||
|
if (str_hash_lookup(&subckt_table, filename, "", XLOOKUP)==NULL)
|
||||||
{
|
{
|
||||||
str_hash_lookup(&subckt_table, subckt_name, "", XINSERT);
|
str_hash_lookup(&subckt_table, filename, "", XINSERT);
|
||||||
get_sch_from_sym(filename, xctx->sym + i, -1);
|
if(is_generator(filename) || !stat(filename, &buf)) {
|
||||||
if(!stat(filename, &buf)) {
|
|
||||||
/* for printing we go down to bottom regardless of spice_stop attribute */
|
/* for printing we go down to bottom regardless of spice_stop attribute */
|
||||||
|
dbg(1, "hier_psprint(): loading file: |%s|\n", filename);
|
||||||
load_schematic(1,filename, 0, 1);
|
load_schematic(1,filename, 0, 1);
|
||||||
zoom_full(0, 0, 1, 0.97);
|
zoom_full(0, 0, 1, 0.97);
|
||||||
if(what & 1) ps_draw(2); /* page */
|
if(what & 1) ps_draw(2); /* page */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue