xfig/xfig.3.2.5b-pspdftex.dif
2013-12-10 14:25:41 +00:00

57 lines
2.0 KiB
Plaintext

--- u_print.c
+++ u_print.c 2013-12-10 13:52:12.414235932 +0000
@@ -354,8 +354,10 @@ int print_to_file(char *file, char *lang
strcat(prcmd, tmpcmd);
} else if (!strcmp(lang,"pspdftex")) {
/* first generate pstex postscript then pdftex PDF. */
- sprintf(tmpcmd, "-n %s", outfile);
+ sprintf(tmpcmd, "-b %d -n %s", border, outfile);
strcat(prcmd, tmpcmd);
+ if (appres.correct_font_size)
+ strcat(prcmd," -F ");
if (backgrnd[0]) {
strcat(prcmd," -g \\"); /* must escape the #rrggbb color spec */
@@ -369,13 +371,13 @@ int print_to_file(char *file, char *lang
strcat(prcmd,tmp_name);
/* make it suitable for pstex. */
- strsub(prcmd,"pspdftex","pstex",tmpcmd,0);
+ strsub(prcmd,"eps","pstex",tmpcmd,0);
strcat(tmpcmd,".eps");
- (void) exec_prcmd(tmpcmd, "EXPORT of PostScript part");
+ (void) exec_prcmd(tmpcmd, "EXPORT of EPS part");
/* make it suitable for pdftex. */
- strsub(prcmd,"ps","pdf",tmpcmd,0);
- strsub(tmpcmd,"pspdftex","pdftex",prcmd,0);
+ strsub(prcmd,"pstex","pdf",tmpcmd,0);
+ strsub(tmpcmd,"eps","pdftex",prcmd,0);
strcat(prcmd,".pdf");
(void) exec_prcmd(prcmd, "EXPORT of PDF part");
@@ -383,10 +385,11 @@ int print_to_file(char *file, char *lang
#ifdef I18N
/* set the numeric locale to C so we get decimal points for numbers */
setlocale(LC_NUMERIC, "C");
- sprintf(prcmd, "fig2dev %s -L %s -p %s -m %f %s %s %s",
- appres.international ? appres.fig2dev_localize_option : "",
+ sprintf(prcmd, "%s %s -L %s -p %s -m %f %s %s %s",
+ fig2dev_cmd, appres.international ? appres.fig2dev_localize_option : "",
#else
- sprintf(prcmd, "fig2dev -L %s -p %s -m %f %s %s %s",
+ sprintf(prcmd, "%s -L %s -p %s -m %f %s %s %s",
+ fig2dev_cmd,
#endif /* I18N */
"pstex_t", tmp_name, mag/100.0, layers, tmp_fig_file, outfile);
#ifdef I18N
@@ -743,7 +746,7 @@ void build_layer_list(char *layers)
{
char list[PATH_MAX], notlist[PATH_MAX], num[10];
int layer, len, notlen;
- int firstyes, lastyes, firstno, lastno;
+ int firstyes, lastyes = 0, firstno, lastno = 0;
layers[0] = '\0';