pdf and png export: handle filenames with spaces in output filters
This commit is contained in:
parent
99b0ab2ee2
commit
ce5d9e40a6
|
|
@ -14,7 +14,8 @@ SCRIPT_OBJS = \
|
|||
$(BIN)/scripts/find_funlisp.o \
|
||||
$(BIN)/scripts/find_duktape.o \
|
||||
$(BIN)/scripts/find_fungw.o \
|
||||
$(BIN)/scripts/find_m4.o
|
||||
$(BIN)/scripts/find_m4.o \
|
||||
$(BIN)/scripts/find_welltype.o
|
||||
|
||||
$(BIN)/scripts/scripts.o: $(SRC)/scripts/scripts.c
|
||||
$(CC) $(CFLAGS) -c $(SRC)/scripts/scripts.c -o $(BIN)/scripts/scripts.o
|
||||
|
|
@ -52,6 +53,9 @@ $(BIN)/scripts/find_stutter.o: $(SRC)/scripts/find_stutter.c $(SRC)/scripts/scri
|
|||
$(BIN)/scripts/find_m4.o: $(SRC)/scripts/find_m4.c $(SRC)/scripts/scripts.h
|
||||
$(CC) $(CFLAGS) -c $(SRC)/scripts/find_m4.c -o $(BIN)/scripts/find_m4.o
|
||||
|
||||
$(BIN)/scripts/find_welltype.o: $(SRC)/scripts/find_welltype.c $(SRC)/scripts/scripts.h
|
||||
$(CC) $(CFLAGS) -c $(SRC)/scripts/find_welltype.c -o $(BIN)/scripts/find_welltype.o
|
||||
|
||||
$(BIN)/scripts/find_duktape.o: $(SRC)/scripts/find_duktape.c $(SRC)/scripts/scripts.h
|
||||
$(CC) $(CFLAGS) -c $(SRC)/scripts/find_duktape.c -o $(BIN)/scripts/find_duktape.o
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ void deps_scripts_init()
|
|||
dep_add("libs/script/funlisp/*", find_script_funlisp);
|
||||
dep_add("libs/script/duktape/*", find_script_duktape);
|
||||
dep_add("libs/script/m4/bin/*", find_script_m4);
|
||||
dep_add("libs/script/welltype/*", find_script_welltype);
|
||||
dep_add("libs/script/welltype/wtc/*", find_script_wtc);
|
||||
|
||||
dep_add("libs/script/fungw/presents", find_script_fungw);
|
||||
dep_add("libs/script/fungw/user_call_ctx/*", find_script_fungw_user_call_ctx);
|
||||
|
|
|
|||
|
|
@ -30,3 +30,5 @@ int find_script_fungw_user_call_ctx(const char *name, int logdepth, int fatal);
|
|||
int find_script_fungw_cfg_pupdir(const char *name, int logdepth, int fatal);
|
||||
int find_script_fungw_all(const char *name, int logdepth, int fatal);
|
||||
int find_script_m4(const char *name, int logdepth, int fatal);
|
||||
int find_script_welltype(const char *name, int logdepth, int fatal);
|
||||
int find_script_wtc(const char *name, int logdepth, int fatal);
|
||||
|
|
|
|||
|
|
@ -82,16 +82,16 @@ void print_image()
|
|||
XpmWriteFileFromPixmap(display, "plot.xpm", xctx->save_pixmap,0, NULL ); /* .gz ???? */
|
||||
dbg(1, "print_image(): Window image saved\n");
|
||||
if(plotfile[0]) {
|
||||
my_snprintf(cmd, S(cmd), "convert_to_png plot.xpm %s", plotfile);
|
||||
my_snprintf(cmd, S(cmd), "convert_to_png plot.xpm {%s}", plotfile);
|
||||
tcleval(cmd);
|
||||
} else tcleval( "convert_to_png plot.xpm plot.png");
|
||||
#else
|
||||
char *psfile=NULL;
|
||||
create_ps(&psfile);
|
||||
if(plotfile[0]) {
|
||||
my_snprintf(cmd, S(cmd), "convert_to_png %s %s", psfile, plotfile);
|
||||
my_snprintf(cmd, S(cmd), "convert_to_png {%s} {%s}", psfile, plotfile);
|
||||
tcleval(cmd);
|
||||
} else tcleval( "convert_to_png %s plot.png", psfile);
|
||||
} else tcleval( "convert_to_png {%s} plot.png", psfile);
|
||||
#endif
|
||||
my_strncpy(plotfile,"", S(plotfile));
|
||||
draw_grid=save_draw_grid;
|
||||
|
|
|
|||
|
|
@ -880,9 +880,9 @@ void ps_draw(void)
|
|||
}
|
||||
create_ps(&psfile);
|
||||
if(plotfile[0]) {
|
||||
my_snprintf(tmp, S(tmp), "convert_to_pdf %s %s", psfile, plotfile);
|
||||
my_snprintf(tmp, S(tmp), "convert_to_pdf {%s} {%s}", psfile, plotfile);
|
||||
} else {
|
||||
my_snprintf(tmp, S(tmp), "convert_to_pdf %s plot.pdf", psfile);
|
||||
my_snprintf(tmp, S(tmp), "convert_to_pdf {%s} plot.pdf", psfile);
|
||||
}
|
||||
my_strncpy(plotfile,"", S(plotfile));
|
||||
tcleval( tmp);
|
||||
|
|
|
|||
|
|
@ -1700,7 +1700,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
return TCL_ERROR;
|
||||
}
|
||||
if(argc >= 4) {
|
||||
Tcl_VarEval(interp, "file normalize ", argv[3], NULL);
|
||||
Tcl_VarEval(interp, "file normalize \"", argv[3], "\"", NULL);
|
||||
my_strncpy(plotfile, Tcl_GetStringResult(interp), S(plotfile));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue