View | Details | Raw Unified | Return to bug 4363
Collapse All | Expand All

(-)psutils/pstops.c.orig (-1 / +9 lines)
Lines 35-41 Link Here
35
{
35
{
36
   fprintf(stderr, "%s: page specification error:\n", program);
36
   fprintf(stderr, "%s: page specification error:\n", program);
37
   fprintf(stderr, "  <pagespecs> = [modulo:]<spec>\n");
37
   fprintf(stderr, "  <pagespecs> = [modulo:]<spec>\n");
38
   fprintf(stderr, "  <spec>      = [-]pageno[@scale][L|R|U][(xoff,yoff)][,spec|+spec]\n");
38
   fprintf(stderr, "  <spec>      = [-]pageno[@scale][L|R|U|H|V][(xoff,yoff)][,spec|+spec]\n");
39
   fprintf(stderr, "                modulo>=1, 0<=pageno<modulo\n");
39
   fprintf(stderr, "                modulo>=1, 0<=pageno<modulo\n");
40
   fflush(stderr);
40
   fflush(stderr);
41
   exit(1);
41
   exit(1);
Lines 81-86 Link Here
81
	    tail->rotate += 180;
81
	    tail->rotate += 180;
82
	    tail->flags |= ROTATE;
82
	    tail->flags |= ROTATE;
83
	    break;
83
	    break;
84
	 case 'h': case 'H':
85
	    tail->hflip += 1;
86
	    tail->flags |= HFLIP;
87
	    break;
88
	 case 'v': case 'V':
89
	    tail->vflip += 1;
90
	    tail->flags |= VFLIP;
91
	    break;
84
	 case '(':
92
	 case '(':
85
	    tail->xoff += parsedimen(&str, argerror);
93
	    tail->xoff += parsedimen(&str, argerror);
86
	    if (*str++ != ',') argerror();
94
	    if (*str++ != ',') argerror();
(-)psutils/psspec.h.orig (-4 / +6 lines)
Lines 8-19 Link Here
8
/* pagespec flags */
8
/* pagespec flags */
9
#define ADD_NEXT (0x01)
9
#define ADD_NEXT (0x01)
10
#define ROTATE   (0x02)
10
#define ROTATE   (0x02)
11
#define SCALE    (0x04)
11
#define HFLIP    (0x04)
12
#define OFFSET   (0x08)
12
#define VFLIP    (0x08)
13
#define GSAVE    (ROTATE|SCALE|OFFSET)
13
#define SCALE    (0x10)
14
#define OFFSET   (0x20)
15
#define GSAVE    (ROTATE|HFLIP|VFLIP|SCALE|OFFSET)
14
16
15
typedef struct pagespec {
17
typedef struct pagespec {
16
   int reversed, pageno, flags, rotate;
18
   int reversed, pageno, flags, rotate, hflip, vflip;
17
   double xoff, yoff, scale;
19
   double xoff, yoff, scale;
18
   struct pagespec *next;
20
   struct pagespec *next;
19
} PageSpec ;
21
} PageSpec ;
(-)psutils/psspec.c.orig (+10 lines)
Lines 22-27 Link Here
22
   if (temp == NULL)
22
   if (temp == NULL)
23
      message(FATAL, "out of memory\n");
23
      message(FATAL, "out of memory\n");
24
   temp->reversed = temp->pageno = temp->flags = temp->rotate = 0;
24
   temp->reversed = temp->pageno = temp->flags = temp->rotate = 0;
25
   temp->hflip = 0;
26
   temp->vflip = 0;
25
   temp->scale = 1;
27
   temp->scale = 1;
26
   temp->xoff = temp->yoff = 0;
28
   temp->xoff = temp->yoff = 0;
27
   temp->next = NULL;
29
   temp->next = NULL;
Lines 208-213 Link Here
208
	       sprintf(buffer, "%d rotate\n", ps->rotate);
210
	       sprintf(buffer, "%d rotate\n", ps->rotate);
209
	       writestring(buffer);
211
	       writestring(buffer);
210
	    }
212
	    }
213
	    if ((ps->flags & HFLIP) && (ps->hflip%2)) {
214
	       sprintf(buffer, "[ -1 0 0 1 %f 0 ] concat\n", width*ps->scale);
215
	       writestring(buffer);
216
	    }
217
	    if ((ps->flags & VFLIP) && (ps->vflip%2)) {
218
	       sprintf(buffer, "[ 1 0 0 -1 0 %f ] concat\n", height*ps->scale);
219
	       writestring(buffer);
220
	    }
211
	    if (ps->flags & SCALE) {
221
	    if (ps->flags & SCALE) {
212
	       sprintf(buffer, "%f dup scale\n", ps->scale);
222
	       sprintf(buffer, "%f dup scale\n", ps->scale);
213
	       writestring(buffer);
223
	       writestring(buffer);
(-)psutils/pstops.man.orig (-3 / +4 lines)
Lines 43-49 Link Here
43
.I = spec[+specs][,specs]
43
.I = spec[+specs][,specs]
44
.TP
44
.TP
45
.I spec
45
.I spec
46
.I = [-]pageno[L][R][U][@scale][(xoff,yoff)]
46
.I = [-]pageno[L][R][U][H][V][@scale][(xoff,yoff)]
47
.RE
47
.RE
48
.sp
48
.sp
49
.I modulo
49
.I modulo
Lines 74-81 Link Here
74
or
74
or
75
.B "h"
75
.B "h"
76
to specify as a multiple of the width or height.
76
to specify as a multiple of the width or height.
77
The optional parameters \fIL\fR, \fIR\fR, and \fIU\fR rotate the page left,
77
The optional parameters \fIL\fR, \fIR\fR, \fIU\fR, \fIH\fR and \fIV\fR
78
right, or upside-down.
78
rotate the page left, right, or upside-down, and flip (mirror) page
79
horizontally or vertically.
79
The optional
80
The optional
80
.I scale
81
.I scale
81
parameter scales the page by the fraction specified.
82
parameter scales the page by the fraction specified.
(-)psutils/README.orig (+1 lines)
Lines 181-186 Link Here
181
	Mike Coleman
181
	Mike Coleman
182
	Dale Scheetz		dwarf@polaris.net
182
	Dale Scheetz		dwarf@polaris.net
183
	Yves Arrouye		arrouye@marin.fdn.fr
183
	Yves Arrouye		arrouye@marin.fdn.fr
184
	Stanislav Brabec	utx@penguin.cz
184
185
185
(Apologies to anyone who I have left out, it was not intentional.)
186
(Apologies to anyone who I have left out, it was not intentional.)
186
187

Return to bug 4363