allow file extension spec in tmpfile creation, update index.html
This commit is contained in:
parent
658dd6160b
commit
de9c40af65
|
|
@ -137,6 +137,7 @@
|
|||
<td>3.1.0 release, ability to display simulation graphs and embeded images/logos<br>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>20230521<br>
|
||||
</td>
|
||||
|
|
@ -147,6 +148,15 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>20241113<br>
|
||||
</td>
|
||||
<td>3.4.6<br>
|
||||
</td>
|
||||
<td>3.4.6 release.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td><br>
|
||||
|
|
|
|||
|
|
@ -2254,13 +2254,13 @@ void print_hilight_net(int show)
|
|||
|
||||
prepare_netlist_structs(1); /* use full prepare_netlist_structs(1) to recognize pin direction */
|
||||
/* when creating pins from hilight nets 20171221 */
|
||||
if(!(fd = open_tmpfile("hilight2_", &filename_ptr)) ) {
|
||||
if(!(fd = open_tmpfile("hilight2_", "", &filename_ptr)) ) {
|
||||
fprintf(errfp, "print_hilight_net(): can not create tmpfile %s\n", filename_ptr);
|
||||
return;
|
||||
}
|
||||
my_strdup(_ALLOC_ID_, &filetmp2, filename_ptr);
|
||||
fclose(fd);
|
||||
if(!(fd = open_tmpfile("hilight1_", &filename_ptr))) {
|
||||
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);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1093,7 +1093,7 @@ void create_ps(char **psfile, int what, int fullzoom, int eps)
|
|||
}
|
||||
if(what & 1) { /* prolog */
|
||||
numpages = 0;
|
||||
if(!(fd = open_tmpfile("psplot_", psfile)) ) {
|
||||
if(!(fd = open_tmpfile("psplot_", ".ps", psfile)) ) {
|
||||
fprintf(errfp, "ps_draw(): can not create tmpfile %s\n", *psfile);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -943,7 +943,7 @@ int raw_read_from_attr(Raw **rawptr, const char *type, double sweep1, double swe
|
|||
size_t length;
|
||||
if(i->prop_ptr && (b64_spice_data = get_tok_value(i->prop_ptr, "spice_data", 0))[0]) {
|
||||
length = strlen(b64_spice_data);
|
||||
if( (fd = open_tmpfile("embedded_rawfile_", &tmp_filename)) ) {
|
||||
if( (fd = open_tmpfile("embedded_rawfile_", ".raw", &tmp_filename)) ) {
|
||||
s = base64_decode(b64_spice_data, length, &decoded_length);
|
||||
fwrite(s, decoded_length, 1, fd);
|
||||
fclose(fd);
|
||||
|
|
@ -2301,14 +2301,14 @@ const char *create_tmpdir(char *prefix)
|
|||
/* after 5 unsuccessfull attemps give up */
|
||||
/* and return NULL */
|
||||
/* */
|
||||
FILE *open_tmpfile(char *prefix, char **filename)
|
||||
FILE *open_tmpfile(char *prefix, char *suffix, char **filename)
|
||||
{
|
||||
static char str[PATH_MAX]; /* safe even with multiple schematics, if immediately copied */
|
||||
int i;
|
||||
FILE *fd;
|
||||
struct stat buf;
|
||||
for(i=0; i<5; ++i) {
|
||||
my_snprintf(str, S(str), "%s%s", tclgetvar("XSCHEM_TMP_DIR"), random_string(prefix));
|
||||
my_snprintf(str, S(str), "%s%s%s", tclgetvar("XSCHEM_TMP_DIR"), random_string(prefix), suffix);
|
||||
*filename = str;
|
||||
if(stat(str, &buf) && (fd = fopen(str, "w")) ) { /* file must not exist */
|
||||
dbg(1, "open_tmpfile(): created file: %s\n", str);
|
||||
|
|
|
|||
|
|
@ -1741,7 +1741,7 @@ extern int pending_events(void);
|
|||
#endif
|
||||
extern void get_square(double x, double y, int *xx, int *yy);
|
||||
extern const char *create_tmpdir(char *prefix);
|
||||
extern FILE *open_tmpfile(char *prefix, char **filename);
|
||||
extern FILE *open_tmpfile(char *prefix, char *suffix, char **filename);
|
||||
extern void create_ps(char** psfile, int what, int fullzoom, int eps);
|
||||
extern void MyXCopyArea(Display* display, Drawable src, Drawable dest, GC gc, int src_x, int src_y, unsigned int width, unsigned int height, int dest_x, int dest_y);
|
||||
#endif /*CADGLOBALS */
|
||||
|
|
|
|||
Loading…
Reference in New Issue