home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume35 / psutils / patch01 < prev    next >
Encoding:
Text File  |  1993-03-03  |  21.1 KB  |  713 lines

  1. Newsgroups: comp.sources.misc
  2. From: Angus Duggan <ajcd@dcs.ed.ac.uk>
  3. Subject: v35i110:  psutils - Postscript document manipulation tools, Patch01
  4. Message-ID: <1993Mar3.181729.18729@sparky.imd.sterling.com>
  5. X-Md4-Signature: ee9ed060392a49a0851a5fb845238872
  6. Date: Wed, 3 Mar 1993 18:17:29 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Angus Duggan <ajcd@dcs.ed.ac.uk>
  10. Posting-number: Volume 35, Issue 110
  11. Archive-name: psutils/patch01
  12. Environment: UNIX
  13. Patch-To: psutils: Volume 35, Issue 8-11
  14.  
  15. This is an update to psutils 1.7 bringing it to version 1.8. It fixes 
  16. some of the bugs which crept in, and should provide easier configuration 
  17. and better scaling for American letter size paper.  
  18.  
  19. Note that the file "psnup" has disappeared, and the file "psnup.sh" has 
  20. appeared in its place. There is another new file, "epsffit.1".
  21.  
  22. To apply this patch, cd into the psutils source directory and unshar this
  23. file.   It will create a patchfile Patch1.7-1.8.  Apply the patch by
  24.     patch < Patch1.7-1.8
  25.  
  26. Angus Duggan, Department of Computer Science,    | I'm pink, therefore I'm Spam.
  27. University of Edinburgh, The King's Buildings,  | PHONE: +44(0)31 650 5126
  28. Mayfield Road, Edinburgh EH9 3JZ, Scotland.    | INET: ajcd@dcs.ed.ac.uk
  29. -------------
  30. #! /bin/sh
  31. # This is a shell archive.  Remove anything before this line, then feed it
  32. # into a shell via "sh file" or similar.  To overwrite existing files,
  33. # type "sh file -c".
  34. # Contents:  Patch1.7-1.8
  35. # Wrapped by kent@sparky on Wed Mar  3 11:54:46 1993
  36. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  37. echo If this archive is complete, you will see the following message:
  38. echo '          "shar: End of archive."'
  39. if test -f 'Patch1.7-1.8' -a "${1}" != "-c" ; then 
  40.   echo shar: Will not clobber existing file \"'Patch1.7-1.8'\"
  41. else
  42.   echo shar: Extracting \"'Patch1.7-1.8'\" \(18589 characters\)
  43.   sed "s/^X//" >'Patch1.7-1.8' <<'END_OF_FILE'
  44. Xdiff -c -r +new-file psutils-dist/LICENSE psutils/LICENSE
  45. X*** psutils-dist/LICENSE    Mon Feb  8 11:33:39 1993
  46. X--- psutils/LICENSE    Wed Feb 10 13:59:08 1993
  47. X***************
  48. X*** 1,13 ****
  49. X  
  50. X                          PS Utilities Package
  51. X  
  52. X! The constituent files of this package listed below are copyright (C) 1991,1992
  53. X! Angus J. C. Duggan.
  54. X  
  55. X! Makefile        README          buffer.c        epsffit.c       fixfmps
  56. X! fixmacps        fixpspps        getafm          magic.c         psbook.1
  57. X! psbook.c        psnup           psnup.1         psselect.1      psselect.c
  58. X! pstops.1        pstops.c        psutil.c        psutil.h        showchar
  59. X  
  60. X  They may be copied and used for any purpose (including distribution as part of
  61. X  a for-profit product), provided:
  62. X--- 1,14 ----
  63. X  
  64. X                          PS Utilities Package
  65. X  
  66. X! The constituent files of this package listed below are copyright (C) 1991,
  67. X! 1992, 1993 Angus J. C. Duggan.
  68. X  
  69. X! LICENSE         Makefile        README          epsffit.c       fixfmps
  70. X! fixmacps        fixpsditps      fixpspps        fixwfwps        fixwpps
  71. X! getafm          patchlevel.h    psbook.1        psbook.c        psnup.1
  72. X! psnup.sh        psselect.1      psselect.c      pstops.1        pstops.c
  73. X! psutil.c        psutil.h        showchar
  74. X  
  75. X  They may be copied and used for any purpose (including distribution as part of
  76. X  a for-profit product), provided:
  77. X***************
  78. X*** 33,36 ****
  79. X  The included files appledict.ps, md68.0.ps and md71.0.ps are (to the best of my
  80. X  knowledge) copyright Apple Computer, Inc.
  81. X  
  82. X!                                                                 AJCD 25/3/92
  83. X--- 34,37 ----
  84. X  The included files appledict.ps, md68.0.ps and md71.0.ps are (to the best of my
  85. X  knowledge) copyright Apple Computer, Inc.
  86. X  
  87. X!                                                                 AJCD 10/1/93
  88. Xdiff -c -r +new-file psutils-dist/Makefile psutils/Makefile
  89. X*** psutils-dist/Makefile    Mon Feb  8 11:33:32 1993
  90. X--- psutils/Makefile    Wed Feb 10 14:49:22 1993
  91. X***************
  92. X*** 1,6 ****
  93. X  # Makefile for PS utilities
  94. X  
  95. X! CFLAGS=-O
  96. X  
  97. X  # epsffit fits an epsf file to a given bounding box
  98. X  # psbook rearranges pages into signatures
  99. X--- 1,12 ----
  100. X  # Makefile for PS utilities
  101. X  
  102. X! CFLAGS=-g
  103. X! INSTALL=install -c -m 0755 
  104. X! INSTALLMAN=install -c -m 0644 
  105. X! BINDIR=/usr/local/bin
  106. X! MANDIR=/usr/local/share/man/man1
  107. X! MANEXT=1
  108. X! PAPER=a4
  109. X  
  110. X  # epsffit fits an epsf file to a given bounding box
  111. X  # psbook rearranges pages into signatures
  112. X***************
  113. X*** 7,14 ****
  114. X  # psselect selects page ranges
  115. X  # pstops performs general page rearrangement and merging
  116. X  
  117. X! all: psbook psselect pstops epsffit
  118. X  
  119. X  epsffit: epsffit.c
  120. X      $(CC) $(CFLAGS) -o epsffit epsffit.c
  121. X  
  122. X--- 13,23 ----
  123. X  # psselect selects page ranges
  124. X  # pstops performs general page rearrangement and merging
  125. X  
  126. X! ALL = psbook psselect pstops epsffit psnup
  127. X! ALLPLUS = $(ALL) fixfmps fixmacps fixpsditps fixpspps fixwfwps fixwpps
  128. X  
  129. X+ all: $(ALL)
  130. X+ 
  131. X  epsffit: epsffit.c
  132. X      $(CC) $(CFLAGS) -o epsffit epsffit.c
  133. X  
  134. X***************
  135. X*** 29,33 ****
  136. X  
  137. X  psselect.c: psutil.h patchlevel.h
  138. X  
  139. X  clean:
  140. X!     rm -f *.o psbook psselect pstops epsffit
  141. X--- 38,64 ----
  142. X  
  143. X  psselect.c: psutil.h patchlevel.h
  144. X  
  145. X+ psnup: psnup.sh patchlevel.h
  146. X+     r=`sed -n -e "s/^#define RELEASE \([0-9][0-9]*\)/\1/p" <patchlevel.h`; \
  147. X+     p=`sed -n -e "s/^#define PATCHLEVEL \([0-9][0-9]*\)/\1/p" <patchlevel.h`; \
  148. X+     sed -e "s/@PATCHLEVEL@/$$p/" -e "s/@RELEASE@/$$r/" -e "s/@PAPER@/$(PAPER)/" psnup.sh >psnup; \
  149. X+     chmod 755 psnup
  150. X+ 
  151. X  clean:
  152. X!     rm -f *.o
  153. X! 
  154. X! veryclean: clean
  155. X!     rm -f $(ALL)
  156. X! 
  157. X! install:
  158. X!     @for i in $(ALLPLUS); do \
  159. X!         echo Installing $$i; \
  160. X!         $(INSTALL) $$i $(BINDIR); \
  161. X!     done
  162. X! 
  163. X! installman:
  164. X!     @for i in $(ALL); do \
  165. X!         echo Installing manual page for $$i; \
  166. X!         $(INSTALLMAN) $$i.1 $(MANDIR)/$$i.$(MANEXT); \
  167. X!     done
  168. X! 
  169. Xdiff -c -r +new-file psutils-dist/Manifest psutils/Manifest
  170. X*** psutils-dist/Manifest    Mon Feb  8 11:33:40 1993
  171. X--- psutils/Manifest    Wed Feb 10 12:52:15 1993
  172. X***************
  173. X*** 2,9 ****
  174. X  Makefile
  175. X  Manifest
  176. X  README
  177. X! patchlevel.h
  178. X! appledict.ps
  179. X  epsffit.c
  180. X  fixfmps
  181. X  fixmacps
  182. X--- 2,8 ----
  183. X  Makefile
  184. X  Manifest
  185. X  README
  186. X! epsffit.1
  187. X  epsffit.c
  188. X  fixfmps
  189. X  fixmacps
  190. X***************
  191. X*** 14,23 ****
  192. X  getafm
  193. X  md68.0.ps
  194. X  md71.0.ps
  195. X  psbook.1
  196. X  psbook.c
  197. X- psnup
  198. X  psnup.1
  199. X  psselect.1
  200. X  psselect.c
  201. X  pstops.1
  202. X--- 13,23 ----
  203. X  getafm
  204. X  md68.0.ps
  205. X  md71.0.ps
  206. X+ patchlevel.h
  207. X  psbook.1
  208. X  psbook.c
  209. X  psnup.1
  210. X+ psnup.sh
  211. X  psselect.1
  212. X  psselect.c
  213. X  pstops.1
  214. Xdiff -c -r +new-file psutils-dist/README psutils/README
  215. X*** psutils-dist/README    Mon Feb  8 11:33:18 1993
  216. X--- psutils/README    Thu Feb 11 09:27:14 1993
  217. X***************
  218. X*** 59,65 ****
  219. X  showchar (sh)   outputs PostScript to draw a character with metric info
  220. X  fixfmps  (perl) filter to fix framemaker documents so that psselect etc. work
  221. X  fixwpps  (perl) filter to fix WordPerfect documents so that psselect etc. work
  222. X! fixwpps  (perl) filter to fix Word for Windows documents for psutils
  223. X  fixmacps (perl) filter to fix Macintosh documents with saner version of md
  224. X  fixpsditps (perl) filter to fix Transcript psdit documents to work with psutils
  225. X  fixpspps (perl) filter to fix PSPrint PostScript so that psselect etc. work
  226. X--- 59,65 ----
  227. X  showchar (sh)   outputs PostScript to draw a character with metric info
  228. X  fixfmps  (perl) filter to fix framemaker documents so that psselect etc. work
  229. X  fixwpps  (perl) filter to fix WordPerfect documents so that psselect etc. work
  230. X! fixwfwps (perl) filter to fix Word for Windows documents for psutils
  231. X  fixmacps (perl) filter to fix Macintosh documents with saner version of md
  232. X  fixpsditps (perl) filter to fix Transcript psdit documents to work with psutils
  233. X  fixpspps (perl) filter to fix PSPrint PostScript so that psselect etc. work
  234. X***************
  235. X*** 83,86 ****
  236. X--- 83,103 ----
  237. X  This is an interim release; these utilities are currently being re-written
  238. X  from scratch, with a full DSC-3.0 parser and more extraction, merging, and
  239. X  inclusion options included.
  240. X+ 
  241. X+ ACKNOWLEDGEMENTS
  242. X+ 
  243. X+ Bug fixes and suggestions for improvements to PSUtils have come from many
  244. X+ people, including:
  245. X+ 
  246. X+         Brian Colfer            brianc@labmed.ucsf.edu
  247. X+         Charles A. Finnell      finnell@org.mitre.lear
  248. X+         Conrad Kimball          cek@com.boeing.sdc
  249. X+         J.W.Hawtin              
  250. X+         Jochen Schwarze         schwarze@de.isa
  251. X+         Ken Carpenter           khc@edu.ksu.eece
  252. X+         Kristian Jorg           etxkrjg@se.ericsson.solsta
  253. X+         Larry Weissman          larryw@nsr.bioeng.washington.edu 
  254. X+         Michael L. Brown        brown%uucp.vidiot@edu.wisc.cs
  255. X+         
  256. X+ (Apologies to anyone who I have left out.)
  257. X  
  258. Xdiff -c -r +new-file psutils-dist/epsffit.1 psutils/epsffit.1
  259. X*** psutils-dist/epsffit.1
  260. X--- psutils/epsffit.1    Mon Feb  8 10:35:42 1993
  261. X***************
  262. X*** 0 ****
  263. X--- 1,47 ----
  264. X+ .TH EPSFFIT 1
  265. X+ .SH NAME
  266. X+ epsffit \- fit encapsulated PostScript file (EPSF) into constrained size
  267. X+ .SH SYNOPSIS
  268. X+ .B epsffit
  269. X+ [
  270. X+ .B \-c
  271. X+ ]
  272. X+ [
  273. X+ .B \-r
  274. X+ ]
  275. X+ [
  276. X+ .B \-a
  277. X+ ]
  278. X+ [
  279. X+ .B \-s
  280. X+ ]
  281. X+ .I "llx lly urx ury"
  282. X+ [
  283. X+ .B file
  284. X+ ]
  285. X+ .SH DESCRIPTION
  286. X+ .I Epsffit
  287. X+ fits an EPSF file (encapsulated PostScript) to a given bounding box.
  288. X+ The coordinates of the box are given by \fB(llx,lly)\fR for the lower
  289. X+ left, and \fB(urx,ury)\fR for the upper right, in PostScript units (points).
  290. X+ .PP
  291. X+ If no file is specified,
  292. X+ .I epsffit
  293. X+ uses the standard input. Output is always to the standard output.
  294. X+ .SH OPTIONS
  295. X+ .IP \fB\-c\fP 1i
  296. X+ Center the image in the given bounding box.
  297. X+ .IP \fB\-r\fP 1i
  298. X+ Rotate the image by 90 degrees counter-clockwise.
  299. X+ .IP \fB\-a\fP 1i
  300. X+ Adjust the aspect ratio to fit the bounding box. The default is to preserve
  301. X+ the aspect ratio.
  302. X+ .IP \fB\-s\fP 1i
  303. X+ Add a \fIshowpage\fP at the end of the file to force the image to print.
  304. X+ .SH AUTHOR
  305. X+ Angus Duggan
  306. X+ .SH "SEE ALSO"
  307. X+ psbook(1), psselect(1)
  308. X+ .SH TRADEMARKS
  309. X+ .B PostScript
  310. X+ is a trademark of Adobe Systems Incorporated.
  311. Xdiff -c -r +new-file psutils-dist/epsffit.c psutils/epsffit.c
  312. X*** psutils-dist/epsffit.c    Mon Feb  8 11:33:40 1993
  313. X--- psutils/epsffit.c    Wed Feb 10 12:47:28 1993
  314. X***************
  315. X*** 2,12 ****
  316. X   * AJCD 6 Dec 90
  317. X   * fit epsf file into constrained size
  318. X   * Usage:
  319. X!  *       epsffit [-c] [-r] [-a] [-s] llx lly urx ury
  320. X   *               -c centres the image in the bounding box given
  321. X   *               -r rotates the image by 90 degrees anti-clockwise
  322. X   *               -a alters the aspect ratio to fit the bounding box
  323. X   *               -s adds a showpage at the end of the image
  324. X   */
  325. X  
  326. X  #include <stdio.h>
  327. X--- 2,14 ----
  328. X   * AJCD 6 Dec 90
  329. X   * fit epsf file into constrained size
  330. X   * Usage:
  331. X!  *       epsffit [-c] [-r] [-a] [-s] llx lly urx ury [file]
  332. X   *               -c centres the image in the bounding box given
  333. X   *               -r rotates the image by 90 degrees anti-clockwise
  334. X   *               -a alters the aspect ratio to fit the bounding box
  335. X   *               -s adds a showpage at the end of the image
  336. X+  *
  337. X+  * Added filename spec (from Larry Weissman) 5 Feb 93
  338. X   */
  339. X  
  340. X  #include <stdio.h>
  341. X***************
  342. X*** 21,27 ****
  343. X  usage()
  344. X  {
  345. X     fprintf(stderr, "%s release %d patchlevel %d\n", prog, RELEASE, PATCHLEVEL);
  346. X!    fprintf(stderr, "Usage: %s [-c] [-r] [-a] [-s] llx lly urx ury\n", prog);
  347. X     exit(1);
  348. X  }
  349. X  
  350. X--- 23,30 ----
  351. X  usage()
  352. X  {
  353. X     fprintf(stderr, "%s release %d patchlevel %d\n", prog, RELEASE, PATCHLEVEL);
  354. X!    fprintf(stderr, "Usage: %s [-c] [-r] [-a] [-s] llx lly urx ury [file]\n",
  355. X!        prog);
  356. X     exit(1);
  357. X  }
  358. X  
  359. X***************
  360. X*** 29,40 ****
  361. X       int argc;
  362. X       char **argv;
  363. X  {
  364. X-    int fit[4], i;
  365. X     int bbfound = 0;              /* %%BoundingBox: found */
  366. X     int urx, ury, llx, lly;
  367. X     int furx, fury, fllx, flly, fwidth, fheight;
  368. X     int showpage = 0, centre = 0, rotate = 0, aspect = 0;
  369. X     char buf[BUFSIZ];
  370. X  
  371. X     prog = *argv++; argc--;
  372. X  
  373. X--- 32,43 ----
  374. X       int argc;
  375. X       char **argv;
  376. X  {
  377. X     int bbfound = 0;              /* %%BoundingBox: found */
  378. X     int urx, ury, llx, lly;
  379. X     int furx, fury, fllx, flly, fwidth, fheight;
  380. X     int showpage = 0, centre = 0, rotate = 0, aspect = 0;
  381. X     char buf[BUFSIZ];
  382. X+    FILE *input = stdin;
  383. X  
  384. X     prog = *argv++; argc--;
  385. X  
  386. X***************
  387. X*** 51,57 ****
  388. X        argv++;
  389. X     }
  390. X  
  391. X!    if (argc != 4) usage();
  392. X     fllx = atoi(argv[0]);
  393. X     flly = atoi(argv[1]);
  394. X     furx = atoi(argv[2]);
  395. X--- 54,60 ----
  396. X        argv++;
  397. X     }
  398. X  
  399. X!    if (argc < 4) usage();
  400. X     fllx = atoi(argv[0]);
  401. X     flly = atoi(argv[1]);
  402. X     furx = atoi(argv[2]);
  403. X***************
  404. X*** 63,70 ****
  405. X        fwidth = furx - fllx;
  406. X        fheight = fury - flly;
  407. X     }
  408. X  
  409. X!    while (fgets(buf, BUFSIZ, stdin)) {
  410. X        if (buf[0] == '%' && (buf[1] == '%' || buf[1] == '!')) {
  411. X       /* still in comment section */
  412. X       if (!strncmp(buf, "%%BoundingBox:", 14)) {
  413. X--- 66,79 ----
  414. X        fwidth = furx - fllx;
  415. X        fheight = fury - flly;
  416. X     }
  417. X+    if (argc > 4) {
  418. X+       if(!(input = fopen(argv[4],"r"))) {
  419. X+      fprintf(stderr, "%s: Cannot open %s\n", prog, argv[4]);
  420. X+      exit(1);
  421. X+       }
  422. X+    }
  423. X  
  424. X!    while (fgets(buf, BUFSIZ, input)) {
  425. X        if (buf[0] == '%' && (buf[1] == '%' || buf[1] == '!')) {
  426. X       /* still in comment section */
  427. X       if (!strncmp(buf, "%%BoundingBox:", 14)) {
  428. X***************
  429. X*** 120,126 ****
  430. X     }
  431. X     do {
  432. X        fputs(buf,stdout);
  433. X!    } while (fgets(buf, BUFSIZ, stdin));
  434. X     if (bbfound) {
  435. X        puts("grestore");
  436. X        if (showpage)
  437. X--- 129,135 ----
  438. X     }
  439. X     do {
  440. X        fputs(buf,stdout);
  441. X!    } while (fgets(buf, BUFSIZ, input));
  442. X     if (bbfound) {
  443. X        puts("grestore");
  444. X        if (showpage)
  445. Xdiff -c -r +new-file psutils-dist/fixfmps psutils/fixfmps
  446. X*** psutils-dist/fixfmps    Mon Feb  8 11:33:41 1993
  447. X--- psutils/fixfmps    Wed Feb 10 14:38:18 1993
  448. X***************
  449. X*** 2,7 ****
  450. X--- 2,11 ----
  451. X  # fixfmps: get conforming PostScript out of FrameMaker file
  452. X  # move all FMDEFINEFONTs to start of pages
  453. X  
  454. X+ # feed this into perl
  455. X+ eval 'exec perl -S $0 "$@"'
  456. X+    if $running_under_some_shell;
  457. X+ 
  458. X  %fonts=();
  459. X  
  460. X  while (<>) {
  461. Xdiff -c -r +new-file psutils-dist/fixmacps psutils/fixmacps
  462. X*** psutils-dist/fixmacps    Mon Feb  8 11:33:41 1993
  463. X--- psutils/fixmacps    Wed Feb 10 14:38:06 1993
  464. X***************
  465. X*** 1,6 ****
  466. X--- 1,10 ----
  467. X  #!/usr/local/bin/perl
  468. X  # fixmacps: swap to sanitised appledict
  469. X  
  470. X+ # feed this into perl
  471. X+ eval 'exec perl -S $0 "$@"'
  472. X+    if $running_under_some_shell;
  473. X+ 
  474. X  $line = 0;            # keep line count
  475. X  $dir = "/usr/local/share/tex/dvips";
  476. X  $prefix = "md";
  477. X***************
  478. X*** 15,20 ****
  479. X--- 19,26 ----
  480. X     }
  481. X  }
  482. X  
  483. X+ %fonts = ();
  484. X+ 
  485. X  while (<>) {
  486. X     if (/^%!/) {
  487. X        if (! $line) {
  488. X***************
  489. X*** 52,61 ****
  490. X       print "%!\n" if !$line;
  491. X       print;
  492. X        }
  493. X     } else {
  494. X        if (! $ignore) {
  495. X!      print "%!\n" if !$line;
  496. X!      print;
  497. X        }
  498. X     }
  499. X     $line++;
  500. X--- 58,75 ----
  501. X       print "%!\n" if !$line;
  502. X       print;
  503. X        }
  504. X+    } elsif (/^%%Page:/) {
  505. X+       print $_;
  506. X+       print values(%fonts);
  507. X     } else {
  508. X        if (! $ignore) {
  509. X!      if (/^\{\}mark .*rf$/) {
  510. X!         $fonts{$_} = $_;
  511. X!         print;
  512. X!      } else {
  513. X!         print "%!\n" if !$line;
  514. X!         print;
  515. X!      }
  516. X        }
  517. X     }
  518. X     $line++;
  519. Xdiff -c -r +new-file psutils-dist/fixpsditps psutils/fixpsditps
  520. X*** psutils-dist/fixpsditps    Mon Feb  8 11:33:42 1993
  521. X--- psutils/fixpsditps    Wed Feb 10 14:38:26 1993
  522. X***************
  523. X*** 1,6 ****
  524. X--- 1,10 ----
  525. X  #!/usr/local/bin/perl
  526. X  # fixpsditps: fix psdit output for use in psutils
  527. X  
  528. X+ # feed this into perl
  529. X+ eval 'exec perl -S $0 "$@"'
  530. X+    if $running_under_some_shell;
  531. X+ 
  532. X  while (<>) {
  533. X     if (/^\/p{pop showpage pagesave restore \/pagesave save def}def$/) {
  534. X        print STDOUT "/p{pop showpage pagesave restore}def\n";
  535. Xdiff -c -r +new-file psutils-dist/fixpspps psutils/fixpspps
  536. X*** psutils-dist/fixpspps    Mon Feb  8 11:33:42 1993
  537. X--- psutils/fixpspps    Wed Feb 10 14:38:35 1993
  538. X***************
  539. X*** 1,6 ****
  540. X--- 1,10 ----
  541. X  #!/usr/local/bin/perl
  542. X  # mangle PostScript produced by PSPrint to make it almost conforming
  543. X  
  544. X+ # feed this into perl
  545. X+ eval 'exec perl -S $0 "$@"'
  546. X+    if $running_under_some_shell;
  547. X+ 
  548. X  $header = 1; $ignore = 0;
  549. X  $verbose = 0;
  550. X  @body = ();
  551. Xdiff -c -r +new-file psutils-dist/fixwfwps psutils/fixwfwps
  552. X*** psutils-dist/fixwfwps    Mon Feb  8 11:33:43 1993
  553. X--- psutils/fixwfwps    Wed Feb 10 14:38:45 1993
  554. X***************
  555. X*** 1,6 ****
  556. X--- 1,10 ----
  557. X  #!/usr/local/bin/perl
  558. X  # fixwfwps: fix Word for windows PostScript for printing.
  559. X  
  560. X+ # feed this into perl
  561. X+ eval 'exec perl -S $0 "$@"'
  562. X+    if $running_under_some_shell;
  563. X+ 
  564. X  while (<>) {
  565. X     tr/\000-\011\013-\037//d;
  566. X     if (/^(%!PS-Adobe-[0-9]*\.[0-9]*) EPSF-/) {
  567. Xdiff -c -r +new-file psutils-dist/fixwpps psutils/fixwpps
  568. X*** psutils-dist/fixwpps    Mon Feb  8 11:33:26 1993
  569. X--- psutils/fixwpps    Wed Feb 10 14:38:53 1993
  570. X***************
  571. X*** 1,6 ****
  572. X--- 1,10 ----
  573. X  #!/usr/local/bin/perl
  574. X  # fixwpps: get semi-conforming PostScript out of WordPerfect 5.0 file
  575. X  
  576. X+ # feed this into perl
  577. X+ eval 'exec perl -S $0 "$@"'
  578. X+    if $running_under_some_shell;
  579. X+ 
  580. X  $page = 1;
  581. X  while (<>) {
  582. X     s/(_[a-zA-Z]+)([0-9]+)/\1 \2/g;
  583. Xdiff -c -r +new-file psutils-dist/patchlevel.h psutils/patchlevel.h
  584. X*** psutils-dist/patchlevel.h    Mon Feb  8 11:33:44 1993
  585. X--- psutils/patchlevel.h    Wed Feb 10 12:47:18 1993
  586. X***************
  587. X*** 1,2 ****
  588. X  #define RELEASE 1
  589. X! #define PATCHLEVEL 7
  590. X--- 1,2 ----
  591. X  #define RELEASE 1
  592. X! #define PATCHLEVEL 8
  593. Xdiff -c -r +new-file psutils-dist/psnup.sh psutils/psnup.sh
  594. X*** psutils-dist/psnup.sh
  595. X--- psutils/psnup.sh    Wed Feb 10 14:14:49 1993
  596. X***************
  597. X*** 0 ****
  598. X--- 1,93 ----
  599. X+ #!/bin/sh
  600. X+ # psnup: put multiple pages onto one physical sheet of paper.
  601. X+ # usage:
  602. X+ #       psnup [-w<dim>] [-h<dim>] [-ppaper] [-l] [-2|-4|-8|-9] [file...]
  603. X+ #               -w<dim> sets the paper width
  604. X+ #               -h<dim> sets the paper height
  605. X+ #               -ppaper sets the paper size (width and height) by name
  606. X+ #               -l      is used if the pages are in landscape orientation
  607. X+ 
  608. X+ io= landscape=0 nup=1 width= height= paper=@PAPER@
  609. X+ 
  610. X+ while test $# != 0
  611. X+ do      case "$1" in
  612. X+         -w*)    width=$1 ; paper= ;;
  613. X+         -h*)    height=$1 ; paper= ;;
  614. X+         -p*)    paper=`echo "$1" | sed "s/^-.//"` ;;
  615. X+         -m*)    margins=`echo "$1" | sed "s/^-.//"` ;; # not implemented yet
  616. X+         -l)     landscape=1 ;;
  617. X+         -2)     nup=2 ;;
  618. X+         -4)     nup=4 ;;
  619. X+         -8)     nup=8 ;;
  620. X+         -9)     nup=9 ;;
  621. X+         -s*)    xscale=`echo "$1" | sed "s/^-./@/"` ;;
  622. X+         -v)     echo "psnup release @RELEASE@ patchlevel @PATCHLEVEL@" ; exit 1 ;;
  623. X+         *)      io="$io $1"
  624. X+         esac
  625. X+         shift
  626. X+ done
  627. X+ 
  628. X+ tscale=@.707     # scale for twoup
  629. X+ fscale=@.5       # scale for fourup
  630. X+ escale=@.3536    # scale for eightup
  631. X+ nscale=@.333     # scale for nineup
  632. X+ 
  633. X+ case "$paper" in
  634. X+ a3|A3)  width=-w29.7cm height=-h42cm ;;
  635. X+ a4|A4)  width=-w21cm height=-h29.7cm ;;
  636. X+ a5|A5)  width=-w14.85cm height=-h21cm ;;
  637. X+ letter) width=-w8.5in height=-h11in tscale=@.648 escale=@.324 ;;
  638. X+ esac
  639. X+ 
  640. X+ scale= offset=
  641. X+ case "$nup" in
  642. X+ 2)      scale=$tscale
  643. X+         if [ $landscape = 0 ]
  644. X+         then offset="(1w,0) (1w,.5h)"
  645. X+         else offset="(0,.5h) (0,0)"
  646. X+         fi
  647. X+         landscape=`expr 1 - $landscape` ;;
  648. X+ 4)      scale=$fscale
  649. X+         if [ $landscape = 0 ]
  650. X+         then offset="(0,.5h) (.5w,.5h) (0,0) (.5w,0)"
  651. X+         else offset="(.5w,0) (.5w,.5h) (1w,0) (1w,.5h)"
  652. X+         fi ;;
  653. X+ 8)      scale=$escale
  654. X+         if [ $landscape = 0 ]
  655. X+         then offset="(.5w,0) (.5w,.25h) (.5w,.5h) (.5w,.75h)\
  656. X+                      (1w,0) (1w,.25h) (1w,.5h) (1w,.75h)"
  657. X+         else offset="(0,.75h) (.5w,.75h) (0,.5h) (.5w,.5h)\
  658. X+                      (0,.25h) (.5w,.25h) (0,0) (.5w,0)"
  659. X+         fi
  660. X+         landscape=`expr 1 - $landscape` ;;
  661. X+ 9)      scale=$nscale
  662. X+         if [ $landscape = 0 ]
  663. X+         then offset="(0,.666h) (.333w,.666h) (.666w,.666h)\
  664. X+                      (0,.333h) (.333w,.333h) (.666w,.333h)\
  665. X+                      (0,0) (.333w,0) (.666w,0)"
  666. X+         else offset="(.333w,0) (.333w,.333h) (.333w,.666h)\
  667. X+                      (.666w,0) (.666w,.333h) (.666w,.666h)\
  668. X+                      (1w,0) (1w,.333h) (1w,.666h)"
  669. X+         fi ;;
  670. X+ esac
  671. X+ 
  672. X+ if [ "X$xscale" != "X" ]
  673. X+ then scale=$xscale
  674. X+ fi
  675. X+ 
  676. X+ if [ $landscape = 0 ]
  677. X+ then rotate=
  678. X+ else rotate=L
  679. X+ fi
  680. X+ 
  681. X+ options= sep= page=0
  682. X+ 
  683. X+ set ""${offset}
  684. X+ while [ $page -lt $nup ]
  685. X+ do      options="$options${sep}$page$rotate$scale$1"
  686. X+         sep=+
  687. X+         page=`expr $page + 1`
  688. X+         shift
  689. X+ done
  690. X+ 
  691. X+ pstops $width $height "$nup:$options" $io
  692. X
  693. END_OF_FILE
  694.   if test 18589 -ne `wc -c <'Patch1.7-1.8'`; then
  695.     echo shar: \"'Patch1.7-1.8'\" unpacked with wrong size!
  696.   fi
  697.   # end of 'Patch1.7-1.8'
  698. fi
  699. echo shar: End of archive.
  700. #
  701. # cleanup obsoleted psnup, replaced by psnup.sh
  702. #
  703. if test -f psnup ; then
  704.     echo shar: Removing obsoleted \"'psnup'\"
  705.     rm -f psnup
  706. elif test -f psutils/psnup ; then
  707.     echo shar: Removing obsoleted \"'psnup'\"
  708.     rm -f psutils/psnup
  709. fi
  710. echo shar: Done
  711. exit 0
  712. exit 0 # Just in case...
  713.