Fix various bugs related to string handling in printer code:
generic text printer saving output files in the working dir instead of printer subdir; generic ESC/P printer looking up font files in the wrong directory; generic PostScript printer saving output PDFs with a double ".ps.pdf" extension.
This commit is contained in:
@@ -595,7 +595,7 @@ update_font(escp_t *dev)
|
|||||||
/* Create a full pathname for the ROM file. */
|
/* Create a full pathname for the ROM file. */
|
||||||
strcpy(path, dev->fontpath);
|
strcpy(path, dev->fontpath);
|
||||||
plat_path_slash(path);
|
plat_path_slash(path);
|
||||||
strcpy(path, fn);
|
strcat(path, fn);
|
||||||
|
|
||||||
escp_log("Temp file=%s\n", path);
|
escp_log("Temp file=%s\n", path);
|
||||||
|
|
||||||
|
@@ -145,7 +145,7 @@ convert_to_pdf(ps_t *dev)
|
|||||||
strcat(input_fn, dev->filename);
|
strcat(input_fn, dev->filename);
|
||||||
|
|
||||||
strcpy(output_fn, input_fn);
|
strcpy(output_fn, input_fn);
|
||||||
strcat(output_fn + strlen(output_fn) - 3, ".pdf");
|
strcpy(output_fn + strlen(output_fn) - 3, ".pdf");
|
||||||
|
|
||||||
gsargv[0] = "";
|
gsargv[0] = "";
|
||||||
gsargv[1] = "-dNOPAUSE";
|
gsargv[1] = "-dNOPAUSE";
|
||||||
|
@@ -154,7 +154,7 @@ dump_page(prnt_t *dev)
|
|||||||
if (! plat_dir_check(path))
|
if (! plat_dir_check(path))
|
||||||
plat_dir_create(path);
|
plat_dir_create(path);
|
||||||
plat_path_slash(path);
|
plat_path_slash(path);
|
||||||
strcpy(path, dev->filename);
|
strcat(path, dev->filename);
|
||||||
|
|
||||||
/* Create the file. */
|
/* Create the file. */
|
||||||
fp = plat_fopen(path, "a");
|
fp = plat_fopen(path, "a");
|
||||||
|
Reference in New Issue
Block a user