summaryrefslogtreecommitdiff
path: root/utils/hp2ps/PsFile.c
diff options
context:
space:
mode:
authorRavi Nanavati <ravi@bluespec.com>2006-09-29 22:47:39 +0000
committerRavi Nanavati <ravi@bluespec.com>2006-09-29 22:47:39 +0000
commit138de4239c816531feebc8dcc478995d984276a9 (patch)
tree0702faf972c1f57ed4197ea8eda0d529976c89a4 /utils/hp2ps/PsFile.c
parent9cd54893c0097b5b763dc9657e3c228492cdb87f (diff)
downloadhaskell-138de4239c816531feebc8dcc478995d984276a9.tar.gz
multipage_hp2ps
Add support for splitting the key index over multiple pages in hp2ps Multipage support can be requested with the -M command-line flag or inferred if the number of bands requested is greater than 20 (the limit on the number of bands displayed has been removed) Please include this change in the 6.6 branch as well as HEAD
Diffstat (limited to 'utils/hp2ps/PsFile.c')
-rw-r--r--utils/hp2ps/PsFile.c32
1 files changed, 25 insertions, 7 deletions
diff --git a/utils/hp2ps/PsFile.c b/utils/hp2ps/PsFile.c
index 357f826259..1324da6f08 100644
--- a/utils/hp2ps/PsFile.c
+++ b/utils/hp2ps/PsFile.c
@@ -21,11 +21,8 @@ static void TitleOutlineBox PROTO((void)); /* forward */
static void BigTitleText PROTO((void)); /* forward */
static void TitleText PROTO((void)); /* forward */
-void
-PutPsFile()
+static void DoTitleAndBox()
{
- Prologue();
- Variables();
BorderOutlineBox();
if (bflag) {
@@ -35,12 +32,35 @@ PutPsFile()
TitleOutlineBox();
TitleText();
}
+}
+
+static void Landscape PROTO((void)); /* forward */
+static void Portrait PROTO((void)); /* forward */
+
+void NextPage() {
+ fprintf(psfp, "showpage\n");
+ if (gflag) Portrait(); else Landscape();
+ DoTitleAndBox();
+}
+
+void
+PutPsFile()
+{
+ Prologue();
+ Variables();
CurvesInit();
+ DoTitleAndBox();
+
+ if (multipageflag) {
+ Key(); // print multi-page key even if there are more than 20 bands
+ NextPage();
+ }
+
Axes();
- if (TWENTY) Key();
+ if (!multipageflag && (TWENTY != 0)) Key();
Curves();
@@ -52,8 +72,6 @@ PutPsFile()
static void StandardSpecialComments PROTO((void)); /* forward */
static void EPSFSpecialComments PROTO((floatish)); /* forward */
-static void Landscape PROTO((void)); /* forward */
-static void Portrait PROTO((void)); /* forward */
static void Scaling PROTO((floatish)); /* forward */
static void