]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fixed the number-up option stuff.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 17 Nov 1999 18:27:13 +0000 (18:27 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 17 Nov 1999 18:27:13 +0000 (18:27 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@788 7a7537e8-13f0-0310-91df-b6672ffda945

filter/pstops.c

index ada4ee77f98aac0bed61a6ebd730e40d910300b9..54587320924933ceef7e8c5771a6f31aa7681ea7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: pstops.c,v 1.28 1999/11/03 19:29:29 mike Exp $"
+ * "$Id: pstops.c,v 1.29 1999/11/17 18:27:13 mike Exp $"
  *
  *   PostScript filter for the Common UNIX Printing System (CUPS).
  *
@@ -392,7 +392,12 @@ main(int  argc,                    /* I - Number of command-line arguments */
     }
 
     if (!sloworder)
-      end_nup((NumPages + NUp - 1) & (NUp - 1));
+    {
+      if (NumPages & (NUp - 1))
+        end_nup(NUp - 1);
+      else
+        end_nup(0);
+    }
 
     if (slowcollate || sloworder)
     {
@@ -422,6 +427,11 @@ main(int  argc,                    /* I - Number of command-line arguments */
            end_nup(number);
          }
 
+          if (NumPages & (NUp - 1))
+            end_nup(NUp - 1);
+          else
+            end_nup(0);
+
          Copies --;
        }
       }
@@ -448,6 +458,11 @@ main(int  argc,                    /* I - Number of command-line arguments */
            end_nup(NumPages - 1 - number);
          }
 
+          if (NumPages & (NUp - 1))
+            end_nup(NUp - 1);
+          else
+            end_nup(0);
+
          Copies --;
        }
        while (Copies > 0 || !slowcollate);
@@ -822,5 +837,5 @@ start_nup(int number)       /* I - Page number */
 
 
 /*
- * End of "$Id: pstops.c,v 1.28 1999/11/03 19:29:29 mike Exp $".
+ * End of "$Id: pstops.c,v 1.29 1999/11/17 18:27:13 mike Exp $".
  */