*** orig/README Fri Feb 22 11:03:09 1991 --- README Fri Feb 22 11:32:19 1991 *************** *** 1,3 **** --- 1,38 ---- + PSNUP README Patch 1 + + Chris Lewis + + This release is a combination of two things: a generalized n-up processor + for postscript files, plus a shell wrapper script and manual page. + Ned Batchelder wrote the postscript n-up handling and postscript + compressor program, and I wrote the shell wrapper script and manual page. + I include the original README from Ned Batchelder below. Note, however, + that the psnup shell script performs the parameter substitution that Ned + refers to. Therefore, you don't have to do anything to the nup.* stuff. + + Patch 1 note: I'm more than a little embarrassed about the difficulties + in the shell script and manual page. That's what comes of not testing + the final version. In particular, the manual page did not make it clear + that the origin for "-s" is 0 not 1, and the default should be 0 not 1, + and that the -r & -R implementation was reversed. Hence the fixes to + psnup.sh and psnup.1. As well, there was a bug in psc.c in that the + return from getchar() was defined as a char, which can cause infinite + loops on some machines. + + Other changes include this little note in the README (because some people + were editting nup.* directly, which they don't need to) and a removal + of the "%!" from nup.post.ps. + + Psroff (CAT & ditroff -2- HPLJ/ditroff/Postscript) has been + modified to utilize the nup.epi and nup.pro files. So, you'll want + to keep this if you intend to use psroff. Psroff 3.0 will be released + soon. + + And finally, like all n-up programs, it is possible for it to be fooled. + Nup does what it does by redefining a few operators, such as initgraphics. + Be aware that some applications (tpscript seems to be one of them) will + foul up nup's definitions, and the results will not be what you intended. + ------------------------------------------- Nup is designed to be used as a wrap around any PostScript file. Simply prepend nup.pre.ps, and append nup.post.ps, and it should work. There are three tokens in nup.pre.ps which need to be changed before sending it to *** orig/nup.post.ps Fri Feb 22 11:03:13 1991 --- nup.post.ps Fri Feb 22 11:07:06 1991 *************** *** 1,4 **** ! %! nup.post.ps -- Postlude for n-up printing. $Revision: 4.2 $ % % Ned Batchelder, University of Pennsylvania % ned@UPenn.CSnet --- 1,4 ---- ! % nup.post.ps -- Postlude for n-up printing. $Revision: 4.2 $ % % Ned Batchelder, University of Pennsylvania % ned@UPenn.CSnet *** orig/psc.c Fri Feb 22 11:03:18 1991 --- psc.c Sat Feb 16 22:49:00 1991 *************** *** 33,39 **** int inhex = 0; /* Are we in a hex string? */ int column = 0; /* Counts output columns to keep lines short */ int keepch = 0; /* For breaking strings */ ! char c; /* The current character */ # define put(c) {putchar(c); column++;} --- 33,39 ---- int inhex = 0; /* Are we in a hex string? */ int column = 0; /* Counts output columns to keep lines short */ int keepch = 0; /* For breaking strings */ ! int c; /* The current character */ # define put(c) {putchar(c); column++;} *** orig/psnup.1 Fri Feb 22 11:03:20 1991 --- psnup.1 Mon Feb 18 21:38:35 1991 *************** *** 42,53 **** The .BI -s n option indicates which spot the first page of output occurs in. .P The defaults are: .BR -p2 , ! .BR -r , and ! .BR -s1 , .P .B Psnup tries very hard to retain a trailing control-D if the file has --- 42,54 ---- The .BI -s n option indicates which spot the first page of output occurs in. + The first spot on the page is 0. .P The defaults are: .BR -p2 , ! .BR -R , and ! .BR -s0 . .P .B Psnup tries very hard to retain a trailing control-D if the file has *** orig/psnup.sh Fri Feb 22 11:03:21 1991 --- psnup.sh Fri Feb 22 11:32:50 1991 *************** *** 9,18 **** rm -f /tmp/?$$ pages=2 ! # Default is reversed for use with psroff with psxlate in the ! # pipeline to reverse pages. ! reverse=true ! start=1 for i do --- 9,17 ---- rm -f /tmp/?$$ pages=2 ! # Default is nonreversed for use with forward printing printers. ! reverse=false ! start=0 for i do *************** *** 19,29 **** case $i in -p2 | -p4 | -p8 | -p16) pages=`echo $i | sed -e 's/^..//'` - if [ -z "$pages" -o -n "`echo $pages | sed -e 's/[0-9]*//'`" ] - then - echo "$0: Non-numeric pages per sheet option $i" >&2 - exit 1 - fi ;; -p*) echo "$0: -p option ($i) must be 2, 4, 8 or 16" >&2 --- 18,23 ---- *************** *** 30,39 **** exit 1 ;; -r) ! reverse=false ;; -R) ! reverse=true ;; -s*) start=`echo $i | sed -e 's/^..//'` --- 24,33 ---- exit 1 ;; -r) ! reverse=true ;; -R) ! reverse=false ;; -s*) start=`echo $i | sed -e 's/^..//'` *************** *** 54,62 **** esac shift done ! if [ $start -gt $pages ] then ! echo "$0: start option (-s$start) must be <= pages/sheet (-p$pages)" \ >&2 exit 1 fi --- 48,56 ---- esac shift done ! if [ $start -ge $pages ] then ! echo "$0: start option (-s$start) must be < pages/sheet (-p$pages)" \ >&2 exit 1 fi