SHA256
1
0
forked from pool/xfig
xfig/xfig.3.2.5b-pspdftex.dif
OBS User autobuild d5c59d51e2 Accepting request 26416 from graphics
Copy from graphics/xfig based on submit request 26416 from user WernerFink

OBS-URL: https://build.opensuse.org/request/show/26416
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xfig?expand=0&rev=13
2009-12-16 09:58:06 +00:00

60 lines
2.2 KiB
Plaintext

--- u_print.c
+++ u_print.c 2009-12-14 12:01:21.031429470 +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,12 +385,13 @@ 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",
- appres.international ? appres.fig2dev_localize_option : "",
+ sprintf(prcmd, "%s %s -L %s -E %d -p %s -m %f -b %d %s %s",
+ fig2dev_cmd, appres.international ? appres.fig2dev_localize_option : "",
#else
- sprintf(prcmd, "fig2dev -L %s -p %s -m %f %s %s",
+ sprintf(prcmd, "%s -L %s -E %d -p %s -m %f -b %d %s %s",
+ fig2dev_cmd,
#endif /* I18N */
- "pstex_t", tmp_name, mag/100.0, tmp_fig_file, outfile);
+ "pstex_t", appres.encoding, tmp_name, mag/100.0, border, tmp_fig_file, outfile);
#ifdef I18N
/* reset to original locale */
setlocale(LC_NUMERIC, "");
@@ -742,7 +745,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';