SOURCES: cups-svn5706.patch (NEW) - latest CUPS svn snapshot (quit...
charles
charles at pld-linux.org
Thu Jul 13 13:25:16 CEST 2006
Author: charles Date: Thu Jul 13 11:25:16 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- latest CUPS svn snapshot (quite a lot of bugfixes)
---- Files affected:
SOURCES:
cups-svn5706.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/cups-svn5706.patch
diff -u /dev/null SOURCES/cups-svn5706.patch:1.1
--- /dev/null Thu Jul 13 13:25:16 2006
+++ SOURCES/cups-svn5706.patch Thu Jul 13 13:25:11 2006
@@ -0,0 +1,10335 @@
+diff -durN release-1.2.1/backend/backend-private.h cups-1.2.x/backend/backend-private.h
+--- release-1.2.1/backend/backend-private.h 1970-01-01 01:00:00.000000000 +0100
++++ cups-1.2.x/backend/backend-private.h 2006-06-26 12:42:40.000000000 +0100
+@@ -0,0 +1,73 @@
++/*
++ * "$Id$"
++ *
++ * Backend support definitions for the Common UNIX Printing System (CUPS).
++ *
++ * Copyright 1997-2006 by Easy Software Products, all rights reserved.
++ *
++ * These coded instructions, statements, and computer programs are the
++ * property of Easy Software Products and are protected by Federal
++ * copyright law. Distribution and use rights are outlined in the file
++ * "LICENSE" which should have been included with this file. If this
++ * file is missing or damaged please contact Easy Software Products
++ * at:
++ *
++ * Attn: CUPS Licensing Information
++ * Easy Software Products
++ * 44141 Airport View Drive, Suite 204
++ * Hollywood, Maryland 20636 USA
++ *
++ * Voice: (301) 373-9600
++ * EMail: cups-info at cups.org
++ * WWW: http://www.cups.org
++ *
++ * This file is subject to the Apple OS-Developed Software exception.
++ */
++
++#ifndef _CUPS_BACKEND_PRIVATE_H_
++# define _CUPS_BACKEND_PRIVATE_H_
++
++
++/*
++ * Include necessary headers.
++ */
++
++# include <cups/backend.h>
++# include <cups/cups.h>
++# include <cups/debug.h>
++# include <stdlib.h>
++# include <errno.h>
++# include <cups/string.h>
++# include <signal.h>
++
++
++/*
++ * C++ magic...
++ */
++
++# ifdef _cplusplus
++extern "C" {
++# endif /* _cplusplus */
++
++
++/*
++ * Prototypes...
++ */
++
++extern int backendGetDeviceID(int fd, char *device_id, int device_id_size,
++ char *make_model, int make_model_size,
++ const char *scheme, char *uri, int uri_size);
++extern int backendGetMakeModel(const char *device_id, char *make_model,
++ int make_model_size);
++extern ssize_t backendRunLoop(int print_fd, int device_fd, int use_bc);
++
++
++# ifdef _cplusplus
++}
++# endif /* _cplusplus */
++#endif /* !_CUPS_BACKEND_PRIVATE_H_ */
++
++
++/*
++ * End of "$Id$".
++ */
+diff -durN release-1.2.1/backend/Dependencies cups-1.2.x/backend/Dependencies
+--- release-1.2.1/backend/Dependencies 2006-07-04 17:32:11.000000000 +0100
++++ cups-1.2.x/backend/Dependencies 2006-06-26 12:42:40.000000000 +0100
+@@ -9,26 +9,31 @@
+ lpd.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/cups.h
+ lpd.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+ lpd.o: ../cups/string.h
+-parallel.o: ../cups/backend.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+-parallel.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+-parallel.o: ../cups/language.h ../cups/string.h ../config.h ieee1284.c
+-parallel.o: ../cups/debug.h
++pap.o: ../cups/http.h ../cups/md5.h
++parallel.o: backend-private.h ../cups/backend.h ../cups/cups.h ../cups/ipp.h
++parallel.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
++parallel.o: ../cups/file.h ../cups/language.h ../cups/debug.h
++parallel.o: ../cups/string.h ../config.h
+ scsi.o: ../cups/backend.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+ scsi.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+ scsi.o: ../cups/language.h ../cups/string.h ../config.h
+-serial.o: ../cups/backend.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+-serial.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+-serial.o: ../cups/language.h ../cups/string.h ../config.h
+-snmp.o: ../cups/backend.h ../cups/http-private.h ../config.h ../cups/http.h
+-snmp.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/cups.h
+-snmp.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+-snmp.o: ../cups/string.h ../cups/array.h ../cups/file.h ieee1284.c
+-snmp.o: ../cups/debug.h
+-socket.o: ../cups/backend.h ../cups/http-private.h ../config.h ../cups/http.h
+-socket.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/cups.h
+-socket.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+-socket.o: ../cups/string.h
+-test1284.o: ../cups/string.h ../config.h ieee1284.c ../cups/debug.h
++serial.o: backend-private.h ../cups/backend.h ../cups/cups.h ../cups/ipp.h
++serial.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
++serial.o: ../cups/file.h ../cups/language.h ../cups/debug.h ../cups/string.h
++serial.o: ../config.h
++snmp.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/md5.h
++snmp.o: ../cups/ipp-private.h ../cups/ipp.h backend-private.h
++snmp.o: ../cups/backend.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
++snmp.o: ../cups/file.h ../cups/language.h ../cups/debug.h ../cups/string.h
++snmp.o: ../cups/array.h ../cups/file.h
++socket.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/md5.h
++socket.o: ../cups/ipp-private.h ../cups/ipp.h backend-private.h
++socket.o: ../cups/backend.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
++socket.o: ../cups/file.h ../cups/language.h ../cups/debug.h ../cups/string.h
++test1284.o: ../cups/string.h ../config.h ieee1284.c backend-private.h
++test1284.o: ../cups/backend.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
++test1284.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
++test1284.o: ../cups/language.h ../cups/debug.h
+ usb.o: ../cups/backend.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+ usb.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+ usb.o: ../cups/language.h ../cups/string.h ../config.h
+diff -durN release-1.2.1/backend/easysw-firewire-design.txt cups-1.2.x/backend/easysw-firewire-design.txt
+--- release-1.2.1/backend/easysw-firewire-design.txt 2006-07-04 17:32:11.000000000 +0100
++++ cups-1.2.x/backend/easysw-firewire-design.txt 1970-01-01 01:00:00.000000000 +0100
+@@ -1,71 +0,0 @@
+-Preliminary Design for CUPS Firewire Printer Backend - 03/19/2002
+------------------------------------------------------------------
+-
+-OVERVIEW
+-
+- Easy Software Products will develop an IEEE-1394, a.k.a.
+- Firewire, printing interface for its Common UNIX Printing
+- System ("CUPS") for initial use under the Linux operating
+- system. A follow-on implementation for MacOS X is
+- anticipated as well.
+-
+- The operating system interfaces for IEEE-1394 ports vary
+- widely; the CUPS printing interface will abstract the OS
+- layer to a simpler interface geared towards discovering,
+- opening, reading from, writing to, and closing IEEE-1394
+- printers.
+-
+- The initial development of the CUPS backend will be targeted
+- at the EPSON Stylus Pro 10000 large format printer, which
+- requires the bandwidth provided by Firewire in order to
+- print at full speed. This printer supports printing via
+- Serial Bus Protocol 2 (SBP-2) using the SCSI and PWG command
+- sets. The CUPS backend will implement the PWG command set on
+- LUN 0 only.
+-
+-
+-OS ABSTRACTION LAYER
+-
+- The OS abstraction layer will be a thin client library that
+- implements the following functions:
+-
+- ieee1394_list
+- ieee1394_open
+- ieee1394_close
+- ieee1394_read
+- ieee1394_write
+- ieee1394_error
+-
+- The "ieee1394_list" function will list all of the available
+- printer devices on the bus. The device information will
+- consist of the device URI (ieee1394:/something) used to
+- access the device and the make and model information, if
+- available, for the device ("EPSON Stylus Printer").
+-
+- The "ieee1394_open" and "ieee1394_close" functions will open
+- and close a connection to the printer, respectively.
+-
+- The "ieee1394_read" and "ieee1394_write" functions will read
+- and write data to and from the printer, respectively. The
+- read function will be non-blocking, returning data only if
+- there is data coming back from the printer.
+-
+- The "ieee1394_error" function will return a string
+- describing the last error or NULL if no error occurred.
+-
+- The library will be responsible for creating any background
+- threads that are needed to monitor the connection to the
+- printer.
+-
+-
+-CUPS BACKEND
+-
+- The CUPS backend will use the OS abstraction layer to list
+- and access the Firewire printers. The "main" function will
+- read and write printer data, while the "list_devices"
+- function will be called as necessary to identify the
+- available devices.
+-
+- The CUPS 1.1 backend will record any status information in
+- the error log file, while the 1.2 backend will supply it to
+- the printer driver process.
+diff -durN release-1.2.1/backend/easysw-firewire-linux.txt cups-1.2.x/backend/easysw-firewire-linux.txt
+--- release-1.2.1/backend/easysw-firewire-linux.txt 2006-07-04 17:32:11.000000000 +0100
++++ cups-1.2.x/backend/easysw-firewire-linux.txt 1970-01-01 01:00:00.000000000 +0100
+@@ -1,35 +0,0 @@
+-Easy Software Products
+-44141 Airport View Drive
+-Suite 204
+-Hollywood, Maryland 20636
+-+1.301.373.9600
+-March 8, 2002
+-
+-
+-Subject: EPSON Firewire Printer Driver for Linux
+-
+-Currently, no Firewire printer support exists for Linux. Since
+-the latest EPSON printer products depend on the Firewire
+-interface to print at full speed, a solution is needed to
+-support customers using Linux as their server platform.
+-
+-The Linux Firewire subsystem provides a user-mode driver
+-interface that allows driver programs to access Firewire
+-devices. Easy Software Products will utilize this interface to
+-develop a "backend" program for the Common UNIX Printing System
+-that will allow users to print to EPSON printers using the
+-Firewire interface.
+-
+-After examining the Linux interface, we estimate that it will
+-require approximately 30 hours of development time to write,
+-test, and document the Firewire backend, for a total cost of
+-$3,000. The new backend will become a standard part of the CUPS
+-software distribution and will be included with at least the
+-following Linux distributions:
+-
+- - Caldera Linux
+- - Mandrake Linux
+- - Red Hat Linux
+- - SuSE Linux
+-
+-ESP will provide EPSON with binaries for Red Hat Linux 7.2.
+diff -durN release-1.2.1/backend/ieee1284.c cups-1.2.x/backend/ieee1284.c
+--- release-1.2.1/backend/ieee1284.c 2006-07-04 17:32:11.000000000 +0100
++++ cups-1.2.x/backend/ieee1284.c 2006-06-26 12:42:40.000000000 +0100
+@@ -1,5 +1,5 @@
+ /*
+- * "$Id$"
++ * "$Id$"
+ *
+ * IEEE-1284 support functions for the Common UNIX Printing System (CUPS).
+ *
+@@ -25,51 +25,41 @@
+ *
+ * Contents:
+ *
+- * get_device_id() - Get the IEEE-1284 device ID string and corresponding
+- * URI.
+- * get_make_model() - Get the make and model string from the device ID.
++ * backendGetDeviceID() - Get the IEEE-1284 device ID string and
++ * corresponding URI.
++ * backendGetMakeModel() - Get the make and model string from the device ID.
+ */
+
+ /*
+ * Include necessary headers.
+ */
+
+-#include <cups/debug.h>
+-
++#include "backend-private.h"
+
+-/*
+- * Prototypes...
+- */
++#ifdef __linux
++# include <sys/ioctl.h>
++# include <linux/lp.h>
++# define IOCNR_GET_DEVICE_ID 1
++# define LPIOC_GET_DEVICE_ID(len) _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len)
++#endif /* __linux */
+
+-static int get_make_model(const char *device_id, char *make_model,
+- int make_model_size);
++#ifdef __sun
++# ifdef __sparc
++# include <sys/ecppio.h>
++# else
++# include <sys/ioccom.h>
++# include <sys/ecppsys.h>
++# endif /* __sparc */
++#endif /* __sun */
+
+
+ /*
+- * 'get_device_id()' - Get the IEEE-1284 device ID string and
+- * corresponding URI.
++ * 'backendGetDeviceID()' - Get the IEEE-1284 device ID string and
++ * corresponding URI.
+ */
+
+-#ifndef SNMP_BACKEND
+-# ifdef __linux
+-# include <sys/ioctl.h>
+-# include <linux/lp.h>
+-# define IOCNR_GET_DEVICE_ID 1
+-# define LPIOC_GET_DEVICE_ID(len) _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len)
+-# endif /* __linux */
+-
+-# ifdef __sun
+-# ifdef __sparc
+-# include <sys/ecppio.h>
+-# else
+-# include <sys/ioccom.h>
+-# include <sys/ecppsys.h>
+-# endif /* __sparc */
+-# endif /* __sun */
+-
+-
+ int /* O - 0 on success, -1 on failure */
+-get_device_id(
++backendGetDeviceID(
+ int fd, /* I - File descriptor */
+ char *device_id, /* O - 1284 device ID */
+ int device_id_size, /* I - Size of buffer */
+@@ -93,7 +83,7 @@
+ #endif /* __sun && ECPPIOC_GETDEVID */
+
+
+- DEBUG_printf(("get_device_id(fd=%d, device_id=%p, device_id_size=%d, "
++ DEBUG_printf(("backendGetDeviceID(fd=%d, device_id=%p, device_id_size=%d, "
+ "make_model=%p, make_model_size=%d, scheme=\"%s\", "
+ "uri=%p, uri_size=%d)\n", fd, device_id, device_id_size,
+ make_model, make_model_size, scheme ? scheme : "(null)",
+@@ -107,7 +97,7 @@
+ !device_id || device_id_size < 32 ||
+ !make_model || make_model_size < 32)
+ {
+- DEBUG_puts("get_device_id: Bad args!");
++ DEBUG_puts("backendGetDeviceID: Bad args!");
+ return (-1);
+ }
+
+@@ -155,7 +145,7 @@
+ }
+ # ifdef DEBUG
+ else
+- printf("get_device_id: ioctl failed - %s\n", strerror(errno));
++ printf("backendGetDeviceID: ioctl failed - %s\n", strerror(errno));
+ # endif /* DEBUG */
+ #endif /* __linux */
+
+@@ -178,11 +168,11 @@
+ }
+ # ifdef DEBUG
+ else
+- printf("get_device_id: ioctl failed - %s\n", strerror(errno));
++ printf("backendGetDeviceID: ioctl failed - %s\n", strerror(errno));
+ # endif /* DEBUG */
+ #endif /* __sun && ECPPIOC_GETDEVID */
+
+- DEBUG_printf(("get_device_id: device_id=\"%s\"\n", device_id));
++ DEBUG_printf(("backendGetDeviceID: device_id=\"%s\"\n", device_id));
+
+ if (!*device_id)
+ return (-1);
+@@ -191,7 +181,7 @@
+ * Get the make and model...
+ */
+
+- get_make_model(device_id, make_model, make_model_size);
++ backendGetMakeModel(device_id, make_model, make_model_size);
+
+ /*
+ * Then generate a device URI...
+@@ -303,15 +293,14 @@
+
+ return (0);
+ }
+-#endif /* !SNMP_BACKEND */
+
+
+ /*
+- * 'get_make_model()' - Get the make and model string from the device ID.
++ * 'backendGetMakeModel()' - Get the make and model string from the device ID.
+ */
+
+ int /* O - 0 on success, -1 on failure */
+-get_make_model(
++backendGetMakeModel(
+ const char *device_id, /* O - 1284 device ID */
+ char *make_model, /* O - Make/model */
+ int make_model_size) /* I - Size of buffer */
+@@ -322,7 +311,7 @@
+ *mdl; /* Model string */
+
+
+- DEBUG_printf(("get_make_model(device_id=\"%s\", "
++ DEBUG_printf(("backendGetMakeModel(device_id=\"%s\", "
+ "make_model=%p, make_model_size=%d)\n", device_id,
+ make_model, make_model_size));
+
+@@ -332,7 +321,7 @@
+
+ if (!device_id || !*device_id || !make_model || make_model_size < 32)
+ {
+- DEBUG_puts("get_make_model: Bad args!");
++ DEBUG_puts("backendGetMakeModel: Bad args!");
+ return (-1);
+ }
+
+@@ -506,5 +495,5 @@
+
+
+ /*
+- * End of "$Id$".
++ * End of "$Id$".
+ */
+diff -durN release-1.2.1/backend/ieee1394.c cups-1.2.x/backend/ieee1394.c
+--- release-1.2.1/backend/ieee1394.c 2006-07-04 17:32:11.000000000 +0100
++++ cups-1.2.x/backend/ieee1394.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,267 +0,0 @@
+-/*
+- * "$Id$"
+- *
+- * IEEE-1394 backend for the Common UNIX Printing System (CUPS).
+- *
+- * Copyright 2002 by Easy Software Products, all rights reserved.
+- *
+- * Redistribution and use in source and binary forms, with or
+- * without modification, are permitted provided that the
+- * following conditions are met:
+- *
+- * 1. Redistributions of source code must retain the above
+- * copyright notice, this list of conditions and the
+- * following disclaimer.
+- *
+- * 2. Redistributions in binary form must reproduce the
+- * above copyright notice, this list of conditions and
+- * the following disclaimer in the documentation and/or
+- * other materials provided with the distribution.
+- *
+- * 3. All advertising materials mentioning features or use
+- * of this software must display the following
+- * acknowledgement:
+- *
+- * This product includes software developed by Easy
+- * Software Products.
+- *
+- * 4. The name of Easy Software Products may not be used to
+- * endorse or promote products derived from this software
+- * without specific prior written permission.
+- *
+- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS
+- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
+- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+- * DAMAGE.
+- *
+- * Contents:
+- *
+- * main() - Send a file to the printer.
+- * list_devices() - List all known printer devices...
+- */
+-
+-/*
+- * Include necessary headers.
+- */
+-
+-#include "ieee1394.h"
+-
+-
+-/*
+- * Local functions...
+- */
+-
+-void list_devices(void);
+-
+-
+-/*
+- * 'main()' - Send a file to the printer.
+- *
+- * Usage:
+- *
+- * printer-uri job-id user title copies options [file]
+- */
+-
+-int /* O - Exit status */
+-main(int argc, /* I - Number of command-line arguments (6 or 7) */
+- char *argv[]) /* I - Command-line arguments */
+-{
+- ieee1394_dev_t dev; /* Printer device */
+- int fp; /* Print file */
+- int copies; /* Number of copies to print */
+- int rbytes; /* Number of bytes read from device */
+- size_t nbytes, /* Number of bytes read from file */
+- tbytes; /* Total number of bytes written */
+- char buffer[8192]; /* Input/output buffer */
+-#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
+- struct sigaction action; /* Actions for POSIX signals */
+-#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
+-
+-
+- /*
+- * Make sure status messages are not buffered...
+- */
+-
+- setbuf(stderr, NULL);
+-
+- /*
+- * Check command-line...
+- */
+-
+- if (argc == 1)
+- {
+- list_devices();
+-
+- return (0);
+- }
+- else if (argc < 6 || argc > 7)
+- {
+- fprintf(stderr, "Usage: %s job-id user title copies options [file]\n",
+- argv[0]);
+- return (1);
+- }
+-
+- /*
+- * If we have 7 arguments, print the file named on the command-line.
+- * Otherwise, send stdin instead...
+- */
+-
+- if (argc == 6)
+- {
+- fp = 0;
+- copies = 1;
+- }
+- else
+- {
+- /*
+- * Try to open the print file...
+- */
+-
+- if ((fp = open(argv[6], O_RDONLY)) < 0)
+- {
+- perror("ERROR: unable to open print file");
+- return (1);
+- }
+-
+- copies = atoi(argv[4]);
+- }
+-
+- /*
+- * Try to open the printer device...
+- */
+-
+- fputs("STATE: +connecting-to-device\n", stderr);
+-
+- do
+- {
+- if ((dev = ieee1394_open(argv[0])) == NULL)
+- {
+- fputs("INFO: Firewire printer busy; will retry in 30 seconds...\n", stderr);
+- sleep(30);
+- }
+- }
+- while (dev == NULL);
+-
+- fputs("STATE: -connecting-to-device\n", stderr);
+-
+- /*
+- * Now that we are "connected" to the port, ignore SIGTERM so that we
+- * can finish out any page data the driver sends (e.g. to eject the
+- * current page... Only ignore SIGTERM if we are printing data from
+- * stdin (otherwise you can't cancel raw jobs...)
+- */
+-
+- if (argc < 7)
+- {
+-#ifdef HAVE_SIGSET /* Use System V signals over POSIX to avoid bugs */
+- sigset(SIGTERM, SIG_IGN);
+-#elif defined(HAVE_SIGACTION)
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list