~ubuntu-branches/ubuntu/oneiric/ghostscript/oneiric

« back to all changes in this revision

Viewing changes to lib/gsnup.ps

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2011-07-15 16:49:55 UTC
  • mfrom: (1.1.23 upstream)
  • Revision ID: james.westby@ubuntu.com-20110715164955-uga6qibao6kez05c
Tags: 9.04~dfsg~20110715-0ubuntu1
* New upstream release
   - GIT snapshot from Jult, 12 2011.
* debian/patches/020110406~a54df2d.patch,
  debian/patches/020110408~0791cc8.patch,
  debian/patches/020110408~507cbee.patch,
  debian/patches/020110411~4509a49.patch,
  debian/patches/020110412~78bb9a6.patch,
  debian/patches/020110418~a05ab8a.patch,
  debian/patches/020110420~20b6c78.patch,
  debian/patches/020110420~4ddefa2.patch: Removed upstream patches.
* debian/rules: Generate ABI version number (variable "abi") correctly,
  cutting off repackaging and pre-release parts.
* debian/rules: Added ./lcms2/ directory to DEB_UPSTREAM_REPACKAGE_EXCLUDES.
* debian/copyright: Added lcms2/* to the list of excluded files.
* debian/symbols.common: Updated for new upstream source. Applied patch
  which dpkg-gensymbols generated for debian/libgs9.symbols to this file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%!
2
2
%    Copyright (C) 1999 Aladdin Enterprises.  All rights reserved.
3
 
 
3
%
4
4
% This software is provided AS-IS with no warranty, either express or
5
5
% implied.
6
 
 
6
%
7
7
% This software is distributed under license and may not be copied,
8
8
% modified or distributed except as expressly authorized under the terms
9
9
% of the license contained in the file LICENSE in this distribution.
10
 
 
10
%
11
11
% For more information about licensing, please refer to
12
12
% http://www.ghostscript.com/licensing/. For information on
13
13
% commercial licensing, go to http://www.artifex.com/licensing/ or
14
14
% contact Artifex Software, Inc., 101 Lucas Valley Road #110,
15
15
% San Rafael, CA  94903, U.S.A., +1(415)492-9861.
16
16
 
17
 
% $Id: gsnup.ps 6300 2005-12-28 19:56:24Z giles $
 
17
% $Id$
18
18
% Prefix this to very well-behaved PostScript files for n-up printing.
19
19
 
20
20
/cdef { 1 index where { pop pop } { def } ifelse } def
59
59
    grestore
60
60
    2 copy exch .Nx div exch .Ny div
61
61
    .Pn dup .Nx mod exch .Nx idiv .Ny 1 sub exch sub
62
 
                % Stack: nmax pw ph pw/nx ph/ny ix iy
 
62
                % Stack: nmax pw ph pw/nx ph/ny ix iy
63
63
    exch 3 index mul exch 2 index mul
64
64
    translate
65
 
                % Stack: nmax pw ph pw/nx ph/ny
 
65
                % Stack: nmax pw ph pw/nx ph/ny
66
66
    4 -1 roll 4 index div 4 -1 roll 4 index div
67
 
                % Stack: nmax pw/nx ph/ny pw/nmax ph/nmax
 
67
                % Stack: nmax pw/nx ph/ny pw/nmax ph/nmax
68
68
    exch 4 -1 roll exch sub 2 div
69
69
    3 1 roll sub 2 div
70
70
    translate
71
 
                % Stack: nmax
 
71
                % Stack: nmax
72
72
    1 exch div dup scale
73
73
    .BP
74
74
  }
75
75
  /EndPage {
76
76
    dup 2 lt {
77
77
      .ELevel 0 vmstatus pop pop put
78
 
      .Ps 0 .Pn 1 add .Nx .Ny mul mod put    
 
78
      .Ps 0 .Pn 1 add .Nx .Ny mul mod put
79
79
      .Pn 0 eq {
80
80
        .EP
81
81
      } {