debian/0000755000000000000000000000000012016125176007167 5ustar debian/patches/0000755000000000000000000000000012016125176010616 5ustar debian/patches/remove-fixmacps.patch0000644000000000000000000000472512016124034014744 0ustar Description: remove references to non-dfsg files Non-dfsg files were removed from the upstream sources which were repackaged. This patch modifies the makefile to avoid installing them. Author: Jay Berkenbilt Bug-Debian: http://bugs.debian.org/682708 Index: psutils-1.17.dfsg/Makefile =================================================================== --- psutils-1.17.dfsg.orig/Makefile 2012-08-25 06:25:29.317367957 -0400 +++ psutils-1.17.dfsg/Makefile 2012-08-25 06:25:32.757367863 -0400 @@ -45,15 +45,14 @@ BIN = psbook psselect pstops epsffit psnup \ psresize SHELLSCRIPTS = getafm showchar -PERLSCRIPTS = fixfmps fixmacps fixpsditps fixpspps \ +PERLSCRIPTS = fixfmps fixpsditps fixpspps \ fixtpps fixwfwps fixwpps fixscribeps fixwwps \ fixdlsrps extractres includeres psmerge MANPAGES = psbook.$(MANEXT) psselect.$(MANEXT) pstops.$(MANEXT) epsffit.$(MANEXT) psnup.$(MANEXT) \ psresize.$(MANEXT) psmerge.$(MANEXT) fixscribeps.$(MANEXT) getafm.$(MANEXT) \ - fixdlsrps.$(MANEXT) fixfmps.$(MANEXT) fixmacps.$(MANEXT) fixpsditps.$(MANEXT) \ + fixdlsrps.$(MANEXT) fixfmps.$(MANEXT) fixpsditps.$(MANEXT) \ fixpspps.$(MANEXT) fixtpps.$(MANEXT) fixwfwps.$(MANEXT) fixwpps.$(MANEXT) \ fixwwps.$(MANEXT) extractres.$(MANEXT) includeres.$(MANEXT) -INCLUDES = md68_0.ps md71_0.ps all: $(BIN) $(PERLSCRIPTS) $(MANPAGES) $(SHELLSCRIPTS) @@ -107,10 +106,6 @@ $(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@ $(CHMOD) $(BINMODE) $@ -fixmacps: fixmacps.pl - $(PERL) maketext OS=$(OS) PERL=$(PERL) INCLUDE=$(INCLUDEDIR) $? > $@ - $(CHMOD) $(BINMODE) $@ - fixpsditps: fixpsditps.pl $(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@ $(CHMOD) $(BINMODE) $@ @@ -175,9 +170,6 @@ fixfmps.$(MANEXT): fixfmps.man $(PERL) maketext "MAN=$(MANPAGES)" $? > $@ -fixmacps.$(MANEXT): fixmacps.man - $(PERL) maketext "MAN=$(MANPAGES)" INCLUDE=$(INCLUDEDIR) $? > $@ - fixpsditps.$(MANEXT): fixpsditps.man $(PERL) maketext "MAN=$(MANPAGES)" $? > $@ @@ -217,7 +209,7 @@ veryclean realclean: clean rm -f $(BIN) $(PERLSCRIPTS) $(MANPAGES) -install: install.bin install.script install.man install.include +install: install.bin install.script install.man install.bin: $(BIN) -mkdir $(BINDIR) @@ -233,13 +225,6 @@ $(INSTALL) $$i $(SCRIPTDIR); \ done -install.include: $(INCLUDES) - -mkdir $(INCLUDEDIR) - @for i in $(INCLUDES); do \ - echo Installing $$i; \ - $(INSTALLMAN) $$i $(INCLUDEDIR); \ - done - install.man: $(MANPAGES) -mkdir $(MANDIR) @for i in $(MANPAGES); do \ debian/patches/psjoin.patch0000644000000000000000000001425712016124035013143 0ustar Index: psutils-1.17.dfsg/psjoin =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ psutils-1.17.dfsg/psjoin 2012-08-25 06:25:33.921367831 -0400 @@ -0,0 +1,208 @@ +#!/usr/bin/perl +# +# psjoin - concatenate PostScript files +# +# version 0.2, 2002-07-18 +# version 0.3, 2003-11-30 +# +# by Tom Sato , http://homepage3.nifty.com/tsato/ + +$force_even = 0; +$force_save = 0; +$dont_strip = 0; +$save = "save %psjoin\n"; +$restore = "restore %psjoin\n"; +while ($ARGV[0] =~ /^-[a-z]/i) { + if ($ARGV[0] eq "-a") { + $force_even = 1; + shift; + } elsif ($ARGV[0] eq "-s") { + $force_save = 1; + $save = "/#psjoin-save# save def %psjoin\n"; + $restore = "#psjoin-save# restore %psjoin\n"; + shift; + } elsif ($ARGV[0] eq "-p") { + $dont_strip = 1; + shift; + } elsif ($ARGV[0] eq "-h") { + print STDERR "psjoin - concatenate PostScript files (version 0.3)\n"; + print STDERR "by Tom Sato ,"; + print STDERR " http://member.nifty.ne.jp/tsato/\n\n"; + print STDERR "Usage: psjoin [ options... ] filenames...\n\n"; + print STDERR "Option:\n"; + print STDERR " -a: align first page of each documents to odd page\n"; + print STDERR " -s: try to close unclosed save operators\n"; + print STDERR " -p: not strip prolog/trailer of the input files\n"; + print STDERR " -h: display this\n"; + exit 0; + } else { + print STDERR "$0: unknown option: $ARGV[0]\n"; + print STDERR "(\"$0 -h\" for short description)\n"; + exit 2; + } +} +shift if $ARGV[0] eq "--"; + +if ($dont_strip) { + $prolog_inx = 9999; + $prolog[$prolog_inx] = "% [ psjoin: don't strip ]\n"; + $trailer[$prolog_inx] = "% [ psjoin: don't strip ]\n"; +} else { + for ($i = 0; $i <= $#ARGV; $i++) { + open(IN, $ARGV[$i]) || die "$0: can't open \"$ARGV[$i]\" ($!)"; + + $in_comment = 1; + $in_prolog = 1; + $in_trailer = 0; + $comments[$i] = ""; + $prolog[$i] = ""; + $trailer[$i] = ""; + $pages[$i] = 0; + while () { + next if /^%%BeginDocument/ .. /^%%EndDocument/; + + if ($in_comment) { + next if /^%!PS-Adobe-/; + next if /^%%Title/; + next if /^%%Pages/; + next if /^%%Creator/; + $in_comment = 0 if /^%%EndComments/; + $comments[$i] .= $_; + next; + } elsif ($in_prolog) { + if (/^%%Page:/) { + $in_prolog = 0; + } else { + $prolog[$i] .= $_; + next; + } + } + + $in_trailer = 1 if /^%%Trailer/; + if ($in_trailer) { + $trailer[$i] .= $_; + next; + } + + $pages[$i]++ if /^%%Page:/; + } + close(IN); + + if ($prolog[$i]) { + for ($j = 0; $j < $i; $j++) { + if ($prolog[$j] eq $prolog[$i]) { + $pages[$j] += $pages[$i]; + break; + } + } + } + } + + $largest = 0; + $prolog_inx = 0; + for ($i = 0; $i <= $#ARGV; $i++) { + $size = length($prolog[$i]) * $pages[$i]; + if ($largest < $size) { + $largest = $size; + $prolog_inx = $i; + } + } +} + +print "%!PS-Adobe-3.0\n"; +print "%%Title: @ARGV\n"; +print "%%Creator: psjoin 0.2\n"; +print "%%Pages: (atend)\n"; +print $comments[$prolog_inx]; + +print "\n"; +print $prolog[$prolog_inx]; +for ($i = 0; $i <= $#ARGV; $i++) { + $prolog[$i] =~ s/^%%/% %%/; + $prolog[$i] =~ s/\n%%/\n% %%/g; + $trailer[$i] =~ s/^%%/% %%/; + $trailer[$i] =~ s/\n%%/\n% %%/g; +} + +$total_pages = 0; +for ($i = 0; $i <= $#ARGV; $i++) { + print "\n"; + print "% [ psjoin: file = $ARGV[$i] ]\n"; + if ($prolog[$i] ne $prolog[$prolog_inx]) { + print "% [ psjoin: Prolog/Trailer will be inserted to every page ]\n"; + } else { + print "% [ psjoin: common Prolog/Trailer will be used ]\n"; + } + + $in_comment = 1 if !$dont_strip; + $in_prolog = 1 if !$dont_strip; + $in_trailer = 0; + $saved = 0; + $pages = 0; + + open(IN, $ARGV[$i]) || die "$0: can't open \"$ARGV[$i]\" ($!)"; + while () { + if (/^%%BeginDocument/ .. /^%%EndDocument/) { + # s/^(%[%!])/% \1/; + print $_; + } else { + if ($in_comment) { + $in_comment = 0 if /^%%EndComments/; + } elsif ($in_prolog) { + if (/^%%Page:/) { + $in_prolog = 0; + } else { + next; + } + } + $in_trailer = 1 if !$dont_strip && /^%%Trailer/; + next if $in_trailer; + + if (/^%%Page:/) { + if ($saved) { + print $trailer[$i]; + print $restore; + $saved = 0; + } + + $pages++; + $total_pages++; + print "\n"; + print "%%Page: ($i-$pages) $total_pages\n"; + if ($prolog[$i] ne $prolog[$prolog_inx]) { + print $save; + print $prolog[$i]; + $saved = 1; + } elsif ($force_save) { + print $save; + } + } else { + s/^(%[%!])/% \1/; + print $_; + } + } + } + close(IN); + + if ($force_even && $pages % 2 != 0) { + $pages++; + $total_pages++; + print "\n"; + print "%%Page: ($i-E) $total_pages\n"; + print "% [ psjoin: empty page inserted to force even pages ]\n"; + print "showpage\n"; + } + + if ($saved) { + print $trailer[$i]; + print $restore; + } elsif ($force_save) { + print $restore; + } +} + +print "\n"; +print "%%Trailer\n"; +print $trailer[$prolog_inx]; +print "%%Pages: $total_pages\n"; +print "%%EOF\n"; Index: psutils-1.17.dfsg/psjoin.1 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ psutils-1.17.dfsg/psjoin.1 2012-08-25 06:25:33.921367831 -0400 @@ -0,0 +1,18 @@ +.TH PSJOIN "1" "November 2003" "psjoin 0.3" "User Commands" +.SH NAME +psjoin \- psjoin +.SH SYNOPSIS +.B psjoin +[ \fIoptions\fR... ] \fIfilenames\fR... +.SH DESCRIPTION +psjoin \- concatenate PostScript files (version 0.3) +by Tom Sato , http://member.nifty.ne.jp/tsato/ +.SS "Option:" +.HP +\fB\-a\fR: align first page of each documents to odd page +.HP +\fB\-s\fR: try to close unclosed save operators +.HP +\fB\-p\fR: not strip prolog/trailer of the input files +.HP +\fB\-h\fR: display help debian/patches/psutils-flip.patch0000644000000000000000000001045212016124035014265 0ustar 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 Index: psutils-1.17.dfsg/pstops.c =================================================================== --- psutils-1.17.dfsg.orig/pstops.c 2012-08-25 06:25:32.961367859 -0400 +++ psutils-1.17.dfsg/pstops.c 2012-08-25 06:25:33.789367837 -0400 @@ -42,7 +42,7 @@ { fprintf(stderr, "%s: page specification error:\n", program); fprintf(stderr, " = [modulo:]\n"); - fprintf(stderr, " = [-]pageno[@scale][L|R|U][(xoff,yoff)][,spec|+spec]\n"); + fprintf(stderr, " = [-]pageno[@scale][L|R|U|H|V][(xoff,yoff)][,spec|+spec]\n"); fprintf(stderr, " modulo>=1, 0<=pagenorotate += 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(); Index: psutils-1.17.dfsg/psspec.h =================================================================== --- psutils-1.17.dfsg.orig/psspec.h 2012-08-25 06:25:33.657367838 -0400 +++ psutils-1.17.dfsg/psspec.h 2012-08-25 06:25:33.789367837 -0400 @@ -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 ; Index: psutils-1.17.dfsg/psspec.c =================================================================== --- psutils-1.17.dfsg.orig/psspec.c 2012-08-25 06:25:33.657367838 -0400 +++ psutils-1.17.dfsg/psspec.c 2012-08-25 06:25:33.789367837 -0400 @@ -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; @@ -215,6 +217,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); Index: psutils-1.17.dfsg/pstops.man =================================================================== --- psutils-1.17.dfsg.orig/pstops.man 2012-08-25 06:25:32.965367859 -0400 +++ psutils-1.17.dfsg/pstops.man 2012-08-25 06:25:33.793367837 -0400 @@ -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. Index: psutils-1.17.dfsg/README =================================================================== --- psutils-1.17.dfsg.orig/README 2012-08-25 06:25:29.037367962 -0400 +++ psutils-1.17.dfsg/README 2012-08-25 06:25:33.793367837 -0400 @@ -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.) debian/patches/psmerge.patch0000644000000000000000000001045612016124035013300 0ustar Index: psutils-1.17.dfsg/psmerge.pl =================================================================== --- psutils-1.17.dfsg.orig/psmerge.pl 2012-08-25 06:25:29.117367961 -0400 +++ psutils-1.17.dfsg/psmerge.pl 2012-08-25 06:25:33.425367847 -0400 @@ -1,42 +1,66 @@ @PERL@ # psmerge: merge PostScript files produced by same application and setup -# usage: psmerge [-oout.ps] [-thorough] file1.ps file2.ps ... +# usage: psmerge [-oout.ps] file1.ps file2.ps ... # # Copyright (C) Angus J. C. Duggan 1991-1995 # See file LICENSE for details. -$prog = ($0 =~ s=.*/==); +use strict; +$^W = 1; +my $prog = ($0 =~ m,([^/\\]*)$,) ? $1 : $0; +my $outfile = undef; + +usage() unless @ARGV; while ($ARGV[0] =~ /^-/) { $_ = shift; if (/^-o(.+)/) { - if (!close(STDOUT) || !open(STDOUT, ">$1")) { - print STDERR "$prog: can't open $1 for output\n"; - exit 1; - } + $outfile = $1; } elsif (/^-t(horough)?$/) { - $thorough = 1; + # This doesn't do anything, but we leave it for backward compatibility. } else { - print STDERR "Usage: $prog [-oout] [-thorough] file...\n"; + usage(); + } +} + +my $gs = find_gs(); +if (defined $gs) +{ + # Just invoke gs + $outfile = '/dev/stdout' unless defined $outfile; + exec +(qw(gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite), + "-sOutputFile=$outfile", '-f', @ARGV); + die "$prog: exec /usr/bin/gs failed\n"; +} +else +{ + warn +("$prog: /usr/bin/gs not found; falling back to old," . + " less functional behavior\n"); +} + +if (defined $outfile) +{ + if (!close(STDOUT) || !open(STDOUT, ">$outfile")) { + print STDERR "$prog: can't open $1 for output\n"; exit 1; } } -$page = 0; -$first = 1; -$nesting = 0; +my $page = 0; +my $first = 1; +my $nesting = 0; -@header = (); -$header = 1; +my @header = (); +my $header = 1; -@trailer = (); -$trailer = 0; +my @trailer = (); +my $trailer = 0; -@pages = (); -@body = (); +my @pages = (); +my @body = (); -@resources = (); -$inresource = 0; +my @resources = (); +my $inresource = 0; while (<>) { if (/^%%BeginFont:/ || /^%%BeginResource:/ || /^%%BeginProcSet:/) { @@ -45,41 +69,55 @@ } elsif ($inresource) { push(@resources, $_); $inresource = 0 if /^%%EndFont/ || /^%%EndResource/ || /^%%EndProcSet/; - } elsif (/^%%Page:/ && $nesting == 0) { - $header = $trailer = 0; - push(@pages, join("", @body)) if @body; - $page++; - @body = ("%%Page: ($page) $page\n"); - } elsif (/^%%Trailer/ && $nesting == 0) { - push(@trailer, $_); - push(@pages, join("", @body)) if @body; - @body = (); - $trailer = 1; - $header = 0; - } elsif ($header) { - push(@trailer, $_); - push(@pages, join("", @body)) if @body; - @body = (); - $trailer = 1; - $header = 0; - } elsif ($trailer) { - if (/^%!/ || /%%EOF/) { - $trailer = $first = 0; - } elsif ($first) { - push(@trailer, $_); - } - } elsif (/^%%BeginDocument/ || /^%%BeginBinary/ || /^%%BeginFile/) { - push(@body, $_); - $nesting++; - } elsif (/^%%EndDocument/ || /^%%EndBinary/ || /^%%EndFile/) { - push(@body, $_); - $nesting--; - } else { - print $_ if $print; - } + } elsif (/^%%Page:/ && $nesting == 0) { + $header = $trailer = 0; + push(@pages, join("", @body)) if @body; + $page++; + @body = ("%%Page: ($page) $page\n"); + } elsif (/^%%Trailer/ && $nesting == 0) { + push(@trailer, $_); + push(@pages, join("", @body)) if @body; + @body = (); + $trailer = 1; + $header = 0; + } elsif ($header) { + push(@trailer, $_); + push(@pages, join("", @body)) if @body; + @body = (); + $trailer = 1; + $header = 0; + } elsif ($trailer) { + if (/^%!/ || /%%EOF/) { + $trailer = $first = 0; + } elsif ($first) { + push(@trailer, $_); + } + } elsif (/^%%BeginDocument/ || /^%%BeginBinary/ || /^%%BeginFile/) { + push(@body, $_); + $nesting++; + } elsif (/^%%EndDocument/ || /^%%EndBinary/ || /^%%EndFile/) { + push(@body, $_); + $nesting--; + } } print @trailer; -exit 0; +sub find_gs +{ + my $path = $ENV{'PATH'} || ""; + my @path = split(':', $path); + foreach my $dir (@path) + { + return "$dir/gs" if -x "$dir/gs"; + } + undef; +} + +sub usage +{ + print STDERR "Usage: $prog [-oout] file...\n"; + exit 1; +} + @END@ debian/patches/off_t.patch0000644000000000000000000002367712016124035012744 0ustar Index: psutils-1.17.dfsg/psutil.c =================================================================== --- psutils-1.17.dfsg.orig/psutil.c 2012-08-25 06:25:33.273367851 -0400 +++ psutils-1.17.dfsg/psutil.c 2012-08-25 06:25:33.653367839 -0400 @@ -5,7 +5,10 @@ * utilities for PS programs */ + /* + * Daniele Giacomini appunti2@gmail.com 2010-09-02 + * Changed to using ftello() and fseeko() * AJCD 6/4/93 * Changed to using ftell() and fseek() only (no length calculations) * Hunter Goatley 31-MAY-1993 23:33 @@ -13,6 +16,9 @@ * Hunter Goatley 2-MAR-1993 14:41 * Added VMS support. */ + +#define _FILE_OFFSET_BITS 64 + #include "psutil.h" #include "pserror.h" #include "patchlev.h" @@ -20,6 +26,7 @@ #include #include #include +#include #define iscomment(x,y) (strncmp(x,y,strlen(y)) == 0) @@ -33,14 +40,14 @@ static char buffer[BUFSIZ]; static long bytes = 0; -static long pagescmt = 0; -static long headerpos = 0; -static long endsetup = 0; -static long beginprocset = 0; /* start of pstops procset */ -static long endprocset = 0; +static off_t pagescmt = 0; +static off_t headerpos = 0; +static off_t endsetup = 0; +static off_t beginprocset = 0; /* start of pstops procset */ +static off_t endprocset = 0; static int outputpage = 0; static int maxpages = 100; -static long *pageptr; +static off_t *pageptr; /* list of paper sizes supported */ static Paper papersizes[] = { @@ -94,15 +101,15 @@ #if defined(WINNT) struct _stat fs ; #else - long fpos; + off_t fpos; #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)) + if ((fpos = ftello(fp)) >= 0) + if (!fseeko(fp, (off_t) 0, SEEK_END) && !fseeko(fp, fpos, SEEK_SET)) return (fp); #endif @@ -127,7 +134,7 @@ /* discard the input file, and rewind the temporary */ (void) fclose(fp); - if (fseek(ft, 0L, SEEK_SET) != 0) + if (fseeko(ft, (off_t) 0, SEEK_SET) != 0) return (NULL) ; return (ft); @@ -137,10 +144,10 @@ /* copy input file from current position upto new position to output file, * ignoring the lines starting at something ignorelist points to */ -static int fcopy(long upto, long *ignorelist) +static int fcopy(off_t upto, off_t *ignorelist) { - long here = ftell(infile); - long bytes_left; + off_t here = ftello(infile); + off_t bytes_left; if (ignorelist != NULL) { while (*ignorelist > 0 && *ignorelist < here) @@ -151,7 +158,7 @@ if (!r || fgets(buffer, BUFSIZ, infile) == NULL) return 0; ignorelist++; - here = ftell(infile); + here = ftello(infile); while (*ignorelist > 0 && *ignorelist < here) ignorelist++; } @@ -172,27 +179,27 @@ } /* build array of pointers to start/end of pages */ -void scanpages(long *sizeheaders) +void scanpages(off_t *sizeheaders) { register char *comment = buffer+2; register int nesting = 0; - register long int record; + register off_t record; if (sizeheaders) *sizeheaders = 0; - if ((pageptr = (long *)malloc(sizeof(long)*maxpages)) == NULL) + if ((pageptr = (off_t *)malloc(sizeof(off_t)*maxpages)) == NULL) message(FATAL, "out of memory\n"); pages = 0; - fseek(infile, 0L, SEEK_SET); - while (record = ftell(infile), fgets(buffer, BUFSIZ, infile) != NULL) + fseeko(infile, (off_t) 0, SEEK_SET); + while (record = ftello(infile), fgets(buffer, BUFSIZ, infile) != NULL) if (*buffer == '%') { if (buffer[1] == '%') { if (nesting == 0 && iscomment(comment, "Page:")) { if (pages >= maxpages-1) { maxpages *= 2; - if ((pageptr = (long *)realloc((char *)pageptr, - sizeof(long)*maxpages)) == NULL) + if ((pageptr = (off_t *)realloc((char *)pageptr, + sizeof(off_t)*maxpages)) == NULL) message(FATAL, "out of memory\n"); } pageptr[pages++] = record; @@ -219,7 +226,7 @@ } else if (headerpos == 0 && iscomment(comment, "Pages:")) pagescmt = record; else if (headerpos == 0 && iscomment(comment, "EndComments")) - headerpos = ftell(infile); + headerpos = ftello(infile); else if (iscomment(comment, "BeginDocument") || iscomment(comment, "BeginBinary") || iscomment(comment, "BeginFile")) @@ -231,23 +238,23 @@ else if (nesting == 0 && iscomment(comment, "EndSetup")) endsetup = record; else if (nesting == 0 && iscomment(comment, "BeginProlog")) - headerpos = ftell(infile); + headerpos = ftello(infile); else if (nesting == 0 && iscomment(comment, "BeginProcSet: PStoPS")) beginprocset = record; else if (beginprocset && !endprocset && iscomment(comment, "EndProcSet")) - endprocset = ftell(infile); + endprocset = ftello(infile); else if (nesting == 0 && (iscomment(comment, "Trailer") || iscomment(comment, "EOF"))) { - fseek(infile, record, SEEK_SET); + fseeko(infile, record, SEEK_SET); break; } } else if (headerpos == 0 && buffer[1] != '!') headerpos = record; } else if (headerpos == 0) headerpos = record; - pageptr[pages] = ftell(infile); + pageptr[pages] = ftello(infile); if (endsetup == 0 || endsetup > pageptr[0]) endsetup = pageptr[0]; } @@ -255,7 +262,7 @@ /* seek a particular page */ void seekpage(int p) { - fseek(infile, pageptr[p], SEEK_SET); + fseeko(infile, pageptr[p], SEEK_SET); if (fgets(buffer, BUFSIZ, infile) != NULL && iscomment(buffer, "%%Page:")) { char *start, *end; @@ -332,14 +339,14 @@ } /* write from start of file to end of header comments */ -void writeheader(int p, long *ignore) +void writeheader(int p, off_t *ignore) { writeheadermedia(p, ignore, -1, -1); } -void writeheadermedia(int p, long *ignore, double width, double height) +void writeheadermedia(int p, off_t *ignore, double width, double height) { - fseek(infile, 0L, SEEK_SET); + fseeko(infile, (off_t) 0, SEEK_SET); if (pagescmt) { if (!fcopy(pagescmt, ignore) || fgets(buffer, BUFSIZ, infile) == NULL) message(FATAL, "I/O error in header\n"); @@ -362,7 +369,7 @@ if (beginprocset && !fcopy(beginprocset, NULL)) message(FATAL, "I/O error in prologue\n"); if (endprocset) - fseek(infile, endprocset, SEEK_SET); + fseeko(infile, endprocset, SEEK_SET); writeprolog(); return !beginprocset; } @@ -384,7 +391,7 @@ /* write trailer */ void writetrailer(void) { - fseek(infile, pageptr[pages], SEEK_SET); + fseeko(infile, pageptr[pages], SEEK_SET); while (fgets(buffer, BUFSIZ, infile) != NULL) { writestring(buffer); } Index: psutils-1.17.dfsg/psutil.h =================================================================== --- psutils-1.17.dfsg.orig/psutil.h 2012-08-25 06:25:33.273367851 -0400 +++ psutils-1.17.dfsg/psutil.h 2012-08-25 06:25:33.653367839 -0400 @@ -4,7 +4,7 @@ * * utilities for PS programs */ - +#define _FILE_OFFSET_BITS 64 #include #include #include @@ -32,14 +32,14 @@ extern void writepageheader(char *label, int p); extern void writepagesetup(void); extern void writepagebody(int p); -extern void writeheader(int p, long *ignorelist); -extern void writeheadermedia(int p, long *ignorelist, double width, double height); +extern void writeheader(int p, off_t *ignorelist); +extern void writeheadermedia(int p, off_t *ignorelist, double width, double height); extern int writepartprolog(void); extern void writeprolog(void); extern void writesetup(void); extern void writetrailer(void); extern void writeemptypage(void); -extern void scanpages(long *sizeheaders); +extern void scanpages(off_t *sizeheaders); extern void writestring(char *s); /* These variables are imported from the client program (e.g. psbook, psnup, Index: psutils-1.17.dfsg/psspec.c =================================================================== --- psutils-1.17.dfsg.orig/psspec.c 2012-08-25 06:25:33.277367851 -0400 +++ psutils-1.17.dfsg/psspec.c 2012-08-25 06:25:33.657367838 -0400 @@ -143,7 +143,7 @@ pstops_write(modulo, pps, nobind, specs, draw, NULL); } -void pstops_write(int modulo, int pps, int nobind, PageSpec *specs, double draw, long *ignorelist) +void pstops_write(int modulo, int pps, int nobind, PageSpec *specs, double draw, off_t *ignorelist) { int thispg, maxpage; int pageindex = 0; Index: psutils-1.17.dfsg/psspec.h =================================================================== --- psutils-1.17.dfsg.orig/psspec.h 2012-08-25 06:25:33.273367851 -0400 +++ psutils-1.17.dfsg/psspec.h 2012-08-25 06:25:33.657367838 -0400 @@ -29,4 +29,4 @@ extern void pstops(int modulo, int pps, int nobind, PageSpec *specs, double draw); extern void pstops_write(int modulo, int pps, int nobind, PageSpec *specs, - double draw, long *ignorelist); + double draw, off_t *ignorelist); Index: psutils-1.17.dfsg/psnup.c =================================================================== --- psutils-1.17.dfsg.orig/psnup.c 2012-08-25 06:25:33.273367851 -0400 +++ psutils-1.17.dfsg/psnup.c 2012-08-25 06:25:33.657367838 -0400 @@ -88,7 +88,7 @@ double iwidth, iheight ; /* input paper size */ double tolerance = 100000; /* layout tolerance */ Paper *paper = NULL; - long sizeheaders[20]; /* headers to remove */ + off_t sizeheaders[20]; /* headers to remove */ int opt; #ifdef DEBIAN Index: psutils-1.17.dfsg/psresize.c =================================================================== --- psutils-1.17.dfsg.orig/psresize.c 2012-08-25 06:25:33.273367851 -0400 +++ psutils-1.17.dfsg/psresize.c 2012-08-25 06:25:33.657367838 -0400 @@ -61,7 +61,7 @@ int rotate; double inwidth = -1; double inheight = -1; - long sizeheaders[20]; /* headers to remove */ + off_t sizeheaders[20]; /* headers to remove */ Paper *paper = NULL; PageSpec *specs; int opt; debian/patches/series0000644000000000000000000000026212016123311012020 0ustar remove-fixmacps.patch gnome-printing.patch misc.patch psmerge-manpage.patch bboxesandsizes.patch psmerge.patch showchar-manpage.patch off_t.patch psutils-flip.patch psjoin.patch debian/patches/psmerge-manpage.patch0000644000000000000000000000064112016124035014701 0ustar Index: psutils-1.17.dfsg/psmerge.man =================================================================== --- psutils-1.17.dfsg.orig/psmerge.man 2012-08-25 06:25:29.181367959 -0400 +++ psutils-1.17.dfsg/psmerge.man 2012-08-25 06:25:33.169367852 -0400 @@ -6,9 +6,7 @@ [ .B \-o\fIout.ps\fB ] -[ .I file.ps ... -] .SH DESCRIPTION .I Psmerge merges PostScript documents into a single document. It only works in the debian/patches/showchar-manpage.patch0000644000000000000000000000345012016124035015056 0ustar Index: psutils-1.17.dfsg/Makefile =================================================================== --- psutils-1.17.dfsg.orig/Makefile 2012-08-25 06:25:32.965367859 -0400 +++ psutils-1.17.dfsg/Makefile 2012-08-25 06:25:33.529367844 -0400 @@ -53,7 +53,8 @@ psresize.$(MANEXT) psmerge.$(MANEXT) fixscribeps.$(MANEXT) getafm.$(MANEXT) \ fixdlsrps.$(MANEXT) fixfmps.$(MANEXT) fixpsditps.$(MANEXT) \ fixpspps.$(MANEXT) fixtpps.$(MANEXT) fixwfwps.$(MANEXT) fixwpps.$(MANEXT) \ - fixwwps.$(MANEXT) extractres.$(MANEXT) includeres.$(MANEXT) + fixwwps.$(MANEXT) extractres.$(MANEXT) includeres.$(MANEXT) \ + showchar.$(MANEXT) all: $(BIN) $(PERLSCRIPTS) $(MANPAGES) $(SHELLSCRIPTS) @@ -205,6 +206,9 @@ getafm.$(MANEXT): getafm.man $(PERL) maketext "MAN=$(MANPAGES)" $? > $@ +showchar.$(MANEXT): showchar.man + $(PERL) maketext "MAN=$(MANPAGES)" $? > $@ + clean: rm -f *.o Index: psutils-1.17.dfsg/showchar.man =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ psutils-1.17.dfsg/showchar.man 2012-08-25 06:25:33.545367841 -0400 @@ -0,0 +1,26 @@ +.TH SHOWCHAR 1 "PSUtils Release @RELEASE@ Patchlevel @PATCHLEVEL@" +.SH NAME +showchar \- show character with information +.SH SYNOPSIS +.B showchar +[ +.B fontname +] [ +.B charname +] +.SH DESCRIPTION +This manual page was written for the Debian GNU/Linux distribution +because the original program does not have a manual page. +.PP +.B showchar +outputs PostScript to draw a character with metric info. +.SH AUTHOR +Copyright (C) Angus J. C. Duggan 1991-1995 +.PP +This manual page was written by Uwe Hermann , +for the Debian GNU/Linux system (but may be used by others). +.SH TRADEMARKS +.B PostScript +is a trademark of Adobe Systems Incorporated. +.SH "SEE ALSO" +@MAN@ debian/patches/misc.patch0000644000000000000000000011425612016124035012574 0ustar Foo bar. Baz. Index: psutils-1.17.dfsg/pstops.c =================================================================== --- psutils-1.17.dfsg.orig/pstops.c 2012-08-25 06:25:29.233367959 -0400 +++ psutils-1.17.dfsg/pstops.c 2012-08-25 06:25:32.961367859 -0400 @@ -8,11 +8,18 @@ * pstops [-q] [-b] [-d] [-w] [-h] [-ppaper] [infile [outfile]] */ +#include +#include + #include "psutil.h" #include "psspec.h" #include "pserror.h" #include "patchlev.h" +#ifdef DEBIAN +#include +#endif + char *program ; int pages ; int verbose ; @@ -47,8 +54,8 @@ static PageSpec *parsespecs(char *str) { PageSpec *head, *tail; - int other = 0; - int num = -1; + unsigned long spec_count = 0; + long num = -1; head = tail = newspec(); while (*str) { @@ -57,7 +64,7 @@ } else { switch (*str++) { case ':': - if (other || head != tail || num < 1) argerror(); + if (spec_count || head != tail || num < 1) argerror(); modulo = num; num = -1; break; @@ -65,10 +72,9 @@ tail->reversed = !tail->reversed; break; case '@': - if (num < 0) argerror(); - tail->scale *= parsedouble(&str, argerror); - tail->flags |= SCALE; - break; + tail->scale *= parsedouble(&str, argerror); + tail->flags |= SCALE; + break; case 'l': case 'L': tail->rotate += 90; tail->flags |= ROTATE; @@ -102,7 +108,7 @@ default: argerror(); } - other = 1; + spec_count++; } } if (num >= modulo) @@ -112,71 +118,124 @@ return (head); } -void main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { PageSpec *specs = NULL; int nobinding = 0; double draw = 0; - Paper *paper; + Paper *paper = NULL; + int opt; -#ifdef PAPER +#ifdef DEBIAN + paperinit(); + { + const char *default_size = systempapername(); + if (!default_size) default_size = defaultpapername (); + if (default_size) paper = findpaper(default_size); + if (paper) { + width = (double)PaperWidth(paper); + height = (double)PaperHeight(paper); + } + } + paperdone(); +#elif defined(PAPER) if ( (paper = findpaper(PAPER)) != (Paper *)0 ) { width = (double)PaperWidth(paper); height = (double)PaperHeight(paper); } #endif + verbose = 1; + + program = *argv; + + while((opt = getopt(argc, argv, "qd::bw:h:p:v0123456789")) != EOF) { + switch(opt) { + case 'q': /* quiet */ + verbose = 0; + break; + case 'd': /* draw borders */ + if(optarg) + draw = singledimen(optarg, argerror, usage); + else + draw = 1; + break; + case 'b': /* no bind operator */ + nobinding = 1; + break; + case 'w': /* page width */ + width = singledimen(optarg, argerror, usage); + break; + case 'h': /* page height */ + height = singledimen(optarg, argerror, usage); + break; + case 'p': /* paper type */ + if ( (paper = findpaper(optarg)) != (Paper *)0 ) { + width = (double)PaperWidth(paper); + height = (double)PaperHeight(paper); + } else + message(FATAL, "paper size '%s' not recognised\n", optarg); + break; + case 'v': /* version */ + usage(); + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (specs == NULL) { + char *spec_txt = alloca((optarg ? strlen(optarg) : 0) + 3); + if(!spec_txt) message(FATAL, "no memory for spec allocation\n"); + spec_txt[0] = '-'; + spec_txt[1] = opt; + spec_txt[2] = 0; + if (optarg) strcat(spec_txt, optarg); + specs = parsespecs(spec_txt); + } else { + usage(); + } + break; + default: + usage(); + break; + } + } + + if (specs == NULL) { + if(optind == argc) usage(); + specs = parsespecs(argv[optind]); + optind++; + } + infile = stdin; outfile = stdout; - verbose = 1; - for (program = *argv++; --argc; argv++) { - if (argv[0][0] == '-') { - switch (argv[0][1]) { - case 'q': /* quiet */ - verbose = 0; - break; - case 'd': /* draw borders */ - if (argv[0][2]) - draw = singledimen(*argv+2, argerror, usage); - else - draw = 1; - break; - case 'b': /* no bind operator */ - nobinding = 1; - break; - case 'w': /* page width */ - width = singledimen(*argv+2, argerror, usage); - break; - case 'h': /* page height */ - height = singledimen(*argv+2, argerror, usage); - break; - case 'p': /* paper type */ - if ( (paper = findpaper(*argv+2)) != (Paper *)0 ) { - width = (double)PaperWidth(paper); - height = (double)PaperHeight(paper); - } else - message(FATAL, "paper size '%s' not recognised\n", *argv+2); - break; - case 'v': /* version */ - usage(); - default: - if (specs == NULL) - specs = parsespecs(*argv); - else - usage(); - } - } else if (specs == NULL) - specs = parsespecs(*argv); - else if (infile == stdin) { - if ((infile = fopen(*argv, OPEN_READ)) == NULL) - message(FATAL, "can't open input file %s\n", *argv); - } else if (outfile == stdout) { - if ((outfile = fopen(*argv, OPEN_WRITE)) == NULL) - message(FATAL, "can't open output file %s\n", *argv); - } else usage(); + + /* Be defensive */ + if((argc - optind) < 0 || (argc - optind) > 2) usage(); + + if (optind != argc) { + /* User specified an input file */ + if ((infile = fopen(argv[optind], OPEN_READ)) == NULL) + message(FATAL, "can't open input file %s\n", argv[optind]); + optind++; + } + + if (optind != argc) { + /* User specified an output file */ + if ((outfile = fopen(argv[optind], OPEN_WRITE)) == NULL) + message(FATAL, "can't open output file %s\n", argv[optind]); + optind++; } - if (specs == NULL) - usage(); + + if (optind != argc) usage(); + if (specs == NULL) usage(); + #if defined(MSDOS) || defined(WINNT) if ( infile == stdin ) { int fd = fileno(stdin) ; Index: psutils-1.17.dfsg/psutil.c =================================================================== --- psutils-1.17.dfsg.orig/psutil.c 2012-08-25 06:25:29.233367959 -0400 +++ psutils-1.17.dfsg/psutil.c 2012-08-25 06:25:32.961367859 -0400 @@ -44,10 +44,16 @@ /* list of paper sizes supported */ static Paper papersizes[] = { + { "a0", 2382, 3369 }, /* 84cm * 118.8cm */ + { "a1", 1684, 2382 }, /* 59.4cm * 84cm */ + { "a2", 1191, 1684 }, /* 42cm * 59.4cm */ { "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", 2382, 3369 }, /* 84cm * 118.8cm */ + { "A1", 1684, 2382 }, /* 59.4cm * 84cm */ + { "A2", 1191, 1684 }, /* 42cm * 59.4cm */ { "A3", 842, 1191 }, /* 29.7cm * 42cm */ { "A4", 595, 842 }, /* 21cm * 29.7cm */ { "A5", 421, 595 }, /* 14.85cm * 21cm */ @@ -65,7 +71,7 @@ }; /* return pointer to paper size struct or NULL */ -Paper* findpaper(char *name) +Paper* findpaper(const char *name) { Paper *pp; for (pp = papersizes; PaperName(pp); pp++) { @@ -132,15 +138,20 @@ /* copy input file from current position upto new position to output file */ static int fcopy(long upto) { - long here = ftell(infile); - while (here < upto) { - if ((fgets(buffer, BUFSIZ, infile) == NULL) || - (fputs(buffer, outfile) == EOF)) - return(0); - here = ftell(infile); - bytes += strlen(buffer); - } - return (1); + long here = ftell(infile); + long bytes_left = upto - here; + + while (bytes_left > 0) { + size_t rw_result; + const size_t numtocopy = (bytes_left > BUFSIZ) ? BUFSIZ : bytes_left; + rw_result = fread(buffer, 1, numtocopy, infile); + if (rw_result < numtocopy) return (0); + rw_result = fwrite(buffer, 1, numtocopy, outfile); + if (rw_result < numtocopy) return (0); + bytes_left -= numtocopy; + bytes += numtocopy; + } + return (1); } /* build array of pointers to start/end of pages */ Index: psutils-1.17.dfsg/psutil.h =================================================================== --- psutils-1.17.dfsg.orig/psutil.h 2012-08-25 06:25:29.233367959 -0400 +++ psutils-1.17.dfsg/psutil.h 2012-08-25 06:25:32.965367859 -0400 @@ -25,7 +25,7 @@ #define PaperHeight(p) ((p)->height) /* Definitions for functions found in psutil.c */ -extern Paper *findpaper(char *name); +extern Paper *findpaper(const char *name); extern FILE *seekable(FILE *fp); extern void writepage(int p); extern void seekpage(int p); Index: psutils-1.17.dfsg/pserror.c =================================================================== --- psutils-1.17.dfsg.orig/pserror.c 2012-08-25 06:25:29.233367959 -0400 +++ psutils-1.17.dfsg/pserror.c 2012-08-25 06:25:32.965367859 -0400 @@ -24,7 +24,7 @@ void message(int flags, char *format, ...) { va_list args ; - static column = 0 ; /* current screen column for message wrap */ + 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 */ Index: psutils-1.17.dfsg/Makefile =================================================================== --- psutils-1.17.dfsg.orig/Makefile 2012-08-25 06:25:32.757367863 -0400 +++ psutils-1.17.dfsg/Makefile 2012-08-25 06:25:32.965367859 -0400 @@ -23,7 +23,7 @@ # Makefile for PSUtils under Unix -#OS = UNIX +OS = UNIX prefix=/usr BINDIR = $(prefix)/bin @@ -40,7 +40,8 @@ MANDIR = $(prefix)/man/man$(MANEXT) CC = gcc -CFLAGS = -DPAPER=\"$(PAPER)\" -DUNIX -O -Wall +#CFLAGS = -DPAPER=\"$(PAPER)\" -DUNIX -O -Wall +CFLAGS = -DDEBIAN -DUNIX -O2 -g -Wall -Werror BIN = psbook psselect pstops epsffit psnup \ psresize @@ -68,12 +69,13 @@ $(CC) $(CCFLAGS) -o epsffit pserror.o epsffit.o psnup: psnup.o psutil.o psspec.o pserror.o - $(CC) $(CCFLAGS) -o psnup psutil.o psspec.o pserror.o psnup.o + $(CC) $(CCFLAGS) -o psnup psutil.o psspec.o pserror.o psnup.o -lpaper psnup.o: psutil.h patchlev.h psspec.h pserror.h psnup.c psresize: psresize.o psutil.o pserror.o psspec.o - $(CC) $(CCFLAGS) -o psresize psutil.o psspec.o pserror.o psresize.o + $(CC) $(CCFLAGS) -o psresize psutil.o psspec.o pserror.o psresize.o \ + -lpaper psresize.o: psutil.h patchlev.h psspec.h pserror.h psresize.c @@ -88,7 +90,7 @@ psselect.o: psutil.h patchlev.h pserror.h psselect.c pstops: pstops.o psutil.o psspec.o pserror.o - $(CC) $(CCFLAGS) -o pstops psutil.o psspec.o pserror.o pstops.o + $(CC) $(CCFLAGS) -o pstops psutil.o psspec.o pserror.o pstops.o -lpaper pstops.o: psutil.h patchlev.h psspec.h pserror.h pstops.c Index: psutils-1.17.dfsg/psselect.c =================================================================== --- psutils-1.17.dfsg.orig/psselect.c 2012-08-25 06:25:29.233367959 -0400 +++ psutils-1.17.dfsg/psselect.c 2012-08-25 06:25:32.965367859 -0400 @@ -11,12 +11,13 @@ #include "psutil.h" #include "pserror.h" #include "patchlev.h" +#include char *program ; int pages ; int verbose ; -FILE *infile ; -FILE *outfile ; +FILE *infile; +FILE *outfile; char pagelabel[BUFSIZ] ; int pageno ; @@ -52,6 +53,9 @@ { int first=0; int sign; + + if(!str) return NULL; + sign = (*str == '_' && ++str) ? -1 : 1; if (isdigit(*str)) { first = sign*atoi(str); @@ -91,48 +95,70 @@ } -void main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { + int opt; int currentpg, maxpage = 0; int even = 0, odd = 0, reverse = 0; int pass, all; PageRange *pagerange = NULL; + verbose = 1; + program = *argv; + + while((opt = getopt(argc, argv, "eorqvp:")) != EOF) { + switch(opt) { + case 'e': /* even pages */ + even = 1; + break; + case 'o': /* odd pages */ + odd = 1; + break; + case 'r': /* reverse */ + reverse = 1; + break; + case 'p': /* page spec */ + pagerange = addrange(optarg, pagerange); + break; + case 'q': /* quiet */ + verbose = 0; + break; + case 'v': /* version */ + default: + usage(); + break; + } + } + infile = stdin; outfile = stdout; - verbose = 1; - for (program = *argv++; --argc; argv++) { - if (argv[0][0] == '-') { - switch (argv[0][1]) { - case 'e': /* even pages */ - even = 1; - break; - case 'o': /* odd pages */ - odd = 1; - break; - case 'r': /* reverse */ - reverse = 1; - break; - case 'p': /* page spec */ - pagerange = addrange(*argv+2, pagerange); - break; - case 'q': /* quiet */ - verbose = 0; - break; - case 'v': /* version */ - default: - usage(); - } - } else if (pagerange == NULL && !reverse && !even && !odd) { - pagerange = addrange(*argv, NULL); - } else if (infile == stdin) { - if ((infile = fopen(*argv, OPEN_READ)) == NULL) - message(FATAL, "can't open input file %s\n", *argv); - } else if (outfile == stdout) { - if ((outfile = fopen(*argv, OPEN_WRITE)) == NULL) - message(FATAL, "can't open output file %s\n", *argv); - } else usage(); + + /* If we haven't gotten a page range yet, we better get one now */ + if (pagerange == NULL && !reverse && !even && !odd) { + pagerange = addrange(argv[optind], NULL); + optind++; } + + /* Be defensive */ + if((argc - optind) < 0 || (argc - optind) > 2) usage(); + + if (optind != argc) { + /* User specified an input file */ + if ((infile = fopen(argv[optind], OPEN_READ)) == NULL) + message(FATAL, "can't open input file %s\n", argv[optind]); + optind++; + } + + if (optind != argc) { + /* User specified an output file */ + if ((outfile = fopen(argv[optind], OPEN_WRITE)) == NULL) + message(FATAL, "can't open output file %s\n", argv[optind]); + optind++; + } + + if(optind != argc) usage(); + #if defined(MSDOS) || defined(WINNT) if ( infile == stdin ) { int fd = fileno(stdin) ; @@ -145,6 +171,7 @@ message(FATAL, "can't reset stdout to binary mode\n"); } #endif + if ((infile=seekable(infile))==NULL) message(FATAL, "can't seek input\n"); Index: psutils-1.17.dfsg/pstops.man =================================================================== --- psutils-1.17.dfsg.orig/pstops.man 2012-08-25 06:25:29.233367959 -0400 +++ psutils-1.17.dfsg/pstops.man 2012-08-25 06:25:32.965367859 -0400 @@ -85,15 +85,20 @@ 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 zero, the \fIpageno\fR may be omitted. -The shift, rotation, and scaling are performed +The shift, rotation, and scaling are applied +to the PostScript transformation matrix in that order regardless of which order they appear on the command line. +The matrix accumulates the individual transformations. +The effect on the image is to first scale with respect to an origin +at the lower left corner, then rotate about the same origin, and +finally shift. .PP The .I \-w @@ -108,8 +113,8 @@ The .I \-p option can be used as an alternative, to set the paper size to -.B a3, a4, a5, b5, letter, legal, tabloid, statement, executive, folio, quarto -or +.B a0, a1, a2, a3, a4, a5, b5, letter, legal, tabloid, statement, +executive, folio, quarto or .B 10x14. The default paper size is .B @PAPER@. @@ -136,7 +141,7 @@ sheet (of A4 paper), the pagespec to use is: .sp .ce -2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm) +"2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)" .sp To select all of the odd pages in reverse order, use: .sp @@ -146,12 +151,12 @@ To re-arrange pages for printing 2-up booklets, use .sp .ce -4:-3L@.7(21cm,0)+0L@.7(21cm,14.85cm) +"4:-3L@.7(21cm,0)+0L@.7(21cm,14.85cm)" .sp for the front sides, and .sp .ce -4:1L@.7(21cm,0)+-2L@.7(21cm,14.85cm) +"4:1L@.7(21cm,0)+-2L@.7(21cm,14.85cm)" .sp for the reverse sides (or join them with a comma for duplex printing). .SH AUTHOR Index: psutils-1.17.dfsg/psnup.man =================================================================== --- psutils-1.17.dfsg.orig/psnup.man 2012-08-25 06:25:29.233367959 -0400 +++ psutils-1.17.dfsg/psnup.man 2012-08-25 06:25:32.977367859 -0400 @@ -61,11 +61,12 @@ The .I \-p option can be used as an alternative, to set the paper size to -.B a3, a4, a5, b5, letter, legal, tabloid, statement, executive, folio, quarto -or +.B a0, a1, a2, a3, a4, a5, b5, letter, legal, tabloid, statement, +executive, folio, quarto or .B 10x14. -The default paper size is -.B @PAPER@. +The default paper size is normally +.B @PAPER@, +but on a Debian system, /etc/papersize is consulted. The .I \-W, \-H, and Index: psutils-1.17.dfsg/getafm =================================================================== --- psutils-1.17.dfsg.orig/getafm 2012-08-25 06:25:29.233367959 -0400 +++ psutils-1.17.dfsg/getafm 2012-08-25 06:25:32.977367859 -0400 @@ -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 @@ -13,6 +13,11 @@ % getafm 1.00 (c) AJCD % and getafm.ps by an unknown author, % modified by J. Daniel Smith +% +% modified by Joachim H. Kaiser : +% - suggest a quiet gs run in usage +% - get font version info (from 'version', not 'Version') +% - add copyright field to output % Metrics dictionary code added by AJCD, 7/6/93 @@ -66,8 +71,9 @@ (isFixedPitch)(IsFixedPitch) prany (UnderlinePosition)dup prany (UnderlineThickness)dup prany - (Version)(version) prany + (version)(Version) prany (Notice)dup prany + (Copyright)dup prany pop } { Index: psutils-1.17.dfsg/psresize.c =================================================================== --- psutils-1.17.dfsg.orig/psresize.c 2012-08-25 06:25:29.233367959 -0400 +++ psutils-1.17.dfsg/psresize.c 2012-08-25 06:25:32.977367859 -0400 @@ -15,11 +15,17 @@ * -Ppaper sets the input paper size (width and height) by name */ +#include + #include "psutil.h" #include "psspec.h" #include "pserror.h" #include "patchlev.h" +#ifdef DEBIAN +#include +#endif + char *program ; int pages ; int verbose ; @@ -46,7 +52,8 @@ #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 */ @@ -54,10 +61,23 @@ int rotate; double inwidth = -1; double inheight = -1; - Paper *paper; + Paper *paper = NULL; PageSpec *specs; + int opt; -#ifdef PAPER +#ifdef DEBIAN + paperinit(); + { + const char *default_size = systempapername(); + if (!default_size) default_size = defaultpapername (); + if (default_size) paper = findpaper(default_size); + if (paper) { + inwidth = width = (double)PaperWidth(paper); + inheight = height = (double)PaperHeight(paper); + } + } + paperdone(); +#elif defined(PAPER) if ( (paper = findpaper(PAPER)) != (Paper *)0 ) { inwidth = width = (double)PaperWidth(paper); inheight = height = (double)PaperHeight(paper); @@ -67,53 +87,72 @@ vshift = hshift = 0; rotate = 0; + verbose = 1; + + + program = *argv; + + while((opt = getopt(argc, argv, + "qw:h:p:W:H:P:")) != EOF) { + switch(opt) { + + case 'q': /* quiet */ + verbose = 0; + break; + case 'w': /* page width */ + width = singledimen(optarg, argerror, usage); + break; + case 'h': /* page height */ + height = singledimen(optarg, argerror, usage); + break; + case 'p': /* paper type */ + if ( (paper = findpaper(optarg)) != (Paper *)0 ) { + width = (double)PaperWidth(paper); + height = (double)PaperHeight(paper); + } else + message(FATAL, "paper size '%s' not recognised\n", optarg); + break; + case 'W': /* input page width */ + inwidth = singledimen(optarg, argerror, usage); + break; + case 'H': /* input page height */ + inheight = singledimen(optarg, argerror, usage); + break; + case 'P': /* input paper type */ + if ( (paper = findpaper(optarg)) != (Paper *)0 ) { + inwidth = (double)PaperWidth(paper); + inheight = (double)PaperHeight(paper); + } else + message(FATAL, "paper size '%s' not recognised\n", optarg); + break; + case 'v': /* version */ + default: + usage(); + } + } + infile = stdin; outfile = stdout; - verbose = 1; - for (program = *argv++; --argc; argv++) { - if (argv[0][0] == '-') { - switch (argv[0][1]) { - case 'q': /* quiet */ - verbose = 0; - break; - case 'w': /* page width */ - width = singledimen(*argv+2, argerror, usage); - break; - case 'h': /* page height */ - height = singledimen(*argv+2, argerror, usage); - break; - case 'p': /* paper type */ - if ( (paper = findpaper(*argv+2)) != (Paper *)0 ) { - width = (double)PaperWidth(paper); - height = (double)PaperHeight(paper); - } else - message(FATAL, "paper size '%s' not recognised\n", *argv+2); - break; - case 'W': /* input page width */ - inwidth = singledimen(*argv+2, argerror, usage); - break; - case 'H': /* input page height */ - inheight = singledimen(*argv+2, argerror, usage); - break; - case 'P': /* input paper type */ - if ( (paper = findpaper(*argv+2)) != (Paper *)0 ) { - inwidth = (double)PaperWidth(paper); - inheight = (double)PaperHeight(paper); - } else - message(FATAL, "paper size '%s' not recognised\n", *argv+2); - break; - case 'v': /* version */ - default: - usage(); - } - } else if (infile == stdin) { - if ((infile = fopen(*argv, OPEN_READ)) == NULL) - message(FATAL, "can't open input file %s\n", *argv); - } else if (outfile == stdout) { - if ((outfile = fopen(*argv, OPEN_WRITE)) == NULL) - message(FATAL, "can't open output file %s\n", *argv); - } else usage(); + + /* Be defensive */ + if((argc - optind) < 0 || (argc - optind) > 2) usage(); + + if (optind != argc) { + /* User specified an input file */ + if ((infile = fopen(argv[optind], OPEN_READ)) == NULL) + message(FATAL, "can't open input file %s\n", argv[optind]); + optind++; } + + if (optind != argc) { + /* User specified an output file */ + if ((outfile = fopen(argv[optind], OPEN_WRITE)) == NULL) + message(FATAL, "can't open output file %s\n", argv[optind]); + optind++; + } + + if (optind != argc) usage(); + #if defined(MSDOS) || defined(WINNT) if ( infile == stdin ) { int fd = fileno(stdin) ; Index: psutils-1.17.dfsg/psbook.c =================================================================== --- psutils-1.17.dfsg.orig/psbook.c 2012-08-25 06:25:29.233367959 -0400 +++ psutils-1.17.dfsg/psbook.c 2012-08-25 06:25:32.977367859 -0400 @@ -8,6 +8,8 @@ * psbook [-q] [-s] [infile [outfile]] */ +#include + #include "psutil.h" #include "pserror.h" #include "patchlev.h" @@ -32,36 +34,54 @@ } -void main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { int signature = 0; int currentpg, maxpage; + int opt; + + verbose = 1; + program = *argv; + + while((opt = getopt(argc, argv, "vqs:")) != EOF) { + switch(opt) { + case 's': /* signature size */ + signature = atoi(optarg); + if (signature < 1 || signature % 4) usage(); + break; + case 'q': /* quiet */ + verbose = 0; + break; + case 'v': /* version */ + default: + usage(); + break; + } + } infile = stdin; outfile = stdout; - verbose = 1; - for (program = *argv++; --argc; argv++) { - if (argv[0][0] == '-') { - switch (argv[0][1]) { - case 's': /* signature size */ - signature = atoi(*argv+2); - if (signature < 1 || signature % 4) usage(); - break; - case 'q': /* quiet */ - verbose = 0; - break; - case 'v': /* version */ - default: - usage(); - } - } else if (infile == stdin) { - if ((infile = fopen(*argv, OPEN_READ)) == NULL) - message(FATAL, "can't open input file %s\n", *argv); - } else if (outfile == stdout) { - if ((outfile = fopen(*argv, OPEN_WRITE)) == NULL) - message(FATAL, "can't open output file %s\n", *argv); - } else usage(); + + /* Be defensive */ + if((argc - optind) < 0 || (argc - optind) > 2) usage(); + + if (optind != argc) { + /* User specified an input file */ + if ((infile = fopen(argv[optind], OPEN_READ)) == NULL) + message(FATAL, "can't open input file %s\n", argv[optind]); + optind++; + } + + if (optind != argc) { + /* User specified an output file */ + if ((outfile = fopen(argv[optind], OPEN_WRITE)) == NULL) + message(FATAL, "can't open output file %s\n", argv[optind]); + optind++; } + + if(optind != argc) usage(); + #if defined(MSDOS) || defined(WINNT) if ( infile == stdin ) { int fd = fileno(stdin) ; Index: psutils-1.17.dfsg/epsffit.c =================================================================== --- psutils-1.17.dfsg.orig/epsffit.c 2012-08-25 06:25:29.233367959 -0400 +++ psutils-1.17.dfsg/epsffit.c 2012-08-25 06:25:32.977367859 -0400 @@ -8,6 +8,7 @@ * -c centres the image in the bounding box given * -r rotates the image by 90 degrees anti-clockwise * -a alters the aspect ratio to fit the bounding box + * -m rotate to maximise the size within specified bounding * -s adds a showpage at the end of the image * * Added filename spec (from Larry Weissman) 5 Feb 93 @@ -20,6 +21,7 @@ #include #include #include +#include #include "pserror.h" #include "patchlev.h" @@ -34,66 +36,76 @@ { fprintf(stderr, "%s release %d patchlevel %d\n", program, RELEASE, PATCHLEVEL); fprintf(stderr, "Copyright (C) Angus J. C. Duggan, 1991-1995. See file LICENSE for details.\n"); - fprintf(stderr, "Usage: %s [-c] [-r] [-a] [-s] llx lly urx ury [infile [outfile]]\n", + fprintf(stderr, "Usage: %s [-c] [-r] [-a] [-m] [-s] llx lly urx ury [infile [outfile]]\n", program); 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; + int opt; + + program = *argv; + + while((opt = getopt(argc, argv, "csramv")) != EOF) { + switch(opt) { + case 'c': centre = 1; break; + case 's': showpage = 1; break; + case 'r': rotate = 1; break; + case 'a': aspect = 1; break; + case 'm': maximise = 1; break; + case 'v': + default: + usage(); + break; + } + } - program = *argv++; argc--; + if ((argc - optind) < 4 || (argc - optind) > 6) usage(); - while (argc > 0 && argv[0][0] == '-') { - switch (argv[0][1]) { - case 'c': centre = 1; break; - case 's': showpage = 1; break; - case 'r': rotate = 1; break; - case 'a': aspect = 1; break; - case 'm': maximise = 1; break; - case 'v': - default: usage(); - } - argc--; - argv++; + fllx = atoi(argv[optind++]); + flly = atoi(argv[optind++]); + furx = atoi(argv[optind++]); + fury = atoi(argv[optind++]); + + /* Be defensive */ + if((argc - optind) < 0 || (argc - optind) > 2) usage(); + + if ((argc - optind) > 0) { + if(!(input = fopen(argv[optind], OPEN_READ))) + message(FATAL, "can't open input file %s\n", argv[optind]); + optind++; } - - if (argc < 4 || argc > 6) usage(); - fllx = atoi(argv[0]); - flly = atoi(argv[1]); - furx = atoi(argv[2]); - fury = atoi(argv[3]); - - if (argc > 4) { - if(!(input = fopen(argv[4], OPEN_READ))) - message(FATAL, "can't open input file %s\n", argv[4]); - } else { #if defined(MSDOS) || defined(WINNT) + else { int fd = fileno(stdin) ; if ( setmode(fd, O_BINARY) < 0 ) message(FATAL, "can't reset stdin to binary mode\n"); -#endif input = stdin ; } +#endif - if (argc > 5) { - if(!(output = fopen(argv[5], OPEN_WRITE))) - message(FATAL, "can't open output file %s\n", argv[5]); - } else { + if ((argc - optind) > 0) { + if(!(output = fopen(argv[optind], OPEN_WRITE))) + message(FATAL, "can't open output file %s\n", argv[optind]); + optind++; + } #if defined(MSDOS) || defined(WINNT) + else { int fd = fileno(stdout) ; if ( setmode(fd, O_BINARY) < 0 ) message(FATAL, "can't reset stdout to binary mode\n"); -#endif output = stdout ; } +#endif while (fgets(buf, BUFSIZ, input)) { if (buf[0] == '%' && (buf[1] == '%' || buf[1] == '!')) { Index: psutils-1.17.dfsg/psresize.man =================================================================== --- psutils-1.17.dfsg.orig/psresize.man 2012-08-25 06:25:29.233367959 -0400 +++ psutils-1.17.dfsg/psresize.man 2012-08-25 06:25:32.977367859 -0400 @@ -1,6 +1,6 @@ .TH PSRESIZE 1 "PSUtils Release @RELEASE@ Patchlevel @PATCHLEVEL@" .SH NAME -psresize \- multiple pages per sheet +psresize \- rescales and centers a document for new output paper size .SH SYNOPSIS .B psresize [ @@ -42,8 +42,8 @@ The .I \-p option can be used as an alternative, to set the output paper size to -.B a3, a4, a5, b5, letter, legal, tabloid, statement, executive, folio, quarto -or +.B a0, a1, a2, a3, a4, a5, b5, letter, legal, tabloid, statement, +executive, folio, quarto or .B 10x14. The default output paper size is .B @PAPER@. Index: psutils-1.17.dfsg/psnup.c =================================================================== --- psutils-1.17.dfsg.orig/psnup.c 2012-08-25 06:25:29.233367959 -0400 +++ psutils-1.17.dfsg/psnup.c 2012-08-25 06:25:32.981367857 -0400 @@ -23,11 +23,18 @@ * -d to draw the page boundaries */ +#include +#include + #include "psutil.h" #include "psspec.h" #include "pserror.h" #include "patchlev.h" +#ifdef DEBIAN +#include +#endif + char *program ; int pages ; int verbose ; @@ -66,21 +73,36 @@ 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 = 0; + int flip = 0, leftright = 0, topbottom = 0; int nup = 1; double draw = 0; /* draw page borders */ - double scale; /* page scale */ + double scale = 1.0; /* page scale */ double uscale = 0; /* user supplied scale */ double ppwid, pphgt; /* paper dimensions */ double margin, border; /* paper & page margins */ double vshift, hshift; /* page centring shifts */ double iwidth, iheight ; /* input paper size */ double tolerance = 100000; /* layout tolerance */ - Paper *paper; + Paper *paper = NULL; + int opt; -#ifdef PAPER +#ifdef DEBIAN + paperinit(); + { + const char *default_size = systempapername(); + if (!default_size) default_size = defaultpapername (); + if (default_size) paper = findpaper(default_size); + if (paper) { + width = (double)PaperWidth(paper); + height = (double)PaperHeight(paper); + } + } + paperdone(); +#elif defined(PAPER) if ( (paper = findpaper(PAPER)) != (Paper *)0 ) { width = (double)PaperWidth(paper); height = (double)PaperHeight(paper); @@ -91,105 +113,129 @@ leftright = topbottom = 1; iwidth = iheight = -1 ; + verbose = 1; + program = *argv; + + while((opt = + getopt(argc, argv, + "qd::lrfcw:W:h:H:m:b:t:s:p:P:n:1::2::3::4::5::6::7::8::9::")) + != EOF) { + switch(opt) { + case 'q': /* quiet */ + verbose = 0; + break; + case 'd': /* draw borders */ + if (optarg) + draw = singledimen(optarg, argerror, usage); + else + draw = 1; + break; + case 'l': /* landscape (rotated left) */ + column = !column; + topbottom = !topbottom; + break; + case 'r': /* seascape (rotated right) */ + column = !column; + leftright = !leftright; + break; + case 'f': /* flipped */ + flip = 1; + break; + case 'c': /* column major layout */ + column = !column; + break; + case 'w': /* page width */ + width = singledimen(optarg, argerror, usage); + break; + case 'W': /* input page width */ + iwidth = singledimen(optarg, argerror, usage); + break; + case 'h': /* page height */ + height = singledimen(optarg, argerror, usage); + break; + case 'H': /* input page height */ + iheight = singledimen(optarg, argerror, usage); + break; + case 'm': /* margins around whole page */ + margin = singledimen(optarg, argerror, usage); + break; + case 'b': /* border around individual pages */ + border = singledimen(optarg, argerror, usage); + break; + case 't': /* layout tolerance */ + tolerance = atof(optarg); + break; + case 's': /* override scale */ + uscale = atof(optarg); + break; + case 'p': /* output (and by default input) paper type */ + if ( (paper = findpaper(optarg)) != (Paper *)0 ) { + width = (double)PaperWidth(paper); + height = (double)PaperHeight(paper); + } else + message(FATAL, "paper size '%s' not recognised\n", optarg); + break; + case 'P': /* paper type */ + if ( (paper = findpaper(optarg)) != (Paper *)0 ) { + iwidth = (double)PaperWidth(paper); + iheight = (double)PaperHeight(paper); + } else + message(FATAL, "paper size '%s' not recognised\n", optarg); + break; + case 'n': /* n-up, for compatibility with other psnups */ + if ((nup = atoi(optarg)) < 1) + message(FATAL, "-n %d too small\n", nup); + break; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if(optarg) { + char *valuestr = (char *) malloc(strlen(optarg) + 2); + valuestr[0] = opt; + strcpy(&(valuestr[1]), optarg); + + /* really should check that valuestr is only digits here...*/ + if ((nup = atoi(valuestr)) < 1) + message(FATAL, "-n %d too small\n", nup); + free(valuestr); + } else { + nup = (opt - '0'); + } + break; + case 'v': /* version */ + default: + usage(); + } + } + infile = stdin; outfile = stdout; - verbose = 1; - for (program = *argv++; --argc; argv++) { - if (argv[0][0] == '-') { - switch (argv[0][1]) { - case 'q': /* quiet */ - verbose = 0; - break; - case 'd': /* draw borders */ - if (argv[0][2]) - draw = singledimen(*argv+2, argerror, usage); - else - draw = 1; - break; - case 'l': /* landscape (rotated left) */ - column = !column; - topbottom = !topbottom; - break; - case 'r': /* seascape (rotated right) */ - column = !column; - leftright = !leftright; - break; - case 'f': /* flipped */ - flip = 1; - break; - case 'c': /* column major layout */ - column = !column; - break; - case 'w': /* page width */ - width = singledimen(*argv+2, argerror, usage); - break; - case 'W': /* input page width */ - iwidth = singledimen(*argv+2, argerror, usage); - break; - case 'h': /* page height */ - height = singledimen(*argv+2, argerror, usage); - break; - case 'H': /* input page height */ - iheight = singledimen(*argv+2, argerror, usage); - break; - case 'm': /* margins around whole page */ - margin = singledimen(*argv+2, argerror, usage); - break; - case 'b': /* border around individual pages */ - border = singledimen(*argv+2, argerror, usage); - break; - case 't': /* layout tolerance */ - tolerance = atof(*argv+2); - break; - case 's': /* override scale */ - uscale = atof(*argv+2); - break; - case 'p': /* output (and by default input) paper type */ - if ( (paper = findpaper(*argv+2)) != (Paper *)0 ) { - width = (double)PaperWidth(paper); - height = (double)PaperHeight(paper); - } else - message(FATAL, "paper size '%s' not recognised\n", *argv+2); - break; - case 'P': /* paper type */ - if ( (paper = findpaper(*argv+2)) != (Paper *)0 ) { - iwidth = (double)PaperWidth(paper); - iheight = (double)PaperHeight(paper); - } else - message(FATAL, "paper size '%s' not recognised\n", *argv+2); - break; - case 'n': /* n-up, for compatibility with other psnups */ - if (argc >= 2) { - argv++; - argc--; - if ((nup = atoi(*argv)) < 1) - message(FATAL, "-n %d too small\n", nup); - } else - message(FATAL, "argument expected for -n\n"); - break; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - nup = atoi(*argv+1); - break; - case 'v': /* version */ - default: - usage(); - } - } else if (infile == stdin) { - if ((infile = fopen(*argv, OPEN_READ)) == NULL) - message(FATAL, "can't open input file %s\n", *argv); - } else if (outfile == stdout) { - if ((outfile = fopen(*argv, OPEN_WRITE)) == NULL) - message(FATAL, "can't open output file %s\n", *argv); - } else usage(); + + /* Be defensive */ + if((argc - optind) < 0 || (argc - optind) > 2) usage(); + + if (optind != argc) { + /* User specified an input file */ + if ((infile = fopen(argv[optind], OPEN_READ)) == NULL) + message(FATAL, "can't open input file %s\n", argv[optind]); + optind++; } + + if (optind != argc) { + /* User specified an output file */ + if ((outfile = fopen(argv[optind], OPEN_WRITE)) == NULL) + message(FATAL, "can't open output file %s\n", argv[optind]); + optind++; + } + + if (optind != argc) usage(); + #if defined(MSDOS) || defined(WINNT) if ( infile == stdin ) { int fd = fileno(stdin) ; debian/patches/gnome-printing.patch0000644000000000000000000000240612016124034014566 0ustar Index: psutils-1.17.dfsg/psspec.c =================================================================== --- psutils-1.17.dfsg.orig/psspec.c 2012-08-25 06:25:29.285367958 -0400 +++ psutils-1.17.dfsg/psspec.c 2012-08-25 06:25:32.861367862 -0400 @@ -93,10 +93,13 @@ static char *prologue[] = { /* PStoPS procset */ #ifndef SHOWPAGE_LOAD + /* Wrap these up with our own versions. We have to */ "userdict begin", - "[/showpage/erasepage/copypage]{dup where{pop dup load", /* prevent */ - " type/operatortype eq{1 array cvx dup 0 3 index cvx put", /* binding */ - " bind def}{pop}ifelse}{pop}ifelse}forall", /* in prolog */ + "[/showpage/erasepage/copypage]{dup where{pop dup load", + " type/operatortype eq{ /PStoPSenablepage cvx 1 index" + " load 1 array astore cvx {} bind /ifelse cvx 4 array" + " astore cvx def}{pop}ifelse}{pop}ifelse}forall" + " /PStoPSenablepage true def", #else "userdict begin", "[/showpage/copypage/erasepage]{dup 10 string cvs dup", @@ -228,7 +231,7 @@ } if (add_next) { #ifndef SHOWPAGE_LOAD - writestring("/showpage{}def/copypage{}def/erasepage{}def\n"); + writestring("/PStoPSenablepage false def\n"); #else writestring("/PStoPSshowpage{}store/PStoPScopypage{}store/PStoPSerasepage{}store\n"); #endif debian/patches/bboxesandsizes.patch0000644000000000000000000002376012016124035014663 0ustar Index: psutils-1.17.dfsg/psutil.c =================================================================== --- psutils-1.17.dfsg.orig/psutil.c 2012-08-25 06:25:32.961367859 -0400 +++ psutils-1.17.dfsg/psutil.c 2012-08-25 06:25:33.273367851 -0400 @@ -135,11 +135,28 @@ } -/* copy input file from current position upto new position to output file */ -static int fcopy(long upto) +/* copy input file from current position upto new position to output file, + * ignoring the lines starting at something ignorelist points to */ +static int fcopy(long upto, long *ignorelist) { long here = ftell(infile); - long bytes_left = upto - here; + long bytes_left; + + if (ignorelist != NULL) { + while (*ignorelist > 0 && *ignorelist < here) + ignorelist++; + + while (*ignorelist > 0 && *ignorelist < upto) { + int r = fcopy(*ignorelist, NULL); + if (!r || fgets(buffer, BUFSIZ, infile) == NULL) + return 0; + ignorelist++; + here = ftell(infile); + while (*ignorelist > 0 && *ignorelist < here) + ignorelist++; + } + } + bytes_left = upto - here; while (bytes_left > 0) { size_t rw_result; @@ -155,12 +172,15 @@ } /* build array of pointers to start/end of pages */ -void scanpages(void) +void scanpages(long *sizeheaders) { register char *comment = buffer+2; register int nesting = 0; register long int record; + if (sizeheaders) + *sizeheaders = 0; + if ((pageptr = (long *)malloc(sizeof(long)*maxpages)) == NULL) message(FATAL, "out of memory\n"); pages = 0; @@ -176,6 +196,26 @@ message(FATAL, "out of memory\n"); } pageptr[pages++] = record; + } else if (headerpos == 0 && iscomment(comment, "BoundingBox:")) { + if (sizeheaders) { + *(sizeheaders++) = record; + *sizeheaders = 0; + } + } else if (headerpos == 0 && iscomment(comment, "HiResBoundingBox:")) { + if (sizeheaders) { + *(sizeheaders++) = record; + *sizeheaders = 0; + } + } else if (headerpos == 0 && iscomment(comment,"DocumentPaperSizes:")) { + if (sizeheaders) { + *(sizeheaders++) = record; + *sizeheaders = 0; + } + } else if (headerpos == 0 && iscomment(comment,"DocumentMedia:")) { + if (sizeheaders) { + *(sizeheaders++) = record; + *sizeheaders = 0; + } } else if (headerpos == 0 && iscomment(comment, "Pages:")) pagescmt = record; else if (headerpos == 0 && iscomment(comment, "EndComments")) @@ -279,7 +319,7 @@ /* write the body of a page */ void writepagebody(int p) { - if (!fcopy(pageptr[p+1])) + if (!fcopy(pageptr[p+1], NULL)) message(FATAL, "I/O error writing page %d\n", outputpage); } @@ -292,23 +332,34 @@ } /* write from start of file to end of header comments */ -void writeheader(int p) +void writeheader(int p, long *ignore) +{ + writeheadermedia(p, ignore, -1, -1); +} + +void writeheadermedia(int p, long *ignore, double width, double height) { fseek(infile, 0L, SEEK_SET); if (pagescmt) { - if (!fcopy(pagescmt) || fgets(buffer, BUFSIZ, infile) == NULL) + if (!fcopy(pagescmt, ignore) || fgets(buffer, BUFSIZ, infile) == NULL) message(FATAL, "I/O error in header\n"); + if (width > -1 && height > -1) { + sprintf(buffer, "%%%%DocumentMedia: plain %d %d 0 () ()\n", (int) width, (int) height); + writestring(buffer); + sprintf(buffer, "%%%%BoundingBox: 0 0 %d %d\n", (int) width, (int) height); + writestring(buffer); + } sprintf(buffer, "%%%%Pages: %d 0\n", p); writestring(buffer); } - if (!fcopy(headerpos)) + if (!fcopy(headerpos, ignore)) message(FATAL, "I/O error in header\n"); } /* write prologue to end of setup section excluding PStoPS procset */ int writepartprolog(void) { - if (beginprocset && !fcopy(beginprocset)) + if (beginprocset && !fcopy(beginprocset, NULL)) message(FATAL, "I/O error in prologue\n"); if (endprocset) fseek(infile, endprocset, SEEK_SET); @@ -319,14 +370,14 @@ /* write prologue up to end of setup section */ void writeprolog(void) { - if (!fcopy(endsetup)) + if (!fcopy(endsetup, NULL)) message(FATAL, "I/O error in prologue\n"); } /* write from end of setup to start of pages */ void writesetup(void) { - if (!fcopy(pageptr[0])) + if (!fcopy(pageptr[0], NULL)) message(FATAL, "I/O error in prologue\n"); } Index: psutils-1.17.dfsg/psutil.h =================================================================== --- psutils-1.17.dfsg.orig/psutil.h 2012-08-25 06:25:32.965367859 -0400 +++ psutils-1.17.dfsg/psutil.h 2012-08-25 06:25:33.273367851 -0400 @@ -32,13 +32,14 @@ extern void writepageheader(char *label, int p); extern void writepagesetup(void); extern void writepagebody(int p); -extern void writeheader(int p); +extern void writeheader(int p, long *ignorelist); +extern void writeheadermedia(int p, long *ignorelist, double width, double height); extern int writepartprolog(void); extern void writeprolog(void); extern void writesetup(void); extern void writetrailer(void); extern void writeemptypage(void); -extern void scanpages(void); +extern void scanpages(long *sizeheaders); extern void writestring(char *s); /* These variables are imported from the client program (e.g. psbook, psnup, Index: psutils-1.17.dfsg/psbook.c =================================================================== --- psutils-1.17.dfsg.orig/psbook.c 2012-08-25 06:25:32.977367859 -0400 +++ psutils-1.17.dfsg/psbook.c 2012-08-25 06:25:33.273367851 -0400 @@ -97,7 +97,7 @@ if ((infile=seekable(infile))==NULL) message(FATAL, "can't seek input\n"); - scanpages(); + scanpages(NULL); if (!signature) signature = maxpage = pages+(4-pages%4)%4; @@ -105,7 +105,7 @@ maxpage = pages+(signature-pages%signature)%signature; /* rearrange pages */ - writeheader(maxpage); + writeheader(maxpage, NULL); writeprolog(); writesetup(); for (currentpg = 0; currentpg < maxpage; currentpg++) { Index: psutils-1.17.dfsg/psselect.c =================================================================== --- psutils-1.17.dfsg.orig/psselect.c 2012-08-25 06:25:32.965367859 -0400 +++ psutils-1.17.dfsg/psselect.c 2012-08-25 06:25:33.273367851 -0400 @@ -175,7 +175,7 @@ if ((infile=seekable(infile))==NULL) message(FATAL, "can't seek input\n"); - scanpages(); + scanpages(NULL); /* select all pages or all in range if odd or even not set */ all = !(odd || even); @@ -224,7 +224,7 @@ for (pass = 0; pass < 2; pass++) { PageRange *r; if (pass) { /* write header on second pass */ - writeheader(maxpage); + writeheader(maxpage, NULL); writeprolog(); writesetup(); } Index: psutils-1.17.dfsg/psspec.h =================================================================== --- psutils-1.17.dfsg.orig/psspec.h 2012-08-25 06:25:29.165367961 -0400 +++ psutils-1.17.dfsg/psspec.h 2012-08-25 06:25:33.273367851 -0400 @@ -28,3 +28,5 @@ void (*usagefn)(void)); extern void pstops(int modulo, int pps, int nobind, PageSpec *specs, double draw); +extern void pstops_write(int modulo, int pps, int nobind, PageSpec *specs, + double draw, long *ignorelist); Index: psutils-1.17.dfsg/psresize.c =================================================================== --- psutils-1.17.dfsg.orig/psresize.c 2012-08-25 06:25:32.977367859 -0400 +++ psutils-1.17.dfsg/psresize.c 2012-08-25 06:25:33.273367851 -0400 @@ -61,6 +61,7 @@ int rotate; double inwidth = -1; double inheight = -1; + long sizeheaders[20]; /* headers to remove */ Paper *paper = NULL; PageSpec *specs; int opt; @@ -171,6 +172,8 @@ if (width <= 0 || height <= 0) message(FATAL, "output page width and height must be set\n"); + scanpages(sizeheaders); + if (inwidth <= 0 || inheight <= 0) message(FATAL, "input page width and height must be set\n"); @@ -212,7 +215,7 @@ specs->yoff = vshift; specs->flags |= OFFSET; - pstops(1, 1, 0, specs, 0.0); /* do page rearrangement */ + pstops_write(1, 1, 0, specs, 0.0, sizeheaders); /* do page rearrangement */ exit(0); } Index: psutils-1.17.dfsg/psnup.c =================================================================== --- psutils-1.17.dfsg.orig/psnup.c 2012-08-25 06:25:32.981367857 -0400 +++ psutils-1.17.dfsg/psnup.c 2012-08-25 06:25:33.273367851 -0400 @@ -88,6 +88,7 @@ double iwidth, iheight ; /* input paper size */ double tolerance = 100000; /* layout tolerance */ Paper *paper = NULL; + long sizeheaders[20]; /* headers to remove */ int opt; #ifdef DEBIAN @@ -261,6 +262,8 @@ if (ppwid <= 0 || pphgt <= 0) message(FATAL, "paper margins are too large\n"); + scanpages(sizeheaders); + /* set default values of input height & width */ if ( iwidth > 0 ) width = iwidth ; @@ -374,7 +377,7 @@ } } - pstops(nup, 1, 0, specs, draw); /* do page rearrangement */ + pstops_write(nup, 1, 0, specs, draw, sizeheaders); /* do page rearrangement */ } exit(0); Index: psutils-1.17.dfsg/psspec.c =================================================================== --- psutils-1.17.dfsg.orig/psspec.c 2012-08-25 06:25:32.861367862 -0400 +++ psutils-1.17.dfsg/psspec.c 2012-08-25 06:25:33.277367851 -0400 @@ -137,18 +137,22 @@ NULL }; -void pstops(int modulo, int pps, int nobind, PageSpec *specs, double draw) +void pstops(int modulo, int pps, int nobind, PageSpec *specs, double draw) { + + scanpages(NULL); + pstops_write(modulo, pps, nobind, specs, draw, NULL); +} + +void pstops_write(int modulo, int pps, int nobind, PageSpec *specs, double draw, long *ignorelist) { int thispg, maxpage; int pageindex = 0; char **pro; - scanpages(); - maxpage = ((pages+modulo-1)/modulo)*modulo; /* rearrange pages: doesn't cope properly with loaded definitions */ - writeheader((maxpage/modulo)*pps); + writeheadermedia((maxpage/modulo)*pps, ignorelist, width, height); #ifndef SHOWPAGE_LOAD writestring("%%BeginProcSet: PStoPS"); #else debian/source/0000755000000000000000000000000012016125176010467 5ustar debian/source/format0000644000000000000000000000001411456612602011677 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000000640012016122377011122 0ustar This is Debian/GNU/Linux's prepackaged version of Angus Duggan's psutils PostScript utilities kit. This package was put together by Rob Browning from sources found at "http://www.tardis.ed.ac.uk/~ajcd/psutils/" and later repackaged by Jay Berkenbilt . Please see below (in the binary distribution) or the file LICENSE (in the source distribution) for details of the copyright and licensing arrangements for the PostScript Utilities package itself. Note that the license mentions some files (md68_0.ps and md71_0.ps and their uuencoded forms) that have unclear copyright. Those have been removed from the original upstream sources, which have been repackaged. See debian/README.source in the source package for details. In addition to psutils, this package includes a small utility called psjoin, which was placed in the public domain by its author, Tom Sato . It was downloaded from http://homepage3.nifty.com/tsato/tools/psjoin.html and included in the psutils debian package as a patch. PS Utilities Package The constituent files of this package listed below are copyright (C) 1991-1995 Angus J. C. Duggan. LICENSE Makefile.msc Makefile.nt Makefile.os2 Makefile.unix README config.h descrip.mms epsffit.c epsffit.man extractres.man extractres.pl fixdlsrps.man fixdlsrps.pl fixfmps.man fixfmps.pl fixmacps.man fixmacps.pl fixpsditps.man fixpsditps.pl fixpspps.man fixpspps.pl fixscribeps.man fixscribeps.pl fixtpps.man fixtpps.pl fixwfwps.man fixwfwps.pl fixwpps.man fixwpps.pl fixwwps.man fixwwps.pl getafm getafm.man includeres.man includeres.pl maketext patchlev.h psbook.c psbook.man pserror.c pserror.h psmerge.man psmerge.pl psnup.c psnup.man psresize.c psresize.man psselect.c psselect.man psspec.c psspec.h pstops.c pstops.man psutil.c psutil.h showchar They may be copied and used for any purpose (including distribution as part of a for-profit product), provided: 1) The original attribution of the programs is clearly displayed in the product and/or documentation, even if the programs are modified and/or renamed as part of the product. 2) The original source code of the programs is provided free of charge (except for reasonable distribution costs). For a definition of reasonable distribution costs, see the Gnu General Public License or Larry Wall's Artistic License (provided with the Perl 4 kit). The GPL and Artistic License in NO WAY affect this license; they are merely used as examples of the spirit in which it is intended. 3) These programs are provided "as-is". No warranty or guarantee of their fitness for any particular task is provided. Use of these programs is completely at your own risk. Basically, I don't mind how you use the programs so long as you acknowledge the author, and give people the originals if they want them. The included files, md68_0.ps and md71_0.ps (and their uuencoded forms) are (to the best of my knowledge) copyright Apple Computer, Inc. AJCD 4/4/95 debian/psutils.lintian-overrides0000644000000000000000000000024011745022176014252 0ustar # The copyright file mentions the GPL, but the GPL is not the actual # license for this package. psutils: copyright-should-refer-to-common-license-file-for-gpl debian/rules0000755000000000000000000000152611773456645010274 0ustar #!/usr/bin/make -f # -*- makefile -*- export DEB_BUILD_HARDENING=1 # Include cdbs rules files. include /usr/share/cdbs/1/class/makefile.mk include /usr/share/cdbs/1/rules/debhelper.mk CURDIR := $(shell pwd) DEB_MAKE_CLEAN_TARGET = realclean DEB_MAKE_BUILD_TARGET = prefix=/usr all DEB_MAKE_INSTALL_TARGET = prefix=$(CURDIR)/debian/psutils/usr \ MANDIR=$(CURDIR)/debian/psutils/usr/share/man/man1 \ install CFLAGS = -DDEBIAN -DUNIX -O2 -g -Wall VERSION := $(shell dpkg-parsechangelog | \ awk '/Version:/ {print $$2}' | cut -d- -f 1) clean:: $(RM) showchar.1 common-install-prehook-arch:: mkdir -p debian/psutils/usr/bin \ debian/psutils/usr/lib \ debian/psutils/usr/share/man/man1 \ install/psutils:: cp psjoin debian/psutils/usr/bin chmod +x debian/psutils/usr/bin/psjoin cp psjoin.1 debian/psutils/usr/share/man/man1 debian/compat0000644000000000000000000000000211773452373010400 0ustar 9 debian/README.source0000644000000000000000000000066412016123100011335 0ustar The original upstream distribution includes two files of questionable copyright: md68_0.ps and md71_0.ps. These files have been removed from the distribution along with things that depend on them. The following exact steps were taken: rm md68_0.ps md71_0.ps fixmacps.man fixmacps.pl Changes to the Makefile to avoid installing these files are made with a patch. -- Jay Berkenbilt , Sat, 25 Aug 2012 06:17:36 -0400 debian/control0000644000000000000000000000200311773456623010602 0ustar Source: psutils Section: text Priority: optional Maintainer: Jay Berkenbilt Build-Depends: cdbs (>= 0.4.106~), debhelper (>> 9), libpaper-dev, hardening-wrapper Standards-Version: 3.9.3 Homepage: http://www.tardis.ed.ac.uk/~ajcd/psutils/ Package: psutils Architecture: any Multi-Arch: foreign Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: ghostscript Description: PostScript document handling utilities This collection of utilities is for manipulating PostScript documents. Page selection and rearrangement are supported, including arrangement into signatures for booklet printing, and page merging for n-up printing. . The following programs are included in psutils: epsffit, extractres, fixdlsrps, fixfmps, fixmacps, fixpsditps, fixpspps, fixscribeps, fixtpps, fixwfwps, fixwpps, fixwwps, getafm, includeres, psbook, psmerge, psnup, psresize, psselect, pstops, showchar . Some programs included here (psmerge) behave differently if gs is available, but all programs work without it. debian/changelog0000644000000000000000000002626312016124260011043 0ustar psutils (1.17.dfsg-1) unstable; urgency=low * Repackage without files with unclear copyright. See copyright file and README.source for details. (Closes: #682708) -- Jay Berkenbilt Sat, 25 Aug 2012 06:10:34 -0400 psutils (1.17-32) unstable; urgency=low * Hardening, update standards version -- Jay Berkenbilt Fri, 29 Jun 2012 21:23:03 -0400 psutils (1.17-31) unstable; urgency=low * Mark psutils Multi-Arch: foreign. (Closes: #649693) -- Jay Berkenbilt Mon, 28 Nov 2011 10:33:39 -0500 psutils (1.17-30) unstable; urgency=low * debian/patches/bboxesandsizes.patch: add page headers to output according to parameters (LP #396025). Thanks Michael Braun. (Closes: #632182) * Update standards to 3.9.2 -- Jay Berkenbilt Sat, 03 Sep 2011 10:40:07 -0400 psutils (1.17-29) unstable; urgency=low * Update large file patch to correct regression caused on kfreebsd-i386. Thanks Guillem Jover. (Closes: #617872) * Remove -Werror from compilation flags as per correct suggestion from Guillem Jover. -- Jay Berkenbilt Sat, 02 Apr 2011 18:54:02 -0400 psutils (1.17-28) unstable; urgency=low * Change source format to '3.0 (quilt)' * Remove README.source * Update standards to 3.9.1 * Accept patch from daniele giacomini to allow psutils to work on files larger than 2 GiB. (Closes: #595239) * Accept psutils-flip.patch from Peter Korsgaard. This patch has been in SUSE for some time. (Closes: #534455) * Add public domain psjoin script. (Closes: #253866) -- Jay Berkenbilt Sun, 17 Oct 2010 12:39:12 -0400 psutils (1.17-27) unstable; urgency=low * Housekeeping: add README.source, convert patches to quilt, add homepage to control file, update standards version to 3.8.3. -- Jay Berkenbilt Wed, 19 Aug 2009 19:17:51 -0400 psutils (1.17-26) unstable; urgency=low * Change Recommends on gs | gs-esp to one on ghostscript. -- Jay Berkenbilt Mon, 30 Jun 2008 16:59:26 -0400 psutils (1.17-25) unstable; urgency=low * Update standards version to 3.7.3. No changes required. * Fix error in psmerge manual page. (Closes: #464785) * Include patch from Bernhard R. Link to remove paper size information and bounding boxes from psnup and psresize. This removes bugs resulting in having usually incorrect information in files when the paper size has changed, reasoning that having no information is better than having incorrect information. (Closes: #368331, #434500) * Honor DEB_BUILD_OPTIONS=nostrip by not explicitly calling install -s to strip executables and instead letting dh_strip do it for us. (Closes: #437832) -- Jay Berkenbilt Sun, 08 Jun 2008 11:16:42 -0400 psutils (1.17-24) unstable; urgency=low * Yet another fix to the pstops manual page involving handling of quotes around examples. (Closes: #392737) -- Jay Berkenbilt Sat, 18 Nov 2006 13:16:01 -0500 psutils (1.17-23) unstable; urgency=low * Correction to quotation changes in manual pages to work better in multiple locales. * Add watch file * Update URL in copyright file -- Jay Berkenbilt Fri, 23 Jun 2006 14:47:32 -0400 psutils (1.17-22) unstable; urgency=low * From Ian Jackson : Make psnup (pstops, etc. etc.) cope with output from Gnome printing system, which does `/showpage load', thus defeating attempts to redefine showpage from virtual page to virtual page. Instead, we redefine showpage to a procedure which looks at PStoPSenablepage, a new variable, which is what changes from page to page. Malone #28311. (Closes: #360606) * List binaries in description. I had removed these but have been convinced that they belong after all. (Closes: #357560) * Add quotation marks to examples with parentheses in pstops manual page. Thanks Danai SAE-HAN. (Closes: #363092) * Updated standards version to 3.7.2. No changes required. -- Jay Berkenbilt Mon, 29 May 2006 10:40:58 -0400 psutils (1.17-21) unstable; urgency=low * Fix packaging bug that prevented /etc/papersize from being inspected. (Closes: #339506) -- Jay Berkenbilt Sat, 19 Nov 2005 11:57:43 -0500 psutils (1.17-20) unstable; urgency=low * New maintainer. Thanks Rob! (Closes: #329425) * Bring package to current Standards-Version; make other miscellaneous fixes to control file * No longer Provide postscript-previewer * Modify psmerge to use gs if available; make this package Recommmend (rather than Suggest) some version of gs (Closes: #159888, #35328) * The -thorough option to psmerge doesn't do anything; remove it from the help message. (Closes: #252052, #252054) * Convert package to use cdbs. -- Jay Berkenbilt Sun, 13 Nov 2005 21:27:03 -0500 psutils (1.17-19) unstable; urgency=low * Add Build-Depends on debhelper. (closes: #329609) -- Rob Browning Thu, 22 Sep 2005 11:09:21 -0700 psutils (1.17-18) unstable; urgency=low * Fix psmerge usage message. Thanks to Gregor Hoffleit and Helge Kreutzmann . (closes: #252053, #252610) - debian/patches/fix-psmerge-usage.diff * Add showchar manpage. Thanks to Uwe Hermann . (closes: #118068) - debian/patches/showchar-manpage.diff * Convert package to use quilt. There are now no modifications outside ./debian. - debian/rules - debian/patches/misc.diff * Convert package to use debhelper. * Add ${misc:Depends} to debian/control. - debian/control * Update Standards-Version to 3.5.6. -- Rob Browning Wed, 21 Sep 2005 11:38:14 -0700 psutils (1.17-17) unstable; urgency=low * fix handling of pstops '@0.99(0.1cm,0.1cm)' to follow manpage (i.e. allow omission of pageno when only one spec. (closes: Bug#183508) -- Rob Browning Sun, 30 Mar 2003 23:54:32 -0600 psutils (1.17-16) unstable; urgency=low * be more careful about return values from libpaper functions. (closes: Bug#170503) * list binaries in description. (closes: Bug#143529) * fix problem handling binary input. (closes: Bug#166908) * build-depend on libpaper-dev, not libpaperg-dev. -- Rob Browning Tue, 3 Dec 2002 21:36:32 -0600 psutils (1.17-15) unstable; urgency=low * include string.h in psnup.c. (closes: Bug#134267) -- Rob Browning Mon, 18 Feb 2002 12:13:17 -0600 psutils (1.17-14) unstable; urgency=low * add clarification to pstops manpage. (closes: Bug#132011, Bug#113796) * add clarification to psresize manpage description. (closes: Bug#122567) * note Debian systems use /etc/papersize in psnup manpage. (closes: Bug#122840, Bug#46329) * add Build-Depends: libpaperg-dev. * add -Werror and fix all resulting (minor) bugs. -- Rob Browning Fri, 15 Feb 2002 10:23:02 -0600 psutils (1.17-13) unstable; urgency=low * update my email address. * modify Makefile to call install with -s for binaries so we get "Debian approved" stripping. -- Rob Browning Tue, 17 Jul 2001 13:13:14 -0500 psutils (1.17-12) unstable; urgency=low * Fixed typo in postinst (ouch). -- Rob Browning Mon, 25 Dec 2000 14:10:56 -0600 psutils (1.17-11) unstable; urgency=low * updated to Standards-Version: 3.2.1.0. * added /usr/doc symlink maintenance. * moved manpages and docs to /usr/share. * added poster support to maintainer version. Thanks to joey@infodrom.north.de (Martin Schulze) (Closes: Bug#65531). * I think args bug was fixed way back in 1.17-3 (Closes: Bug#64007). -- Rob Browning Sun, 24 Dec 2000 18:19:03 -0600 psutils (1.17-9.1) unstable; urgency=low * Non-maintainer release * Added support for A2, A1 and A0 sizes, needed for large posters -- Martin Schulze Sun, 11 Jun 2000 22:45:16 +0200 psutils (1.17-10) unstable; urgency=low * Add patch to fix segfault in pstops.c. Thanks to Falk Hueffner (Closes: Bug#75835). -- Rob Browning Mon, 30 Oct 2000 11:48:44 -0600 psutils (1.17-9) unstable; urgency=low * Fixed psselect no-args segfault. (Closes: Bug #47346) -- Rob Browning Thu, 14 Oct 1999 15:56:54 -0500 psutils (1.17-8) unstable; urgency=low * Fixed -16 parsing bug. -n16 would work, -16 wouldn't (Closes: Bug#36535) * Added Freetype 1.2 getafm patch from Anthony Fok (Closes: Bug#35919) -- Rob Browning Thu, 29 Apr 1999 21:21:03 -0500 psutils (1.17-7) unstable; urgency=low * Added support for libpaper. (Closes: Bug#17049, Bug#23212, Bug#17039) -- Rob Browning Wed, 25 Nov 1998 21:31:55 -0600 psutils (1.17-6) frozen unstable; urgency=low * Fixed problem with cflags that kept default paper size from being set. -- Rob Browning Mon, 23 Nov 1998 17:36:15 -0600 psutils (1.17-5) unstable; urgency=low * Fix -m flag in epsffit argument parsing (Closes: Bug#25726). * Fix segmentation faults when r/w stdin/stdout (Closes: Bug#25725). -- Rob Browning Wed, 23 Sep 1998 00:18:15 -0500 psutils (1.17-4) unstable; urgency=low * fixed config problem that made all executable scripts unusable. (Closes Bug#16211, Bug#16624, Bug#16945, Bug#18825, Bug#19263, Bug#23428, Bug#23827) Sheesh. -- Rob Browning Wed, 1 Jul 1998 23:44:20 -0500 psutils (1.17-3) unstable; urgency=low * ****WARNING**** THIS VERSION COULD EAT YOUR DATA. Fixed command line parsing surprises with getopt(3) (closes Bug#5846) Use with caution. I tried to be careful, but you never know. * Some code cleanup. -- Rob Browning Fri, 27 Feb 1998 11:33:17 -0600 psutils (1.17-2) unstable; urgency=low * New maintainer * New command line parsing code. -- Rob Browning Fri, 27 Feb 1998 10:55:10 -0600 psutils (1.17-1) unstable; urgency=low * New maintainer * New upstream release -- Paul Seelig Thu, 4 Dec 1997 10:08:07 +0100 psutils (1.16-4) unstable stable; urgency=low * Upgraded to Standards-Version: 2.1.0.0 * added -s to the install binary section of the make file. -- Dale Scheetz Mon, 14 Oct 1996 17:51:54 -0400 psutils 1.16 Debian 3 - dcs * Added patch for seek on pipes fix psutils 1.16 Debian 2 - dcs * Rebuilt to replace corrupted previous version psutils 1.16 Debian 1 - dcs * Upgraded to follow latest release from upstream psutils 1.13 Debian 5 - dcs * Rebuilt as ELF * New package maintainer: Dale Scheetz psutils 1.13 Debian 4 - iwj * Removed dependency on Perl (this is a base system package, so we don't need to list it). psutils 1.13 Debian 3 - iwj * Added Package_Revision field to `control' file. * Sundry improvements to debian.rules, and removal of `install'. * Added this Changelog. psutils 1.13 Debian 2 - iwj * Empty fixfmps file in binary .deb file fixed. psutils 1.13 Debian 1 - iwj Initial release. debian/watch0000644000000000000000000000020012016124735010210 0ustar version=3 opts="uversionmangle=s/^/1./ dversionmangle=s/\.dfsg$//" \ ftp://ftp.knackered.org/pub/psutils/psutils-p(\d+).tar.gz