summaryrefslogtreecommitdiff
path: root/ps/psfig.diff
blob: 1339ba221be49818a83cc000c9b832ef02131878 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
These are patches to makes psfig work with groff.  They apply to the
version of psfig in comp.sources.unix/Volume11.  After applying them,
psfig should be recompiled with -DGROFF.  The resulting psfig will
work only with groff, so you might want to install it under a
different name.  The output of this psfig must be processed using the
macros in the file tmac.psfig in this directory.  These will
automatically add the necessary PostScript code to the prologue output
by grops.  Use of the `global' feature in psfig will result in
non-conformant PostScript which will fail if processed by a page
reversal program.  Note that psfig is unsupported by me (I'm not
interested in hearing about psfig problems.)  For new documents, I
recommend using the PostScript inclusion features provided by grops.

James Clark
jjc@jclark.uucp

*** cmds.c.~1~	Thu Feb 14 16:09:45 1991
--- cmds.c	Mon Mar  4 12:49:26 1991
***************
*** 245,253 ****
--- 245,261 ----
  		(void) sprintf(x, "%.2fp", fx);
  		(void) sprintf(y, "%.2fp", fy);
  	} else if (!*x) {
+ #ifndef GROFF
  		(void) sprintf(x,"(%.2fp*%s/%.2fp)", fx, y, fy);
+ #else /* GROFF */
+ 		(void) sprintf(x,"(%.0fu*%s/%.0fu)", fx, y, fy);
+ #endif /* GROFF */
  	} else if (!*y) {
+ #ifndef GROFF
  		(void) sprintf(y,"(%.2fp*%s/%.2fp)", fy, x, fx);
+ #else /* GROFF */
+ 		(void) sprintf(y,"(%.0fu*%s/%.0fu)", fy, x, fx);
+ #endif /* GROFF */
  	}
  
  	/* 
*** troff.c.~1~	Thu Feb 14 16:09:48 1991
--- troff.c	Mon Mar  4 12:48:46 1991
***************
*** 26,32 ****
--- 26,36 ----
  }
  
  
+ #ifndef GROFF
  char incl_file_s[] = "\\X'f%s'";
+ #else /* GROFF */
+ char incl_file_s[] = "\\X'ps: file %s'";
+ #endif /* GROFF */
  includeFile(filenm)
  char *filenm; {
  	printf(incl_file_s, filenm);
***************
*** 40,52 ****
--- 44,64 ----
  		error("buffer overflow");
  }
  
+ #ifndef GROFF
  char endfig_s[] = "\\X'pendFig'";
+ #else /* GROFF */
+ char endfig_s[] = "\\X'ps: exec psfigend'";
+ #endif /* GROFF */
  endfig() {
  	printf(endfig_s);
  }
  
  char startfig_s[] =
+ #ifndef GROFF
  "\\X'p\\w@\\h@%s@@'\\X'p\\w@\\h@%s@@'\\X'p%.2f'\\X'p%.2f'\\X'p%.2f'\\X'p%.2f'\\X'pstartFig'";
+ #else /* GROFF */
+ "\\X'ps: exec \\w@\\h@%s@@ \\w@\\h@%s@@ %.2f %.2f %.2f %.2f psfigstart'";
+ #endif /* GROFF */
  
  startfig(x, y, llx, lly, urx, ury)
  char	*x, *y;
***************
*** 57,63 ****
--- 69,79 ----
  }
  
  emitDoClip() {
+ #ifndef GROFF
  	printf("\\X'pdoclip'");
+ #else /* GROFF */
+ 	printf("\\X'ps: exec psfigclip'");
+ #endif /* GROFF */
  }
  
  flushX()
***************
*** 116,122 ****
--- 132,142 ----
  
  #define isWhite(ch) ((ch) == ' ' || (ch) == '\t' || (ch) == '\n')
  
+ #ifndef GROFF
  char literal_s[] = "\\X'p%s'";
+ #else /* GROFF */
+ char literal_s[] = "\\X'ps: exec %s'";
+ #endif /* GROFF */
  emitLiteral(text)
  char *text; {
  	static char litbuf[BUFSZ];