diff options
author | Ravi Nanavati <ravi@bluespec.com> | 2006-09-29 22:47:39 +0000 |
---|---|---|
committer | Ravi Nanavati <ravi@bluespec.com> | 2006-09-29 22:47:39 +0000 |
commit | 138de4239c816531feebc8dcc478995d984276a9 (patch) | |
tree | 0702faf972c1f57ed4197ea8eda0d529976c89a4 /utils/hp2ps/Main.c | |
parent | 9cd54893c0097b5b763dc9657e3c228492cdb87f (diff) | |
download | haskell-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/Main.c')
-rw-r--r-- | utils/hp2ps/Main.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/utils/hp2ps/Main.c b/utils/hp2ps/Main.c index 3b5efed51b..eb50e00036 100644 --- a/utils/hp2ps/Main.c +++ b/utils/hp2ps/Main.c @@ -17,7 +17,7 @@ #include "Utilities.h" boolish pflag = 0; /* read auxiliary file */ -boolish eflag = 0; /* scaled EPSF */ +boolish eflag = 0; /* scaled EPSF */ boolish dflag = 0; /* sort by standard deviation */ int iflag = 0; /* sort by identifier (3-way flag) */ boolish gflag = 0; /* output suitable for previewer */ @@ -29,6 +29,7 @@ boolish tflag = 0; /* ignored threshold specified */ boolish cflag = 0; /* colour output */ boolish filter; /* true when running as a filter */ +boolish multipageflag = 0; /* true when the output should be 2 pages - key and profile */ static floatish WidthInPoints PROTO((char *)); /* forward */ static FILE *Fp PROTO((char *, char **, char *, char *)); /* forward */ @@ -107,9 +108,13 @@ char* argv[]; case 'm': mflag++; TWENTY = atoi(*argv + 1); - if (TWENTY > DEFAULT_TWENTY) - Usage(*argv-1); + // only 20 keys fit on a page + if (TWENTY > DEFAULT_TWENTY) + multipageflag++; goto nextarg; + case 'M': + multipageflag++; + goto nextarg; case 't': tflag++; THRESHOLD_PERCENT = (floatish) atof(*argv + 1); @@ -161,7 +166,8 @@ nextarg: ; if (pflag) Reorder(); /* ReOrders on aux file */ - if (TWENTY) TopTwenty(); /* Selects top twenty (mflag) */ + /* Selects top bands (mflag) - can be more than 20 now */ + if (TWENTY != 0) TopTwenty(); Dimensions(); |