Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| cdad2a2a32 |
@@ -3,40 +3,6 @@ CHANGES-1.3.txt
|
||||
|
||||
CHANGES IN CUPS V1.3.10
|
||||
|
||||
- Documentation fixes (STR #2994, STR #2995, STR #3008)
|
||||
- The wrong italic fonts were listed in the UTF-8 charset file
|
||||
for the text filter.
|
||||
- The backends did not return an OK status for the
|
||||
CUPS_SC_CMD_GET_BIDI side-channel command (STR #3029)
|
||||
- The scheduler did not purge jobs that were missing a
|
||||
time-at-creation attribute, indicating a bad job control file
|
||||
(STR #3030)
|
||||
- The "-o job-hold-until=week-end" option did not work properly
|
||||
(STR #3025)
|
||||
- The Solaris USB printer device does not support select or poll
|
||||
(STR #3028)
|
||||
- The scheduler would crash if you exceeded the MaxSubscriptions
|
||||
limit.
|
||||
- The lp "-H immediate" option did not specify that the job
|
||||
should not be held (STR #3013)
|
||||
- The scheduler did not support the "Connection: close"
|
||||
HTTP header (STR #3010)
|
||||
- The mailto notifier didn't terminate messages properly
|
||||
(STR #3011)
|
||||
- Backends could spin trying to read back-channel data
|
||||
(STR #3001)
|
||||
- The HP-GL/2 filter was using the wrong default colors
|
||||
(STR #2966)
|
||||
- The scheduler incorrectly allowed Get-Jobs operations without a
|
||||
printer-uri (STR #2996)
|
||||
- The compression option was not being encoded properly
|
||||
(STR #2997)
|
||||
- Added a missing character map for JIS-X0213/ShiftJIS.
|
||||
- The scheduler now rejects ATTR: messages with empty values.
|
||||
- The scheduler could consume all CPU handling closed connections
|
||||
(STR #2988)
|
||||
- The scheduler now protects against DNS rebinding attacks on
|
||||
localhost.
|
||||
- SECURITY: The PNG image reading code did not validate the
|
||||
image size properly, leading to a potential buffer overflow
|
||||
(STR #2974)
|
||||
|
||||
+2
-51
@@ -1,56 +1,6 @@
|
||||
CHANGES.txt - 2008-12-15
|
||||
CHANGES.txt - 2008-10-10
|
||||
------------------------
|
||||
|
||||
CHANGES IN CUPS V1.4b2
|
||||
|
||||
- Documentation updates (STR #2983, STR #2998, STR #3021)
|
||||
- The cupstestppd utility now validates the FileVersion and
|
||||
FormatVersion values in PPD files.
|
||||
- The default cupsd.conf file did not reflect the
|
||||
--with-local-protocols value set at compile-time (STR #3037)
|
||||
- The cupsGetPPD* APIs now create symlinks to local PPD files
|
||||
rather than copying them whenever possible.
|
||||
- Various performance optimizations in the string pool, dests, and
|
||||
options implementations.
|
||||
- The cupsGetDests* APIs now return the marker and printer-commands
|
||||
attributes.
|
||||
- Side-channel SNMP lookups would not work when cupsSNMPSupplies
|
||||
was set to False in the PPD file.
|
||||
- Localized the device descriptions for the SCSI, serial,
|
||||
and network backends (STR #3014)
|
||||
- Added a Spanish localization (STR #3015)
|
||||
- Added support for marker-low-levels and marker-high-levels
|
||||
attributes.
|
||||
- The scheduler could hang writing a long log line.
|
||||
- The cupsGetDevices() function now has an "include_schemes"
|
||||
parameter.
|
||||
- The lpinfo command now supports --include-schemes and
|
||||
--exclude-schemes options.
|
||||
- The CUPS-Get-PPDs operation now supports the include-schemes
|
||||
and exclude-schemes attributes.
|
||||
- The CUPS-Get-Devices operation now supports the include-schemes
|
||||
attribute.
|
||||
- The print filters now support a replacement for the fitplot
|
||||
option called "fit-to-page".
|
||||
- The LPD backend no longer tries to collect page accounting
|
||||
information since the LPD protocol does not allow us to
|
||||
prevent race conditions.
|
||||
- The scheduler did not save the last marker-change-time value.
|
||||
- Fixed a problem with printing to some IPP printers, including
|
||||
CUPS 1.1.x.
|
||||
- Fixed a redirection problem with the printer web page (STR #3012)
|
||||
- Fixed a PPD compiler problem with the loading of message
|
||||
catalogs (STR #2990)
|
||||
- Fixed a PPD compiler problem with the loading of .strings files
|
||||
(STR #2989)
|
||||
- The cupsfilter utility did not set the CONTENT_TYPE environment
|
||||
variable when running filters.
|
||||
- The scheduler now waits to allow system sleep until the jobs
|
||||
have all stopped.
|
||||
- The IPP, LPD, and socket backends used different "connecting"
|
||||
progress messages.
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.4b1
|
||||
|
||||
- Documentation updates (STR #2567)
|
||||
@@ -275,3 +225,4 @@ CHANGES IN CUPS V1.4b1
|
||||
- Added new cupsGetPPD3() API to allow applications to
|
||||
cache PPDs safely (STR #1473)
|
||||
- Added generic PostScript and PCL printer driver PPDs.
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
CREDITS.txt - 2008-12-08
|
||||
CREDITS.txt - 2008-06-16
|
||||
------------------------
|
||||
|
||||
Few projects are completed by one person, and CUPS is no exception. We'd
|
||||
@@ -34,7 +34,7 @@ like to thank the following individuals for their contributions:
|
||||
Kurt Pfeifle - Bug fixes, beta testing, evangelism.
|
||||
Vincenzo Reale - Italian localization.
|
||||
Petter Reinholdtsen - HP-UX compiler stuff.
|
||||
Juan Pablo Gonz‡lez Riopedre - Spanish localization.
|
||||
Juan Pablo González Riopedre - Spanish localization.
|
||||
Opher Shachar - Hebrew localization.
|
||||
Stuart Stevens - HP JetDirect IPP information.
|
||||
Andrea Suatoni - IRIX desktop integration and testing.
|
||||
|
||||
+79
-85
@@ -1,9 +1,10 @@
|
||||
INSTALL - CUPS v1.4b2 - 2008-12-15
|
||||
INSTALL - CUPS v1.4b1 - 2008-10-10
|
||||
----------------------------------
|
||||
|
||||
This file describes how to compile and install CUPS from source code. For more
|
||||
information on CUPS see the file called "README.txt". A complete change log can
|
||||
be found in "CHANGES.txt".
|
||||
This file describes how to compile and install CUPS from source
|
||||
code. For more information on CUPS see the file called
|
||||
"README.txt". A complete change log can be found in
|
||||
"CHANGES.txt".
|
||||
|
||||
**** IF YOU HAVE A NON-POSTSCRIPT PRINTER AND ARE NOT ****
|
||||
**** RUNNING MAC OS X, YOU WILL ALSO NEED TO INSTALL GPL ****
|
||||
@@ -13,61 +14,71 @@ be found in "CHANGES.txt".
|
||||
|
||||
BEFORE YOU BEGIN
|
||||
|
||||
You'll need ANSI-compliant C and C++ compilers, plus a make program and
|
||||
POSIX-compliant shell (/bin/sh). The GNU compiler tools and Bash work well
|
||||
and we have tested the current CUPS code against several versions of GCC
|
||||
with excellent results.
|
||||
You'll need ANSI-compliant C and C++ compilers, plus a make
|
||||
program and Bourne shell. The GNU compiler tools work well -
|
||||
we've tested the current CUPS code against several versions
|
||||
of GCC with excellent results.
|
||||
|
||||
The makefiles used by the project should work with most versions of make.
|
||||
We've tested them with GNU make as well as the make programs shipped by
|
||||
Compaq, HP, SGI, and Sun. BSD users should use GNU make (gmake) since BSD
|
||||
make does not support "include".
|
||||
The makefiles used by the project should work with most
|
||||
versions of make. We've tested them with GNU make as well as
|
||||
the make programs shipped by Compaq, HP, SGI, and Sun.
|
||||
BSD users should use GNU make (gmake) since BSD make does
|
||||
not support "include".
|
||||
|
||||
Besides these tools you'll want the JPEG, PNG, TIFF, and ZLIB libraries for
|
||||
image support, the CDSA, GNU TLS, or OpenSSL libraries for encryption
|
||||
support, the OpenLDAP and OpenSLP libraries for directory services support,
|
||||
and either MIT (1.6.3 or higher) or Heimdal Kerberos for Kerberos support.
|
||||
CUPS will compile and run without these, however you'll miss out on many of
|
||||
the features provided by CUPS.
|
||||
Besides these tools you'll want the JPEG, PNG, TIFF, and ZLIB
|
||||
libraries for image support, the CDSA, GNU TLS, or OpenSSL
|
||||
libraries for encryption support, and the OpenLDAP and
|
||||
OpenSLP libraries for directory services support. CUPS will
|
||||
compile and run without these, however you'll miss out on
|
||||
many of the features provided by CUPS.
|
||||
|
||||
Also, please note that CUPS does not include the Ghostscript-based
|
||||
PostScript filter needed by non-PostScript printers. You *must* download
|
||||
GPL Ghostscript separately from the CUPS web site if you want to print
|
||||
PostScript files to non-PostScript printers on operating systems other than
|
||||
Mac OS X.
|
||||
Kerberos support requires MIT Kerberos 1.6.3 or later or
|
||||
Heimdal Kerberos, along with the corresponding GSSAPI
|
||||
pieces.
|
||||
|
||||
Also, please note that CUPS no longer includes the
|
||||
Ghostscript- based pstoraster filter. You *must* download
|
||||
GPL Ghostscript separately from the CUPS web site if you want
|
||||
to print PostScript files to non-PostScript printers on
|
||||
operating systems other than Mac OS X.
|
||||
|
||||
|
||||
COMPILING THE SUBVERSION REPOSITORY CODE
|
||||
COMPILING FROM SUBVERSION
|
||||
|
||||
The CUPS Subversion repository doesn't hold a copy of the pre-built
|
||||
configure script. You'll need to run the GNU autoconf software (2.60 or
|
||||
higher) to create it:
|
||||
The CUPS Subversion repository doesn't hold a copy of the
|
||||
pre-built configure script. You'll need to run the GNU
|
||||
autoconf software (2.60 or higher) before compiling the
|
||||
software from Subversion:
|
||||
|
||||
autoconf -f
|
||||
|
||||
|
||||
CONFIGURATION
|
||||
|
||||
CUPS uses GNU autoconf, so you should find the usual "configure" script in
|
||||
the main CUPS source directory. To configure CUPS for your system, type:
|
||||
CUPS uses GNU autoconf, so you should find the usual
|
||||
"configure" script in the main CUPS source directory. To
|
||||
configure CUPS for your system, type:
|
||||
|
||||
./configure
|
||||
|
||||
The default installation will put the CUPS software in the "/etc", "/usr",
|
||||
and "/var" directories on your system, which will overwrite any existing
|
||||
printing commands on your system. Use the "--prefix" option to install the
|
||||
CUPS software in another location:
|
||||
The default installation will put the CUPS software in the
|
||||
"/etc", "/usr", and "/var" directories on your system, which
|
||||
will overwrite any existing printing commands on your system.
|
||||
Use the "--prefix" option to install the CUPS software in
|
||||
another location:
|
||||
|
||||
./configure --prefix=/some/directory
|
||||
|
||||
To see a complete list of configuration options, use the --help option:
|
||||
To see a complete list of configuration options, use the
|
||||
--help option:
|
||||
|
||||
./configure --help
|
||||
|
||||
If any of the dependent libraries are not installed in a system default
|
||||
location (typically "/usr/include" and "/usr/lib") you'll need to set the
|
||||
CFLAGS, CPPFLAGS, CXXFLAGS, DSOFLAGS, and LDFLAGS environment variables
|
||||
prior to running configure:
|
||||
If any of the dependent libraries are not installed in a
|
||||
system default location (typically "/usr/include" and
|
||||
"/usr/lib") you'll need to set the CFLAGS, CPPFLAGS,
|
||||
CXXFLAGS, DSOFLAGS, and LDFLAGS environment variables prior
|
||||
to running configure:
|
||||
|
||||
setenv CFLAGS "-I/some/directory"
|
||||
setenv CPPFLAGS "-I/some/directory"
|
||||
@@ -85,14 +96,9 @@ CONFIGURATION
|
||||
LDFLAGS="-L/some/directory" \
|
||||
./configure ...
|
||||
|
||||
The "--enable-debug" option compiles CUPS with debugging information
|
||||
enabled. Additional debug logging support can be enabled using the
|
||||
"--enable-debug-printfs" option - these debug messages are enabled using the
|
||||
CUPS_DEBUG_LOG environment variable at run-time.
|
||||
|
||||
CUPS also includes an extensive set of unit tests that can be used to find
|
||||
and diagnose a variety of common problems - use the "--enable-unit-tests"
|
||||
configure option to run them at build time.
|
||||
The "--enable-debug" option compiles CUPS with debugging enabled,
|
||||
as well as support for debug logging via the CUPS_DEBUG_LOG
|
||||
environment variable at run-time.
|
||||
|
||||
Once you have configured things, just type:
|
||||
|
||||
@@ -105,26 +111,11 @@ CONFIGURATION
|
||||
to build the software.
|
||||
|
||||
|
||||
TESTING THE SOFTWARE
|
||||
|
||||
Aside from the built-in unit tests, CUPS includes an automated test
|
||||
framework for testing the entire printing system. To run the tests, just
|
||||
type:
|
||||
|
||||
make check ENTER
|
||||
|
||||
or if you have FreeBSD, NetBSD, or OpenBSD type:
|
||||
|
||||
gmake check ENTER
|
||||
|
||||
The test framework runs a copy of the CUPS scheduler (cupsd) on port 8631
|
||||
in /tmp/cups-$USER and produces a nice HTML report of the results.
|
||||
|
||||
|
||||
INSTALLING THE SOFTWARE
|
||||
|
||||
Once you have built the software you need to install it. The "install"
|
||||
target provides a quick way to install the software on your local system:
|
||||
Once you have built the software you need to install it. The
|
||||
"install" target provides a quick way to install the software
|
||||
on your local system:
|
||||
|
||||
make install ENTER
|
||||
|
||||
@@ -132,10 +123,12 @@ INSTALLING THE SOFTWARE
|
||||
|
||||
gmake install ENTER
|
||||
|
||||
You can also build binary packages that can be installed on other machines
|
||||
using the RPM spec file ("packaging/cups.spec") or EPM list file
|
||||
("packaging/cups.list"). The latter also supports building of binary RPMs,
|
||||
so it may be more convenient to use.
|
||||
You can also build binary packages that can be installed on
|
||||
other machines using the RPM spec file
|
||||
("packaging/cups.spec") or EPM list file
|
||||
("packaging/cups.list"). The latter also supports building
|
||||
of binary RPMs, so it may be more convenient to use - we use
|
||||
EPM to build all of our binary distributions.
|
||||
|
||||
You can find the RPM software at:
|
||||
|
||||
@@ -143,7 +136,7 @@ INSTALLING THE SOFTWARE
|
||||
|
||||
The EPM software is available at:
|
||||
|
||||
http://www.epmhome.org/
|
||||
http://www.easysw.com/epm/
|
||||
|
||||
|
||||
CREATING BINARY DISTRIBUTIONS WITH EPM
|
||||
@@ -157,8 +150,8 @@ CREATING BINARY DISTRIBUTIONS WITH EPM
|
||||
|
||||
gmake <format> ENTER
|
||||
|
||||
for FreeBSD, NetBSD, and OpenBSD. The <format> target is one of the
|
||||
following:
|
||||
for FreeBSD, NetBSD, and OpenBSD. The <format> target is one of
|
||||
the following:
|
||||
|
||||
epm - Builds a script + tarfile package
|
||||
aix - Builds an AIX package
|
||||
@@ -177,25 +170,26 @@ CREATING BINARY DISTRIBUTIONS WITH EPM
|
||||
|
||||
GETTING DEBUG LOGGING FROM CUPS
|
||||
|
||||
When configured with the "--enable-debug-printfs" option, CUPS compiles in
|
||||
additional debug logging support in the scheduler, CUPS API, and CUPS
|
||||
Imaging API. Set the CUPS_DEBUG_LOG environment variable to a filename to
|
||||
append logging information at run-time. Use the name "-" to send the
|
||||
messages to stderr.
|
||||
When configured with the "--enable-debug" option, CUPS compiles
|
||||
in additional debug logging support in the scheduler, CUPS API,
|
||||
and CUPS Imaging API. Set the CUPS_DEBUG_LOG environment
|
||||
variable to a filename to append logging information at run-time.
|
||||
Use the name "-" to send the messages to stderr.
|
||||
|
||||
|
||||
REPORTING PROBLEMS
|
||||
|
||||
If you have problems, READ THE DOCUMENTATION FIRST! If the documentation
|
||||
does not solve your problems, please post a message on the "cups.general"
|
||||
forum at:
|
||||
If you have problems, READ THE DOCUMENTATION FIRST! If the
|
||||
documentation does not solve your problems, please post a
|
||||
message on the "cups.general" forum at:
|
||||
|
||||
http://www.cups.org/newsgroups.php
|
||||
|
||||
Include your operating system and version, compiler and version, and any
|
||||
errors or problems you've run into. The "config.log" file and the output
|
||||
from the configure script and make should also be sent, as it often helps to
|
||||
determine the cause of your problem.
|
||||
Include your operating system and version, compiler and
|
||||
version, and any errors or problems you've run into. The
|
||||
"config.log" file and the output from the configure script
|
||||
and make should also be sent, as it often helps to determine
|
||||
the cause of your problem.
|
||||
|
||||
If you are running a version of Linux, be sure to provide the Linux
|
||||
distribution you have, too.
|
||||
If you are running a version of Linux, be sure to provide the
|
||||
Linux distribution you have, too.
|
||||
|
||||
@@ -122,7 +122,6 @@ ALL_CXXFLAGS = -I.. -D_CUPS_SOURCE $(CXXFLAGS) $(SSLFLAGS) \
|
||||
ARCHFLAGS = @ARCHFLAGS@
|
||||
ARFLAGS = @ARFLAGS@
|
||||
BACKLIBS = @BACKLIBS@
|
||||
BANNERTOPS = @BANNERTOPS@
|
||||
CFLAGS = @CPPFLAGS@ @CFLAGS@
|
||||
COMMONLIBS = @LIBS@
|
||||
CUPSDLIBS = @CUPSDLIBS@
|
||||
@@ -156,7 +155,6 @@ PHPDIR = @PHPDIR@
|
||||
PHPOPTIONS = @PHPOPTIONS@ -I../.. `$(PHPCONFIG) --includes`
|
||||
SSLFLAGS = @SSLFLAGS@
|
||||
SSLLIBS = @SSLLIBS@
|
||||
TEXTTOPS = @TEXTTOPS@
|
||||
UNITTESTS = @UNITTESTS@
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ depend:
|
||||
.PHONY: clang
|
||||
clang:
|
||||
$(RM) -r clang
|
||||
scan-build -V -k -o `pwd`/clang $(MAKE) $(MFLAGS) \
|
||||
scan-build -k -o `pwd`/clang $(MAKE) $(MFLAGS) \
|
||||
CC=ccc-analyzer CXX=ccc-analyzer clean all
|
||||
|
||||
|
||||
|
||||
+77
-68
@@ -1,4 +1,4 @@
|
||||
README - CUPS v1.4b2 - 2008-12-15
|
||||
README - CUPS v1.4b1 - 2008-10-10
|
||||
---------------------------------
|
||||
|
||||
**********************************************************************
|
||||
@@ -20,75 +20,84 @@ instead...
|
||||
|
||||
INTRODUCTION
|
||||
|
||||
The Common UNIX Printing System ("CUPS") is a standards-based, open source
|
||||
printing system developed by Apple Inc. for Mac OS® X and other UNIX®-like
|
||||
operating systems. CUPS uses the Internet Printing Protocol ("IPP") and
|
||||
provides System V and Berkeley command-line interfaces, a web interface,
|
||||
and a C API to manage printers and print jobs. It supports printing to
|
||||
both local (parallel, serial, USB) and networked printers, and printers can
|
||||
be shared from one computer to another, even over the Internet!
|
||||
CUPS provides a portable printing layer for UNIX(r)-based
|
||||
operating systems. It was developed by Easy Software Products
|
||||
and is now owned and maintained by Apple Inc. to promote a
|
||||
standard printing solution for all UNIX vendors and users. CUPS
|
||||
provides the System V and Berkeley command-line interfaces.
|
||||
|
||||
Internally, CUPS uses PostScript Printer Description ("PPD") files to
|
||||
describe printer capabilities and features and a wide variety of generic
|
||||
and device-specific programs to convert and print many types of files.
|
||||
Sample drivers are included with CUPS to support many Dymo, EPSON, HP,
|
||||
Intellitech, OKIDATA, and Zebra printers. Many more drivers are available
|
||||
online and (in some cases) on the driver CD-ROM that came with your printer.
|
||||
CUPS uses the Internet Printing Protocol ("IPP") as the basis
|
||||
for managing print jobs and queues. The Line Printer Daemon
|
||||
("LPD") Server Message Block ("SMB"), and AppSocket (a.k.a.
|
||||
JetDirect) protocols are also supported with reduced
|
||||
functionality. CUPS adds network printer browsing and
|
||||
PostScript Printer Description ("PPD") based printing options
|
||||
to support real-world printing under UNIX.
|
||||
|
||||
CUPS is licensed under the GNU General Public License and GNU Library
|
||||
General Public License versions 2. See the file "LICENSE.txt" for more
|
||||
information.
|
||||
CUPS includes an image file RIP that supports printing of
|
||||
image files to non-PostScript printers. GPL Ghostscript now
|
||||
includes the "cups" driver to support printing of PostScript
|
||||
files within the CUPS driver framework. Sample drivers for
|
||||
Dymo, EPSON, HP, OKIDATA, and Zebra printers are included that
|
||||
use these filters.
|
||||
|
||||
CUPS is licensed under the GNU General Public License and GNU
|
||||
Library General Public License versions 2.
|
||||
|
||||
|
||||
READING THE DOCUMENTATION
|
||||
|
||||
Once you have installed the software you can access the documentation (and
|
||||
a bunch of other stuff) online at:
|
||||
Once you have installed the software you can access the
|
||||
documentation (and a bunch of other stuff) on-line at:
|
||||
|
||||
http://localhost:631/
|
||||
|
||||
If you're having trouble getting that far, the documentation is located
|
||||
under the "doc/help" directory.
|
||||
If you're having trouble getting that far, the documentation
|
||||
is located under the "doc/help" directory.
|
||||
|
||||
Please read the documentation before asking questions.
|
||||
|
||||
|
||||
GETTING SUPPORT AND OTHER RESOURCES
|
||||
|
||||
If you have problems, READ THE DOCUMENTATION FIRST! We also provide many
|
||||
discussion forums which are available at:
|
||||
If you have problems, READ THE DOCUMENTATION FIRST! We also
|
||||
provide many discussion forums which are available at:
|
||||
|
||||
http://www.cups.org/newsgroups.php
|
||||
|
||||
See the CUPS web site at "http://www.cups.org/" for other resources.
|
||||
See the CUPS web site at "http://www.cups.org/" for other
|
||||
site links.
|
||||
|
||||
|
||||
SETTING UP PRINTER QUEUES USING YOUR WEB BROWSER
|
||||
|
||||
CUPS includes a web-based administration tool that allows you to manage
|
||||
printers, classes, and jobs on your server. Open the following URL in your
|
||||
browser to access the printer administration tools:
|
||||
CUPS 1.3 includes a web-based administration tool that allows
|
||||
you to manage printers, classes, and jobs on your server.
|
||||
Open the following URL in your browser to access the printer
|
||||
administration tools:
|
||||
|
||||
http://localhost:631/admin/
|
||||
|
||||
DO NOT use the hostname for your machine - it will not work with the default
|
||||
CUPS configuration. To enable administration access on other addresses,
|
||||
check the "Allow Remote Administration" box and click on the "Change
|
||||
Settings" button.
|
||||
DO NOT use the hostname for your machine - it will not work
|
||||
with the default CUPS configuration. To enable
|
||||
administration access on other addresses, check the "Allow
|
||||
Remote Administration" box and click on the "Change Settings"
|
||||
button.
|
||||
|
||||
You will be asked for the administration password (root or any other user in
|
||||
the sys/system/root/admin/lpadmin group on your system) when performing any
|
||||
administrative function.
|
||||
You will be asked for the administration password (root or
|
||||
any other user in the sys/system/root group on your system)
|
||||
when performing any administrative function.
|
||||
|
||||
|
||||
SETTING UP PRINTER QUEUES FROM THE COMMAND-LINE
|
||||
|
||||
CUPS works best with PPD (PostScript Printer Description) files. In a pinch
|
||||
you can also use System V style printer interface scripts.
|
||||
CUPS works best with PPD (PostScript Printer Description)
|
||||
files. In a pinch you can also use System V style printer
|
||||
interface scripts.
|
||||
|
||||
CUPS includes several sample PPD files you can use:
|
||||
|
||||
Driver PPD Name
|
||||
Driver PPD File
|
||||
----------------------------- ------------------------------
|
||||
Dymo Label Printers drv:///sample.drv/dymo.ppd
|
||||
Intellitech Intellibar drv:///sample.drv/intelbar.ppd
|
||||
@@ -98,8 +107,6 @@ SETTING UP PRINTER QUEUES FROM THE COMMAND-LINE
|
||||
EPSON Stylus New Photo Series drv:///sample.drv/stphoto2.ppd
|
||||
EPSON 9-pin Series drv:///sample.drv/epson9.ppd
|
||||
EPSON 24-pin Series drv:///sample.drv/epson24.ppd
|
||||
Generic PCL Laser Printer drv:///sample.drv/generpcl.ppd
|
||||
Generic PostScript Printer drv:///sample.drv/generic.ppd
|
||||
HP DeskJet Series drv:///sample.drv/deskjet.ppd
|
||||
HP LaserJet Series drv:///sample.drv/laserjet.ppd
|
||||
OKIDATA 9-Pin Series drv:///sample.drv/okidata9.ppd
|
||||
@@ -117,44 +124,44 @@ SETTING UP PRINTER QUEUES FROM THE COMMAND-LINE
|
||||
|
||||
lpinfo -v
|
||||
|
||||
Then use the correct URI to add the printer using the "lpadmin" command:
|
||||
Then use the correct URI to add the printer using the
|
||||
"lpadmin" command:
|
||||
|
||||
lpadmin -p printername -E -v device-uri -m ppd-name
|
||||
lpadmin -p printername -E -v URI -m filename.ppd
|
||||
|
||||
Network printers typically use "socket" or "lpd" URIs:
|
||||
|
||||
lpadmin -p printername -E -v socket://11.22.33.44 -m ppd-name
|
||||
lpadmin -p printername -E -v lpd://11.22.33.44/ -m ppd-name
|
||||
lpadmin -p printername -E -v socket://11.22.33.44 -m filename.ppd
|
||||
lpadmin -p printername -E -v lpd://11.22.33.44/ -m filename.ppd
|
||||
|
||||
The sample drivers provide basic printing capabilities, but generally do not
|
||||
exercise the full potential of the printers or CUPS. The CUPS web site
|
||||
provides links and drivers:
|
||||
|
||||
http://www.cups.org/ppd.php PPD files
|
||||
http://www.cups.org/links.php Links to other drivers
|
||||
The sample drivers provide basic printing capabilities, but
|
||||
generally do not exercise the full potential of the printers
|
||||
or CUPS.
|
||||
|
||||
|
||||
PRINTING FILES
|
||||
|
||||
CUPS provides both the System V "lp" and Berkeley "lpr" commands for
|
||||
printing:
|
||||
CUPS provides both the System V "lp" and Berkeley "lpr"
|
||||
commands for printing:
|
||||
|
||||
lp filename
|
||||
lpr filename
|
||||
|
||||
Both the "lp" and "lpr" commands support printing options for the driver:
|
||||
Both the "lp" and "lpr" commands support printing options for
|
||||
the driver:
|
||||
|
||||
lp -o media=A4 -o resolution=600dpi filename
|
||||
lpr -o media=A4 -o resolution=600dpi filename
|
||||
lp -omedia=A4 -oresolution=600dpi filename
|
||||
lpr -omedia=A4 -oresolution=600dpi filename
|
||||
|
||||
CUPS recognizes many types of images files as well as PDF, PostScript,
|
||||
HP-GL/2, and text files, so you can print those files directly rather than
|
||||
through an application.
|
||||
CUPS recognizes many types of images files as well as PDF,
|
||||
PostScript, HP-GL/2, and text files, so you can print those
|
||||
files directly rather than through an application.
|
||||
|
||||
If you have an application that generates output specifically for your
|
||||
printer then you need to use the "-oraw" or "-l" options:
|
||||
If you have an application that generates output specifically
|
||||
for your printer then you need to use the "-oraw" or "-l"
|
||||
options:
|
||||
|
||||
lp -o raw filename
|
||||
lp -oraw filename
|
||||
lpr -l filename
|
||||
|
||||
This will prevent the filters from misinterpreting your print
|
||||
@@ -163,15 +170,17 @@ PRINTING FILES
|
||||
|
||||
LEGAL STUFF
|
||||
|
||||
CUPS is Copyright 2007-2008 by Apple Inc. CUPS, the CUPS logo, and the
|
||||
Common UNIX Printing System are trademarks of Apple Inc.
|
||||
CUPS is Copyright 2007-2008 by Apple Inc. CUPS, the CUPS logo,
|
||||
and the Common UNIX Printing System are trademarks of Apple Inc.
|
||||
|
||||
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
|
||||
|
||||
This software is based in part on the work of the Independent JPEG Group.
|
||||
This software is based in part on the work of the Independent
|
||||
JPEG Group.
|
||||
|
||||
CUPS is provided under the terms of version 2 of the GNU General Public
|
||||
License and GNU Library General Public License. This program is distributed
|
||||
in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the "doc/help/license.html" or "LICENSE.txt" files for more information.
|
||||
CUPS is provided under the terms of version 2 of the GNU General
|
||||
Public License and GNU Library General Public License. This program
|
||||
is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the "doc/help/license.html"
|
||||
or "LICENSE.txt" files for more information.
|
||||
|
||||
@@ -213,8 +213,7 @@ backendGetDeviceID(
|
||||
}
|
||||
# ifdef DEBUG
|
||||
else
|
||||
DEBUG_printf(("backendGetDeviceID: ioctl failed - %s\n",
|
||||
strerror(errno)));
|
||||
printf("backendGetDeviceID: ioctl failed - %s\n", strerror(errno));
|
||||
# endif /* DEBUG */
|
||||
# endif /* __linux */
|
||||
|
||||
@@ -237,8 +236,7 @@ backendGetDeviceID(
|
||||
}
|
||||
# ifdef DEBUG
|
||||
else
|
||||
DEBUG_printf(("backendGetDeviceID: ioctl failed - %s\n",
|
||||
strerror(errno)));
|
||||
printf("backendGetDeviceID: ioctl failed - %s\n", strerror(errno));
|
||||
# endif /* DEBUG */
|
||||
# endif /* __sun && ECPPIOC_GETDEVID */
|
||||
}
|
||||
|
||||
+19
-13
@@ -102,8 +102,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
sep; /* Separator character */
|
||||
int snmp_fd, /* SNMP socket */
|
||||
start_count, /* Page count via SNMP at start */
|
||||
page_count, /* Page count via SNMP */
|
||||
have_supplies; /* Printer supports supply levels? */
|
||||
page_count; /* Page count via SNMP */
|
||||
int num_files; /* Number of files to print */
|
||||
char **files, /* Files to print */
|
||||
*filename; /* Pointer to single filename */
|
||||
@@ -199,9 +198,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
else
|
||||
s = argv[0];
|
||||
|
||||
printf("network %s \"Unknown\" \"%s (%s)\"\n",
|
||||
s, _cupsLangString(cupsLangDefault(),
|
||||
_("Internet Printing Protocol")), s);
|
||||
printf("network %s \"Unknown\" \"Internet Printing Protocol (%s)\"\n",
|
||||
s, s);
|
||||
return (CUPS_BACKEND_OK);
|
||||
}
|
||||
else if (argc < 6)
|
||||
@@ -525,9 +523,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
do
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Connecting to %s:%d\n",
|
||||
hostname, port);
|
||||
_cupsLangPuts(stderr, _("INFO: Connecting to printer...\n"));
|
||||
_cupsLangPrintf(stderr, _("INFO: Connecting to %s on port %d...\n"),
|
||||
hostname, port);
|
||||
|
||||
if ((http = httpConnectEncrypt(hostname, port, cupsEncryption())) == NULL)
|
||||
{
|
||||
@@ -612,7 +609,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
}
|
||||
|
||||
fputs("STATE: -connecting-to-device\n", stderr);
|
||||
_cupsLangPuts(stderr, _("INFO: Connected to printer...\n"));
|
||||
_cupsLangPrintf(stderr, _("INFO: Connected to %s...\n"), hostname);
|
||||
|
||||
#ifdef AF_INET6
|
||||
if (http->hostaddr->addr.sa_family == AF_INET6)
|
||||
@@ -631,10 +628,19 @@ main(int argc, /* I - Number of command-line args */
|
||||
*/
|
||||
|
||||
if ((snmp_fd = _cupsSNMPOpen(http->hostaddr->addr.sa_family)) >= 0)
|
||||
have_supplies = !backendSNMPSupplies(snmp_fd, http->hostaddr, &start_count,
|
||||
NULL);
|
||||
{
|
||||
if (backendSNMPSupplies(snmp_fd, http->hostaddr, &start_count, NULL))
|
||||
{
|
||||
/*
|
||||
* No, close it...
|
||||
*/
|
||||
|
||||
_cupsSNMPClose(snmp_fd);
|
||||
snmp_fd = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
have_supplies = start_count = 0;
|
||||
start_count = 0;
|
||||
|
||||
/*
|
||||
* Build a URI for the printer and fill the standard IPP attributes for
|
||||
@@ -1250,7 +1256,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
* Collect the final page count as needed...
|
||||
*/
|
||||
|
||||
if (have_supplies &&
|
||||
if (snmp_fd >= 0 &&
|
||||
!backendSNMPSupplies(snmp_fd, http->hostaddr, &page_count, NULL) &&
|
||||
page_count > start_count)
|
||||
fprintf(stderr, "PAGE: total %d\n", page_count - start_count);
|
||||
|
||||
+33
-12
@@ -174,8 +174,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
printf("network lpd \"Unknown\" \"%s\"\n",
|
||||
_cupsLangString(cupsLangDefault(), _("LPD/LPR Host or Printer")));
|
||||
puts("network lpd \"Unknown\" \"LPD/LPR Host or Printer\"");
|
||||
return (CUPS_BACKEND_OK);
|
||||
}
|
||||
else if (argc < 6 || argc > 7)
|
||||
@@ -638,7 +637,8 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
http_addrlist_t *addrlist, /* Address list */
|
||||
*addr; /* Socket address */
|
||||
int snmp_fd, /* SNMP socket */
|
||||
have_supplies; /* Printer supports supply levels? */
|
||||
start_count, /* Page count via SNMP at start */
|
||||
page_count; /* Page count via SNMP */
|
||||
int copy; /* Copies written */
|
||||
time_t start_time; /* Time of first connect */
|
||||
int recoverable; /* Recoverable error shown? */
|
||||
@@ -697,9 +697,9 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
*/
|
||||
|
||||
fputs("STATE: +connecting-to-device\n", stderr);
|
||||
fprintf(stderr, "DEBUG: Connecting to %s:%d for printer %s\n",
|
||||
hostname, port, printer);
|
||||
_cupsLangPuts(stderr, _("INFO: Connecting to printer...\n"));
|
||||
_cupsLangPrintf(stderr,
|
||||
_("INFO: Attempting to connect to host %s for printer %s\n"),
|
||||
hostname, printer);
|
||||
|
||||
for (lport = reserve == RESERVE_RFC1179 ? 732 : 1024, addr = addrlist,
|
||||
delay = 5;;
|
||||
@@ -866,7 +866,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
}
|
||||
|
||||
fputs("STATE: -connecting-to-device\n", stderr);
|
||||
_cupsLangPuts(stderr, _("INFO: Connected to printer...\n"));
|
||||
_cupsLangPrintf(stderr, _("INFO: Connected to %s...\n"), hostname);
|
||||
|
||||
#ifdef AF_INET6
|
||||
if (addr->addr.addr.sa_family == AF_INET6)
|
||||
@@ -885,9 +885,19 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
*/
|
||||
|
||||
if ((snmp_fd = _cupsSNMPOpen(addr->addr.addr.sa_family)) >= 0)
|
||||
have_supplies = !backendSNMPSupplies(snmp_fd, &(addr->addr), NULL, NULL);
|
||||
{
|
||||
if (backendSNMPSupplies(snmp_fd, &(addr->addr), &start_count, NULL))
|
||||
{
|
||||
/*
|
||||
* No, close it...
|
||||
*/
|
||||
|
||||
_cupsSNMPClose(snmp_fd);
|
||||
snmp_fd = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
have_supplies = 0;
|
||||
start_count = 0;
|
||||
|
||||
/*
|
||||
* Check for side-channel requests...
|
||||
@@ -1176,11 +1186,22 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
}
|
||||
|
||||
/*
|
||||
* Collect the final supply levels as needed...
|
||||
* Collect the final page count as needed...
|
||||
*/
|
||||
|
||||
if (have_supplies)
|
||||
backendSNMPSupplies(snmp_fd, &(addr->addr), NULL, NULL);
|
||||
if (snmp_fd >= 0)
|
||||
{
|
||||
int printer_state; /* State of printer */
|
||||
|
||||
|
||||
while (!backendSNMPSupplies(snmp_fd, &(addr->addr), &page_count,
|
||||
&printer_state) &&
|
||||
printer_state != CUPS_TC_idle)
|
||||
sleep(3);
|
||||
|
||||
if (page_count > start_count)
|
||||
fprintf(stderr, "PAGE: total %d\n", page_count - start_count);
|
||||
}
|
||||
|
||||
/*
|
||||
* Close the socket connection and input file...
|
||||
|
||||
@@ -102,7 +102,6 @@ backendNetworkSideCB(
|
||||
break;
|
||||
|
||||
case CUPS_SC_CMD_GET_BIDI :
|
||||
status = CUPS_SC_STATUS_OK;
|
||||
data[0] = use_bc;
|
||||
datalen = 1;
|
||||
break;
|
||||
|
||||
@@ -653,7 +653,6 @@ side_cb(int print_fd, /* I - Print file */
|
||||
break;
|
||||
|
||||
case CUPS_SC_CMD_GET_BIDI :
|
||||
status = CUPS_SC_STATUS_OK;
|
||||
data[0] = use_bc;
|
||||
datalen = 1;
|
||||
break;
|
||||
|
||||
@@ -283,12 +283,6 @@ backendRunLoop(
|
||||
CUPS_LLCAST bc_bytes);
|
||||
cupsBackChannelWrite(bc_buffer, bc_bytes, 1.0);
|
||||
}
|
||||
else if (bc_bytes < 0 && errno != EAGAIN && errno != EINTR)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Error reading back-channel data: %s\n",
|
||||
strerror(errno));
|
||||
use_bc = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -66,8 +66,7 @@
|
||||
void
|
||||
list_devices(void)
|
||||
{
|
||||
printf("direct scsi \"Unknown\" \"%s\"\n",
|
||||
_cupsLangString(cupsLangDefault(), _("SCSI Printer")));
|
||||
puts("direct scsi \"Unknown\" \"SCSI Printer\"");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -79,8 +79,7 @@ int print_device(const char *resource, int fd, int copies) { return (1); }
|
||||
void
|
||||
list_devices(void)
|
||||
{
|
||||
printf("direct scsi \"Unknown\" \"%s\"\n",
|
||||
_cupsLangString(cupsLangDefault(), _("SCSI Printer")));
|
||||
puts("direct scsi \"Unknown\" \"SCSI Printer\"");
|
||||
}
|
||||
|
||||
|
||||
|
||||
+26
-45
@@ -740,12 +740,10 @@ list_devices(void)
|
||||
* devices */
|
||||
#endif /* __hpux || __sgi || __sun || __FreeBSD__ || __OpenBSD__ || __FreeBSD_kernel__ */
|
||||
|
||||
|
||||
#ifdef __linux
|
||||
int i, j; /* Looping vars */
|
||||
int fd; /* File descriptor */
|
||||
char device[255]; /* Device filename */
|
||||
char info[255]; /* Device info/description */
|
||||
# ifdef TIOCGSERIAL
|
||||
struct serial_struct serinfo; /* serial port info */
|
||||
# endif /* TIOCGSERIAL */
|
||||
@@ -780,35 +778,32 @@ list_devices(void)
|
||||
|
||||
close(fd);
|
||||
|
||||
snprintf(info, sizeof(info),
|
||||
_cupsLangString(cupsLangDefault(), _("Serial Port #%d")), i + 1);
|
||||
|
||||
# if defined(_ARCH_PPC) || defined(powerpc) || defined(__powerpc)
|
||||
printf("serial serial:%s?baud=230400 \"Unknown\" \"%s\"\n", device, info);
|
||||
printf("serial serial:%s?baud=230400 \"Unknown\" \"Serial Port #%d\"\n",
|
||||
device, i + 1);
|
||||
# else
|
||||
printf("serial serial:%s?baud=115200 \"Unknown\" \"%s\"\n", device, info);
|
||||
printf("serial serial:%s?baud=115200 \"Unknown\" \"Serial Port #%d\"\n",
|
||||
device, i + 1);
|
||||
# endif /* _ARCH_PPC || powerpc || __powerpc */
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 16; i ++)
|
||||
{
|
||||
snprintf(info, sizeof(info),
|
||||
_cupsLangString(cupsLangDefault(), _("USB Serial Port #%d")),
|
||||
i + 1);
|
||||
|
||||
sprintf(device, "/dev/usb/ttyUSB%d", i);
|
||||
if ((fd = open(device, O_WRONLY | O_NOCTTY | O_NDELAY)) >= 0)
|
||||
{
|
||||
close(fd);
|
||||
printf("serial serial:%s?baud=230400 \"Unknown\" \"%s\"\n", device, info);
|
||||
printf("serial serial:%s?baud=230400 \"Unknown\" \"USB Serial Port #%d\"\n",
|
||||
device, i + 1);
|
||||
}
|
||||
|
||||
sprintf(device, "/dev/ttyUSB%d", i);
|
||||
if ((fd = open(device, O_WRONLY | O_NOCTTY | O_NDELAY)) >= 0)
|
||||
{
|
||||
close(fd);
|
||||
printf("serial serial:%s?baud=230400 \"Unknown\" \"%s\"\n", device, info);
|
||||
printf("serial serial:%s?baud=230400 \"Unknown\" \"USB Serial Port #%d\"\n",
|
||||
device, i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -820,9 +815,9 @@ list_devices(void)
|
||||
if ((fd = open(device, O_WRONLY | O_NOCTTY | O_NDELAY)) >= 0)
|
||||
{
|
||||
close(fd);
|
||||
|
||||
printf("serial serial:%s?baud=115200 \"Unknown\" "
|
||||
"\"Equinox ESP %d Port #%d\"\n", device, i, j + 1);
|
||||
"\"Equinox ESP %d Port #%d\"\n",
|
||||
device, i, j + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -925,9 +920,8 @@ list_devices(void)
|
||||
}
|
||||
}
|
||||
#elif defined(__sun)
|
||||
int i, j, n; /* Looping vars */
|
||||
char device[255]; /* Device filename */
|
||||
char info[255]; /* Device info/description */
|
||||
int i, j, n; /* Looping vars */
|
||||
char device[255]; /* Device filename */
|
||||
|
||||
|
||||
/*
|
||||
@@ -937,18 +931,14 @@ list_devices(void)
|
||||
for (i = 0; i < 26; i ++)
|
||||
{
|
||||
sprintf(device, "/dev/cua/%c", 'a' + i);
|
||||
if (!access(device, 0))
|
||||
{
|
||||
snprintf(info, sizeof(info),
|
||||
_cupsLangString(cupsLangDefault(), _("Serial Port #%d")), i + 1);
|
||||
|
||||
if (access(device, 0) == 0)
|
||||
# ifdef B115200
|
||||
printf("serial serial:%s?baud=115200 \"Unknown\" \"%s\"\n", device, info);
|
||||
printf("serial serial:%s?baud=115200 \"Unknown\" \"Serial Port #%d\"\n",
|
||||
device, i + 1);
|
||||
# else
|
||||
printf("serial serial:%s?baud=38400 \"Unknown\" \"%s\"\n", device, info);
|
||||
printf("serial serial:%s?baud=38400 \"Unknown\" \"Serial Port #%d\"\n",
|
||||
device, i + 1);
|
||||
# endif /* B115200 */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1045,10 +1035,9 @@ list_devices(void)
|
||||
device, i + 1);
|
||||
}
|
||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
|
||||
int i, j; /* Looping vars */
|
||||
int fd; /* File descriptor */
|
||||
char device[255]; /* Device filename */
|
||||
char info[255]; /* Device info/description */
|
||||
int i, j; /* Looping vars */
|
||||
int fd; /* File descriptor */
|
||||
char device[255]; /* Device filename */
|
||||
|
||||
|
||||
/*
|
||||
@@ -1061,11 +1050,8 @@ list_devices(void)
|
||||
if ((fd = open(device, O_WRONLY | O_NOCTTY | O_NDELAY)) >= 0)
|
||||
{
|
||||
close(fd);
|
||||
|
||||
snprintf(info, sizeof(info),
|
||||
_cupsLangString(cupsLangDefault(), _("Serial Port #%d")), i + 1);
|
||||
|
||||
printf("serial serial:%s?baud=115200 \"Unknown\" \"%s\"\n", device, info);
|
||||
printf("serial serial:%s?baud=115200 \"Unknown\" \"Standard Serial Port #%d\"\n",
|
||||
device, i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1139,10 +1125,9 @@ list_devices(void)
|
||||
}
|
||||
}
|
||||
#elif defined(__NetBSD__)
|
||||
int i, j; /* Looping vars */
|
||||
int fd; /* File descriptor */
|
||||
char device[255]; /* Device filename */
|
||||
char info[255]; /* Device info/description */
|
||||
int i, j; /* Looping vars */
|
||||
int fd; /* File descriptor */
|
||||
char device[255]; /* Device filename */
|
||||
|
||||
|
||||
/*
|
||||
@@ -1155,11 +1140,8 @@ list_devices(void)
|
||||
if ((fd = open(device, O_WRONLY | O_NOCTTY | O_NDELAY)) >= 0)
|
||||
{
|
||||
close(fd);
|
||||
|
||||
snprintf(info, sizeof(info),
|
||||
_cupsLangString(cupsLangDefault(), _("Serial Port #%d")), i + 1);
|
||||
|
||||
printf("serial serial:%s?baud=115200 \"Unknown\" \"%s\"\n", device, info);
|
||||
printf("serial serial:%s?baud=115200 \"Unknown\" \"Serial Port #%d\"\n",
|
||||
device, i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1300,7 +1282,6 @@ side_cb(int print_fd, /* I - Print file */
|
||||
break;
|
||||
|
||||
case CUPS_SC_CMD_GET_BIDI :
|
||||
status = CUPS_SC_STATUS_OK;
|
||||
data[0] = use_bc;
|
||||
datalen = 1;
|
||||
break;
|
||||
|
||||
+17
-12
@@ -88,8 +88,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
char addrname[256]; /* Address name */
|
||||
int snmp_fd, /* SNMP socket */
|
||||
start_count, /* Page count via SNMP at start */
|
||||
page_count, /* Page count via SNMP */
|
||||
have_supplies; /* Printer supports supply levels? */
|
||||
page_count; /* Page count via SNMP */
|
||||
ssize_t tbytes; /* Total number of bytes written */
|
||||
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
|
||||
struct sigaction action; /* Actions for POSIX signals */
|
||||
@@ -122,8 +121,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
printf("network socket \"Unknown\" \"%s\"\n",
|
||||
_cupsLangString(cupsLangDefault(), _("AppSocket/HP JetDirect")));
|
||||
puts("network socket \"Unknown\" \"AppSocket/HP JetDirect\"");
|
||||
return (CUPS_BACKEND_OK);
|
||||
}
|
||||
else if (argc < 6 || argc > 7)
|
||||
@@ -268,9 +266,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
return (CUPS_BACKEND_STOP);
|
||||
}
|
||||
|
||||
fprintf(stderr, "DEBUG: Connecting to %s:%d\n",
|
||||
hostname, port);
|
||||
_cupsLangPuts(stderr, _("INFO: Connecting to printer...\n"));
|
||||
_cupsLangPrintf(stderr,
|
||||
_("INFO: Attempting to connect to host %s on port %d\n"),
|
||||
hostname, port);
|
||||
|
||||
fputs("STATE: +connecting-to-device\n", stderr);
|
||||
|
||||
@@ -353,7 +351,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
}
|
||||
|
||||
fputs("STATE: -connecting-to-device\n", stderr);
|
||||
_cupsLangPuts(stderr, _("INFO: Connected to printer...\n"));
|
||||
_cupsLangPrintf(stderr, _("INFO: Connected to %s...\n"), hostname);
|
||||
|
||||
#ifdef AF_INET6
|
||||
if (addr->addr.addr.sa_family == AF_INET6)
|
||||
@@ -373,11 +371,18 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
|
||||
if ((snmp_fd = _cupsSNMPOpen(addr->addr.addr.sa_family)) >= 0)
|
||||
{
|
||||
have_supplies = !backendSNMPSupplies(snmp_fd, &(addr->addr), &start_count,
|
||||
NULL);
|
||||
if (backendSNMPSupplies(snmp_fd, &(addr->addr), &start_count, NULL))
|
||||
{
|
||||
/*
|
||||
* No, close it...
|
||||
*/
|
||||
|
||||
_cupsSNMPClose(snmp_fd);
|
||||
snmp_fd = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
have_supplies = start_count = 0;
|
||||
start_count = 0;
|
||||
|
||||
/*
|
||||
* Print everything...
|
||||
@@ -435,7 +440,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
* Collect the final page count as needed...
|
||||
*/
|
||||
|
||||
if (have_supplies &&
|
||||
if (snmp_fd >= 0 &&
|
||||
!backendSNMPSupplies(snmp_fd, &(addr->addr), &page_count, NULL) &&
|
||||
page_count > start_count)
|
||||
fprintf(stderr, "PAGE: total %d\n", page_count - start_count);
|
||||
|
||||
@@ -755,7 +755,6 @@ print_device(const char *uri, /* I - Device URI */
|
||||
* Force the read thread to exit...
|
||||
*/
|
||||
|
||||
g.wait_eof = 0;
|
||||
pthread_kill(read_thread_id, SIGTERM);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-19
@@ -163,7 +163,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
if ((bytes = read(print_fd, buffer, sizeof(buffer))) > 0)
|
||||
{
|
||||
while (usb_bulk_write(printer->handle, printer->write_endp, buffer,
|
||||
bytes, 45000) < 0)
|
||||
bytes, 5000) < 0)
|
||||
{
|
||||
_cupsLangPrintf(stderr,
|
||||
_("ERROR: Unable to write %d bytes to printer!\n"),
|
||||
@@ -202,23 +202,6 @@ close_device(usb_printer_t *printer) /* I - Printer */
|
||||
{
|
||||
if (printer->handle)
|
||||
{
|
||||
/*
|
||||
* Release interfaces before closing so that we know all data is written
|
||||
* to the device...
|
||||
*/
|
||||
|
||||
int number = printer->device->config[printer->conf].
|
||||
interface[printer->iface].
|
||||
altsetting[printer->altset].bInterfaceNumber;
|
||||
usb_release_interface(printer->handle, number);
|
||||
|
||||
if (number != 0)
|
||||
usb_release_interface(printer->handle, 0);
|
||||
|
||||
/*
|
||||
* Close the interface and return...
|
||||
*/
|
||||
|
||||
usb_close(printer->handle);
|
||||
printer->handle = NULL;
|
||||
}
|
||||
@@ -783,7 +766,6 @@ side_cb(usb_printer_t *printer, /* I - Printer */
|
||||
break;
|
||||
|
||||
case CUPS_SC_CMD_GET_BIDI :
|
||||
status = CUPS_SC_STATUS_OK;
|
||||
data[0] = 0; /* TODO: Change to 1 when read supported */
|
||||
datalen = 1;
|
||||
break;
|
||||
|
||||
@@ -80,14 +80,6 @@ print_device(const char *uri, /* I - Device URI */
|
||||
|
||||
use_bc = 0;
|
||||
|
||||
#elif defined(__sun)
|
||||
/*
|
||||
* CUPS STR #3028: Solaris' usbprn driver apparently does not support
|
||||
* select() or poll(), so we can't support backchannel...
|
||||
*/
|
||||
|
||||
use_bc = 0;
|
||||
|
||||
#else
|
||||
/*
|
||||
* Disable backchannel data when printing to Brother, Canon, or
|
||||
@@ -181,17 +173,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
lseek(print_fd, 0, SEEK_SET);
|
||||
}
|
||||
|
||||
#ifdef __sun
|
||||
/*
|
||||
* CUPS STR #3028: Solaris' usbprn driver apparently does not support
|
||||
* select() or poll(), so we can't support the sidechannel either...
|
||||
*/
|
||||
|
||||
tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, NULL);
|
||||
|
||||
#else
|
||||
tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, side_cb);
|
||||
#endif /* __sun */
|
||||
|
||||
if (print_fd != 0 && tbytes >= 0)
|
||||
_cupsLangPrintf(stderr,
|
||||
@@ -598,7 +580,6 @@ side_cb(int print_fd, /* I - Print file */
|
||||
break;
|
||||
|
||||
case CUPS_SC_CMD_GET_BIDI :
|
||||
status = CUPS_SC_STATUS_OK;
|
||||
data[0] = use_bc;
|
||||
datalen = 1;
|
||||
break;
|
||||
|
||||
+2
-3
@@ -918,9 +918,8 @@ do_am_printer(http_t *http, /* I - HTTP connection */
|
||||
|
||||
last_device_time = 0;
|
||||
current_device = 0;
|
||||
if (cupsGetDevices(http, 30, CUPS_INCLUDE_ALL, CUPS_EXCLUDE_NONE,
|
||||
(cups_device_cb_t)choose_device_cb,
|
||||
(void *)title) == IPP_OK)
|
||||
if (cupsGetDevices(http, 30, NULL, (cups_device_cb_t)choose_device_cb,
|
||||
(void *)title) == IPP_OK)
|
||||
fputs("DEBUG: Got device list!\n", stderr);
|
||||
else
|
||||
{
|
||||
|
||||
+1
-5
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Class status CGI for the Common UNIX Printing System (CUPS).
|
||||
*
|
||||
* Copyright 2007-2008 by Apple Inc.
|
||||
* Copyright 2007 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -14,10 +14,6 @@
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* main() - Main entry for CGI.
|
||||
* do_class_op() - Do a class operation.
|
||||
* show_all_classes() - Show all classes...
|
||||
* show_class() - Show a single class.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* main() - Main entry for CGI.
|
||||
* do_printer_op() - Do a printer operation.
|
||||
* show_all_printers() - Show all printers...
|
||||
* show_printer() - Show a single printer.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -265,7 +261,7 @@ do_printer_op(http_t *http, /* I - HTTP connection */
|
||||
|
||||
cgiRewriteURL(uri, url, sizeof(url), NULL);
|
||||
cgiFormEncode(uri, url, sizeof(uri));
|
||||
snprintf(refresh, sizeof(refresh), "5;URL=%s", uri);
|
||||
snprintf(refresh, sizeof(refresh), "5;URL=q%s", uri);
|
||||
cgiSetVariable("refresh_page", refresh);
|
||||
|
||||
cgiStartHTML(title);
|
||||
|
||||
@@ -22,7 +22,7 @@ Listen localhost:@DEFAULT_IPP_PORT@
|
||||
Browsing On
|
||||
BrowseOrder allow,deny
|
||||
BrowseAllow all
|
||||
BrowseLocalProtocols @CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS@
|
||||
BrowseLocalProtocols
|
||||
|
||||
# Default authentication type, when authentication is required...
|
||||
DefaultAuthType Basic
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-common.m4 8094 2008-10-31 20:51:39Z mike $"
|
||||
dnl "$Id: cups-common.m4 8081 2008-10-23 23:41:59Z mike $"
|
||||
dnl
|
||||
dnl Common configuration stuff for the Common UNIX Printing System (CUPS).
|
||||
dnl
|
||||
@@ -20,7 +20,7 @@ dnl Set the name of the config header file...
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Version number information...
|
||||
CUPS_VERSION="1.4b2"
|
||||
CUPS_VERSION="1.4b1"
|
||||
CUPS_REVISION=""
|
||||
#if test -z "$CUPS_REVISION" -a -d .svn; then
|
||||
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
|
||||
@@ -354,5 +354,5 @@ AC_SUBST(FONTS)
|
||||
AC_SUBST(LEGACY_BACKENDS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-common.m4 8094 2008-10-31 20:51:39Z mike $".
|
||||
dnl End of "$Id: cups-common.m4 8081 2008-10-23 23:41:59Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-compiler.m4 8139 2008-11-17 23:46:55Z mike $"
|
||||
dnl "$Id: cups-compiler.m4 7871 2008-08-27 21:12:43Z mike $"
|
||||
dnl
|
||||
dnl Compiler stuff for the Common UNIX Printing System (CUPS).
|
||||
dnl
|
||||
@@ -33,7 +33,7 @@ else
|
||||
fi
|
||||
|
||||
dnl Debug printfs can slow things down, so provide a separate option for that
|
||||
if test x$enable_debug_printfs = xyes; then
|
||||
if test x$enable_debug_printf = xyes; then
|
||||
CFLAGS="$CFLAGS -DDEBUG"
|
||||
fi
|
||||
|
||||
@@ -558,5 +558,5 @@ case $uname in
|
||||
esac
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-compiler.m4 8139 2008-11-17 23:46:55Z mike $".
|
||||
dnl End of "$Id: cups-compiler.m4 7871 2008-08-27 21:12:43Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-defaults.m4 8106 2008-11-11 00:57:12Z mike $"
|
||||
dnl "$Id: cups-defaults.m4 7964 2008-09-19 20:03:36Z mike $"
|
||||
dnl
|
||||
dnl Default cupsd configuration settings for the Common UNIX Printing System
|
||||
dnl (CUPS).
|
||||
@@ -413,33 +413,6 @@ AC_ARG_WITH(ipp-port, [ --with-ipp-port set default port number for IPP
|
||||
AC_SUBST(DEFAULT_IPP_PORT)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
|
||||
|
||||
dnl Filters
|
||||
AC_ARG_ENABLE(bannertops, [ --enable-bannertops build with default banner filter, default=auto ])
|
||||
AC_ARG_ENABLE(texttops, [ --enable-texttops build with default text filter, default=auto ])
|
||||
|
||||
if test "x$enable_bannertops" = xno; then
|
||||
BANNERTOPS=""
|
||||
elif test "x$enable_bannertops" = xyes; then
|
||||
BANNERTOPS="bannertops"
|
||||
elif test $uname = Darwin; then
|
||||
BANNERTOPS=""
|
||||
else
|
||||
BANNERTOPS="bannertops"
|
||||
fi
|
||||
|
||||
if test "x$enable_texttops" = xno; then
|
||||
TEXTTOPS=""
|
||||
elif test "x$enable_texttops" = xyes; then
|
||||
TEXTTOPS="texttops"
|
||||
elif test $uname = Darwin; then
|
||||
TEXTTOPS=""
|
||||
else
|
||||
TEXTTOPS="texttops"
|
||||
fi
|
||||
|
||||
AC_SUBST(BANNERTOPS)
|
||||
AC_SUBST(TEXTTOPS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-defaults.m4 8106 2008-11-11 00:57:12Z mike $".
|
||||
dnl End of "$Id: cups-defaults.m4 7964 2008-09-19 20:03:36Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -21,9 +21,8 @@ PAP=""
|
||||
AC_SUBST(PAP)
|
||||
|
||||
if test x$enable_pap != xno -a $uname = Darwin; then
|
||||
AC_CHECK_HEADER(netat/appletalk.h,[
|
||||
PAP="pap"
|
||||
AC_CHECK_HEADER(AppleTalk/at_proto.h)])
|
||||
PAP="pap"
|
||||
AC_CHECK_HEADER(AppleTalk/at_proto.h)
|
||||
fi
|
||||
|
||||
dnl
|
||||
|
||||
@@ -64,7 +64,6 @@ AC_SUBST(UNINSTALL_LANGUAGES)
|
||||
|
||||
AC_OUTPUT(Makedefs packaging/cups.list init/cups.sh init/cups-lpd cups-config
|
||||
conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf
|
||||
data/testprint
|
||||
desktop/cups.desktop
|
||||
doc/index.html doc/help/ref-cupsd-conf.html doc/help/standard.html
|
||||
init/org.cups.cups-lpd.plist init/cups.xml
|
||||
|
||||
+2
-38
@@ -544,7 +544,7 @@ apihelp:
|
||||
mxmldoc --section "Programming" --title "CUPS API" \
|
||||
--css ../doc/cups-printable.css \
|
||||
--header api-cups.header --intro api-cups.shtml \
|
||||
cups.h adminutil.c dest.c language.c notify.c \
|
||||
cups.h dest.c language.c notify.c \
|
||||
options.c tempfile.c usersys.c \
|
||||
util.c >../doc/help/api-cups.html
|
||||
mxmldoc --section "Programming" --title "File and Directory APIs" \
|
||||
@@ -585,7 +585,7 @@ framedhelp:
|
||||
--section "Programming" --title "CUPS API" \
|
||||
--css ../doc/cups-printable.css \
|
||||
--header api-cups.header --intro api-cups.shtml \
|
||||
cups.h adminutil.c dest.c language.c notify.c \
|
||||
cups.h dest.c language.c notify.c \
|
||||
options.c tempfile.c usersys.c \
|
||||
util.c
|
||||
mxmldoc --framed api-filedir \
|
||||
@@ -614,42 +614,6 @@ framedhelp:
|
||||
backchannel.c backend.h backend.c sidechannel.c sidechannel.h
|
||||
|
||||
|
||||
docsets:
|
||||
echo Generating CUPS API documentation sets...
|
||||
../tools/makedocset --docset org.cups.overview.docset \
|
||||
--title "Introduction to CUPS Programming" \
|
||||
--header api-overview.header --intro api-overview.shtml
|
||||
../tools/makedocset --docset org.cups.array.docset \
|
||||
--title "Array API" \
|
||||
--header api-array.header --intro api-array.shtml \
|
||||
array.h array.c
|
||||
../tools/makedocset --docset org.cups.cups.docset \
|
||||
--title "CUPS API" \
|
||||
--header api-cups.header --intro api-cups.shtml \
|
||||
cups.h adminutil.c dest.c language.c notify.c \
|
||||
options.c tempfile.c usersys.c \
|
||||
util.c
|
||||
../tools/makedocset --docset org.cups.filedir.docset \
|
||||
--title "File and Directory APIs" \
|
||||
--header api-filedir.header --intro api-filedir.shtml \
|
||||
file.h file.c dir.h dir.c
|
||||
../tools/makedocset --docset org.cups.ppd.docset \
|
||||
--title "PPD API" \
|
||||
--header api-ppd.header --intro api-ppd.shtml \
|
||||
ppd.h attr.c conflicts.c custom.c emit.c localize.c mark.c \
|
||||
page.c ppd.c
|
||||
../tools/makedocset --docset org.cups.httpipp.docset \
|
||||
--title "HTTP and IPP APIs" \
|
||||
--header api-httpipp.header --intro api-httpipp.shtml \
|
||||
http.h ipp.h auth.c getdevices.c getputfile.c encode.c \
|
||||
http.c http-addr.c http-support.c ipp.c ipp-support.c \
|
||||
md5passwd.c request.c
|
||||
../tools/makedocset --docset org.cups.filter.docset \
|
||||
--title "Filter and Backend Programming" \
|
||||
--header api-filter.header --intro api-filter.shtml \
|
||||
backchannel.c backend.h backend.c sidechannel.c sidechannel.h
|
||||
|
||||
|
||||
#
|
||||
# Dependencies...
|
||||
#
|
||||
|
||||
+2
-6
@@ -75,8 +75,6 @@ static void write_option(cups_file_t *dstfp, int order,
|
||||
|
||||
/*
|
||||
* 'cupsAdminCreateWindowsPPD()' - Create the Windows PPD file for a printer.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
*/
|
||||
|
||||
char * /* O - PPD file or NULL */
|
||||
@@ -403,8 +401,6 @@ cupsAdminCreateWindowsPPD(
|
||||
|
||||
/*
|
||||
* 'cupsAdminExportSamba()' - Export a printer to Samba.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -854,7 +850,7 @@ cupsAdminExportSamba(
|
||||
* The returned settings should be freed with cupsFreeOptions() when
|
||||
* you are done with them.
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -1197,7 +1193,7 @@ _cupsAdminGetServerSettings(
|
||||
/*
|
||||
* 'cupsAdminSetServerSettings()' - Set settings on the server.
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
|
||||
+24
-22
@@ -102,7 +102,7 @@ static int cups_array_find(cups_array_t *a, void *e, int prev, int *rdiff);
|
||||
* appended at the end of the run of identical elements. For unsorted arrays,
|
||||
* the element is appended to the end of the array.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -136,7 +136,7 @@ cupsArrayAdd(cups_array_t *a, /* I - Array */
|
||||
* The caller is responsible for freeing the memory used by the
|
||||
* elements themselves.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -165,7 +165,7 @@ cupsArrayClear(cups_array_t *a) /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayCount()' - Get the number of elements in the array.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - Number of elements */
|
||||
@@ -192,7 +192,7 @@ cupsArrayCount(cups_array_t *a) /* I - Array */
|
||||
* The current element is undefined until you call @link cupsArrayFind@,
|
||||
* @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void * /* O - Element */
|
||||
@@ -222,7 +222,7 @@ cupsArrayCurrent(cups_array_t *a) /* I - Array */
|
||||
* The caller is responsible for freeing the memory used by the
|
||||
* elements themselves.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -253,7 +253,7 @@ cupsArrayDelete(cups_array_t *a) /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayDup()' - Duplicate the array.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
cups_array_t * /* O - Duplicate array */
|
||||
@@ -319,7 +319,7 @@ cupsArrayDup(cups_array_t *a) /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayFind()' - Find an element in the array.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void * /* O - Element found or @code NULL@ */
|
||||
@@ -414,7 +414,7 @@ cupsArrayFind(cups_array_t *a, /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayFirst()' - Get the first element in the array.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void * /* O - First element or @code NULL@ if the array is empty */
|
||||
@@ -443,7 +443,7 @@ cupsArrayFirst(cups_array_t *a) /* I - Array */
|
||||
* The current element is undefined until you call @link cupsArrayFind@,
|
||||
* @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@.
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
int /* O - Index of the current element, starting at 0 */
|
||||
@@ -459,7 +459,7 @@ cupsArrayGetIndex(cups_array_t *a) /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayGetInsert()' - Get the index of the last inserted element.
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
int /* O - Index of the last inserted element, starting at 0 */
|
||||
@@ -475,7 +475,7 @@ cupsArrayGetInsert(cups_array_t *a) /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayIndex()' - Get the N-th element in the array.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void * /* O - N-th element or @code NULL@ */
|
||||
@@ -498,7 +498,7 @@ cupsArrayIndex(cups_array_t *a, /* I - Array */
|
||||
* inserted at the beginning of the run of identical elements. For unsorted
|
||||
* arrays, the element is inserted at the beginning of the array.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 0 on failure, 1 on success */
|
||||
@@ -528,7 +528,7 @@ cupsArrayInsert(cups_array_t *a, /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayLast()' - Get the last element in the array.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void * /* O - Last element or @code NULL@ if the array is empty */
|
||||
@@ -559,7 +559,7 @@ cupsArrayLast(cups_array_t *a) /* I - Array */
|
||||
* data pointer argument can safely be omitted when not required so functions
|
||||
* like @code strcmp@ can be used for sorted string arrays.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
cups_array_t * /* O - Array */
|
||||
@@ -581,7 +581,7 @@ cupsArrayNew(cups_array_func_t f, /* I - Comparison function or @code NULL@ for
|
||||
* The hash function ("h") is used to implement cached lookups with the
|
||||
* specified hash size ("hsize").
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
cups_array_t * /* O - Array */
|
||||
@@ -636,7 +636,7 @@ cupsArrayNew2(cups_array_func_t f, /* I - Comparison function or @code NULL@ fo
|
||||
* @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@
|
||||
* to set the current element.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void * /* O - Next element or @code NULL@ */
|
||||
@@ -669,7 +669,7 @@ cupsArrayNext(cups_array_t *a) /* I - Array */
|
||||
* @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@
|
||||
* to set the current element.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void * /* O - Previous element or @code NULL@ */
|
||||
@@ -702,7 +702,7 @@ cupsArrayPrev(cups_array_t *a) /* I - Array */
|
||||
* The caller is responsible for freeing the memory used by the
|
||||
* removed element.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -764,7 +764,7 @@ cupsArrayRemove(cups_array_t *a, /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayRestore()' - Reset the current element to the last @link cupsArraySave@.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void * /* O - New current element */
|
||||
@@ -795,7 +795,7 @@ cupsArrayRestore(cups_array_t *a) /* I - Array */
|
||||
*
|
||||
* The save/restore stack is guaranteed to be at least 32 elements deep.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -817,7 +817,7 @@ cupsArraySave(cups_array_t *a) /* I - Array */
|
||||
/*
|
||||
* 'cupsArrayUserData()' - Return the user data for an array.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void * /* O - User data */
|
||||
@@ -833,7 +833,7 @@ cupsArrayUserData(cups_array_t *a) /* I - Array */
|
||||
/*
|
||||
* 'cups_array_add()' - Insert or append an element to the array...
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
static int /* O - 1 on success, 0 on failure */
|
||||
@@ -1003,6 +1003,8 @@ cups_array_add(cups_array_t *a, /* I - Array */
|
||||
|
||||
/*
|
||||
* 'cups_array_find()' - Find an element in the array...
|
||||
*
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
static int /* O - Index of match */
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@
|
||||
/*
|
||||
* 'ppdFindAttr()' - Find the first matching attribute.
|
||||
*
|
||||
* @since CUPS 1.1.19/Mac OS X 10.3@
|
||||
* @since CUPS 1.1.19@
|
||||
*/
|
||||
|
||||
ppd_attr_t * /* O - Attribute or @code NULL@ if not found */
|
||||
@@ -89,7 +89,7 @@ ppdFindAttr(ppd_file_t *ppd, /* I - PPD file data */
|
||||
/*
|
||||
* 'ppdFindNextAttr()' - Find the next matching attribute.
|
||||
*
|
||||
* @since CUPS 1.1.19/Mac OS X 10.3@
|
||||
* @since CUPS 1.1.19@
|
||||
*/
|
||||
|
||||
ppd_attr_t * /* O - Attribute or @code NULL@ if not found */
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ static int cups_local_auth(http_t *http);
|
||||
* This function should be called in response to a @code HTTP_UNAUTHORIZED@
|
||||
* status, prior to resubmitting your request.
|
||||
*
|
||||
* @since CUPS 1.1.20/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.20@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on error */
|
||||
|
||||
@@ -50,7 +50,7 @@ static void cups_setup(fd_set *set, struct timeval *tval,
|
||||
* parameter controls how many seconds to wait for the data - use 0.0 to
|
||||
* return immediately if there is no data, -1.0 to wait for data indefinitely.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ssize_t /* O - Bytes read or -1 on error */
|
||||
@@ -101,7 +101,7 @@ cupsBackChannelRead(char *buffer, /* I - Buffer to read into */
|
||||
* 0.0 to return immediately if the data cannot be written, -1.0 to wait
|
||||
* indefinitely.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ssize_t /* O - Bytes written or -1 on error */
|
||||
|
||||
@@ -44,8 +44,6 @@ static void quote_string(const char *s);
|
||||
* function returns the device URI passed in the DEVICE_URI environment
|
||||
* variable or the device URI passed in argv[0], whichever is found
|
||||
* first.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
*/
|
||||
|
||||
const char * /* O - Device URI or @code NULL@ */
|
||||
@@ -74,8 +72,6 @@ cupsBackendDeviceURI(char **argv) /* I - Command-line arguments */
|
||||
* This function writes a single device line to stdout for a backend.
|
||||
* It handles quoting of special characters in the device-make-and-model,
|
||||
* device-info, device-id, and device-location strings.
|
||||
*
|
||||
* @since CUPS 1.4@
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
+6
-8
@@ -59,7 +59,7 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define CUPS_VERSION 1.0400
|
||||
# define CUPS_VERSION 1.0399
|
||||
# define CUPS_VERSION_MAJOR 1
|
||||
# define CUPS_VERSION_MINOR 4
|
||||
# define CUPS_VERSION_PATCH -1
|
||||
@@ -74,7 +74,6 @@ extern "C" {
|
||||
# define CUPS_FORMAT_RAW "application/vnd.cups-raw"
|
||||
# define CUPS_FORMAT_TEXT "text/plain"
|
||||
# define CUPS_HTTP_DEFAULT (http_t *)0
|
||||
# define CUPS_INCLUDE_ALL (const char *)0
|
||||
# define CUPS_JOBID_ALL -1
|
||||
# define CUPS_JOBID_CURRENT 0
|
||||
# define CUPS_LENGTH_VARIABLE (ssize_t)0
|
||||
@@ -112,11 +111,11 @@ enum cups_ptype_e /**** Printer type/capability bit constants ****/
|
||||
CUPS_PRINTER_DEFAULT = 0x20000, /* Default printer on network */
|
||||
CUPS_PRINTER_FAX = 0x40000, /* Fax queue */
|
||||
CUPS_PRINTER_REJECTING = 0x80000, /* Printer is rejecting jobs */
|
||||
CUPS_PRINTER_DELETE = 0x100000, /* Delete printer @since CUPS 1.2/Mac OS X 10.5@ */
|
||||
CUPS_PRINTER_NOT_SHARED = 0x200000, /* Printer is not shared @since CUPS 1.2/Mac OS X 10.5@ */
|
||||
CUPS_PRINTER_AUTHENTICATED = 0x400000,/* Printer requires authentication @since CUPS 1.2/Mac OS X 10.5@ */
|
||||
CUPS_PRINTER_COMMANDS = 0x800000, /* Printer supports maintenance commands @since CUPS 1.2/Mac OS X 10.5@ */
|
||||
CUPS_PRINTER_DISCOVERED = 0x1000000, /* Printer was automatically discovered and added @since CUPS 1.3/Mac OS X 10.5@ */
|
||||
CUPS_PRINTER_DELETE = 0x100000, /* Delete printer @since CUPS 1.2@ */
|
||||
CUPS_PRINTER_NOT_SHARED = 0x200000, /* Printer is not shared @since CUPS 1.2@ */
|
||||
CUPS_PRINTER_AUTHENTICATED = 0x400000,/* Printer requires authentication @since CUPS 1.2@ */
|
||||
CUPS_PRINTER_COMMANDS = 0x800000, /* Printer supports maintenance commands @since CUPS 1.2@ */
|
||||
CUPS_PRINTER_DISCOVERED = 0x1000000, /* Printer was automatically discovered and added @since CUPS 1.3@ */
|
||||
CUPS_PRINTER_OPTIONS = 0x6fffc /* ~(CLASS | REMOTE | IMPLICIT | DEFAULT | FAX | REJECTING | DELETE | NOT_SHARED | AUTHENTICATED | COMMANDS | DISCOVERED) @private@ */
|
||||
};
|
||||
|
||||
@@ -283,7 +282,6 @@ extern ipp_status_t cupsFinishDocument(http_t *http,
|
||||
const char *name) _CUPS_API_1_4;
|
||||
extern ipp_status_t cupsGetDevices(http_t *http, int timeout,
|
||||
const char *exclude_schemes,
|
||||
const char *include_schemes,
|
||||
cups_device_cb_t callback,
|
||||
void *user_data) _CUPS_API_1_4;
|
||||
extern cups_dest_t *cupsGetNamedDest(http_t *http, const char *name,
|
||||
|
||||
+4
-4
@@ -42,7 +42,7 @@
|
||||
/*
|
||||
* 'ppdFindCustomOption()' - Find a custom option.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ppd_coption_t * /* O - Custom option or NULL */
|
||||
@@ -63,7 +63,7 @@ ppdFindCustomOption(ppd_file_t *ppd, /* I - PPD file */
|
||||
/*
|
||||
* 'ppdFindCustomParam()' - Find a parameter for a custom option.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ppd_cparam_t * /* O - Custom parameter or NULL */
|
||||
@@ -84,7 +84,7 @@ ppdFindCustomParam(ppd_coption_t *opt, /* I - Custom option */
|
||||
/*
|
||||
* 'ppdFirstCustomParam()' - Return the first parameter for a custom option.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ppd_cparam_t * /* O - Custom parameter or NULL */
|
||||
@@ -100,7 +100,7 @@ ppdFirstCustomParam(ppd_coption_t *opt) /* I - Custom option */
|
||||
/*
|
||||
* 'ppdNextCustomParam()' - Return the next parameter for a custom option.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ppd_cparam_t * /* O - Custom parameter or NULL */
|
||||
|
||||
+301
-477
@@ -31,21 +31,15 @@
|
||||
* server.
|
||||
* cupsSetDests2() - Save the list of destinations for the specified
|
||||
* server.
|
||||
* appleCopyLocations() - Copy the location history array.
|
||||
* appleCopyLocations() - Get the location history array.
|
||||
* appleCopyNetwork() - Get the network ID for the current location.
|
||||
* appleGetDefault() - Get the default printer for this location.
|
||||
* appleGetPaperSize() - Get the default paper size.
|
||||
* appleGetPrinter() - Get a printer from the history array.
|
||||
* appleSetDefault() - Set the default printer for this location.
|
||||
* appleUseLastPrinter() - Get the default printer preference value.
|
||||
* cups_add_dest() - Add a destination to the array.
|
||||
* cups_compare_dests() - Compare two destinations.
|
||||
* cups_find_dest() - Find a destination using a binary search.
|
||||
* cups_get_default() - Get the default destination from an lpoptions file.
|
||||
* cups_get_dests() - Get destinations from a file.
|
||||
* cups_get_sdests() - Get destinations from a server.
|
||||
* cups_make_string() - Make a comma-separated string of values from an IPP
|
||||
* attribute.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -66,7 +60,6 @@
|
||||
# include <sys/cdefs.h>
|
||||
# include <CoreFoundation/CoreFoundation.h>
|
||||
# include <SystemConfiguration/SystemConfiguration.h>
|
||||
# define kDefaultPaperIDKey CFSTR("DefaultPaperID")
|
||||
# define kLocationHistoryArrayKey CFSTR("kLocationHistoryArrayKeyTMP")
|
||||
# define kLocationNetworkKey CFSTR("kLocationNetworkKey")
|
||||
# define kLocationPrinterIDKey CFSTR("kLocationPrinterIDKey")
|
||||
@@ -83,27 +76,18 @@
|
||||
static CFArrayRef appleCopyLocations(void);
|
||||
static CFStringRef appleCopyNetwork(void);
|
||||
static char *appleGetDefault(char *name, int namesize);
|
||||
static char *appleGetPaperSize(char *name, int namesize);
|
||||
static CFStringRef appleGetPrinter(CFArrayRef locations, CFStringRef network,
|
||||
CFIndex *locindex);
|
||||
static void appleSetDefault(const char *name);
|
||||
static int appleUseLastPrinter(void);
|
||||
#endif /* __APPLE__ */
|
||||
static cups_dest_t *cups_add_dest(const char *name, const char *instance,
|
||||
int *num_dests, cups_dest_t **dests);
|
||||
static int cups_compare_dests(cups_dest_t *a, cups_dest_t *b);
|
||||
static int cups_find_dest(const char *name, const char *instance,
|
||||
int num_dests, cups_dest_t *dests, int prev,
|
||||
int *rdiff);
|
||||
static char *cups_get_default(const char *filename, char *namebuf,
|
||||
size_t namesize, const char **instance);
|
||||
size_t namesize, const char **instance);
|
||||
static int cups_get_dests(const char *filename, const char *match_name,
|
||||
const char *match_inst, int num_dests,
|
||||
cups_dest_t **dests);
|
||||
static int cups_get_sdests(http_t *http, ipp_op_t op, const char *name,
|
||||
int num_dests, cups_dest_t **dests);
|
||||
static char *cups_make_string(ipp_attribute_t *attr, char *buffer,
|
||||
size_t bufsize);
|
||||
|
||||
|
||||
/*
|
||||
@@ -130,46 +114,77 @@ cupsAddDest(const char *name, /* I - Destination name */
|
||||
int i; /* Looping var */
|
||||
cups_dest_t *dest; /* Destination pointer */
|
||||
cups_dest_t *parent; /* Parent destination */
|
||||
cups_option_t *doption, /* Current destination option */
|
||||
*poption; /* Current parent option */
|
||||
cups_option_t *option; /* Current option */
|
||||
|
||||
|
||||
if (!name || !dests)
|
||||
return (0);
|
||||
|
||||
if (!cupsGetDest(name, instance, num_dests, *dests))
|
||||
if (cupsGetDest(name, instance, num_dests, *dests))
|
||||
return (num_dests);
|
||||
|
||||
/*
|
||||
* Add new destination...
|
||||
*/
|
||||
|
||||
if (num_dests == 0)
|
||||
dest = malloc(sizeof(cups_dest_t));
|
||||
else
|
||||
dest = realloc(*dests, sizeof(cups_dest_t) * (num_dests + 1));
|
||||
|
||||
if (dest == NULL)
|
||||
return (num_dests);
|
||||
|
||||
*dests = dest;
|
||||
|
||||
/*
|
||||
* Find where to insert the destination...
|
||||
*/
|
||||
|
||||
for (i = num_dests; i > 0; i --, dest ++)
|
||||
if (strcasecmp(name, dest->name) < 0)
|
||||
break;
|
||||
else if (!instance && dest->instance)
|
||||
break;
|
||||
else if (!strcasecmp(name, dest->name) &&
|
||||
instance && dest->instance &&
|
||||
strcasecmp(instance, dest->instance) < 0)
|
||||
break;
|
||||
|
||||
if (i > 0)
|
||||
memmove(dest + 1, dest, i * sizeof(cups_dest_t));
|
||||
|
||||
/*
|
||||
* Initialize the destination...
|
||||
*/
|
||||
|
||||
dest->name = _cupsStrAlloc(name);
|
||||
dest->is_default = 0;
|
||||
dest->num_options = 0;
|
||||
dest->options = (cups_option_t *)0;
|
||||
|
||||
if (!instance)
|
||||
dest->instance = NULL;
|
||||
else
|
||||
{
|
||||
if (instance &&
|
||||
(parent = cupsGetDest(name, NULL, num_dests, *dests)) == NULL)
|
||||
return (num_dests);
|
||||
/*
|
||||
* Copy options from the primary instance...
|
||||
*/
|
||||
|
||||
dest = cups_add_dest(name, instance, &num_dests, dests);
|
||||
dest->instance = _cupsStrAlloc(instance);
|
||||
|
||||
if (instance && parent && parent->num_options > 0)
|
||||
if ((parent = cupsGetDest(name, NULL, num_dests + 1, *dests)) != NULL)
|
||||
{
|
||||
/*
|
||||
* Copy options from parent...
|
||||
*/
|
||||
|
||||
dest->options = calloc(sizeof(cups_option_t), parent->num_options);
|
||||
|
||||
if (dest->options)
|
||||
{
|
||||
dest->num_options = parent->num_options;
|
||||
|
||||
for (i = dest->num_options, doption = dest->options,
|
||||
poption = parent->options;
|
||||
i > 0;
|
||||
i --, doption ++, poption ++)
|
||||
{
|
||||
doption->name = _cupsStrRetain(poption->name);
|
||||
doption->value = _cupsStrRetain(poption->value);
|
||||
}
|
||||
}
|
||||
for (i = parent->num_options, option = parent->options;
|
||||
i > 0;
|
||||
i --, option ++)
|
||||
dest->num_options = cupsAddOption(option->name, option->value,
|
||||
dest->num_options,
|
||||
&(dest->options));
|
||||
}
|
||||
}
|
||||
|
||||
return (num_dests);
|
||||
return (num_dests + 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -213,8 +228,7 @@ cupsGetDest(const char *name, /* I - Destination name or @code NULL@ for the d
|
||||
int num_dests, /* I - Number of destinations */
|
||||
cups_dest_t *dests) /* I - Destinations */
|
||||
{
|
||||
int diff, /* Result of comparison */
|
||||
match; /* Matching index */
|
||||
int comp; /* Result of comparison */
|
||||
|
||||
|
||||
if (num_dests <= 0 || !dests)
|
||||
@@ -241,10 +255,21 @@ cupsGetDest(const char *name, /* I - Destination name or @code NULL@ for the d
|
||||
* Lookup name and optionally the instance...
|
||||
*/
|
||||
|
||||
match = cups_find_dest(name, instance, num_dests, dests, -1, &diff);
|
||||
while (num_dests > 0)
|
||||
{
|
||||
if ((comp = strcasecmp(name, dests->name)) < 0)
|
||||
return (NULL);
|
||||
else if (comp == 0)
|
||||
{
|
||||
if ((!instance && !dests->instance) ||
|
||||
(instance != NULL && dests->instance != NULL &&
|
||||
!strcasecmp(instance, dests->instance)))
|
||||
return (dests);
|
||||
}
|
||||
|
||||
if (!diff)
|
||||
return (dests + match);
|
||||
num_dests --;
|
||||
dests ++;
|
||||
}
|
||||
}
|
||||
|
||||
return (NULL);
|
||||
@@ -257,10 +282,7 @@ cupsGetDest(const char *name, /* I - Destination name or @code NULL@ for the d
|
||||
* Starting with CUPS 1.2, the returned list of destinations include the
|
||||
* printer-info, printer-is-accepting-jobs, printer-is-shared,
|
||||
* printer-make-and-model, printer-state, printer-state-change-time,
|
||||
* printer-state-reasons, and printer-type attributes as options. CUPS 1.4
|
||||
* adds the marker-change-time, marker-colors, marker-high-levels,
|
||||
* marker-levels, marker-low-levels, marker-message, marker-names,
|
||||
* marker-types, and printer-commands attributes as well.
|
||||
* printer-state-reasons, and printer-type attributes as options.
|
||||
*
|
||||
* Use the @link cupsFreeDests@ function to free the destination list and
|
||||
* the @link cupsGetDest@ function to find a particular destination.
|
||||
@@ -279,15 +301,12 @@ cupsGetDests(cups_dest_t **dests) /* O - Destinations */
|
||||
* Starting with CUPS 1.2, the returned list of destinations include the
|
||||
* printer-info, printer-is-accepting-jobs, printer-is-shared,
|
||||
* printer-make-and-model, printer-state, printer-state-change-time,
|
||||
* printer-state-reasons, and printer-type attributes as options. CUPS 1.4
|
||||
* adds the marker-change-time, marker-colors, marker-high-levels,
|
||||
* marker-levels, marker-low-levels, marker-message, marker-names,
|
||||
* marker-types, and printer-commands attributes as well.
|
||||
* printer-state-reasons, and printer-type attributes as options.
|
||||
*
|
||||
* Use the @link cupsFreeDests@ function to free the destination list and
|
||||
* the @link cupsGetDest@ function to find a particular destination.
|
||||
*
|
||||
* @since CUPS 1.1.21/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.21@
|
||||
*/
|
||||
|
||||
int /* O - Number of destinations */
|
||||
@@ -329,6 +348,8 @@ cupsGetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
|
||||
*/
|
||||
|
||||
num_dests = cups_get_sdests(http, CUPS_GET_PRINTERS, NULL, num_dests, dests);
|
||||
if (cupsLastError() < IPP_REDIRECTION_OTHER_SITE)
|
||||
num_dests = cups_get_sdests(http, CUPS_GET_CLASSES, NULL, num_dests, dests);
|
||||
|
||||
if (cupsLastError() >= IPP_REDIRECTION_OTHER_SITE)
|
||||
{
|
||||
@@ -592,7 +613,7 @@ cupsGetNamedDest(http_t *http, /* I - Connection to server or @code CUPS_HTT
|
||||
* @link cupsSetDests@ or @link cupsSetDests2@ functions to save the new
|
||||
* options for the user.
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
int /* O - New number of destinations */
|
||||
@@ -638,7 +659,7 @@ cupsRemoveDest(const char *name, /* I - Destination name */
|
||||
/*
|
||||
* 'cupsSetDefaultDest()' - Set the default destination.
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -693,7 +714,7 @@ cupsSetDests(int num_dests, /* I - Number of destinations */
|
||||
* This function saves the destinations to /etc/cups/lpoptions when run
|
||||
* as root and ~/.cups/lpoptions when run as a normal user.
|
||||
*
|
||||
* @since CUPS 1.1.21/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.21@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on error */
|
||||
@@ -730,12 +751,7 @@ cupsSetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
|
||||
*/
|
||||
|
||||
num_temps = cups_get_sdests(http, CUPS_GET_PRINTERS, NULL, 0, &temps);
|
||||
|
||||
if (cupsLastError() >= IPP_REDIRECTION_OTHER_SITE)
|
||||
{
|
||||
cupsFreeDests(num_temps, temps);
|
||||
return (-1);
|
||||
}
|
||||
num_temps = cups_get_sdests(http, CUPS_GET_CLASSES, NULL, num_temps, &temps);
|
||||
|
||||
/*
|
||||
* Figure out which file to write to...
|
||||
@@ -1066,36 +1082,6 @@ appleGetDefault(char *name, /* I - Name buffer */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'appleGetPaperSize()' - Get the default paper size.
|
||||
*/
|
||||
|
||||
static char * /* O - Default paper size */
|
||||
appleGetPaperSize(char *name, /* I - Paper size name buffer */
|
||||
int namesize) /* I - Size of buffer */
|
||||
{
|
||||
CFStringRef defaultPaperID; /* Default paper ID */
|
||||
|
||||
|
||||
defaultPaperID = CFPreferencesCopyAppValue(kDefaultPaperIDKey,
|
||||
kPMPrintingPreferences);
|
||||
if (!defaultPaperID ||
|
||||
CFGetTypeID(defaultPaperID) != CFStringGetTypeID() ||
|
||||
!CFStringGetCString(defaultPaperID, name, namesize,
|
||||
kCFStringEncodingUTF8))
|
||||
name[0] = '\0';
|
||||
else if (!strncmp(name, "na-", 3))
|
||||
_cups_strcpy(name, name + 3);
|
||||
else if (!strncmp(name, "iso-", 4))
|
||||
_cups_strcpy(name, name + 4);
|
||||
|
||||
if (defaultPaperID)
|
||||
CFRelease(defaultPaperID);
|
||||
|
||||
return (name);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'appleGetPrinter()' - Get a printer from the history array.
|
||||
*/
|
||||
@@ -1267,200 +1253,6 @@ appleUseLastPrinter(void)
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_add_dest()' - Add a destination to the array.
|
||||
*
|
||||
* Unlike cupsAddDest(), this function does not check for duplicates.
|
||||
*/
|
||||
|
||||
static cups_dest_t * /* O - New destination */
|
||||
cups_add_dest(const char *name, /* I - Name of destination */
|
||||
const char *instance, /* I - Instance or NULL */
|
||||
int *num_dests, /* IO - Number of destinations */
|
||||
cups_dest_t **dests) /* IO - Destinations */
|
||||
{
|
||||
int insert, /* Insertion point */
|
||||
diff; /* Result of comparison */
|
||||
cups_dest_t *dest; /* Destination pointer */
|
||||
|
||||
|
||||
/*
|
||||
* Add new destination...
|
||||
*/
|
||||
|
||||
if (*num_dests == 0)
|
||||
dest = malloc(sizeof(cups_dest_t));
|
||||
else
|
||||
dest = realloc(*dests, sizeof(cups_dest_t) * (*num_dests + 1));
|
||||
|
||||
if (!dest)
|
||||
return (NULL);
|
||||
|
||||
*dests = dest;
|
||||
|
||||
/*
|
||||
* Find where to insert the destination...
|
||||
*/
|
||||
|
||||
if (*num_dests == 0)
|
||||
insert = 0;
|
||||
else
|
||||
{
|
||||
insert = cups_find_dest(name, instance, *num_dests, *dests, *num_dests - 1,
|
||||
&diff);
|
||||
|
||||
if (diff > 0)
|
||||
insert ++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Move the array elements as needed...
|
||||
*/
|
||||
|
||||
if (insert < *num_dests)
|
||||
memmove(*dests + insert + 1, *dests + insert,
|
||||
(*num_dests - insert) * sizeof(cups_dest_t));
|
||||
|
||||
(*num_dests) ++;
|
||||
|
||||
/*
|
||||
* Initialize the destination...
|
||||
*/
|
||||
|
||||
dest = *dests + insert;
|
||||
dest->name = _cupsStrAlloc(name);
|
||||
dest->instance = _cupsStrAlloc(instance);
|
||||
dest->is_default = 0;
|
||||
dest->num_options = 0;
|
||||
dest->options = (cups_option_t *)0;
|
||||
|
||||
return (dest);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_compare_dests()' - Compare two destinations.
|
||||
*/
|
||||
|
||||
static int /* O - Result of comparison */
|
||||
cups_compare_dests(cups_dest_t *a, /* I - First destination */
|
||||
cups_dest_t *b) /* I - Second destination */
|
||||
{
|
||||
int diff; /* Difference */
|
||||
|
||||
|
||||
if ((diff = strcasecmp(a->name, b->name)) != 0)
|
||||
return (diff);
|
||||
else if (a->instance && b->instance)
|
||||
return (strcasecmp(a->instance, b->instance));
|
||||
else
|
||||
return ((a->instance && !b->instance) - (!a->instance && b->instance));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_find_dest()' - Find a destination using a binary search.
|
||||
*/
|
||||
|
||||
static int /* O - Index of match */
|
||||
cups_find_dest(const char *name, /* I - Destination name */
|
||||
const char *instance, /* I - Instance or NULL */
|
||||
int num_dests, /* I - Number of destinations */
|
||||
cups_dest_t *dests, /* I - Destinations */
|
||||
int prev, /* I - Previous index */
|
||||
int *rdiff) /* O - Difference of match */
|
||||
{
|
||||
int left, /* Low mark for binary search */
|
||||
right, /* High mark for binary search */
|
||||
current, /* Current index */
|
||||
diff; /* Result of comparison */
|
||||
cups_dest_t key; /* Search key */
|
||||
|
||||
|
||||
key.name = (char *)name;
|
||||
key.instance = (char *)instance;
|
||||
|
||||
if (prev >= 0)
|
||||
{
|
||||
/*
|
||||
* Start search on either side of previous...
|
||||
*/
|
||||
|
||||
if ((diff = cups_compare_dests(&key, dests + prev)) == 0 ||
|
||||
(diff < 0 && prev == 0) ||
|
||||
(diff > 0 && prev == (num_dests - 1)))
|
||||
{
|
||||
*rdiff = diff;
|
||||
return (prev);
|
||||
}
|
||||
else if (diff < 0)
|
||||
{
|
||||
/*
|
||||
* Start with previous on right side...
|
||||
*/
|
||||
|
||||
left = 0;
|
||||
right = prev;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Start wih previous on left side...
|
||||
*/
|
||||
|
||||
left = prev;
|
||||
right = num_dests - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Start search in the middle...
|
||||
*/
|
||||
|
||||
left = 0;
|
||||
right = num_dests - 1;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
current = (left + right) / 2;
|
||||
diff = cups_compare_dests(&key, dests + current);
|
||||
|
||||
if (diff == 0)
|
||||
break;
|
||||
else if (diff < 0)
|
||||
right = current;
|
||||
else
|
||||
left = current;
|
||||
}
|
||||
while ((right - left) > 1);
|
||||
|
||||
if (diff != 0)
|
||||
{
|
||||
/*
|
||||
* Check the last 1 or 2 elements...
|
||||
*/
|
||||
|
||||
if ((diff = cups_compare_dests(&key, dests + left)) <= 0)
|
||||
current = left;
|
||||
else
|
||||
{
|
||||
diff = cups_compare_dests(&key, dests + right);
|
||||
current = right;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the closest destination and the difference...
|
||||
*/
|
||||
|
||||
*rdiff = diff;
|
||||
|
||||
return (current);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_get_default()' - Get the default destination from an lpoptions file.
|
||||
*/
|
||||
@@ -1708,13 +1500,21 @@ cups_get_sdests(http_t *http, /* I - Connection to server or CUPS_HTTP_DEFA
|
||||
ipp_t *request, /* IPP Request */
|
||||
*response; /* IPP Response */
|
||||
ipp_attribute_t *attr; /* Current attribute */
|
||||
const char *printer_name; /* printer-name attribute */
|
||||
char uri[1024]; /* printer-uri value */
|
||||
int accepting, /* printer-is-accepting-jobs attribute */
|
||||
shared, /* printer-is-shared attribute */
|
||||
state, /* printer-state attribute */
|
||||
change_time, /* printer-state-change-time attribute */
|
||||
type; /* printer-type attribute */
|
||||
const char *info, /* printer-info attribute */
|
||||
*location, /* printer-location attribute */
|
||||
*make_model, /* printer-make-and-model attribute */
|
||||
*printer_name; /* printer-name attribute */
|
||||
char uri[1024], /* printer-uri value */
|
||||
job_sheets[1024], /* job-sheets-default attribute */
|
||||
auth_info_req[1024], /* auth-info-required attribute */
|
||||
reasons[1024]; /* printer-state-reasons attribute */
|
||||
int num_options; /* Number of options */
|
||||
cups_option_t *options; /* Options */
|
||||
#ifdef __APPLE__
|
||||
char media_default[41]; /* Default paper size */
|
||||
#endif /* __APPLE__ */
|
||||
char optname[1024], /* Option name */
|
||||
value[2048], /* Option value */
|
||||
*ptr; /* Pointer into name/value */
|
||||
@@ -1722,18 +1522,6 @@ cups_get_sdests(http_t *http, /* I - Connection to server or CUPS_HTTP_DEFA
|
||||
{
|
||||
"auth-info-required",
|
||||
"job-sheets-default",
|
||||
"marker-change-time",
|
||||
"marker-colors",
|
||||
"marker-high-levels",
|
||||
"marker-levels",
|
||||
"marker-low-levels",
|
||||
"marker-message",
|
||||
"marker-names",
|
||||
"marker-types",
|
||||
#ifdef __APPLE__
|
||||
"media-supported",
|
||||
#endif /* __APPLE__ */
|
||||
"printer-commands",
|
||||
"printer-info",
|
||||
"printer-is-accepting-jobs",
|
||||
"printer-is-shared",
|
||||
@@ -1748,22 +1536,13 @@ cups_get_sdests(http_t *http, /* I - Connection to server or CUPS_HTTP_DEFA
|
||||
};
|
||||
|
||||
|
||||
#ifdef __APPLE__
|
||||
/*
|
||||
* Get the default paper size...
|
||||
*/
|
||||
|
||||
appleGetPaperSize(media_default, sizeof(media_default));
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
/*
|
||||
* Build a CUPS_GET_PRINTERS or IPP_GET_PRINTER_ATTRIBUTES request, which
|
||||
* require the following attributes:
|
||||
* Build a CUPS_GET_PRINTERS or CUPS_GET_CLASSES request, which require
|
||||
* the following attributes:
|
||||
*
|
||||
* attributes-charset
|
||||
* attributes-natural-language
|
||||
* requesting-user-name
|
||||
* printer-uri [for IPP_GET_PRINTER_ATTRIBUTES]
|
||||
*/
|
||||
|
||||
request = ippNewRequest(op);
|
||||
@@ -1805,71 +1584,90 @@ cups_get_sdests(http_t *http, /* I - Connection to server or CUPS_HTTP_DEFA
|
||||
* Pull the needed attributes from this printer...
|
||||
*/
|
||||
|
||||
accepting = 0;
|
||||
change_time = 0;
|
||||
info = NULL;
|
||||
location = NULL;
|
||||
make_model = NULL;
|
||||
printer_name = NULL;
|
||||
num_options = 0;
|
||||
options = NULL;
|
||||
shared = 1;
|
||||
state = IPP_PRINTER_IDLE;
|
||||
type = CUPS_PRINTER_LOCAL;
|
||||
|
||||
for (; attr && attr->group_tag == IPP_TAG_PRINTER; attr = attr->next)
|
||||
auth_info_req[0] = '\0';
|
||||
job_sheets[0] = '\0';
|
||||
reasons[0] = '\0';
|
||||
|
||||
while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
|
||||
{
|
||||
if (attr->value_tag != IPP_TAG_INTEGER &&
|
||||
attr->value_tag != IPP_TAG_ENUM &&
|
||||
attr->value_tag != IPP_TAG_BOOLEAN &&
|
||||
attr->value_tag != IPP_TAG_TEXT &&
|
||||
attr->value_tag != IPP_TAG_TEXTLANG &&
|
||||
attr->value_tag != IPP_TAG_NAME &&
|
||||
attr->value_tag != IPP_TAG_NAMELANG &&
|
||||
attr->value_tag != IPP_TAG_KEYWORD &&
|
||||
attr->value_tag != IPP_TAG_RANGE)
|
||||
continue;
|
||||
|
||||
if (!strcmp(attr->name, "auth-info-required") ||
|
||||
!strcmp(attr->name, "marker-change-time") ||
|
||||
!strcmp(attr->name, "marker-colors") ||
|
||||
!strcmp(attr->name, "marker-high-levels") ||
|
||||
!strcmp(attr->name, "marker-levels") ||
|
||||
!strcmp(attr->name, "marker-low-levels") ||
|
||||
!strcmp(attr->name, "marker-message") ||
|
||||
!strcmp(attr->name, "marker-names") ||
|
||||
!strcmp(attr->name, "marker-types") ||
|
||||
!strcmp(attr->name, "printer-commands") ||
|
||||
!strcmp(attr->name, "printer-info") ||
|
||||
!strcmp(attr->name, "printer-is-shared") ||
|
||||
!strcmp(attr->name, "printer-make-and-model") ||
|
||||
!strcmp(attr->name, "printer-state") ||
|
||||
!strcmp(attr->name, "printer-state-change-time") ||
|
||||
!strcmp(attr->name, "printer-type") ||
|
||||
!strcmp(attr->name, "printer-is-accepting-jobs") ||
|
||||
!strcmp(attr->name, "printer-location") ||
|
||||
!strcmp(attr->name, "printer-state-reasons"))
|
||||
if (!strcmp(attr->name, "auth-info-required") &&
|
||||
attr->value_tag == IPP_TAG_KEYWORD)
|
||||
{
|
||||
/*
|
||||
* Add a printer description attribute...
|
||||
*/
|
||||
strlcpy(auth_info_req, attr->values[0].string.text,
|
||||
sizeof(auth_info_req));
|
||||
|
||||
num_options = cupsAddOption(attr->name,
|
||||
cups_make_string(attr, value,
|
||||
sizeof(value)),
|
||||
num_options, &options);
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
else if (!strcmp(attr->name, "media-supported"))
|
||||
{
|
||||
/*
|
||||
* See if we can set a default media size...
|
||||
*/
|
||||
|
||||
for (i = 0; i < attr->num_values; i ++)
|
||||
if (!strcasecmp(media_default, attr->values[i].string.text))
|
||||
{
|
||||
num_options = cupsAddOption("media", media_default, num_options,
|
||||
&options);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
for (i = 1, ptr = auth_info_req + strlen(auth_info_req);
|
||||
i < attr->num_values;
|
||||
i ++)
|
||||
{
|
||||
snprintf(ptr, sizeof(auth_info_req) - (ptr - auth_info_req), ",%s",
|
||||
attr->values[i].string.text);
|
||||
ptr += strlen(ptr);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(attr->name, "job-sheets-default") &&
|
||||
(attr->value_tag == IPP_TAG_KEYWORD ||
|
||||
attr->value_tag == IPP_TAG_NAME))
|
||||
{
|
||||
if (attr->num_values == 2)
|
||||
snprintf(job_sheets, sizeof(job_sheets), "%s,%s",
|
||||
attr->values[0].string.text, attr->values[1].string.text);
|
||||
else
|
||||
strlcpy(job_sheets, attr->values[0].string.text,
|
||||
sizeof(job_sheets));
|
||||
}
|
||||
else if (!strcmp(attr->name, "printer-info") &&
|
||||
attr->value_tag == IPP_TAG_TEXT)
|
||||
info = attr->values[0].string.text;
|
||||
else if (!strcmp(attr->name, "printer-is-accepting-jobs") &&
|
||||
attr->value_tag == IPP_TAG_BOOLEAN)
|
||||
accepting = attr->values[0].boolean;
|
||||
else if (!strcmp(attr->name, "printer-is-shared") &&
|
||||
attr->value_tag == IPP_TAG_BOOLEAN)
|
||||
shared = attr->values[0].boolean;
|
||||
else if (!strcmp(attr->name, "printer-location") &&
|
||||
attr->value_tag == IPP_TAG_TEXT)
|
||||
location = attr->values[0].string.text;
|
||||
else if (!strcmp(attr->name, "printer-make-and-model") &&
|
||||
attr->value_tag == IPP_TAG_TEXT)
|
||||
make_model = attr->values[0].string.text;
|
||||
else if (!strcmp(attr->name, "printer-name") &&
|
||||
attr->value_tag == IPP_TAG_NAME)
|
||||
printer_name = attr->values[0].string.text;
|
||||
else if (!strcmp(attr->name, "printer-state") &&
|
||||
attr->value_tag == IPP_TAG_ENUM)
|
||||
state = attr->values[0].integer;
|
||||
else if (!strcmp(attr->name, "printer-state-change-time") &&
|
||||
attr->value_tag == IPP_TAG_INTEGER)
|
||||
change_time = attr->values[0].integer;
|
||||
else if (!strcmp(attr->name, "printer-state-reasons") &&
|
||||
attr->value_tag == IPP_TAG_KEYWORD)
|
||||
{
|
||||
strlcpy(reasons, attr->values[0].string.text, sizeof(reasons));
|
||||
for (i = 1, ptr = reasons + strlen(reasons);
|
||||
i < attr->num_values;
|
||||
i ++)
|
||||
{
|
||||
snprintf(ptr, sizeof(reasons) - (ptr - reasons), ",%s",
|
||||
attr->values[i].string.text);
|
||||
ptr += strlen(ptr);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(attr->name, "printer-type") &&
|
||||
attr->value_tag == IPP_TAG_ENUM)
|
||||
type = attr->values[0].integer;
|
||||
else if (strncmp(attr->name, "notify-", 7) &&
|
||||
(attr->value_tag == IPP_TAG_BOOLEAN ||
|
||||
attr->value_tag == IPP_TAG_ENUM ||
|
||||
@@ -1877,22 +1675,75 @@ cups_get_sdests(http_t *http, /* I - Connection to server or CUPS_HTTP_DEFA
|
||||
attr->value_tag == IPP_TAG_KEYWORD ||
|
||||
attr->value_tag == IPP_TAG_NAME ||
|
||||
attr->value_tag == IPP_TAG_RANGE) &&
|
||||
(ptr = strstr(attr->name, "-default")) != NULL)
|
||||
strstr(attr->name, "-default"))
|
||||
{
|
||||
char *valptr; /* Pointer into attribute value */
|
||||
|
||||
|
||||
/*
|
||||
* Add a default option...
|
||||
*/
|
||||
|
||||
strlcpy(optname, attr->name, sizeof(optname));
|
||||
optname[ptr - attr->name] = '\0';
|
||||
if ((ptr = strstr(optname, "-default")) != NULL)
|
||||
*ptr = '\0';
|
||||
|
||||
if (strcasecmp(optname, "media") ||
|
||||
!cupsGetOption("media", num_options, options))
|
||||
num_options = cupsAddOption(optname,
|
||||
cups_make_string(attr, value,
|
||||
sizeof(value)),
|
||||
num_options, &options);
|
||||
value[0] = '\0';
|
||||
for (i = 0, ptr = value; i < attr->num_values; i ++)
|
||||
{
|
||||
if (ptr >= (value + sizeof(value) - 1))
|
||||
break;
|
||||
|
||||
if (i)
|
||||
*ptr++ = ',';
|
||||
|
||||
switch (attr->value_tag)
|
||||
{
|
||||
case IPP_TAG_INTEGER :
|
||||
case IPP_TAG_ENUM :
|
||||
snprintf(ptr, sizeof(value) - (ptr - value), "%d",
|
||||
attr->values[i].integer);
|
||||
break;
|
||||
|
||||
case IPP_TAG_BOOLEAN :
|
||||
if (attr->values[i].boolean)
|
||||
strlcpy(ptr, "true", sizeof(value) - (ptr - value));
|
||||
else
|
||||
strlcpy(ptr, "false", sizeof(value) - (ptr - value));
|
||||
break;
|
||||
|
||||
case IPP_TAG_RANGE :
|
||||
if (attr->values[i].range.lower ==
|
||||
attr->values[i].range.upper)
|
||||
snprintf(ptr, sizeof(value) - (ptr - value), "%d",
|
||||
attr->values[i].range.lower);
|
||||
else
|
||||
snprintf(ptr, sizeof(value) - (ptr - value), "%d-%d",
|
||||
attr->values[i].range.lower,
|
||||
attr->values[i].range.upper);
|
||||
break;
|
||||
|
||||
default :
|
||||
for (valptr = attr->values[i].string.text;
|
||||
*valptr && ptr < (value + sizeof(value) - 2);)
|
||||
{
|
||||
if (strchr(" \t\n\\\'\"", *valptr))
|
||||
*ptr++ = '\\';
|
||||
|
||||
*ptr++ = *valptr++;
|
||||
}
|
||||
|
||||
*ptr = '\0';
|
||||
break;
|
||||
}
|
||||
|
||||
ptr += strlen(ptr);
|
||||
}
|
||||
|
||||
num_options = cupsAddOption(optname, value, num_options, &options);
|
||||
}
|
||||
|
||||
attr = attr->next;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1909,13 +1760,76 @@ cups_get_sdests(http_t *http, /* I - Connection to server or CUPS_HTTP_DEFA
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((dest = cups_add_dest(printer_name, NULL, &num_dests, dests)) != NULL)
|
||||
num_dests = cupsAddDest(printer_name, NULL, num_dests, dests);
|
||||
|
||||
if ((dest = cupsGetDest(printer_name, NULL, num_dests, *dests)) != NULL)
|
||||
{
|
||||
dest->num_options = num_options;
|
||||
dest->options = options;
|
||||
|
||||
num_options = 0;
|
||||
options = NULL;
|
||||
|
||||
if (auth_info_req[0])
|
||||
dest->num_options = cupsAddOption("auth-info-required", auth_info_req,
|
||||
dest->num_options,
|
||||
&(dest->options));
|
||||
|
||||
if (job_sheets[0])
|
||||
dest->num_options = cupsAddOption("job-sheets", job_sheets,
|
||||
dest->num_options,
|
||||
&(dest->options));
|
||||
|
||||
if (info)
|
||||
dest->num_options = cupsAddOption("printer-info", info,
|
||||
dest->num_options,
|
||||
&(dest->options));
|
||||
|
||||
sprintf(value, "%d", accepting);
|
||||
dest->num_options = cupsAddOption("printer-is-accepting-jobs", value,
|
||||
dest->num_options,
|
||||
&(dest->options));
|
||||
|
||||
sprintf(value, "%d", shared);
|
||||
dest->num_options = cupsAddOption("printer-is-shared", value,
|
||||
dest->num_options,
|
||||
&(dest->options));
|
||||
|
||||
if (location)
|
||||
dest->num_options = cupsAddOption("printer-location",
|
||||
location, dest->num_options,
|
||||
&(dest->options));
|
||||
|
||||
if (make_model)
|
||||
dest->num_options = cupsAddOption("printer-make-and-model",
|
||||
make_model, dest->num_options,
|
||||
&(dest->options));
|
||||
|
||||
sprintf(value, "%d", state);
|
||||
dest->num_options = cupsAddOption("printer-state", value,
|
||||
dest->num_options,
|
||||
&(dest->options));
|
||||
|
||||
if (change_time)
|
||||
{
|
||||
sprintf(value, "%d", change_time);
|
||||
dest->num_options = cupsAddOption("printer-state-change-time", value,
|
||||
dest->num_options,
|
||||
&(dest->options));
|
||||
}
|
||||
|
||||
if (reasons[0])
|
||||
dest->num_options = cupsAddOption("printer-state-reasons", reasons,
|
||||
dest->num_options,
|
||||
&(dest->options));
|
||||
|
||||
sprintf(value, "%d", type);
|
||||
dest->num_options = cupsAddOption("printer-type", value,
|
||||
dest->num_options,
|
||||
&(dest->options));
|
||||
}
|
||||
else
|
||||
cupsFreeOptions(num_options, options);
|
||||
|
||||
cupsFreeOptions(num_options, options);
|
||||
|
||||
if (attr == NULL)
|
||||
break;
|
||||
@@ -1932,96 +1846,6 @@ cups_get_sdests(http_t *http, /* I - Connection to server or CUPS_HTTP_DEFA
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_make_string()' - Make a comma-separated string of values from an IPP
|
||||
* attribute.
|
||||
*/
|
||||
|
||||
static char * /* O - New string */
|
||||
cups_make_string(
|
||||
ipp_attribute_t *attr, /* I - Attribute to convert */
|
||||
char *buffer, /* I - Buffer */
|
||||
size_t bufsize) /* I - Size of buffer */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
char *ptr, /* Pointer into buffer */
|
||||
*end, /* Pointer to end of buffer */
|
||||
*valptr; /* Pointer into string attribute */
|
||||
|
||||
|
||||
/*
|
||||
* Return quickly if we have a single string value...
|
||||
*/
|
||||
|
||||
if (attr->num_values == 1 &&
|
||||
attr->value_tag != IPP_TAG_INTEGER &&
|
||||
attr->value_tag != IPP_TAG_ENUM &&
|
||||
attr->value_tag != IPP_TAG_BOOLEAN &&
|
||||
attr->value_tag != IPP_TAG_RANGE)
|
||||
return (attr->values[0].string.text);
|
||||
|
||||
/*
|
||||
* Copy the values to the string, separating with commas and escaping strings
|
||||
* as needed...
|
||||
*/
|
||||
|
||||
end = buffer + bufsize - 1;
|
||||
|
||||
for (i = 0, ptr = buffer; i < attr->num_values && ptr < end; i ++)
|
||||
{
|
||||
if (i)
|
||||
*ptr++ = ',';
|
||||
|
||||
switch (attr->value_tag)
|
||||
{
|
||||
case IPP_TAG_INTEGER :
|
||||
case IPP_TAG_ENUM :
|
||||
snprintf(ptr, end - ptr + 1, "%d", attr->values[i].integer);
|
||||
break;
|
||||
|
||||
case IPP_TAG_BOOLEAN :
|
||||
if (attr->values[i].boolean)
|
||||
strlcpy(ptr, "true", end - ptr + 1);
|
||||
else
|
||||
strlcpy(ptr, "false", end - ptr + 1);
|
||||
break;
|
||||
|
||||
case IPP_TAG_RANGE :
|
||||
if (attr->values[i].range.lower == attr->values[i].range.upper)
|
||||
snprintf(ptr, end - ptr + 1, "%d", attr->values[i].range.lower);
|
||||
else
|
||||
snprintf(ptr, end - ptr + 1, "%d-%d", attr->values[i].range.lower,
|
||||
attr->values[i].range.upper);
|
||||
break;
|
||||
|
||||
default :
|
||||
for (valptr = attr->values[i].string.text;
|
||||
*valptr && ptr < end;)
|
||||
{
|
||||
if (strchr(" \t\n\\\'\"", *valptr))
|
||||
{
|
||||
if (ptr >= (end - 1))
|
||||
break;
|
||||
|
||||
*ptr++ = '\\';
|
||||
}
|
||||
|
||||
*ptr++ = *valptr++;
|
||||
}
|
||||
|
||||
*ptr = '\0';
|
||||
break;
|
||||
}
|
||||
|
||||
ptr += strlen(ptr);
|
||||
}
|
||||
|
||||
*ptr = '\0';
|
||||
|
||||
return (buffer);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
*/
|
||||
|
||||
+8
-8
@@ -81,7 +81,7 @@ _cups_dir_time(FILETIME ft) /* I - File time */
|
||||
/*
|
||||
* 'cupsDirClose()' - Close a directory.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -112,7 +112,7 @@ cupsDirClose(cups_dir_t *dp) /* I - Directory pointer */
|
||||
/*
|
||||
* 'cupsDirOpen()' - Open a directory.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
cups_dir_t * /* O - Directory pointer or @code NULL@ if the directory could not be opened. */
|
||||
@@ -155,7 +155,7 @@ cupsDirOpen(const char *directory) /* I - Directory name */
|
||||
/*
|
||||
* 'cupsDirRead()' - Read the next directory entry.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
cups_dentry_t * /* O - Directory entry or @code NULL@ if there are no more */
|
||||
@@ -215,7 +215,7 @@ cupsDirRead(cups_dir_t *dp) /* I - Directory pointer */
|
||||
/*
|
||||
* 'cupsDirRewind()' - Rewind to the start of the directory.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -265,7 +265,7 @@ struct _cups_dir_s /**** Directory data structure ****/
|
||||
/*
|
||||
* 'cupsDirClose()' - Close a directory.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -292,7 +292,7 @@ cupsDirClose(cups_dir_t *dp) /* I - Directory pointer */
|
||||
/*
|
||||
* 'cupsDirOpen()' - Open a directory.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
cups_dir_t * /* O - Directory pointer or @code NULL@ if the directory could not be opened. */
|
||||
@@ -346,7 +346,7 @@ cupsDirOpen(const char *directory) /* I - Directory name */
|
||||
/*
|
||||
* 'cupsDirRead()' - Read the next directory entry.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
cups_dentry_t * /* O - Directory entry or @code NULL@ when there are no more */
|
||||
@@ -443,7 +443,7 @@ cupsDirRead(cups_dir_t *dp) /* I - Directory pointer */
|
||||
/*
|
||||
* 'cupsDirRewind()' - Rewind to the start of the directory.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
+4
-4
@@ -92,7 +92,7 @@ ppdCollect(ppd_file_t *ppd, /* I - PPD file data */
|
||||
* The choices array should be freed using @code free@ when you are
|
||||
* finished with it.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - Number of options marked */
|
||||
@@ -265,7 +265,7 @@ ppdEmit(ppd_file_t *ppd, /* I - PPD file record */
|
||||
*
|
||||
* When "limit" is zero, this function is identical to ppdEmit().
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on failure */
|
||||
@@ -511,7 +511,7 @@ ppdEmitJCL(ppd_file_t *ppd, /* I - PPD file record */
|
||||
/*
|
||||
* 'ppdEmitJCLEnd()' - Emit JCLEnd code to a file.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on failure */
|
||||
@@ -570,7 +570,7 @@ ppdEmitJCLEnd(ppd_file_t *ppd, /* I - PPD file record */
|
||||
* The return string is allocated on the heap and should be freed using
|
||||
* @code free@ when you are done with it.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
char * /* O - String containing option code or @code NULL@ if there is no option code */
|
||||
|
||||
+11
-16
@@ -51,7 +51,6 @@ static const _ipp_option_t ipp_options[] =
|
||||
{ 0, "brightness-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
{ 0, "columns", IPP_TAG_INTEGER, IPP_TAG_JOB },
|
||||
{ 0, "columns-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
{ 0, "compression", IPP_TAG_KEYWORD, IPP_TAG_OPERATION },
|
||||
{ 0, "copies", IPP_TAG_INTEGER, IPP_TAG_JOB },
|
||||
{ 0, "copies-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
{ 0, "document-format", IPP_TAG_MIMETYPE, IPP_TAG_OPERATION },
|
||||
@@ -59,15 +58,12 @@ static const _ipp_option_t ipp_options[] =
|
||||
{ 1, "exclude-schemes", IPP_TAG_NAME, IPP_TAG_OPERATION },
|
||||
{ 1, "finishings", IPP_TAG_ENUM, IPP_TAG_JOB },
|
||||
{ 1, "finishings-default", IPP_TAG_ENUM, IPP_TAG_PRINTER },
|
||||
{ 0, "fit-to-page", IPP_TAG_BOOLEAN, IPP_TAG_JOB },
|
||||
{ 0, "fit-to-page-default", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
|
||||
{ 0, "fitplot", IPP_TAG_BOOLEAN, IPP_TAG_JOB },
|
||||
{ 0, "fitplot-default", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
|
||||
{ 0, "gamma", IPP_TAG_INTEGER, IPP_TAG_JOB },
|
||||
{ 0, "gamma-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
{ 0, "hue", IPP_TAG_INTEGER, IPP_TAG_JOB },
|
||||
{ 0, "hue-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
{ 1, "include-schemes", IPP_TAG_NAME, IPP_TAG_OPERATION },
|
||||
{ 0, "job-impressions", IPP_TAG_INTEGER, IPP_TAG_JOB },
|
||||
{ 0, "job-k-limit", IPP_TAG_INTEGER, IPP_TAG_JOB },
|
||||
{ 0, "job-page-limit", IPP_TAG_INTEGER, IPP_TAG_JOB },
|
||||
@@ -77,14 +73,6 @@ static const _ipp_option_t ipp_options[] =
|
||||
{ 1, "job-sheets-default", IPP_TAG_NAME, IPP_TAG_PRINTER },
|
||||
{ 0, "job-uuid", IPP_TAG_URI, IPP_TAG_JOB },
|
||||
{ 0, "landscape", IPP_TAG_BOOLEAN, IPP_TAG_JOB },
|
||||
{ 1, "marker-change-time", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
{ 1, "marker-colors", IPP_TAG_NAME, IPP_TAG_PRINTER },
|
||||
{ 1, "marker-high-levels", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
{ 1, "marker-levels", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
{ 1, "marker-low-levels", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
{ 0, "marker-message", IPP_TAG_TEXT, IPP_TAG_PRINTER },
|
||||
{ 1, "marker-names", IPP_TAG_NAME, IPP_TAG_PRINTER },
|
||||
{ 1, "marker-types", IPP_TAG_KEYWORD, IPP_TAG_PRINTER },
|
||||
{ 1, "media", IPP_TAG_KEYWORD, IPP_TAG_JOB },
|
||||
{ 0, "mirror", IPP_TAG_BOOLEAN, IPP_TAG_JOB },
|
||||
{ 0, "mirror-default", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
|
||||
@@ -123,7 +111,6 @@ static const _ipp_option_t ipp_options[] =
|
||||
{ 0, "prettyprint-default", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
|
||||
{ 0, "print-quality", IPP_TAG_ENUM, IPP_TAG_JOB },
|
||||
{ 0, "print-quality-default", IPP_TAG_ENUM, IPP_TAG_PRINTER },
|
||||
{ 1, "printer-commands", IPP_TAG_KEYWORD, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-error-policy", IPP_TAG_NAME, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-info", IPP_TAG_TEXT, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-is-accepting-jobs", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
|
||||
@@ -195,7 +182,7 @@ cupsEncodeOptions(ipp_t *ipp, /* I - Request to add to */
|
||||
* function multiple times for each group, or use cupsEncodeOptions()
|
||||
* to add the standard groups.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -354,7 +341,15 @@ cupsEncodeOptions2(
|
||||
* Copy the name over...
|
||||
*/
|
||||
|
||||
attr->name = _cupsStrAlloc(option->name);
|
||||
if ((attr->name = _cupsStrAlloc(option->name)) == NULL)
|
||||
{
|
||||
/*
|
||||
* Ran out of memory!
|
||||
*/
|
||||
|
||||
DEBUG_puts("cupsEncodeOptions2: Ran out of memory for name!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (count > 1)
|
||||
{
|
||||
@@ -535,7 +530,7 @@ cupsEncodeOptions2(
|
||||
break;
|
||||
|
||||
default :
|
||||
if ((attr->values[j].string.text = _cupsStrAlloc(val)) == NULL)
|
||||
if ((attr->values[j].string.text = _cupsStrAlloc(val)) == NULL)
|
||||
{
|
||||
/*
|
||||
* Ran out of memory!
|
||||
|
||||
+26
-26
@@ -140,7 +140,7 @@ static ssize_t cups_write(cups_file_t *fp, const char *buf, size_t bytes);
|
||||
/*
|
||||
* 'cupsFileClose()' - Close a CUPS file.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on error */
|
||||
@@ -272,7 +272,7 @@ cupsFileClose(cups_file_t *fp) /* I - CUPS file */
|
||||
/*
|
||||
* 'cupsFileCompression()' - Return whether a file is compressed.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - @code CUPS_FILE_NONE@ or @code CUPS_FILE_GZIP@ */
|
||||
@@ -285,7 +285,7 @@ cupsFileCompression(cups_file_t *fp) /* I - CUPS file */
|
||||
/*
|
||||
* 'cupsFileEOF()' - Return the end-of-file status.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 1 on end of file, 0 otherwise */
|
||||
@@ -304,7 +304,7 @@ cupsFileEOF(cups_file_t *fp) /* I - CUPS file */
|
||||
* the supplied paths, @code NULL@ is returned. A @code NULL@ path only
|
||||
* matches the current directory.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
const char * /* O - Full path to file or @code NULL@ if not found */
|
||||
@@ -403,7 +403,7 @@ cupsFileFind(const char *filename, /* I - File to find */
|
||||
/*
|
||||
* 'cupsFileFlush()' - Flush pending output.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on error */
|
||||
@@ -451,7 +451,7 @@ cupsFileFlush(cups_file_t *fp) /* I - CUPS file */
|
||||
/*
|
||||
* 'cupsFileGetChar()' - Get a single character from a file.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - Character or -1 on end of file */
|
||||
@@ -497,7 +497,7 @@ cupsFileGetChar(cups_file_t *fp) /* I - CUPS file */
|
||||
/*
|
||||
* 'cupsFileGetConf()' - Get a line from a configuration file...
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
char * /* O - Line read or @code NULL@ on end of file or error */
|
||||
@@ -641,7 +641,7 @@ cupsFileGetConf(cups_file_t *fp, /* I - CUPS file */
|
||||
* nul-terminated, however you should use the returned length to determine
|
||||
* the number of bytes on the line.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
size_t /* O - Number of bytes on line or 0 on end of file */
|
||||
@@ -716,7 +716,7 @@ cupsFileGetLine(cups_file_t *fp, /* I - File to read from */
|
||||
/*
|
||||
* 'cupsFileGets()' - Get a CR and/or LF-terminated line.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
char * /* O - Line read or @code NULL@ on end of file or error */
|
||||
@@ -798,7 +798,7 @@ cupsFileGets(cups_file_t *fp, /* I - CUPS file */
|
||||
/*
|
||||
* 'cupsFileLock()' - Temporarily lock access to a file.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on error */
|
||||
@@ -827,7 +827,7 @@ cupsFileLock(cups_file_t *fp, /* I - CUPS file */
|
||||
/*
|
||||
* 'cupsFileNumber()' - Return the file descriptor associated with a CUPS file.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - File descriptor */
|
||||
@@ -856,7 +856,7 @@ cupsFileNumber(cups_file_t *fp) /* I - CUPS file */
|
||||
* connection as needed, generally preferring IPv6 connections when there is
|
||||
* a choice.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
cups_file_t * /* O - CUPS file or @code NULL@ if the file or socket cannot be opened */
|
||||
@@ -963,7 +963,7 @@ cupsFileOpen(const char *filename, /* I - Name of file */
|
||||
* supplied which enables Flate compression of the file. Compression is
|
||||
* not supported for the "a" (append) mode.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
cups_file_t * /* O - CUPS file or @code NULL@ if the file could not be opened */
|
||||
@@ -1075,7 +1075,7 @@ cupsFileOpenFd(int fd, /* I - File descriptor */
|
||||
/*
|
||||
* 'cupsFilePeekChar()' - Peek at the next character from a file.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - Character or -1 on end of file */
|
||||
@@ -1107,7 +1107,7 @@ cupsFilePeekChar(cups_file_t *fp) /* I - CUPS file */
|
||||
/*
|
||||
* 'cupsFilePrintf()' - Write a formatted string.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - Number of bytes written or -1 on error */
|
||||
@@ -1204,7 +1204,7 @@ cupsFilePrintf(cups_file_t *fp, /* I - CUPS file */
|
||||
/*
|
||||
* 'cupsFilePutChar()' - Write a character.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on error */
|
||||
@@ -1319,7 +1319,7 @@ cupsFilePutConf(cups_file_t *fp, /* I - CUPS file */
|
||||
*
|
||||
* Like the @code fputs@ function, no newline is appended to the string.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - Number of bytes written or -1 on error */
|
||||
@@ -1383,7 +1383,7 @@ cupsFilePuts(cups_file_t *fp, /* I - CUPS file */
|
||||
/*
|
||||
* 'cupsFileRead()' - Read from a file.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ssize_t /* O - Number of bytes read or -1 on error */
|
||||
@@ -1460,7 +1460,7 @@ cupsFileRead(cups_file_t *fp, /* I - CUPS file */
|
||||
* 'cupsFileRewind()' - Set the current file position to the beginning of the
|
||||
* file.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
off_t /* O - New file position or -1 on error */
|
||||
@@ -1532,7 +1532,7 @@ cupsFileRewind(cups_file_t *fp) /* I - CUPS file */
|
||||
/*
|
||||
* 'cupsFileSeek()' - Seek in a file.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
off_t /* O - New file position or -1 on error */
|
||||
@@ -1685,7 +1685,7 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */
|
||||
/*
|
||||
* 'cupsFileStderr()' - Return a CUPS file associated with stderr.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
cups_file_t * /* O - CUPS file */
|
||||
@@ -1721,7 +1721,7 @@ cupsFileStderr(void)
|
||||
/*
|
||||
* 'cupsFileStdin()' - Return a CUPS file associated with stdin.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
cups_file_t * /* O - CUPS file */
|
||||
@@ -1751,7 +1751,7 @@ cupsFileStdin(void)
|
||||
/*
|
||||
* 'cupsFileStdout()' - Return a CUPS file associated with stdout.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
cups_file_t * /* O - CUPS file */
|
||||
@@ -1787,7 +1787,7 @@ cupsFileStdout(void)
|
||||
/*
|
||||
* 'cupsFileTell()' - Return the current file position.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
off_t /* O - File position */
|
||||
@@ -1803,7 +1803,7 @@ cupsFileTell(cups_file_t *fp) /* I - CUPS file */
|
||||
/*
|
||||
* 'cupsFileUnlock()' - Unlock access to a file.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on error */
|
||||
@@ -1833,7 +1833,7 @@ cupsFileUnlock(cups_file_t *fp) /* I - CUPS file */
|
||||
/*
|
||||
* 'cupsFileWrite()' - Write to a file.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ssize_t /* O - Number of bytes written or -1 on error */
|
||||
|
||||
+3
-13
@@ -31,9 +31,8 @@
|
||||
*
|
||||
* This function sends a CUPS-Get-Devices request and streams the discovered
|
||||
* devices to the specified callback function. The "timeout" parameter controls
|
||||
* how long the request lasts, while the "include_schemes" and "exclude_schemes"
|
||||
* parameters provide comma-delimited lists of backends to include or omit from
|
||||
* the request respectively.
|
||||
* how long the request lasts, while the "exclude_schemes" parameter provides
|
||||
* a comma-delimited list of backends to omit from the request.
|
||||
*
|
||||
* @since CUPS 1.4@
|
||||
*/
|
||||
@@ -42,7 +41,6 @@ ipp_status_t /* O - Request status - @code IPP_OK@ on success. */
|
||||
cupsGetDevices(
|
||||
http_t *http, /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
|
||||
int timeout, /* I - Timeout in seconds or @code CUPS_TIMEOUT_DEFAULT@ */
|
||||
const char *include_schemes, /* I - Comma-separated URI schemes to include or @code CUPS_INCLUDE_ALL@ */
|
||||
const char *exclude_schemes, /* I - Comma-separated URI schemes to exclude or @code CUPS_EXCLUDE_NONE@ */
|
||||
cups_device_cb_t callback, /* I - Callback function */
|
||||
void *user_data) /* I - User data pointer */
|
||||
@@ -57,7 +55,7 @@ cupsGetDevices(
|
||||
*device_make_and_model, /* device-make-and-model value */
|
||||
*device_uri; /* device-uri value */
|
||||
int blocking; /* Current blocking-IO mode */
|
||||
cups_option_t option; /* in/exclude-schemes option */
|
||||
cups_option_t option; /* exclude-schemes option */
|
||||
http_status_t status; /* HTTP status of request */
|
||||
ipp_state_t state; /* IPP response state */
|
||||
|
||||
@@ -85,14 +83,6 @@ cupsGetDevices(
|
||||
ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "timeout",
|
||||
timeout);
|
||||
|
||||
if (include_schemes)
|
||||
{
|
||||
option.name = "include-schemes";
|
||||
option.value = (char *)include_schemes;
|
||||
|
||||
cupsEncodeOptions2(request, 1, &option, IPP_TAG_OPERATION);
|
||||
}
|
||||
|
||||
if (exclude_schemes)
|
||||
{
|
||||
option.name = "exclude-schemes";
|
||||
|
||||
+4
-4
@@ -47,7 +47,7 @@
|
||||
*
|
||||
* This function returns @code HTTP_OK@ when the file is successfully retrieved.
|
||||
*
|
||||
* @since CUPS 1.1.20/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.20@
|
||||
*/
|
||||
|
||||
http_status_t /* O - HTTP status */
|
||||
@@ -188,7 +188,7 @@ cupsGetFd(http_t *http, /* I - Connection to server or @code CUPS_HTTP_DEFA
|
||||
*
|
||||
* This function returns @code HTTP_OK@ when the file is successfully retrieved.
|
||||
*
|
||||
* @since CUPS 1.1.20/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.20@
|
||||
*/
|
||||
|
||||
http_status_t /* O - HTTP status */
|
||||
@@ -256,7 +256,7 @@ cupsGetFile(http_t *http, /* I - Connection to server or @code CUPS_HTTP_DE
|
||||
* This function returns @code HTTP_CREATED@ when the file is stored
|
||||
* successfully.
|
||||
*
|
||||
* @since CUPS 1.1.20/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.20@
|
||||
*/
|
||||
|
||||
http_status_t /* O - HTTP status */
|
||||
@@ -442,7 +442,7 @@ cupsPutFd(http_t *http, /* I - Connection to server or @code CUPS_HTTP_DEFA
|
||||
* This function returns @code HTTP_CREATED@ when the file is stored
|
||||
* successfully.
|
||||
*
|
||||
* @since CUPS 1.1.20/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.20@
|
||||
*/
|
||||
|
||||
http_status_t /* O - HTTP status */
|
||||
|
||||
+7
-7
@@ -42,7 +42,7 @@
|
||||
/*
|
||||
* 'httpAddrAny()' - Check for the "any" address.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 1 if "any", 0 otherwise */
|
||||
@@ -68,7 +68,7 @@ httpAddrAny(const http_addr_t *addr) /* I - Address to check */
|
||||
/*
|
||||
* 'httpAddrEqual()' - Compare two addresses.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 1 if equal, 0 if not */
|
||||
@@ -101,7 +101,7 @@ httpAddrEqual(const http_addr_t *addr1, /* I - First address */
|
||||
/*
|
||||
* 'httpAddrLength()' - Return the length of the address in bytes.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - Length in bytes */
|
||||
@@ -132,7 +132,7 @@ httpAddrLength(const http_addr_t *addr) /* I - Address */
|
||||
/*
|
||||
* 'httpAddrLocalhost()' - Check for the local loopback address.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 1 if local host, 0 otherwise */
|
||||
@@ -171,7 +171,7 @@ httpAddrLocalhost(
|
||||
/*
|
||||
* 'httpAddrLookup()' - Lookup the hostname associated with the address.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
char * /* O - Host name */
|
||||
@@ -306,7 +306,7 @@ _httpAddrPort(http_addr_t *addr) /* I - Address */
|
||||
/*
|
||||
* 'httpAddrString()' - Convert an address to a numeric string.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
char * /* O - Numeric address string */
|
||||
@@ -564,7 +564,7 @@ httpGetHostByName(const char *name) /* I - Hostname or IP address */
|
||||
* Otherwise, return the FQDN for the local system using both gethostname()
|
||||
* and gethostbyname() to get the local hostname with domain.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
const char * /* O - FQDN for connection or system */
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
/*
|
||||
* 'httpAddrConnect()' - Connect to any of the addresses in the list.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
http_addrlist_t * /* O - Connected address or NULL on failure */
|
||||
@@ -165,7 +165,7 @@ httpAddrConnect(
|
||||
/*
|
||||
* 'httpAddrFreeList()' - Free an address list.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -193,7 +193,7 @@ httpAddrFreeList(
|
||||
/*
|
||||
* 'httpAddrGetList()' - Get a list of addresses for a hostname.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
http_addrlist_t * /* O - List of addresses or NULL */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Private HTTP definitions for the Common UNIX Printing System (CUPS).
|
||||
*
|
||||
* Copyright 2007-2008 by Apple Inc.
|
||||
* Copyright 2007 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
|
||||
+8
-10
@@ -129,7 +129,7 @@ static void resolve_callback(DNSServiceRef sdRef,
|
||||
* place of traditional string functions whenever you need to create a
|
||||
* URI string.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
http_uri_status_t /* O - URI status */
|
||||
@@ -379,7 +379,7 @@ httpAssembleURI(
|
||||
* this function in place of traditional string functions whenever
|
||||
* you need to create a URI string.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
http_uri_status_t /* O - URI status */
|
||||
@@ -459,7 +459,7 @@ httpDecode64(char *out, /* I - String to write to */
|
||||
/*
|
||||
* 'httpDecode64_2()' - Base64-decode a string.
|
||||
*
|
||||
* @since CUPS 1.1.21/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.21@
|
||||
*/
|
||||
|
||||
char * /* O - Decoded string */
|
||||
@@ -578,7 +578,7 @@ httpEncode64(char *out, /* I - String to write to */
|
||||
/*
|
||||
* 'httpEncode64_2()' - Base64-encode a string.
|
||||
*
|
||||
* @since CUPS 1.1.21/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.21@
|
||||
*/
|
||||
|
||||
char * /* O - Encoded string */
|
||||
@@ -687,7 +687,7 @@ httpGetDateString(time_t t) /* I - UNIX time */
|
||||
/*
|
||||
* 'httpGetDateString2()' - Get a formatted date/time string from a time value.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
const char * /* O - Date/time string */
|
||||
@@ -804,7 +804,7 @@ httpSeparate(const char *uri, /* I - Universal Resource Identifier */
|
||||
*
|
||||
* This function is deprecated; use the httpSeparateURI() function instead.
|
||||
*
|
||||
* @since CUPS 1.1.21/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.21@
|
||||
* @deprecated@
|
||||
*/
|
||||
|
||||
@@ -829,7 +829,7 @@ httpSeparate2(const char *uri, /* I - Universal Resource Identifier */
|
||||
* 'httpSeparateURI()' - Separate a Universal Resource Identifier into its
|
||||
* components.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
http_uri_status_t /* O - Result of separation */
|
||||
@@ -1389,9 +1389,7 @@ _httpResolveURI(
|
||||
if (log)
|
||||
{
|
||||
fputs("STATE: +connecting-to-device\n", stderr);
|
||||
fprintf(stderr, "DEBUG: Resolving %s, regtype=%s, domain=%s...\n",
|
||||
hostname, regtype, domain);
|
||||
_cupsLangPuts(stderr, _("INFO: Looking for printer...\n"));
|
||||
_cupsLangPrintf(stderr, _("INFO: Looking for \"%s\"...\n"), hostname);
|
||||
}
|
||||
|
||||
if (DNSServiceResolve(&ref, 0, 0, hostname, regtype, domain,
|
||||
|
||||
+16
-16
@@ -247,7 +247,7 @@ httpCheck(http_t *http) /* I - Connection to server */
|
||||
/*
|
||||
* 'httpClearCookie()' - Clear the cookie value(s).
|
||||
*
|
||||
* @since CUPS 1.1.19/Mac OS X 10.3@
|
||||
* @since CUPS 1.1.19@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -592,7 +592,7 @@ httpFlush(http_t *http) /* I - Connection to server */
|
||||
/*
|
||||
* 'httpFlushWrite()' - Flush data in write buffer.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - Bytes written or -1 on error */
|
||||
@@ -637,7 +637,7 @@ httpGet(http_t *http, /* I - Connection to server */
|
||||
* string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
|
||||
* value.
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
char * /* O - Authorization string */
|
||||
@@ -653,7 +653,7 @@ httpGetAuthString(http_t *http) /* I - Connection to server */
|
||||
/*
|
||||
* 'httpGetBlocking()' - Get the blocking/non-block state of a connection.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 1 if blocking, 0 if non-blocking */
|
||||
@@ -666,7 +666,7 @@ httpGetBlocking(http_t *http) /* I - Connection to server */
|
||||
/*
|
||||
* 'httpGetCookie()' - Get any cookie data from the response.
|
||||
*
|
||||
* @since CUPS 1.1.19/Mac OS X 10.3@
|
||||
* @since CUPS 1.1.19@
|
||||
*/
|
||||
|
||||
const char * /* O - Cookie data or NULL */
|
||||
@@ -679,7 +679,7 @@ httpGetCookie(http_t *http) /* I - HTTP connecion */
|
||||
/*
|
||||
* 'httpGetFd()' - Get the file descriptor associated with a connection.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - File descriptor or -1 if none */
|
||||
@@ -749,7 +749,7 @@ httpGetLength(http_t *http) /* I - Connection to server */
|
||||
* This function returns the complete content length, even for
|
||||
* content larger than 2^31 - 1.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
off_t /* O - Content length */
|
||||
@@ -811,7 +811,7 @@ httpGetLength2(http_t *http) /* I - Connection to server */
|
||||
/*
|
||||
* 'httpGetStatus()' - Get the status of the last HTTP request.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
http_status_t /* O - HTTP status */
|
||||
@@ -840,7 +840,7 @@ httpGetSubField(http_t *http, /* I - Connection to server */
|
||||
/*
|
||||
* 'httpGetSubField2()' - Get a sub-field value.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
char * /* O - Value or NULL */
|
||||
@@ -1300,7 +1300,7 @@ httpRead(http_t *http, /* I - Connection to server */
|
||||
/*
|
||||
* 'httpRead2()' - Read data from a HTTP connection.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ssize_t /* O - Number of bytes read */
|
||||
@@ -1732,7 +1732,7 @@ httpReconnect(http_t *http) /* I - Connection to server */
|
||||
* HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
|
||||
* httpHead(), httpOptions(), httpPost, or httpPut().
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -1788,7 +1788,7 @@ httpSetAuthString(http_t *http, /* I - Connection to server */
|
||||
/*
|
||||
* 'httpSetCookie()' - Set the cookie value(s)...
|
||||
*
|
||||
* @since CUPS 1.1.19/Mac OS X 10.3@
|
||||
* @since CUPS 1.1.19@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -1813,7 +1813,7 @@ httpSetCookie(http_t *http, /* I - Connection */
|
||||
*
|
||||
* Currently only HTTP_CONTINUE is supported for the "expect" argument.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -1860,7 +1860,7 @@ httpSetField(http_t *http, /* I - Connection to server */
|
||||
/*
|
||||
* 'httpSetLength()' - Set the content-length and content-encoding.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -2077,7 +2077,7 @@ httpUpdate(http_t *http) /* I - Connection to server */
|
||||
/*
|
||||
* 'httpWait()' - Wait for data available on a connection.
|
||||
*
|
||||
* @since CUPS 1.1.19/Mac OS X 10.3@
|
||||
* @since CUPS 1.1.19@
|
||||
*/
|
||||
|
||||
int /* O - 1 if data is available, 0 otherwise */
|
||||
@@ -2133,7 +2133,7 @@ httpWrite(http_t *http, /* I - Connection to server */
|
||||
/*
|
||||
* 'httpWrite2()' - Write data to a HTTP connection.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ssize_t /* O - Number of bytes written */
|
||||
|
||||
+3
-3
@@ -124,7 +124,7 @@ typedef enum http_auth_e /**** HTTP authentication types ****/
|
||||
HTTP_AUTH_MD5_SESS, /* MD5-session authentication in use */
|
||||
HTTP_AUTH_MD5_INT, /* Digest authentication in use for body */
|
||||
HTTP_AUTH_MD5_SESS_INT, /* MD5-session authentication in use for body */
|
||||
HTTP_AUTH_NEGOTIATE /* GSSAPI authentication in use @since CUPS 1.3/Mac OS X 10.5@ */
|
||||
HTTP_AUTH_NEGOTIATE /* GSSAPI authentication in use @since CUPS 1.3@ */
|
||||
} http_auth_t;
|
||||
|
||||
typedef enum http_encoding_e /**** HTTP transfer encoding values ****/
|
||||
@@ -288,7 +288,7 @@ typedef enum http_version_e /**** HTTP version numbers ****/
|
||||
typedef union _http_addr_u /**** Socket address union, which
|
||||
**** makes using IPv6 and other
|
||||
**** address types easier and
|
||||
**** more portable. @since CUPS 1.2/Mac OS X 10.5@
|
||||
**** more portable. @since CUPS 1.2@
|
||||
****/
|
||||
{
|
||||
struct sockaddr addr; /* Base structure for family value */
|
||||
@@ -305,7 +305,7 @@ typedef union _http_addr_u /**** Socket address union, which
|
||||
typedef struct http_addrlist_s /**** Socket address list, which is
|
||||
**** used to enumerate all of the
|
||||
**** addresses that are associated
|
||||
**** with a hostname. @since CUPS 1.2/Mac OS X 10.5@
|
||||
**** with a hostname. @since CUPS 1.2@
|
||||
****/
|
||||
{
|
||||
struct http_addrlist_s *next; /* Pointer to next address in list */
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Internet Printing Protocol support functions for the Common UNIX
|
||||
* Printing System (CUPS).
|
||||
*
|
||||
* Copyright 2007-2008 by Apple Inc.
|
||||
* Copyright 2007 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -23,8 +23,6 @@
|
||||
* ippOpValue() - Return an operation id for the given name.
|
||||
* ippPort() - Return the default IPP port number.
|
||||
* ippSetPort() - Set the default port number.
|
||||
* ippTagString() - Return the tag name corresponding to a tag value.
|
||||
* ippTagValue() - Return the tag value corresponding to a tag name.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -281,7 +279,7 @@ ippErrorString(ipp_status_t error) /* I - Error status */
|
||||
/*
|
||||
* 'ippErrorValue()' - Return a status code for the given name.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ipp_status_t /* O - IPP status code */
|
||||
@@ -315,7 +313,7 @@ ippErrorValue(const char *name) /* I - Name */
|
||||
/*
|
||||
* 'ippOpString()' - Return a name for the given operation id.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
const char * /* O - Name */
|
||||
@@ -350,7 +348,7 @@ ippOpString(ipp_op_t op) /* I - Operation ID */
|
||||
/*
|
||||
* 'ippOpValue()' - Return an operation id for the given name.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ipp_op_t /* O - Operation ID */
|
||||
@@ -467,8 +465,6 @@ ippSetPort(int p) /* I - Port number to use */
|
||||
const char * /* O - Tag name */
|
||||
ippTagString(ipp_tag_t tag) /* I - Tag value */
|
||||
{
|
||||
tag &= IPP_TAG_MASK;
|
||||
|
||||
if (tag < (ipp_tag_t)(sizeof(ipp_tag_names) / sizeof(ipp_tag_names[0])))
|
||||
return (ipp_tag_names[tag]);
|
||||
else
|
||||
|
||||
+9
-9
@@ -160,7 +160,7 @@ ippAddBooleans(ipp_t *ipp, /* I - IPP message */
|
||||
/*
|
||||
* 'ippAddCollection()' - Add a collection value.
|
||||
*
|
||||
* @since CUPS 1.1.19/Mac OS X 10.3@
|
||||
* @since CUPS 1.1.19@
|
||||
*/
|
||||
|
||||
ipp_attribute_t * /* O - New attribute */
|
||||
@@ -193,7 +193,7 @@ ippAddCollection(ipp_t *ipp, /* I - IPP message */
|
||||
/*
|
||||
* 'ippAddCollections()' - Add an array of collection values.
|
||||
*
|
||||
* @since CUPS 1.1.19/Mac OS X 10.3@
|
||||
* @since CUPS 1.1.19@
|
||||
*/
|
||||
|
||||
ipp_attribute_t * /* O - New attribute */
|
||||
@@ -342,7 +342,7 @@ ippAddIntegers(ipp_t *ipp, /* I - IPP message */
|
||||
/*
|
||||
* 'ippAddOctetString()' - Add an octetString value to an IPP message.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ipp_attribute_t * /* O - New attribute */
|
||||
@@ -789,7 +789,7 @@ ippDelete(ipp_t *ipp) /* I - IPP message */
|
||||
/*
|
||||
* 'ippDeleteAttribute()' - Delete a single attribute in an IPP message.
|
||||
*
|
||||
* @since CUPS 1.1.19/Mac OS X 10.3@
|
||||
* @since CUPS 1.1.19@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -964,7 +964,7 @@ ippNew(void)
|
||||
* attributes-natural-language attributes added. The
|
||||
* attributes-natural-language value is derived from the current locale.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ipp_t * /* O - IPP request message */
|
||||
@@ -1039,7 +1039,7 @@ ippRead(http_t *http, /* I - HTTP connection */
|
||||
/*
|
||||
* 'ippReadFile()' - Read data for an IPP message from a file.
|
||||
*
|
||||
* @since CUPS 1.1.19/Mac OS X 10.3@
|
||||
* @since CUPS 1.1.19@
|
||||
*/
|
||||
|
||||
ipp_state_t /* O - Current state */
|
||||
@@ -1055,7 +1055,7 @@ ippReadFile(int fd, /* I - HTTP data */
|
||||
/*
|
||||
* 'ippReadIO()' - Read data for an IPP message.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ipp_state_t /* O - Current state */
|
||||
@@ -1798,7 +1798,7 @@ ippWrite(http_t *http, /* I - HTTP connection */
|
||||
/*
|
||||
* 'ippWriteFile()' - Write data for an IPP message to a file.
|
||||
*
|
||||
* @since CUPS 1.1.19/Mac OS X 10.3@
|
||||
* @since CUPS 1.1.19@
|
||||
*/
|
||||
|
||||
ipp_state_t /* O - Current state */
|
||||
@@ -1816,7 +1816,7 @@ ippWriteFile(int fd, /* I - HTTP data */
|
||||
/*
|
||||
* 'ippWriteIO()' - Write data for an IPP message.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ipp_state_t /* O - Current state */
|
||||
|
||||
+14
-14
@@ -4,7 +4,7 @@
|
||||
* Internet Printing Protocol definitions for the Common UNIX Printing
|
||||
* System (CUPS).
|
||||
*
|
||||
* Copyright 2007-2008 by Apple Inc.
|
||||
* Copyright 2007 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -207,13 +207,13 @@ typedef enum ipp_op_e /**** IPP operations... ****/
|
||||
IPP_SET_PRINTER_ATTRIBUTES, /* Set printer attributes @private@ */
|
||||
IPP_SET_JOB_ATTRIBUTES, /* Set job attributes */
|
||||
IPP_GET_PRINTER_SUPPORTED_VALUES, /* Get supported attribute values */
|
||||
IPP_CREATE_PRINTER_SUBSCRIPTION, /* Create a printer subscription @since CUPS 1.2/Mac OS X 10.5@ */
|
||||
IPP_CREATE_JOB_SUBSCRIPTION, /* Create a job subscription @since CUPS 1.2/Mac OS X 10.5@ */
|
||||
IPP_GET_SUBSCRIPTION_ATTRIBUTES, /* Get subscription attributes @since CUPS 1.2/Mac OS X 10.5@ */
|
||||
IPP_GET_SUBSCRIPTIONS, /* Get list of subscriptions @since CUPS 1.2/Mac OS X 10.5@ */
|
||||
IPP_RENEW_SUBSCRIPTION, /* Renew a printer subscription @since CUPS 1.2/Mac OS X 10.5@ */
|
||||
IPP_CANCEL_SUBSCRIPTION, /* Cancel a subscription @since CUPS 1.2/Mac OS X 10.5@ */
|
||||
IPP_GET_NOTIFICATIONS, /* Get notification events @since CUPS 1.2/Mac OS X 10.5@ */
|
||||
IPP_CREATE_PRINTER_SUBSCRIPTION, /* Create a printer subscription @since CUPS 1.2@ */
|
||||
IPP_CREATE_JOB_SUBSCRIPTION, /* Create a job subscription @since CUPS 1.2@ */
|
||||
IPP_GET_SUBSCRIPTION_ATTRIBUTES, /* Get subscription attributes @since CUPS 1.2@ */
|
||||
IPP_GET_SUBSCRIPTIONS, /* Get list of subscriptions @since CUPS 1.2@ */
|
||||
IPP_RENEW_SUBSCRIPTION, /* Renew a printer subscription @since CUPS 1.2@ */
|
||||
IPP_CANCEL_SUBSCRIPTION, /* Cancel a subscription @since CUPS 1.2@ */
|
||||
IPP_GET_NOTIFICATIONS, /* Get notification events @since CUPS 1.2@ */
|
||||
IPP_SEND_NOTIFICATIONS, /* Send notification events @private@ */
|
||||
IPP_GET_PRINT_SUPPORT_FILES = 0x0021, /* Get printer support files @private@ */
|
||||
IPP_ENABLE_PRINTER, /* Start a printer */
|
||||
@@ -246,8 +246,8 @@ typedef enum ipp_op_e /**** IPP operations... ****/
|
||||
CUPS_GET_DEVICES, /* Get a list of supported devices */
|
||||
CUPS_GET_PPDS, /* Get a list of supported drivers */
|
||||
CUPS_MOVE_JOB, /* Move a job to a different printer */
|
||||
CUPS_AUTHENTICATE_JOB, /* Authenticate a job @since CUPS 1.2/Mac OS X 10.5@ */
|
||||
CUPS_GET_PPD, /* Get a PPD file @since CUPS 1.3/Mac OS X 10.5@ */
|
||||
CUPS_AUTHENTICATE_JOB, /* Authenticate a job @since CUPS 1.2@ */
|
||||
CUPS_GET_PPD, /* Get a PPD file @since CUPS 1.3@ */
|
||||
CUPS_GET_DOCUMENT = 0x4027 /* Get a document file @since CUPS 1.4@ */
|
||||
} ipp_op_t;
|
||||
|
||||
@@ -310,7 +310,7 @@ typedef unsigned char ipp_uchar_t; /**** Unsigned 8-bit integer/character ****/
|
||||
|
||||
/**** New in CUPS 1.2 ****/
|
||||
typedef ssize_t (*ipp_iocb_t)(void *, ipp_uchar_t *, size_t);
|
||||
/**** IPP IO Callback Function @since CUPS 1.2/Mac OS X 10.5@ ****/
|
||||
/**** IPP IO Callback Function @since CUPS 1.2@ ****/
|
||||
|
||||
typedef union ipp_request_u /**** Request Header ****/
|
||||
{
|
||||
@@ -336,7 +336,7 @@ typedef union ipp_request_u /**** Request Header ****/
|
||||
} status;
|
||||
|
||||
/**** New in CUPS 1.1.19 ****/
|
||||
struct /* Event Header @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
struct /* Event Header */
|
||||
{
|
||||
ipp_uchar_t version[2]; /* Protocol version number */
|
||||
ipp_status_t status_code; /* Status code */
|
||||
@@ -381,7 +381,7 @@ typedef union ipp_value_u /**** Attribute Value ****/
|
||||
} unknown; /* Unknown attribute type */
|
||||
|
||||
/**** New in CUPS 1.1.19 ****/
|
||||
ipp_t *collection; /* Collection value @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
ipp_t *collection; /* Collection value */
|
||||
} ipp_value_t;
|
||||
|
||||
typedef struct ipp_attribute_s /**** Attribute ****/
|
||||
@@ -404,7 +404,7 @@ struct ipp_s /**** IPP Request/Response/Notification ****/
|
||||
ipp_tag_t curtag; /* Current attribute group tag */
|
||||
|
||||
/**** New in CUPS 1.2 ****/
|
||||
ipp_attribute_t *prev; /* Previous attribute (for read) @since CUPS 1.2/Mac OS X 10.5@ */
|
||||
ipp_attribute_t *prev; /* Previous attribute (for read) */
|
||||
};
|
||||
|
||||
|
||||
|
||||
+2
-4
@@ -134,8 +134,7 @@ static const char * const lang_encodings[] =
|
||||
"unknown", "unknown",
|
||||
"unknown", "unknown",
|
||||
"euc-cn", "euc-jp",
|
||||
"euc-kr", "euc-tw",
|
||||
"jis-x0213"
|
||||
"euc-kr", "euc-tw"
|
||||
};
|
||||
|
||||
#ifdef __APPLE__
|
||||
@@ -424,8 +423,7 @@ cupsLangGet(const char *language) /* I - Language or locale */
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
|
||||
"EUCCN", "EUCJP", "EUCKR", "EUCTW",
|
||||
"SHIFT_JISX0213"
|
||||
"EUCCN", "EUCJP", "EUCKR", "EUCTW"
|
||||
};
|
||||
|
||||
|
||||
|
||||
+2
-3
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Multi-language support for the Common UNIX Printing System (CUPS).
|
||||
*
|
||||
* Copyright 2007-2008 by Apple Inc.
|
||||
* Copyright 2007 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -67,7 +67,7 @@ typedef enum cups_encoding_e /**** Language Encodings ****/
|
||||
CUPS_ISO8859_11, /* ISO-8859-11 */
|
||||
CUPS_ISO8859_16, /* ISO-8859-16 */
|
||||
CUPS_MAC_ROMAN, /* MacRoman */
|
||||
CUPS_ENCODING_SBCS_END = 63, /* End of single-byte encodings @private@ */
|
||||
CUPS_ENCODING_SBCS_END = 63, /* End of single-bybte encodings @private@ */
|
||||
|
||||
CUPS_WINDOWS_932, /* Japanese JIS X0208-1990 */
|
||||
CUPS_WINDOWS_936, /* Simplified Chinese GB 2312-80 */
|
||||
@@ -80,7 +80,6 @@ typedef enum cups_encoding_e /**** Language Encodings ****/
|
||||
CUPS_EUC_JP, /* EUC Japanese */
|
||||
CUPS_EUC_KR, /* EUC Korean */
|
||||
CUPS_EUC_TW, /* EUC Traditional Chinese */
|
||||
CUPS_JIS_X0213, /* JIS X0213 aka Shift JIS */
|
||||
CUPS_ENCODING_VBCS_END = 191 /* End of variable-length encodings @private@ */
|
||||
} cups_encoding_t;
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ __cupsStrAlloc
|
||||
__cupsStrFlush
|
||||
__cupsStrFormatd
|
||||
__cupsStrFree
|
||||
__cupsStrRetain
|
||||
__cupsStrScand
|
||||
__cupsStrStatistics
|
||||
__httpAddrPort
|
||||
|
||||
@@ -34,7 +34,6 @@ _cupsStrAlloc
|
||||
_cupsStrFlush
|
||||
_cupsStrFormatd
|
||||
_cupsStrFree
|
||||
_cupsStrRetain
|
||||
_cupsStrScand
|
||||
_cupsStrStatistics
|
||||
_cups_getifaddrs
|
||||
|
||||
+2
-2
@@ -62,7 +62,7 @@ static void ppd_ll_CC(char *ll_CC, int ll_CC_size);
|
||||
* descriptions, printer presets, and custom option parameters. Each
|
||||
* localized string uses the UTF-8 character encoding.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on error */
|
||||
@@ -246,7 +246,7 @@ ppdLocalizeAttr(ppd_file_t *ppd, /* I - PPD file */
|
||||
*
|
||||
* If no value of the requested scheme can be found, NULL is returned.
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
const char * /* O - Value or NULL if not found */
|
||||
|
||||
+3
-3
@@ -551,7 +551,7 @@ ppdMarkOption(ppd_file_t *ppd, /* I - PPD file record */
|
||||
*
|
||||
* Options are returned from all groups in ascending alphanumeric order.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ppd_option_t * /* O - First option or @code NULL@ */
|
||||
@@ -569,7 +569,7 @@ ppdFirstOption(ppd_file_t *ppd) /* I - PPD file */
|
||||
*
|
||||
* Options are returned from all groups in ascending alphanumeric order.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ppd_option_t * /* O - Next option or @code NULL@ */
|
||||
@@ -931,7 +931,7 @@ ppd_mark_option(ppd_file_t *ppd, /* I - PPD file */
|
||||
if (cparam->current.custom_string)
|
||||
_cupsStrFree(cparam->current.custom_string);
|
||||
|
||||
cparam->current.custom_string = _cupsStrRetain(val->value);
|
||||
cparam->current.custom_string = _cupsStrAlloc(val->value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@
|
||||
*
|
||||
* The returned string must be freed by the caller using @code free@.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
char * /* O - Subject string or @code NULL@ */
|
||||
@@ -164,7 +164,7 @@ cupsNotifySubject(cups_lang_t *lang, /* I - Language data */
|
||||
*
|
||||
* The returned string must be freed by the caller using @code free@.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
char * /* O - Message text or @code NULL@ */
|
||||
|
||||
+20
-182
@@ -34,15 +34,6 @@
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
/*
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static int cups_compare_options(cups_option_t *a, cups_option_t *b);
|
||||
static int cups_find_option(const char *name, int num_options,
|
||||
cups_option_t *option, int prev, int *rdiff);
|
||||
|
||||
|
||||
/*
|
||||
* 'cupsAddOption()' - Add an option to an option array.
|
||||
*
|
||||
@@ -56,9 +47,8 @@ cupsAddOption(const char *name, /* I - Name of option */
|
||||
int num_options,/* I - Number of options */
|
||||
cups_option_t **options) /* IO - Pointer to options */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
cups_option_t *temp; /* Pointer to new option */
|
||||
int insert, /* Insertion point */
|
||||
diff; /* Result of search */
|
||||
|
||||
|
||||
DEBUG_printf(("cupsAddOption(name=\"%s\", value=\"%s\", num_options=%d, "
|
||||
@@ -74,28 +64,17 @@ cupsAddOption(const char *name, /* I - Name of option */
|
||||
* Look for an existing option with the same name...
|
||||
*/
|
||||
|
||||
if (num_options == 0)
|
||||
{
|
||||
insert = 0;
|
||||
diff = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
insert = cups_find_option(name, num_options, *options, num_options - 1,
|
||||
&diff);
|
||||
for (i = 0, temp = *options; i < num_options; i ++, temp ++)
|
||||
if (!strcasecmp(temp->name, name))
|
||||
break;
|
||||
|
||||
if (diff > 0)
|
||||
insert ++;
|
||||
}
|
||||
|
||||
if (diff)
|
||||
if (i >= num_options)
|
||||
{
|
||||
/*
|
||||
* No matching option name...
|
||||
*/
|
||||
|
||||
DEBUG_printf(("cupsAddOption: New option inserted at index %d...\n",
|
||||
insert));
|
||||
DEBUG_puts("cupsAddOption: New option...");
|
||||
|
||||
if (num_options == 0)
|
||||
temp = (cups_option_t *)malloc(sizeof(cups_option_t));
|
||||
@@ -109,17 +88,8 @@ cupsAddOption(const char *name, /* I - Name of option */
|
||||
return (0);
|
||||
}
|
||||
|
||||
*options = temp;
|
||||
|
||||
if (insert < num_options)
|
||||
{
|
||||
DEBUG_printf(("cupsAddOption: Shifting %d options...\n",
|
||||
(int)(num_options - insert)));
|
||||
memmove(temp + insert + 1, temp + insert,
|
||||
(num_options - insert) * sizeof(cups_option_t));
|
||||
}
|
||||
|
||||
temp += insert;
|
||||
*options = temp;
|
||||
temp += num_options;
|
||||
temp->name = _cupsStrAlloc(name);
|
||||
num_options ++;
|
||||
}
|
||||
@@ -129,10 +99,7 @@ cupsAddOption(const char *name, /* I - Name of option */
|
||||
* Match found; free the old value...
|
||||
*/
|
||||
|
||||
DEBUG_printf(("cupsAddOption: Option already exists at index %d...\n",
|
||||
insert));
|
||||
|
||||
temp = *options + insert;
|
||||
DEBUG_puts("cupsAddOption: Option already exists...");
|
||||
_cupsStrFree(temp->value);
|
||||
}
|
||||
|
||||
@@ -181,8 +148,7 @@ cupsGetOption(const char *name, /* I - Name of option */
|
||||
int num_options,/* I - Number of options */
|
||||
cups_option_t *options) /* I - Options */
|
||||
{
|
||||
int diff, /* Result of comparison */
|
||||
match; /* Matching index */
|
||||
int i; /* Looping var */
|
||||
|
||||
|
||||
DEBUG_printf(("cupsGetOption(name=\"%s\", num_options=%d, options=%p)\n",
|
||||
@@ -194,13 +160,12 @@ cupsGetOption(const char *name, /* I - Name of option */
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
match = cups_find_option(name, num_options, options, -1, &diff);
|
||||
|
||||
if (!diff)
|
||||
{
|
||||
DEBUG_printf(("cupsGetOption: Returning \"%s\"\n", options[match].value));
|
||||
return (options[match].value);
|
||||
}
|
||||
for (i = 0; i < num_options; i ++)
|
||||
if (!strcasecmp(options[i].name, name))
|
||||
{
|
||||
DEBUG_printf(("cupsGetOption: Returning \"%s\"\n", options[i].value));
|
||||
return (options[i].value);
|
||||
}
|
||||
|
||||
DEBUG_puts("cupsGetOption: Returning NULL");
|
||||
return (NULL);
|
||||
@@ -227,7 +192,6 @@ cupsParseOptions(
|
||||
*ptr, /* Pointer into string */
|
||||
*name, /* Pointer to name */
|
||||
*value, /* Pointer to value */
|
||||
sep, /* Separator character */
|
||||
quote; /* Quote character */
|
||||
|
||||
|
||||
@@ -313,12 +277,9 @@ cupsParseOptions(
|
||||
while (isspace(*ptr & 255))
|
||||
*ptr++ = '\0';
|
||||
|
||||
if ((sep = *ptr) == '=')
|
||||
*ptr++ = '\0';
|
||||
|
||||
DEBUG_printf(("cupsParseOptions: name=\"%s\"\n", name));
|
||||
|
||||
if (sep != '=')
|
||||
if (*ptr != '=')
|
||||
{
|
||||
/*
|
||||
* Boolean option...
|
||||
@@ -337,7 +298,8 @@ cupsParseOptions(
|
||||
* Remove = and parse the value...
|
||||
*/
|
||||
|
||||
value = ptr;
|
||||
*ptr++ = '\0';
|
||||
value = ptr;
|
||||
|
||||
while (*ptr && !isspace(*ptr & 255))
|
||||
{
|
||||
@@ -439,7 +401,7 @@ cupsParseOptions(
|
||||
/*
|
||||
* 'cupsRemoveOption()' - Remove an option from an option array.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
int /* O - New number of options */
|
||||
@@ -500,130 +462,6 @@ cupsRemoveOption(
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_compare_options()' - Compare two options.
|
||||
*/
|
||||
|
||||
static int /* O - Result of comparison */
|
||||
cups_compare_options(cups_option_t *a, /* I - First option */
|
||||
cups_option_t *b) /* I - Second option */
|
||||
{
|
||||
return (strcasecmp(a->name, b->name));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_find_option()' - Find an option using a binary search.
|
||||
*/
|
||||
|
||||
static int /* O - Index of match */
|
||||
cups_find_option(
|
||||
const char *name, /* I - Option name */
|
||||
int num_options, /* I - Number of options */
|
||||
cups_option_t *options, /* I - Options */
|
||||
int prev, /* I - Previous index */
|
||||
int *rdiff) /* O - Difference of match */
|
||||
{
|
||||
int left, /* Low mark for binary search */
|
||||
right, /* High mark for binary search */
|
||||
current, /* Current index */
|
||||
diff; /* Result of comparison */
|
||||
cups_option_t key; /* Search key */
|
||||
|
||||
|
||||
DEBUG_printf(("cups_find_option(name=\"%s\", num_options=%d, options=%p, "
|
||||
"prev=%d, rdiff=%p)\n", name, num_options, options, prev,
|
||||
rdiff));
|
||||
|
||||
#ifdef DEBUG
|
||||
for (left = 0; left < num_options; left ++)
|
||||
DEBUG_printf(("cups_find_option: options[%d].name=\"%s\", .value=\"%s\"\n",
|
||||
left, options[left].name, options[left].value));
|
||||
#endif /* DEBUG */
|
||||
|
||||
key.name = (char *)name;
|
||||
|
||||
if (prev >= 0)
|
||||
{
|
||||
/*
|
||||
* Start search on either side of previous...
|
||||
*/
|
||||
|
||||
if ((diff = cups_compare_options(&key, options + prev)) == 0 ||
|
||||
(diff < 0 && prev == 0) ||
|
||||
(diff > 0 && prev == (num_options - 1)))
|
||||
{
|
||||
*rdiff = diff;
|
||||
return (prev);
|
||||
}
|
||||
else if (diff < 0)
|
||||
{
|
||||
/*
|
||||
* Start with previous on right side...
|
||||
*/
|
||||
|
||||
left = 0;
|
||||
right = prev;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Start wih previous on left side...
|
||||
*/
|
||||
|
||||
left = prev;
|
||||
right = num_options - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Start search in the middle...
|
||||
*/
|
||||
|
||||
left = 0;
|
||||
right = num_options - 1;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
current = (left + right) / 2;
|
||||
diff = cups_compare_options(&key, options + current);
|
||||
|
||||
if (diff == 0)
|
||||
break;
|
||||
else if (diff < 0)
|
||||
right = current;
|
||||
else
|
||||
left = current;
|
||||
}
|
||||
while ((right - left) > 1);
|
||||
|
||||
if (diff != 0)
|
||||
{
|
||||
/*
|
||||
* Check the last 1 or 2 elements...
|
||||
*/
|
||||
|
||||
if ((diff = cups_compare_options(&key, options + left)) <= 0)
|
||||
current = left;
|
||||
else
|
||||
{
|
||||
diff = cups_compare_options(&key, options + right);
|
||||
current = right;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the closest destination and the difference...
|
||||
*/
|
||||
|
||||
*rdiff = diff;
|
||||
|
||||
return (current);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
*/
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Page size functions for the Common UNIX Printing System (CUPS).
|
||||
*
|
||||
* Copyright 2007-2008 by Apple Inc.
|
||||
* Copyright 2007 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
|
||||
+7
-7
@@ -323,7 +323,7 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
/*
|
||||
* 'ppdErrorString()' - Returns the text assocated with a status.
|
||||
*
|
||||
* @since CUPS 1.1.19/Mac OS X 10.3@
|
||||
* @since CUPS 1.1.19@
|
||||
*/
|
||||
|
||||
const char * /* O - Status string */
|
||||
@@ -377,7 +377,7 @@ _ppdGetEncoding(const char *name) /* I - LanguageEncoding string */
|
||||
else if (!strcasecmp(name, "ISOLatin5"))
|
||||
return (CUPS_ISO8859_5);
|
||||
else if (!strcasecmp(name, "JIS83-RKSJ"))
|
||||
return (CUPS_JIS_X0213);
|
||||
return (CUPS_WINDOWS_932);
|
||||
else if (!strcasecmp(name, "MacStandard"))
|
||||
return (CUPS_MAC_ROMAN);
|
||||
else if (!strcasecmp(name, "WindowsANSI"))
|
||||
@@ -390,7 +390,7 @@ _ppdGetEncoding(const char *name) /* I - LanguageEncoding string */
|
||||
/*
|
||||
* 'ppdLastError()' - Return the status from the last ppdOpen*().
|
||||
*
|
||||
* @since CUPS 1.1.19/Mac OS X 10.3@
|
||||
* @since CUPS 1.1.19@
|
||||
*/
|
||||
|
||||
ppd_status_t /* O - Status code */
|
||||
@@ -444,7 +444,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
/*
|
||||
* 'ppdOpen2()' - Read a PPD file into memory.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
ppd_file_t * /* O - PPD file record or @code NULL@ if the PPD file could not be opened. */
|
||||
@@ -1321,7 +1321,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
|
||||
strlcpy(choice->text,
|
||||
custom_attr->text[0] ? custom_attr->text : _("Custom"),
|
||||
sizeof(choice->text));
|
||||
choice->code = _cupsStrRetain(custom_attr->value);
|
||||
choice->code = _cupsStrAlloc(custom_attr->value);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(keyword, "JCLOpenUI"))
|
||||
@@ -1424,7 +1424,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
|
||||
strlcpy(choice->text,
|
||||
custom_attr->text[0] ? custom_attr->text : _("Custom"),
|
||||
sizeof(choice->text));
|
||||
choice->code = _cupsStrRetain(custom_attr->value);
|
||||
choice->code = _cupsStrAlloc(custom_attr->value);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(keyword, "CloseUI") || !strcmp(keyword, "JCLCloseUI"))
|
||||
@@ -2073,7 +2073,7 @@ ppdOpenFile(const char *filename) /* I - File to read from */
|
||||
/*
|
||||
* 'ppdSetConformance()' - Set the conformance level for PPD files.
|
||||
*
|
||||
* @since CUPS 1.1.20/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.20@
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
+19
-19
@@ -93,7 +93,7 @@ typedef enum ppd_cs_e /**** Colorspaces ****/
|
||||
PPD_CS_N /* DeviceN colorspace */
|
||||
} ppd_cs_t;
|
||||
|
||||
typedef enum ppd_status_e /**** Status Codes @since CUPS 1.1.19/Mac OS X 10.3@ ****/
|
||||
typedef enum ppd_status_e /**** Status Codes @since CUPS 1.1.19@ ****/
|
||||
{
|
||||
PPD_OK = 0, /* OK */
|
||||
PPD_FILE_OPEN_ERROR, /* Unable to open PPD file */
|
||||
@@ -118,16 +118,16 @@ typedef enum ppd_status_e /**** Status Codes @since CUPS 1.1.19/Mac OS X 10.3@
|
||||
PPD_BAD_CUSTOM_PARAM /* Bad custom parameter */
|
||||
} ppd_status_t;
|
||||
|
||||
enum ppd_conform_e /**** Conformance Levels @since CUPS 1.1.19/Mac OS X 10.3@ ****/
|
||||
enum ppd_conform_e /**** Conformance Levels @since CUPS 1.1.19@ ****/
|
||||
{
|
||||
PPD_CONFORM_RELAXED, /* Relax whitespace and control char */
|
||||
PPD_CONFORM_STRICT /* Require strict conformance */
|
||||
};
|
||||
|
||||
typedef enum ppd_conform_e ppd_conform_t;
|
||||
/**** Conformance Levels @since CUPS 1.1.19/Mac OS X 10.3@ ****/
|
||||
/**** Conformance Levels @since CUPS 1.1.19@ ****/
|
||||
|
||||
typedef struct ppd_attr_s /**** PPD Attribute Structure @since CUPS 1.1.19/Mac OS X 10.3@ ****/
|
||||
typedef struct ppd_attr_s /**** PPD Attribute Structure @since CUPS 1.1.19@ ****/
|
||||
{
|
||||
char name[PPD_MAX_NAME]; /* Name of attribute (cupsXYZ) */
|
||||
char spec[PPD_MAX_NAME]; /* Specifier string, if any */
|
||||
@@ -168,7 +168,7 @@ typedef struct ppd_group_s /**** Groups ****/
|
||||
****/
|
||||
char text[PPD_MAX_TEXT - PPD_MAX_NAME];
|
||||
/* Human-readable group name */
|
||||
char name[PPD_MAX_NAME]; /* Group name @since CUPS 1.1.18/Mac OS X 10.3@ */
|
||||
char name[PPD_MAX_NAME]; /* Group name @since CUPS 1.1.18@ */
|
||||
int num_options; /* Number of options */
|
||||
ppd_option_t *options; /* Options */
|
||||
int num_subgroups; /* Number of sub-groups */
|
||||
@@ -214,7 +214,7 @@ typedef struct ppd_profile_s /**** sRGB Color Profiles ****/
|
||||
} ppd_profile_t;
|
||||
|
||||
/**** New in CUPS 1.2 ****/
|
||||
typedef enum ppd_cptype_e /**** Custom Parameter Type @since CUPS 1.2/Mac OS X 10.5@ ****/
|
||||
typedef enum ppd_cptype_e /**** Custom Parameter Type @since CUPS 1.2@ ****/
|
||||
{
|
||||
PPD_CUSTOM_CURVE, /* Curve value for f(x) = x^value */
|
||||
PPD_CUSTOM_INT, /* Integer number value */
|
||||
@@ -226,7 +226,7 @@ typedef enum ppd_cptype_e /**** Custom Parameter Type @since CUPS 1.2/Mac OS X
|
||||
PPD_CUSTOM_STRING /* String of characters */
|
||||
} ppd_cptype_t;
|
||||
|
||||
typedef union ppd_cplimit_u /**** Custom Parameter Limit @since CUPS 1.2/Mac OS X 10.5@ ****/
|
||||
typedef union ppd_cplimit_u /**** Custom Parameter Limit @since CUPS 1.2@ ****/
|
||||
{
|
||||
float custom_curve; /* Gamma value */
|
||||
int custom_int; /* Integer value */
|
||||
@@ -238,7 +238,7 @@ typedef union ppd_cplimit_u /**** Custom Parameter Limit @since CUPS 1.2/Mac OS
|
||||
int custom_string; /* String length */
|
||||
} ppd_cplimit_t;
|
||||
|
||||
typedef union ppd_cpvalue_u /**** Custom Parameter Value @since CUPS 1.2/Mac OS X 10.5@ ****/
|
||||
typedef union ppd_cpvalue_u /**** Custom Parameter Value @since CUPS 1.2@ ****/
|
||||
{
|
||||
float custom_curve; /* Gamma value */
|
||||
int custom_int; /* Integer value */
|
||||
@@ -250,7 +250,7 @@ typedef union ppd_cpvalue_u /**** Custom Parameter Value @since CUPS 1.2/Mac OS
|
||||
char *custom_string; /* String value */
|
||||
} ppd_cpvalue_t;
|
||||
|
||||
typedef struct ppd_cparam_s /**** Custom Parameter @since CUPS 1.2/Mac OS X 10.5@ ****/
|
||||
typedef struct ppd_cparam_s /**** Custom Parameter @since CUPS 1.2@ ****/
|
||||
{
|
||||
char name[PPD_MAX_NAME]; /* Parameter name */
|
||||
char text[PPD_MAX_TEXT]; /* Human-readable text */
|
||||
@@ -261,7 +261,7 @@ typedef struct ppd_cparam_s /**** Custom Parameter @since CUPS 1.2/Mac OS X 10.
|
||||
ppd_cpvalue_t current; /* Current value */
|
||||
} ppd_cparam_t;
|
||||
|
||||
typedef struct ppd_coption_s /**** Custom Option @since CUPS 1.2/Mac OS X 10.5@ ****/
|
||||
typedef struct ppd_coption_s /**** Custom Option @since CUPS 1.2@ ****/
|
||||
{
|
||||
char keyword[PPD_MAX_NAME]; /* Name of option that is being extended... */
|
||||
ppd_option_t *option; /* Option that is being extended... */
|
||||
@@ -315,19 +315,19 @@ typedef struct ppd_file_s /**** PPD File ****/
|
||||
int flip_duplex; /* 1 = Flip page for back sides @deprecated@ */
|
||||
|
||||
/**** New in CUPS 1.1.19 ****/
|
||||
char *protocols; /* Protocols (BCP, TBCP) string @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
char *pcfilename; /* PCFileName string @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
int num_attrs; /* Number of attributes @since CUPS 1.1.19/Mac OS X 10.3@ @private@ */
|
||||
int cur_attr; /* Current attribute @since CUPS 1.1.19/Mac OS X 10.3@ @private@ */
|
||||
ppd_attr_t **attrs; /* Attributes @since CUPS 1.1.19/Mac OS X 10.3@ @private@ */
|
||||
char *protocols; /* Protocols (BCP, TBCP) string @since CUPS 1.1.19@ */
|
||||
char *pcfilename; /* PCFileName string @since CUPS 1.1.19@ */
|
||||
int num_attrs; /* Number of attributes @since CUPS 1.1.19@ @private@ */
|
||||
int cur_attr; /* Current attribute @since CUPS 1.1.19@ @private@ */
|
||||
ppd_attr_t **attrs; /* Attributes @since CUPS 1.1.19@ @private@ */
|
||||
|
||||
/**** New in CUPS 1.2 ****/
|
||||
cups_array_t *sorted_attrs; /* Attribute lookup array @since CUPS 1.2/Mac OS X 10.5@ @private@ */
|
||||
cups_array_t *options; /* Option lookup array @since CUPS 1.2/Mac OS X 10.5@ @private@ */
|
||||
cups_array_t *coptions; /* Custom options array @since CUPS 1.2/Mac OS X 10.5@ @private@ */
|
||||
cups_array_t *sorted_attrs; /* Attribute lookup array @since CUPS 1.2@ @private@ */
|
||||
cups_array_t *options; /* Option lookup array @since CUPS 1.2@ @private@ */
|
||||
cups_array_t *coptions; /* Custom options array @since CUPS 1.2@ @private@ */
|
||||
|
||||
/**** New in CUPS 1.3 ****/
|
||||
cups_array_t *marked; /* Marked choices @since CUPS 1.3/Mac OS X 10.5@ @private@ */
|
||||
cups_array_t *marked; /* Marked choices @since CUPS 1.3@ @private@ */
|
||||
|
||||
/**** New in CUPS 1.4 ****/
|
||||
cups_array_t *cups_uiconstraints; /* cupsUIConstraints @since CUPS 1.4@ @private@ */
|
||||
|
||||
+18
-18
@@ -101,25 +101,25 @@ typedef enum cups_cspace_e /**** cupsColorSpace attribute values ****/
|
||||
CUPS_CSPACE_GOLD = 13, /* Gold foil */
|
||||
CUPS_CSPACE_SILVER = 14, /* Silver foil */
|
||||
|
||||
CUPS_CSPACE_CIEXYZ = 15, /* CIE XYZ @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_CIELab = 16, /* CIE Lab @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_CIEXYZ = 15, /* CIE XYZ @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_CIELab = 16, /* CIE Lab @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_RGBW = 17, /* Red, green, blue, white @since CUPS 1.2/Mac OS X 10.5@ */
|
||||
|
||||
CUPS_CSPACE_ICC1 = 32, /* ICC-based, 1 color @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_ICC2 = 33, /* ICC-based, 2 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_ICC3 = 34, /* ICC-based, 3 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_ICC4 = 35, /* ICC-based, 4 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_ICC5 = 36, /* ICC-based, 5 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_ICC6 = 37, /* ICC-based, 6 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_ICC7 = 38, /* ICC-based, 7 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_ICC8 = 39, /* ICC-based, 8 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_ICC9 = 40, /* ICC-based, 9 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_ICCA = 41, /* ICC-based, 10 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_ICCB = 42, /* ICC-based, 11 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_ICCC = 43, /* ICC-based, 12 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_ICCD = 44, /* ICC-based, 13 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_ICCE = 45, /* ICC-based, 14 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_ICCF = 46 /* ICC-based, 15 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
|
||||
CUPS_CSPACE_ICC1 = 32, /* ICC-based, 1 color @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_ICC2 = 33, /* ICC-based, 2 colors @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_ICC3 = 34, /* ICC-based, 3 colors @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_ICC4 = 35, /* ICC-based, 4 colors @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_ICC5 = 36, /* ICC-based, 5 colors @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_ICC6 = 37, /* ICC-based, 6 colors @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_ICC7 = 38, /* ICC-based, 7 colors @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_ICC8 = 39, /* ICC-based, 8 colors @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_ICC9 = 40, /* ICC-based, 9 colors @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_ICCA = 41, /* ICC-based, 10 colors @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_ICCB = 42, /* ICC-based, 11 colors @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_ICCC = 43, /* ICC-based, 12 colors @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_ICCD = 44, /* ICC-based, 13 colors @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_ICCE = 45, /* ICC-based, 14 colors @since CUPS 1.1.19@ */
|
||||
CUPS_CSPACE_ICCF = 46 /* ICC-based, 15 colors @since CUPS 1.1.19@ */
|
||||
} cups_cspace_t;
|
||||
|
||||
typedef enum cups_cut_e /**** CutMedia attribute values ****/
|
||||
@@ -151,7 +151,7 @@ enum cups_mode_e /**** cupsRasterOpen modes ****/
|
||||
{
|
||||
CUPS_RASTER_READ = 0, /* Open stream for reading */
|
||||
CUPS_RASTER_WRITE = 1, /* Open stream for writing */
|
||||
CUPS_RASTER_WRITE_COMPRESSED = 2 /* Open stream for compressed writing @since CUPS 1.3/Mac OS X 10.5@ */
|
||||
CUPS_RASTER_WRITE_COMPRESSED = 2 /* Open stream for compressed writing @since CUPS 1.3@ */
|
||||
};
|
||||
|
||||
typedef enum cups_mode_e cups_mode_t; /**** cupsRasterOpen modes ****/
|
||||
|
||||
+3
-10
@@ -112,7 +112,7 @@ cupsDoFileRequest(http_t *http, /* I - Connection to server or @code CUPS_HT
|
||||
* If "outfile" is a valid file descriptor, cupsDoIORequest() copies
|
||||
* all of the data after the IPP response message to the file.
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
ipp_t * /* O - Response data */
|
||||
@@ -203,9 +203,6 @@ cupsDoIORequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP
|
||||
else
|
||||
length = ippLength(request);
|
||||
|
||||
DEBUG_printf(("cupsDoIORequest: Request length=%ld, total length=%ld",
|
||||
(long)ippLength(request), (long)length));
|
||||
|
||||
/*
|
||||
* Loop until we can send the request without authorization problems.
|
||||
*/
|
||||
@@ -661,6 +658,8 @@ cupsSendRequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP
|
||||
|
||||
if (httpWait(http, 1000))
|
||||
status = httpUpdate(http);
|
||||
else
|
||||
status = HTTP_EXPECTATION_FAILED;
|
||||
}
|
||||
else if (httpCheck(http))
|
||||
status = httpUpdate(http);
|
||||
@@ -712,12 +711,6 @@ cupsSendRequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP
|
||||
*/
|
||||
|
||||
expect = (http_status_t)0;
|
||||
|
||||
if (httpReconnect(http))
|
||||
{
|
||||
_cupsSetError(IPP_SERVICE_UNAVAILABLE, NULL, 0);
|
||||
return (HTTP_SERVICE_UNAVAILABLE);
|
||||
}
|
||||
break;
|
||||
|
||||
default :
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
* pointed to by the "data" parameter. cupsSideChannelDoRequest() will
|
||||
* update the value to contain the number of data bytes in the buffer.
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
cups_sc_status_t /* O - Status of command */
|
||||
@@ -98,7 +98,7 @@ cupsSideChannelDoRequest(
|
||||
* pointed to by the "data" parameter. cupsSideChannelDoRequest() will
|
||||
* update the value to contain the number of data bytes in the buffer.
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on error */
|
||||
@@ -455,7 +455,7 @@ cupsSideChannelSNMPWalk(
|
||||
* This function is normally only called by backend programs to send
|
||||
* responses to a filter, driver, or port monitor program.
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on error */
|
||||
|
||||
@@ -111,6 +111,8 @@ static void snmp_set_error(cups_snmp_t *packet,
|
||||
|
||||
/*
|
||||
* '_cupsSNMPClose()' - Close a SNMP socket.
|
||||
*
|
||||
* @since CUPS 1.4@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -130,6 +132,8 @@ _cupsSNMPClose(int fd) /* I - SNMP socket file descriptor */
|
||||
* '_cupsSNMPCopyOID()' - Copy an OID.
|
||||
*
|
||||
* The array pointed to by "src" is terminated by the value -1.
|
||||
*
|
||||
* @since CUPS 1.4@
|
||||
*/
|
||||
|
||||
int * /* O - New OID */
|
||||
@@ -157,6 +161,8 @@ _cupsSNMPCopyOID(int *dst, /* I - Destination OID */
|
||||
*
|
||||
* The default community name is the first community name found in the
|
||||
* snmp.conf file. If no community name is defined there, "public" is used.
|
||||
*
|
||||
* @since CUPS 1.4@
|
||||
*/
|
||||
|
||||
const char * /* O - Default community name */
|
||||
@@ -201,6 +207,8 @@ _cupsSNMPDefaultCommunity(void)
|
||||
* '_cupsSNMPIsOID()' - Test whether a SNMP response contains the specified OID.
|
||||
*
|
||||
* The array pointed to by "oid" is terminated by the value -1.
|
||||
*
|
||||
* @since CUPS 1.4@
|
||||
*/
|
||||
|
||||
int /* O - 1 if equal, 0 if not equal */
|
||||
@@ -249,6 +257,8 @@ _cupsSNMPIsOID(cups_snmp_t *packet, /* I - Response packet */
|
||||
* OID prefix.
|
||||
*
|
||||
* The array pointed to by "prefix" is terminated by the value -1.
|
||||
*
|
||||
* @since CUPS 1.4@
|
||||
*/
|
||||
|
||||
int /* O - 1 if prefixed, 0 if not prefixed */
|
||||
@@ -296,6 +306,8 @@ _cupsSNMPIsOIDPrefixed(
|
||||
|
||||
/*
|
||||
* '_cupsSNMPOIDToString()' - Convert an OID to a string.
|
||||
*
|
||||
* @since CUPS 1.4@
|
||||
*/
|
||||
|
||||
|
||||
@@ -336,6 +348,8 @@ _cupsSNMPOIDToString(const int *src, /* I - OID */
|
||||
|
||||
/*
|
||||
* '_cupsSNMPOpen()' - Open a SNMP socket.
|
||||
*
|
||||
* @since CUPS 1.4@
|
||||
*/
|
||||
|
||||
int /* O - SNMP socket file descriptor */
|
||||
@@ -384,6 +398,8 @@ _cupsSNMPOpen(int family) /* I - Address family - @code AF_INET@ or @code AF_IN
|
||||
*
|
||||
* If "timeout" is negative, @code _cupsSNMPRead@ will wait for a response
|
||||
* indefinitely.
|
||||
*
|
||||
* @since CUPS 1.4@
|
||||
*/
|
||||
|
||||
cups_snmp_t * /* O - SNMP packet or @code NULL@ if none */
|
||||
@@ -497,6 +513,8 @@ _cupsSNMPRead(int fd, /* I - SNMP socket file descriptor */
|
||||
|
||||
/*
|
||||
* '_cupsSNMPSetDebug()' - Enable/disable debug logging to stderr.
|
||||
*
|
||||
* @since CUPS 1.4@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -519,6 +537,8 @@ _cupsSNMPSetDebug(int level) /* I - 1 to enable debug output, 0 otherwise */
|
||||
*
|
||||
* @code NULL@ is returned if the array is not large enough or the string is
|
||||
* not a valid OID number.
|
||||
*
|
||||
* @since CUPS 1.4@
|
||||
*/
|
||||
|
||||
int * /* O - Pointer to OID array or @code NULL@ on error */
|
||||
@@ -589,6 +609,8 @@ _cupsSNMPStringToOID(const char *src, /* I - OID string */
|
||||
*
|
||||
* If "timeout" is negative, @code _cupsSNMPWalk@ will wait for a response
|
||||
* indefinitely.
|
||||
*
|
||||
* @since CUPS 1.4@
|
||||
*/
|
||||
|
||||
int /* O - Number of OIDs found or -1 on error */
|
||||
@@ -674,6 +696,8 @@ _cupsSNMPWalk(int fd, /* I - SNMP socket */
|
||||
* '_cupsSNMPWrite()' - Send an SNMP query packet.
|
||||
*
|
||||
* The array pointed to by "oid" is terminated by the value -1.
|
||||
*
|
||||
* @since CUPS 1.4@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on error */
|
||||
|
||||
+39
-58
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* String functions for the Common UNIX Printing System (CUPS).
|
||||
*
|
||||
* Copyright 2007-2008 by Apple Inc.
|
||||
* Copyright 2007 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -16,20 +16,19 @@
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* _cupsStrAlloc() - Allocate/reference a string.
|
||||
* _cupsStrFlush() - Flush the string pool.
|
||||
* _cupsStrFormatd() - Format a floating-point number.
|
||||
* _cupsStrFree() - Free/dereference a string.
|
||||
* _cupsStrRetain() - Increment the reference count of a string.
|
||||
* _cupsStrScand() - Scan a string for a floating-point number.
|
||||
* _cupsStrStatistics() - Return allocation statistics for string pool.
|
||||
* _cups_strcpy() - Copy a string allowing for overlapping strings.
|
||||
* _cups_strdup() - Duplicate a string.
|
||||
* _cups_strcasecmp() - Do a case-insensitive comparison.
|
||||
* _cups_strncasecmp() - Do a case-insensitive comparison on up to N chars.
|
||||
* _cups_strlcat() - Safely concatenate two strings.
|
||||
* _cups_strlcpy() - Safely copy two strings.
|
||||
* compare_sp_items() - Compare two string pool items...
|
||||
* _cupsStrAlloc() - Allocate/reference a string.
|
||||
* _cupsStrFlush() - Flush the string pool...
|
||||
* _cupsStrFormatd() - Format a floating-point number.
|
||||
* _cupsStrFree() - Free/dereference a string.
|
||||
* _cupsStrScand() - Scan a string for a floating-point number.
|
||||
* _cupsStrStatistics() - Return allocation statistics for string pool.
|
||||
* _cups_strcpy() - Copy a string allowing for overlapping strings.
|
||||
* _cups_strdup() - Duplicate a string.
|
||||
* _cups_strcasecmp() - Do a case-insensitive comparison.
|
||||
* _cups_strncasecmp() - Do a case-insensitive comparison on up to N chars.
|
||||
* _cups_strlcat() - Safely concatenate two strings.
|
||||
* _cups_strlcpy() - Safely copy two strings.
|
||||
* compare_sp_items() - Compare two string pool items...
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -73,7 +72,7 @@ char * /* O - String pointer */
|
||||
_cupsStrAlloc(const char *s) /* I - String */
|
||||
{
|
||||
_cups_sp_item_t *item, /* String pool item */
|
||||
*key; /* Search key */
|
||||
key; /* Search key */
|
||||
|
||||
|
||||
/*
|
||||
@@ -107,9 +106,9 @@ _cupsStrAlloc(const char *s) /* I - String */
|
||||
* See if the string is already in the pool...
|
||||
*/
|
||||
|
||||
key = (_cups_sp_item_t *)(s - sizeof(unsigned int));
|
||||
key.str = (char *)s;
|
||||
|
||||
if ((item = (_cups_sp_item_t *)cupsArrayFind(stringpool, key)) != NULL)
|
||||
if ((item = (_cups_sp_item_t *)cupsArrayFind(stringpool, &key)) != NULL)
|
||||
{
|
||||
/*
|
||||
* Found it, return the cached string...
|
||||
@@ -128,7 +127,7 @@ _cupsStrAlloc(const char *s) /* I - String */
|
||||
* Not found, so allocate a new one...
|
||||
*/
|
||||
|
||||
item = (_cups_sp_item_t *)calloc(1, sizeof(_cups_sp_item_t) + strlen(s));
|
||||
item = (_cups_sp_item_t *)calloc(1, sizeof(_cups_sp_item_t));
|
||||
if (!item)
|
||||
{
|
||||
#ifdef HAVE_PTHREAD_H
|
||||
@@ -139,7 +138,18 @@ _cupsStrAlloc(const char *s) /* I - String */
|
||||
}
|
||||
|
||||
item->ref_count = 1;
|
||||
strcpy(item->str, s);
|
||||
item->str = strdup(s);
|
||||
|
||||
if (!item->str)
|
||||
{
|
||||
free(item);
|
||||
|
||||
#ifdef HAVE_PTHREAD_H
|
||||
pthread_mutex_unlock(&sp_mutex);
|
||||
#endif /* HAVE_PTHREAD_H */
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the string to the pool and return it...
|
||||
@@ -156,7 +166,7 @@ _cupsStrAlloc(const char *s) /* I - String */
|
||||
|
||||
|
||||
/*
|
||||
* '_cupsStrFlush()' - Flush the string pool.
|
||||
* '_cupsStrFlush()' - Flush the string pool...
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -175,7 +185,10 @@ _cupsStrFlush(void)
|
||||
for (item = (_cups_sp_item_t *)cupsArrayFirst(stringpool);
|
||||
item;
|
||||
item = (_cups_sp_item_t *)cupsArrayNext(stringpool))
|
||||
{
|
||||
free(item->str);
|
||||
free(item);
|
||||
}
|
||||
|
||||
cupsArrayDelete(stringpool);
|
||||
stringpool = NULL;
|
||||
@@ -274,7 +287,7 @@ void
|
||||
_cupsStrFree(const char *s) /* I - String to free */
|
||||
{
|
||||
_cups_sp_item_t *item, /* String pool item */
|
||||
*key; /* Search key */
|
||||
key; /* Search key */
|
||||
|
||||
|
||||
/*
|
||||
@@ -303,10 +316,10 @@ _cupsStrFree(const char *s) /* I - String to free */
|
||||
pthread_mutex_lock(&sp_mutex);
|
||||
#endif /* HAVE_PTHREAD_H */
|
||||
|
||||
key = (_cups_sp_item_t *)(s - sizeof(unsigned int));
|
||||
key.str = (char *)s;
|
||||
|
||||
if ((item = (_cups_sp_item_t *)cupsArrayFind(stringpool, key)) != NULL &&
|
||||
item == key)
|
||||
if ((item = (_cups_sp_item_t *)cupsArrayFind(stringpool, &key)) != NULL &&
|
||||
item->str == s)
|
||||
{
|
||||
/*
|
||||
* Found it, dereference...
|
||||
@@ -322,6 +335,7 @@ _cupsStrFree(const char *s) /* I - String to free */
|
||||
|
||||
cupsArrayRemove(stringpool, item);
|
||||
|
||||
free(item->str);
|
||||
free(item);
|
||||
}
|
||||
}
|
||||
@@ -332,39 +346,6 @@ _cupsStrFree(const char *s) /* I - String to free */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_cupsStrRetain()' - Increment the reference count of a string.
|
||||
*
|
||||
* Note: This function does not verify that the passed pointer is in the
|
||||
* string pool, so any calls to it MUST know they are passing in a
|
||||
* good pointer.
|
||||
*/
|
||||
|
||||
char * /* O - Pointer to string */
|
||||
_cupsStrRetain(char *s) /* I - String to retain */
|
||||
{
|
||||
_cups_sp_item_t *item; /* Pointer to string pool item */
|
||||
|
||||
|
||||
if (s)
|
||||
{
|
||||
item = (_cups_sp_item_t *)(s - sizeof(unsigned int));
|
||||
|
||||
#ifdef HAVE_PTHREAD_H
|
||||
pthread_mutex_lock(&sp_mutex);
|
||||
#endif /* HAVE_PTHREAD_H */
|
||||
|
||||
item->ref_count ++;
|
||||
|
||||
#ifdef HAVE_PTHREAD_H
|
||||
pthread_mutex_unlock(&sp_mutex);
|
||||
#endif /* HAVE_PTHREAD_H */
|
||||
}
|
||||
|
||||
return (s);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_cupsStrScand()' - Scan a string for a floating-point number.
|
||||
*
|
||||
|
||||
+1
-2
@@ -68,8 +68,8 @@ extern "C" {
|
||||
|
||||
typedef struct _cups_sp_item_s /**** String Pool Item ****/
|
||||
{
|
||||
char *str; /* String */
|
||||
unsigned int ref_count; /* Reference count */
|
||||
char str[1]; /* String */
|
||||
} _cups_sp_item_t;
|
||||
|
||||
|
||||
@@ -125,7 +125,6 @@ extern int _cups_vsnprintf(char *, size_t, const char *, va_list);
|
||||
extern char *_cupsStrAlloc(const char *s);
|
||||
extern void _cupsStrFlush(void);
|
||||
extern void _cupsStrFree(const char *s);
|
||||
extern char *_cupsStrRetain(char *s);
|
||||
extern size_t _cupsStrStatistics(size_t *alloc_bytes, size_t *total_bytes);
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -206,7 +206,7 @@ cupsTempFile(char *filename, /* I - Pointer to buffer */
|
||||
* The temporary filename is returned in the filename buffer.
|
||||
* The temporary file is opened for writing.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
cups_file_t * /* O - CUPS file or @code NULL@ on error */
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Admin function test program for the Common UNIX Printing System (CUPS).
|
||||
*
|
||||
* Copyright 2007-2008 by Apple Inc.
|
||||
* Copyright 2007 by Apple Inc.
|
||||
* Copyright 2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
|
||||
+2
-2
@@ -197,10 +197,10 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
fputs("cupsPrintFile: ", stdout);
|
||||
fflush(stdout);
|
||||
|
||||
if (cupsPrintFile(dest->name, "../data/testprint", "Test Page",
|
||||
if (cupsPrintFile(dest->name, "../data/testprint.ps", "Test Page",
|
||||
dest->num_options, dest->options) <= 0)
|
||||
{
|
||||
printf("FAIL (%s)\n", cupsLastErrorString());
|
||||
puts("FAIL");
|
||||
return (1);
|
||||
}
|
||||
else
|
||||
|
||||
+7
-111
@@ -449,7 +449,7 @@ cupsGetDefault(void)
|
||||
* functions to get the user-defined default printer, as this function does
|
||||
* not support the lpoptions-defined default printer.
|
||||
*
|
||||
* @since CUPS 1.1.21/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.21@
|
||||
*/
|
||||
|
||||
const char * /* O - Default printer or @code NULL@ */
|
||||
@@ -546,7 +546,7 @@ cupsGetJobs(cups_job_t **jobs, /* O - Job data */
|
||||
* pending, processing, or held and @code CUPS_WHICHJOBS_COMPLETED@ returns
|
||||
* jobs that are stopped, canceled, aborted, or completed.
|
||||
*
|
||||
* @since CUPS 1.1.21/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.21@
|
||||
*/
|
||||
|
||||
int /* O - Number of jobs */
|
||||
@@ -848,7 +848,7 @@ cupsGetPPD(const char *name) /* I - Destination name */
|
||||
* The returned filename is stored in a static buffer and is overwritten with
|
||||
* each call to @link cupsGetPPD@ or @code cupsGetPPD2@.
|
||||
*
|
||||
* @since CUPS 1.1.21/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.21@
|
||||
*/
|
||||
|
||||
const char * /* O - Filename for PPD file */
|
||||
@@ -937,110 +937,6 @@ cupsGetPPD3(http_t *http, /* I - HTTP connection or @code CUPS_HTTP_DEFAUL
|
||||
return (HTTP_NOT_ACCEPTABLE);
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
/*
|
||||
* See if the PPD file is available locally...
|
||||
*/
|
||||
|
||||
if (!cg->servername[0])
|
||||
cupsServer();
|
||||
|
||||
if (!strcasecmp(cg->servername, "localhost"))
|
||||
{
|
||||
char ppdname[1024]; /* PPD filename */
|
||||
struct stat ppdinfo; /* PPD file information */
|
||||
|
||||
|
||||
snprintf(ppdname, sizeof(ppdname), "%s/%s.ppd", cg->cups_serverroot, name);
|
||||
if (!stat(ppdname, &ppdinfo))
|
||||
{
|
||||
/*
|
||||
* OK, the file exists, use it!
|
||||
*/
|
||||
|
||||
if (buffer[0])
|
||||
{
|
||||
unlink(buffer);
|
||||
|
||||
if (symlink(ppdname, buffer) && errno != EEXIST)
|
||||
{
|
||||
_cupsSetError(IPP_INTERNAL_ERROR, NULL, 0);
|
||||
|
||||
return (HTTP_SERVER_ERROR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int tries; /* Number of tries */
|
||||
const char *tmpdir; /* TMPDIR environment variable */
|
||||
struct timeval curtime; /* Current time */
|
||||
|
||||
/*
|
||||
* Previously we put root temporary files in the default CUPS temporary
|
||||
* directory under /var/spool/cups. However, since the scheduler cleans
|
||||
* out temporary files there and runs independently of the user apps, we
|
||||
* don't want to use it unless specifically told to by cupsd.
|
||||
*/
|
||||
|
||||
if ((tmpdir = getenv("TMPDIR")) == NULL)
|
||||
# ifdef __APPLE__
|
||||
tmpdir = "/private/tmp"; /* /tmp is a symlink to /private/tmp */
|
||||
# else
|
||||
tmpdir = "/tmp";
|
||||
# endif /* __APPLE__ */
|
||||
|
||||
/*
|
||||
* Make the temporary name using the specified directory...
|
||||
*/
|
||||
|
||||
tries = 0;
|
||||
|
||||
do
|
||||
{
|
||||
/*
|
||||
* Get the current time of day...
|
||||
*/
|
||||
|
||||
gettimeofday(&curtime, NULL);
|
||||
|
||||
/*
|
||||
* Format a string using the hex time values...
|
||||
*/
|
||||
|
||||
snprintf(buffer, bufsize, "%s/%08lx%05lx", tmpdir,
|
||||
(unsigned long)curtime.tv_sec,
|
||||
(unsigned long)curtime.tv_usec);
|
||||
|
||||
/*
|
||||
* Try to make a symlink...
|
||||
*/
|
||||
|
||||
if (!symlink(ppdname, buffer))
|
||||
break;
|
||||
|
||||
tries ++;
|
||||
}
|
||||
while (tries < 1000);
|
||||
|
||||
if (tries >= 1000)
|
||||
{
|
||||
_cupsSetError(IPP_INTERNAL_ERROR, NULL, 0);
|
||||
|
||||
return (HTTP_SERVER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if (*modtime <= ppdinfo.st_mtime)
|
||||
return (HTTP_NOT_MODIFIED);
|
||||
else
|
||||
{
|
||||
*modtime = ppdinfo.st_mtime;
|
||||
return (HTTP_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* !WIN32 */
|
||||
|
||||
/*
|
||||
* Try finding a printer URI for this printer...
|
||||
*/
|
||||
@@ -1285,7 +1181,7 @@ cupsGetPrinters(char ***printers) /* O - Printers */
|
||||
* overwritten on the next call to @link cupsGetPPD@, @link cupsGetPPD2@,
|
||||
* or @link cupsGetServerPPD@.
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
char * /* O - Name of PPD file or @code NULL@ on error */
|
||||
@@ -1364,7 +1260,7 @@ cupsLastError(void)
|
||||
/*
|
||||
* 'cupsLastErrorString()' - Return the last IPP status-message.
|
||||
*
|
||||
* @since CUPS 1.2/Mac OS X 10.5@
|
||||
* @since CUPS 1.2@
|
||||
*/
|
||||
|
||||
const char * /* O - status-message text from last request */
|
||||
@@ -1398,7 +1294,7 @@ cupsPrintFile(const char *name, /* I - Destination name */
|
||||
* 'cupsPrintFile2()' - Print a file to a printer or class on the specified
|
||||
* server.
|
||||
*
|
||||
* @since CUPS 1.1.21/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.21@
|
||||
*/
|
||||
|
||||
int /* O - Job ID or 0 on error */
|
||||
@@ -1451,7 +1347,7 @@ cupsPrintFiles(
|
||||
* 'cupsPrintFiles2()' - Print one or more files to a printer or class on the
|
||||
* specified server.
|
||||
*
|
||||
* @since CUPS 1.1.21/Mac OS X 10.4@
|
||||
* @since CUPS 1.1.21@
|
||||
*/
|
||||
|
||||
int /* O - Job ID or 0 on error */
|
||||
|
||||
+3
-6
@@ -47,7 +47,6 @@ CHARMAPS = \
|
||||
iso-8859-7.txt \
|
||||
iso-8859-8.txt \
|
||||
iso-8859-9.txt \
|
||||
jis-x0213.txt \
|
||||
koi8-r.txt \
|
||||
koi8-u.txt \
|
||||
mac-roman.txt \
|
||||
@@ -142,11 +141,9 @@ install-data:
|
||||
$(INSTALL_DATA) $$file $(DATADIR)/charmaps; \
|
||||
done
|
||||
$(INSTALL_DIR) -m 755 $(DATADIR)/charsets
|
||||
if test "x$(BANNERTOPS)" != x -o "x$(TEXTTOPS)" != x; then \
|
||||
for file in $(CHARSETS); do \
|
||||
$(INSTALL_DATA) $$file $(DATADIR)/charsets; \
|
||||
done; \
|
||||
fi
|
||||
for file in $(CHARSETS); do \
|
||||
$(INSTALL_DATA) $$file $(DATADIR)/charsets; \
|
||||
done
|
||||
$(INSTALL_DIR) -m 755 $(DATADIR)/data
|
||||
for file in $(DATAFILES); do \
|
||||
$(INSTALL_DATA) $$file $(DATADIR)/data; \
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@
|
||||
Show job-id job-name job-originating-user-name job-originating-host-name job-billing
|
||||
Header Classified
|
||||
Footer Classified
|
||||
Image images/cups.png
|
||||
Image images/cups.rgb
|
||||
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@
|
||||
Show job-id job-name job-originating-user-name job-originating-host-name job-billing
|
||||
Header Confidential
|
||||
Footer Confidential
|
||||
Image images/cups.png
|
||||
Image images/cups.rgb
|
||||
|
||||
|
||||
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+1
-1
@@ -2,5 +2,5 @@
|
||||
Show job-id job-name job-originating-user-name job-originating-host-name job-billing
|
||||
Header Secret
|
||||
Footer Secret
|
||||
Image images/cups.png
|
||||
Image images/cups.rgb
|
||||
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@
|
||||
Show job-id job-name job-originating-user-name job-originating-host-name job-billing
|
||||
Header Cover Page
|
||||
Footer Cover Page
|
||||
Image images/cups.png
|
||||
Image images/cups.rgb
|
||||
|
||||
|
||||
@@ -2,7 +2,5 @@
|
||||
Show printer-name printer-info printer-location printer-make-and-model printer-driver-name printer-driver-version paper-size imageable-area
|
||||
Header Printer Test Page
|
||||
Footer Printer Test Page
|
||||
Notice This test page was produced by CUPS @CUPS_VERSION@.
|
||||
Image images/cups.png
|
||||
Image images/color-wheel.png
|
||||
|
||||
Notice This test page was produced by CUPS 1.4.
|
||||
Image images/cups.rgb
|
||||
+1
-1
@@ -2,5 +2,5 @@
|
||||
Show job-id job-name job-originating-user-name job-originating-host-name job-billing
|
||||
Header Top Secret
|
||||
Footer Top Secret
|
||||
Image images/cups.png
|
||||
Image images/cups.rgb
|
||||
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@
|
||||
Show job-id job-name job-originating-user-name job-originating-host-name job-billing
|
||||
Header Unclassified
|
||||
Footer Unclassified
|
||||
Image images/cups.png
|
||||
Image images/cups.rgb
|
||||
|
||||
|
||||
+1
-1
@@ -26,8 +26,8 @@ WEBPAGES = \
|
||||
index.html \
|
||||
robots.txt
|
||||
WEBIMAGES = \
|
||||
images/color-wheel.png \
|
||||
images/cups.png \
|
||||
images/cups.rgb \
|
||||
images/cups-block-diagram.gif \
|
||||
images/cups-command-chain.png \
|
||||
images/cups-icon.png \
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<TITLE>Inicio - CUPS @CUPS_VERSION@@CUPS_REVISION@</TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
|
||||
<LINK REL="SHORTCUT ICON" HREF="/favicon.png" TYPE="image/png">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<TABLE CLASS="page" SUMMARY="{title}">
|
||||
<TR><TD CLASS="body">
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
|
||||
<TR HEIGHT="36">
|
||||
<TD><A HREF="http://www.cups.org/" TARGET="_blank"><IMG
|
||||
SRC="/images/left.gif" WIDTH="64" HEIGHT="36" BORDER="0" ALT=""></A></TD>
|
||||
<TD CLASS="sel"><A HREF="/"> Inicio </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/admin"> Administración </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/classes/"> Clases </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/help/"> Ayuda en línea </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/jobs/"> Trabajos </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/printers/"> Impresoras </A></TD>
|
||||
<TD CLASS="unsel" WIDTH="100%"><FORM ACTION="/help/" METHOD="GET"><INPUT
|
||||
TYPE="SEARCH" NAME="QUERY" SIZE="20" PLACEHOLDER="Search Help"
|
||||
AUTOSAVE="org.cups.help" RESULTS="20"></FORM></TD>
|
||||
<TD><IMG SRC="/images/right.gif" WIDTH="4" HEIGHT="36" ALT=""></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD STYLE="padding-right: 20px;">
|
||||
|
||||
<H1>Common UNIX Printing System @CUPS_VERSION@</H1>
|
||||
|
||||
<P>CUPS es el sistema de impresión de código abierto basado en
|
||||
estándares desarrollado por <A HREF="http://www.apple.com/">Apple Inc.</A> para Mac
|
||||
OS<SUP>®</SUP> X y otros sistemas operativos tipo UNIX<SUP>®</SUP>.</P>
|
||||
|
||||
</TD>
|
||||
<TD><A HREF="http://www.cups.org/"><IMG SRC="images/cups-icon.png" WIDTH="128"
|
||||
HEIGHT="128" ALT="CUPS"></A></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS para usuarios</H2>
|
||||
|
||||
<P><A HREF="help/overview.html">Descripción de CUPS</A></P>
|
||||
|
||||
<P><A HREF="help/options.html">Impresión desde la línea de comandos y opciones</A></P>
|
||||
|
||||
<P><A HREF="help/whatsnew.html">Qué hay de nuevo en CUPS 1.4</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">Foro de usuarios</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS para administradores</H2>
|
||||
|
||||
<P><A HREF="admin">Añadiendo impresoras y clases</A></P>
|
||||
|
||||
<P><A HREF="help/policies.html">Gestionando políticas de funcionamiento</A></P>
|
||||
|
||||
<P><A HREF="help/accounting.html">Contabilidad básica de impresora</A></P>
|
||||
|
||||
<P><A HREF="help/security.html">Seguridad del servidor</A></P>
|
||||
|
||||
<P><A HREF="help/kerberos.html">Usando autentificación Kerberos</A></P>
|
||||
|
||||
<P><A HREF="help/network.html">Usando impresoras de red</A></P>
|
||||
|
||||
<P><A HREF="help/ref-cupsd-conf.html">Referencia de cupsd.conf</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/ppd.php">Encontrar controladores de impresora</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
|
||||
|
||||
<H2>CUPS para desarrolladores</H2>
|
||||
|
||||
<P><A HREF="help/api-overview.html">Introducción a la programación de CUPS</A></P>
|
||||
|
||||
<P><A HREF="help/api-cups.html">La API de CUPS</A></P>
|
||||
|
||||
<P><A HREF="help/api-filter.html">Programación de filtros y programas de conexión</A></P>
|
||||
|
||||
<P><A HREF="help/api-httpipp.html">Las APIs HTTP e IPP</A></P>
|
||||
|
||||
<P><A HREF="help/api-ppd.html">La API PPD</A></P>
|
||||
|
||||
<P><A HREF="help/api-raster.html">La API Raster</A></P>
|
||||
|
||||
<P><A HREF="help/ref-ppdcfile.html">Referencia del archivo de información del compilador de controladores PPD</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">Foro de desarrollo</A></P>
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR><TD CLASS="trailer">Common UNIX Printing System, CUPS, y el logo de CUPS son
|
||||
marcas registradas de <A HREF="http://www.apple.com">Apple Inc.</A> Los derechos
|
||||
de copia de CUPS 2007-2008 son de Apple Inc. Todos los derechos reservados.</TD></TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
+26
-25
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<title>Array API</title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta name="creator" content="Mini-XML v2.6">
|
||||
<meta name="creator" content="Mini-XML v2.5">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
@@ -331,7 +331,7 @@ div.contents ul.subcontents li {
|
||||
<body>
|
||||
<div class='body'>
|
||||
<!--
|
||||
"$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
|
||||
"$Id: api-array.header 7266 2008-01-29 02:15:29Z mike $"
|
||||
|
||||
Array API header for the Common UNIX Printing System (CUPS).
|
||||
|
||||
@@ -364,7 +364,7 @@ div.contents ul.subcontents li {
|
||||
</table></div>
|
||||
<h2 class="title">Contents</h2>
|
||||
<ul class="contents">
|
||||
<ul class="subcontents">
|
||||
</li>
|
||||
<li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
|
||||
<li><a href="#MANAGING_ARRAYS">Managing Arrays</a></li>
|
||||
<li><a href="#FINDING_AND_ENUMERATING">Finding and Enumerating Elements</a></li>
|
||||
@@ -391,12 +391,13 @@ div.contents ul.subcontents li {
|
||||
<li><a href="#cupsArrayRestore" title="Reset the current element to the last <a href="#cupsArraySave"><code>cupsArraySave</code></a>.">cupsArrayRestore</a></li>
|
||||
<li><a href="#cupsArraySave" title="Mark the current element for a later <a href="#cupsArrayRestore"><code>cupsArrayRestore</code></a>.">cupsArraySave</a></li>
|
||||
<li><a href="#cupsArrayUserData" title="Return the user data for an array.">cupsArrayUserData</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<li><a href="#TYPES">Data Types</a><ul class="code">
|
||||
<li><a href="#cups_ahash_func_t" title="Array hash function">cups_ahash_func_t</a></li>
|
||||
<li><a href="#cups_array_func_t" title="Array comparison function">cups_array_func_t</a></li>
|
||||
<li><a href="#cups_array_t" title="CUPS array type">cups_array_t</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!--
|
||||
"$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
|
||||
|
||||
@@ -575,7 +576,7 @@ for (s = (char *)<a href='#cupsArrayFirst'>cupsArrayFirst</a>(array); s != NULL;
|
||||
puts(s);
|
||||
</pre>
|
||||
<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayAdd">cupsArrayAdd</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayAdd">cupsArrayAdd</a></h3>
|
||||
<p class="description">Add an element to the array.</p>
|
||||
<p class="code">
|
||||
int cupsArrayAdd (<br>
|
||||
@@ -597,7 +598,7 @@ appended at the end of the run of identical elements. For unsorted arrays,
|
||||
the element is appended to the end of the array.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayClear">cupsArrayClear</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayClear">cupsArrayClear</a></h3>
|
||||
<p class="description">Clear the array.</p>
|
||||
<p class="code">
|
||||
void cupsArrayClear (<br>
|
||||
@@ -614,7 +615,7 @@ The caller is responsible for freeing the memory used by the
|
||||
elements themselves.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayCount">cupsArrayCount</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayCount">cupsArrayCount</a></h3>
|
||||
<p class="description">Get the number of elements in the array.</p>
|
||||
<p class="code">
|
||||
int cupsArrayCount (<br>
|
||||
@@ -627,7 +628,7 @@ int cupsArrayCount (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Number of elements</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayCurrent">cupsArrayCurrent</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayCurrent">cupsArrayCurrent</a></h3>
|
||||
<p class="description">Return the current element in the array.</p>
|
||||
<p class="code">
|
||||
void *cupsArrayCurrent (<br>
|
||||
@@ -645,7 +646,7 @@ void *cupsArrayCurrent (<br>
|
||||
<a href="#cupsArrayFirst"><code>cupsArrayFirst</code></a>, or <a href="#cupsArrayIndex"><code>cupsArrayIndex</code></a>, or <a href="#cupsArrayLast"><code>cupsArrayLast</code></a>.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayDelete">cupsArrayDelete</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayDelete">cupsArrayDelete</a></h3>
|
||||
<p class="description">Free all memory used by the array.</p>
|
||||
<p class="code">
|
||||
void cupsArrayDelete (<br>
|
||||
@@ -661,7 +662,7 @@ void cupsArrayDelete (<br>
|
||||
elements themselves.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayDup">cupsArrayDup</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayDup">cupsArrayDup</a></h3>
|
||||
<p class="description">Duplicate the array.</p>
|
||||
<p class="code">
|
||||
<a href="#cups_array_t">cups_array_t</a> *cupsArrayDup (<br>
|
||||
@@ -674,7 +675,7 @@ elements themselves.
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Duplicate array</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayFind">cupsArrayFind</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayFind">cupsArrayFind</a></h3>
|
||||
<p class="description">Find an element in the array.</p>
|
||||
<p class="code">
|
||||
void *cupsArrayFind (<br>
|
||||
@@ -690,7 +691,7 @@ void *cupsArrayFind (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Element found or <code>NULL</code></p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayFirst">cupsArrayFirst</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayFirst">cupsArrayFirst</a></h3>
|
||||
<p class="description">Get the first element in the array.</p>
|
||||
<p class="code">
|
||||
void *cupsArrayFirst (<br>
|
||||
@@ -703,7 +704,7 @@ void *cupsArrayFirst (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">First element or <code>NULL</code> if the array is empty</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/Mac OS X 10.5 </span><a name="cupsArrayGetIndex">cupsArrayGetIndex</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3 </span><a name="cupsArrayGetIndex">cupsArrayGetIndex</a></h3>
|
||||
<p class="description">Get the index of the current element.</p>
|
||||
<p class="code">
|
||||
int cupsArrayGetIndex (<br>
|
||||
@@ -721,7 +722,7 @@ int cupsArrayGetIndex (<br>
|
||||
<a href="#cupsArrayFirst"><code>cupsArrayFirst</code></a>, or <a href="#cupsArrayIndex"><code>cupsArrayIndex</code></a>, or <a href="#cupsArrayLast"><code>cupsArrayLast</code></a>.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/Mac OS X 10.5 </span><a name="cupsArrayGetInsert">cupsArrayGetInsert</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3 </span><a name="cupsArrayGetInsert">cupsArrayGetInsert</a></h3>
|
||||
<p class="description">Get the index of the last inserted element.</p>
|
||||
<p class="code">
|
||||
int cupsArrayGetInsert (<br>
|
||||
@@ -734,7 +735,7 @@ int cupsArrayGetInsert (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Index of the last inserted element, starting at 0</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayIndex">cupsArrayIndex</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayIndex">cupsArrayIndex</a></h3>
|
||||
<p class="description">Get the N-th element in the array.</p>
|
||||
<p class="code">
|
||||
void *cupsArrayIndex (<br>
|
||||
@@ -750,7 +751,7 @@ void *cupsArrayIndex (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">N-th element or <code>NULL</code></p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayInsert">cupsArrayInsert</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayInsert">cupsArrayInsert</a></h3>
|
||||
<p class="description">Insert an element in the array.</p>
|
||||
<p class="code">
|
||||
int cupsArrayInsert (<br>
|
||||
@@ -772,7 +773,7 @@ inserted at the beginning of the run of identical elements. For unsorted
|
||||
arrays, the element is inserted at the beginning of the array.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayLast">cupsArrayLast</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayLast">cupsArrayLast</a></h3>
|
||||
<p class="description">Get the last element in the array.</p>
|
||||
<p class="code">
|
||||
void *cupsArrayLast (<br>
|
||||
@@ -785,7 +786,7 @@ void *cupsArrayLast (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Last element or <code>NULL</code> if the array is empty</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayNew">cupsArrayNew</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayNew">cupsArrayNew</a></h3>
|
||||
<p class="description">Create a new array.</p>
|
||||
<p class="code">
|
||||
<a href="#cups_array_t">cups_array_t</a> *cupsArrayNew (<br>
|
||||
@@ -808,7 +809,7 @@ data pointer argument can safely be omitted when not required so functions
|
||||
like <code>strcmp</code> can be used for sorted string arrays.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/Mac OS X 10.5 </span><a name="cupsArrayNew2">cupsArrayNew2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3 </span><a name="cupsArrayNew2">cupsArrayNew2</a></h3>
|
||||
<p class="description">Create a new array with hash.</p>
|
||||
<p class="code">
|
||||
<a href="#cups_array_t">cups_array_t</a> *cupsArrayNew2 (<br>
|
||||
@@ -840,7 +841,7 @@ The hash function ("h") is used to implement cached lookups with the
|
||||
specified hash size ("hsize").
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayNext">cupsArrayNext</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayNext">cupsArrayNext</a></h3>
|
||||
<p class="description">Get the next element in the array.</p>
|
||||
<p class="code">
|
||||
void *cupsArrayNext (<br>
|
||||
@@ -861,7 +862,7 @@ The next element is undefined until you call <a href="#cupsArrayFind"><code>cups
|
||||
to set the current element.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayPrev">cupsArrayPrev</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayPrev">cupsArrayPrev</a></h3>
|
||||
<p class="description">Get the previous element in the array.</p>
|
||||
<p class="code">
|
||||
void *cupsArrayPrev (<br>
|
||||
@@ -882,7 +883,7 @@ The previous element is undefined until you call <a href="#cupsArrayFind"><code>
|
||||
to set the current element.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayRemove">cupsArrayRemove</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayRemove">cupsArrayRemove</a></h3>
|
||||
<p class="description">Remove an element from the array.</p>
|
||||
<p class="code">
|
||||
int cupsArrayRemove (<br>
|
||||
@@ -906,7 +907,7 @@ The caller is responsible for freeing the memory used by the
|
||||
removed element.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayRestore">cupsArrayRestore</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayRestore">cupsArrayRestore</a></h3>
|
||||
<p class="description">Reset the current element to the last <a href="#cupsArraySave"><code>cupsArraySave</code></a>.</p>
|
||||
<p class="code">
|
||||
void *cupsArrayRestore (<br>
|
||||
@@ -919,7 +920,7 @@ void *cupsArrayRestore (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">New current element</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArraySave">cupsArraySave</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArraySave">cupsArraySave</a></h3>
|
||||
<p class="description">Mark the current element for a later <a href="#cupsArrayRestore"><code>cupsArrayRestore</code></a>.</p>
|
||||
<p class="code">
|
||||
int cupsArraySave (<br>
|
||||
@@ -940,7 +941,7 @@ to set the current element.<br>
|
||||
The save/restore stack is guaranteed to be at least 32 elements deep.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsArrayUserData">cupsArrayUserData</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsArrayUserData">cupsArrayUserData</a></h3>
|
||||
<p class="description">Return the user data for an array.</p>
|
||||
<p class="code">
|
||||
void *cupsArrayUserData (<br>
|
||||
|
||||
+27
-129
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<title>CUPS API</title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta name="creator" content="Mini-XML v2.6">
|
||||
<meta name="creator" content="Mini-XML v2.5">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
@@ -331,7 +331,7 @@ div.contents ul.subcontents li {
|
||||
<body>
|
||||
<div class='body'>
|
||||
<!--
|
||||
"$Id: api-cups.header 8087 2008-10-27 21:37:05Z mike $"
|
||||
"$Id: api-cups.header 7279 2008-01-31 01:50:44Z mike $"
|
||||
|
||||
CUPS API header for the Common UNIX Printing System (CUPS).
|
||||
|
||||
@@ -370,7 +370,7 @@ div.contents ul.subcontents li {
|
||||
</table></div>
|
||||
<h2 class="title">Contents</h2>
|
||||
<ul class="contents">
|
||||
<ul class="subcontents">
|
||||
</li>
|
||||
<li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
|
||||
<li><a href="#CLIENTS_AND_SERVERS">Clients and Servers</a></li>
|
||||
<li><a href="#PRINTERS_AND_CLASSES">Printers and Classes</a></li>
|
||||
@@ -382,10 +382,6 @@ div.contents ul.subcontents li {
|
||||
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
|
||||
<li><a href="#cupsAddDest" title="Add a destination to the list of destinations.">cupsAddDest</a></li>
|
||||
<li><a href="#cupsAddOption" title="Add an option to an option array.">cupsAddOption</a></li>
|
||||
<li><a href="#cupsAdminCreateWindowsPPD" title="Create the Windows PPD file for a printer.">cupsAdminCreateWindowsPPD</a></li>
|
||||
<li><a href="#cupsAdminExportSamba" title="Export a printer to Samba.">cupsAdminExportSamba</a></li>
|
||||
<li><a href="#cupsAdminGetServerSettings" title="Get settings from the server.">cupsAdminGetServerSettings</a></li>
|
||||
<li><a href="#cupsAdminSetServerSettings" title="Set settings on the server.">cupsAdminSetServerSettings</a></li>
|
||||
<li><a href="#cupsCancelJob" title="Cancel a print job on the default server.">cupsCancelJob</a></li>
|
||||
<li><a href="#cupsCancelJob2" title="Cancel or purge a print job.">cupsCancelJob2</a></li>
|
||||
<li><a href="#cupsCreateJob" title="Create an empty job for streaming.">cupsCreateJob</a></li>
|
||||
@@ -444,7 +440,7 @@ specified server.">cupsPrintFiles2</a></li>
|
||||
<li><a href="#cupsTempFile" title="Generates a temporary filename.">cupsTempFile</a></li>
|
||||
<li><a href="#cupsTempFile2" title="Creates a temporary CUPS file.">cupsTempFile2</a></li>
|
||||
<li><a href="#cupsUser" title="Return the current user's name.">cupsUser</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<li><a href="#TYPES">Data Types</a><ul class="code">
|
||||
<li><a href="#cups_dest_t" title="Destination">cups_dest_t</a></li>
|
||||
<li><a href="#cups_device_cb_t" title="Device callback ">cups_device_cb_t</a></li>
|
||||
@@ -461,6 +457,7 @@ specified server.">cupsPrintFiles2</a></li>
|
||||
<li><a href="#ENUMERATIONS">Constants</a><ul class="code">
|
||||
<li><a href="#cups_ptype_e" title="Printer type/capability bit constants">cups_ptype_e</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!--
|
||||
"$Id: api-cups.shtml 7337 2008-02-22 04:44:04Z mike $"
|
||||
|
||||
@@ -962,99 +959,6 @@ int cupsAddOption (<br>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">New option arrays can be initialized simply by passing 0 for the
|
||||
"num_options" parameter.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsAdminCreateWindowsPPD">cupsAdminCreateWindowsPPD</a></h3>
|
||||
<p class="description">Create the Windows PPD file for a printer.</p>
|
||||
<p class="code">
|
||||
char *cupsAdminCreateWindowsPPD (<br>
|
||||
http_t *http,<br>
|
||||
const char *dest,<br>
|
||||
char *buffer,<br>
|
||||
int bufsize<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
|
||||
<dt>dest</dt>
|
||||
<dd class="description">Printer or class</dd>
|
||||
<dt>buffer</dt>
|
||||
<dd class="description">Filename buffer</dd>
|
||||
<dt>bufsize</dt>
|
||||
<dd class="description">Size of filename buffer</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">PPD file or NULL</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsAdminExportSamba">cupsAdminExportSamba</a></h3>
|
||||
<p class="description">Export a printer to Samba.</p>
|
||||
<p class="code">
|
||||
int cupsAdminExportSamba (<br>
|
||||
const char *dest,<br>
|
||||
const char *ppd,<br>
|
||||
const char *samba_server,<br>
|
||||
const char *samba_user,<br>
|
||||
const char *samba_password,<br>
|
||||
FILE *logfile<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>dest</dt>
|
||||
<dd class="description">Destination to export</dd>
|
||||
<dt>ppd</dt>
|
||||
<dd class="description">PPD file</dd>
|
||||
<dt>samba_server</dt>
|
||||
<dd class="description">Samba server</dd>
|
||||
<dt>samba_user</dt>
|
||||
<dd class="description">Samba username</dd>
|
||||
<dt>samba_password</dt>
|
||||
<dd class="description">Samba password</dd>
|
||||
<dt>logfile</dt>
|
||||
<dd class="description">Log file, if any</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">1 on success, 0 on failure</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/Mac OS X 10.5 </span><a name="cupsAdminGetServerSettings">cupsAdminGetServerSettings</a></h3>
|
||||
<p class="description">Get settings from the server.</p>
|
||||
<p class="code">
|
||||
int cupsAdminGetServerSettings (<br>
|
||||
http_t *http,<br>
|
||||
int *num_settings,<br>
|
||||
<a href="#cups_option_t">cups_option_t</a> **settings<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
|
||||
<dt>num_settings</dt>
|
||||
<dd class="description">Number of settings</dd>
|
||||
<dt>settings</dt>
|
||||
<dd class="description">Settings</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">1 on success, 0 on failure</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">The returned settings should be freed with cupsFreeOptions() when
|
||||
you are done with them.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/Mac OS X 10.5 </span><a name="cupsAdminSetServerSettings">cupsAdminSetServerSettings</a></h3>
|
||||
<p class="description">Set settings on the server.</p>
|
||||
<p class="code">
|
||||
int cupsAdminSetServerSettings (<br>
|
||||
http_t *http,<br>
|
||||
int num_settings,<br>
|
||||
<a href="#cups_option_t">cups_option_t</a> *settings<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
|
||||
<dt>num_settings</dt>
|
||||
<dd class="description">Number of settings</dd>
|
||||
<dt>settings</dt>
|
||||
<dd class="description">Settings</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">1 on success, 0 on failure</p>
|
||||
<h3 class="function"><a name="cupsCancelJob">cupsCancelJob</a></h3>
|
||||
<p class="description">Cancel a print job on the default server.</p>
|
||||
<p class="code">
|
||||
@@ -1246,7 +1150,7 @@ variables are not set, the server default destination is returned.
|
||||
Applications should use the <a href="#cupsGetDests"><code>cupsGetDests</code></a> and <a href="#cupsGetDest"><code>cupsGetDest</code></a>
|
||||
functions to get the user-defined default printer, as this function does
|
||||
not support the lpoptions-defined default printer.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21/Mac OS X 10.4 </span><a name="cupsGetDefault2">cupsGetDefault2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21 </span><a name="cupsGetDefault2">cupsGetDefault2</a></h3>
|
||||
<p class="description">Get the default printer or class for the specified server.</p>
|
||||
<p class="code">
|
||||
const char *cupsGetDefault2 (<br>
|
||||
@@ -1310,14 +1214,11 @@ int cupsGetDests (<br>
|
||||
<p class="discussion">Starting with CUPS 1.2, the returned list of destinations include the
|
||||
printer-info, printer-is-accepting-jobs, printer-is-shared,
|
||||
printer-make-and-model, printer-state, printer-state-change-time,
|
||||
printer-state-reasons, and printer-type attributes as options. CUPS 1.4
|
||||
adds the marker-change-time, marker-colors, marker-high-levels,
|
||||
marker-levels, marker-low-levels, marker-message, marker-names,
|
||||
marker-types, and printer-commands attributes as well.<br>
|
||||
printer-state-reasons, and printer-type attributes as options.<br>
|
||||
<br>
|
||||
Use the <a href="#cupsFreeDests"><code>cupsFreeDests</code></a> function to free the destination list and
|
||||
the <a href="#cupsGetDest"><code>cupsGetDest</code></a> function to find a particular destination.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21/Mac OS X 10.4 </span><a name="cupsGetDests2">cupsGetDests2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21 </span><a name="cupsGetDests2">cupsGetDests2</a></h3>
|
||||
<p class="description">Get the list of destinations from the specified server.</p>
|
||||
<p class="code">
|
||||
int cupsGetDests2 (<br>
|
||||
@@ -1337,10 +1238,7 @@ int cupsGetDests2 (<br>
|
||||
<p class="discussion">Starting with CUPS 1.2, the returned list of destinations include the
|
||||
printer-info, printer-is-accepting-jobs, printer-is-shared,
|
||||
printer-make-and-model, printer-state, printer-state-change-time,
|
||||
printer-state-reasons, and printer-type attributes as options. CUPS 1.4
|
||||
adds the marker-change-time, marker-colors, marker-high-levels,
|
||||
marker-levels, marker-low-levels, marker-message, marker-names,
|
||||
marker-types, and printer-commands attributes as well.<br>
|
||||
printer-state-reasons, and printer-type attributes as options.<br>
|
||||
<br>
|
||||
Use the <a href="#cupsFreeDests"><code>cupsFreeDests</code></a> function to free the destination list and
|
||||
the <a href="#cupsGetDest"><code>cupsGetDest</code></a> function to find a particular destination.
|
||||
@@ -1373,7 +1271,7 @@ int cupsGetJobs (<br>
|
||||
of state, while <code>CUPS_WHICHJOBS_ACTIVE</code> returns jobs that are
|
||||
pending, processing, or held and <code>CUPS_WHICHJOBS_COMPLETED</code> returns
|
||||
jobs that are stopped, canceled, aborted, or completed.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21/Mac OS X 10.4 </span><a name="cupsGetJobs2">cupsGetJobs2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21 </span><a name="cupsGetJobs2">cupsGetJobs2</a></h3>
|
||||
<p class="description">Get the jobs from the specified server.</p>
|
||||
<p class="code">
|
||||
int cupsGetJobs2 (<br>
|
||||
@@ -1479,7 +1377,7 @@ in the class.<br>
|
||||
<br>
|
||||
The returned filename is stored in a static buffer and is overwritten with
|
||||
each call to <code>cupsGetPPD</code> or <a href="#cupsGetPPD2"><code>cupsGetPPD2</code></a>.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21/Mac OS X 10.4 </span><a name="cupsGetPPD2">cupsGetPPD2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21 </span><a name="cupsGetPPD2">cupsGetPPD2</a></h3>
|
||||
<p class="description">Get the PPD file for a printer from the specified server.</p>
|
||||
<p class="code">
|
||||
const char *cupsGetPPD2 (<br>
|
||||
@@ -1579,7 +1477,7 @@ int cupsGetPrinters (<br>
|
||||
<p class="discussion">This function is deprecated - use <a href="#cupsGetDests"><code>cupsGetDests</code></a> instead.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/Mac OS X 10.5 </span><a name="cupsGetServerPPD">cupsGetServerPPD</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3 </span><a name="cupsGetServerPPD">cupsGetServerPPD</a></h3>
|
||||
<p class="description">Get an available PPD file from the server.</p>
|
||||
<p class="code">
|
||||
char *cupsGetServerPPD (<br>
|
||||
@@ -1662,13 +1560,13 @@ cups_lang_t *cupsLangGet (<br>
|
||||
ipp_status_t cupsLastError (void);</p>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">IPP status code from last request</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsLastErrorString">cupsLastErrorString</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsLastErrorString">cupsLastErrorString</a></h3>
|
||||
<p class="description">Return the last IPP status-message.</p>
|
||||
<p class="code">
|
||||
const char *cupsLastErrorString (void);</p>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">status-message text from last request</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsNotifySubject">cupsNotifySubject</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsNotifySubject">cupsNotifySubject</a></h3>
|
||||
<p class="description">Return the subject for the given notification message.</p>
|
||||
<p class="code">
|
||||
char *cupsNotifySubject (<br>
|
||||
@@ -1688,7 +1586,7 @@ char *cupsNotifySubject (<br>
|
||||
<p class="discussion">The returned string must be freed by the caller using <code>free</code>.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsNotifyText">cupsNotifyText</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsNotifyText">cupsNotifyText</a></h3>
|
||||
<p class="description">Return the text for the given notification message.</p>
|
||||
<p class="code">
|
||||
char *cupsNotifyText (<br>
|
||||
@@ -1758,7 +1656,7 @@ int cupsPrintFile (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Job ID or 0 on error</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21/Mac OS X 10.4 </span><a name="cupsPrintFile2">cupsPrintFile2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21 </span><a name="cupsPrintFile2">cupsPrintFile2</a></h3>
|
||||
<p class="description">Print a file to a printer or class on the specified
|
||||
server.</p>
|
||||
<p class="code">
|
||||
@@ -1816,7 +1714,7 @@ int cupsPrintFiles (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Job ID or 0 on error</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21/Mac OS X 10.4 </span><a name="cupsPrintFiles2">cupsPrintFiles2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21 </span><a name="cupsPrintFiles2">cupsPrintFiles2</a></h3>
|
||||
<p class="description">Print one or more files to a printer or class on the
|
||||
specified server.</p>
|
||||
<p class="code">
|
||||
@@ -1848,7 +1746,7 @@ int cupsPrintFiles2 (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Job ID or 0 on error</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/Mac OS X 10.5 </span><a name="cupsRemoveDest">cupsRemoveDest</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3 </span><a name="cupsRemoveDest">cupsRemoveDest</a></h3>
|
||||
<p class="description">Remove a destination from the destination list.</p>
|
||||
<p class="code">
|
||||
int cupsRemoveDest (<br>
|
||||
@@ -1877,7 +1775,7 @@ queue, merely the lpoptions for that destination/instance. Use the
|
||||
options for the user.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsRemoveOption">cupsRemoveOption</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsRemoveOption">cupsRemoveOption</a></h3>
|
||||
<p class="description">Remove an option from an option array.</p>
|
||||
<p class="code">
|
||||
int cupsRemoveOption (<br>
|
||||
@@ -1905,7 +1803,7 @@ const char *cupsServer (void);</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">The returned value can be a fully-qualified hostname, a numeric
|
||||
IPv4 or IPv6 address, or a domain socket pathname.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/Mac OS X 10.5 </span><a name="cupsSetDefaultDest">cupsSetDefaultDest</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3 </span><a name="cupsSetDefaultDest">cupsSetDefaultDest</a></h3>
|
||||
<p class="description">Set the default destination.</p>
|
||||
<p class="code">
|
||||
void cupsSetDefaultDest (<br>
|
||||
@@ -1942,7 +1840,7 @@ void cupsSetDests (<br>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">This function saves the destinations to /etc/cups/lpoptions when run
|
||||
as root and ~/.cups/lpoptions when run as a normal user.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21/Mac OS X 10.4 </span><a name="cupsSetDests2">cupsSetDests2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21 </span><a name="cupsSetDests2">cupsSetDests2</a></h3>
|
||||
<p class="description">Save the list of destinations for the specified server.</p>
|
||||
<p class="code">
|
||||
int cupsSetDests2 (<br>
|
||||
@@ -2097,7 +1995,7 @@ This function is deprecated - use <a href="#cupsTempFd"><code>cupsTempFd</code><
|
||||
<a href="#cupsTempFile2"><code>cupsTempFile2</code></a> instead.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsTempFile2">cupsTempFile2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsTempFile2">cupsTempFile2</a></h3>
|
||||
<p class="description">Creates a temporary CUPS file.</p>
|
||||
<p class="code">
|
||||
cups_file_t *cupsTempFile2 (<br>
|
||||
@@ -2233,7 +2131,7 @@ typedef unsigned cups_ptype_t;
|
||||
<p class="description">Printer type/capability bit constants</p>
|
||||
<h4 class="constants">Constants</h4>
|
||||
<dl>
|
||||
<dt>CUPS_PRINTER_AUTHENTICATED <span class="info"> CUPS 1.2/Mac OS X 10.5 </span></dt>
|
||||
<dt>CUPS_PRINTER_AUTHENTICATED <span class="info"> CUPS 1.2 </span></dt>
|
||||
<dd class="description">Printer requires authentication </dd>
|
||||
<dt>CUPS_PRINTER_BIND </dt>
|
||||
<dd class="description">Can bind output</dd>
|
||||
@@ -2245,7 +2143,7 @@ typedef unsigned cups_ptype_t;
|
||||
<dd class="description">Can collage copies</dd>
|
||||
<dt>CUPS_PRINTER_COLOR </dt>
|
||||
<dd class="description">Can do color printing</dd>
|
||||
<dt>CUPS_PRINTER_COMMANDS <span class="info"> CUPS 1.2/Mac OS X 10.5 </span></dt>
|
||||
<dt>CUPS_PRINTER_COMMANDS <span class="info"> CUPS 1.2 </span></dt>
|
||||
<dd class="description">Printer supports maintenance commands </dd>
|
||||
<dt>CUPS_PRINTER_COPIES </dt>
|
||||
<dd class="description">Can do copies</dd>
|
||||
@@ -2253,9 +2151,9 @@ typedef unsigned cups_ptype_t;
|
||||
<dd class="description">Can cover output</dd>
|
||||
<dt>CUPS_PRINTER_DEFAULT </dt>
|
||||
<dd class="description">Default printer on network</dd>
|
||||
<dt>CUPS_PRINTER_DELETE <span class="info"> CUPS 1.2/Mac OS X 10.5 </span></dt>
|
||||
<dt>CUPS_PRINTER_DELETE <span class="info"> CUPS 1.2 </span></dt>
|
||||
<dd class="description">Delete printer </dd>
|
||||
<dt>CUPS_PRINTER_DISCOVERED <span class="info"> CUPS 1.3/Mac OS X 10.5 </span></dt>
|
||||
<dt>CUPS_PRINTER_DISCOVERED <span class="info"> CUPS 1.3 </span></dt>
|
||||
<dd class="description">Printer was automatically discovered and added </dd>
|
||||
<dt>CUPS_PRINTER_DUPLEX </dt>
|
||||
<dd class="description">Can do duplexing</dd>
|
||||
@@ -2269,7 +2167,7 @@ typedef unsigned cups_ptype_t;
|
||||
<dd class="description">Local printer or class</dd>
|
||||
<dt>CUPS_PRINTER_MEDIUM </dt>
|
||||
<dd class="description">Can do Tabloid/B/C/A3/A2</dd>
|
||||
<dt>CUPS_PRINTER_NOT_SHARED <span class="info"> CUPS 1.2/Mac OS X 10.5 </span></dt>
|
||||
<dt>CUPS_PRINTER_NOT_SHARED <span class="info"> CUPS 1.2 </span></dt>
|
||||
<dd class="description">Printer is not shared </dd>
|
||||
<dt>CUPS_PRINTER_PUNCH </dt>
|
||||
<dd class="description">Can punch output</dd>
|
||||
|
||||
+35
-34
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<title>File and Directory APIs</title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta name="creator" content="Mini-XML v2.6">
|
||||
<meta name="creator" content="Mini-XML v2.5">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
@@ -331,7 +331,7 @@ div.contents ul.subcontents li {
|
||||
<body>
|
||||
<div class='body'>
|
||||
<!--
|
||||
"$Id: api-filedir.header 8087 2008-10-27 21:37:05Z mike $"
|
||||
"$Id: api-filedir.header 7279 2008-01-31 01:50:44Z mike $"
|
||||
|
||||
File and Directory API header for the Common UNIX Printing System (CUPS).
|
||||
|
||||
@@ -366,7 +366,7 @@ div.contents ul.subcontents li {
|
||||
</table></div>
|
||||
<h2 class="title">Contents</h2>
|
||||
<ul class="contents">
|
||||
<ul class="subcontents">
|
||||
</li>
|
||||
<li><a href="#OVERVIEW">Overview</a></li>
|
||||
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
|
||||
<li><a href="#cupsDirClose" title="Close a directory.">cupsDirClose</a></li>
|
||||
@@ -402,7 +402,7 @@ file.">cupsFileRewind</a></li>
|
||||
<li><a href="#cupsFileTell" title="Return the current file position.">cupsFileTell</a></li>
|
||||
<li><a href="#cupsFileUnlock" title="Unlock access to a file.">cupsFileUnlock</a></li>
|
||||
<li><a href="#cupsFileWrite" title="Write to a file.">cupsFileWrite</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<li><a href="#TYPES">Data Types</a><ul class="code">
|
||||
<li><a href="#cups_dentry_t" title="Directory entry type">cups_dentry_t</a></li>
|
||||
<li><a href="#cups_dir_t" title="Directory type">cups_dir_t</a></li>
|
||||
@@ -411,6 +411,7 @@ file.">cupsFileRewind</a></li>
|
||||
<li><a href="#STRUCTURES">Structures</a><ul class="code">
|
||||
<li><a href="#cups_dentry_s" title="Directory entry type">cups_dentry_s</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!--
|
||||
"$Id: api-filedir.shtml 7279 2008-01-31 01:50:44Z mike $"
|
||||
|
||||
@@ -443,7 +444,7 @@ details of directory access/listing and provide a convenient way
|
||||
to get both a list of files and the information (permissions,
|
||||
size, timestamp, etc.) for each of those files.</p>
|
||||
<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsDirClose">cupsDirClose</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsDirClose">cupsDirClose</a></h3>
|
||||
<p class="description">Close a directory.</p>
|
||||
<p class="code">
|
||||
void cupsDirClose (<br>
|
||||
@@ -454,7 +455,7 @@ void cupsDirClose (<br>
|
||||
<dt>dp</dt>
|
||||
<dd class="description">Directory pointer</dd>
|
||||
</dl>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsDirOpen">cupsDirOpen</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsDirOpen">cupsDirOpen</a></h3>
|
||||
<p class="description">Open a directory.</p>
|
||||
<p class="code">
|
||||
<a href="#cups_dir_t">cups_dir_t</a> *cupsDirOpen (<br>
|
||||
@@ -467,7 +468,7 @@ void cupsDirClose (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Directory pointer or <code>NULL</code> if the directory could not be opened.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsDirRead">cupsDirRead</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsDirRead">cupsDirRead</a></h3>
|
||||
<p class="description">Read the next directory entry.</p>
|
||||
<p class="code">
|
||||
<a href="#cups_dentry_t">cups_dentry_t</a> *cupsDirRead (<br>
|
||||
@@ -480,7 +481,7 @@ void cupsDirClose (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Directory entry or <code>NULL</code> when there are no more</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsDirRewind">cupsDirRewind</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsDirRewind">cupsDirRewind</a></h3>
|
||||
<p class="description">Rewind to the start of the directory.</p>
|
||||
<p class="code">
|
||||
void cupsDirRewind (<br>
|
||||
@@ -491,7 +492,7 @@ void cupsDirRewind (<br>
|
||||
<dt>dp</dt>
|
||||
<dd class="description">Directory pointer</dd>
|
||||
</dl>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileClose">cupsFileClose</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileClose">cupsFileClose</a></h3>
|
||||
<p class="description">Close a CUPS file.</p>
|
||||
<p class="code">
|
||||
int cupsFileClose (<br>
|
||||
@@ -504,7 +505,7 @@ int cupsFileClose (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">0 on success, -1 on error</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileCompression">cupsFileCompression</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileCompression">cupsFileCompression</a></h3>
|
||||
<p class="description">Return whether a file is compressed.</p>
|
||||
<p class="code">
|
||||
int cupsFileCompression (<br>
|
||||
@@ -517,7 +518,7 @@ int cupsFileCompression (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description"><code>CUPS_FILE_NONE</code> or <code>CUPS_FILE_GZIP</code></p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileEOF">cupsFileEOF</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileEOF">cupsFileEOF</a></h3>
|
||||
<p class="description">Return the end-of-file status.</p>
|
||||
<p class="code">
|
||||
int cupsFileEOF (<br>
|
||||
@@ -530,7 +531,7 @@ int cupsFileEOF (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">1 on end of file, 0 otherwise</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileFind">cupsFileFind</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileFind">cupsFileFind</a></h3>
|
||||
<p class="description">Find a file using the specified path.</p>
|
||||
<p class="code">
|
||||
const char *cupsFileFind (<br>
|
||||
@@ -563,7 +564,7 @@ the supplied paths, <code>NULL</code> is returned. A <code>NULL</code> path only
|
||||
matches the current directory.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileFlush">cupsFileFlush</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileFlush">cupsFileFlush</a></h3>
|
||||
<p class="description">Flush pending output.</p>
|
||||
<p class="code">
|
||||
int cupsFileFlush (<br>
|
||||
@@ -576,7 +577,7 @@ int cupsFileFlush (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">0 on success, -1 on error</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileGetChar">cupsFileGetChar</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileGetChar">cupsFileGetChar</a></h3>
|
||||
<p class="description">Get a single character from a file.</p>
|
||||
<p class="code">
|
||||
int cupsFileGetChar (<br>
|
||||
@@ -589,7 +590,7 @@ int cupsFileGetChar (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Character or -1 on end of file</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileGetConf">cupsFileGetConf</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileGetConf">cupsFileGetConf</a></h3>
|
||||
<p class="description">Get a line from a configuration file...</p>
|
||||
<p class="code">
|
||||
char *cupsFileGetConf (<br>
|
||||
@@ -614,7 +615,7 @@ char *cupsFileGetConf (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Line read or <code>NULL</code> on end of file or error</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileGetLine">cupsFileGetLine</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileGetLine">cupsFileGetLine</a></h3>
|
||||
<p class="description">Get a CR and/or LF-terminated line that may
|
||||
contain binary data.</p>
|
||||
<p class="code">
|
||||
@@ -641,7 +642,7 @@ nul-terminated, however you should use the returned length to determine
|
||||
the number of bytes on the line.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileGets">cupsFileGets</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileGets">cupsFileGets</a></h3>
|
||||
<p class="description">Get a CR and/or LF-terminated line.</p>
|
||||
<p class="code">
|
||||
char *cupsFileGets (<br>
|
||||
@@ -660,7 +661,7 @@ char *cupsFileGets (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Line read or <code>NULL</code> on end of file or error</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileLock">cupsFileLock</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileLock">cupsFileLock</a></h3>
|
||||
<p class="description">Temporarily lock access to a file.</p>
|
||||
<p class="code">
|
||||
int cupsFileLock (<br>
|
||||
@@ -676,7 +677,7 @@ int cupsFileLock (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">0 on success, -1 on error</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileNumber">cupsFileNumber</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileNumber">cupsFileNumber</a></h3>
|
||||
<p class="description">Return the file descriptor associated with a CUPS file.</p>
|
||||
<p class="code">
|
||||
int cupsFileNumber (<br>
|
||||
@@ -689,7 +690,7 @@ int cupsFileNumber (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">File descriptor</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileOpen">cupsFileOpen</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileOpen">cupsFileOpen</a></h3>
|
||||
<p class="description">Open a CUPS file.</p>
|
||||
<p class="code">
|
||||
<a href="#cups_file_t">cups_file_t</a> *cupsFileOpen (<br>
|
||||
@@ -720,7 +721,7 @@ connection as needed, generally preferring IPv6 connections when there is
|
||||
a choice.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileOpenFd">cupsFileOpenFd</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileOpenFd">cupsFileOpenFd</a></h3>
|
||||
<p class="description">Open a CUPS file using a file descriptor.</p>
|
||||
<p class="code">
|
||||
<a href="#cups_file_t">cups_file_t</a> *cupsFileOpenFd (<br>
|
||||
@@ -745,7 +746,7 @@ supplied which enables Flate compression of the file. Compression is
|
||||
not supported for the "a" (append) mode.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFilePeekChar">cupsFilePeekChar</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFilePeekChar">cupsFilePeekChar</a></h3>
|
||||
<p class="description">Peek at the next character from a file.</p>
|
||||
<p class="code">
|
||||
int cupsFilePeekChar (<br>
|
||||
@@ -758,7 +759,7 @@ int cupsFilePeekChar (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Character or -1 on end of file</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFilePrintf">cupsFilePrintf</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFilePrintf">cupsFilePrintf</a></h3>
|
||||
<p class="description">Write a formatted string.</p>
|
||||
<p class="code">
|
||||
int cupsFilePrintf (<br>
|
||||
@@ -777,7 +778,7 @@ int cupsFilePrintf (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Number of bytes written or -1 on error</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFilePutChar">cupsFilePutChar</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFilePutChar">cupsFilePutChar</a></h3>
|
||||
<p class="description">Write a character.</p>
|
||||
<p class="code">
|
||||
int cupsFilePutChar (<br>
|
||||
@@ -816,7 +817,7 @@ ssize_t cupsFilePutConf (<br>
|
||||
<p class="discussion">This function handles any comment escaping of the value.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFilePuts">cupsFilePuts</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFilePuts">cupsFilePuts</a></h3>
|
||||
<p class="description">Write a string.</p>
|
||||
<p class="code">
|
||||
int cupsFilePuts (<br>
|
||||
@@ -836,7 +837,7 @@ int cupsFilePuts (<br>
|
||||
<p class="discussion">Like the <code>fputs</code> function, no newline is appended to the string.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileRead">cupsFileRead</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileRead">cupsFileRead</a></h3>
|
||||
<p class="description">Read from a file.</p>
|
||||
<p class="code">
|
||||
ssize_t cupsFileRead (<br>
|
||||
@@ -855,7 +856,7 @@ ssize_t cupsFileRead (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Number of bytes read or -1 on error</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileRewind">cupsFileRewind</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileRewind">cupsFileRewind</a></h3>
|
||||
<p class="description">Set the current file position to the beginning of the
|
||||
file.</p>
|
||||
<p class="code">
|
||||
@@ -869,7 +870,7 @@ off_t cupsFileRewind (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">New file position or -1 on error</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileSeek">cupsFileSeek</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileSeek">cupsFileSeek</a></h3>
|
||||
<p class="description">Seek in a file.</p>
|
||||
<p class="code">
|
||||
off_t cupsFileSeek (<br>
|
||||
@@ -885,25 +886,25 @@ off_t cupsFileSeek (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">New file position or -1 on error</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileStderr">cupsFileStderr</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileStderr">cupsFileStderr</a></h3>
|
||||
<p class="description">Return a CUPS file associated with stderr.</p>
|
||||
<p class="code">
|
||||
<a href="#cups_file_t">cups_file_t</a> *cupsFileStderr (void);</p>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">CUPS file</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileStdin">cupsFileStdin</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileStdin">cupsFileStdin</a></h3>
|
||||
<p class="description">Return a CUPS file associated with stdin.</p>
|
||||
<p class="code">
|
||||
<a href="#cups_file_t">cups_file_t</a> *cupsFileStdin (void);</p>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">CUPS file</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileStdout">cupsFileStdout</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileStdout">cupsFileStdout</a></h3>
|
||||
<p class="description">Return a CUPS file associated with stdout.</p>
|
||||
<p class="code">
|
||||
<a href="#cups_file_t">cups_file_t</a> *cupsFileStdout (void);</p>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">CUPS file</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileTell">cupsFileTell</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileTell">cupsFileTell</a></h3>
|
||||
<p class="description">Return the current file position.</p>
|
||||
<p class="code">
|
||||
off_t cupsFileTell (<br>
|
||||
@@ -916,7 +917,7 @@ off_t cupsFileTell (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">File position</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileUnlock">cupsFileUnlock</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileUnlock">cupsFileUnlock</a></h3>
|
||||
<p class="description">Unlock access to a file.</p>
|
||||
<p class="code">
|
||||
int cupsFileUnlock (<br>
|
||||
@@ -929,7 +930,7 @@ int cupsFileUnlock (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">0 on success, -1 on error</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsFileWrite">cupsFileWrite</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsFileWrite">cupsFileWrite</a></h3>
|
||||
<p class="description">Write to a file.</p>
|
||||
<p class="code">
|
||||
ssize_t cupsFileWrite (<br>
|
||||
|
||||
+14
-17
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<title>Filter and Backend Programming</title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta name="creator" content="Mini-XML v2.6">
|
||||
<meta name="creator" content="Mini-XML v2.5">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
@@ -331,7 +331,7 @@ div.contents ul.subcontents li {
|
||||
<body>
|
||||
<div class='body'>
|
||||
<!--
|
||||
"$Id: api-filter.header 8087 2008-10-27 21:37:05Z mike $"
|
||||
"$Id: api-filter.header 7616 2008-05-28 00:34:13Z mike $"
|
||||
|
||||
Filter and backend programming header for the Common UNIX Printing System
|
||||
(CUPS).
|
||||
@@ -370,7 +370,7 @@ div.contents ul.subcontents li {
|
||||
</table></div>
|
||||
<h2 class="title">Contents</h2>
|
||||
<ul class="contents">
|
||||
<ul class="subcontents">
|
||||
</li>
|
||||
<li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
|
||||
<li><a href="#SECURITY">Security Considerations</a></li>
|
||||
<li><a href="#TEMPFILES">Temporary Files</a></li>
|
||||
@@ -392,7 +392,7 @@ div.contents ul.subcontents li {
|
||||
<li><a href="#cupsSideChannelSNMPGet" title="Query a SNMP OID's value.">cupsSideChannelSNMPGet</a></li>
|
||||
<li><a href="#cupsSideChannelSNMPWalk" title="Query multiple SNMP OID values.">cupsSideChannelSNMPWalk</a></li>
|
||||
<li><a href="#cupsSideChannelWrite" title="Write a side-channel message.">cupsSideChannelWrite</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<li><a href="#TYPES">Data Types</a><ul class="code">
|
||||
<li><a href="#cups_backend_t" title="Backend exit codes">cups_backend_t</a></li>
|
||||
<li><a href="#cups_sc_bidi_t" title="Bidirectional capabilities">cups_sc_bidi_t</a></li>
|
||||
@@ -408,6 +408,7 @@ div.contents ul.subcontents li {
|
||||
<li><a href="#cups_sc_state_e" title="Printer state bits">cups_sc_state_e</a></li>
|
||||
<li><a href="#cups_sc_status_e" title="Response status codes">cups_sc_status_e</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!--
|
||||
"$Id: api-filter.shtml 7962 2008-09-18 17:31:33Z mike $"
|
||||
|
||||
@@ -967,7 +968,7 @@ void *my_data;
|
||||
<a href="#cupsSideChannelSNMPWalk">cupsSNMPSideChannelWalk</a>(".1.3.6.1.2.1.43", 5.0, my_callback, my_data);
|
||||
</pre>
|
||||
<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsBackChannelRead">cupsBackChannelRead</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsBackChannelRead">cupsBackChannelRead</a></h3>
|
||||
<p class="description">Read data from the backchannel.</p>
|
||||
<p class="code">
|
||||
ssize_t cupsBackChannelRead (<br>
|
||||
@@ -992,7 +993,7 @@ parameter controls how many seconds to wait for the data - use 0.0 to
|
||||
return immediately if there is no data, -1.0 to wait for data indefinitely.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsBackChannelWrite">cupsBackChannelWrite</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsBackChannelWrite">cupsBackChannelWrite</a></h3>
|
||||
<p class="description">Write data to the backchannel.</p>
|
||||
<p class="code">
|
||||
ssize_t cupsBackChannelWrite (<br>
|
||||
@@ -1018,7 +1019,7 @@ controls how many seconds to wait for the data to be written - use
|
||||
indefinitely.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsBackendDeviceURI">cupsBackendDeviceURI</a></h3>
|
||||
<h3 class="function"><a name="cupsBackendDeviceURI">cupsBackendDeviceURI</a></h3>
|
||||
<p class="description">Get the device URI for a backend.</p>
|
||||
<p class="code">
|
||||
const char *cupsBackendDeviceURI (<br>
|
||||
@@ -1035,10 +1036,8 @@ const char *cupsBackendDeviceURI (<br>
|
||||
<p class="discussion">The "argv" argument is the argv argument passed to main(). This
|
||||
function returns the device URI passed in the DEVICE_URI environment
|
||||
variable or the device URI passed in argv[0], whichever is found
|
||||
first.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsBackendReport">cupsBackendReport</a></h3>
|
||||
first.</p>
|
||||
<h3 class="function"><a name="cupsBackendReport">cupsBackendReport</a></h3>
|
||||
<p class="description">Write a device line from a backend.</p>
|
||||
<p class="code">
|
||||
void cupsBackendReport (<br>
|
||||
@@ -1067,10 +1066,8 @@ void cupsBackendReport (<br>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">This function writes a single device line to stdout for a backend.
|
||||
It handles quoting of special characters in the device-make-and-model,
|
||||
device-info, device-id, and device-location strings.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/Mac OS X 10.5 </span><a name="cupsSideChannelDoRequest">cupsSideChannelDoRequest</a></h3>
|
||||
device-info, device-id, and device-location strings.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3 </span><a name="cupsSideChannelDoRequest">cupsSideChannelDoRequest</a></h3>
|
||||
<p class="description">Send a side-channel command to a backend and wait for a response.</p>
|
||||
<p class="code">
|
||||
<a href="#cups_sc_status_t">cups_sc_status_t</a> cupsSideChannelDoRequest (<br>
|
||||
@@ -1104,7 +1101,7 @@ pointed to by the "data" parameter. cupsSideChannelDoRequest() will
|
||||
update the value to contain the number of data bytes in the buffer.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/Mac OS X 10.5 </span><a name="cupsSideChannelRead">cupsSideChannelRead</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3 </span><a name="cupsSideChannelRead">cupsSideChannelRead</a></h3>
|
||||
<p class="description">Read a side-channel message.</p>
|
||||
<p class="code">
|
||||
int cupsSideChannelRead (<br>
|
||||
@@ -1227,7 +1224,7 @@ support SNMP queries. <code>CUPS_SC_STATUS_NO_RESPONSE</code> is returned when
|
||||
the printer does not respond to the first SNMP query.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/Mac OS X 10.5 </span><a name="cupsSideChannelWrite">cupsSideChannelWrite</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3 </span><a name="cupsSideChannelWrite">cupsSideChannelWrite</a></h3>
|
||||
<p class="description">Write a side-channel message.</p>
|
||||
<p class="code">
|
||||
int cupsSideChannelWrite (<br>
|
||||
|
||||
+74
-77
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<title>HTTP and IPP APIs</title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta name="creator" content="Mini-XML v2.6">
|
||||
<meta name="creator" content="Mini-XML v2.5">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
@@ -331,7 +331,7 @@ div.contents ul.subcontents li {
|
||||
<body>
|
||||
<div class='body'>
|
||||
<!--
|
||||
"$Id: api-httpipp.header 8087 2008-10-27 21:37:05Z mike $"
|
||||
"$Id: api-httpipp.header 7258 2008-01-28 00:15:05Z mike $"
|
||||
|
||||
HTTP and IPP API header for the Common UNIX Printing System (CUPS).
|
||||
|
||||
@@ -367,7 +367,7 @@ div.contents ul.subcontents li {
|
||||
</table></div>
|
||||
<h2 class="title">Contents</h2>
|
||||
<ul class="contents">
|
||||
<ul class="subcontents">
|
||||
</li>
|
||||
<li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
|
||||
<li><a href="#CREATING_URI_STRINGS">Creating URI Strings</a></li>
|
||||
<li><a href="#SENDING_REQUESTS_WITH_FILES">Sending Requests with Files</a></li>
|
||||
@@ -505,7 +505,7 @@ in seconds.">ippDateToTime</a></li>
|
||||
<li><a href="#ippWrite" title="Write data for an IPP message to a HTTP connection.">ippWrite</a></li>
|
||||
<li><a href="#ippWriteFile" title="Write data for an IPP message to a file.">ippWriteFile</a></li>
|
||||
<li><a href="#ippWriteIO" title="Write data for an IPP message.">ippWriteIO</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<li><a href="#TYPES">Data Types</a><ul class="code">
|
||||
<li><a href="#http_addrlist_t" title="Socket address list, which is
|
||||
used to enumerate all of the
|
||||
@@ -574,6 +574,7 @@ with a hostname. ">http_addrlist_s</a></li>
|
||||
<li><a href="#ipp_status_e" title="IPP status codes...">ipp_status_e</a></li>
|
||||
<li><a href="#ipp_tag_e" title="Format tags for attributes...">ipp_tag_e</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!--
|
||||
"$Id: api-httpipp.shtml 7684 2008-06-23 16:47:38Z mike $"
|
||||
|
||||
@@ -898,7 +899,7 @@ if (status == HTTP_CONTINUE)
|
||||
<a href='#ippDelete'>ippDelete</a>(request);
|
||||
</pre>
|
||||
<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.20/Mac OS X 10.4 </span><a name="cupsDoAuthentication">cupsDoAuthentication</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.20 </span><a name="cupsDoAuthentication">cupsDoAuthentication</a></h3>
|
||||
<p class="description">Authenticate a request.</p>
|
||||
<p class="code">
|
||||
int cupsDoAuthentication (<br>
|
||||
@@ -948,7 +949,7 @@ status, prior to resubmitting your request.
|
||||
<p class="discussion">This function sends the IPP request to the specified server, retrying
|
||||
and authenticating as necessary. The request is freed with <a href="#ippDelete"><code>ippDelete</code></a>
|
||||
after receiving a valid IPP response.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/Mac OS X 10.5 </span><a name="cupsDoIORequest">cupsDoIORequest</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3 </span><a name="cupsDoIORequest">cupsDoIORequest</a></h3>
|
||||
<p class="description">Do an IPP request with file descriptors.</p>
|
||||
<p class="code">
|
||||
<a href="#ipp_t">ipp_t</a> *cupsDoIORequest (<br>
|
||||
@@ -1029,7 +1030,7 @@ void cupsEncodeOptions (<br>
|
||||
<p class="discussion">This function adds operation, job, and then subscription attributes,
|
||||
in that order. Use the cupsEncodeOptions2() function to add attributes
|
||||
for a single group.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="cupsEncodeOptions2">cupsEncodeOptions2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsEncodeOptions2">cupsEncodeOptions2</a></h3>
|
||||
<p class="description">Encode printer options into IPP attributes for a group.</p>
|
||||
<p class="code">
|
||||
void cupsEncodeOptions2 (<br>
|
||||
@@ -1061,7 +1062,6 @@ to add the standard groups.
|
||||
ipp_status_t cupsGetDevices (<br>
|
||||
<a href="#http_t">http_t</a> *http,<br>
|
||||
int timeout,<br>
|
||||
const char *include_schemes,<br>
|
||||
const char *exclude_schemes,<br>
|
||||
cups_device_cb_t callback,<br>
|
||||
void *user_data<br>
|
||||
@@ -1072,8 +1072,6 @@ ipp_status_t cupsGetDevices (<br>
|
||||
<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
|
||||
<dt>timeout</dt>
|
||||
<dd class="description">Timeout in seconds or <code>CUPS_TIMEOUT_DEFAULT</code></dd>
|
||||
<dt>include_schemes</dt>
|
||||
<dd class="description">Comma-separated URI schemes to include or <code>CUPS_INCLUDE_ALL</code></dd>
|
||||
<dt>exclude_schemes</dt>
|
||||
<dd class="description">Comma-separated URI schemes to exclude or <code>CUPS_EXCLUDE_NONE</code></dd>
|
||||
<dt>callback</dt>
|
||||
@@ -1086,12 +1084,11 @@ ipp_status_t cupsGetDevices (<br>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">This function sends a CUPS-Get-Devices request and streams the discovered
|
||||
devices to the specified callback function. The "timeout" parameter controls
|
||||
how long the request lasts, while the "include_schemes" and "exclude_schemes"
|
||||
parameters provide comma-delimited lists of backends to include or omit from
|
||||
the request respectively.
|
||||
how long the request lasts, while the "exclude_schemes" parameter provides
|
||||
a comma-delimited list of backends to omit from the request.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.20/Mac OS X 10.4 </span><a name="cupsGetFd">cupsGetFd</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.20 </span><a name="cupsGetFd">cupsGetFd</a></h3>
|
||||
<p class="description">Get a file from the server.</p>
|
||||
<p class="code">
|
||||
<a href="#http_status_t">http_status_t</a> cupsGetFd (<br>
|
||||
@@ -1114,7 +1111,7 @@ the request respectively.
|
||||
<p class="discussion">This function returns <code>HTTP_OK</code> when the file is successfully retrieved.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.20/Mac OS X 10.4 </span><a name="cupsGetFile">cupsGetFile</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.20 </span><a name="cupsGetFile">cupsGetFile</a></h3>
|
||||
<p class="description">Get a file from the server.</p>
|
||||
<p class="code">
|
||||
<a href="#http_status_t">http_status_t</a> cupsGetFile (<br>
|
||||
@@ -1159,7 +1156,7 @@ cupsSendDocument() or cupsSendRequest(). For requests that return
|
||||
additional data, use httpRead() after getting a successful response.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.20/Mac OS X 10.4 </span><a name="cupsPutFd">cupsPutFd</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.20 </span><a name="cupsPutFd">cupsPutFd</a></h3>
|
||||
<p class="description">Put a file on the server.</p>
|
||||
<p class="code">
|
||||
<a href="#http_status_t">http_status_t</a> cupsPutFd (<br>
|
||||
@@ -1183,7 +1180,7 @@ additional data, use httpRead() after getting a successful response.
|
||||
successfully.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.20/Mac OS X 10.4 </span><a name="cupsPutFile">cupsPutFile</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.20 </span><a name="cupsPutFile">cupsPutFile</a></h3>
|
||||
<p class="description">Put a file on the server.</p>
|
||||
<p class="code">
|
||||
<a href="#http_status_t">http_status_t</a> cupsPutFile (<br>
|
||||
@@ -1287,7 +1284,7 @@ request is not freed.
|
||||
after <a href="#cupsStartDocument"><code>cupsStartDocument</code></a> to provide a document file.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpAddrAny">httpAddrAny</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAddrAny">httpAddrAny</a></h3>
|
||||
<p class="description">Check for the "any" address.</p>
|
||||
<p class="code">
|
||||
int httpAddrAny (<br>
|
||||
@@ -1300,7 +1297,7 @@ int httpAddrAny (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">1 if "any", 0 otherwise</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpAddrEqual">httpAddrEqual</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAddrEqual">httpAddrEqual</a></h3>
|
||||
<p class="description">Compare two addresses.</p>
|
||||
<p class="code">
|
||||
int httpAddrEqual (<br>
|
||||
@@ -1316,7 +1313,7 @@ int httpAddrEqual (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">1 if equal, 0 if not</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpAddrLength">httpAddrLength</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAddrLength">httpAddrLength</a></h3>
|
||||
<p class="description">Return the length of the address in bytes.</p>
|
||||
<p class="code">
|
||||
int httpAddrLength (<br>
|
||||
@@ -1329,7 +1326,7 @@ int httpAddrLength (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Length in bytes</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpAddrLocalhost">httpAddrLocalhost</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAddrLocalhost">httpAddrLocalhost</a></h3>
|
||||
<p class="description">Check for the local loopback address.</p>
|
||||
<p class="code">
|
||||
int httpAddrLocalhost (<br>
|
||||
@@ -1342,7 +1339,7 @@ int httpAddrLocalhost (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">1 if local host, 0 otherwise</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpAddrLookup">httpAddrLookup</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAddrLookup">httpAddrLookup</a></h3>
|
||||
<p class="description">Lookup the hostname associated with the address.</p>
|
||||
<p class="code">
|
||||
char *httpAddrLookup (<br>
|
||||
@@ -1361,7 +1358,7 @@ char *httpAddrLookup (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Host name</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpAddrString">httpAddrString</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAddrString">httpAddrString</a></h3>
|
||||
<p class="description">Convert an address to a numeric string.</p>
|
||||
<p class="code">
|
||||
char *httpAddrString (<br>
|
||||
@@ -1380,7 +1377,7 @@ char *httpAddrString (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Numeric address string</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpAssembleURI">httpAssembleURI</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAssembleURI">httpAssembleURI</a></h3>
|
||||
<p class="description">Assemble a uniform resource identifier from its
|
||||
components.</p>
|
||||
<p class="code">
|
||||
@@ -1422,7 +1419,7 @@ place of traditional string functions whenever you need to create a
|
||||
URI string.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpAssembleURIf">httpAssembleURIf</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAssembleURIf">httpAssembleURIf</a></h3>
|
||||
<p class="description">Assemble a uniform resource identifier from its
|
||||
components with a formatted resource.</p>
|
||||
<p class="code">
|
||||
@@ -1495,7 +1492,7 @@ int httpCheck (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">0 = no data, 1 = data available</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="httpClearCookie">httpClearCookie</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="httpClearCookie">httpClearCookie</a></h3>
|
||||
<p class="description">Clear the cookie value(s).</p>
|
||||
<p class="code">
|
||||
void httpClearCookie (<br>
|
||||
@@ -1588,7 +1585,7 @@ char *httpDecode64 (<br>
|
||||
which provides buffer length arguments.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21/Mac OS X 10.4 </span><a name="httpDecode64_2">httpDecode64_2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21 </span><a name="httpDecode64_2">httpDecode64_2</a></h3>
|
||||
<p class="description">Base64-decode a string.</p>
|
||||
<p class="code">
|
||||
char *httpDecode64_2 (<br>
|
||||
@@ -1644,7 +1641,7 @@ char *httpEncode64 (<br>
|
||||
which provides buffer length arguments.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21/Mac OS X 10.4 </span><a name="httpEncode64_2">httpEncode64_2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21 </span><a name="httpEncode64_2">httpEncode64_2</a></h3>
|
||||
<p class="description">Base64-encode a string.</p>
|
||||
<p class="code">
|
||||
char *httpEncode64_2 (<br>
|
||||
@@ -1706,7 +1703,7 @@ void httpFlush (<br>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to server</dd>
|
||||
</dl>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpFlushWrite">httpFlushWrite</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpFlushWrite">httpFlushWrite</a></h3>
|
||||
<p class="description">Flush data in write buffer.</p>
|
||||
<p class="code">
|
||||
int httpFlushWrite (<br>
|
||||
@@ -1735,7 +1732,7 @@ int httpGet (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Status of call (0 = success)</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/Mac OS X 10.5 </span><a name="httpGetAuthString">httpGetAuthString</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3 </span><a name="httpGetAuthString">httpGetAuthString</a></h3>
|
||||
<p class="description">Get the current authorization string.</p>
|
||||
<p class="code">
|
||||
char *httpGetAuthString (<br>
|
||||
@@ -1755,7 +1752,7 @@ string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
|
||||
value.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpGetBlocking">httpGetBlocking</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpGetBlocking">httpGetBlocking</a></h3>
|
||||
<p class="description">Get the blocking/non-block state of a connection.</p>
|
||||
<p class="code">
|
||||
int httpGetBlocking (<br>
|
||||
@@ -1768,7 +1765,7 @@ int httpGetBlocking (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">1 if blocking, 0 if non-blocking</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="httpGetCookie">httpGetCookie</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="httpGetCookie">httpGetCookie</a></h3>
|
||||
<p class="description">Get any cookie data from the response.</p>
|
||||
<p class="code">
|
||||
const char *httpGetCookie (<br>
|
||||
@@ -1794,7 +1791,7 @@ const char *httpGetDateString (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Date/time string</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpGetDateString2">httpGetDateString2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpGetDateString2">httpGetDateString2</a></h3>
|
||||
<p class="description">Get a formatted date/time string from a time value.</p>
|
||||
<p class="code">
|
||||
const char *httpGetDateString2 (<br>
|
||||
@@ -1826,7 +1823,7 @@ time_t httpGetDateTime (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">UNIX time</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpGetFd">httpGetFd</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpGetFd">httpGetFd</a></h3>
|
||||
<p class="description">Get the file descriptor associated with a connection.</p>
|
||||
<p class="code">
|
||||
int httpGetFd (<br>
|
||||
@@ -1869,7 +1866,7 @@ struct hostent *httpGetHostByName (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Host entry</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpGetHostname">httpGetHostname</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpGetHostname">httpGetHostname</a></h3>
|
||||
<p class="description">Get the FQDN for the connection or local system.</p>
|
||||
<p class="code">
|
||||
const char *httpGetHostname (<br>
|
||||
@@ -1914,7 +1911,7 @@ int httpGetLength (<br>
|
||||
2^31 - 1; use httpGetLength2() instead.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpGetLength2">httpGetLength2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpGetLength2">httpGetLength2</a></h3>
|
||||
<p class="description">Get the amount of data remaining from the
|
||||
content-length or transfer-encoding fields.</p>
|
||||
<p class="code">
|
||||
@@ -1933,7 +1930,7 @@ off_t httpGetLength2 (<br>
|
||||
content larger than 2^31 - 1.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpGetStatus">httpGetStatus</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpGetStatus">httpGetStatus</a></h3>
|
||||
<p class="description">Get the status of the last HTTP request.</p>
|
||||
<p class="code">
|
||||
<a href="#http_status_t">http_status_t</a> httpGetStatus (<br>
|
||||
@@ -1968,7 +1965,7 @@ char *httpGetSubField (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Value or NULL</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpGetSubField2">httpGetSubField2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpGetSubField2">httpGetSubField2</a></h3>
|
||||
<p class="description">Get a sub-field value.</p>
|
||||
<p class="code">
|
||||
char *httpGetSubField2 (<br>
|
||||
@@ -2167,7 +2164,7 @@ int httpRead (<br>
|
||||
read more than 2GB of data.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpRead2">httpRead2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpRead2">httpRead2</a></h3>
|
||||
<p class="description">Read data from a HTTP connection.</p>
|
||||
<p class="code">
|
||||
ssize_t httpRead2 (<br>
|
||||
@@ -2230,7 +2227,7 @@ void httpSeparate (<br>
|
||||
<p class="discussion">This function is deprecated; use the httpSeparateURI() function instead.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21/Mac OS X 10.4 </span><a name="httpSeparate2">httpSeparate2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21 </span><a name="httpSeparate2">httpSeparate2</a></h3>
|
||||
<p class="description">Separate a Universal Resource Identifier into its
|
||||
components.</p>
|
||||
<p class="code">
|
||||
@@ -2274,7 +2271,7 @@ void httpSeparate2 (<br>
|
||||
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpSeparateURI">httpSeparateURI</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpSeparateURI">httpSeparateURI</a></h3>
|
||||
<p class="description">Separate a Universal Resource Identifier into its
|
||||
components.</p>
|
||||
<p class="code">
|
||||
@@ -2318,7 +2315,7 @@ components.</p>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Result of separation</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/Mac OS X 10.5 </span><a name="httpSetAuthString">httpSetAuthString</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3 </span><a name="httpSetAuthString">httpSetAuthString</a></h3>
|
||||
<p class="description">Set the current authorization string.</p>
|
||||
<p class="code">
|
||||
void httpSetAuthString (<br>
|
||||
@@ -2342,7 +2339,7 @@ HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
|
||||
httpHead(), httpOptions(), httpPost, or httpPut().
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="httpSetCookie">httpSetCookie</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="httpSetCookie">httpSetCookie</a></h3>
|
||||
<p class="description">Set the cookie value(s)...</p>
|
||||
<p class="code">
|
||||
void httpSetCookie (<br>
|
||||
@@ -2356,7 +2353,7 @@ void httpSetCookie (<br>
|
||||
<dt>cookie</dt>
|
||||
<dd class="description">Cookie string</dd>
|
||||
</dl>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpSetExpect">httpSetExpect</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpSetExpect">httpSetExpect</a></h3>
|
||||
<p class="description">Set the Expect: header in a request.</p>
|
||||
<p class="code">
|
||||
void httpSetExpect (<br>
|
||||
@@ -2391,7 +2388,7 @@ void httpSetField (<br>
|
||||
<dt>value</dt>
|
||||
<dd class="description">Value</dd>
|
||||
</dl>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpSetLength">httpSetLength</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpSetLength">httpSetLength</a></h3>
|
||||
<p class="description">Set the content-length and content-encoding.</p>
|
||||
<p class="code">
|
||||
void httpSetLength (<br>
|
||||
@@ -2450,7 +2447,7 @@ int httpTrace (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">HTTP status</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="httpWait">httpWait</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="httpWait">httpWait</a></h3>
|
||||
<p class="description">Wait for data available on a connection.</p>
|
||||
<p class="code">
|
||||
int httpWait (<br>
|
||||
@@ -2490,7 +2487,7 @@ int httpWrite (<br>
|
||||
write more than 2GB of data.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="httpWrite2">httpWrite2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpWrite2">httpWrite2</a></h3>
|
||||
<p class="description">Write data to a HTTP connection.</p>
|
||||
<p class="code">
|
||||
ssize_t httpWrite2 (<br>
|
||||
@@ -2556,7 +2553,7 @@ ssize_t httpWrite2 (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">New attribute</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="ippAddCollection">ippAddCollection</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="ippAddCollection">ippAddCollection</a></h3>
|
||||
<p class="description">Add a collection value.</p>
|
||||
<p class="code">
|
||||
<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollection (<br>
|
||||
@@ -2578,7 +2575,7 @@ ssize_t httpWrite2 (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">New attribute</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="ippAddCollections">ippAddCollections</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="ippAddCollections">ippAddCollections</a></h3>
|
||||
<p class="description">Add an array of collection values.</p>
|
||||
<p class="code">
|
||||
<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollections (<br>
|
||||
@@ -2678,7 +2675,7 @@ ssize_t httpWrite2 (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">New attribute</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ippAddOctetString">ippAddOctetString</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ippAddOctetString">ippAddOctetString</a></h3>
|
||||
<p class="description">Add an octetString value to an IPP message.</p>
|
||||
<p class="code">
|
||||
<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddOctetString (<br>
|
||||
@@ -2912,7 +2909,7 @@ void ippDelete (<br>
|
||||
<dt>ipp</dt>
|
||||
<dd class="description">IPP message</dd>
|
||||
</dl>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="ippDeleteAttribute">ippDeleteAttribute</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="ippDeleteAttribute">ippDeleteAttribute</a></h3>
|
||||
<p class="description">Delete a single attribute in an IPP message.</p>
|
||||
<p class="code">
|
||||
void ippDeleteAttribute (<br>
|
||||
@@ -2939,7 +2936,7 @@ const char *ippErrorString (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Text string</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ippErrorValue">ippErrorValue</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ippErrorValue">ippErrorValue</a></h3>
|
||||
<p class="description">Return a status code for the given name.</p>
|
||||
<p class="code">
|
||||
ipp_status_t ippErrorValue (<br>
|
||||
@@ -3009,7 +3006,7 @@ size_t ippLength (<br>
|
||||
<a href="#ipp_t">ipp_t</a> *ippNew (void);</p>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">New IPP message</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ippNewRequest">ippNewRequest</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ippNewRequest">ippNewRequest</a></h3>
|
||||
<p class="description">Allocate a new IPP request message.</p>
|
||||
<p class="code">
|
||||
<a href="#ipp_t">ipp_t</a> *ippNewRequest (<br>
|
||||
@@ -3028,7 +3025,7 @@ attributes-natural-language attributes added. The
|
||||
attributes-natural-language value is derived from the current locale.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ippOpString">ippOpString</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ippOpString">ippOpString</a></h3>
|
||||
<p class="description">Return a name for the given operation id.</p>
|
||||
<p class="code">
|
||||
const char *ippOpString (<br>
|
||||
@@ -3041,7 +3038,7 @@ const char *ippOpString (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Name</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ippOpValue">ippOpValue</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ippOpValue">ippOpValue</a></h3>
|
||||
<p class="description">Return an operation id for the given name.</p>
|
||||
<p class="code">
|
||||
<a href="#ipp_op_t">ipp_op_t</a> ippOpValue (<br>
|
||||
@@ -3076,7 +3073,7 @@ int ippPort (void);</p>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Current state</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="ippReadFile">ippReadFile</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="ippReadFile">ippReadFile</a></h3>
|
||||
<p class="description">Read data for an IPP message from a file.</p>
|
||||
<p class="code">
|
||||
<a href="#ipp_state_t">ipp_state_t</a> ippReadFile (<br>
|
||||
@@ -3092,7 +3089,7 @@ int ippPort (void);</p>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Current state</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ippReadIO">ippReadIO</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ippReadIO">ippReadIO</a></h3>
|
||||
<p class="description">Read data for an IPP message.</p>
|
||||
<p class="code">
|
||||
<a href="#ipp_state_t">ipp_state_t</a> ippReadIO (<br>
|
||||
@@ -3191,7 +3188,7 @@ const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Current state</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="ippWriteFile">ippWriteFile</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="ippWriteFile">ippWriteFile</a></h3>
|
||||
<p class="description">Write data for an IPP message to a file.</p>
|
||||
<p class="code">
|
||||
<a href="#ipp_state_t">ipp_state_t</a> ippWriteFile (<br>
|
||||
@@ -3207,7 +3204,7 @@ const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Current state</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ippWriteIO">ippWriteIO</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ippWriteIO">ippWriteIO</a></h3>
|
||||
<p class="description">Write data for an IPP message.</p>
|
||||
<p class="code">
|
||||
<a href="#ipp_state_t">ipp_state_t</a> ippWriteIO (<br>
|
||||
@@ -3233,7 +3230,7 @@ const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate (<br>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Current state</p>
|
||||
<h2 class="title"><a name="TYPES">Data Types</a></h2>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="http_addrlist_t">http_addrlist_t</a></h3>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2 </span><a name="http_addrlist_t">http_addrlist_t</a></h3>
|
||||
<p class="description">Socket address list, which is
|
||||
used to enumerate all of the
|
||||
addresses that are associated
|
||||
@@ -3286,7 +3283,7 @@ typedef enum <a href="#http_uri_coding_e">http_uri_coding_e</a> http_uri_coding_
|
||||
<p class="code">
|
||||
typedef enum <a href="#http_uri_status_e">http_uri_status_e</a> http_uri_status_t;
|
||||
</p>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="http_version_t">http_version_t</a></h3>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2 </span><a name="http_version_t">http_version_t</a></h3>
|
||||
<p class="description">Socket address union, which
|
||||
makes using IPv6 and other
|
||||
address types easier and
|
||||
@@ -3304,7 +3301,7 @@ typedef struct <a href="#ipp_attribute_s">ipp_attribute_s</a> ipp_attribute_t;
|
||||
<p class="code">
|
||||
typedef enum <a href="#ipp_finish_e">ipp_finish_e</a> ipp_finish_t;
|
||||
</p>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ipp_iocb_t">ipp_iocb_t</a></h3>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2 </span><a name="ipp_iocb_t">ipp_iocb_t</a></h3>
|
||||
<p class="description">IPP IO Callback Function </p>
|
||||
<p class="code">
|
||||
typedef ssize_t (*ipp_iocb_t)(void *, <a href="#ipp_uchar_t">ipp_uchar_t</a> *, size_t);
|
||||
@@ -3370,7 +3367,7 @@ typedef enum <a href="#ipp_tag_e">ipp_tag_e</a> ipp_tag_t;
|
||||
typedef union <a href="#ipp_value_u">ipp_value_u</a> ipp_value_t;
|
||||
</p>
|
||||
<h2 class="title"><a name="STRUCTURES">Structures</a></h2>
|
||||
<h3 class="struct"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="http_addrlist_s">http_addrlist_s</a></h3>
|
||||
<h3 class="struct"><span class="info"> CUPS 1.2 </span><a name="http_addrlist_s">http_addrlist_s</a></h3>
|
||||
<p class="description">Socket address list, which is
|
||||
used to enumerate all of the
|
||||
addresses that are associated
|
||||
@@ -3429,8 +3426,8 @@ with a hostname. </p>
|
||||
<dd class="description">Current attribute group tag</dd>
|
||||
<dt>last </dt>
|
||||
<dd class="description">Last attribute in list</dd>
|
||||
<dt>prev <span class="info"> CUPS 1.2/Mac OS X 10.5 </span></dt>
|
||||
<dd class="description">Previous attribute (for read) </dd>
|
||||
<dt>prev </dt>
|
||||
<dd class="description">Previous attribute (for read)</dd>
|
||||
<dt>request </dt>
|
||||
<dd class="description">Request header</dd>
|
||||
<dt>state </dt>
|
||||
@@ -3456,8 +3453,8 @@ with a hostname. </p>
|
||||
<dl>
|
||||
<dt>boolean </dt>
|
||||
<dd class="description">Boolean value</dd>
|
||||
<dt>collection <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dd class="description">Collection value </dd>
|
||||
<dt>collection </dt>
|
||||
<dd class="description">Collection value</dd>
|
||||
<dt>date[11] </dt>
|
||||
<dd class="description">Date/time value</dd>
|
||||
<dt>integer </dt>
|
||||
@@ -3478,7 +3475,7 @@ with a hostname. </p>
|
||||
<dd class="description">MD5-session authentication in use</dd>
|
||||
<dt>HTTP_AUTH_MD5_SESS_INT </dt>
|
||||
<dd class="description">MD5-session authentication in use for body</dd>
|
||||
<dt>HTTP_AUTH_NEGOTIATE <span class="info"> CUPS 1.3/Mac OS X 10.5 </span></dt>
|
||||
<dt>HTTP_AUTH_NEGOTIATE <span class="info"> CUPS 1.3 </span></dt>
|
||||
<dd class="description">GSSAPI authentication in use </dd>
|
||||
<dt>HTTP_AUTH_NONE </dt>
|
||||
<dd class="description">No authentication in use</dd>
|
||||
@@ -3848,7 +3845,7 @@ with a hostname. </p>
|
||||
<dd class="description">Add or modify a class</dd>
|
||||
<dt>CUPS_ADD_MODIFY_PRINTER </dt>
|
||||
<dd class="description">Add or modify a printer</dd>
|
||||
<dt>CUPS_AUTHENTICATE_JOB <span class="info"> CUPS 1.2/Mac OS X 10.5 </span></dt>
|
||||
<dt>CUPS_AUTHENTICATE_JOB <span class="info"> CUPS 1.2 </span></dt>
|
||||
<dd class="description">Authenticate a job </dd>
|
||||
<dt>CUPS_DELETE_CLASS </dt>
|
||||
<dd class="description">Delete a class</dd>
|
||||
@@ -3862,7 +3859,7 @@ with a hostname. </p>
|
||||
<dd class="description">Get a list of supported devices</dd>
|
||||
<dt>CUPS_GET_DOCUMENT <span class="info"> CUPS 1.4 </span></dt>
|
||||
<dd class="description">Get a document file </dd>
|
||||
<dt>CUPS_GET_PPD <span class="info"> CUPS 1.3/Mac OS X 10.5 </span></dt>
|
||||
<dt>CUPS_GET_PPD <span class="info"> CUPS 1.3 </span></dt>
|
||||
<dd class="description">Get a PPD file </dd>
|
||||
<dt>CUPS_GET_PPDS </dt>
|
||||
<dd class="description">Get a list of supported drivers</dd>
|
||||
@@ -3876,13 +3873,13 @@ with a hostname. </p>
|
||||
<dd class="description">Set the default printer</dd>
|
||||
<dt>IPP_CANCEL_JOB </dt>
|
||||
<dd class="description">Cancel a job</dd>
|
||||
<dt>IPP_CANCEL_SUBSCRIPTION <span class="info"> CUPS 1.2/Mac OS X 10.5 </span></dt>
|
||||
<dt>IPP_CANCEL_SUBSCRIPTION <span class="info"> CUPS 1.2 </span></dt>
|
||||
<dd class="description">Cancel a subscription </dd>
|
||||
<dt>IPP_CREATE_JOB </dt>
|
||||
<dd class="description">Create an empty print job</dd>
|
||||
<dt>IPP_CREATE_JOB_SUBSCRIPTION <span class="info"> CUPS 1.2/Mac OS X 10.5 </span></dt>
|
||||
<dt>IPP_CREATE_JOB_SUBSCRIPTION <span class="info"> CUPS 1.2 </span></dt>
|
||||
<dd class="description">Create a job subscription </dd>
|
||||
<dt>IPP_CREATE_PRINTER_SUBSCRIPTION <span class="info"> CUPS 1.2/Mac OS X 10.5 </span></dt>
|
||||
<dt>IPP_CREATE_PRINTER_SUBSCRIPTION <span class="info"> CUPS 1.2 </span></dt>
|
||||
<dd class="description">Create a printer subscription </dd>
|
||||
<dt>IPP_DISABLE_PRINTER </dt>
|
||||
<dd class="description">Stop a printer</dd>
|
||||
@@ -3892,15 +3889,15 @@ with a hostname. </p>
|
||||
<dd class="description">Get a list of jobs</dd>
|
||||
<dt>IPP_GET_JOB_ATTRIBUTES </dt>
|
||||
<dd class="description">Get job attributes</dd>
|
||||
<dt>IPP_GET_NOTIFICATIONS <span class="info"> CUPS 1.2/Mac OS X 10.5 </span></dt>
|
||||
<dt>IPP_GET_NOTIFICATIONS <span class="info"> CUPS 1.2 </span></dt>
|
||||
<dd class="description">Get notification events </dd>
|
||||
<dt>IPP_GET_PRINTER_ATTRIBUTES </dt>
|
||||
<dd class="description">Get printer attributes</dd>
|
||||
<dt>IPP_GET_PRINTER_SUPPORTED_VALUES </dt>
|
||||
<dd class="description">Get supported attribute values</dd>
|
||||
<dt>IPP_GET_SUBSCRIPTIONS <span class="info"> CUPS 1.2/Mac OS X 10.5 </span></dt>
|
||||
<dt>IPP_GET_SUBSCRIPTIONS <span class="info"> CUPS 1.2 </span></dt>
|
||||
<dd class="description">Get list of subscriptions </dd>
|
||||
<dt>IPP_GET_SUBSCRIPTION_ATTRIBUTES <span class="info"> CUPS 1.2/Mac OS X 10.5 </span></dt>
|
||||
<dt>IPP_GET_SUBSCRIPTION_ATTRIBUTES <span class="info"> CUPS 1.2 </span></dt>
|
||||
<dd class="description">Get subscription attributes </dd>
|
||||
<dt>IPP_HOLD_JOB </dt>
|
||||
<dd class="description">Hold a job for printing</dd>
|
||||
@@ -3912,7 +3909,7 @@ with a hostname. </p>
|
||||
<dd class="description">Cancel all jobs</dd>
|
||||
<dt>IPP_RELEASE_JOB </dt>
|
||||
<dd class="description">Release a job for printing</dd>
|
||||
<dt>IPP_RENEW_SUBSCRIPTION <span class="info"> CUPS 1.2/Mac OS X 10.5 </span></dt>
|
||||
<dt>IPP_RENEW_SUBSCRIPTION <span class="info"> CUPS 1.2 </span></dt>
|
||||
<dd class="description">Renew a printer subscription </dd>
|
||||
<dt>IPP_RESTART_JOB </dt>
|
||||
<dd class="description">Reprint a job</dd>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<title>Introduction to CUPS Programming</title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta name="creator" content="Mini-XML v2.6">
|
||||
<meta name="creator" content="Mini-XML v2.5">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
@@ -384,13 +384,14 @@ div.contents ul.subcontents li {
|
||||
</table></div>
|
||||
<h2 class="title">Contents</h2>
|
||||
<ul class="contents">
|
||||
<ul class="subcontents">
|
||||
</li>
|
||||
<li><a href="#OVERVIEW">Overview</a></li>
|
||||
<li><a href="#COMPILING">Compiling Programs</a><ul class="subcontents">
|
||||
<li><a href="#XCODE">Compiling with Xcode</a></li>
|
||||
<li><a href="#COMMANDLINE">Compiling with GCC</a></li>
|
||||
</ul></li>
|
||||
</ul class="subcontents"></li>
|
||||
<li><a href="#WHERETOGO">Where to Go Next</a></li>
|
||||
</ul>
|
||||
<!--
|
||||
"$Id: api-cups.header 7279 2008-01-31 01:50:44Z mike $"
|
||||
|
||||
|
||||
+39
-38
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<title>PPD API</title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta name="creator" content="Mini-XML v2.6">
|
||||
<meta name="creator" content="Mini-XML v2.5">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
@@ -331,7 +331,7 @@ div.contents ul.subcontents li {
|
||||
<body>
|
||||
<div class='body'>
|
||||
<!--
|
||||
"$Id: api-ppd.header 8087 2008-10-27 21:37:05Z mike $"
|
||||
"$Id: api-ppd.header 7616 2008-05-28 00:34:13Z mike $"
|
||||
|
||||
PPD API header for the Common UNIX Printing System (CUPS).
|
||||
|
||||
@@ -366,7 +366,7 @@ div.contents ul.subcontents li {
|
||||
</table></div>
|
||||
<h2 class="title">Contents</h2>
|
||||
<ul class="contents">
|
||||
<ul class="subcontents">
|
||||
</li>
|
||||
<li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
|
||||
<li><a href="#LOADING">Loading a PPD File</a></li>
|
||||
<li><a href="#OPTIONS_AND_GROUPS">Options and Groups</a></li>
|
||||
@@ -424,7 +424,7 @@ conflicts.">ppdMarkOption</a></li>
|
||||
<li><a href="#ppdPageSizeLimits" title="Return the custom page size limits.">ppdPageSizeLimits</a></li>
|
||||
<li><a href="#ppdPageWidth" title="Get the page width for the given size.">ppdPageWidth</a></li>
|
||||
<li><a href="#ppdSetConformance" title="Set the conformance level for PPD files.">ppdSetConformance</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<li><a href="#TYPES">Data Types</a><ul class="code">
|
||||
<li><a href="#ppd_attr_t" title="PPD Attribute Structure ">ppd_attr_t</a></li>
|
||||
<li><a href="#ppd_choice_t" title="Option choices">ppd_choice_t</a></li>
|
||||
@@ -471,6 +471,7 @@ conflicts.">ppdMarkOption</a></li>
|
||||
<li><a href="#ppd_status_e" title="Types and structures...">ppd_status_e</a></li>
|
||||
<li><a href="#ppd_ui_e" title="UI Types">ppd_ui_e</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!--
|
||||
"$Id: api-ppd.shtml 7616 2008-05-28 00:34:13Z mike $"
|
||||
|
||||
@@ -804,7 +805,7 @@ int ppdCollect (<br>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">The choices array should be freed using <code>free</code> when you are
|
||||
finished with it.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppdCollect2">ppdCollect2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ppdCollect2">ppdCollect2</a></h3>
|
||||
<p class="description">Collect all marked options that reside in the
|
||||
specified section and minimum order.</p>
|
||||
<p class="code">
|
||||
@@ -867,7 +868,7 @@ int ppdEmit (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">0 on success, -1 on failure</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppdEmitAfterOrder">ppdEmitAfterOrder</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ppdEmitAfterOrder">ppdEmitAfterOrder</a></h3>
|
||||
<p class="description">Emit a subset of the code for marked options to a file.</p>
|
||||
<p class="code">
|
||||
int ppdEmitAfterOrder (<br>
|
||||
@@ -943,7 +944,7 @@ int ppdEmitJCL (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">0 on success, -1 on failure</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppdEmitJCLEnd">ppdEmitJCLEnd</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ppdEmitJCLEnd">ppdEmitJCLEnd</a></h3>
|
||||
<p class="description">Emit JCLEnd code to a file.</p>
|
||||
<p class="code">
|
||||
int ppdEmitJCLEnd (<br>
|
||||
@@ -959,7 +960,7 @@ int ppdEmitJCLEnd (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">0 on success, -1 on failure</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppdEmitString">ppdEmitString</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ppdEmitString">ppdEmitString</a></h3>
|
||||
<p class="description">Get a string containing the code for marked options.</p>
|
||||
<p class="code">
|
||||
char *ppdEmitString (<br>
|
||||
@@ -988,7 +989,7 @@ The return string is allocated on the heap and should be freed using
|
||||
<code>free</code> when you are done with it.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="ppdErrorString">ppdErrorString</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="ppdErrorString">ppdErrorString</a></h3>
|
||||
<p class="description">Returns the text assocated with a status.</p>
|
||||
<p class="code">
|
||||
const char *ppdErrorString (<br>
|
||||
@@ -1001,7 +1002,7 @@ const char *ppdErrorString (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Status string</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="ppdFindAttr">ppdFindAttr</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="ppdFindAttr">ppdFindAttr</a></h3>
|
||||
<p class="description">Find the first matching attribute.</p>
|
||||
<p class="code">
|
||||
<a href="#ppd_attr_t">ppd_attr_t</a> *ppdFindAttr (<br>
|
||||
@@ -1036,7 +1037,7 @@ const char *ppdErrorString (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Choice pointer or <code>NULL</code></p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppdFindCustomOption">ppdFindCustomOption</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ppdFindCustomOption">ppdFindCustomOption</a></h3>
|
||||
<p class="description">Find a custom option.</p>
|
||||
<p class="code">
|
||||
<a href="#ppd_coption_t">ppd_coption_t</a> *ppdFindCustomOption (<br>
|
||||
@@ -1052,7 +1053,7 @@ const char *ppdErrorString (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Custom option or NULL</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppdFindCustomParam">ppdFindCustomParam</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ppdFindCustomParam">ppdFindCustomParam</a></h3>
|
||||
<p class="description">Find a parameter for a custom option.</p>
|
||||
<p class="code">
|
||||
<a href="#ppd_cparam_t">ppd_cparam_t</a> *ppdFindCustomParam (<br>
|
||||
@@ -1084,7 +1085,7 @@ const char *ppdErrorString (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Pointer to choice or <code>NULL</code></p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="ppdFindNextAttr">ppdFindNextAttr</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="ppdFindNextAttr">ppdFindNextAttr</a></h3>
|
||||
<p class="description">Find the next matching attribute.</p>
|
||||
<p class="code">
|
||||
<a href="#ppd_attr_t">ppd_attr_t</a> *ppdFindNextAttr (<br>
|
||||
@@ -1119,7 +1120,7 @@ const char *ppdErrorString (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Pointer to option or <code>NULL</code></p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppdFirstCustomParam">ppdFirstCustomParam</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ppdFirstCustomParam">ppdFirstCustomParam</a></h3>
|
||||
<p class="description">Return the first parameter for a custom option.</p>
|
||||
<p class="code">
|
||||
<a href="#ppd_cparam_t">ppd_cparam_t</a> *ppdFirstCustomParam (<br>
|
||||
@@ -1132,7 +1133,7 @@ const char *ppdErrorString (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Custom parameter or NULL</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppdFirstOption">ppdFirstOption</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ppdFirstOption">ppdFirstOption</a></h3>
|
||||
<p class="description">Return the first option in the PPD file.</p>
|
||||
<p class="code">
|
||||
<a href="#ppd_option_t">ppd_option_t</a> *ppdFirstOption (<br>
|
||||
@@ -1193,7 +1194,7 @@ int ppdIsMarked (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Non-zero if option is marked</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="ppdLastError">ppdLastError</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="ppdLastError">ppdLastError</a></h3>
|
||||
<p class="description">Return the status from the last ppdOpen*().</p>
|
||||
<p class="code">
|
||||
<a href="#ppd_status_t">ppd_status_t</a> ppdLastError (<br>
|
||||
@@ -1206,7 +1207,7 @@ int ppdIsMarked (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Status code</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppdLocalize">ppdLocalize</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ppdLocalize">ppdLocalize</a></h3>
|
||||
<p class="description">Localize the PPD file to the current locale.</p>
|
||||
<p class="code">
|
||||
int ppdLocalize (<br>
|
||||
@@ -1248,7 +1249,7 @@ localized string uses the UTF-8 character encoding.
|
||||
<p class="discussion">This function uses the current locale to find the localized attribute for
|
||||
the given main and option keywords. If no localized version of the
|
||||
attribute exists for the current locale, the unlocalized version is returned.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/Mac OS X 10.5 </span><a name="ppdLocalizeIPPReason">ppdLocalizeIPPReason</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3 </span><a name="ppdLocalizeIPPReason">ppdLocalizeIPPReason</a></h3>
|
||||
<p class="description">Get the localized version of a cupsIPPReason
|
||||
attribute.</p>
|
||||
<p class="code">
|
||||
@@ -1337,7 +1338,7 @@ int ppdMarkOption (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Number of conflicts</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppdNextCustomParam">ppdNextCustomParam</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ppdNextCustomParam">ppdNextCustomParam</a></h3>
|
||||
<p class="description">Return the next parameter for a custom option.</p>
|
||||
<p class="code">
|
||||
<a href="#ppd_cparam_t">ppd_cparam_t</a> *ppdNextCustomParam (<br>
|
||||
@@ -1350,7 +1351,7 @@ int ppdMarkOption (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Custom parameter or NULL</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppdNextOption">ppdNextOption</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ppdNextOption">ppdNextOption</a></h3>
|
||||
<p class="description">Return the next option in the PPD file.</p>
|
||||
<p class="code">
|
||||
<a href="#ppd_option_t">ppd_option_t</a> *ppdNextOption (<br>
|
||||
@@ -1380,7 +1381,7 @@ int ppdMarkOption (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">PPD file record</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppdOpen2">ppdOpen2</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ppdOpen2">ppdOpen2</a></h3>
|
||||
<p class="description">Read a PPD file into memory.</p>
|
||||
<p class="code">
|
||||
<a href="#ppd_file_t">ppd_file_t</a> *ppdOpen2 (<br>
|
||||
@@ -1494,7 +1495,7 @@ float ppdPageWidth (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Width of page in points or 0.0</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.20/Mac OS X 10.4 </span><a name="ppdSetConformance">ppdSetConformance</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.20 </span><a name="ppdSetConformance">ppdSetConformance</a></h3>
|
||||
<p class="description">Set the conformance level for PPD files.</p>
|
||||
<p class="code">
|
||||
void ppdSetConformance (<br>
|
||||
@@ -1506,7 +1507,7 @@ void ppdSetConformance (<br>
|
||||
<dd class="description">Conformance level</dd>
|
||||
</dl>
|
||||
<h2 class="title"><a name="TYPES">Data Types</a></h2>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="ppd_attr_t">ppd_attr_t</a></h3>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.1.19 </span><a name="ppd_attr_t">ppd_attr_t</a></h3>
|
||||
<p class="description">PPD Attribute Structure </p>
|
||||
<p class="code">
|
||||
typedef struct <a href="#ppd_attr_s">ppd_attr_s</a> ppd_attr_t;
|
||||
@@ -1516,7 +1517,7 @@ typedef struct <a href="#ppd_attr_s">ppd_attr_s</a> ppd_attr_t;
|
||||
<p class="code">
|
||||
typedef struct <a href="#ppd_choice_s">ppd_choice_s</a> ppd_choice_t;
|
||||
</p>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="ppd_conform_t">ppd_conform_t</a></h3>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.1.19 </span><a name="ppd_conform_t">ppd_conform_t</a></h3>
|
||||
<p class="description">Conformance Levels </p>
|
||||
<p class="code">
|
||||
typedef enum <a href="#ppd_conform_e">ppd_conform_e</a> ppd_conform_t;
|
||||
@@ -1526,27 +1527,27 @@ typedef enum <a href="#ppd_conform_e">ppd_conform_e</a> ppd_conform_t;
|
||||
<p class="code">
|
||||
typedef struct <a href="#ppd_const_s">ppd_const_s</a> ppd_const_t;
|
||||
</p>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppd_coption_t">ppd_coption_t</a></h3>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2 </span><a name="ppd_coption_t">ppd_coption_t</a></h3>
|
||||
<p class="description">Custom Option </p>
|
||||
<p class="code">
|
||||
typedef struct <a href="#ppd_coption_s">ppd_coption_s</a> ppd_coption_t;
|
||||
</p>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppd_cparam_t">ppd_cparam_t</a></h3>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2 </span><a name="ppd_cparam_t">ppd_cparam_t</a></h3>
|
||||
<p class="description">Custom Parameter </p>
|
||||
<p class="code">
|
||||
typedef struct <a href="#ppd_cparam_s">ppd_cparam_s</a> ppd_cparam_t;
|
||||
</p>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppd_cplimit_t">ppd_cplimit_t</a></h3>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2 </span><a name="ppd_cplimit_t">ppd_cplimit_t</a></h3>
|
||||
<p class="description">Custom Parameter Limit </p>
|
||||
<p class="code">
|
||||
typedef union <a href="#ppd_cplimit_u">ppd_cplimit_u</a> ppd_cplimit_t;
|
||||
</p>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppd_cptype_t">ppd_cptype_t</a></h3>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2 </span><a name="ppd_cptype_t">ppd_cptype_t</a></h3>
|
||||
<p class="description">Custom Parameter Type </p>
|
||||
<p class="code">
|
||||
typedef enum <a href="#ppd_cptype_e">ppd_cptype_e</a> ppd_cptype_t;
|
||||
</p>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppd_cpvalue_t">ppd_cpvalue_t</a></h3>
|
||||
<h3 class="typedef"><span class="info"> CUPS 1.2 </span><a name="ppd_cpvalue_t">ppd_cpvalue_t</a></h3>
|
||||
<p class="description">Custom Parameter Value </p>
|
||||
<p class="code">
|
||||
typedef union <a href="#ppd_cpvalue_u">ppd_cpvalue_u</a> ppd_cpvalue_t;
|
||||
@@ -1602,7 +1603,7 @@ typedef enum <a href="#ppd_status_e">ppd_status_e</a> ppd_status_t;
|
||||
typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
|
||||
</p>
|
||||
<h2 class="title"><a name="STRUCTURES">Structures</a></h2>
|
||||
<h3 class="struct"><span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span><a name="ppd_attr_s">ppd_attr_s</a></h3>
|
||||
<h3 class="struct"><span class="info"> CUPS 1.1.19 </span><a name="ppd_attr_s">ppd_attr_s</a></h3>
|
||||
<p class="description">PPD Attribute Structure </p>
|
||||
<p class="code">struct ppd_attr_s {<br>
|
||||
char name[PPD_MAX_NAME];<br>
|
||||
@@ -1662,7 +1663,7 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
|
||||
<dt>option2[PPD_MAX_NAME] </dt>
|
||||
<dd class="description">Second keyword</dd>
|
||||
</dl>
|
||||
<h3 class="struct"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppd_coption_s">ppd_coption_s</a></h3>
|
||||
<h3 class="struct"><span class="info"> CUPS 1.2 </span><a name="ppd_coption_s">ppd_coption_s</a></h3>
|
||||
<p class="description">Custom Option </p>
|
||||
<p class="code">struct ppd_coption_s {<br>
|
||||
char keyword[PPD_MAX_NAME];<br>
|
||||
@@ -1681,7 +1682,7 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
|
||||
<dt>params </dt>
|
||||
<dd class="description">Parameters</dd>
|
||||
</dl>
|
||||
<h3 class="struct"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppd_cparam_s">ppd_cparam_s</a></h3>
|
||||
<h3 class="struct"><span class="info"> CUPS 1.2 </span><a name="ppd_cparam_s">ppd_cparam_s</a></h3>
|
||||
<p class="description">Custom Parameter </p>
|
||||
<p class="code">struct ppd_cparam_s {<br>
|
||||
<a href="#ppd_cpvalue_t">ppd_cpvalue_t</a> current;<br>
|
||||
@@ -1836,13 +1837,13 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
|
||||
<dd class="description">Number of page sizes</dd>
|
||||
<dt>patches </dt>
|
||||
<dd class="description">Patch commands to be sent to printer</dd>
|
||||
<dt>pcfilename <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>pcfilename <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">PCFileName string </dd>
|
||||
<dt>product </dt>
|
||||
<dd class="description">Product name (from PS RIP/interpreter)</dd>
|
||||
<dt>profiles <span class="info"> DEPRECATED </span></dt>
|
||||
<dd class="description">sRGB color profiles </dd>
|
||||
<dt>protocols <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>protocols <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">Protocols (BCP, TBCP) string </dd>
|
||||
<dt>shortnickname </dt>
|
||||
<dd class="description">Short version of nickname</dd>
|
||||
@@ -1869,7 +1870,7 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
|
||||
<dl>
|
||||
<dt>PPD_MAX_NAME] </dt>
|
||||
<dd class="description">Human-readable group name</dd>
|
||||
<dt>name[PPD_MAX_NAME] <span class="info"> CUPS 1.1.18/Mac OS X 10.3 </span></dt>
|
||||
<dt>name[PPD_MAX_NAME] <span class="info"> CUPS 1.1.18 </span></dt>
|
||||
<dd class="description">Group name </dd>
|
||||
<dt>num_options </dt>
|
||||
<dd class="description">Number of options</dd>
|
||||
@@ -1968,7 +1969,7 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
|
||||
<dd class="description">Width of media in points</dd>
|
||||
</dl>
|
||||
<h2 class="title"><a name="UNIONS">Unions</a></h2>
|
||||
<h3 class="union"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppd_cplimit_u">ppd_cplimit_u</a></h3>
|
||||
<h3 class="union"><span class="info"> CUPS 1.2 </span><a name="ppd_cplimit_u">ppd_cplimit_u</a></h3>
|
||||
<p class="description">Custom Parameter Limit </p>
|
||||
<p class="code">union ppd_cplimit_u {<br>
|
||||
float custom_curve;<br>
|
||||
@@ -1999,7 +2000,7 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
|
||||
<dt>custom_string </dt>
|
||||
<dd class="description">String length</dd>
|
||||
</dl>
|
||||
<h3 class="union"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppd_cpvalue_u">ppd_cpvalue_u</a></h3>
|
||||
<h3 class="union"><span class="info"> CUPS 1.2 </span><a name="ppd_cpvalue_u">ppd_cpvalue_u</a></h3>
|
||||
<p class="description">Custom Parameter Value </p>
|
||||
<p class="code">union ppd_cpvalue_u {<br>
|
||||
float custom_curve;<br>
|
||||
@@ -2040,7 +2041,7 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
|
||||
<dt>PPD_CONFORM_STRICT </dt>
|
||||
<dd class="description">Require strict conformance</dd>
|
||||
</dl>
|
||||
<h3 class="enumeration"><span class="info"> CUPS 1.2/Mac OS X 10.5 </span><a name="ppd_cptype_e">ppd_cptype_e</a></h3>
|
||||
<h3 class="enumeration"><span class="info"> CUPS 1.2 </span><a name="ppd_cptype_e">ppd_cptype_e</a></h3>
|
||||
<p class="description">Custom Parameter Type </p>
|
||||
<h4 class="constants">Constants</h4>
|
||||
<dl>
|
||||
|
||||
+22
-21
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<title>Raster API</title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta name="creator" content="Mini-XML v2.6">
|
||||
<meta name="creator" content="Mini-XML v2.5">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
@@ -367,7 +367,7 @@ div.contents ul.subcontents li {
|
||||
</table></div>
|
||||
<h2 class="title">Contents</h2>
|
||||
<ul class="contents">
|
||||
<ul class="subcontents">
|
||||
</li>
|
||||
<li><a href="#OVERVIEW">Overview</a></li>
|
||||
<li><a href="#TASKS">Functions by Task</a><ul class="subcontents">
|
||||
<li><a href="#OPENCLOSE">Opening and Closing Raster Streams</a></li>
|
||||
@@ -388,7 +388,7 @@ header structure.">cupsRasterWriteHeader</a></li>
|
||||
<li><a href="#cupsRasterWriteHeader2" title="Write a raster page header from a version 2
|
||||
page header structure.">cupsRasterWriteHeader2</a></li>
|
||||
<li><a href="#cupsRasterWritePixels" title="Write raster pixels.">cupsRasterWritePixels</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<li><a href="#TYPES">Data Types</a><ul class="code">
|
||||
<li><a href="#cups_adv_t" title="AdvanceMedia attribute values">cups_adv_t</a></li>
|
||||
<li><a href="#cups_bool_t" title="Types...">cups_bool_t</a></li>
|
||||
@@ -421,6 +421,7 @@ by the RIPs...">cups_orient_t</a></li>
|
||||
<li><a href="#cups_order_e" title="cupsColorOrder attribute values">cups_order_e</a></li>
|
||||
<li><a href="#cups_orient_e" title="">cups_orient_e</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!--
|
||||
"$Id$"
|
||||
|
||||
@@ -1181,9 +1182,9 @@ factor not applied) </dd>
|
||||
<p class="description"></p>
|
||||
<h4 class="constants">Constants</h4>
|
||||
<dl>
|
||||
<dt>CUPS_CSPACE_CIELab <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_CIELab <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">CIE Lab </dd>
|
||||
<dt>CUPS_CSPACE_CIEXYZ <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_CIEXYZ <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">CIE XYZ </dd>
|
||||
<dt>CUPS_CSPACE_CMY </dt>
|
||||
<dd class="description">Cyan, magenta, yellow</dd>
|
||||
@@ -1195,35 +1196,35 @@ factor not applied) </dd>
|
||||
<dd class="description">Gold, magenta, yellow, silver</dd>
|
||||
<dt>CUPS_CSPACE_GOLD </dt>
|
||||
<dd class="description">Gold foil</dd>
|
||||
<dt>CUPS_CSPACE_ICC1 <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_ICC1 <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">ICC-based, 1 color </dd>
|
||||
<dt>CUPS_CSPACE_ICC2 <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_ICC2 <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">ICC-based, 2 colors </dd>
|
||||
<dt>CUPS_CSPACE_ICC3 <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_ICC3 <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">ICC-based, 3 colors </dd>
|
||||
<dt>CUPS_CSPACE_ICC4 <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_ICC4 <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">ICC-based, 4 colors </dd>
|
||||
<dt>CUPS_CSPACE_ICC5 <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_ICC5 <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">ICC-based, 5 colors </dd>
|
||||
<dt>CUPS_CSPACE_ICC6 <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_ICC6 <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">ICC-based, 6 colors </dd>
|
||||
<dt>CUPS_CSPACE_ICC7 <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_ICC7 <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">ICC-based, 7 colors </dd>
|
||||
<dt>CUPS_CSPACE_ICC8 <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_ICC8 <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">ICC-based, 8 colors </dd>
|
||||
<dt>CUPS_CSPACE_ICC9 <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_ICC9 <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">ICC-based, 9 colors </dd>
|
||||
<dt>CUPS_CSPACE_ICCA <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_ICCA <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">ICC-based, 10 colors </dd>
|
||||
<dt>CUPS_CSPACE_ICCB <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_ICCB <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">ICC-based, 11 colors </dd>
|
||||
<dt>CUPS_CSPACE_ICCC <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_ICCC <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">ICC-based, 12 colors </dd>
|
||||
<dt>CUPS_CSPACE_ICCD <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_ICCD <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">ICC-based, 13 colors </dd>
|
||||
<dt>CUPS_CSPACE_ICCE <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_ICCE <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">ICC-based, 14 colors </dd>
|
||||
<dt>CUPS_CSPACE_ICCF <span class="info"> CUPS 1.1.19/Mac OS X 10.3 </span></dt>
|
||||
<dt>CUPS_CSPACE_ICCF <span class="info"> CUPS 1.1.19 </span></dt>
|
||||
<dd class="description">ICC-based, 15 colors </dd>
|
||||
<dt>CUPS_CSPACE_K </dt>
|
||||
<dd class="description">Black</dd>
|
||||
@@ -1298,7 +1299,7 @@ light-cyan, light-magenta</dd>
|
||||
<dd class="description">Open stream for reading</dd>
|
||||
<dt>CUPS_RASTER_WRITE </dt>
|
||||
<dd class="description">Open stream for writing</dd>
|
||||
<dt>CUPS_RASTER_WRITE_COMPRESSED <span class="info"> CUPS 1.3/Mac OS X 10.5 </span></dt>
|
||||
<dt>CUPS_RASTER_WRITE_COMPRESSED <span class="info"> CUPS 1.3 </span></dt>
|
||||
<dd class="description">Open stream for compressed writing </dd>
|
||||
</dl>
|
||||
<h3 class="enumeration"><a name="cups_order_e">cups_order_e</a></h3>
|
||||
|
||||
@@ -352,11 +352,6 @@ lpd://<i>ip-address-or-hostname</i>/<i>queue</i>?<i>option=value&option=value</i
|
||||
<TD>Kodak®</TD>
|
||||
<TD>lpd://<I>address</I>/ps</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Netgear WGPS606</TD>
|
||||
<TD>lpd://<I>address</I>/L1<BR>
|
||||
lpd://<I>address</I>/L2</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>QMS® CrownNet<SUP>TM</SUP></TD>
|
||||
<TD>lpd://<I>address</I>/ps</TD>
|
||||
|
||||
+4
-13
@@ -440,15 +440,6 @@ of the order of the pages in the <CODE>page-ranges</CODE> option.
|
||||
|
||||
<P>The default is to print all pages.
|
||||
|
||||
<blockquote><b>Note:</b>
|
||||
|
||||
<p>The page numbers used by <code>page-ranges</code> refer to the output
|
||||
pages and not the document's page numbers. Options like <code>number-up</code>
|
||||
can make the output page numbering not match the document page numbers.</p>
|
||||
|
||||
</blockquote>
|
||||
|
||||
|
||||
<H3><A NAME="PAGESET">Selecting Even or Odd Pages</A></H3>
|
||||
|
||||
<P>Use the <CODE>-o page-set=set</CODE> option to select the even or odd pages:</P>
|
||||
@@ -500,14 +491,14 @@ layout of the pages on each output page:</P>
|
||||
<LI><CODE>-o number-up-layout=tbrl</CODE>; Top to bottom, right to left</LI>
|
||||
</UL>
|
||||
|
||||
<H3><A NAME="FIT_TO_PAGE">Scaling to Fit</A></H3>
|
||||
<H3><A NAME="FITPLOT">Scaling to Fit</A></H3>
|
||||
|
||||
<P>The <CODE>-o fit-to-page</CODE> option specifies that the document
|
||||
<P>The <CODE>-o fitplot</CODE> option specifies that the document
|
||||
should be scaled to fit on the page:</P>
|
||||
|
||||
<PRE CLASS="command">
|
||||
lp -o fit-to-page filename
|
||||
lpr -o fit-to-page filename
|
||||
lp -o fitplot filename
|
||||
lpr -o fitplot filename
|
||||
</PRE>
|
||||
|
||||
<P>The default is to use the size specified in the file.</P>
|
||||
|
||||
@@ -1,335 +1,10 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<HTML>
|
||||
<!-- SECTION: Programming -->
|
||||
<head>
|
||||
<title>Developing PostScript Printer Drivers</title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta name="creator" content="Mini-XML v2.6">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
}
|
||||
<HEAD>
|
||||
<TITLE>Developing PostScript Printer Drivers</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
|
||||
H1, H2, H3, H4, H5, H6, P, TD, TH {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
}
|
||||
|
||||
KBD {
|
||||
font-family: monaco, courier, monospace;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
PRE {
|
||||
font-family: monaco, courier, monospace;
|
||||
}
|
||||
|
||||
PRE.command {
|
||||
margin-left: 36pt;
|
||||
}
|
||||
|
||||
P.example {
|
||||
font-style: italic;
|
||||
margin-left: 36pt;
|
||||
}
|
||||
|
||||
PRE.example {
|
||||
background: #eeeeee;
|
||||
border: dotted thin #999999;
|
||||
margin-left: 36pt;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
PRE.command EM, PRE.example EM {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
}
|
||||
|
||||
P.command {
|
||||
font-family: monaco, courier, monospace;
|
||||
margin-left: 36pt;
|
||||
}
|
||||
|
||||
P.formula {
|
||||
font-style: italic;
|
||||
margin-left: 36pt;
|
||||
}
|
||||
|
||||
BLOCKQUOTE {
|
||||
background: #cccccc;
|
||||
border: solid thin #999999;
|
||||
padding: 10pt;
|
||||
}
|
||||
|
||||
A IMG {
|
||||
border: none;
|
||||
}
|
||||
|
||||
A:link:hover IMG {
|
||||
background: #f0f0f0;
|
||||
border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
}
|
||||
|
||||
A:link, A:visited {
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
A:link:hover, A:visited:hover, A:active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
SUB, SUP {
|
||||
font-size: 50%;
|
||||
}
|
||||
|
||||
TR.data, TD.data, TR.data TD {
|
||||
margin-top: 10pt;
|
||||
padding: 5pt;
|
||||
border-bottom: solid 1pt #999999;
|
||||
}
|
||||
|
||||
TR.data TH {
|
||||
border-bottom: solid 1pt #999999;
|
||||
padding-top: 10pt;
|
||||
padding-left: 5pt;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
DIV.table TABLE {
|
||||
border: solid thin #999999;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
DIV.table CAPTION {
|
||||
caption-side: top;
|
||||
font-size: 120%;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
DIV.table TABLE TD {
|
||||
border: solid thin #cccccc;
|
||||
padding-top: 5pt;
|
||||
}
|
||||
|
||||
DIV.table TABLE TH {
|
||||
background: #cccccc;
|
||||
border: none;
|
||||
border-bottom: solid thin #999999;
|
||||
}
|
||||
|
||||
DIV.figure TABLE {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
DIV.figure CAPTION {
|
||||
caption-side: bottom;
|
||||
font-size: 120%;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
TH.label {
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
TH.sublabel {
|
||||
text-align: right;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
HR {
|
||||
border: solid thin;
|
||||
}
|
||||
|
||||
SPAN.info {
|
||||
background: black;
|
||||
border: thin solid black;
|
||||
color: white;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
|
||||
float: right;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
H2.title, H3.title {
|
||||
border-bottom: solid 2pt #000000;
|
||||
}
|
||||
|
||||
DIV.indent, TABLE.indent {
|
||||
margin-top: 2em;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
TABLE.indent {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
TABLE.indent TD, TABLE.indent TH {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
TABLE.list {
|
||||
border-collapse: collapse;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
TABLE.list TH {
|
||||
background: white;
|
||||
border-bottom: solid thin #cccccc;
|
||||
color: #444444;
|
||||
padding-top: 10pt;
|
||||
padding-left: 5pt;
|
||||
text-align: left;
|
||||
vertical-align: bottom;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
TABLE.list TH A {
|
||||
color: #4444cc;
|
||||
}
|
||||
|
||||
TABLE.list TD {
|
||||
border-bottom: solid thin #eeeeee;
|
||||
padding-top: 5pt;
|
||||
padding-left: 5pt;
|
||||
}
|
||||
|
||||
TABLE.list TR:nth-child(even) {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
TABLE.list TR:nth-child(odd) {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
DT {
|
||||
margin-left: 36pt;
|
||||
margin-top: 12pt;
|
||||
}
|
||||
|
||||
DD {
|
||||
margin-left: 54pt;
|
||||
}
|
||||
|
||||
DL.category DT {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
P.summary {
|
||||
margin-left: 36pt;
|
||||
font-family: monaco, courier, monospace;
|
||||
}
|
||||
|
||||
DIV.summary TABLE {
|
||||
border: solid thin #999999;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
DIV.summary TABLE TD, DIV.summary TABLE TH {
|
||||
border: solid thin #999999;
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
DIV.summary TABLE THEAD TH {
|
||||
background: #eeeeee;
|
||||
}
|
||||
|
||||
/* API documentation styles... */
|
||||
div.body h1 {
|
||||
margin: 0;
|
||||
}
|
||||
div.body h2 {
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
div.body h3, div.body h4, div.body h5 {
|
||||
margin-bottom: 0.5em;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
.class, .enumeration, .function, .struct, .typedef, .union {
|
||||
border-bottom: solid thin #999999;
|
||||
margin-bottom: 0;
|
||||
margin-top: 2em;
|
||||
}
|
||||
.description {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
code, p.code, pre, ul.code li {
|
||||
font-family: monaco, courier, monospace;
|
||||
font-size: 90%;
|
||||
}
|
||||
ul.code, ul.contents, ul.subcontents {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
ul.code li {
|
||||
margin: 0;
|
||||
}
|
||||
ul.contents > li {
|
||||
margin-top: 1em;
|
||||
}
|
||||
ul.contents li ul.code, ul.contents li ul.subcontents {
|
||||
padding-left: 2em;
|
||||
}
|
||||
div.body dl {
|
||||
margin-left: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
div.body dt {
|
||||
font-style: italic;
|
||||
margin-left: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
div.body dd {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
/* This is just for the HTML files generated with the framedhelp target */
|
||||
div.contents {
|
||||
background: #e8e8e8;
|
||||
border: solid thin black;
|
||||
padding: 10px;
|
||||
}
|
||||
div.contents h1 {
|
||||
font-size: 110%;
|
||||
}
|
||||
div.contents h2 {
|
||||
font-size: 100%;
|
||||
}
|
||||
div.contents ul.contents {
|
||||
font-size: 80%;
|
||||
}
|
||||
div.contents ul.subcontents li {
|
||||
margin-left: 1em;
|
||||
text-indent: -1em;
|
||||
}
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='body'>
|
||||
<p>This document describes how to develop printer drivers for PostScript printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#IMPORT'>importing existing PPD files</a>, <a href='#FILTERS'>using custom filters</a>, <a href='#COLOR'>implementing color management</a>, <a href='#MACOSX'>adding Mac OS X features</a>, and <a href='#DEPLOY'>deploying your driver</a>.</p>
|
||||
|
||||
<div class='summary'><table summary='General Information'>
|
||||
@@ -345,17 +20,8 @@ div.contents ul.subcontents li {
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h2 class="title">Contents</h2>
|
||||
<ul class="contents">
|
||||
<ul class="subcontents">
|
||||
<li><a href="#BASICS">Printer Driver Basics</a></li>
|
||||
<li><a href="#CREATING">Creating New PPD Files</a><ul class="subcontents">
|
||||
<li><a href="#IMPORT">Importing Existing PPD Files</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#FILTERS">Using Custom Filters</a></li>
|
||||
<li><a href="#COLOR">Implementing Color Management</a></li>
|
||||
<li><a href="#MACOSX">Adding Mac OS X Features</a></li>
|
||||
<li><a href="#DEPLOY">Deploying Your Driver</a></li>
|
||||
|
||||
|
||||
<h2 class='title'><a name='BASICS'>Printer Driver Basics</a></h2>
|
||||
|
||||
<p>A CUPS PostScript printer driver consists of a PostScript Printer Description (PPD) file that describes the features and capabilities of the device, zero or more <em>filter</em> programs that prepare print data for the device, and zero or more support files for color management, online help, and so forth. The PPD file includes references to all of the filters and support files used by the driver.</p>
|
||||
@@ -617,6 +283,7 @@ information file.</P>
|
||||
<h2 class='title'><a name='DEPLOY'>Deploying Your Driver</a></h2>
|
||||
|
||||
<p>Talk about install locations, etc.</p>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+10
-346
@@ -1,335 +1,10 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<HTML>
|
||||
<!-- SECTION: Programming -->
|
||||
<head>
|
||||
<title>Introduction to the PPD Compiler</title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta name="creator" content="Mini-XML v2.6">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
}
|
||||
<HEAD>
|
||||
<TITLE>Introduction to the PPD Compiler</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
|
||||
H1, H2, H3, H4, H5, H6, P, TD, TH {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
}
|
||||
|
||||
KBD {
|
||||
font-family: monaco, courier, monospace;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
PRE {
|
||||
font-family: monaco, courier, monospace;
|
||||
}
|
||||
|
||||
PRE.command {
|
||||
margin-left: 36pt;
|
||||
}
|
||||
|
||||
P.example {
|
||||
font-style: italic;
|
||||
margin-left: 36pt;
|
||||
}
|
||||
|
||||
PRE.example {
|
||||
background: #eeeeee;
|
||||
border: dotted thin #999999;
|
||||
margin-left: 36pt;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
PRE.command EM, PRE.example EM {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
}
|
||||
|
||||
P.command {
|
||||
font-family: monaco, courier, monospace;
|
||||
margin-left: 36pt;
|
||||
}
|
||||
|
||||
P.formula {
|
||||
font-style: italic;
|
||||
margin-left: 36pt;
|
||||
}
|
||||
|
||||
BLOCKQUOTE {
|
||||
background: #cccccc;
|
||||
border: solid thin #999999;
|
||||
padding: 10pt;
|
||||
}
|
||||
|
||||
A IMG {
|
||||
border: none;
|
||||
}
|
||||
|
||||
A:link:hover IMG {
|
||||
background: #f0f0f0;
|
||||
border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
}
|
||||
|
||||
A:link, A:visited {
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
A:link:hover, A:visited:hover, A:active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
SUB, SUP {
|
||||
font-size: 50%;
|
||||
}
|
||||
|
||||
TR.data, TD.data, TR.data TD {
|
||||
margin-top: 10pt;
|
||||
padding: 5pt;
|
||||
border-bottom: solid 1pt #999999;
|
||||
}
|
||||
|
||||
TR.data TH {
|
||||
border-bottom: solid 1pt #999999;
|
||||
padding-top: 10pt;
|
||||
padding-left: 5pt;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
DIV.table TABLE {
|
||||
border: solid thin #999999;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
DIV.table CAPTION {
|
||||
caption-side: top;
|
||||
font-size: 120%;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
DIV.table TABLE TD {
|
||||
border: solid thin #cccccc;
|
||||
padding-top: 5pt;
|
||||
}
|
||||
|
||||
DIV.table TABLE TH {
|
||||
background: #cccccc;
|
||||
border: none;
|
||||
border-bottom: solid thin #999999;
|
||||
}
|
||||
|
||||
DIV.figure TABLE {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
DIV.figure CAPTION {
|
||||
caption-side: bottom;
|
||||
font-size: 120%;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
TH.label {
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
TH.sublabel {
|
||||
text-align: right;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
HR {
|
||||
border: solid thin;
|
||||
}
|
||||
|
||||
SPAN.info {
|
||||
background: black;
|
||||
border: thin solid black;
|
||||
color: white;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
|
||||
float: right;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
H2.title, H3.title {
|
||||
border-bottom: solid 2pt #000000;
|
||||
}
|
||||
|
||||
DIV.indent, TABLE.indent {
|
||||
margin-top: 2em;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
TABLE.indent {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
TABLE.indent TD, TABLE.indent TH {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
TABLE.list {
|
||||
border-collapse: collapse;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
TABLE.list TH {
|
||||
background: white;
|
||||
border-bottom: solid thin #cccccc;
|
||||
color: #444444;
|
||||
padding-top: 10pt;
|
||||
padding-left: 5pt;
|
||||
text-align: left;
|
||||
vertical-align: bottom;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
TABLE.list TH A {
|
||||
color: #4444cc;
|
||||
}
|
||||
|
||||
TABLE.list TD {
|
||||
border-bottom: solid thin #eeeeee;
|
||||
padding-top: 5pt;
|
||||
padding-left: 5pt;
|
||||
}
|
||||
|
||||
TABLE.list TR:nth-child(even) {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
TABLE.list TR:nth-child(odd) {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
DT {
|
||||
margin-left: 36pt;
|
||||
margin-top: 12pt;
|
||||
}
|
||||
|
||||
DD {
|
||||
margin-left: 54pt;
|
||||
}
|
||||
|
||||
DL.category DT {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
P.summary {
|
||||
margin-left: 36pt;
|
||||
font-family: monaco, courier, monospace;
|
||||
}
|
||||
|
||||
DIV.summary TABLE {
|
||||
border: solid thin #999999;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
DIV.summary TABLE TD, DIV.summary TABLE TH {
|
||||
border: solid thin #999999;
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
DIV.summary TABLE THEAD TH {
|
||||
background: #eeeeee;
|
||||
}
|
||||
|
||||
/* API documentation styles... */
|
||||
div.body h1 {
|
||||
margin: 0;
|
||||
}
|
||||
div.body h2 {
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
div.body h3, div.body h4, div.body h5 {
|
||||
margin-bottom: 0.5em;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
.class, .enumeration, .function, .struct, .typedef, .union {
|
||||
border-bottom: solid thin #999999;
|
||||
margin-bottom: 0;
|
||||
margin-top: 2em;
|
||||
}
|
||||
.description {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
code, p.code, pre, ul.code li {
|
||||
font-family: monaco, courier, monospace;
|
||||
font-size: 90%;
|
||||
}
|
||||
ul.code, ul.contents, ul.subcontents {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
ul.code li {
|
||||
margin: 0;
|
||||
}
|
||||
ul.contents > li {
|
||||
margin-top: 1em;
|
||||
}
|
||||
ul.contents li ul.code, ul.contents li ul.subcontents {
|
||||
padding-left: 2em;
|
||||
}
|
||||
div.body dl {
|
||||
margin-left: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
div.body dt {
|
||||
font-style: italic;
|
||||
margin-left: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
div.body dd {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
/* This is just for the HTML files generated with the framedhelp target */
|
||||
div.contents {
|
||||
background: #e8e8e8;
|
||||
border: solid thin black;
|
||||
padding: 10px;
|
||||
}
|
||||
div.contents h1 {
|
||||
font-size: 110%;
|
||||
}
|
||||
div.contents h2 {
|
||||
font-size: 100%;
|
||||
}
|
||||
div.contents ul.contents {
|
||||
font-size: 80%;
|
||||
}
|
||||
div.contents ul.subcontents li {
|
||||
margin-left: 1em;
|
||||
text-indent: -1em;
|
||||
}
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='body'>
|
||||
<P>This document describes how to use the CUPS PostScript Printer Description
|
||||
(PPD) file compiler. The PPD compiler generates PPD files from simple text files
|
||||
that describe the features and capabilities of one or more printers.</P>
|
||||
@@ -347,19 +22,8 @@ that describe the features and capabilities of one or more printers.</P>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h2 class="title">Contents</h2>
|
||||
<ul class="contents">
|
||||
<ul class="subcontents">
|
||||
<li><a href="#BASICS">The Basics</a></li>
|
||||
<li><a href="#DRV">Driver Information Files</a><ul class="subcontents">
|
||||
<li><a href="#SIMPLE">A Simple Example</a></li>
|
||||
<li><a href="#GROUPING">Grouping and Inheritance</a></li>
|
||||
<li><a href="#COLOR">Color Support</a></li>
|
||||
<li><a href="#OPTIONS">Defining Custom Options and Option Groups</a></li>
|
||||
<li><a href="#DEFINE">Defining Constants</a></li>
|
||||
<li><a href="#CONDITIONAL">Conditional Statements</a></li>
|
||||
<li><a href="#CONSTRAINTS">Defining Constraints</a></li>
|
||||
</ul></li>
|
||||
|
||||
|
||||
<h2 class='title'><a name='BASICS'>The Basics</a></h2>
|
||||
|
||||
<P>The PPD compiler, <a href='man-ppdc.html'><code>ppdc(1)</code></a>, is a
|
||||
@@ -1170,6 +834,6 @@ lines:</p>
|
||||
<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsUIConstraints DuplexOff "*Duplex *OptionDuplexer False"
|
||||
<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsUIResolver DuplexOff "*Duplex None"
|
||||
</pre>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
@@ -1,335 +1,10 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<HTML>
|
||||
<!-- SECTION: Programming -->
|
||||
<head>
|
||||
<title>Developing Raster Printer Drivers</title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta name="creator" content="Mini-XML v2.6">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
}
|
||||
<HEAD>
|
||||
<TITLE>Developing Raster Printer Drivers</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
|
||||
H1, H2, H3, H4, H5, H6, P, TD, TH {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
}
|
||||
|
||||
KBD {
|
||||
font-family: monaco, courier, monospace;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
PRE {
|
||||
font-family: monaco, courier, monospace;
|
||||
}
|
||||
|
||||
PRE.command {
|
||||
margin-left: 36pt;
|
||||
}
|
||||
|
||||
P.example {
|
||||
font-style: italic;
|
||||
margin-left: 36pt;
|
||||
}
|
||||
|
||||
PRE.example {
|
||||
background: #eeeeee;
|
||||
border: dotted thin #999999;
|
||||
margin-left: 36pt;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
PRE.command EM, PRE.example EM {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
}
|
||||
|
||||
P.command {
|
||||
font-family: monaco, courier, monospace;
|
||||
margin-left: 36pt;
|
||||
}
|
||||
|
||||
P.formula {
|
||||
font-style: italic;
|
||||
margin-left: 36pt;
|
||||
}
|
||||
|
||||
BLOCKQUOTE {
|
||||
background: #cccccc;
|
||||
border: solid thin #999999;
|
||||
padding: 10pt;
|
||||
}
|
||||
|
||||
A IMG {
|
||||
border: none;
|
||||
}
|
||||
|
||||
A:link:hover IMG {
|
||||
background: #f0f0f0;
|
||||
border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
}
|
||||
|
||||
A:link, A:visited {
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
A:link:hover, A:visited:hover, A:active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
SUB, SUP {
|
||||
font-size: 50%;
|
||||
}
|
||||
|
||||
TR.data, TD.data, TR.data TD {
|
||||
margin-top: 10pt;
|
||||
padding: 5pt;
|
||||
border-bottom: solid 1pt #999999;
|
||||
}
|
||||
|
||||
TR.data TH {
|
||||
border-bottom: solid 1pt #999999;
|
||||
padding-top: 10pt;
|
||||
padding-left: 5pt;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
DIV.table TABLE {
|
||||
border: solid thin #999999;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
DIV.table CAPTION {
|
||||
caption-side: top;
|
||||
font-size: 120%;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
DIV.table TABLE TD {
|
||||
border: solid thin #cccccc;
|
||||
padding-top: 5pt;
|
||||
}
|
||||
|
||||
DIV.table TABLE TH {
|
||||
background: #cccccc;
|
||||
border: none;
|
||||
border-bottom: solid thin #999999;
|
||||
}
|
||||
|
||||
DIV.figure TABLE {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
DIV.figure CAPTION {
|
||||
caption-side: bottom;
|
||||
font-size: 120%;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
TH.label {
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
TH.sublabel {
|
||||
text-align: right;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
HR {
|
||||
border: solid thin;
|
||||
}
|
||||
|
||||
SPAN.info {
|
||||
background: black;
|
||||
border: thin solid black;
|
||||
color: white;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
|
||||
float: right;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
H2.title, H3.title {
|
||||
border-bottom: solid 2pt #000000;
|
||||
}
|
||||
|
||||
DIV.indent, TABLE.indent {
|
||||
margin-top: 2em;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
TABLE.indent {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
TABLE.indent TD, TABLE.indent TH {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
TABLE.list {
|
||||
border-collapse: collapse;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
TABLE.list TH {
|
||||
background: white;
|
||||
border-bottom: solid thin #cccccc;
|
||||
color: #444444;
|
||||
padding-top: 10pt;
|
||||
padding-left: 5pt;
|
||||
text-align: left;
|
||||
vertical-align: bottom;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
TABLE.list TH A {
|
||||
color: #4444cc;
|
||||
}
|
||||
|
||||
TABLE.list TD {
|
||||
border-bottom: solid thin #eeeeee;
|
||||
padding-top: 5pt;
|
||||
padding-left: 5pt;
|
||||
}
|
||||
|
||||
TABLE.list TR:nth-child(even) {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
TABLE.list TR:nth-child(odd) {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
DT {
|
||||
margin-left: 36pt;
|
||||
margin-top: 12pt;
|
||||
}
|
||||
|
||||
DD {
|
||||
margin-left: 54pt;
|
||||
}
|
||||
|
||||
DL.category DT {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
P.summary {
|
||||
margin-left: 36pt;
|
||||
font-family: monaco, courier, monospace;
|
||||
}
|
||||
|
||||
DIV.summary TABLE {
|
||||
border: solid thin #999999;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
DIV.summary TABLE TD, DIV.summary TABLE TH {
|
||||
border: solid thin #999999;
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
DIV.summary TABLE THEAD TH {
|
||||
background: #eeeeee;
|
||||
}
|
||||
|
||||
/* API documentation styles... */
|
||||
div.body h1 {
|
||||
margin: 0;
|
||||
}
|
||||
div.body h2 {
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
div.body h3, div.body h4, div.body h5 {
|
||||
margin-bottom: 0.5em;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
.class, .enumeration, .function, .struct, .typedef, .union {
|
||||
border-bottom: solid thin #999999;
|
||||
margin-bottom: 0;
|
||||
margin-top: 2em;
|
||||
}
|
||||
.description {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
code, p.code, pre, ul.code li {
|
||||
font-family: monaco, courier, monospace;
|
||||
font-size: 90%;
|
||||
}
|
||||
ul.code, ul.contents, ul.subcontents {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
ul.code li {
|
||||
margin: 0;
|
||||
}
|
||||
ul.contents > li {
|
||||
margin-top: 1em;
|
||||
}
|
||||
ul.contents li ul.code, ul.contents li ul.subcontents {
|
||||
padding-left: 2em;
|
||||
}
|
||||
div.body dl {
|
||||
margin-left: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
div.body dt {
|
||||
font-style: italic;
|
||||
margin-left: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
div.body dd {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
/* This is just for the HTML files generated with the framedhelp target */
|
||||
div.contents {
|
||||
background: #e8e8e8;
|
||||
border: solid thin black;
|
||||
padding: 10px;
|
||||
}
|
||||
div.contents h1 {
|
||||
font-size: 110%;
|
||||
}
|
||||
div.contents h2 {
|
||||
font-size: 100%;
|
||||
}
|
||||
div.contents ul.contents {
|
||||
font-size: 80%;
|
||||
}
|
||||
div.contents ul.subcontents li {
|
||||
margin-left: 1em;
|
||||
text-indent: -1em;
|
||||
}
|
||||
--></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='body'>
|
||||
<p>This document describes how to develop printer drivers for raster printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#FILTERS'>using filters</a>, <a href='#COLOR'>implementing color management</a>, <a href='#MACOSX'>adding Mac OS X features</a>, and <a href='#DEPLOY'>deploying your driver</a>.</p>
|
||||
|
||||
<div class='summary'><table summary='General Information'>
|
||||
@@ -345,15 +20,8 @@ div.contents ul.subcontents li {
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<h2 class="title">Contents</h2>
|
||||
<ul class="contents">
|
||||
<ul class="subcontents">
|
||||
<li><a href="#BASICS">Printer Driver Basics</a></li>
|
||||
<li><a href="#CREATING">Creating New PPD Files</a></li>
|
||||
<li><a href="#FILTERS">Using Filters</a></li>
|
||||
<li><a href="#COLOR">Implementing Color Management</a></li>
|
||||
<li><a href="#MACOSX">Adding Mac OS X Features</a></li>
|
||||
<li><a href="#DEPLOY">Deploying Your Driver</a></li>
|
||||
|
||||
|
||||
<h2 class='title'><a name='BASICS'>Printer Driver Basics</a></h2>
|
||||
|
||||
<p>A CUPS raster printer driver consists of a PostScript Printer Description (PPD) file that describes the features and capabilities of the device, one or more <em>filter</em> programs that prepare print data for the device, and zero or more support files for color management, online help, and so forth. The PPD file includes references to all of the filters and support files used by the driver.</p>
|
||||
@@ -524,6 +192,7 @@ div.contents ul.subcontents li {
|
||||
<h2 class='title'><a name='DEPLOY'>Deploying Your Driver</a></h2>
|
||||
|
||||
<p>Talk about install locations, etc.</p>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -2573,7 +2573,7 @@ authentication is required for the resource. The
|
||||
must be a member of one or more of the named groups that
|
||||
follow.</P>
|
||||
|
||||
<P>The <CODE>user</CODE> keyword specifies that the
|
||||
<P>The <CODE>user</CODE> keyboard specifies that the
|
||||
authenticated user must be one of the named users or groups that
|
||||
follow. Group names are specified using the "@" prefix.</P>
|
||||
|
||||
|
||||
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário