fix regression due to r1395, updated Changelog, fix set initial window size when doing ps/pdf export from cli

This commit is contained in:
Stefan Frederik 2020-12-17 03:48:34 +01:00
parent 2e20b2c6d6
commit e46033f0bb
9 changed files with 34 additions and 9 deletions

View File

@ -1,3 +1,14 @@
2.9.9:
- ps/pdf export uses true postscript fonts
- spice_probe symbols generate .save instructions and these are flattened by xschem
to enable ngspice save hierarchic nodes
- variable width grid point option (for 4K displays)
- Added 'PWD' button il file load dialog
- almost all global context related to a schematic in xctx structure. This potentially
allows to load more schematic windows with 1 running xschem process.
- fix spiceprefix to be applied on all expanded vector intances in spice netlists
2.9.8:
- ERC checks: do sch/sym node equivalence check on expandlabel()'ed nodes,
avoid flagging DATA[5,3,1] != DATA[5:1:2] != DATA[5],DATA[3],DATA[1]

View File

@ -387,7 +387,7 @@ function print_header()
"device @name @device\n" \
"@comptag\"\n"
}
print "v {xschem version=2.9.8 file_version=1.2}"
print "v {xschem version=2.9.9 file_version=1.2}"
template_attrs = "template=\"" template_attrs "\"\n"
if(FILENAME ~/\.sym$/) {

View File

@ -694,7 +694,7 @@ function print_sym(sym, template, format, subckt_name, sym_type, extra, dir, pin
print "start print symbol: " sym
print "v {xschem version=2.9.8 file_version=1.2}"
print "v {xschem version=2.9.9 file_version=1.2}"
print "K {type=" sym_type > sym
# print "format=\"@name @pinlist @symname " format_translate(template) "\"" > sym
iii = format_translate(template, extra)

View File

@ -68,7 +68,7 @@ function beginfile(f)
text_voffset=20
lab_voffset=4
ip=op=n_pin=0
print "v {xschem version=2.9.8 file_version=1.2}" > sym
print "v {xschem version=2.9.9 file_version=1.2}" > sym
if(template=="") {
printf "%s", "K {type=subcircuit\nformat=\"@name @pinlist @symname\"\n" >sym
printf "%s\n", "template=\"name=x1\"" >sym

View File

@ -78,7 +78,7 @@ static void ps_xfillrectange(int layer, double x1, double y1, double x2,
double y2)
{
fprintf(fd, "%g %g %g %g R\n", x1,y1,x2-x1,y2-y1);
if( (layer==4 || layer==PINLAYER || layer==WIRELAYER) && fill) {
if( (fill_type[layer] == 1) && fill) {
fprintf(fd, "%g %g %g %g RF\n", x1,y1,x2-x1,y2-y1);
/* fprintf(fd,"fill\n"); */
}

View File

@ -402,7 +402,8 @@ void write_xschem_file(FILE *fd)
int ty=0;
char *ptr;
if( (ptr = strstr(xctx->version_string, "xschem")) && (ptr - xctx->version_string < 50) ) {
if(xctx->version_string && (ptr = strstr(xctx->version_string, "xschem")) &&
(ptr - xctx->version_string < 50)) {
my_strdup2(59, &xctx->version_string, subst_token(xctx->version_string, "xschem", NULL));
}
my_strdup2(1183, &xctx->version_string, subst_token(xctx->version_string, "version", NULL));

View File

@ -393,7 +393,7 @@ function attrs(a)
function header()
{
print "v {xschem version=2.9.2 file_version=1.1}"
print "v {xschem version=2.9.9 file_version=1.2}"
}
function round(n)

View File

@ -1611,8 +1611,21 @@ int Tcl_AppInit(Tcl_Interp *inter)
dbg(0, "xschem: can't do a print without a filename\n");
tcleval( "exit");
}
if(do_print==1) ps_draw();
else if(do_print == 2) {
if(do_print==1) {
xctx->xrect[0].x = 0;
xctx->xrect[0].y = 0;
xctx->xschem_w = xctx->xrect[0].width = 842;
xctx->xschem_h = xctx->xrect[0].height = 595;
xctx->areax2 = 842+2;
xctx->areay2 = 595+2;
xctx->areax1 = -2;
xctx->areay1 = -2;
xctx->areaw = xctx->areax2-xctx->areax1;
xctx->areah = xctx->areay2-xctx->areay1;
zoom_full(0, 0);
ps_draw();
} else if(do_print == 2) {
if(!has_x) {
dbg(0, "xschem: can not do a png export if no X11 present / Xserver running (check if DISPLAY set).\n");
} else {

View File

@ -23,7 +23,7 @@
#ifndef CADGLOBALS
#define CADGLOBALS
#define XSCHEM_VERSION "2.9.8"
#define XSCHEM_VERSION "2.9.9"
#define XSCHEM_FILE_VERSION "1.2"
#if HAS_PIPE == 1