Accepting request 835745 from home:polslinux:branches:Publishing
- Update to v2.03 (no changelog) OBS-URL: https://build.opensuse.org/request/show/835745 OBS-URL: https://build.opensuse.org/package/show/Publishing/psutils?expand=0&rev=7
This commit is contained in:
parent
e23dd98ec0
commit
2b348a86e1
3
psutils-2.03.tar.gz
Normal file
3
psutils-2.03.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a24d1dab2aba74743ac5870f60f27d3d04d30a1075c92db5500df2cc0a6b0ba5
|
||||
size 1228431
|
112
psutils-flip.dif
112
psutils-flip.dif
@ -1,112 +0,0 @@
|
||||
Patch for pstops from psutils to allow page flipping (i. e. mirroring).
|
||||
Useful for creating of print matrices on transparent films.
|
||||
|
||||
http://www.penguin.cz/~utx
|
||||
ftp://ftp.penguin.cz/pub/users/utx/psutils/psutils-flip.diff
|
||||
|
||||
--- psutils/pstops.c.orig 1997-03-11 23:53:04.000000000 +0100
|
||||
+++ psutils/pstops.c 2002-07-26 19:14:49.000000000 +0200
|
||||
@@ -35,7 +35,7 @@
|
||||
{
|
||||
fprintf(stderr, "%s: page specification error:\n", program);
|
||||
fprintf(stderr, " <pagespecs> = [modulo:]<spec>\n");
|
||||
- fprintf(stderr, " <spec> = [-]pageno[@scale][L|R|U][(xoff,yoff)][,spec|+spec]\n");
|
||||
+ fprintf(stderr, " <spec> = [-]pageno[@scale][L|R|U|H|V][(xoff,yoff)][,spec|+spec]\n");
|
||||
fprintf(stderr, " modulo>=1, 0<=pageno<modulo\n");
|
||||
fflush(stderr);
|
||||
exit(1);
|
||||
@@ -81,6 +81,14 @@
|
||||
tail->rotate += 180;
|
||||
tail->flags |= ROTATE;
|
||||
break;
|
||||
+ case 'h': case 'H':
|
||||
+ tail->hflip += 1;
|
||||
+ tail->flags |= HFLIP;
|
||||
+ break;
|
||||
+ case 'v': case 'V':
|
||||
+ tail->vflip += 1;
|
||||
+ tail->flags |= VFLIP;
|
||||
+ break;
|
||||
case '(':
|
||||
tail->xoff += parsedimen(&str, argerror);
|
||||
if (*str++ != ',') argerror();
|
||||
--- psutils/psspec.h.orig 1997-03-11 23:53:04.000000000 +0100
|
||||
+++ psutils/psspec.h 2002-07-26 17:41:41.000000000 +0200
|
||||
@@ -8,12 +8,14 @@
|
||||
/* pagespec flags */
|
||||
#define ADD_NEXT (0x01)
|
||||
#define ROTATE (0x02)
|
||||
-#define SCALE (0x04)
|
||||
-#define OFFSET (0x08)
|
||||
-#define GSAVE (ROTATE|SCALE|OFFSET)
|
||||
+#define HFLIP (0x04)
|
||||
+#define VFLIP (0x08)
|
||||
+#define SCALE (0x10)
|
||||
+#define OFFSET (0x20)
|
||||
+#define GSAVE (ROTATE|HFLIP|VFLIP|SCALE|OFFSET)
|
||||
|
||||
typedef struct pagespec {
|
||||
- int reversed, pageno, flags, rotate;
|
||||
+ int reversed, pageno, flags, rotate, hflip, vflip;
|
||||
double xoff, yoff, scale;
|
||||
struct pagespec *next;
|
||||
} PageSpec ;
|
||||
--- psutils/psspec.c.orig 1997-03-11 23:53:04.000000000 +0100
|
||||
+++ psutils/psspec.c 2002-07-26 19:21:10.000000000 +0200
|
||||
@@ -22,6 +22,8 @@
|
||||
if (temp == NULL)
|
||||
message(FATAL, "out of memory\n");
|
||||
temp->reversed = temp->pageno = temp->flags = temp->rotate = 0;
|
||||
+ temp->hflip = 0;
|
||||
+ temp->vflip = 0;
|
||||
temp->scale = 1;
|
||||
temp->xoff = temp->yoff = 0;
|
||||
temp->next = NULL;
|
||||
@@ -208,6 +210,14 @@
|
||||
sprintf(buffer, "%d rotate\n", ps->rotate);
|
||||
writestring(buffer);
|
||||
}
|
||||
+ if ((ps->flags & HFLIP) && (ps->hflip%2)) {
|
||||
+ sprintf(buffer, "[ -1 0 0 1 %f 0 ] concat\n", width*ps->scale);
|
||||
+ writestring(buffer);
|
||||
+ }
|
||||
+ if ((ps->flags & VFLIP) && (ps->vflip%2)) {
|
||||
+ sprintf(buffer, "[ 1 0 0 -1 0 %f ] concat\n", height*ps->scale);
|
||||
+ writestring(buffer);
|
||||
+ }
|
||||
if (ps->flags & SCALE) {
|
||||
sprintf(buffer, "%f dup scale\n", ps->scale);
|
||||
writestring(buffer);
|
||||
--- psutils/pstops.man.orig 1997-03-11 23:53:04.000000000 +0100
|
||||
+++ psutils/pstops.man 2002-07-26 19:25:37.000000000 +0200
|
||||
@@ -43,7 +43,7 @@
|
||||
.I = spec[+specs][,specs]
|
||||
.TP
|
||||
.I spec
|
||||
-.I = [-]pageno[L][R][U][@scale][(xoff,yoff)]
|
||||
+.I = [-]pageno[L][R][U][H][V][@scale][(xoff,yoff)]
|
||||
.RE
|
||||
.sp
|
||||
.I modulo
|
||||
@@ -74,8 +74,9 @@
|
||||
or
|
||||
.B "h"
|
||||
to specify as a multiple of the width or height.
|
||||
-The optional parameters \fIL\fR, \fIR\fR, and \fIU\fR rotate the page left,
|
||||
-right, or upside-down.
|
||||
+The optional parameters \fIL\fR, \fIR\fR, \fIU\fR, \fIH\fR and \fIV\fR
|
||||
+rotate the page left, right, or upside-down, and flip (mirror) page
|
||||
+horizontally or vertically.
|
||||
The optional
|
||||
.I scale
|
||||
parameter scales the page by the fraction specified.
|
||||
--- psutils/README.orig 1997-03-11 23:53:05.000000000 +0100
|
||||
+++ psutils/README 2002-07-26 19:36:58.000000000 +0200
|
||||
@@ -181,6 +181,7 @@
|
||||
Mike Coleman
|
||||
Dale Scheetz dwarf@polaris.net
|
||||
Yves Arrouye arrouye@marin.fdn.fr
|
||||
+ Stanislav Brabec utx@penguin.cz
|
||||
|
||||
(Apologies to anyone who I have left out, it was not intentional.)
|
||||
|
337
psutils-p17.dif
337
psutils-p17.dif
@ -1,337 +0,0 @@
|
||||
--- .pkgextract
|
||||
+++ .pkgextract
|
||||
@@ -0,0 +1,2 @@
|
||||
+patch -p1 -s --suffix=".flip" < ../psutils-flip.dif
|
||||
+patch -p0 -s --suffix=".sec" < ../psutils-pserror.dif
|
||||
--- Makefile.unix
|
||||
+++ Makefile.unix
|
||||
@@ -25,10 +25,10 @@
|
||||
|
||||
OS = UNIX
|
||||
|
||||
-BINDIR = /usr/local/bin
|
||||
+BINDIR = /usr/bin
|
||||
SCRIPTDIR = $(BINDIR)
|
||||
-INCLUDEDIR = /usr/local/share/psutils
|
||||
-PERL = /usr/local/bin/perl
|
||||
+INCLUDEDIR = /usr/share/psutils
|
||||
+PERL = /usr/bin/perl
|
||||
|
||||
BINMODE = 0755
|
||||
MANMODE = 0644
|
||||
@@ -36,10 +36,11 @@
|
||||
INSTALL = install -c -m $(BINMODE)
|
||||
INSTALLMAN = install -c -m $(MANMODE)
|
||||
MANEXT = 1
|
||||
-MANDIR = /usr/local/share/man/man$(MANEXT)
|
||||
+MANDIR = /usr/share/man/man$(MANEXT)
|
||||
|
||||
CC = gcc
|
||||
-CFLAGS = -DPAPER=\"$(PAPER)\" -DUNIX -O -Wall
|
||||
+CFLAGS = -DPAPER=\"$(PAPER)\" -DUNIX $(RPM_OPT_FLAGS) -pipe -Wall
|
||||
+CCFLAGS = $(CFLAGS)
|
||||
|
||||
BIN = psbook psselect pstops epsffit psnup \
|
||||
psresize
|
||||
--- epsffit.c
|
||||
+++ epsffit.c
|
||||
@@ -39,15 +39,15 @@
|
||||
exit(1);
|
||||
}
|
||||
|
||||
-void main(int argc, char **argv)
|
||||
+int main(int argc, char **argv)
|
||||
{
|
||||
int bbfound = 0; /* %%BoundingBox: found */
|
||||
- int urx, ury, llx, lly;
|
||||
+ int urx = 0, ury = 0, llx = 0, lly = 0;
|
||||
int furx, fury, fllx, flly;
|
||||
int showpage = 0, centre = 0, rotate = 0, aspect = 0, maximise = 0;
|
||||
char buf[BUFSIZ];
|
||||
- FILE *input;
|
||||
- FILE *output;
|
||||
+ FILE *input = stdin;
|
||||
+ FILE *output = stdout;
|
||||
|
||||
program = *argv++; argc--;
|
||||
|
||||
@@ -163,9 +163,14 @@
|
||||
yoffset -= lly * yscale;
|
||||
}
|
||||
fputs("%%EndComments\n", output);
|
||||
- if (showpage)
|
||||
- fputs("save /showpage{}def /copypage{}def /erasepage{}def\n", output);
|
||||
- else
|
||||
+ if (showpage) {
|
||||
+ fputs("/startEpsffit {\n", output);
|
||||
+ fputs(" /EpsffitSave {save} def\n", output);
|
||||
+ fputs(" userdict 200 dict begin\n", output);
|
||||
+ fputs(" /showpage{}def /copypage{}def /erasepage{}def\n", output);
|
||||
+ fputs("}def\n", output);
|
||||
+ fputs("startEpsffit\n", output);
|
||||
+ } else
|
||||
fputs("%%BeginProcSet: epsffit 1 0\n", output);
|
||||
fputs("gsave\n", output);
|
||||
fprintf(output, "%.3f %.3f translate\n", xoffset, yoffset);
|
||||
@@ -181,7 +186,7 @@
|
||||
if (bbfound) {
|
||||
fputs("grestore\n", output);
|
||||
if (showpage)
|
||||
- fputs("restore showpage\n", output); /* just in case */
|
||||
+ fputs("end EpsffitSave restore showpage\n", output); /* just in case */
|
||||
} else
|
||||
message(FATAL, "no %%%%BoundingBox:\n");
|
||||
|
||||
--- getafm.sh
|
||||
+++ getafm.sh
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
- echo "usage: $0 font-name | gsnd - >font-name.afm" >&2
|
||||
+ echo "usage: $0 font-name | gsnd -q - >font-name.afm" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -66,8 +66,9 @@
|
||||
(isFixedPitch)(IsFixedPitch) prany
|
||||
(UnderlinePosition)dup prany
|
||||
(UnderlineThickness)dup prany
|
||||
- (Version)(version) prany
|
||||
+ (version)(Version) prany
|
||||
(Notice)dup prany
|
||||
+ (Copyright)dup prany
|
||||
pop
|
||||
}
|
||||
{
|
||||
--- psbook.c
|
||||
+++ psbook.c
|
||||
@@ -32,7 +32,7 @@
|
||||
}
|
||||
|
||||
|
||||
-void main(int argc, char *argv[])
|
||||
+int main(int argc, char *argv[])
|
||||
{
|
||||
int signature = 0;
|
||||
int currentpg, maxpage;
|
||||
--- psmerge.man
|
||||
+++ psmerge.man
|
||||
@@ -24,6 +24,26 @@
|
||||
.I Psmerge
|
||||
will merge multiple files concatenated into a single file as if they
|
||||
were in separate files.
|
||||
+.SH BUGS
|
||||
+.I psmerge
|
||||
+is for a very specific case; it does not merge files in the general case.
|
||||
+.br
|
||||
+For all those cases which can not be handled by
|
||||
+.I psmerge
|
||||
+the program
|
||||
+.I gs
|
||||
+(known as ghostscript) may help:
|
||||
+
|
||||
+.sp 1
|
||||
+.in +1c
|
||||
+.nf
|
||||
+ gs -dNOPAUSE -sDEVICE=pswrite -sOutputFile=out.ps \\
|
||||
+ file1.ps file2.ps ... -c quit
|
||||
+.fi
|
||||
+.in -1c
|
||||
+.sp 1
|
||||
+
|
||||
+This is rather slow and generates bigger output files.
|
||||
.SH AUTHOR
|
||||
Copyright (C) Angus J. C. Duggan 1991-1995
|
||||
.SH "SEE ALSO"
|
||||
@@ -31,6 +51,3 @@
|
||||
.SH TRADEMARKS
|
||||
.B PostScript
|
||||
is a trademark of Adobe Systems Incorporated.
|
||||
-.SH BUGS
|
||||
-.I psmerge
|
||||
-is for a very specific case; it does not merge files in the general case.
|
||||
--- psnup.c
|
||||
+++ psnup.c
|
||||
@@ -66,12 +66,12 @@
|
||||
return (0);
|
||||
}
|
||||
|
||||
-void main(int argc, char *argv[])
|
||||
+int main(int argc, char *argv[])
|
||||
{
|
||||
- int horiz, vert, rotate, column, flip, leftright, topbottom;
|
||||
+ int horiz = 0, vert = 0, rotate = 0, column, flip, leftright, topbottom;
|
||||
int nup = 1;
|
||||
double draw = 0; /* draw page borders */
|
||||
- double scale; /* page scale */
|
||||
+ double scale = 0; /* page scale */
|
||||
double uscale = 0; /* user supplied scale */
|
||||
double ppwid, pphgt; /* paper dimensions */
|
||||
double margin, border; /* paper & page margins */
|
||||
--- psresize.c
|
||||
+++ psresize.c
|
||||
@@ -46,7 +46,7 @@
|
||||
#define MIN(x,y) ((x) > (y) ? (y) : (x))
|
||||
#define MAX(x,y) ((x) > (y) ? (x) : (y))
|
||||
|
||||
-void main(int argc, char *argv[])
|
||||
+int main(int argc, char *argv[])
|
||||
{
|
||||
double scale, rscale; /* page scale */
|
||||
double waste, rwaste; /* amount wasted */
|
||||
--- psselect.c
|
||||
+++ psselect.c
|
||||
@@ -52,6 +52,9 @@
|
||||
{
|
||||
int first=0;
|
||||
int sign;
|
||||
+
|
||||
+ if(!str) return NULL;
|
||||
+
|
||||
sign = (*str == '_' && ++str) ? -1 : 1;
|
||||
if (isdigit(*str)) {
|
||||
first = sign*atoi(str);
|
||||
@@ -91,7 +94,7 @@
|
||||
}
|
||||
|
||||
|
||||
-void main(int argc, char *argv[])
|
||||
+int main(int argc, char *argv[])
|
||||
{
|
||||
int currentpg, maxpage = 0;
|
||||
int even = 0, odd = 0, reverse = 0;
|
||||
--- psspec.c
|
||||
+++ psspec.c
|
||||
@@ -12,6 +12,9 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
+/* #define SHOWPAGE_LOAD 1 */
|
||||
+#undef SHOWPAGE_LOAD
|
||||
+
|
||||
double width = -1;
|
||||
double height = -1;
|
||||
|
||||
--- pstops.c
|
||||
+++ pstops.c
|
||||
@@ -120,7 +120,7 @@
|
||||
return (head);
|
||||
}
|
||||
|
||||
-void main(int argc, char *argv[])
|
||||
+int main(int argc, char *argv[])
|
||||
{
|
||||
PageSpec *specs = NULL;
|
||||
int nobinding = 0;
|
||||
--- pstops.man
|
||||
+++ pstops.man
|
||||
@@ -86,7 +86,7 @@
|
||||
If page \fIspec\fRs are separated by
|
||||
.B \+
|
||||
the pages will be merged into one page; if they are separated by
|
||||
-.B \,
|
||||
+.B ,
|
||||
they will be on separate pages.
|
||||
If there is only one page specification, with
|
||||
.I pageno
|
||||
--- psutil.c
|
||||
+++ psutil.c
|
||||
@@ -44,14 +44,45 @@
|
||||
|
||||
/* list of paper sizes supported */
|
||||
static Paper papersizes[] = {
|
||||
- { "a3", 842, 1191 }, /* 29.7cm * 42cm */
|
||||
- { "a4", 595, 842 }, /* 21cm * 29.7cm */
|
||||
- { "a5", 421, 595 }, /* 14.85cm * 21cm */
|
||||
- { "b5", 516, 729 }, /* 18.2cm * 25.72cm */
|
||||
- { "A3", 842, 1191 }, /* 29.7cm * 42cm */
|
||||
- { "A4", 595, 842 }, /* 21cm * 29.7cm */
|
||||
- { "A5", 421, 595 }, /* 14.85cm * 21cm */
|
||||
- { "B5", 516, 729 }, /* 18.2cm * 25.72cm */
|
||||
+ { "a0", 2384, 3370 },
|
||||
+ { "a1", 1684, 2384 },
|
||||
+ { "a2", 1191, 1684 },
|
||||
+ { "a3", 842, 1191 }, /* 29.7cm * 42cm */
|
||||
+ { "a4", 595, 842 }, /* 21cm * 29.7cm */
|
||||
+ { "a5", 421, 595 }, /* 14.85cm * 21cm */
|
||||
+ { "a6", 297, 420 },
|
||||
+ { "a7", 210, 297 },
|
||||
+ { "a8", 148, 210 },
|
||||
+ { "a9", 105, 148 },
|
||||
+ { "a10", 73, 105 },
|
||||
+ { "isob0", 2835, 4008 },
|
||||
+ { "b0", 2835, 4008 },
|
||||
+ { "isob1", 2004, 2835 },
|
||||
+ { "b1", 2004, 2835 },
|
||||
+ { "isob2", 1417, 2004 },
|
||||
+ { "b2", 1417, 2004 },
|
||||
+ { "isob3", 1001, 1417 },
|
||||
+ { "b3", 1001, 1417 },
|
||||
+ { "isob4", 709, 1001 },
|
||||
+ { "b4", 709, 1001 },
|
||||
+ { "isob5", 499, 709 },
|
||||
+ { "b5", 499, 709 },
|
||||
+ { "isob6", 354, 499 },
|
||||
+ { "b6", 354, 499 },
|
||||
+ { "jisb0", 2920, 4127 },
|
||||
+ { "jisb1", 2064, 2920 },
|
||||
+ { "jisb2", 1460, 2064 },
|
||||
+ { "jisb3", 1032, 1460 },
|
||||
+ { "jisb4", 729, 1032 },
|
||||
+ { "jisb5", 516, 729 },
|
||||
+ { "jisb6", 363, 516 },
|
||||
+ { "c0", 2599, 3677 },
|
||||
+ { "c1", 1837, 2599 },
|
||||
+ { "c2", 1298, 1837 },
|
||||
+ { "c3", 918, 1298 },
|
||||
+ { "c4", 649, 918 },
|
||||
+ { "c5", 459, 649 },
|
||||
+ { "c6", 323, 459 },
|
||||
{ "letter", 612, 792 }, /* 8.5in * 11in */
|
||||
{ "legal", 612, 1008 }, /* 8.5in * 14in */
|
||||
{ "ledger", 1224, 792 }, /* 17in * 11in */
|
||||
@@ -61,6 +92,14 @@
|
||||
{ "folio", 612, 936 }, /* 8.5in * 13in */
|
||||
{ "quarto", 610, 780 }, /* 8.5in * 10.83in */
|
||||
{ "10x14", 720, 1008 }, /* 10in * 14in */
|
||||
+ { "archE", 2592, 3456 },
|
||||
+ { "archD", 1728, 2592 },
|
||||
+ { "archC", 1296, 1728 },
|
||||
+ { "archB", 864, 1296 },
|
||||
+ { "archA", 648, 864 },
|
||||
+ { "flsa", 612, 936 }, /* U.S. foolscap */
|
||||
+ { "flse", 612, 936 }, /* European foolscap */
|
||||
+ { "halfletter", 396, 612 },
|
||||
{ NULL, 0, 0 }
|
||||
};
|
||||
|
||||
@@ -69,7 +108,7 @@
|
||||
{
|
||||
Paper *pp;
|
||||
for (pp = papersizes; PaperName(pp); pp++) {
|
||||
- if (strcmp(PaperName(pp), name) == 0) {
|
||||
+ if (strncasecmp(PaperName(pp), name, strlen(PaperName(pp))) == 0) {
|
||||
return pp;
|
||||
}
|
||||
}
|
||||
@@ -88,16 +127,15 @@
|
||||
#if defined(WINNT)
|
||||
struct _stat fs ;
|
||||
#else
|
||||
- long fpos;
|
||||
+ struct stat fs;
|
||||
#endif
|
||||
|
||||
#if defined(WINNT)
|
||||
if (_fstat(fileno(fp), &fs) == 0 && (fs.st_mode&_S_IFREG) != 0)
|
||||
return (fp);
|
||||
#else
|
||||
- if ((fpos = ftell(fp)) >= 0)
|
||||
- if (!fseek(fp, 0L, SEEK_END) && !fseek(fp, fpos, SEEK_SET))
|
||||
- return (fp);
|
||||
+ if (fstat(fileno(fp), &fs) == 0 && S_ISREG(fs.st_mode))
|
||||
+ return (fp);
|
||||
#endif
|
||||
|
||||
#if defined(MSDOS)
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3853eb79584ba8fbe27a815425b65a9f7f15b258e0d43a05a856bdb75d588ae4
|
||||
size 62039
|
@ -1,106 +0,0 @@
|
||||
--- pserror.c
|
||||
+++ pserror.c 2005-04-04 18:02:22.000000000 +0200
|
||||
@@ -17,16 +17,17 @@
|
||||
warnings, and errors sent to stderr. If called with the flags MESSAGE_EXIT
|
||||
set, the routine does not return */
|
||||
|
||||
-#define MAX_MESSAGE 256 /* maximum formatted message length */
|
||||
+#define MAX_MESSAGE 1024 /* maximum formatted message length */
|
||||
#define MAX_FORMAT 16 /* maximum format length */
|
||||
#define MAX_COLUMN 78 /* maximum column to print upto */
|
||||
|
||||
void message(int flags, char *format, ...)
|
||||
{
|
||||
va_list args ;
|
||||
- static column = 0 ; /* current screen column for message wrap */
|
||||
- char msgbuf[MAX_MESSAGE] ; /* buffer in which to put the message */
|
||||
- char *bufptr = msgbuf ; /* message buffer pointer */
|
||||
+ static int column = 0 ; /* current screen column for message wrap */
|
||||
+ char msgbuf[MAX_MESSAGE]; /* buffer in which to put the message */
|
||||
+ char *bufptr = msgbuf; /* message buffer pointer */
|
||||
+ char *tail = bufptr + MAX_MESSAGE;
|
||||
|
||||
if ( (flags & MESSAGE_NL) && column != 0 ) { /* new line if not already */
|
||||
putc('\n', stderr) ;
|
||||
@@ -34,8 +35,11 @@
|
||||
}
|
||||
|
||||
if ( flags & MESSAGE_PROGRAM ) {
|
||||
+ const size_t len = strlen(program);
|
||||
+ if (len + 2 >= tail - bufptr)
|
||||
+ goto out;
|
||||
strcpy(bufptr, program) ;
|
||||
- bufptr += strlen(program) ;
|
||||
+ bufptr += len;
|
||||
*bufptr++ = ':' ;
|
||||
*bufptr++ = ' ' ;
|
||||
}
|
||||
@@ -55,13 +59,15 @@
|
||||
fmtbuf[index] = '\0' ;
|
||||
switch (c) {
|
||||
case '%':
|
||||
+ if (bufptr >= tail)
|
||||
+ goto out;
|
||||
*bufptr++ = '%' ;
|
||||
case '\0':
|
||||
break ;
|
||||
case 'e': case 'E': case 'f': case 'g': case 'G':
|
||||
{
|
||||
double d = va_arg(args, double) ;
|
||||
- sprintf(bufptr, fmtbuf, d) ;
|
||||
+ snprintf(bufptr, tail - bufptr, fmtbuf, d);
|
||||
bufptr += strlen(bufptr) ;
|
||||
}
|
||||
break ;
|
||||
@@ -69,17 +75,17 @@
|
||||
case 'p': case 'u': case 'x': case 'X':
|
||||
if ( longform ) {
|
||||
long l = va_arg(args, long) ;
|
||||
- sprintf(bufptr, fmtbuf, l) ;
|
||||
+ snprintf(bufptr, tail - bufptr, fmtbuf, l);
|
||||
} else {
|
||||
int i = va_arg(args, int) ;
|
||||
- sprintf(bufptr, fmtbuf, i) ;
|
||||
+ snprintf(bufptr, tail - bufptr, fmtbuf, i);
|
||||
}
|
||||
bufptr += strlen(bufptr) ;
|
||||
break ;
|
||||
case 's':
|
||||
{
|
||||
char *s = va_arg(args, char *) ;
|
||||
- sprintf(bufptr, fmtbuf, s) ;
|
||||
+ snprintf(bufptr, tail - bufptr, fmtbuf, s);
|
||||
bufptr += strlen(bufptr) ;
|
||||
}
|
||||
break ;
|
||||
@@ -92,6 +98,8 @@
|
||||
} while ( !done ) ;
|
||||
} else if ( c == '\n' ) { /* write out message so far and reset column */
|
||||
int len = bufptr - msgbuf ; /* length of current message */
|
||||
+ if (bufptr >= tail)
|
||||
+ goto out;
|
||||
*bufptr++ = '\n' ;
|
||||
*bufptr = '\0' ;
|
||||
if ( column + len > MAX_COLUMN && column > 0 ) {
|
||||
@@ -100,8 +108,11 @@
|
||||
}
|
||||
fputs(bufptr = msgbuf, stderr) ;
|
||||
column = 0 ;
|
||||
- } else
|
||||
+ } else {
|
||||
+ if (bufptr >= tail)
|
||||
+ goto out;
|
||||
*bufptr++ = c ;
|
||||
+ }
|
||||
}
|
||||
*bufptr = '\0' ;
|
||||
{
|
||||
@@ -117,6 +128,7 @@
|
||||
}
|
||||
va_end(args) ;
|
||||
|
||||
- if ( flags & MESSAGE_EXIT ) /* don't return to program */
|
||||
+out:
|
||||
+ if (flags & MESSAGE_EXIT) /* don't return to program */
|
||||
exit(1) ;
|
||||
}
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 17 11:47:24 UTC 2020 - Paolo Stivanin <info@paolostivanin.com>
|
||||
|
||||
- Update to v2.03 (no changelog)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 5 13:47:10 UTC 2013 - idonmez@suse.com
|
||||
|
||||
|
90
psutils.spec
90
psutils.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package psutils
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -12,23 +12,21 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: psutils
|
||||
Version: p17
|
||||
Version: 2.03
|
||||
Release: 0
|
||||
Summary: Tools for Manipulating PostScript Files
|
||||
License: GPL-2.0+
|
||||
License: GPL-3.0-or-later
|
||||
Group: Productivity/Publishing/PS
|
||||
Source: http://mirrors.ctan.org/support/psutils/psutils-p17.tar.gz
|
||||
Patch0: psutils-p17.dif
|
||||
Patch1: psutils-flip.dif
|
||||
Patch2: psutils-pserror.dif
|
||||
URL: https://github.com/rrthomas/psutils
|
||||
Source: https://github.com/rrthomas/psutils/releases/download/v%{version}/psutils-%{version}.tar.gz
|
||||
Requires: paper
|
||||
Requires: perl
|
||||
Provides: psutils-p17
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: perl(IPC::Run3)
|
||||
|
||||
%description
|
||||
This archive contains utilities for manipulating PostScript documents.
|
||||
@ -48,71 +46,43 @@ psresize alter document paper size
|
||||
|
||||
epsffit fits an EPSF file to a given bounding box
|
||||
|
||||
You will find a README in /usr/share/doc/packages/psutils/ which also
|
||||
You will find a README in %{_docdir}/psutils/ which also
|
||||
describes several Perl scripts for importing PostScript files. A manual
|
||||
page for each ps utility is also included.
|
||||
|
||||
%prep
|
||||
%setup -q -n psutils
|
||||
%patch1 -p1 -b .flip
|
||||
%patch2 -p0 -b .sec
|
||||
%patch0
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags} -f Makefile.unix RPM_OPT_FLAGS="%{optflags}"
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_mandir}/man1 %{buildroot}%{_prefix}/bin
|
||||
make -f Makefile.unix BINDIR=%{buildroot}%{_bindir} \
|
||||
MANDIR=%{buildroot}%{_mandir}/man1 \
|
||||
INCLUDEDIR=%{buildroot}%{_datadir}/psutils install
|
||||
%make_install
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README LICENSE
|
||||
%license COPYING
|
||||
%doc README
|
||||
%{_bindir}/epsffit
|
||||
%{_bindir}/extractres
|
||||
%{_bindir}/fixdlsrps
|
||||
%{_bindir}/fixfmps
|
||||
%{_bindir}/fixmacps
|
||||
%{_bindir}/fixpsditps
|
||||
%{_bindir}/fixpspps
|
||||
%{_bindir}/fixscribeps
|
||||
%{_bindir}/fixtpps
|
||||
%{_bindir}/fixwfwps
|
||||
%{_bindir}/fixwpps
|
||||
%{_bindir}/fixwwps
|
||||
%{_bindir}/getafm
|
||||
%{_bindir}/includeres
|
||||
%{_bindir}/psbook
|
||||
%{_bindir}/psmerge
|
||||
%{_bindir}/psnup
|
||||
%{_bindir}/psresize
|
||||
%{_bindir}/psselect
|
||||
%{_bindir}/pstops
|
||||
%{_bindir}/showchar
|
||||
%{_mandir}/man1/epsffit.1.gz
|
||||
%{_mandir}/man1/extractres.1.gz
|
||||
%{_mandir}/man1/fixdlsrps.1.gz
|
||||
%{_mandir}/man1/fixfmps.1.gz
|
||||
%{_mandir}/man1/fixmacps.1.gz
|
||||
%{_mandir}/man1/fixpsditps.1.gz
|
||||
%{_mandir}/man1/fixpspps.1.gz
|
||||
%{_mandir}/man1/fixscribeps.1.gz
|
||||
%{_mandir}/man1/fixtpps.1.gz
|
||||
%{_mandir}/man1/fixwfwps.1.gz
|
||||
%{_mandir}/man1/fixwpps.1.gz
|
||||
%{_mandir}/man1/fixwwps.1.gz
|
||||
%{_mandir}/man1/getafm.1.gz
|
||||
%{_mandir}/man1/includeres.1.gz
|
||||
%{_mandir}/man1/psbook.1.gz
|
||||
%{_mandir}/man1/psmerge.1.gz
|
||||
%{_mandir}/man1/psnup.1.gz
|
||||
%{_mandir}/man1/psresize.1.gz
|
||||
%{_mandir}/man1/psselect.1.gz
|
||||
%{_mandir}/man1/pstops.1.gz
|
||||
%dir %{_datadir}/psutils/
|
||||
%{_datadir}/psutils/md68_0.ps
|
||||
%{_datadir}/psutils/md71_0.ps
|
||||
%{_bindir}/extractres
|
||||
%{_bindir}/includeres
|
||||
%{_bindir}/psjoin
|
||||
%{_datadir}/psutils
|
||||
%{_datadir}/psutils/PSUtils.pm
|
||||
%{_mandir}/man1/epsffit.1*
|
||||
%{_mandir}/man1/psbook.1*
|
||||
%{_mandir}/man1/psnup.1*
|
||||
%{_mandir}/man1/psresize.1*
|
||||
%{_mandir}/man1/psselect.1*
|
||||
%{_mandir}/man1/pstops.1*
|
||||
%{_mandir}/man1/psutils.1*
|
||||
%{_mandir}/man1/extractres.1*
|
||||
%{_mandir}/man1/includeres.1*
|
||||
%{_mandir}/man1/psjoin.1*
|
||||
|
||||
%changelog
|
||||
|
23
psutils.test
23
psutils.test
@ -1,23 +0,0 @@
|
||||
Testform für psutils
|
||||
=====================
|
||||
|
||||
Datum: 16.11.1997
|
||||
Version: p17
|
||||
Maintainer: werner@suse.de
|
||||
|
||||
Voraussetzungen:
|
||||
================
|
||||
|
||||
Ein PostScript-File zum testen, installiertes Paket psutils
|
||||
und Lesen der man pages.
|
||||
|
||||
Aufruf(e):
|
||||
========
|
||||
|
||||
Siehe man pages.
|
||||
|
||||
Ergebnis(se):
|
||||
===========
|
||||
|
||||
Sortieren, selektieren, skalieren von PostScript-Dokumenten.
|
||||
|
Loading…
Reference in New Issue
Block a user