fix correct version syntax when saving in file
This commit is contained in:
parent
a438d436bf
commit
c13ca9218d
|
|
@ -291,7 +291,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(465, &sss, str);
|
||||
my_strdup2(54, &sss, str);
|
||||
tt=ss=sss;
|
||||
for(;;) {
|
||||
c=*ss;
|
||||
|
|
@ -308,7 +308,7 @@ static void ps_draw_string(int layer, const char *str, short rot, short flip, in
|
|||
}
|
||||
ss++;
|
||||
}
|
||||
my_free(1154, &sss);
|
||||
my_free(53, &sss);
|
||||
}
|
||||
|
||||
static void old_ps_draw_string(int gctext, const char *str,
|
||||
|
|
|
|||
12
src/save.c
12
src/save.c
|
|
@ -400,10 +400,16 @@ void save_line(FILE *fd)
|
|||
void write_xschem_file(FILE *fd)
|
||||
{
|
||||
int ty=0;
|
||||
char *ptr;
|
||||
|
||||
my_strdup2(1183, &xctx->version_string, subst_token(xctx->version_string, "version", XSCHEM_VERSION));
|
||||
my_strdup2(1184, &xctx->version_string, subst_token(xctx->version_string, "file_version", XSCHEM_FILE_VERSION));
|
||||
fprintf(fd, "v {%s}\n", xctx->version_string);
|
||||
if( (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));
|
||||
my_strdup2(1184, &xctx->version_string, subst_token(xctx->version_string, "file_version", NULL));
|
||||
ptr = xctx->version_string;
|
||||
while(*ptr == ' ' || *ptr == '\t') ptr++; /* strip leading spaces */
|
||||
fprintf(fd, "v {xschem version=%s file_version=%s %s}\n", XSCHEM_VERSION, XSCHEM_FILE_VERSION, ptr);
|
||||
|
||||
|
||||
if(xctx->schvhdlprop && !xctx->schsymbolprop) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
v {xschem version=2.9.8 file_version=1.2}
|
||||
v {xschem version=2.9.8 file_version=1.2 }
|
||||
G {}
|
||||
K {}
|
||||
V {}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
v { version=2.9.8 file_version=1.2}
|
||||
v {xschem version=2.9.8 file_version=1.2 }
|
||||
G {}
|
||||
K {}
|
||||
V {}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
v { version=2.9.8 file_version=1.2}
|
||||
v {xschem version=2.9.8 file_version=1.2 }
|
||||
G {}
|
||||
K {}
|
||||
V {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue