*** file.c.orig Sat Sep 2 15:45:48 2000 --- file.c Sat Sep 2 15:45:48 2000 *************** *** 167,170 **** --- 167,171 ---- int cmdLineWhereToPrint=INVALID; int cmdLineTiffEPSI=INVALID; + int cmdLineNoLandscapePdfSetPageDevice=FALSE; char cmdLineFileToExec[MAXSTRING]; *************** *** 200,203 **** --- 201,206 ---- GenerateByInfo gGenerateByInfo; + static int landscapePdfSetPageDevice=TRUE; + static int psRegMarksInTiledPageMode=INVALID; static float psRegMarksGray=(float)0.95; *************** *** 5320,5323 **** --- 5323,5334 ---- UtilStrCpyN(gszProducedBy, sizeof(gszProducedBy), cmdLineProducedBy); } + landscapePdfSetPageDevice = TRUE; + if (!PRTGIF || cmdLineOpenDisplay) { + if ((c_ptr=XGetDefault(mainDisplay,TOOL_NAME, + "LandscapePdfSetPageDevice")) != NULL && + UtilStrICmp(c_ptr, "false") == 0) { + landscapePdfSetPageDevice = FALSE; + } + } } if (overrideEPSIExportExtension == INVALID) { *************** *** 5926,5937 **** if ((whereToPrint != LATEX_FIG && whereToPrint != EPSI_FILE) || !minimalEPS) { - int need_a4=NeedA4(); - if (fprintf(dumpFP, "%%%%EndProlog\n") == EOF) writeFileFailed = TRUE; ! if (need_a4 || (pageStyle == LANDSCAPE && whereToPrint == PDF_FILE)) { ! if (fprintf(dumpFP, "%%%%BeginSetup\n") == EOF) { ! writeFileFailed = TRUE; ! } ! } if (NeedA4()) { if (fprintf(dumpFP, "%%%%PaperSize: a4\n") == EOF || --- 5937,5942 ---- if ((whereToPrint != LATEX_FIG && whereToPrint != EPSI_FILE) || !minimalEPS) { if (fprintf(dumpFP, "%%%%EndProlog\n") == EOF) writeFileFailed = TRUE; ! if (fprintf(dumpFP, "%%%%BeginSetup\n") == EOF) writeFileFailed = TRUE; if (NeedA4()) { if (fprintf(dumpFP, "%%%%PaperSize: a4\n") == EOF || *************** *** 5942,5959 **** } } if (pageStyle == LANDSCAPE && whereToPrint == PDF_FILE) { ! double scale=((double)printMag)*((double)72)/((double)100.0); ! double w=((double)onePageHeight)/((double)PIX_PER_INCH)*scale; ! double h=((double)onePageWidth)/((double)PIX_PER_INCH)*scale; ! fprintf(dumpFP, "<< /PageSize [%1d %1d] ", round(w), round(h)); ! fprintf(dumpFP, ! "/ImagingBBox null /Orientation 3 >> setpagedevice\n"); ! } ! if (need_a4 || (pageStyle == LANDSCAPE && whereToPrint == PDF_FILE)) { ! if (fprintf(dumpFP, "%%%%EndSetup\n") == EOF) { ! writeFileFailed = TRUE; } } } } --- 5947,5965 ---- } } + #ifndef _NO_LANDSCAPE_PDF_SETPAGEDEVICE if (pageStyle == LANDSCAPE && whereToPrint == PDF_FILE) { ! if ((PRTGIF && !cmdLineNoLandscapePdfSetPageDevice) || ! (!PRTGIF && landscapePdfSetPageDevice)) { ! double scale=((double)printMag)*((double)72.0)/((double)100.0); ! double w=((double)onePageHeight)/((double)PIX_PER_INCH)*scale; ! double h=((double)onePageWidth)/((double)PIX_PER_INCH)*scale; ! fprintf(dumpFP, "<< /PageSize [%1d %1d] ", round(w), round(h)); ! fprintf(dumpFP, ! "/ImagingBBox null /Orientation 3 >> setpagedevice\n"); } } + #endif /* ~_NO_LANDSCAPE_PDF_SETPAGEDEVICE */ + if (fprintf(dumpFP, "%%%%EndSetup\n") == EOF) writeFileFailed = TRUE; } } *** msg.c.orig Sat Sep 2 15:45:50 2000 --- msg.c Sat Sep 2 15:45:50 2000 *************** *** 1399,1402 **** --- 1399,1403 ---- fprintf(stderr, "\t[-one_file_per_page] \\\n"); fprintf(stderr, "\t[-pepsc] \\\n"); + fprintf(stderr, "\t[-nolandpdfspd] \\\n"); fprintf(stderr, "\t[-dontcondense | -condensed] \\\n"); fprintf(stderr, "\t[-a4] \\\n"); *************** *** 1590,1593 **** --- 1591,1596 ---- } else if (strcmp(*argv, "-pepsc") == 0) { stripEPSComments = FALSE; + } else if (strcmp(*argv, "-nolandpdfspd") == 0) { + cmdLineNoLandscapePdfSetPageDevice = TRUE; } else if (strcmp(*argv, "-dontcondense") == 0) { SetCmdLineDontCondense(); *** file.e.orig Sat Sep 2 15:45:50 2000 --- file.e Sat Sep 2 15:45:50 2000 *************** *** 98,101 **** --- 98,102 ---- extern int cmdLineWhereToPrint; extern int cmdLineTiffEPSI; + extern int cmdLineNoLandscapePdfSetPageDevice; extern char cmdLineFileToExec[MAXSTRING]; *** patchlvl.h.orig Sat Sep 2 15:45:51 2000 --- patchlvl.h Sat Sep 2 15:45:51 2000 *************** *** 35,39 **** #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 38 #endif /*_TGIF_PATCHLEVEL_H_*/ --- 35,39 ---- #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 39 #endif /*_TGIF_PATCHLEVEL_H_*/ *** Makefile.noimake.orig Sat Sep 2 15:45:51 2000 --- Makefile.noimake Sat Sep 2 15:45:52 2000 *************** *** 96,99 **** --- 96,100 ---- -DOBJ_FILE_EXT=\"obj\" -DSYM_FILE_EXT=\"sym\" \ -DTEXT_FILE_EXT=\"txt\" -DPIN_FILE_EXT=\"pin\" \ + -DNETLIST_FILE_EXT=\"net\" -DCOMP_FILE_EXT=\"cmp\" \ -DTELEPORT_ATTR=\"warp_to=\" -DTMP_DIR=\"/tmp/\" \ -DLAUNCH_ATTR=\"launch=\" -DEXEC_ATTR=\"exec=\" \ *************** *** 100,103 **** --- 101,109 ---- -D_BACKGROUND_DONT_FORK -D_USE_XDRAWPOINT_TO_PUT_A_POINT + #-D_NO_LANDSCAPE_PDF_SETPAGEDEVICE + # Include the above line if you want tgif to *not* generate + # "setpagedevice" PostScript command to rotate the generated PostScript + # file. (This is meant to be used when ps2pdf can handle landscape + # PostScript files correctly.) #-D_PRTGIF_USE_ISO_LATIN_1_ALWAYS # Include the above line if you want to always use ISO 8859-1 character *** Imakefile.orig Sat Sep 2 15:45:52 2000 --- Imakefile Sat Sep 2 15:45:52 2000 *************** *** 54,58 **** $(MOREDEFINES) ! TGIFVERSION = 4.1.38 XCOMM Things to try to add to the DEFINES line above: --- 54,58 ---- $(MOREDEFINES) ! TGIFVERSION = 4.1.39 XCOMM Things to try to add to the DEFINES line above: *************** *** 68,71 **** --- 68,76 ---- XCOMM SCO: -DPRINT_CMD=\""lp -o raw -o nobanner"\" + XCOMM -D_NO_LANDSCAPE_PDF_SETPAGEDEVICE + XCOMM Include the above line if you want tgif to *not* generate + XCOMM "setpagedevice" PostScript command to rotate the generated PostScript + XCOMM file. (This is meant to be used when ps2pdf can handle landscape + XCOMM PostScript files correctly.) XCOMM -D_PRTGIF_USE_ISO_LATIN_1_ALWAYS XCOMM Include the above line if you want to always use ISO 8859-1 character *** tgif.man.orig Sat Sep 2 15:45:53 2000 --- tgif.man Sat Sep 2 15:45:53 2000 *************** *** 9,13 **** .\" .\" ! .TH tgif n "Version 4.1 Patchlevel 35 and Above" "Tgif" .\" .SH NAME --- 9,13 ---- .\" .\" ! .TH tgif n "Version 4.1 Patchlevel 39 and Above" "Tgif" .\" .SH NAME *************** *** 72,75 **** --- 72,76 ---- [\fB-one_file_per_page\fR] [\fB-pepsc\fR] + [\fB-nolandpdfspd\fR] [\fB-dontcondense | -condensed\fR] [\fB-bop_hook ""\fR] *************** *** 306,309 **** --- 307,315 ---- EPS comments are always preserved starting from tgif-4.0.11. .TP + .B -nolandpdfspd + Do not generate "segpagedevice" command in exporting landscape PDF files. + Using this option has the same effect as setting the + Tgif.LandscapePdfSetPageDevice X default to false. + .TP .B -dontcondense Using this option has the same effect as setting the Tgif.DontCondensePSFile *************** *** 387,391 **** Choice Window, the output is generated into a file with a .I \.pdf ! extension. By default, tgif calls \fIps2pdf\fR from the ghostscript(1) package to convert a \fIPS\fR file to a \fIPDF\fR file. When the \fILaTeX\fR (or \fIEPSI\fR) icon is displayed in the --- 393,397 ---- Choice Window, the output is generated into a file with a .I \.pdf ! extension. By default, tgif calls ps2pdf(1) from the ghostscript(1) package to convert a \fIPS\fR file to a \fIPDF\fR file. When the \fILaTeX\fR (or \fIEPSI\fR) icon is displayed in the *************** *** 4907,4910 **** --- 4913,4925 ---- to place the signal name and it will be visible. The default is true. + .TP + .I Tgif.LandscapePdfSetPageDevice: [true,false] + If set to ``true'', when exporting landscape PDF files, tgif will + use PostScript "setpagedevice" command to rotate the generated PostScript + file 270 degrees before calling ps2pdf(1). This should not be necessary + (and is considered a bug in ps2pdf). In the future, this X default can be + used to turn off the generation of the "setpagedevice" command when ps2pdf + can handle landscape PostScript files correctly. + The default is true. .\" .\" add new X defaults here *************** *** 4966,4970 **** \fBxfontsel\fR(1), \fBxlsfonts\fR(1), \fBxgrabsc\fR(1), \fBxloadimage\fR(1), \fBxsnap\fR(1), \fBsxpm\fR(1), \fBxv\fR(1), \fBpstoepsi\fR(1), ! \fBMosaic\fR(1), \fBbggen\fR(1), \fBrand\fR(3C) .\" .SH IDIOSYNCRASIES --- 4981,4985 ---- \fBxfontsel\fR(1), \fBxlsfonts\fR(1), \fBxgrabsc\fR(1), \fBxloadimage\fR(1), \fBxsnap\fR(1), \fBsxpm\fR(1), \fBxv\fR(1), \fBpstoepsi\fR(1), ! \fBMosaic\fR(1), \fBbggen\fR(1), \fBrand\fR(3C), \fBps2pdf\fR(1) .\" .SH IDIOSYNCRASIES *** HISTORY.orig Sat Sep 2 15:45:55 2000 --- HISTORY Sat Sep 2 15:45:55 2000 *************** *** 1,2 **** --- 1,13 ---- + -----------------------> tgif-4.1.38 => tgif-4.1.39 <----------------------- + 1) Add a new X default, Tgif.LandscapePdfSetPageDevice. Currently, when + when exporting landscape PDF files, tgif will use a PostScript + "setpagedevice" command to rotate the generated PostScript file 270 degrees + before calling ps2pdf. This should not be necessary (and is considered a + bug in ps2pdf). In the future, this X default can be used to turn off the + generation of the "setpagedevice" command when ps2pdf can handle landscape + PostScript files correctly. A new commandline option, -nolandpdfspd, to be + used in conjunction with -print is also added for the same purpose. Thanks + to Johan Vromans for the suggestion. + -----------------------> tgif-4.1.37 => tgif-4.1.38 <----------------------- 1) Fix a bug in Print Selected Objects that imported EPS objects are not *** tgif.Xdefaults.orig Sat Sep 2 15:45:57 2000 --- tgif.Xdefaults Sat Sep 2 15:45:57 2000 *************** *** 483,484 **** --- 483,488 ---- !Tgif.ThumbnailY: 32 !Tgif.ShowWireSignalName: true + ! + ! Added in version 4.1.39 + ! + !Tgif.LandscapePdfSetPageDevice: true