Comparar commits
143 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| b646dd35b1 | |||
| 5c0e456621 | |||
| e52ed6e0a7 | |||
| d2d26087df | |||
| 29ff85270e | |||
| 6bde932e8a | |||
| 8cae1ac9af | |||
| 91480df95e | |||
| f626646001 | |||
| a0e8526903 | |||
| f94124cb92 | |||
| 840c1efb00 | |||
| 344ab3b0e2 | |||
| 0d6f0677c3 | |||
| 60f4a67a67 | |||
| 0417631599 | |||
| 4cc64a80fd | |||
| 8056da7897 | |||
| b1f200bb75 | |||
| 6355478e27 | |||
| ba4f314f2b | |||
| d3331249b0 | |||
| bc05464ada | |||
| 348ce78265 | |||
| be91b849f0 | |||
| c8d724e6bb | |||
| 00d0ae86f6 | |||
| a215cf8413 | |||
| 4ef75dec45 | |||
| 86243a7551 | |||
| b93671244e | |||
| 5d2cc5d32d | |||
| 1a18c85cd1 | |||
| b60086f8ae | |||
| 215ef63830 | |||
| a51f28ec99 | |||
| 71f63681cb | |||
| 61515785f7 | |||
| 71389998b8 | |||
| 72265b0595 | |||
| 9825762812 | |||
| d40220801e | |||
| 3d1f41307e | |||
| fbd45c3e08 | |||
| 873a628b1c | |||
| 023692e684 | |||
| 308c21ef44 | |||
| 244a10b5c8 | |||
| 031f71f0a8 | |||
| c4df903b2d | |||
| 6b139a7e91 | |||
| 105d3c6459 | |||
| 309e860e17 | |||
| d15d70899b | |||
| 101de55370 | |||
| 7d6c76f898 | |||
| 73e83483db | |||
| 0151d6018c | |||
| 0360d41094 | |||
| 73f741aebc | |||
| dca2386d81 | |||
| c8111ca923 | |||
| 62f67a21cc | |||
| d7915e0baf | |||
| 6a16dd94b9 | |||
| 2bc3c8e63d | |||
| 0d44b6f9a4 | |||
| 8f7630cffc | |||
| e3c4c55263 | |||
| bf5fce9867 | |||
| 306d87d977 | |||
| 5638753fdf | |||
| 9f8ca40773 | |||
| 5415d8c212 | |||
| 22c761b4a8 | |||
| ce8b298254 | |||
| ca0c126882 | |||
| e7d39d5957 | |||
| 36a710dd8a | |||
| 8c535064f7 | |||
| 6c019649f4 | |||
| 94f7cfc5d0 | |||
| 962493c168 | |||
| ea1500e49d | |||
| ef80c6e4e9 | |||
| 0d66577b2d | |||
| 90af1dd8be | |||
| 16a3c06507 | |||
| 98c6e426bc | |||
| 40457f6cc5 | |||
| f4d45889eb | |||
| 588cfd8b22 | |||
| 0e27be7747 | |||
| 03163319af | |||
| 87473b5777 | |||
| 72f8a73af8 | |||
| 35929e590c | |||
| 1576ab1c78 | |||
| 104ec216a3 | |||
| 7c399480cd | |||
| c09f64e2f3 | |||
| 2106cc63ca | |||
| 2f96aa3b41 | |||
| 1bd4599421 | |||
| d780a217b3 | |||
| 42cf2f9f2e | |||
| 530f64721a | |||
| 8a2e36146f | |||
| d67e4b67b2 | |||
| cd5ce0053e | |||
| a20f5c90aa | |||
| 1110e39948 | |||
| 6aa0a54981 | |||
| e1de635a20 | |||
| 75efa1051d | |||
| f9d9f12690 | |||
| 7416dfe99a | |||
| dd0eea8e71 | |||
| 0c229544f4 | |||
| b3533f112d | |||
| 3b2526b366 | |||
| ba38d7d9dc | |||
| 4bdbabf76b | |||
| 64e918f26a | |||
| 111ff13a26 | |||
| f4515965b3 | |||
| c7233aabe5 | |||
| 8eabd901fe | |||
| 1d708564b3 | |||
| e5d9b5e191 | |||
| 00c4573088 | |||
| 27efcd61e0 | |||
| 06cefec35c | |||
| c2def0ced7 | |||
| e9152ac713 | |||
| 3d3f64a982 | |||
| 4ecc320364 | |||
| 60c3ee0499 | |||
| 305331a392 | |||
| 40e88e9009 | |||
| 5f19ab52fe | |||
| 4a842d5397 | |||
| 75ff7c7fea |
+9
-7
@@ -1,9 +1,3 @@
|
||||
autom4te.cache
|
||||
config.h
|
||||
config.log
|
||||
config.status
|
||||
cups-config
|
||||
Makedefs
|
||||
*.a
|
||||
*.cgi
|
||||
*.dylib
|
||||
@@ -11,6 +5,13 @@ Makedefs
|
||||
*.o
|
||||
*.so
|
||||
*.so.*
|
||||
.buildrev
|
||||
autom4te.cache
|
||||
config.h
|
||||
config.log
|
||||
config.status
|
||||
cups-config
|
||||
Makedefs
|
||||
backend/dnssd
|
||||
backend/http
|
||||
backend/ipp
|
||||
@@ -83,6 +84,7 @@ notifier/mailto
|
||||
notifier/rss
|
||||
notifier/testnotify
|
||||
packaging/cups.list
|
||||
patches
|
||||
ppdc/genstrings
|
||||
ppdc/ppd/
|
||||
ppdc/ppd2/
|
||||
@@ -139,4 +141,4 @@ test/ippfind
|
||||
test/ippfind-static
|
||||
test/ippserver
|
||||
test/ipptool
|
||||
test/ipptool-static
|
||||
test/ipptool-static
|
||||
|
||||
@@ -1,139 +0,0 @@
|
||||
CHANGES-2.1.txt
|
||||
---------------
|
||||
|
||||
CHANGES IN CUPS V2.1.4
|
||||
|
||||
- Documentation update (STR #4772)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1.3
|
||||
|
||||
- The default password function did not work on some platforms
|
||||
(STR #4750)
|
||||
- The scheduler should not exit under memory pressure
|
||||
(<rdar://problem/23255001>)
|
||||
- The EPL2 and ZPL sample drivers did not properly support the CutMedia
|
||||
option.
|
||||
- Pending subscriptions would prevent the scheduler from idle exiting
|
||||
(STR #4754)
|
||||
- Fixed some issues in ipptool for skipped tests
|
||||
(<rdar://problem/24137160>)
|
||||
- The "lp -H resume" command did not reset the "job-state-reasons"
|
||||
attribute value (STR #4752)
|
||||
- cupsEncodeOptions2 incorrectly handled escaped values
|
||||
(<rdar://problem/19736672>)
|
||||
- The scheduler did not allow access to resource files (icons, etc.)
|
||||
when the web interface was disabled (STR #4755)
|
||||
- Localization fix (STR #4756)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1.2
|
||||
|
||||
- Re-release of CUPS 2.1.1 as CUPS 2.1.2 due to error in tagging of the
|
||||
2.1.1 release (pulled content from the 2.2.x tree instead)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1.1
|
||||
|
||||
- Security hardening fixes (<rdar://problem/23131948>,
|
||||
<rdar://problem/23132108>, <rdar://problem/23132353>,
|
||||
<rdar://problem/23132803>, <rdar://problem/23133230>,
|
||||
<rdar://problem/23133393>, <rdar://problem/23133466>,
|
||||
<rdar://problem/23133833>, <rdar://problem/23133998>,
|
||||
<rdar://problem/23134228>, <rdar://problem/23134299>,
|
||||
<rdar://problem/23134356>, <rdar://problem/23134415>,
|
||||
<rdar://problem/23134506>, <rdar://problem/23135066>,
|
||||
<rdar://problem/23135122>, <rdar://problem/23135207>,
|
||||
<rdar://problem/23144290>, <rdar://problem/23144358>,
|
||||
<rdar://problem/23144461>)
|
||||
- The cupsGetPPD* functions did not work with IPP printers (STR #4725)
|
||||
- Some older HP LaserJet printers need a delayed close when printing
|
||||
using the libusb-based USB backend (STR #4549)
|
||||
- The libusb-based USB backend did not unload the kernel usblp module
|
||||
if it was preventing the backend from accessing the printer
|
||||
(STR #4707)
|
||||
- Current Primera printers were incorrectly reported as Fargo printers
|
||||
(STR #4708)
|
||||
- The IPP backend did not always handle jobs getting canceled at the
|
||||
printer (<rdar://problem/22716820>)
|
||||
- Scheduler logging change (STR #4728)
|
||||
- Added USB quirk for Canon MP530 (STR #4730)
|
||||
- The scheduler did not deliver job notifications for jobs submitted to
|
||||
classes (STR #4733)
|
||||
- Changing the printer-is-shared value for a remote queue did not
|
||||
produce an error (STR #4738)
|
||||
- The IPP backend incorrectly included the job-password attribute in
|
||||
Validate-Job requests (<rdar://problem/23531939>)
|
||||
- Updated localizations (STR #4709)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1.0
|
||||
|
||||
- Fixed more scheduler crash bugs in the new logging code (STR #4687,
|
||||
STR #4690)
|
||||
- The scheduler did not use the ConfigFilePerm setting when copying PPD
|
||||
files or interface scripts attached to a request (STR #4703)
|
||||
- Now support new Chinese locale IDs and their correct fallback locales
|
||||
(<rdar://problem/22086642>, <rdar://problem/22130168>)
|
||||
- "make check" incorrectly reported an expectation of 18 warning
|
||||
messages when 8 were expected (STR #4684)
|
||||
- The new PDF file type rule did not work (STR #4692)
|
||||
- The scheduler did not update the jobs.cache file when job files were
|
||||
expired (STR #4706)
|
||||
- Fixed some configure script issues (STR #4694, STR #4695, STR #4698)
|
||||
- Documentation updates (STR #4691, STR #4693)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1rc1
|
||||
|
||||
- Added support for 3D printers (basic types only, no built-in filters)
|
||||
based on PWG white paper.
|
||||
- Fixed bugs in the new journald support (STR #4655, STR #4658,
|
||||
STR #4661)
|
||||
- Fixed domain socket support on Linux (STR #4679)
|
||||
- Fixed signal handlers in the dnssd and usb backends (STR #4671)
|
||||
- <Limit All> in <Policy> sections now applies to all operations when
|
||||
used by itself (STR #4659)
|
||||
- Configure script changes for systemd support (STR #4669)
|
||||
- Updated autoconf sources to use newer form of AC_INIT (STR #4664)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1b1
|
||||
|
||||
- Improved speed of ppdMarkDefaults for complex/large PPDs
|
||||
(<rdar://problem/15146999>)
|
||||
- The IPP backend now stops sending print data if the printer indicates
|
||||
the job has been aborted or canceled (<rdar://problem/17837631>)
|
||||
- The IPP backend now sends the job-pages-per-set attribute when
|
||||
printing multiple copy jobs with finishings
|
||||
(<rdar://problem/16792757>)
|
||||
- The IPP backend now updates the cupsMandatory values when the printer
|
||||
configuration changes (<rdar://problem/18126570>)
|
||||
- No longer install banner files since third-party banner filters now
|
||||
supply their own (STR #4518)
|
||||
- Added support for EXPECT-ALL directive in ipptool test files
|
||||
(STR #4469)
|
||||
- Added support for WITH-VALUE-FROM predicate in ipptool test files
|
||||
(STR #4470)
|
||||
- The scheduler no longer listens on the loopback interface unless the
|
||||
web interface or printer sharing are enabled
|
||||
(<rdar://problem/9136448>)
|
||||
- Added a PPD generator for IPP Everywhere printers (STR #4258)
|
||||
- Now install "default" versions of more configuration files
|
||||
(<rdar://problem/19024491>)
|
||||
- The cupstestppd program did not handle "maxsize(nnn)" entries in
|
||||
cupsFilter/cupsFilter2 values (<rdar://problem/18974858>)
|
||||
- The scheduler now checks the return value of rename() calls
|
||||
(STR #4589)
|
||||
- The scheduler now validates ErrorPolicy values in config files
|
||||
(STR #4591)
|
||||
- Long cookies caused the web interface to stop working (STR #4619)
|
||||
- Added SSLOptions values to allow Diffie-Hellman key exchange and
|
||||
disable TLS/1.0 support.
|
||||
- Updated the scheduler to support more IPP Everywhere attributes
|
||||
(STR #4630)
|
||||
- The scheduler now supports advanced ASL and journald logging when
|
||||
"syslog" output is configured (STR #4474)
|
||||
- The scheduler now supports logging to stderr when running in the
|
||||
foreground (STR #4505)
|
||||
|
||||
+145
-19
@@ -1,22 +1,148 @@
|
||||
CHANGES.txt - 2.2b1 - 2016-03-10
|
||||
CHANGES.txt - 2.1.4 - 2016-06-14
|
||||
--------------------------------
|
||||
|
||||
CHANGES IN CUPS V2.2b1
|
||||
CHANGES IN CUPS V2.1.4
|
||||
|
||||
- Fixed reporting of 1284 Device IDs (Issue #3835, PR #3836)
|
||||
- Fixed printing of multiple files to raw queues (Issue #4782)
|
||||
- The scheduler did not implement the Hold-New-Jobs opertion correctly
|
||||
(Issue #4767)
|
||||
- The ipptool program truncated values at 8k (Issue #4786)
|
||||
- The ipptool program did not correctly report uriScheme values in plist
|
||||
output (Issue #4785)
|
||||
- The cups-lpd mini-daemon incorrectly included the document-name
|
||||
attribute when creating a job. It should only be included when
|
||||
sending a job (Issue #4790)
|
||||
- USB quirk updates (Issue #4778, Issue #4789)
|
||||
- Documentation update (Issue #4772)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1.3
|
||||
|
||||
- The default password function did not work on some platforms
|
||||
(Issue #4750)
|
||||
- The scheduler should not exit under memory pressure
|
||||
(<rdar://problem/23255001>)
|
||||
- The EPL2 and ZPL sample drivers did not properly support the CutMedia
|
||||
option.
|
||||
- Pending subscriptions would prevent the scheduler from idle exiting
|
||||
(Issue #4754)
|
||||
- Fixed some issues in ipptool for skipped tests
|
||||
(<rdar://problem/24137160>)
|
||||
- The "lp -H resume" command did not reset the "job-state-reasons"
|
||||
attribute value (Issue #4752)
|
||||
- The scheduler did not allow access to resource files (icons, etc.)
|
||||
when the web interface was disabled (Issue #4755)
|
||||
- Localization fix (Issue #4756)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1.2
|
||||
|
||||
- Re-release of CUPS 2.1.1 as CUPS 2.1.2 due to error in tagging of the
|
||||
2.1.1 release (pulled content from the 2.2.x tree instead)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1.1
|
||||
|
||||
- Security hardening fixes (<rdar://problem/23131948>,
|
||||
<rdar://problem/23132108>, <rdar://problem/23132353>,
|
||||
<rdar://problem/23132803>, <rdar://problem/23133230>,
|
||||
<rdar://problem/23133393>, <rdar://problem/23133466>,
|
||||
<rdar://problem/23133833>, <rdar://problem/23133998>,
|
||||
<rdar://problem/23134228>, <rdar://problem/23134299>,
|
||||
<rdar://problem/23134356>, <rdar://problem/23134415>,
|
||||
<rdar://problem/23134506>, <rdar://problem/23135066>,
|
||||
<rdar://problem/23135122>, <rdar://problem/23135207>,
|
||||
<rdar://problem/23144290>, <rdar://problem/23144358>,
|
||||
<rdar://problem/23144461>)
|
||||
- The cupsGetPPD* functions did not work with IPP printers (Issue #4725)
|
||||
- Some older HP LaserJet printers need a delayed close when printing
|
||||
using the libusb-based USB backend (Issue #4549)
|
||||
- The libusb-based USB backend did not unload the kernel usblp module
|
||||
if it was preventing the backend from accessing the printer
|
||||
(Issue #4707)
|
||||
- Current Primera printers were incorrectly reported as Fargo printers
|
||||
(Issue #4708)
|
||||
- The IPP backend did not always handle jobs getting canceled at the
|
||||
printer (<rdar://problem/22716820>)
|
||||
- Scheduler logging change (Issue #4728)
|
||||
- Added USB quirk for Canon MP530 (Issue #4730)
|
||||
- The scheduler did not deliver job notifications for jobs submitted to
|
||||
classes (Issue #4733)
|
||||
- Changing the printer-is-shared value for a remote queue did not
|
||||
produce an error (Issue #4738)
|
||||
- The IPP backend incorrectly included the job-password attribute in
|
||||
Validate-Job requests (<rdar://problem/23531939>)
|
||||
- Updated localizations (Issue #4709)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1.0
|
||||
|
||||
- Fixed more scheduler crash bugs in the new logging code (Issue #4687,
|
||||
Issue #4690)
|
||||
- The scheduler did not use the ConfigFilePerm setting when copying PPD
|
||||
files or interface scripts attached to a request (Issue #4703)
|
||||
- Now support new Chinese locale IDs and their correct fallback locales
|
||||
(<rdar://problem/22086642>, <rdar://problem/22130168>)
|
||||
- "make check" incorrectly reported an expectation of 18 warning
|
||||
messages when 8 were expected (Issue #4684)
|
||||
- The new PDF file type rule did not work (Issue #4692)
|
||||
- The scheduler did not update the jobs.cache file when job files were
|
||||
expired (Issue #4706)
|
||||
- Fixed some configure script issues (Issue #4694, Issue #4695, Issue #4698)
|
||||
- Documentation updates (Issue #4691, Issue #4693)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1rc1
|
||||
|
||||
- Added support for 3D printers (basic types only, no built-in filters)
|
||||
based on PWG white paper.
|
||||
- Fixed bugs in the new journald support (Issue #4655, Issue #4658,
|
||||
Issue #4661)
|
||||
- Fixed domain socket support on Linux (Issue #4679)
|
||||
- Fixed signal handlers in the dnssd and usb backends (Issue #4671)
|
||||
- <Limit All> in <Policy> sections now applies to all operations when
|
||||
used by itself (Issue #4659)
|
||||
- Configure script changes for systemd support (Issue #4669)
|
||||
- Updated autoconf sources to use newer form of AC_INIT (Issue #4664)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1b1
|
||||
|
||||
- Improved speed of ppdMarkDefaults for complex/large PPDs
|
||||
(<rdar://problem/15146999>)
|
||||
- The IPP backend now stops sending print data if the printer indicates
|
||||
the job has been aborted or canceled (<rdar://problem/17837631>)
|
||||
- The IPP backend now sends the job-pages-per-set attribute when
|
||||
printing multiple copy jobs with finishings
|
||||
(<rdar://problem/16792757>)
|
||||
- The IPP backend now updates the cupsMandatory values when the printer
|
||||
configuration changes (<rdar://problem/18126570>)
|
||||
- No longer install banner files since third-party banner filters now
|
||||
supply their own (Issue #4518)
|
||||
- Added support for EXPECT-ALL directive in ipptool test files
|
||||
(Issue #4469)
|
||||
- Added support for WITH-VALUE-FROM predicate in ipptool test files
|
||||
(Issue #4470)
|
||||
- The scheduler no longer listens on the loopback interface unless the
|
||||
web interface or printer sharing are enabled
|
||||
(<rdar://problem/9136448>)
|
||||
- Added a PPD generator for IPP Everywhere printers (Issue #4258)
|
||||
- Now install "default" versions of more configuration files
|
||||
(<rdar://problem/19024491>)
|
||||
- The cupstestppd program did not handle "maxsize(nnn)" entries in
|
||||
cupsFilter/cupsFilter2 values (<rdar://problem/18974858>)
|
||||
- The scheduler now checks the return value of rename() calls
|
||||
(Issue #4589)
|
||||
- The scheduler now validates ErrorPolicy values in config files
|
||||
(Issue #4591)
|
||||
- Long cookies caused the web interface to stop working (Issue #4619)
|
||||
- Added SSLOptions values to allow Diffie-Hellman key exchange and
|
||||
disable TLS/1.0 support.
|
||||
- Updated the scheduler to support more IPP Everywhere attributes
|
||||
(Issue #4630)
|
||||
- The scheduler now supports advanced ASL and journald logging when
|
||||
"syslog" output is configured (Issue #4474)
|
||||
- The scheduler now supports logging to stderr when running in the
|
||||
foreground (Issue #4505)
|
||||
|
||||
- The IPP backend now continues on to the next job when the remote
|
||||
server/printer puts the job on hold (<rdar://problem/24858548>)
|
||||
- The scheduler did not cancel multi-document jobs immediately
|
||||
(<rdar://problem/24854834>)
|
||||
- The scheduler did not return non-shared printers to local clients
|
||||
unless they connected to the domain socket (<rdar://problem/24566996>)
|
||||
- The scheduler now reads the spool directory if one or more job cache
|
||||
entries point to deleted jobs (<rdar://problem/24048846>)
|
||||
- Added support for disc media sizes (<rdar://problem/20219536>)
|
||||
- The httpAddrConnect and httpConnect* APIs now try connecting to
|
||||
multiple addresses in parallel (<rdar://problem/20643153>)
|
||||
- The cupsd domain socket is no longer world-accessible on OS X
|
||||
(<rdar://problem/7542560>)
|
||||
- Interface scripts are no longer supported for security reasons
|
||||
(<rdar://problem/23135640>)
|
||||
- Added a new cupsHashData API and support for hashed job passwords
|
||||
(<rdar://problem/20221502>)
|
||||
|
||||
@@ -1,636 +0,0 @@
|
||||
CONTRIBUTING.txt - 2016/01/28
|
||||
-----------------------------
|
||||
|
||||
CUPS is developed by Apple Inc. and distributed as open source software under a
|
||||
combination of GNU GPL2 and GNU LGPL2 licenses with exceptions to allow
|
||||
developers on Apple's operating systems to develop CUPS-based software under
|
||||
alternate license terms. Significant contributions to CUPS must be licensed to
|
||||
Apple using the Apple Contributor Agreement:
|
||||
|
||||
https://www.cups.org/AppleContributorAgreement_2011-03-10.pdf
|
||||
|
||||
Contributions should be submitted as attachments to bug reports on the CUPS web
|
||||
site. Changes to existing source files should be submitted as unified diffs
|
||||
(both Subversion and Git produce this format by default) while new source files
|
||||
should be provided as-is or in an archive.
|
||||
|
||||
|
||||
HOW TO CONTACT THE DEVELOPERS
|
||||
|
||||
The CUPS mailing lists are the primary means of asking questions and informally
|
||||
discussing issues and feature requests with the CUPS developers and other
|
||||
experienced CUPS users and developers. The "cups" mailing list is intended for
|
||||
CUPS usage questions and new software announcements while the "cups-devel"
|
||||
mailing list provides a forum for CUPS developers and monitoring new bugs.
|
||||
|
||||
|
||||
INTERFACES
|
||||
|
||||
CUPS interfaces, including the C APIs and command-line arguments, environment
|
||||
variables, configuration files, and output format, are stable across patch
|
||||
versions and are generally backwards-compatible with interfaces used in prior
|
||||
major and minor versions. However, program interfaces such as those used by
|
||||
the scheduler to run filter, port monitor, and backend processes for job
|
||||
processing should only be considered stable from the point of view of a
|
||||
filter, port monitor, or backend. Software that simulates the scheduler in
|
||||
order to run those programs outside of CUPS must necessarily be updated when
|
||||
the corresponding interface is changed in a subsequent CUPS release, otherwise
|
||||
undefined behavior can occur.
|
||||
|
||||
CUPS C APIs starting with an underscore (_) are considered to be private to
|
||||
CUPS and are not subject to the normal guarantees of stability between CUPS
|
||||
releases and must never be used in non-CUPS source code. Similarly,
|
||||
configuration and state files written by CUPS are considered private if a
|
||||
corresponding man page is not provided with the CUPS release. Never rely on
|
||||
undocumented files or formats when developing software for CUPS. Always use a
|
||||
published C API to access data stored in a file to avoid compatibility problems
|
||||
in the future.
|
||||
|
||||
|
||||
BUILD SYSTEM
|
||||
|
||||
The CUPS build system uses GNU autoconf to tailor the library to the local
|
||||
operating system. Project files for the current release of Microsoft Visual
|
||||
Studio are also provided for Microsoft Windows®. To improve portability,
|
||||
makefiles must not make use of features unique to GNU make. See the MAKEFILE
|
||||
GUIDELINES section for a description of the allowed make features and makefile
|
||||
guidelines.
|
||||
|
||||
Additional GNU build programs such as GNU automake and GNU libtool must not be
|
||||
used. GNU automake produces non-portable makefiles which depend on GNU-
|
||||
specific extensions, and GNU libtool is not portable or reliable enough for
|
||||
CUPS.
|
||||
|
||||
|
||||
VERSION NUMBERING
|
||||
|
||||
CUPS uses a three-part version number separated by periods to represent the
|
||||
major, minor, and patch release numbers. Major release numbers indicate large
|
||||
design changes or backwards-incompatible changes to the CUPS API or CUPS
|
||||
Imaging API. Minor release numbers indicate new features and other smaller
|
||||
changes which are backwards-compatible with previous CUPS releases. Patch
|
||||
numbers indicate bug fixes to the previous feature or patch release.
|
||||
|
||||
Note:
|
||||
|
||||
When we talk about compatibility, we are talking about binary compatibility
|
||||
for public APIs and output format compatibility for program interfaces.
|
||||
Changes to configuration file formats or the default behavior of programs
|
||||
are not generally considered incompatible as the upgrade process can
|
||||
normally address such changes gracefully.
|
||||
|
||||
Production releases use the plain version numbers:
|
||||
|
||||
MAJOR.MINOR.PATCH
|
||||
1.0.0
|
||||
...
|
||||
1.1.0
|
||||
...
|
||||
1.1.23
|
||||
...
|
||||
2.0.0
|
||||
...
|
||||
2.1.0
|
||||
2.1.1
|
||||
2.1.2
|
||||
2.1.3
|
||||
|
||||
The first production release in a MAJOR.MINOR series (MAJOR.MINOR.0) is called
|
||||
a feature release. Feature releases are the only releases that may contain new
|
||||
features. Subsequent production releases in a MAJOR.MINOR series may only
|
||||
contain bug fixes.
|
||||
|
||||
Beta-test releases are identified by appending the letter B to the major and
|
||||
minor version numbers followed by the beta release number:
|
||||
|
||||
MAJOR.MINORbNUMBER
|
||||
2.2b1
|
||||
|
||||
Release candidates are identified by appending the letters RC to the major and
|
||||
minor version numbers followed by the release candidate number:
|
||||
|
||||
MAJOR.MINORrcNUMBER
|
||||
2.2rc1
|
||||
|
||||
|
||||
CODING GUIDELINES
|
||||
|
||||
Contributed source code must follow the guidelines below. While the examples
|
||||
are for C and C++ source files, source code for other languages should conform
|
||||
to the same guidelines as allowed by the language.
|
||||
|
||||
|
||||
SOURCE FILES
|
||||
|
||||
All source files names must be 16 characters or less in length to ensure
|
||||
compatibility with older UNIX filesystems. Source files containing functions
|
||||
have an extension of ".c" for C and ".cxx" for C++ source files. All other
|
||||
"include" files have an extension of ".h". Tabs are set to 8 characters or
|
||||
columns.
|
||||
|
||||
Note:
|
||||
|
||||
The ".cxx" extension is used because it is the only common C++ extension
|
||||
between Linux, OS X, UNIX, and Windows.
|
||||
|
||||
The top of each source file contains a header giving the purpose or nature of
|
||||
the source file and the copyright and licensing notice:
|
||||
|
||||
/*
|
||||
* Description of file contents.
|
||||
*
|
||||
* Copyright 2016 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
For source files that are subject to the Apple OS-Developed Software exception,
|
||||
the following additional comment appears after the contact information:
|
||||
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
|
||||
|
||||
HEADER FILES
|
||||
|
||||
All public header files must include the "versioning.h" header file, or a header
|
||||
that does so. Function declarations are then "decorated" with the correct
|
||||
_CUPS_API_major_minor macro to define its availability based on the build
|
||||
environment, for example:
|
||||
|
||||
extern int cupsDoThis(int foo, int bar) _CUPS_API_2_2;
|
||||
|
||||
Private API header files must be named with the suffix "-private", for example
|
||||
the "cups.h" header file defines all of the public CUPS APIs while the
|
||||
"cups-private.h" header file defines all of the private CUPS APIs as well.
|
||||
Typically a private API header file will include the corresponding public API
|
||||
header file.
|
||||
|
||||
|
||||
COMMENTS
|
||||
|
||||
All source code utilizes block comments within functions to describe the
|
||||
operations being performed by a group of statements; avoid putting a comment
|
||||
per line unless absolutely necessary, and then consider refactoring the code
|
||||
so that it is not necessary. C source files use the block comment format
|
||||
("/* comment */") since many vendor C compilers still do not support C99/C++
|
||||
comments ("// comment"):
|
||||
|
||||
/*
|
||||
* Clear the state array before we begin...
|
||||
*/
|
||||
|
||||
for (i = 0; i < (sizeof(array) / sizeof(sizeof(array[0])); i ++)
|
||||
array[i] = CUPS_STATE_IDLE;
|
||||
|
||||
/*
|
||||
* Wait for state changes on another thread...
|
||||
*/
|
||||
|
||||
do
|
||||
{
|
||||
for (i = 0; i < (sizeof(array) / sizeof(sizeof(array[0])); i ++)
|
||||
if (array[i] != CUPS_STATE_IDLE)
|
||||
break;
|
||||
|
||||
if (i == (sizeof(array) / sizeof(array[0])))
|
||||
sleep(1);
|
||||
} while (i == (sizeof(array) / sizeof(array[0])));
|
||||
|
||||
|
||||
INDENTATION
|
||||
|
||||
All code blocks enclosed by brackets begin with the opening brace on a new
|
||||
line. The code then follows starting on a new line after the brace and is
|
||||
indented 2 spaces. The closing brace is then placed on a new line following
|
||||
the code at the original indentation:
|
||||
|
||||
{
|
||||
int i; /* Looping var */
|
||||
|
||||
|
||||
/*
|
||||
* Process foobar values from 0 to 999...
|
||||
*/
|
||||
|
||||
for (i = 0; i < 1000; i ++)
|
||||
{
|
||||
do_this(i);
|
||||
do_that(i);
|
||||
}
|
||||
}
|
||||
|
||||
Single-line statements following "do", "else", "for", "if", and "while" are
|
||||
indented 2 spaces as well. Blocks of code in a "switch" block are indented 4
|
||||
spaces after each "case" and "default" case:
|
||||
|
||||
switch (array[i])
|
||||
{
|
||||
case CUPS_STATE_IDLE :
|
||||
do_this(i);
|
||||
do_that(i);
|
||||
break;
|
||||
|
||||
default :
|
||||
do_nothing(i);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
SPACING
|
||||
|
||||
A space follows each reserved word such as "if", "while", etc. Spaces are not
|
||||
inserted between a function name and the arguments in parenthesis.
|
||||
|
||||
|
||||
RETURN VALUES
|
||||
|
||||
Parenthesis surround values returned from a function:
|
||||
|
||||
return (CUPS_STATE_IDLE);
|
||||
|
||||
|
||||
FUNCTIONS
|
||||
|
||||
Functions with a global scope have a lowercase prefix followed by capitalized
|
||||
words, e.g., "cupsDoThis", "cupsDoThat", "cupsDoSomethingElse", etc. Private
|
||||
global functions begin with a leading underscore, e.g., "_cupsDoThis",
|
||||
"_cupsDoThat", etc.
|
||||
|
||||
Functions with a local scope are declared "static" with lowercase names and
|
||||
underscores between words, e.g., "do_this", "do_that", "do_something_else", etc.
|
||||
|
||||
Each function begins with a comment header describing what the function does,
|
||||
the possible input limits (if any), the possible output values (if any), and
|
||||
any special information needed:
|
||||
|
||||
/*
|
||||
* 'do_this()' - Compute y = this(x).
|
||||
*
|
||||
* Notes: none.
|
||||
*/
|
||||
|
||||
static float /* O - Inverse power value, 0.0 <= y <= 1.1 */
|
||||
do_this(float x) /* I - Power value (0.0 <= x <= 1.1) */
|
||||
{
|
||||
...
|
||||
return (y);
|
||||
}
|
||||
|
||||
Return/output values are indicated using an "O" prefix, input values are
|
||||
indicated using the "I" prefix, and values that are both input and output use
|
||||
the "IO" prefix for the corresponding in-line comment.
|
||||
|
||||
The Mini-XML documentation generator also understands the following special
|
||||
text in the function description comment:
|
||||
|
||||
@deprecated@ - Marks the function as deprecated (not recommended
|
||||
for new development and scheduled for removal)
|
||||
@since CUPS version@ - Marks the function as new in the specified version
|
||||
of CUPS.
|
||||
@private@ - Marks the function as private (same as starting the
|
||||
function name with an underscore)
|
||||
|
||||
|
||||
VARIABLES
|
||||
|
||||
Variables with a global scope are capitalized, e.g., "ThisVariable",
|
||||
"ThatVariable", "ThisStateVariable", etc. Globals in CUPS libraries are either
|
||||
part of the per-thread global values managed by the "_cupsGlobals()" function
|
||||
or are suitably protected for concurrent access. Global variables should be
|
||||
replaced by function arguments whenever possible.
|
||||
|
||||
Variables with a local scope are lowercase with underscores between words,
|
||||
e.g., "this_variable", "that_variable", etc. Any "local global" variables
|
||||
shared by functions within a source file are declared "static". As for global
|
||||
variables, local static variables are suitably protected for concurrent access.
|
||||
|
||||
Each variable is declared on a separate line and is immediately followed by a
|
||||
comment block describing the variable:
|
||||
|
||||
int ThisVariable; /* The current state of this */
|
||||
static int that_variable; /* The current state of that */
|
||||
|
||||
|
||||
TYPES
|
||||
|
||||
All type names are lowercase with underscores between words and "_t" appended
|
||||
to the end of the name, e.g., "cups_this_type_t", "cups_that_type_t", etc.
|
||||
Type names start with a prefix, typically "cups" or the name of the program,
|
||||
to avoid conflicts with system types. Private type names start with an
|
||||
underscore, e.g., "_cups_this_t", "_cups_that_t", etc.
|
||||
|
||||
Each type has a comment block immediately after the typedef:
|
||||
|
||||
typedef int cups_this_type_t; /* This type is for CUPS foobar options. */
|
||||
|
||||
|
||||
STRUCTURES
|
||||
|
||||
All structure names are lowercase with underscores between words and "_s"
|
||||
appended to the end of the name, e.g., "cups_this_s", "cups_that_s", etc.
|
||||
Structure names start with a prefix, typically "cups" or the name of the
|
||||
program, to avoid conflicts with system types. Private structure names start
|
||||
with an underscore, e.g., "_cups_this_s", "_cups_that_s", etc.
|
||||
|
||||
Each structure has a comment block immediately after the struct and each member
|
||||
is documented similar to the variable naming policy above:
|
||||
|
||||
struct cups_this_struct_s /* This structure is for CUPS foobar options. */
|
||||
{
|
||||
int this_member; /* Current state for this */
|
||||
int that_member; /* Current state for that */
|
||||
};
|
||||
|
||||
|
||||
CONSTANTS
|
||||
|
||||
All constant names are uppercase with underscores between words, e.g.,
|
||||
"CUPS_THIS_CONSTANT", "CUPS_THAT_CONSTANT", etc. Constants begin with an
|
||||
uppercase prefix, typically "CUPS" or the program name. Private constants
|
||||
start with an underscore, e.g., "_CUPS_THIS_CONSTANT", "_CUPS_THAT_CONSTANT",
|
||||
etc.
|
||||
|
||||
Typed enumerations should be used whenever possible to allow for type checking
|
||||
by the compiler.
|
||||
|
||||
Comment blocks immediately follow each constant:
|
||||
|
||||
typedef enum cups_tray_e /* Tray enumerations */
|
||||
{
|
||||
CUPS_TRAY_THIS, /* This tray */
|
||||
CUPS_TRAY_THAT /* That tray */
|
||||
} cups_tray_t;
|
||||
|
||||
|
||||
MAKEFILE GUIDELINES
|
||||
|
||||
The following is a guide to the makefile-based build system used by CUPS.
|
||||
These standards have been developed over the years to allow CUPS to be built on
|
||||
as many systems and environments as possible.
|
||||
|
||||
|
||||
GENERAL ORGANIZATION
|
||||
|
||||
The CUPS source code is organized functionally into a top-level makefile,
|
||||
include file, and subdirectories each with their own makefile and dependencies
|
||||
files. The ".in" files are template files for the autoconf software and are
|
||||
used to generate a static version of the corresponding file.
|
||||
|
||||
|
||||
MAKEFILE DOCUMENTATION
|
||||
|
||||
Each makefile starts with the standard CUPS header containing the description
|
||||
of the file, and CUPS copyright and license notice:
|
||||
|
||||
#
|
||||
# Makefile for ...
|
||||
#
|
||||
# Copyright 2016 by Apple Inc.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
#
|
||||
|
||||
|
||||
PORTABLE MAKEFILE CONSTRUCTION
|
||||
|
||||
CUPS uses a common subset of make program syntax to ensure that the software
|
||||
can be compiled "out of the box" on as many systems as possible. The following
|
||||
is a list of assumptions we follow when constructing makefiles:
|
||||
|
||||
- Targets; we assume that the make program supports the notion of simple
|
||||
targets of the form "name:" that perform tab-indented commands that follow
|
||||
the target, e.g.:
|
||||
|
||||
target:
|
||||
<tab> target commands
|
||||
|
||||
- Dependencies; we assume that the make program supports recursive dependencies
|
||||
on targets, e.g.:
|
||||
|
||||
target: foo bar
|
||||
<tab> target commands
|
||||
|
||||
foo: bla
|
||||
<tab> foo commands
|
||||
|
||||
bar:
|
||||
<tab> bar commands
|
||||
|
||||
bla:
|
||||
<tab> bla commands
|
||||
|
||||
- Variable Definition; we assume that the make program supports variable
|
||||
definition on the command-line or in the makefile using the following form:
|
||||
|
||||
name=value
|
||||
|
||||
- Variable Substitution; we assume that the make program supports variable
|
||||
substitution using the following forms:
|
||||
|
||||
- $(name); substitutes the value of "name",
|
||||
- $(name:.old=.new); substitutes the value of "name" with the filename
|
||||
extension ".old" changed to ".new",
|
||||
- $(MAKEFLAGS); substitutes the command-line options passed to the
|
||||
program without the leading hyphen (-),
|
||||
- $$; substitutes a single $ character,
|
||||
- $<; substitutes the current source file or dependency, and
|
||||
- $@; substitutes the current target name.
|
||||
|
||||
- Suffixes; we assume that the make program supports filename suffixes with
|
||||
assumed dependencies, e.g.:
|
||||
|
||||
.SUFFIXES: .c .o
|
||||
.c.o:
|
||||
<tab> $(CC) $(CFLAGS) -o $@ -c $<
|
||||
|
||||
- Include Files; we assume that the make program supports the include
|
||||
directive, e.g.:
|
||||
|
||||
include ../Makedefs
|
||||
include Dependencies
|
||||
|
||||
- Comments; we assume that comments begin with a # character and proceed to the
|
||||
end of the current line.
|
||||
|
||||
- Line Length; we assume that there is no practical limit to the length of
|
||||
lines.
|
||||
|
||||
- Continuation of long lines; we assume that the \ character may be placed at
|
||||
the end of a line to concatenate two or more lines in a makefile to form a
|
||||
single long line.
|
||||
|
||||
- Shell; we assume a POSIX-compatible shell is present on the build system.
|
||||
|
||||
|
||||
STANDARD VARIABLES
|
||||
|
||||
The following variables are defined in the "Makedefs" file generated by the
|
||||
autoconf software:
|
||||
|
||||
- ALL_CFLAGS; the combined C compiler options,
|
||||
- ALL_CXXFLAGS; the combined C++ compiler options,
|
||||
- AMANDIR; the administrative man page installation directory (section 8/1m
|
||||
depending on the platform),
|
||||
- AR; the library archiver command,
|
||||
- ARFLAGS; options for the library archiver command,
|
||||
- AWK; the local awk command,
|
||||
- BINDIR; the binary installation directory,
|
||||
- BUILDROOT; optional installation prefix (defaults to DSTROOT),
|
||||
- CC; the C compiler command,
|
||||
- CFLAGS; options for the C compiler command,
|
||||
- CHMOD; the chmod command,
|
||||
- CXX; the C++ compiler command,
|
||||
- CXXFLAGS; options for the C++ compiler command,
|
||||
- DATADIR; the data file installation directory,
|
||||
- DSO; the C shared library building command,
|
||||
- DSOXX; the C++ shared library building command,
|
||||
- DSOFLAGS; options for the shared library building command,
|
||||
- INCLUDEDIR; the public header file installation directory,
|
||||
- INSTALL; the install command,
|
||||
- INSTALL_BIN; the program installation command,
|
||||
- INSTALL_COMPDATA; the compressed data file installation command,
|
||||
- INSTALL_CONFIG; the configuration file installation command,
|
||||
- INSTALL_DATA; the data file installation command,
|
||||
- INSTALL_DIR; the directory installation command,
|
||||
- INSTALL_LIB; the library installation command,
|
||||
- INSTALL_MAN; the documentation installation command,
|
||||
- INSTALL_SCRIPT; the shell script installation command,
|
||||
- LD; the linker command,
|
||||
- LDFLAGS; options for the linker,
|
||||
- LIBDIR; the library installation directory,
|
||||
- LIBS; libraries for all programs,
|
||||
- LN; the ln command,
|
||||
- MAN1EXT; extension for man pages in section 1,
|
||||
- MAN3EXT; extension for man pages in section 3,
|
||||
- MAN5EXT; extension for man pages in section 5,
|
||||
- MAN7EXT; extension for man pages in section 7,
|
||||
- MAN8DIR; subdirectory for man pages in section 8,
|
||||
- MAN8EXT; extension for man pages in section 8,
|
||||
- MANDIR; the man page installation directory,
|
||||
- OPTIM; common compiler optimization options,
|
||||
- PRIVATEINCLUDE; the private header file installation directory,
|
||||
- RM; the rm command,
|
||||
- SHELL; the sh (POSIX shell) command,
|
||||
- STRIP; the strip command,
|
||||
- srcdir; the source directory.
|
||||
|
||||
|
||||
STANDARD TARGETS
|
||||
|
||||
The following standard targets are defined in each makefile:
|
||||
|
||||
- all; creates all target programs, libraries, and documentation files,
|
||||
- clean; removes all target programs libraries, documentation files, and object
|
||||
files,
|
||||
- depend; generates automatic dependencies for any C or C++ source files (also
|
||||
see "DEPENDENCIES"),
|
||||
- distclean; removes autoconf-generated files in addition to those removed by
|
||||
the "clean" target,
|
||||
- install; installs all distribution files in their corresponding locations
|
||||
(also see "INSTALL/UNINSTALL SUPPORT"),
|
||||
- install-data; installs all data files in their corresponding locations (also
|
||||
see "INSTALL/UNINSTALL SUPPORT"),
|
||||
- install-exec; installs all executable files in their corresponding locations
|
||||
(also see "INSTALL/UNINSTALL SUPPORT"),
|
||||
- install-headers; installs all include files in their corresponding locations
|
||||
(also see "INSTALL/UNINSTALL SUPPORT"),
|
||||
- install-libs; installs all library files in their corresponding locations
|
||||
(also see "INSTALL/UNINSTALL SUPPORT"), and
|
||||
- uninstall; removes all distribution files from their corresponding locations
|
||||
(also see "INSTALL/UNINSTALL SUPPORT").
|
||||
|
||||
|
||||
OBJECT FILES
|
||||
|
||||
Object files (the result of compiling a C or C++ source file) have the
|
||||
extension ".o".
|
||||
|
||||
|
||||
PROGRAMS
|
||||
|
||||
Program files are the result of linking object files and libraries together to
|
||||
form an executable file. A typical program target looks like:
|
||||
|
||||
program: $(OBJS)
|
||||
<tab> echo Linking $@...
|
||||
<tab> $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
|
||||
STATIC LIBRARIES
|
||||
|
||||
Static libraries have a prefix of "lib" and the extension ".a". A typical
|
||||
static library target looks like:
|
||||
|
||||
libname.a: $(OBJECTS)
|
||||
<tab> echo Creating $@...
|
||||
<tab> $(RM) $@
|
||||
<tab> $(AR) $(ARFLAGS) $@ $(OBJECTS)
|
||||
<tab> $(RANLIB) $@
|
||||
|
||||
SHARED LIBRARIES
|
||||
|
||||
Shared libraries have a prefix of "lib" and the extension ".dylib" or ".so"
|
||||
depending on the operating system. A typical shared library is composed of
|
||||
several targets that look like:
|
||||
|
||||
libname.so: $(OBJECTS)
|
||||
<tab> echo $(DSOCOMMAND) libname.so.$(DSOVERSION) ...
|
||||
<tab> $(DSOCOMMAND) libname.so.$(DSOVERSION) $(OBJECTS)
|
||||
<tab> $(RM) libname.so libname.so.$(DSOMAJOR)
|
||||
<tab> $(LN) libname.so.$(DSOVERSION) libname.so.$(DSOMAJOR)
|
||||
<tab> $(LN) libname.so.$(DSOVERSION) libname.so
|
||||
|
||||
libname.dylib: $(OBJECTS)
|
||||
<tab> echo $(DSOCOMMAND) libname.$(DSOVERSION).dylib ...
|
||||
<tab> $(DSOCOMMAND) libname.$(DSOVERSION).dylib \
|
||||
<tab> <tab> -install_name $(libdir)/libname.$(DSOMAJOR).dylib \
|
||||
<tab> <tab> -current_version libname.$(DSOVERSION).dylib \
|
||||
<tab> <tab> -compatibility_version $(DSOMAJOR).0 \
|
||||
<tab> <tab> $(OBJECTS) $(LIBS)
|
||||
<tab> $(RM) libname.dylib
|
||||
<tab> $(RM) libname.$(DSOMAJOR).dylib
|
||||
<tab> $(LN) libname.$(DSOVERSION).dylib libname.$(DSOMAJOR).dylib
|
||||
<tab> $(LN) libname.$(DSOVERSION).dylib libname.dylib
|
||||
|
||||
DEPENDENCIES
|
||||
|
||||
Static dependencies are expressed in each makefile following the target, for
|
||||
example:
|
||||
|
||||
foo: bar
|
||||
|
||||
Static dependencies are only used when it is not possible to automatically
|
||||
generate them. Automatic dependencies are stored in a file named
|
||||
"Dependencies" and included at the end of the makefile. The following "depend"
|
||||
target rule is used to create the automatic dependencies:
|
||||
|
||||
depend:
|
||||
<tab> $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
|
||||
|
||||
We regenerate the automatic dependencies on an OS X system and express any
|
||||
non-OS X dependencies statically in the makefile.
|
||||
|
||||
|
||||
INSTALL/UNINSTALL SUPPORT
|
||||
|
||||
All makefiles contains install and uninstall rules which install or remove the
|
||||
corresponding software. These rules must use the $(BUILDROOT) variable as a
|
||||
prefix to any installation directory so that CUPS can be installed in a
|
||||
temporary location for packaging by programs like rpmbuild.
|
||||
|
||||
The $(INSTALL_BIN), $(INSTALL_COMPDATA), $(INSTALL_CONFIG), $(INSTALL_DATA),
|
||||
$(INSTALL_DIR), $(INSTALL_LIB), $(INSTALL_MAN), and $(INSTALL_SCRIPT) variables
|
||||
must be used when installing files so that the proper ownership and permissions
|
||||
are set on the installed files.
|
||||
|
||||
The $(RANLIB) command must be run on any static libraries after installation
|
||||
since the symbol table is invalidated when the library is copied on some
|
||||
platforms.
|
||||
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
HTTP/2.0 Implementation Notes - 2013-11-07
|
||||
------------------------------------------
|
||||
|
||||
OVERVIEW
|
||||
|
||||
HTTP/2.0 allows clients to send multiple, simultaneous requests over a
|
||||
single connection, as well as supporting server-side push delivery of
|
||||
content. In the context of IPP, this would allow a single connection to
|
||||
support simultaneous job submission and monitoring.
|
||||
|
||||
This will require changes to the HTTP API used in CUPS, and to cupsd and
|
||||
other CUPS-based servers. This branch tracks that development.
|
||||
|
||||
|
||||
DESIGN
|
||||
|
||||
http_t will be updated to be accessible from multiple threads and track the
|
||||
HTTP state in a thread ID to stream ID/state table. Applications can
|
||||
discover whether a Printer supports HTTP/2.0 with a new httpSupportsVersion
|
||||
API and upgrade to HTTP/2.0 with httpUpgradeToVersion.
|
||||
|
||||
Calling httpPost in HTTP/1.1 mode will serialize requests between threads.
|
||||
Calling httpPost in HTTP/2.0 mode will create a new stream ID and issue
|
||||
requests in parallel.
|
||||
|
||||
Q: How to handle incoming 2.0 requests? New httpServerRunLoop with
|
||||
callback that creates a new thread for all incoming requests and associates
|
||||
the thread with the stream ID. httpWriteResponse is then tied to the stream
|
||||
ID. For 1.1 mode the callback gets called on the current thread (no new
|
||||
threads created).
|
||||
|
||||
Q: How to handle PUSH_PROMISE? New httpPushPromise API that creates a new
|
||||
thread and stream ID?
|
||||
|
||||
|
||||
REFERENCES
|
||||
|
||||
HTTPbis WG web site: http://tools.ietf.org/wg/httpbis
|
||||
|
||||
Main spec: http://tools.ietf.org/html/draft-ietf-httpbis-http2
|
||||
|
||||
Header compression spec:
|
||||
http://tools.ietf.org/html/draft-ietf-httpbis-header-compression
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
INSTALL - CUPS v2.2b1 - 2015-09-14
|
||||
INSTALL - CUPS v2.1.4 - 2016-06-14
|
||||
----------------------------------
|
||||
|
||||
This file describes how to compile and install CUPS from source code. For more
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makedefs.in 11984 2014-07-02 13:16:59Z msweet $"
|
||||
# "$Id: Makedefs.in 12519 2015-02-17 13:10:19Z msweet $"
|
||||
#
|
||||
# Common makefile definitions for CUPS.
|
||||
#
|
||||
@@ -264,5 +264,5 @@ USBQUIRKS = @USBQUIRKS@
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makedefs.in 11984 2014-07-02 13:16:59Z msweet $"
|
||||
# End of "$Id: Makedefs.in 12519 2015-02-17 13:10:19Z msweet $"
|
||||
#
|
||||
|
||||
+2
-5
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makefile 13138 2016-03-15 14:59:54Z msweet $"
|
||||
# "$Id: Makefile 12414 2015-01-21 00:02:04Z msweet $"
|
||||
#
|
||||
# Top-level Makefile for CUPS.
|
||||
#
|
||||
@@ -130,9 +130,6 @@ depend:
|
||||
#
|
||||
# At least checker-231 is required.
|
||||
#
|
||||
# Alternatively, use "--analyze -Xanalyzer -analyzer-output=text" for OPTIM (text
|
||||
# output instead of HTML...)
|
||||
#
|
||||
|
||||
.PHONY: clang clang-changes
|
||||
clang:
|
||||
@@ -351,5 +348,5 @@ dist: all
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 13138 2016-03-15 14:59:54Z msweet $".
|
||||
# End of "$Id: Makefile 12414 2015-01-21 00:02:04Z msweet $".
|
||||
#
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
README - CUPS v2.2b1 - 2015-09-14
|
||||
README - CUPS v2.1.4 - 2016-06-14
|
||||
---------------------------------
|
||||
|
||||
Looking for compile instructions? Read the file "INSTALL.txt" instead...
|
||||
@@ -140,7 +140,7 @@ PRINTING FILES
|
||||
|
||||
LEGAL STUFF
|
||||
|
||||
CUPS is Copyright 2007-2015 by Apple Inc. CUPS and the CUPS logo are
|
||||
CUPS is Copyright 2007-2016 by Apple Inc. CUPS and the CUPS logo are
|
||||
trademarks of Apple Inc.
|
||||
|
||||
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
|
||||
|
||||
+25
-20
@@ -4,50 +4,54 @@ ipp.o: ipp.c backend-private.h ../cups/cups-private.h \
|
||||
../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h \
|
||||
../cups/ppd-private.h ../cups/ppd.h ../cups/raster.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h
|
||||
lpd.o: lpd.c ../cups/http-private.h ../config.h ../cups/language.h \
|
||||
../cups/array.h ../cups/versioning.h ../cups/http.h \
|
||||
../cups/md5-private.h ../cups/ipp-private.h ../cups/ipp.h \
|
||||
backend-private.h ../cups/cups-private.h ../cups/string-private.h \
|
||||
../cups/debug-private.h ../cups/array-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h
|
||||
dnssd.o: dnssd.c backend-private.h ../cups/cups-private.h \
|
||||
../cups/string-private.h ../config.h ../cups/debug-private.h \
|
||||
../cups/versioning.h ../cups/array-private.h ../cups/array.h \
|
||||
../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h
|
||||
snmp.o: snmp.c backend-private.h ../cups/cups-private.h \
|
||||
../cups/string-private.h ../config.h ../cups/debug-private.h \
|
||||
../cups/versioning.h ../cups/array-private.h ../cups/array.h \
|
||||
../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h
|
||||
socket.o: socket.c ../cups/http-private.h ../config.h ../cups/language.h \
|
||||
../cups/array.h ../cups/versioning.h ../cups/http.h \
|
||||
../cups/md5-private.h ../cups/ipp-private.h ../cups/ipp.h \
|
||||
backend-private.h ../cups/cups-private.h ../cups/string-private.h \
|
||||
../cups/debug-private.h ../cups/array-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h
|
||||
test1284.o: test1284.c ../cups/string-private.h ../config.h ieee1284.c \
|
||||
backend-private.h ../cups/cups-private.h ../cups/debug-private.h \
|
||||
../cups/versioning.h ../cups/array-private.h ../cups/array.h \
|
||||
../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h \
|
||||
../cups/ppd-private.h ../cups/ppd.h ../cups/raster.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h
|
||||
testbackend.o: testbackend.c ../cups/string-private.h ../config.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/versioning.h ../cups/ipp.h \
|
||||
../cups/http.h ../cups/array.h ../cups/language.h ../cups/pwg.h \
|
||||
@@ -58,15 +62,16 @@ testsupplies.o: testsupplies.c backend-private.h ../cups/cups-private.h \
|
||||
../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h
|
||||
usb.o: usb.c backend-private.h ../cups/cups-private.h \
|
||||
../cups/string-private.h ../config.h ../cups/debug-private.h \
|
||||
../cups/versioning.h ../cups/array-private.h ../cups/array.h \
|
||||
../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h \
|
||||
usb-darwin.c ../cups/file-private.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/raster.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h usb-darwin.c \
|
||||
../cups/file-private.h
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makefile 11984 2014-07-02 13:16:59Z msweet $"
|
||||
# "$Id: Makefile 11859 2014-05-08 22:42:44Z msweet $"
|
||||
#
|
||||
# Backend makefile for CUPS.
|
||||
#
|
||||
@@ -315,5 +315,5 @@ include Dependencies
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 11984 2014-07-02 13:16:59Z msweet $".
|
||||
# End of "$Id: Makefile 11859 2014-05-08 22:42:44Z msweet $".
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: backend-private.h 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: backend-private.h 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Backend support definitions for CUPS.
|
||||
*
|
||||
@@ -334,5 +334,5 @@ extern int backendWaitLoop(int snmp_fd, http_addr_t *addr,
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: backend-private.h 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: backend-private.h 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+11
-7
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: dnssd.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: dnssd.c 12970 2015-11-13 20:02:51Z msweet $"
|
||||
*
|
||||
* DNS-SD discovery backend for CUPS.
|
||||
*
|
||||
@@ -1042,7 +1042,9 @@ query_callback(
|
||||
"interfaceIndex=%d, errorCode=%d, fullName=\"%s\", "
|
||||
"rrtype=%u, rrclass=%u, rdlen=%u, rdata=%p, ttl=%u, "
|
||||
"context=%p)\n",
|
||||
sdRef, flags, interfaceIndex, errorCode, fullName, rrtype, rrclass, rdlen, rdata, ttl, context);
|
||||
sdRef, flags, interfaceIndex, errorCode,
|
||||
fullName ? fullName : "(null)", rrtype, rrclass, rdlen, rdata, ttl,
|
||||
context);
|
||||
|
||||
/*
|
||||
* Only process "add" data...
|
||||
@@ -1055,7 +1057,9 @@ query_callback(
|
||||
fprintf(stderr, "DEBUG2: query_callback(browser=%p, interfaceIndex=%d, "
|
||||
"protocol=%d, event=%d, fullName=\"%s\", rrclass=%u, "
|
||||
"rrtype=%u, rdata=%p, rdlen=%u, flags=%x, context=%p)\n",
|
||||
browser, interfaceIndex, protocol, event, fullName, rrclass, rrtype, rdata, (unsigned)rdlen, flags, context);
|
||||
browser, interfaceIndex, protocol, event,
|
||||
fullName ? fullName : "(null)", rrclass, rrtype, rdata,
|
||||
(unsigned)rdlen, flags, context);
|
||||
|
||||
/*
|
||||
* Only process "add" data...
|
||||
@@ -1190,9 +1194,9 @@ query_callback(
|
||||
snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;",
|
||||
make_and_model, model);
|
||||
else if (!_cups_strncasecmp(model, "designjet ", 10))
|
||||
snprintf(device_id, sizeof(device_id), "MFG:HP;MDL:%s", model + 10);
|
||||
snprintf(device_id, sizeof(device_id), "MFG:HP;MDL:%s;", model + 10);
|
||||
else if (!_cups_strncasecmp(model, "stylus ", 7))
|
||||
snprintf(device_id, sizeof(device_id), "MFG:EPSON;MDL:%s", model + 7);
|
||||
snprintf(device_id, sizeof(device_id), "MFG:EPSON;MDL:%s;", model + 7);
|
||||
else if ((ptr = strchr(model, ' ')) != NULL)
|
||||
{
|
||||
/*
|
||||
@@ -1202,7 +1206,7 @@ query_callback(
|
||||
memcpy(make_and_model, model, (size_t)(ptr - model));
|
||||
make_and_model[ptr - model] = '\0';
|
||||
|
||||
snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s",
|
||||
snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;",
|
||||
make_and_model, ptr + 1);
|
||||
}
|
||||
}
|
||||
@@ -1318,5 +1322,5 @@ unquote(char *dst, /* I - Destination buffer */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dnssd.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: dnssd.c 12970 2015-11-13 20:02:51Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ieee1284.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: ieee1284.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
*
|
||||
* IEEE-1284 support functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -20,7 +20,6 @@
|
||||
*/
|
||||
|
||||
#include "backend-private.h"
|
||||
#include <cups/ppd-private.h>
|
||||
|
||||
|
||||
/*
|
||||
@@ -476,5 +475,5 @@ backendGetMakeModel(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ieee1284.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: ieee1284.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
*/
|
||||
|
||||
+11
-48
@@ -1,7 +1,9 @@
|
||||
/*
|
||||
* "$Id: ipp.c 12896 2015-10-09 13:15:22Z msweet $"
|
||||
*
|
||||
* IPP backend for CUPS.
|
||||
*
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -18,7 +20,6 @@
|
||||
*/
|
||||
|
||||
#include "backend-private.h"
|
||||
#include <cups/ppd-private.h>
|
||||
#include <cups/array-private.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -107,7 +108,6 @@ static const char * const pattrs[] = /* Printer attributes we want */
|
||||
"copies-supported",
|
||||
"cups-version",
|
||||
"document-format-supported",
|
||||
"job-password-encryption-supported",
|
||||
"marker-colors",
|
||||
"marker-high-levels",
|
||||
"marker-levels",
|
||||
@@ -236,10 +236,9 @@ main(int argc, /* I - Number of command-line args */
|
||||
int delay, /* Delay for retries */
|
||||
prev_delay; /* Previous delay */
|
||||
const char *compression; /* Compression mode */
|
||||
int waitjob, /* Wait for job complete? */
|
||||
int waitjob, /* Wait for job complete? */
|
||||
waitjob_tries = 0, /* Number of times we've waited */
|
||||
waitprinter; /* Wait for printer ready? */
|
||||
time_t waittime; /* Wait time for held jobs */
|
||||
_cups_monitor_t monitor; /* Monitoring data */
|
||||
ipp_attribute_t *job_id_attr; /* job-id attribute */
|
||||
int job_id; /* job-id value */
|
||||
@@ -250,7 +249,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
#endif /* HAVE_LIBZ */
|
||||
ipp_attribute_t *copies_sup; /* copies-supported */
|
||||
ipp_attribute_t *cups_version; /* cups-version */
|
||||
ipp_attribute_t *encryption_sup; /* job-password-encryption-supported */
|
||||
ipp_attribute_t *format_sup; /* document-format-supported */
|
||||
ipp_attribute_t *job_auth; /* job-authorization-uri */
|
||||
ipp_attribute_t *media_col_sup; /* media-col-supported */
|
||||
@@ -882,7 +880,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
#endif /* HAVE_LIBZ */
|
||||
copies_sup = NULL;
|
||||
cups_version = NULL;
|
||||
encryption_sup = NULL;
|
||||
format_sup = NULL;
|
||||
media_col_sup = NULL;
|
||||
supported = NULL;
|
||||
@@ -1128,8 +1125,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
cups_version = ippFindAttribute(supported, "cups-version", IPP_TAG_TEXT);
|
||||
|
||||
encryption_sup = ippFindAttribute(supported, "job-password-encryption-supported", IPP_TAG_KEYWORD);
|
||||
|
||||
if ((format_sup = ippFindAttribute(supported, "document-format-supported",
|
||||
IPP_TAG_MIMETYPE)) != NULL)
|
||||
{
|
||||
@@ -1314,41 +1309,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
if ((mandatory = ppdFindAttr(ppd, "cupsMandatory", NULL)) != NULL)
|
||||
strlcpy(mandatory_attrs, mandatory->value, sizeof(mandatory_attrs));
|
||||
}
|
||||
|
||||
/*
|
||||
* Validate job-password/-encryption...
|
||||
*/
|
||||
|
||||
if (cupsGetOption("job-password", num_options, options))
|
||||
{
|
||||
const char *keyword; /* job-password-encryption value */
|
||||
static const char * const hashes[] =
|
||||
{ /* List of supported hash algorithms, in order of preference */
|
||||
"sha-512",
|
||||
"sha-384",
|
||||
"sha-512_256",
|
||||
"sha-512-224",
|
||||
"sha-256",
|
||||
"sha-224",
|
||||
"sha",
|
||||
"none"
|
||||
};
|
||||
|
||||
if ((keyword = cupsGetOption("job-password-encryption", num_options, options)) == NULL || !ippContainsString(encryption_sup, keyword))
|
||||
{
|
||||
/*
|
||||
* Either no job-password-encryption or the value isn't supported by
|
||||
* the printer...
|
||||
*/
|
||||
|
||||
for (i = 0; i < (int)(sizeof(hashes) / sizeof(hashes[0])); i ++)
|
||||
if (ippContainsString(encryption_sup, hashes[i]))
|
||||
break;
|
||||
|
||||
if (i < (int)(sizeof(hashes) / sizeof(hashes[0])))
|
||||
num_options = cupsAddOption("job-password-encryption", hashes[i], num_options, &options);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
num_options = 0;
|
||||
@@ -1967,7 +1927,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
_cupsLangPrintFilter(stderr, "INFO", _("Waiting for job to complete."));
|
||||
|
||||
for (delay = _cupsNextDelay(0, &prev_delay), waittime = time(NULL) + 30; !job_canceled;)
|
||||
for (delay = _cupsNextDelay(0, &prev_delay); !job_canceled;)
|
||||
{
|
||||
/*
|
||||
* Check for side-channel requests...
|
||||
@@ -2078,11 +2038,10 @@ main(int argc, /* I - Number of command-line args */
|
||||
job_sheets->values[0].integer);
|
||||
|
||||
/*
|
||||
* Stop polling if the job is finished or pending-held for 30 seconds...
|
||||
* Stop polling if the job is finished or pending-held...
|
||||
*/
|
||||
|
||||
if (job_state->values[0].integer > IPP_JSTATE_STOPPED ||
|
||||
(job_state->values[0].integer == IPP_JSTATE_HELD && time(NULL) > waittime))
|
||||
if (job_state->values[0].integer > IPP_JOB_STOPPED)
|
||||
{
|
||||
ippDelete(response);
|
||||
break;
|
||||
@@ -3541,3 +3500,7 @@ update_reasons(ipp_attribute_t *attr, /* I - printer-state-reasons or NULL */
|
||||
else if (rem[0])
|
||||
fprintf(stderr, "%s\n", rem);
|
||||
}
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp.c 12896 2015-10-09 13:15:22Z msweet $".
|
||||
*/
|
||||
|
||||
+87
-83
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: lpd.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: lpd.c 13040 2016-01-11 20:29:13Z msweet $"
|
||||
*
|
||||
* Line Printer Daemon backend for CUPS.
|
||||
*
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -77,7 +77,6 @@ static int abort_job = 0; /* Non-zero if we get SIGTERM */
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static int cups_rresvport(int *port, int family);
|
||||
static int lpd_command(int lpd_fd, char *format, ...);
|
||||
static int lpd_queue(const char *hostname, http_addrlist_t *addrlist,
|
||||
const char *printer, int print_fd, int snmp_fd,
|
||||
@@ -86,6 +85,9 @@ static int lpd_queue(const char *hostname, http_addrlist_t *addrlist,
|
||||
int reserve, int manual_copies, int timeout,
|
||||
int contimeout, const char *orighost);
|
||||
static ssize_t lpd_write(int lpd_fd, char *buffer, size_t length);
|
||||
#ifndef HAVE_RRESVPORT_AF
|
||||
static int rresvport_af(int *port, int family);
|
||||
#endif /* !HAVE_RRESVPORT_AF */
|
||||
static void sigterm_handler(int sig);
|
||||
|
||||
|
||||
@@ -570,84 +572,6 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_rresvport()' - A simple implementation of rresvport_af().
|
||||
*/
|
||||
|
||||
static int /* O - Socket or -1 on error */
|
||||
cups_rresvport(int *port, /* IO - Port number to bind to */
|
||||
int family) /* I - Address family */
|
||||
{
|
||||
http_addr_t addr; /* Socket address */
|
||||
int fd; /* Socket file descriptor */
|
||||
|
||||
|
||||
/*
|
||||
* Try to create an IPv4 socket...
|
||||
*/
|
||||
|
||||
if ((fd = socket(family, SOCK_STREAM, 0)) < 0)
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
* Initialize the address buffer...
|
||||
*/
|
||||
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.addr.sa_family = (sa_family_t)family;
|
||||
|
||||
/*
|
||||
* Try to bind the socket to a reserved port...
|
||||
*/
|
||||
|
||||
while (*port > 511)
|
||||
{
|
||||
/*
|
||||
* Set the port number...
|
||||
*/
|
||||
|
||||
_httpAddrSetPort(&addr, *port);
|
||||
|
||||
/*
|
||||
* Try binding the port to the socket; return if all is OK...
|
||||
*/
|
||||
|
||||
if (!bind(fd, (struct sockaddr *)&addr, (socklen_t)httpAddrLength(&addr)))
|
||||
return (fd);
|
||||
|
||||
/*
|
||||
* Stop if we have any error other than "address already in use"...
|
||||
*/
|
||||
|
||||
if (errno != EADDRINUSE)
|
||||
{
|
||||
httpAddrClose(NULL, fd);
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Try the next port...
|
||||
*/
|
||||
|
||||
(*port)--;
|
||||
}
|
||||
|
||||
/*
|
||||
* Wasn't able to bind to a reserved port, so close the socket and return
|
||||
* -1...
|
||||
*/
|
||||
|
||||
#ifdef WIN32
|
||||
closesocket(fd);
|
||||
#else
|
||||
close(fd);
|
||||
#endif /* WIN32 */
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'lpd_command()' - Send an LPR command sequence and wait for a reply.
|
||||
*/
|
||||
@@ -829,7 +753,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
* priviledged lport between 721 and 731...
|
||||
*/
|
||||
|
||||
if ((fd = cups_rresvport(&lport, addr->addr.addr.sa_family)) < 0)
|
||||
if ((fd = rresvport_af(&lport, addr->addr.addr.sa_family)) < 0)
|
||||
{
|
||||
perror("DEBUG: Unable to reserve port");
|
||||
sleep(1);
|
||||
@@ -1302,6 +1226,86 @@ lpd_write(int lpd_fd, /* I - LPD socket */
|
||||
}
|
||||
|
||||
|
||||
#ifndef HAVE_RRESVPORT_AF
|
||||
/*
|
||||
* 'rresvport_af()' - A simple implementation of rresvport_af().
|
||||
*/
|
||||
|
||||
static int /* O - Socket or -1 on error */
|
||||
rresvport_af(int *port, /* IO - Port number to bind to */
|
||||
int family) /* I - Address family */
|
||||
{
|
||||
http_addr_t addr; /* Socket address */
|
||||
int fd; /* Socket file descriptor */
|
||||
|
||||
|
||||
/*
|
||||
* Try to create an IPv4 socket...
|
||||
*/
|
||||
|
||||
if ((fd = socket(family, SOCK_STREAM, 0)) < 0)
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
* Initialize the address buffer...
|
||||
*/
|
||||
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.addr.sa_family = (sa_family_t)family;
|
||||
|
||||
/*
|
||||
* Try to bind the socket to a reserved port...
|
||||
*/
|
||||
|
||||
while (*port > 511)
|
||||
{
|
||||
/*
|
||||
* Set the port number...
|
||||
*/
|
||||
|
||||
_httpAddrSetPort(&addr, *port);
|
||||
|
||||
/*
|
||||
* Try binding the port to the socket; return if all is OK...
|
||||
*/
|
||||
|
||||
if (!bind(fd, (struct sockaddr *)&addr, httpAddrLength(&addr)))
|
||||
return (fd);
|
||||
|
||||
/*
|
||||
* Stop if we have any error other than "address already in use"...
|
||||
*/
|
||||
|
||||
if (errno != EADDRINUSE)
|
||||
{
|
||||
httpAddrClose(NULL, fd);
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Try the next port...
|
||||
*/
|
||||
|
||||
(*port)--;
|
||||
}
|
||||
|
||||
/*
|
||||
* Wasn't able to bind to a reserved port, so close the socket and return
|
||||
* -1...
|
||||
*/
|
||||
|
||||
# ifdef WIN32
|
||||
closesocket(fd);
|
||||
# else
|
||||
close(fd);
|
||||
# endif /* WIN32 */
|
||||
|
||||
return (-1);
|
||||
}
|
||||
#endif /* !HAVE_RRESVPORT_AF */
|
||||
|
||||
|
||||
/*
|
||||
* 'sigterm_handler()' - Handle 'terminate' signals that stop the backend.
|
||||
*/
|
||||
@@ -1316,5 +1320,5 @@ sigterm_handler(int sig) /* I - Signal */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: lpd.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: lpd.c 13040 2016-01-11 20:29:13Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: network.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: network.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
*
|
||||
* Common backend network APIs for CUPS.
|
||||
*
|
||||
@@ -304,5 +304,5 @@ backendNetworkSideCB(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: network.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: network.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -52,67 +52,67 @@
|
||||
# NEC Picty800 (HP OEM)
|
||||
0x0409 0xf1be unidir
|
||||
|
||||
# Lexmark International, Inc. (e250d), https://bugs.launchpad.net/bugs/1084164
|
||||
# Lexmark International, Inc. (e250d) (https://bugs.launchpad.net/bugs/1084164)
|
||||
0x043d 0x00f3 no-reattach
|
||||
|
||||
# Kyocera Mita FS 820, by zut <kernel@zut.de>
|
||||
0x0482 0x0010 unidir
|
||||
|
||||
# Canon, Inc. PIXMA iP6000D Printer, https://bugs.launchpad.net/bugs/1160638
|
||||
# Canon, Inc. PIXMA iP6000D Printer (https://bugs.launchpad.net/bugs/1160638)
|
||||
0x04a9 0x1095 unidir
|
||||
|
||||
# Canon, Inc. PIXMA iP4200 Printer, http://www.cups.org/str.php?L4155
|
||||
# Canon, Inc. PIXMA iP4200 Printer (Issue #4155)
|
||||
0x04a9 0x10a2 unidir
|
||||
|
||||
# Canon, Inc. PIXMA iP4300 Printer, https://bugs.launchpad.net/bugs/1032385
|
||||
# Canon, Inc. PIXMA iP4300 Printer (https://bugs.launchpad.net/bugs/1032385)
|
||||
0x04a9 0x10b6 unidir
|
||||
|
||||
# Canon, Inc. MP210 https://bugzilla.redhat.com/show_bug.cgi?id=847923#c53
|
||||
# Canon, Inc. MP210 (https://bugzilla.redhat.com/show_bug.cgi?id=847923#c53)
|
||||
0x04a9 0x1721 unidir
|
||||
|
||||
# Canon, Inc. MP500 Printer, https://bugs.launchpad.net/bugs/1032456
|
||||
# Canon, Inc. MP500 Printer (https://bugs.launchpad.net/bugs/1032456)
|
||||
0x04a9 0x170c unidir
|
||||
|
||||
# Canon, Inc. MP510 Printer, https://bugs.launchpad.net/bugs/1050009
|
||||
# Canon, Inc. MP510 Printer (https://bugs.launchpad.net/bugs/1050009)
|
||||
0x04a9 0x1717 unidir
|
||||
|
||||
# Canon, Inc. MP550 Printer, http://www.cups.org/str.php?L4155
|
||||
# Canon, Inc. MP550 Printer (Issue #4155)
|
||||
0x04a9 0x173d unidir
|
||||
|
||||
# Canon, Inc. MP560 Printer, http://www.cups.org/str.php?L4155
|
||||
# Canon, Inc. MP560 Printer (Issue #4155)
|
||||
0x04a9 0x173e unidir
|
||||
|
||||
# Canon, Inc. MF4150 Printer, https://bugs.launchpad.net/bugs/1160638
|
||||
# Canon, Inc. MF4150 Printer (https://bugs.launchpad.net/bugs/1160638)
|
||||
0x04a9 0x26a3 no-reattach
|
||||
|
||||
# Brother Industries, Ltd HL-1250 Laser Printer, https://bugs.debian.org/712512
|
||||
# Brother Industries, Ltd HL-1250 Laser Printer (https://bugs.debian.org/712512)
|
||||
0x04f9 0x0007 no-reattach
|
||||
|
||||
# Brother Industries, Ltd HL-1430 Laser Printer, https://bugs.launchpad.net/bugs/1038695
|
||||
# Brother Industries, Ltd HL-1430 Laser Printer (https://bugs.launchpad.net/bugs/1038695)
|
||||
0x04f9 0x001a no-reattach
|
||||
|
||||
# Brother Industries, Ltd HL-1440 Laser Printer, https://bugs.launchpad.net/bugs/1000253
|
||||
# Brother Industries, Ltd HL-1440 Laser Printer (https://bugs.launchpad.net/bugs/1000253)
|
||||
0x04f9 0x000d no-reattach unidir
|
||||
|
||||
# Brother Industries, Ltd HL-1450 Laser Printer, https://bugs.launchpad.net/bugs/1000253
|
||||
# Brother Industries, Ltd HL-1450 Laser Printer (https://bugs.launchpad.net/bugs/1000253)
|
||||
0x04f9 0x000e no-reattach unidir
|
||||
|
||||
# Oki Data Corp. Okipage 14ex Printer, https://bugs.launchpad.net/bugs/872483
|
||||
# Oki Data Corp. Okipage 14ex Printer (https://bugs.launchpad.net/bugs/872483)
|
||||
0x06bc 0x000b no-reattach
|
||||
|
||||
# Oki Data Corp. B410d, https://bugs.launchpad.net/bugs/872483
|
||||
# Oki Data Corp. B410d (https://bugs.launchpad.net/bugs/872483)
|
||||
0x06bc 0x01c7 no-reattach
|
||||
|
||||
# Seiko Epson Corp. Stylus Color 740 / Photo 750, http://bugs.debian.org/697970
|
||||
# Seiko Epson Corp. Stylus Color 740 / Photo 750 (http://bugs.debian.org/697970)
|
||||
0x04b8 0x0001 no-reattach unidir
|
||||
|
||||
# Seiko Epson Corp. Stylus Color 670, https://bugs.launchpad.net/bugs/872483
|
||||
# Seiko Epson Corp. Stylus Color 670 (https://bugs.launchpad.net/bugs/872483)
|
||||
0x04b8 0x0005 no-reattach
|
||||
|
||||
# Seiko Epson Receipt Printer M129C
|
||||
0x04b8 0x0202 vendor-class
|
||||
|
||||
# Prolific Technology, Inc. PL2305 Parallel Port (USB -> Parallel adapter), https://bugs.launchpad.net/bugs/987485
|
||||
# Prolific Technology, Inc. PL2305 Parallel Port (USB -> Parallel adapter) (https://bugs.launchpad.net/bugs/987485)
|
||||
0x067b 0x2305 no-reattach soft-reset unidir
|
||||
|
||||
# Xerox Phaser 3124 https://bugzilla.redhat.com/show_bug.cgi?id=867392
|
||||
@@ -121,13 +121,13 @@
|
||||
# Xerox WorkCentre 3210 https://bugs.launchpad.net/bugs/1102470
|
||||
0x0924 0x4293 no-reattach
|
||||
|
||||
# QinHeng Electronics CH340S (USB -> Parallel adapter), https://bugs.launchpad.net/bugs/1000253
|
||||
# QinHeng Electronics CH340S (USB -> Parallel adapter) (https://bugs.launchpad.net/bugs/1000253)
|
||||
0x1a86 0x7584 no-reattach
|
||||
|
||||
# All Samsung devices, https://bugs.launchpad.net/bugs/1032456
|
||||
# All Samsung devices (https://bugs.launchpad.net/bugs/1032456)
|
||||
0x04e8 soft-reset
|
||||
|
||||
# All Zebra devices, https://bugs.launchpad.net/bugs/1001028
|
||||
# All Zebra devices (https://bugs.launchpad.net/bugs/1001028)
|
||||
0x0a5f unidir
|
||||
|
||||
# Canon CP-10
|
||||
@@ -217,27 +217,33 @@
|
||||
# Lexmark E238 (<rdar://problem/14493054>)
|
||||
0x043d 0x00d7 no-reattach
|
||||
|
||||
# Lexmark E238 (STR #4448)
|
||||
# Lexmark E238 (Issue #4448)
|
||||
0x043d 0x009a no-reattach
|
||||
|
||||
# Canon MX310 (STR #4482)
|
||||
# Canon MX310 (Issue #4482)
|
||||
0x04a9 0x1728 unidir
|
||||
|
||||
# Canon MX320 (STR #4482)
|
||||
# Canon MX320 (Issue #4482)
|
||||
0x04A9 0x1736 unidir
|
||||
|
||||
# All Intermec devices (STR #4553)
|
||||
# All Intermec devices (Issue #4553)
|
||||
0x067e no-reattach
|
||||
|
||||
# HP LaserJet 1150 (STR #4549)
|
||||
# HP LaserJet 1150 (Issue #4549)
|
||||
0x03f0 0x0f17 delay-close
|
||||
|
||||
# HP LaserJet 1300 (STR #4549)
|
||||
# HP LaserJet 1300 (Issue #4549)
|
||||
0x03f0 0x1017 delay-close
|
||||
0x03f0 0x1117 delay-close
|
||||
|
||||
# HP LaserJet 1320 (STR #4549)
|
||||
# HP LaserJet 1320 (Issue #4549)
|
||||
0x03f0 0x1d17 delay-close
|
||||
|
||||
# Canon, Inc. MP530 Printer
|
||||
0x04a9 0x1712 unidir
|
||||
|
||||
# Xerox WorkCentre 3220 (https://bugs.launchpad.net/bugs/1406203, Issue #4789)
|
||||
0x0924 0x4294 no-reattach
|
||||
|
||||
# Lexmark C540n (Issue #4778)
|
||||
0x043d 0x0139 no-reattach
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: runloop.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: runloop.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Common run loop APIs for CUPS backends.
|
||||
*
|
||||
@@ -528,5 +528,5 @@ backendWaitLoop(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: runloop.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: runloop.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: snmp-supplies.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: snmp-supplies.c 12227 2014-10-21 13:42:04Z msweet $"
|
||||
*
|
||||
* SNMP supplies functions for CUPS.
|
||||
*
|
||||
* Copyright 2008-2015 by Apple Inc.
|
||||
* Copyright 2008-2014 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -19,7 +19,6 @@
|
||||
*/
|
||||
|
||||
#include "backend-private.h"
|
||||
#include <cups/ppd-private.h>
|
||||
#include <cups/array.h>
|
||||
|
||||
|
||||
@@ -1099,5 +1098,5 @@ utf16_to_utf8(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: snmp-supplies.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: snmp-supplies.c 12227 2014-10-21 13:42:04Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: snmp.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: snmp.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
*
|
||||
* SNMP discovery backend for CUPS.
|
||||
*
|
||||
@@ -1364,5 +1364,5 @@ update_cache(snmp_cache_t *device, /* I - Device */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: snmp.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: snmp.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: socket.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: socket.c 11907 2014-06-09 18:35:32Z msweet $"
|
||||
*
|
||||
* AppSocket backend for CUPS.
|
||||
*
|
||||
@@ -517,5 +517,5 @@ wait_bc(int device_fd, /* I - Socket */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: socket.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: socket.c 11907 2014-06-09 18:35:32Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: testbackend.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: testbackend.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
*
|
||||
* Backend test program for CUPS.
|
||||
*
|
||||
@@ -680,5 +680,5 @@ walk_cb(const char *oid, /* I - OID */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: testbackend.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: testbackend.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: usb-darwin.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: usb-darwin.c 12928 2015-10-23 21:31:58Z msweet $"
|
||||
*
|
||||
* Copyright 2005-2015 Apple Inc. All rights reserved.
|
||||
*
|
||||
@@ -63,7 +63,6 @@
|
||||
#include <cups/file-private.h>
|
||||
#include <cups/sidechannel.h>
|
||||
#include <cups/language-private.h>
|
||||
#include <cups/ppd-private.h>
|
||||
#include "backend-private.h"
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <IOKit/usb/IOUSBLib.h>
|
||||
@@ -2538,5 +2537,5 @@ log_usb_class_driver(int is_64bit) /* I - Is the USB class driver 64-bit? */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: usb-darwin.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: usb-darwin.c 12928 2015-10-23 21:31:58Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: usb-libusb.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: usb-libusb.c 12881 2015-09-15 21:20:02Z msweet $"
|
||||
*
|
||||
* LIBUSB interface code for CUPS.
|
||||
*
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <libusb.h>
|
||||
#include <cups/cups-private.h>
|
||||
#include <cups/ppd-private.h>
|
||||
#include <cups/dir.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/select.h>
|
||||
@@ -2022,6 +2021,6 @@ soft_reset_printer(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: usb-libusb.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: usb-libusb.c 12881 2015-09-15 21:20:02Z msweet $".
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: usb-unix.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: usb-unix.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
*
|
||||
* USB port backend for CUPS.
|
||||
*
|
||||
@@ -603,5 +603,5 @@ side_cb(int print_fd, /* I - Print file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: usb-unix.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: usb-unix.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -3,23 +3,26 @@ lpc.o: lpc.c ../cups/cups-private.h ../cups/string-private.h ../config.h \
|
||||
../cups/array.h ../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h
|
||||
lpq.o: lpq.c ../cups/cups-private.h ../cups/string-private.h ../config.h \
|
||||
../cups/debug-private.h ../cups/versioning.h ../cups/array-private.h \
|
||||
../cups/array.h ../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h
|
||||
lpr.o: lpr.c ../cups/cups-private.h ../cups/string-private.h ../config.h \
|
||||
../cups/debug-private.h ../cups/versioning.h ../cups/array-private.h \
|
||||
../cups/array.h ../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h
|
||||
lprm.o: lprm.c ../cups/cups-private.h ../cups/string-private.h \
|
||||
../config.h ../cups/debug-private.h ../cups/versioning.h \
|
||||
../cups/array-private.h ../cups/array.h ../cups/ipp-private.h \
|
||||
../cups/ipp.h ../cups/http.h ../cups/http-private.h ../cups/language.h \
|
||||
../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \
|
||||
../cups/pwg-private.h ../cups/cups.h ../cups/file.h ../cups/pwg.h \
|
||||
../cups/thread-private.h
|
||||
../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: lpc.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: lpc.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* "lpc" command for CUPS.
|
||||
*
|
||||
@@ -438,5 +438,5 @@ show_status(http_t *http, /* I - HTTP connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: lpc.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: lpc.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: lpq.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: lpq.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* "lpq" command for CUPS.
|
||||
*
|
||||
@@ -641,5 +641,5 @@ usage(void)
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: lpq.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: lpq.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: lpr.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: lpr.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* "lpr" command for CUPS.
|
||||
*
|
||||
@@ -432,5 +432,5 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: lpr.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: lpr.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -35,9 +35,7 @@ admin.o: admin.c cgi-private.h cgi.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/language.h ../cups/pwg.h help-index.h ../cups/debug-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h \
|
||||
../cups/string-private.h ../config.h ../cups/ipp-private.h \
|
||||
../cups/http-private.h ../cups/md5-private.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/raster.h ../cups/pwg-private.h \
|
||||
../cups/adminutil.h
|
||||
../cups/adminutil.h ../cups/ppd.h
|
||||
classes.o: classes.c cgi-private.h cgi.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \
|
||||
../cups/language.h ../cups/pwg.h help-index.h ../cups/debug-private.h \
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makefile 11984 2014-07-02 13:16:59Z msweet $"
|
||||
# "$Id: Makefile 12519 2015-02-17 13:10:19Z msweet $"
|
||||
#
|
||||
# CGI makefile for CUPS.
|
||||
#
|
||||
@@ -353,5 +353,5 @@ include Dependencies
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 11984 2014-07-02 13:16:59Z msweet $".
|
||||
# End of "$Id: Makefile 12519 2015-02-17 13:10:19Z msweet $".
|
||||
#
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: admin.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: admin.c 12516 2015-02-12 20:18:11Z msweet $"
|
||||
*
|
||||
* Administration CGI for CUPS.
|
||||
*
|
||||
@@ -4277,5 +4277,5 @@ get_printer_ppd(const char *uri, /* I - Printer URI */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: admin.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: admin.c 12516 2015-02-12 20:18:11Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: classes.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: classes.c 11928 2014-06-13 00:08:32Z msweet $"
|
||||
*
|
||||
* Class status CGI for CUPS.
|
||||
*
|
||||
@@ -546,5 +546,5 @@ show_class(http_t *http, /* I - Connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: classes.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: classes.c 11928 2014-06-13 00:08:32Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: help-index.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: help-index.c 12644 2015-05-19 21:22:35Z msweet $"
|
||||
*
|
||||
* Online help index routines for CUPS.
|
||||
*
|
||||
@@ -1306,5 +1306,5 @@ help_sort_words(help_word_t *w1, /* I - Second word */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: help-index.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: help-index.c 12644 2015-05-19 21:22:35Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp-var.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: ipp-var.c 12768 2015-06-30 16:13:38Z msweet $"
|
||||
*
|
||||
* CGI <-> IPP variable routines for CUPS.
|
||||
*
|
||||
@@ -1550,5 +1550,5 @@ cgiText(const char *message) /* I - Message */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp-var.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: ipp-var.c 12768 2015-06-30 16:13:38Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: jobs.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: jobs.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Job status CGI for CUPS.
|
||||
*
|
||||
@@ -204,5 +204,5 @@ do_job_op(http_t *http, /* I - HTTP connection */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: jobs.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: jobs.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: printers.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: printers.c 11928 2014-06-13 00:08:32Z msweet $"
|
||||
*
|
||||
* Printer status CGI for CUPS.
|
||||
*
|
||||
@@ -566,5 +566,5 @@ show_printer(http_t *http, /* I - Connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: printers.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: printers.c 11928 2014-06-13 00:08:32Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: search.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: search.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Search routines for CUPS.
|
||||
*
|
||||
@@ -371,5 +371,5 @@ cgiFreeSearch(void *search) /* I - Search context */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: search.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: search.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: template.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: template.c 12700 2015-06-08 18:32:35Z msweet $"
|
||||
*
|
||||
* CGI template function.
|
||||
*
|
||||
@@ -686,5 +686,5 @@ cgi_puturi(const char *s, /* I - String to output */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: template.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: template.c 12700 2015-06-08 18:32:35Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: testcgi.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: testcgi.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* CGI test program for CUPS.
|
||||
*
|
||||
@@ -65,5 +65,5 @@ main(void)
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: testcgi.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: testcgi.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: var.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: var.c 12621 2015-05-06 21:32:18Z msweet $"
|
||||
*
|
||||
* CGI form variable and array functions for CUPS.
|
||||
*
|
||||
@@ -1297,5 +1297,5 @@ cgi_unlink_file(void)
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: var.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: var.c 12621 2015-05-06 21:32:18Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makefile 13138 2016-03-15 14:59:54Z msweet $"
|
||||
# "$Id: Makefile 12533 2015-02-27 12:30:26Z msweet $"
|
||||
#
|
||||
# Configuration file makefile for CUPS.
|
||||
#
|
||||
@@ -139,5 +139,5 @@ uninstall:
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 13138 2016-03-15 14:59:54Z msweet $".
|
||||
# End of "$Id: Makefile 12533 2015-02-27 12:30:26Z msweet $".
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-common.m4 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl "$Id: cups-common.m4 12852 2015-08-28 13:29:21Z msweet $"
|
||||
dnl
|
||||
dnl Common configuration stuff for CUPS.
|
||||
dnl
|
||||
@@ -474,5 +474,5 @@ esac
|
||||
AC_SUBST(BUILDDIRS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-common.m4 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl End of "$Id: cups-common.m4 12852 2015-08-28 13:29:21Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-compiler.m4 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl "$Id: cups-compiler.m4 12742 2015-06-23 14:48:53Z msweet $"
|
||||
dnl
|
||||
dnl Compiler stuff for CUPS.
|
||||
dnl
|
||||
@@ -246,5 +246,5 @@ case $uname in
|
||||
esac
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-compiler.m4 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl End of "$Id: cups-compiler.m4 12742 2015-06-23 14:48:53Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-defaults.m4 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl "$Id: cups-defaults.m4 12846 2015-08-26 18:26:22Z msweet $"
|
||||
dnl
|
||||
dnl Default cupsd configuration settings for CUPS.
|
||||
dnl
|
||||
@@ -409,5 +409,5 @@ AC_SUBST(CUPS_WEBIF)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_WEBIF, $CUPS_DEFAULT_WEBIF)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-defaults.m4 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl End of "$Id: cups-defaults.m4 12846 2015-08-26 18:26:22Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-directories.m4 11984 2014-07-02 13:16:59Z msweet $"
|
||||
dnl "$Id: cups-directories.m4 11717 2014-03-21 16:42:53Z msweet $"
|
||||
dnl
|
||||
dnl Directory stuff for CUPS.
|
||||
dnl
|
||||
@@ -305,5 +305,5 @@ AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR")
|
||||
AC_SUBST(CUPS_STATEDIR)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-directories.m4 11984 2014-07-02 13:16:59Z msweet $".
|
||||
dnl End of "$Id: cups-directories.m4 11717 2014-03-21 16:42:53Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-dnssd.m4 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl "$Id: cups-dnssd.m4 12845 2015-08-26 18:23:53Z msweet $"
|
||||
dnl
|
||||
dnl DNS Service Discovery (aka Bonjour) stuff for CUPS.
|
||||
dnl
|
||||
@@ -82,5 +82,5 @@ AC_SUBST(IPPFIND_BIN)
|
||||
AC_SUBST(IPPFIND_MAN)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-dnssd.m4 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl End of "$Id: cups-dnssd.m4 12845 2015-08-26 18:23:53Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-gssapi.m4 11984 2014-07-02 13:16:59Z msweet $"
|
||||
dnl "$Id: cups-gssapi.m4 11911 2014-06-10 13:54:53Z msweet $"
|
||||
dnl
|
||||
dnl GSSAPI/Kerberos library detection for CUPS.
|
||||
dnl
|
||||
@@ -129,5 +129,5 @@ AC_SUBST(CUPS_DEFAULT_GSSSERVICENAME)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GSSSERVICENAME, "$CUPS_DEFAULT_GSSSERVICENAME")
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-gssapi.m4 11984 2014-07-02 13:16:59Z msweet $".
|
||||
dnl End of "$Id: cups-gssapi.m4 11911 2014-06-10 13:54:53Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-network.m4 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl "$Id: cups-network.m4 12324 2014-12-09 20:28:39Z msweet $"
|
||||
dnl
|
||||
dnl Networking stuff for CUPS.
|
||||
dnl
|
||||
@@ -72,5 +72,5 @@ AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
|
||||
AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-network.m4 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl End of "$Id: cups-network.m4 12324 2014-12-09 20:28:39Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-ssl.m4 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl "$Id: cups-ssl.m4 12645 2015-05-20 01:20:52Z msweet $"
|
||||
dnl
|
||||
dnl TLS stuff for CUPS.
|
||||
dnl
|
||||
@@ -108,5 +108,5 @@ EXPORT_SSLLIBS="$SSLLIBS"
|
||||
AC_SUBST(EXPORT_SSLLIBS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-ssl.m4 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl End of "$Id: cups-ssl.m4 12645 2015-05-20 01:20:52Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-startup.m4 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl "$Id: cups-startup.m4 12857 2015-08-31 15:00:45Z msweet $"
|
||||
dnl
|
||||
dnl Launch-on-demand/startup stuff for CUPS.
|
||||
dnl
|
||||
@@ -188,5 +188,5 @@ fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-startup.m4 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl End of "$Id: cups-startup.m4 12857 2015-08-31 15:00:45Z msweet $".
|
||||
dnl
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: config.h.in 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: config.h.in 12687 2015-06-03 17:19:04Z msweet $"
|
||||
*
|
||||
* Configuration file for CUPS.
|
||||
*
|
||||
@@ -740,5 +740,5 @@ static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
|
||||
#endif /* !_CUPS_CONFIG_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: config.h.in 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: config.h.in 12687 2015-06-03 17:19:04Z msweet $".
|
||||
*/
|
||||
|
||||
externo
+10
-10
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.68 for CUPS 2.2svn.
|
||||
# Generated by GNU Autoconf 2.68 for CUPS 2.1.4.
|
||||
#
|
||||
# Report bugs to <https://www.cups.org/str.php>.
|
||||
#
|
||||
@@ -560,8 +560,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='CUPS'
|
||||
PACKAGE_TARNAME='cups'
|
||||
PACKAGE_VERSION='2.2svn'
|
||||
PACKAGE_STRING='CUPS 2.2svn'
|
||||
PACKAGE_VERSION='2.1.4'
|
||||
PACKAGE_STRING='CUPS 2.1.4'
|
||||
PACKAGE_BUGREPORT='https://www.cups.org/str.php'
|
||||
PACKAGE_URL='https://www.cups.org/'
|
||||
|
||||
@@ -1447,7 +1447,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures CUPS 2.2svn to adapt to many kinds of systems.
|
||||
\`configure' configures CUPS 2.1.4 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1508,7 +1508,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of CUPS 2.2svn:";;
|
||||
short | recursive ) echo "Configuration of CUPS 2.1.4:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1687,7 +1687,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
CUPS configure 2.2svn
|
||||
CUPS configure 2.1.4
|
||||
generated by GNU Autoconf 2.68
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
@@ -2151,7 +2151,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by CUPS $as_me 2.2svn, which was
|
||||
It was created by CUPS $as_me 2.1.4, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2526,7 +2526,7 @@ esac
|
||||
ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
|
||||
CUPS_VERSION="2.2svn"
|
||||
CUPS_VERSION="2.1.4"
|
||||
|
||||
case "$CUPS_VERSION" in
|
||||
*svn)
|
||||
@@ -10765,7 +10765,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by CUPS $as_me 2.2svn, which was
|
||||
This file was extended by CUPS $as_me 2.1.4, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -10828,7 +10828,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
CUPS config.status 2.2svn
|
||||
CUPS config.status 2.1.4
|
||||
configured by $0, generated by GNU Autoconf 2.68,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
dnl
|
||||
dnl "$Id: configure.ac 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl "$Id: configure.ac 13087 2016-02-12 18:53:24Z msweet $"
|
||||
dnl
|
||||
dnl Configuration script for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2015 by Apple Inc.
|
||||
dnl Copyright 2007-2016 by Apple Inc.
|
||||
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
@@ -17,7 +17,7 @@ dnl We need at least autoconf 2.60...
|
||||
AC_PREREQ(2.60)
|
||||
|
||||
dnl Package name and version...
|
||||
AC_INIT([CUPS], [2.2svn], [https://www.cups.org/str.php], [cups], [https://www.cups.org/])
|
||||
AC_INIT([CUPS], [2.1.4], [https://www.cups.org/str.php], [cups], [https://www.cups.org/])
|
||||
|
||||
sinclude(config-scripts/cups-opsys.m4)
|
||||
sinclude(config-scripts/cups-common.m4)
|
||||
@@ -95,5 +95,5 @@ AC_OUTPUT(Makedefs
|
||||
chmod +x cups-config
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: configure.ac 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl End of "$Id: configure.ac 13087 2016-02-12 18:53:24Z msweet $".
|
||||
dnl
|
||||
|
||||
+119
-112
@@ -2,67 +2,99 @@ adminutil.o: adminutil.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd.h raster.h \
|
||||
adminutil.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h adminutil.h
|
||||
array.o: array.c ../cups/cups.h file.h versioning.h ipp.h http.h array.h \
|
||||
language.h pwg.h string-private.h ../config.h debug-private.h \
|
||||
array-private.h
|
||||
attr.o: attr.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
auth.o: auth.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
backchannel.o: backchannel.c cups.h file.h versioning.h ipp.h http.h \
|
||||
array.h language.h pwg.h
|
||||
backend.o: backend.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h backend.h ppd.h raster.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h backend.h
|
||||
conflicts.o: conflicts.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
custom.o: custom.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
debug.o: debug.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
dest.o: dest.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
dest-job.o: dest-job.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
dest-localization.o: dest-localization.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h array-private.h \
|
||||
../cups/array.h ipp-private.h ../cups/ipp.h http.h http-private.h \
|
||||
../cups/language.h md5-private.h language-private.h \
|
||||
../cups/transcode.h pwg-private.h ../cups/cups.h file.h pwg.h \
|
||||
thread-private.h
|
||||
ppd-private.h ../cups/ppd.h thread-private.h
|
||||
dest-options.o: dest-options.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h array-private.h \
|
||||
../cups/array.h ipp-private.h ../cups/ipp.h http.h http-private.h \
|
||||
../cups/language.h md5-private.h language-private.h \
|
||||
../cups/transcode.h pwg-private.h ../cups/cups.h file.h pwg.h \
|
||||
thread-private.h
|
||||
ppd-private.h ../cups/ppd.h thread-private.h
|
||||
dir.o: dir.c string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h dir.h
|
||||
emit.o: emit.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
encode.o: encode.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
file.o: file.c file-private.h cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
getdevices.o: getdevices.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
getifaddrs.o: getifaddrs.c http-private.h ../config.h ../cups/language.h \
|
||||
array.h versioning.h ../cups/http.h md5-private.h ipp-private.h \
|
||||
../cups/ipp.h
|
||||
@@ -70,59 +102,73 @@ getputfile.o: getputfile.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
globals.o: globals.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
hash.o: hash.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
http.o: http.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
http-addr.o: http-addr.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
http-addrlist.o: http-addrlist.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h array-private.h \
|
||||
../cups/array.h ipp-private.h ../cups/ipp.h http.h http-private.h \
|
||||
../cups/language.h md5-private.h language-private.h \
|
||||
../cups/transcode.h pwg-private.h ../cups/cups.h file.h pwg.h \
|
||||
thread-private.h
|
||||
ppd-private.h ../cups/ppd.h thread-private.h
|
||||
http-support.o: http-support.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h array-private.h \
|
||||
../cups/array.h ipp-private.h ../cups/ipp.h http.h http-private.h \
|
||||
../cups/language.h md5-private.h language-private.h \
|
||||
../cups/transcode.h pwg-private.h ../cups/cups.h file.h pwg.h \
|
||||
thread-private.h
|
||||
ppd-private.h ../cups/ppd.h thread-private.h
|
||||
ipp.o: ipp.c cups-private.h string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h array-private.h ../cups/array.h ipp-private.h \
|
||||
../cups/ipp.h http.h http-private.h ../cups/language.h md5-private.h \
|
||||
language-private.h ../cups/transcode.h pwg-private.h ../cups/cups.h \
|
||||
file.h pwg.h thread-private.h
|
||||
file.h pwg.h ppd-private.h ../cups/ppd.h thread-private.h
|
||||
ipp-support.o: ipp-support.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
langprintf.o: langprintf.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
language.o: language.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
localize.o: localize.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
mark.o: mark.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
md5.o: md5.c md5-private.h string-private.h ../config.h
|
||||
md5passwd.o: md5passwd.c http-private.h ../config.h ../cups/language.h \
|
||||
array.h versioning.h ../cups/http.h md5-private.h ipp-private.h \
|
||||
@@ -131,138 +177,102 @@ notify.o: notify.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
options.o: options.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
page.o: page.c string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h ppd.h cups.h file.h ipp.h http.h array.h \
|
||||
language.h pwg.h
|
||||
ppd.o: ppd.c cups-private.h string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h array-private.h ../cups/array.h ipp-private.h \
|
||||
../cups/ipp.h http.h http-private.h ../cups/language.h md5-private.h \
|
||||
language-private.h ../cups/transcode.h pwg-private.h ../cups/cups.h \
|
||||
file.h pwg.h thread-private.h ppd-private.h ../cups/ppd.h raster.h
|
||||
ppd-attr.o: ppd-attr.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd-private.h \
|
||||
../cups/ppd.h raster.h
|
||||
file.h pwg.h ppd-private.h ../cups/ppd.h thread-private.h
|
||||
ppd-cache.o: ppd-cache.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd-private.h \
|
||||
../cups/ppd.h raster.h
|
||||
ppd-conflicts.o: ppd-conflicts.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h array-private.h \
|
||||
../cups/array.h ipp-private.h ../cups/ipp.h http.h http-private.h \
|
||||
../cups/language.h md5-private.h language-private.h \
|
||||
../cups/transcode.h pwg-private.h ../cups/cups.h file.h pwg.h \
|
||||
thread-private.h ppd-private.h ../cups/ppd.h raster.h
|
||||
ppd-custom.o: ppd-custom.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd-private.h \
|
||||
../cups/ppd.h raster.h
|
||||
ppd-emit.o: ppd-emit.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd.h raster.h
|
||||
ppd-localize.o: ppd-localize.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h array-private.h \
|
||||
../cups/array.h ipp-private.h ../cups/ipp.h http.h http-private.h \
|
||||
../cups/language.h md5-private.h language-private.h \
|
||||
../cups/transcode.h pwg-private.h ../cups/cups.h file.h pwg.h \
|
||||
thread-private.h ppd-private.h ../cups/ppd.h raster.h
|
||||
ppd-mark.o: ppd-mark.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd-private.h \
|
||||
../cups/ppd.h raster.h
|
||||
ppd-page.o: ppd-page.c string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h ppd.h cups.h file.h ipp.h http.h array.h \
|
||||
language.h pwg.h raster.h
|
||||
ppd-util.o: ppd-util.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd-private.h \
|
||||
../cups/ppd.h raster.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
pwg-media.o: pwg-media.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
request.o: request.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
sidechannel.o: sidechannel.c sidechannel.h versioning.h cups-private.h \
|
||||
string-private.h ../config.h debug-private.h array-private.h \
|
||||
../cups/array.h ipp-private.h ../cups/ipp.h http.h http-private.h \
|
||||
../cups/language.h md5-private.h language-private.h \
|
||||
../cups/transcode.h pwg-private.h ../cups/cups.h file.h pwg.h \
|
||||
thread-private.h
|
||||
ppd-private.h ../cups/ppd.h thread-private.h
|
||||
snmp.o: snmp.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h snmp-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h snmp-private.h
|
||||
snprintf.o: snprintf.c string-private.h ../config.h
|
||||
string.o: string.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
tempfile.o: tempfile.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
thread.o: thread.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
tls.o: tls.c cups-private.h string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h array-private.h ../cups/array.h ipp-private.h \
|
||||
../cups/ipp.h http.h http-private.h ../cups/language.h md5-private.h \
|
||||
language-private.h ../cups/transcode.h pwg-private.h ../cups/cups.h \
|
||||
file.h pwg.h thread-private.h tls-darwin.c
|
||||
file.h pwg.h ppd-private.h ../cups/ppd.h thread-private.h tls-darwin.c
|
||||
transcode.o: transcode.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
usersys.o: usersys.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
util.o: util.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
testadmin.o: testadmin.c adminutil.h cups.h file.h versioning.h ipp.h \
|
||||
http.h array.h language.h pwg.h string-private.h ../config.h
|
||||
testarray.o: testarray.c string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h array-private.h ../cups/array.h dir.h
|
||||
testcache.o: testcache.c ppd-private.h ../cups/cups.h file.h versioning.h \
|
||||
ipp.h http.h array.h language.h pwg.h ../cups/ppd.h raster.h \
|
||||
pwg-private.h file-private.h cups-private.h string-private.h \
|
||||
../config.h debug-private.h array-private.h ipp-private.h \
|
||||
http-private.h md5-private.h language-private.h ../cups/transcode.h \
|
||||
thread-private.h
|
||||
testconflicts.o: testconflicts.c cups.h file.h versioning.h ipp.h http.h \
|
||||
array.h language.h pwg.h ppd.h raster.h string-private.h ../config.h
|
||||
array.h language.h pwg.h ppd.h string-private.h ../config.h
|
||||
testcups.o: testcups.c string-private.h ../config.h cups.h file.h \
|
||||
versioning.h ipp.h http.h array.h language.h pwg.h ppd.h raster.h
|
||||
versioning.h ipp.h http.h array.h language.h pwg.h ppd.h
|
||||
testdest.o: testdest.c cups.h file.h versioning.h ipp.h http.h array.h \
|
||||
language.h pwg.h
|
||||
testfile.o: testfile.c string-private.h ../config.h debug-private.h \
|
||||
@@ -271,7 +281,8 @@ testhttp.o: testhttp.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
testi18n.o: testi18n.c string-private.h ../config.h language-private.h \
|
||||
../cups/transcode.h language.h array.h versioning.h
|
||||
testipp.o: testipp.c file.h versioning.h string-private.h ../config.h \
|
||||
@@ -280,32 +291,28 @@ testoptions.o: testoptions.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
testlang.o: testlang.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd-private.h \
|
||||
../cups/ppd.h raster.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
testppd.o: testppd.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd-private.h \
|
||||
../cups/ppd.h raster.h
|
||||
testpwg.o: testpwg.c ppd-private.h ../cups/cups.h file.h versioning.h \
|
||||
ipp.h http.h array.h language.h pwg.h ../cups/ppd.h raster.h \
|
||||
pwg-private.h file-private.h cups-private.h string-private.h \
|
||||
../config.h debug-private.h array-private.h ipp-private.h \
|
||||
http-private.h md5-private.h language-private.h ../cups/transcode.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
testpwg.o: testpwg.c ppd-private.h ../cups/cups.h file.h versioning.h \
|
||||
ipp.h http.h array.h language.h pwg.h ../cups/ppd.h pwg-private.h \
|
||||
file-private.h cups-private.h string-private.h ../config.h \
|
||||
debug-private.h array-private.h ipp-private.h http-private.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h thread-private.h
|
||||
testsnmp.o: testsnmp.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h snmp-private.h
|
||||
tlscheck.o: tlscheck.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h snmp-private.h
|
||||
|
||||
+17
-34
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# "$Id: Makefile 13138 2016-03-15 14:59:54Z msweet $"
|
||||
# "$Id: Makefile 12850 2015-08-27 19:29:06Z msweet $"
|
||||
#
|
||||
# API library Makefile for CUPS.
|
||||
#
|
||||
# Copyright 2007-2015 by Apple Inc.
|
||||
# Copyright 2007-2014 by Apple Inc.
|
||||
# Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
@@ -32,45 +32,42 @@ OPTIONS = -D_CUPS_NO_DEPRECATED=1 -D_PPD_DEPRECATED=""
|
||||
LIBOBJS = \
|
||||
adminutil.o \
|
||||
array.o \
|
||||
attr.o \
|
||||
auth.o \
|
||||
backchannel.o \
|
||||
backend.o \
|
||||
conflicts.o \
|
||||
custom.o \
|
||||
debug.o \
|
||||
dest.o \
|
||||
dest-job.o \
|
||||
dest-localization.o \
|
||||
dest-options.o \
|
||||
dir.o \
|
||||
emit.o \
|
||||
encode.o \
|
||||
file.o \
|
||||
getdevices.o \
|
||||
getifaddrs.o \
|
||||
getputfile.o \
|
||||
globals.o \
|
||||
hash.o \
|
||||
http.o \
|
||||
http-addr.o \
|
||||
http-addrlist.o \
|
||||
http-support.o \
|
||||
huffman.o \
|
||||
ipp.o \
|
||||
ipp-support.o \
|
||||
langprintf.o \
|
||||
language.o \
|
||||
localize.o \
|
||||
mark.o \
|
||||
md5.o \
|
||||
md5passwd.o \
|
||||
notify.o \
|
||||
options.o \
|
||||
page.o \
|
||||
ppd.o \
|
||||
ppd-attr.o \
|
||||
ppd-cache.o \
|
||||
ppd-conflicts.o \
|
||||
ppd-custom.o \
|
||||
ppd-emit.o \
|
||||
ppd-localize.o \
|
||||
ppd-mark.o \
|
||||
ppd-page.o \
|
||||
ppd-util.o \
|
||||
pwg-media.o \
|
||||
request.o \
|
||||
sidechannel.o \
|
||||
@@ -92,7 +89,6 @@ TESTOBJS = \
|
||||
testdest.o \
|
||||
testfile.o \
|
||||
testhttp.o \
|
||||
testhuffman.o \
|
||||
testi18n.o \
|
||||
testipp.o \
|
||||
testoptions.o \
|
||||
@@ -133,7 +129,6 @@ HEADERSPRIV = \
|
||||
debug-private.h \
|
||||
file-private.h \
|
||||
http-private.h \
|
||||
huffman-private.h \
|
||||
ipp-private.h \
|
||||
language-private.h \
|
||||
md5-private.h \
|
||||
@@ -162,7 +157,6 @@ UNITTARGETS = \
|
||||
testdest \
|
||||
testfile \
|
||||
testhttp \
|
||||
testhuffman \
|
||||
testi18n \
|
||||
testipp \
|
||||
testlang \
|
||||
@@ -326,14 +320,13 @@ libcups.so.2: $(LIBOBJS)
|
||||
|
||||
libcups.2.dylib: $(LIBOBJS) $(LIBCUPSORDER)
|
||||
echo Creating export list for $@...
|
||||
nm -gm $(LIBOBJS) 2>/dev/null | grep "__text" | grep -v weak | \
|
||||
awk '{print $$NF}' | \
|
||||
grep -v -E -e '^(_cupsConnect|_cupsCharset|_cupsEncodingName|_cupsSetDefaults|_cupsSetHTTPError|_cupsUserDefault)$$' | \
|
||||
nm $(LIBOBJS) 2>/dev/null | grep "T _" | awk '{print $$3}' | \
|
||||
grep -v -e '^(_cupsConnect|_cupsCharset|_cupsEncodingName|_cupsSetDefaults|_cupsSetHTTPError|_cupsUserDefault|_httpWait)$$' | \
|
||||
sort >t.exp
|
||||
echo Linking $@...
|
||||
$(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
|
||||
-install_name $(libdir)/$@ \
|
||||
-current_version 2.12.0 \
|
||||
-current_version 2.11.0 \
|
||||
-compatibility_version 2.0.0 \
|
||||
-exported_symbols_list t.exp \
|
||||
$(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
|
||||
@@ -349,7 +342,7 @@ libcups.2.dylib: $(LIBOBJS) $(LIBCUPSORDER)
|
||||
libcups.la: $(LIBOBJS)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) \
|
||||
-rpath $(LIBDIR) -version-info 2:12 $(LIBGSSAPI) $(SSLLIBS) \
|
||||
-rpath $(LIBDIR) -version-info 2:11 $(LIBGSSAPI) $(SSLLIBS) \
|
||||
$(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
@@ -467,18 +460,6 @@ testhttp: testhttp.o $(LIBCUPSSTATIC)
|
||||
./testhttp
|
||||
|
||||
|
||||
#
|
||||
# testhuffman (dependency on static CUPS library is intentional)
|
||||
#
|
||||
|
||||
testhuffman: testhuffman.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhuffman.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
echo Running HTTP/2 Huffman tests...
|
||||
./testhuffman
|
||||
|
||||
|
||||
#
|
||||
# testipp (dependency on static CUPS library is intentional)
|
||||
#
|
||||
@@ -608,7 +589,9 @@ apihelp:
|
||||
mxmldoc --section "Programming" --title "PPD API (DEPRECATED)" \
|
||||
--css ../doc/cups-printable.css \
|
||||
--header api-ppd.header --intro api-ppd.shtml \
|
||||
api-ppd.xml ppd.h ppd-*.c >../doc/help/api-ppd.html
|
||||
api-ppd.xml \
|
||||
ppd.h attr.c conflicts.c custom.c emit.c localize.c mark.c page.c \
|
||||
ppd.c >../doc/help/api-ppd.html
|
||||
mxmldoc --tokens help/api-ppd.html api-ppd.xml >../doc/help/api-ppd.tokens
|
||||
$(RM) api-ppd.xml
|
||||
mxmldoc --section "Programming" --title "HTTP and IPP APIs" \
|
||||
@@ -695,5 +678,5 @@ tls.o: tls-darwin.c tls-gnutls.c tls-sspi.c
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 13138 2016-03-15 14:59:54Z msweet $".
|
||||
# End of "$Id: Makefile 12850 2015-08-27 19:29:06Z msweet $".
|
||||
#
|
||||
|
||||
+2
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: adminutil.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: adminutil.c 12945 2015-10-26 19:46:02Z msweet $"
|
||||
*
|
||||
* Administration utility API definitions for CUPS.
|
||||
*
|
||||
@@ -20,7 +20,6 @@
|
||||
*/
|
||||
|
||||
#include "cups-private.h"
|
||||
#include "ppd.h"
|
||||
#include "adminutil.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -2370,5 +2369,5 @@ write_option(cups_file_t *dstfp, /* I - PPD file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: adminutil.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: adminutil.c 12945 2015-10-26 19:46:02Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: array.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: array.c 12031 2014-07-15 19:57:59Z msweet $"
|
||||
*
|
||||
* Sorted array routines for CUPS.
|
||||
*
|
||||
@@ -1330,5 +1330,5 @@ cups_array_find(cups_array_t *a, /* I - Array */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: array.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: array.c 12031 2014-07-15 19:57:59Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ppd-attr.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: attr.c 12867 2015-09-13 23:49:19Z msweet $"
|
||||
*
|
||||
* PPD model-specific attribute routines for CUPS.
|
||||
*
|
||||
@@ -317,5 +317,5 @@ _ppdNormalizeMakeAndModel(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ppd-attr.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: attr.c 12867 2015-09-13 23:49:19Z msweet $".
|
||||
*/
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: auth.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: auth.c 12619 2015-05-06 21:00:19Z msweet $"
|
||||
*
|
||||
* Authentication functions for CUPS.
|
||||
*
|
||||
@@ -876,5 +876,5 @@ cups_local_auth(http_t *http) /* I - HTTP connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: auth.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: auth.c 12619 2015-05-06 21:00:19Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: backchannel.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: backchannel.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Backchannel functions for CUPS.
|
||||
*
|
||||
@@ -189,5 +189,5 @@ cups_setup(fd_set *set, /* I - Set for select() */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: backchannel.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: backchannel.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+17
-12
@@ -1,18 +1,24 @@
|
||||
/*
|
||||
* "$Id: backend.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: backend.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* Backend functions for CUPS.
|
||||
* Backend functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 2006 by Easy Software Products.
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* cupsBackendDeviceURI() - Get the device URI for a backend.
|
||||
* cupsBackendReport() - Write a device line from a backend.
|
||||
* quote_string() - Write a quoted string to stdout, escaping \ and ".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -21,7 +27,6 @@
|
||||
|
||||
#include "cups-private.h"
|
||||
#include "backend.h"
|
||||
#include "ppd.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -145,5 +150,5 @@ quote_string(const char *s) /* I - String to write */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: backend.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: backend.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ppd-conflicts.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: conflicts.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Option conflict management routines for CUPS.
|
||||
* Option marking routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -1196,5 +1196,5 @@ ppd_test_constraints(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ppd-conflicts.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: conflicts.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
+10
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: cups-private.h 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: cups-private.h 12441 2015-01-29 14:42:32Z msweet $"
|
||||
*
|
||||
* Private definitions for CUPS.
|
||||
*
|
||||
@@ -29,6 +29,7 @@
|
||||
# include "http-private.h"
|
||||
# include "language-private.h"
|
||||
# include "pwg-private.h"
|
||||
# include "ppd-private.h"
|
||||
# include "thread-private.h"
|
||||
# include <cups/cups.h>
|
||||
# ifdef __APPLE__
|
||||
@@ -121,6 +122,11 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
|
||||
char language[32]; /* Cached language */
|
||||
# endif /* __APPLE__ */
|
||||
|
||||
/* ppd.c */
|
||||
ppd_status_t ppd_status; /* Status of last ppdOpen*() */
|
||||
int ppd_line; /* Current line number */
|
||||
ppd_conform_t ppd_conform; /* Level of conformance required */
|
||||
|
||||
/* pwg-media.c */
|
||||
cups_array_t *leg_size_lut, /* Lookup table for legacy names */
|
||||
*ppd_size_lut, /* Lookup table for PPD names */
|
||||
@@ -167,6 +173,8 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
|
||||
/* util.c */
|
||||
char def_printer[256];
|
||||
/* Default printer */
|
||||
char ppd_filename[HTTP_MAX_URI];
|
||||
/* PPD filename */
|
||||
} _cups_globals_t;
|
||||
|
||||
typedef struct _cups_media_db_s /* Media database */
|
||||
@@ -236,7 +244,6 @@ extern char *_cupsBufferGet(size_t size);
|
||||
extern void _cupsBufferRelease(char *b);
|
||||
|
||||
extern http_t *_cupsConnect(void);
|
||||
extern char *_cupsCreateDest(const char *name, const char *info, const char *device_id, const char *device_uri, char *uri, size_t urisize);
|
||||
extern int _cupsGet1284Values(const char *device_id,
|
||||
cups_option_t **values);
|
||||
extern const char *_cupsGetDestResource(cups_dest_t *dest, char *resource,
|
||||
@@ -274,5 +281,5 @@ extern char *_cupsUserDefault(char *name, size_t namesize);
|
||||
#endif /* !_CUPS_CUPS_PRIVATE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: cups-private.h 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: cups-private.h 12441 2015-01-29 14:42:32Z msweet $".
|
||||
*/
|
||||
|
||||
+23
-10
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: cups.h 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: cups.h 13087 2016-02-12 18:53:24Z msweet $"
|
||||
*
|
||||
* API definitions for CUPS.
|
||||
*
|
||||
@@ -35,6 +35,15 @@ typedef off_t ssize_t; /* @private@ */
|
||||
# include "language.h"
|
||||
# include "pwg.h"
|
||||
|
||||
/*
|
||||
* Define _PPD_DEPRECATED to silence the warnings about PPD functions being
|
||||
* deprecated...
|
||||
*/
|
||||
|
||||
# ifndef _PPD_DEPRECATED
|
||||
# define _PPD_DEPRECATED _CUPS_DEPRECATED_1_6_MSG("Use cupsCopyDestInfo and friends instead.")
|
||||
# endif /* !_PPD_DEPRECATED */
|
||||
|
||||
|
||||
/*
|
||||
* C++ magic...
|
||||
@@ -49,10 +58,10 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define CUPS_VERSION 2.0200
|
||||
# define CUPS_VERSION 2.0104
|
||||
# define CUPS_VERSION_MAJOR 2
|
||||
# define CUPS_VERSION_MINOR 2
|
||||
# define CUPS_VERSION_PATCH 0
|
||||
# define CUPS_VERSION_MINOR 1
|
||||
# define CUPS_VERSION_PATCH 4
|
||||
|
||||
# define CUPS_BC_FD 3
|
||||
/* Back-channel file descriptor for
|
||||
@@ -241,7 +250,7 @@ enum cups_ptype_e /* Printer type/capability bit
|
||||
* @since CUPS 1.4/OS X 10.6@ */
|
||||
CUPS_PRINTER_MFP = 0x4000000, /* Printer with scanning capabilities
|
||||
* @since CUPS 1.4/OS X 10.6@ */
|
||||
CUPS_PRINTER_3D = 0x8000000, /* Printer with 3D capabilities @since CUPS 2.1@ */
|
||||
CUPS_PRINTER_3D = 0x8000000, /* 3D Printing @since CUPS 2.1@ */
|
||||
CUPS_PRINTER_OPTIONS = 0x6fffc /* ~(CLASS | REMOTE | IMPLICIT |
|
||||
* DEFAULT | FAX | REJECTING | DELETE |
|
||||
* NOT_SHARED | AUTHENTICATED |
|
||||
@@ -355,6 +364,7 @@ extern int cupsGetClasses(char ***classes) _CUPS_DEPRECATED_MSG("Use cupsGetDes
|
||||
extern const char *cupsGetDefault(void);
|
||||
extern int cupsGetJobs(cups_job_t **jobs, const char *name,
|
||||
int myjobs, int whichjobs);
|
||||
extern const char *cupsGetPPD(const char *name) _PPD_DEPRECATED;
|
||||
extern int cupsGetPrinters(char ***printers) _CUPS_DEPRECATED_MSG("Use cupsGetDests instead.");
|
||||
extern ipp_status_t cupsLastError(void);
|
||||
extern int cupsPrintFile(const char *name, const char *filename,
|
||||
@@ -412,6 +422,7 @@ extern int cupsGetDests2(http_t *http, cups_dest_t **dests)
|
||||
extern int cupsGetJobs2(http_t *http, cups_job_t **jobs,
|
||||
const char *name, int myjobs,
|
||||
int whichjobs) _CUPS_API_1_1_21;
|
||||
extern const char *cupsGetPPD2(http_t *http, const char *name) _PPD_DEPRECATED;
|
||||
extern int cupsPrintFile2(http_t *http, const char *name,
|
||||
const char *filename,
|
||||
const char *title, int num_options,
|
||||
@@ -445,6 +456,8 @@ extern cups_file_t *cupsTempFile2(char *filename, int len) _CUPS_API_1_2;
|
||||
extern ipp_t *cupsDoIORequest(http_t *http, ipp_t *request,
|
||||
const char *resource, int infile,
|
||||
int outfile) _CUPS_API_1_3;
|
||||
extern char *cupsGetServerPPD(http_t *http, const char *name)
|
||||
_CUPS_API_1_3;
|
||||
extern int cupsRemoveDest(const char *name,
|
||||
const char *instance,
|
||||
int num_dests, cups_dest_t **dests)
|
||||
@@ -472,6 +485,9 @@ extern cups_dest_t *cupsGetNamedDest(http_t *http, const char *name,
|
||||
extern const char *cupsGetPassword2(const char *prompt, http_t *http,
|
||||
const char *method,
|
||||
const char *resource) _CUPS_API_1_4;
|
||||
extern http_status_t cupsGetPPD3(http_t *http, const char *name,
|
||||
time_t *modtime, char *buffer,
|
||||
size_t bufsize) _PPD_DEPRECATED;
|
||||
extern ipp_t *cupsGetResponse(http_t *http,
|
||||
const char *resource) _CUPS_API_1_4;
|
||||
extern ssize_t cupsReadResponseData(http_t *http, char *buffer,
|
||||
@@ -596,7 +612,7 @@ extern int cupsGetDestMediaByIndex(http_t *http, cups_dest_t *dest,
|
||||
unsigned flags,
|
||||
cups_size_t *size)
|
||||
_CUPS_API_1_7;
|
||||
extern int cupsGetDestMediaCount(http_t *http, cups_dest_t *dest,
|
||||
extern int cupsGetDestMediaCount(http_t *http, cups_dest_t *dest,
|
||||
cups_dinfo_t *dinfo,
|
||||
unsigned flags) _CUPS_API_1_7;
|
||||
extern int cupsGetDestMediaDefault(http_t *http, cups_dest_t *dest,
|
||||
@@ -613,9 +629,6 @@ extern const char *cupsLocalizeDestMedia(http_t *http, cups_dest_t *dest, cups_d
|
||||
extern int cupsMakeServerCredentials(const char *path, const char *common_name, int num_alt_names, const char **alt_names, time_t expiration_date) _CUPS_API_2_0;
|
||||
extern int cupsSetServerCredentials(const char *path, const char *common_name, int auto_create) _CUPS_API_2_0;
|
||||
|
||||
/* New in CUPS 2.2 */
|
||||
extern ssize_t cupsHashData(const char *algorithm, const void *data, size_t datalen, unsigned char *hash, size_t hashsize) _CUPS_API_2_2;
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif /* __cplusplus */
|
||||
@@ -623,5 +636,5 @@ extern ssize_t cupsHashData(const char *algorithm, const void *data, size_t dat
|
||||
#endif /* !_CUPS_CUPS_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: cups.h 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: cups.h 13087 2016-02-12 18:53:24Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,27 +1,34 @@
|
||||
/*
|
||||
* "$Id: ppd-custom.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: custom.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* PPD custom option routines for CUPS.
|
||||
* PPD custom option routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* PostScript is a trademark of Adobe Systems, Inc.
|
||||
* PostScript is a trademark of Adobe Systems, Inc.
|
||||
*
|
||||
* This code and any derivative of it may be used and distributed
|
||||
* freely under the terms of the GNU General Public License when
|
||||
* used with GNU Ghostscript or its derivatives. Use of the code
|
||||
* (or any derivative of it) with software other than GNU
|
||||
* GhostScript (or its derivatives) is governed by the CUPS license
|
||||
* agreement.
|
||||
* This code and any derivative of it may be used and distributed
|
||||
* freely under the terms of the GNU General Public License when
|
||||
* used with GNU Ghostscript or its derivatives. Use of the code
|
||||
* (or any derivative of it) with software other than GNU
|
||||
* GhostScript (or its derivatives) is governed by the CUPS license
|
||||
* agreement.
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* ppdFindCustomOption() - Find a custom option.
|
||||
* ppdFindCustomParam() - Find a parameter for a custom option.
|
||||
* ppdFirstCustomParam() - Return the first parameter for a custom option.
|
||||
* ppdNextCustomParam() - Return the next parameter for a custom option.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -29,7 +36,6 @@
|
||||
*/
|
||||
|
||||
#include "cups-private.h"
|
||||
#include "ppd-private.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -112,5 +118,5 @@ ppdNextCustomParam(ppd_coption_t *opt) /* I - Custom option */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ppd-custom.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: custom.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: debug.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: debug.c 12928 2015-10-23 21:31:58Z msweet $"
|
||||
*
|
||||
* Debugging functions for CUPS.
|
||||
*
|
||||
@@ -645,5 +645,5 @@ _cups_safe_vsnprintf(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: debug.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: debug.c 12928 2015-10-23 21:31:58Z msweet $".
|
||||
*/
|
||||
|
||||
+16
-23
@@ -1,7 +1,9 @@
|
||||
/*
|
||||
* "$Id: dest-job.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Destination job support for CUPS.
|
||||
*
|
||||
* Copyright 2012-2016 by Apple Inc.
|
||||
* Copyright 2012-2014 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -24,9 +26,8 @@
|
||||
*
|
||||
* The "job_id" is the number returned by cupsCreateDestJob.
|
||||
*
|
||||
* Returns @code IPP_STATUS_OK@ on success and
|
||||
* @code IPP_STATUS_ERRPR_NOT_AUTHORIZED@ or
|
||||
* @code IPP_STATUS_ERROR_FORBIDDEN@ on failure.
|
||||
* Returns IPP_STATUS_OK on success and IPP_NOT_AUTHORIZED or IPP_FORBIDDEN on
|
||||
* failure.
|
||||
*
|
||||
* @since CUPS 1.6/OS X 10.8@
|
||||
*/
|
||||
@@ -36,26 +37,13 @@ cupsCancelDestJob(http_t *http, /* I - Connection to destination */
|
||||
cups_dest_t *dest, /* I - Destination */
|
||||
int job_id) /* I - Job ID */
|
||||
{
|
||||
cups_dinfo_t *info; /* Destination information */
|
||||
/* TODO: Needs to be implemented! */
|
||||
/* Probably also needs to be revved to accept cups_dinfo_t... */
|
||||
(void)http;
|
||||
(void)dest;
|
||||
(void)job_id;
|
||||
|
||||
|
||||
if ((info = cupsCopyDestInfo(http, dest)) != NULL)
|
||||
{
|
||||
ipp_t *request; /* Cancel-Job request */
|
||||
|
||||
request = ippNewRequest(IPP_OP_CANCEL_JOB);
|
||||
|
||||
ippSetVersion(request, info->version / 10, info->version % 10);
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, info->uri);
|
||||
ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "job-id", job_id);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, cupsUser());
|
||||
|
||||
ippDelete(cupsDoRequest(http, request, info->resource));
|
||||
cupsFreeDestInfo(info);
|
||||
}
|
||||
|
||||
return (cupsLastError());
|
||||
return (IPP_STATUS_ERROR_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
@@ -369,3 +357,8 @@ cupsStartDestDocument(
|
||||
|
||||
return (status);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dest-job.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: dest-localization.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: dest-localization.c 12094 2014-08-19 12:15:11Z msweet $"
|
||||
*
|
||||
* Destination localization support for CUPS.
|
||||
*
|
||||
@@ -535,5 +535,5 @@ cups_scan_strings(char *buffer) /* I - Start of string */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dest-localization.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: dest-localization.c 12094 2014-08-19 12:15:11Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
/*
|
||||
* "$Id: dest-options.c 11882 2014-05-16 21:02:15Z msweet $"
|
||||
*
|
||||
* Destination option/media support for CUPS.
|
||||
*
|
||||
* Copyright 2012-2016 by Apple Inc.
|
||||
* Copyright 2012-2014 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -704,7 +706,6 @@ cupsFindDestDefault(
|
||||
return (ippFindAttribute(dinfo->attrs, name, IPP_TAG_ZERO));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cupsFindDestReady()' - Find the default value(s) for the given option.
|
||||
*
|
||||
@@ -747,7 +748,6 @@ cupsFindDestReady(
|
||||
return (ippFindAttribute(dinfo->ready_attrs, name, IPP_TAG_ZERO));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cupsFindDestSupported()' - Find the default value(s) for the given option.
|
||||
*
|
||||
@@ -2267,5 +2267,5 @@ cups_update_ready(http_t *http, /* I - Connection to destination */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dest-options.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: dest-options.c 11882 2014-05-16 21:02:15Z msweet $".
|
||||
*/
|
||||
|
||||
+71
-151
@@ -1,4 +1,6 @@
|
||||
/*
|
||||
* "$Id: dest.c 13075 2016-01-29 21:14:05Z msweet $"
|
||||
*
|
||||
* User-defined destination (and option) support for CUPS.
|
||||
*
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
@@ -400,10 +402,7 @@ _cupsAppleSetDefaultPaperID(
|
||||
{
|
||||
CFPreferencesSetAppValue(kDefaultPaperIDKey, name, kCUPSPrintingPrefs);
|
||||
CFPreferencesAppSynchronize(kCUPSPrintingPrefs);
|
||||
|
||||
# ifdef HAVE_NOTIFY_POST
|
||||
notify_post("com.apple.printerPrefsChange");
|
||||
# endif /* HAVE_NOTIFY_POST */
|
||||
}
|
||||
|
||||
|
||||
@@ -491,10 +490,7 @@ _cupsAppleSetDefaultPrinter(
|
||||
CFPreferencesSetAppValue(kLastUsedPrintersKey, newlocations,
|
||||
kCUPSPrintingPrefs);
|
||||
CFPreferencesAppSynchronize(kCUPSPrintingPrefs);
|
||||
|
||||
# ifdef HAVE_NOTIFY_POST
|
||||
notify_post("com.apple.printerPrefsChange");
|
||||
# endif /* HAVE_NOTIFY_POST */
|
||||
}
|
||||
|
||||
if (newlocations)
|
||||
@@ -523,10 +519,7 @@ _cupsAppleSetUseLastPrinter(
|
||||
uselast ? kCFBooleanTrue : kCFBooleanFalse,
|
||||
kCUPSPrintingPrefs);
|
||||
CFPreferencesAppSynchronize(kCUPSPrintingPrefs);
|
||||
|
||||
# ifdef HAVE_NOTIFY_POST
|
||||
notify_post("com.apple.printerPrefsChange");
|
||||
# endif /* HAVE_NOTIFY_POST */
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
@@ -566,8 +559,6 @@ cupsConnectDest(
|
||||
http_t *http; /* Connection to server */
|
||||
|
||||
|
||||
DEBUG_printf(("cupsConnectDest(dest=%p, flags=0x%x, msec=%d, cancel=%p(%d), resource=\"%s\", resourcesize=" CUPS_LLFMT ", cb=%p, user_data=%p)", dest, flags, msec, cancel, cancel ? *cancel : -1, resource, CUPS_LLCAST resourcesize, cb, user_data));
|
||||
|
||||
/*
|
||||
* Range check input...
|
||||
*/
|
||||
@@ -591,40 +582,27 @@ cupsConnectDest(
|
||||
* Grab the printer URI...
|
||||
*/
|
||||
|
||||
if ((uri = cupsGetOption("printer-uri-supported", dest->num_options, dest->options)) == NULL)
|
||||
{
|
||||
if ((uri = cupsGetOption("resolved-device-uri", dest->num_options, dest->options)) == NULL)
|
||||
{
|
||||
if ((uri = cupsGetOption("device-uri", dest->num_options, dest->options)) != NULL)
|
||||
{
|
||||
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
|
||||
if (strstr(uri, "._tcp"))
|
||||
uri = cups_dnssd_resolve(dest, uri, msec, cancel, cb, user_data);
|
||||
}
|
||||
#endif /* HAVE_DNSSD || HAVE_AVAHI */
|
||||
}
|
||||
|
||||
if (uri)
|
||||
uri = _cupsCreateDest(dest->name, cupsGetOption("printer-info", dest->num_options, dest->options), NULL, uri, tempresource, sizeof(tempresource));
|
||||
|
||||
if (uri)
|
||||
{
|
||||
dest->num_options = cupsAddOption("printer-uri-supported", uri, dest->num_options, &dest->options);
|
||||
|
||||
uri = cupsGetOption("printer-uri-supported", dest->num_options, dest->options);
|
||||
}
|
||||
}
|
||||
|
||||
if (!uri)
|
||||
if ((uri = cupsGetOption("printer-uri-supported", dest->num_options,
|
||||
dest->options)) == NULL)
|
||||
{
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(ENOENT), 0);
|
||||
|
||||
if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR, dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR,
|
||||
dest);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
|
||||
if (strstr(uri, "._tcp"))
|
||||
{
|
||||
if ((uri = cups_dnssd_resolve(dest, uri, msec, cancel, cb,
|
||||
user_data)) == NULL)
|
||||
return (NULL);
|
||||
}
|
||||
#endif /* HAVE_DNSSD || HAVE_AVAHI */
|
||||
|
||||
if (httpSeparateURI(HTTP_URI_CODING_ALL, uri, scheme, sizeof(scheme),
|
||||
userpass, sizeof(userpass), hostname, sizeof(hostname),
|
||||
&port, resource, (int)resourcesize) < HTTP_URI_STATUS_OK)
|
||||
@@ -643,14 +621,16 @@ cupsConnectDest(
|
||||
*/
|
||||
|
||||
if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_RESOLVING, dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_RESOLVING,
|
||||
dest);
|
||||
|
||||
snprintf(portstr, sizeof(portstr), "%d", port);
|
||||
|
||||
if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portstr)) == NULL)
|
||||
{
|
||||
if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR, dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR,
|
||||
dest);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
@@ -660,7 +640,8 @@ cupsConnectDest(
|
||||
httpAddrFreeList(addrlist);
|
||||
|
||||
if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_CANCELED, dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_CANCELED,
|
||||
dest);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
@@ -674,7 +655,8 @@ cupsConnectDest(
|
||||
else
|
||||
encryption = HTTP_ENCRYPTION_IF_REQUESTED;
|
||||
|
||||
http = httpConnect2(hostname, port, addrlist, AF_UNSPEC, encryption, 1, 0, NULL);
|
||||
http = httpConnect2(hostname, port, addrlist, AF_UNSPEC, encryption, 1, 0,
|
||||
NULL);
|
||||
httpAddrFreeList(addrlist);
|
||||
|
||||
/*
|
||||
@@ -689,14 +671,17 @@ cupsConnectDest(
|
||||
else
|
||||
{
|
||||
if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_CONNECTING, dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_CONNECTING,
|
||||
dest);
|
||||
|
||||
if (!httpReconnect2(http, msec, cancel) && cb)
|
||||
{
|
||||
if (cancel && *cancel)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_CONNECTING, dest);
|
||||
(*cb)(user_data,
|
||||
CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_CONNECTING, dest);
|
||||
else
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR, dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR,
|
||||
dest);
|
||||
}
|
||||
else if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_NONE, dest);
|
||||
@@ -810,83 +795,6 @@ cupsCopyDest(cups_dest_t *dest,
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_cupsCreateDest()' - Create a local (temporary) queue.
|
||||
*/
|
||||
|
||||
char * /* O - Printer URI or @code NULL@ on error */
|
||||
_cupsCreateDest(const char *name, /* I - Printer name */
|
||||
const char *info, /* I - Printer description of @code NULL@ */
|
||||
const char *device_id, /* I - 1284 Device ID or @code NULL@ */
|
||||
const char *device_uri, /* I - Device URI */
|
||||
char *uri, /* I - Printer URI buffer */
|
||||
size_t urisize) /* I - Size of URI buffer */
|
||||
{
|
||||
http_t *http; /* Connection to server */
|
||||
ipp_t *request, /* CUPS-Create-Local-Printer request */
|
||||
*response; /* CUPS-Create-Local-Printer response */
|
||||
ipp_attribute_t *attr; /* printer-uri-supported attribute */
|
||||
ipp_pstate_t state = IPP_PSTATE_STOPPED;
|
||||
/* printer-state value */
|
||||
|
||||
|
||||
if (!name || !device_uri || !uri || urisize < 32)
|
||||
return (NULL);
|
||||
|
||||
if ((http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, HTTP_ENCRYPTION_IF_REQUESTED, 1, 30000, NULL)) == NULL)
|
||||
return (NULL);
|
||||
|
||||
request = ippNewRequest(IPP_OP_CUPS_CREATE_LOCAL_PRINTER);
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, "ipp://localhost/");
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, cupsUser());
|
||||
|
||||
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_URI, "device-uri", NULL, device_uri);
|
||||
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME, "printer-name", NULL, name);
|
||||
if (info)
|
||||
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-info", NULL, info);
|
||||
if (device_id)
|
||||
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-device-id", NULL, device_id);
|
||||
|
||||
response = cupsDoRequest(http, request, "/");
|
||||
|
||||
if ((attr = ippFindAttribute(response, "printer-uri-supported", IPP_TAG_URI)) != NULL)
|
||||
strlcpy(uri, ippGetString(attr, 0, NULL), urisize);
|
||||
else
|
||||
{
|
||||
ippDelete(response);
|
||||
httpClose(http);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if ((attr = ippFindAttribute(response, "printer-state", IPP_TAG_ENUM)) != NULL)
|
||||
state = (ipp_pstate_t)ippGetInteger(attr, 0);
|
||||
|
||||
while (state == IPP_PSTATE_STOPPED && cupsLastError() == IPP_STATUS_OK)
|
||||
{
|
||||
sleep(1);
|
||||
ippDelete(response);
|
||||
|
||||
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, cupsUser());
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", NULL, "printer-state");
|
||||
|
||||
response = cupsDoRequest(http, request, "/");
|
||||
|
||||
if ((attr = ippFindAttribute(response, "printer-state", IPP_TAG_ENUM)) != NULL)
|
||||
state = (ipp_pstate_t)ippGetInteger(attr, 0);
|
||||
}
|
||||
|
||||
ippDelete(response);
|
||||
|
||||
httpClose(http);
|
||||
|
||||
return (uri);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cupsEnumDests()' - Enumerate available destinations with a callback function.
|
||||
*
|
||||
@@ -1482,7 +1390,7 @@ cupsGetDestWithURI(const char *name, /* I - Desired printer name or @code NULL@
|
||||
}
|
||||
|
||||
dest->name = _cupsStrAlloc(name);
|
||||
dest->num_options = cupsAddOption("device-uri", uri, dest->num_options, &(dest->options));
|
||||
dest->num_options = cupsAddOption("printer-uri-supported", uri, dest->num_options, &(dest->options));
|
||||
dest->num_options = cupsAddOption("printer-info", name, dest->num_options, &(dest->options));
|
||||
|
||||
return (dest);
|
||||
@@ -3361,28 +3269,22 @@ cups_dnssd_query_cb(
|
||||
*/
|
||||
|
||||
const char *start, *next; /* Pointer into value */
|
||||
int have_pdf = 0, /* Have PDF? */
|
||||
have_raster = 0;/* Have raster format support? */
|
||||
int have_pdf = 0; /* Have PDF? */
|
||||
|
||||
for (start = value; start && *start; start = next)
|
||||
{
|
||||
if (!_cups_strncasecmp(start, "application/pdf", 15) && (!start[15] || start[15] == ','))
|
||||
if (!_cups_strncasecmp(start, "application/pdf", 15) &&
|
||||
(!start[15] || start[15] == ','))
|
||||
{
|
||||
have_pdf = 1;
|
||||
break;
|
||||
}
|
||||
else if ((!_cups_strncasecmp(start, "image/pwg-raster", 16) && (!start[16] || start[16] == ',')) ||
|
||||
(!_cups_strncasecmp(start, "image/urf", 9) && (!start[9] || start[9] == ',')))
|
||||
{
|
||||
have_raster = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((next = strchr(start, ',')) != NULL)
|
||||
next ++;
|
||||
}
|
||||
|
||||
if (!have_pdf && !have_raster)
|
||||
if (!have_pdf)
|
||||
device->state = _CUPS_DNSSD_INCOMPATIBLE;
|
||||
}
|
||||
else if (!_cups_strcasecmp(key, "printer-type"))
|
||||
@@ -3448,21 +3350,31 @@ cups_dnssd_query_cb(
|
||||
* Save the printer-xxx values...
|
||||
*/
|
||||
|
||||
device->dest.num_options = cupsAddOption("printer-info", name, device->dest.num_options, &device->dest.options);
|
||||
device->dest.num_options = cupsAddOption("printer-info", name,
|
||||
device->dest.num_options,
|
||||
&device->dest.options);
|
||||
|
||||
if (make_and_model[0])
|
||||
{
|
||||
strlcat(make_and_model, " ", sizeof(make_and_model));
|
||||
strlcat(make_and_model, model, sizeof(make_and_model));
|
||||
|
||||
device->dest.num_options = cupsAddOption("printer-make-and-model", make_and_model, device->dest.num_options, &device->dest.options);
|
||||
device->dest.num_options = cupsAddOption("printer-make-and-model",
|
||||
make_and_model,
|
||||
device->dest.num_options,
|
||||
&device->dest.options);
|
||||
}
|
||||
else
|
||||
device->dest.num_options = cupsAddOption("printer-make-and-model", model, device->dest.num_options, &device->dest.options);
|
||||
device->dest.num_options = cupsAddOption("printer-make-and-model",
|
||||
model,
|
||||
device->dest.num_options,
|
||||
&device->dest.options);
|
||||
|
||||
device->type = type;
|
||||
snprintf(value, sizeof(value), "%u", type);
|
||||
device->dest.num_options = cupsAddOption("printer-type", value, device->dest.num_options, &device->dest.options);
|
||||
device->dest.num_options = cupsAddOption("printer-type", value,
|
||||
device->dest.num_options,
|
||||
&device->dest.options);
|
||||
|
||||
/*
|
||||
* Save the URI...
|
||||
@@ -3473,9 +3385,11 @@ cups_dnssd_query_cb(
|
||||
!strcmp(device->regtype, "_ipps._tcp") ? "ipps" : "ipp",
|
||||
NULL, uriname, 0, saw_printer_type ? "/cups" : "/");
|
||||
|
||||
DEBUG_printf(("6cups_dnssd_query: device-uri=\"%s\"", uri));
|
||||
DEBUG_printf(("6cups_dnssd_query: printer-uri-supported=\"%s\"", uri));
|
||||
|
||||
device->dest.num_options = cupsAddOption("device-uri", uri, device->dest.num_options, &device->dest.options);
|
||||
device->dest.num_options = cupsAddOption("printer-uri-supported", uri,
|
||||
device->dest.num_options,
|
||||
&device->dest.options);
|
||||
}
|
||||
else
|
||||
DEBUG_printf(("6cups_dnssd_query: Ignoring TXT record for '%s'.",
|
||||
@@ -3521,14 +3435,18 @@ cups_dnssd_resolve(
|
||||
resolve.end_time.tv_sec += 75;
|
||||
|
||||
if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_RESOLVING, dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_RESOLVING,
|
||||
dest);
|
||||
|
||||
if ((uri = _httpResolveURI(uri, tempuri, sizeof(tempuri), _HTTP_RESOLVE_DEFAULT, cups_dnssd_resolve_cb, &resolve)) == NULL)
|
||||
if ((uri = _httpResolveURI(uri, tempuri, sizeof(tempuri),
|
||||
_HTTP_RESOLVE_FQDN, cups_dnssd_resolve_cb,
|
||||
&resolve)) == NULL)
|
||||
{
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Unable to resolve printer-uri."), 1);
|
||||
|
||||
if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR, dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR,
|
||||
dest);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
@@ -3537,9 +3455,11 @@ cups_dnssd_resolve(
|
||||
* Save the resolved URI...
|
||||
*/
|
||||
|
||||
dest->num_options = cupsAddOption("resolved-device-uri", uri, dest->num_options, &dest->options);
|
||||
dest->num_options = cupsAddOption("printer-uri-supported", uri,
|
||||
dest->num_options, &dest->options);
|
||||
|
||||
return (cupsGetOption("resolved-device-uri", dest->num_options, dest->options));
|
||||
return (cupsGetOption("printer-uri-supported", dest->num_options,
|
||||
dest->options));
|
||||
}
|
||||
|
||||
|
||||
@@ -3559,11 +3479,8 @@ cups_dnssd_resolve_cb(void *context) /* I - Resolve data */
|
||||
* If the cancel variable is set, return immediately.
|
||||
*/
|
||||
|
||||
if (resolve->cancel && *(resolve->cancel))
|
||||
{
|
||||
DEBUG_puts("4cups_dnssd_resolve_cb: Canceled.");
|
||||
if (*resolve->cancel)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Otherwise check the end time...
|
||||
@@ -3571,11 +3488,9 @@ cups_dnssd_resolve_cb(void *context) /* I - Resolve data */
|
||||
|
||||
gettimeofday(&curtime, NULL);
|
||||
|
||||
DEBUG_printf(("4cups_dnssd_resolve_cb: curtime=%d.%06d, end_time=%d.%06d", (int)curtime.tv_sec, (int)curtime.tv_usec, (int)resolve->end_time.tv_sec, (int)resolve->end_time.tv_usec));
|
||||
|
||||
return (curtime.tv_sec < resolve->end_time.tv_sec ||
|
||||
return (curtime.tv_sec > resolve->end_time.tv_sec ||
|
||||
(curtime.tv_sec == resolve->end_time.tv_sec &&
|
||||
curtime.tv_usec < resolve->end_time.tv_usec));
|
||||
curtime.tv_usec > resolve->end_time.tv_usec));
|
||||
}
|
||||
|
||||
|
||||
@@ -4024,3 +3939,8 @@ cups_make_string(
|
||||
|
||||
return (buffer);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dest.c 13075 2016-01-29 21:14:05Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ppd-emit.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: emit.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
*
|
||||
* PPD code emission routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -22,7 +22,6 @@
|
||||
*/
|
||||
|
||||
#include "cups-private.h"
|
||||
#include "ppd.h"
|
||||
#if defined(WIN32) || defined(__EMX__)
|
||||
# include <io.h>
|
||||
#else
|
||||
@@ -1203,5 +1202,5 @@ ppd_handle_media(ppd_file_t *ppd) /* I - PPD file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ppd-emit.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: emit.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
*/
|
||||
+2
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: encode.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: encode.c 13064 2016-01-27 16:05:09Z msweet $"
|
||||
*
|
||||
* Option encoding routines for CUPS.
|
||||
*
|
||||
@@ -281,7 +281,6 @@ static const _ipp_option_t ipp_options[] =
|
||||
{ 0, "printer-info", IPP_TAG_TEXT, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-is-accepting-jobs", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-is-shared", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-is-temporary", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-location", IPP_TAG_TEXT, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-make-and-model", IPP_TAG_TEXT, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-more-info", IPP_TAG_URI, IPP_TAG_PRINTER },
|
||||
@@ -854,5 +853,5 @@ compare_ipp_options(_ipp_option_t *a, /* I - First option */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: encode.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: encode.c 13064 2016-01-27 16:05:09Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: file-private.h 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: file-private.h 11627 2014-02-20 16:15:09Z msweet $"
|
||||
*
|
||||
* Private file definitions for CUPS.
|
||||
*
|
||||
@@ -135,5 +135,5 @@ extern void _cupsFileCheckFilter(void *context,
|
||||
#endif /* !_CUPS_FILE_PRIVATE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: file-private.h 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: file-private.h 11627 2014-02-20 16:15:09Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: file.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: file.c 12641 2015-05-19 15:04:39Z msweet $"
|
||||
*
|
||||
* File functions for CUPS.
|
||||
*
|
||||
@@ -2752,5 +2752,5 @@ cups_write(cups_file_t *fp, /* I - CUPS file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: file.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: file.c 12641 2015-05-19 15:04:39Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: file.h 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: file.h 11627 2014-02-20 16:15:09Z msweet $"
|
||||
*
|
||||
* Public file definitions for CUPS.
|
||||
*
|
||||
@@ -114,5 +114,5 @@ extern ssize_t cupsFileWrite(cups_file_t *fp, const char *buf,
|
||||
#endif /* !_CUPS_FILE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: file.h 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: file.h 11627 2014-02-20 16:15:09Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: getputfile.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: getputfile.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Get/put file functions for CUPS.
|
||||
*
|
||||
@@ -511,5 +511,5 @@ cupsPutFile(http_t *http, /* I - Connection to server or @code CUPS_HTTP_DE
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: getputfile.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: getputfile.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+23
-11
@@ -1,18 +1,29 @@
|
||||
/*
|
||||
* "$Id: globals.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: globals.c 12480 2015-02-03 12:36:34Z msweet $"
|
||||
*
|
||||
* Global variable access routines for CUPS.
|
||||
* Global variable access routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* _cupsGlobalLock() - Lock the global mutex.
|
||||
* _cupsGlobals() - Return a pointer to thread local storage
|
||||
* _cupsGlobalUnlock() - Unlock the global mutex.
|
||||
* DllMain() - Main entry for library.
|
||||
* cups_fix_path() - Fix a file path to use forward slashes consistently.
|
||||
* cups_globals_alloc() - Allocate and initialize global data.
|
||||
* cups_globals_free() - Free global data.
|
||||
* cups_globals_init() - Initialize environment variables.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -26,6 +37,7 @@
|
||||
* Local globals...
|
||||
*/
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
static int cups_global_index = 0;
|
||||
/* Next thread number */
|
||||
@@ -382,5 +394,5 @@ cups_globals_init(void)
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: globals.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: globals.c 12480 2015-02-03 12:36:34Z msweet $".
|
||||
*/
|
||||
|
||||
-252
@@ -1,252 +0,0 @@
|
||||
/*
|
||||
* "$Id: hash.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Hashing function for CUPS.
|
||||
*
|
||||
* Copyright 2015 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include necessary headers...
|
||||
*/
|
||||
|
||||
#include "cups-private.h"
|
||||
#ifdef __APPLE__
|
||||
# include <CommonCrypto/CommonDigest.h>
|
||||
#elif defined(HAVE_GNUTLS)
|
||||
# include <gnutls/crypto.h>
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
|
||||
/*
|
||||
* 'cupsHashData()' - Perform a hash function on the given data.
|
||||
*
|
||||
* The "algorithm" argument can be any of the registered, non-deprecated IPP
|
||||
* hash algorithms for the "job-password-encryption" attribute, including
|
||||
* "sha" for SHA-1, "sha-256" for SHA2-256, etc.
|
||||
*
|
||||
* The "hash" argument points to a buffer of "hashsize" bytes and should be at
|
||||
* least 64 bytes in length for all of the supported algorithms.
|
||||
*
|
||||
* The returned hash is binary data.
|
||||
*
|
||||
* @since CUPS 2.2@
|
||||
*/
|
||||
|
||||
ssize_t /* O - Size of hash or -1 on error */
|
||||
cupsHashData(const char *algorithm, /* I - Algorithm name */
|
||||
const void *data, /* I - Data to hash */
|
||||
size_t datalen, /* I - Length of data to hash */
|
||||
unsigned char *hash, /* I - Hash buffer */
|
||||
size_t hashsize) /* I - Size of hash buffer */
|
||||
{
|
||||
if (!algorithm || !data || datalen == 0 || !hash || hashsize == 0)
|
||||
{
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Bad arguments to function"), 1);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
if (strcmp(algorithm, "sha"))
|
||||
{
|
||||
/*
|
||||
* SHA-1...
|
||||
*/
|
||||
|
||||
CC_SHA1_CTX ctx; /* SHA-1 context */
|
||||
|
||||
if (hashsize < CC_SHA1_DIGEST_LENGTH)
|
||||
goto too_small;
|
||||
|
||||
CC_SHA1_Init(&ctx);
|
||||
CC_SHA1_Update(&ctx, data, (CC_LONG)datalen);
|
||||
CC_SHA1_Final(hash, &ctx);
|
||||
|
||||
return (CC_SHA1_DIGEST_LENGTH);
|
||||
}
|
||||
else if (strcmp(algorithm, "sha2-224"))
|
||||
{
|
||||
CC_SHA256_CTX ctx; /* SHA-224 context */
|
||||
|
||||
if (hashsize < CC_SHA224_DIGEST_LENGTH)
|
||||
goto too_small;
|
||||
|
||||
CC_SHA224_Init(&ctx);
|
||||
CC_SHA224_Update(&ctx, data, (CC_LONG)datalen);
|
||||
CC_SHA224_Final(hash, &ctx);
|
||||
|
||||
return (CC_SHA224_DIGEST_LENGTH);
|
||||
}
|
||||
else if (strcmp(algorithm, "sha2-256"))
|
||||
{
|
||||
CC_SHA256_CTX ctx; /* SHA-256 context */
|
||||
|
||||
if (hashsize < CC_SHA256_DIGEST_LENGTH)
|
||||
goto too_small;
|
||||
|
||||
CC_SHA256_Init(&ctx);
|
||||
CC_SHA256_Update(&ctx, data, (CC_LONG)datalen);
|
||||
CC_SHA256_Final(hash, &ctx);
|
||||
|
||||
return (CC_SHA256_DIGEST_LENGTH);
|
||||
}
|
||||
else if (strcmp(algorithm, "sha2-384"))
|
||||
{
|
||||
CC_SHA512_CTX ctx; /* SHA-384 context */
|
||||
|
||||
if (hashsize < CC_SHA384_DIGEST_LENGTH)
|
||||
goto too_small;
|
||||
|
||||
CC_SHA384_Init(&ctx);
|
||||
CC_SHA384_Update(&ctx, data, (CC_LONG)datalen);
|
||||
CC_SHA384_Final(hash, &ctx);
|
||||
|
||||
return (CC_SHA384_DIGEST_LENGTH);
|
||||
}
|
||||
else if (strcmp(algorithm, "sha2-512"))
|
||||
{
|
||||
CC_SHA512_CTX ctx; /* SHA-512 context */
|
||||
|
||||
if (hashsize < CC_SHA512_DIGEST_LENGTH)
|
||||
goto too_small;
|
||||
|
||||
CC_SHA512_Init(&ctx);
|
||||
CC_SHA512_Update(&ctx, data, (CC_LONG)datalen);
|
||||
CC_SHA512_Final(hash, &ctx);
|
||||
|
||||
return (CC_SHA512_DIGEST_LENGTH);
|
||||
}
|
||||
else if (strcmp(algorithm, "sha2-512_224"))
|
||||
{
|
||||
CC_SHA512_CTX ctx; /* SHA-512 context */
|
||||
unsigned char temp[CC_SHA512_DIGEST_LENGTH];
|
||||
/* SHA-512 hash */
|
||||
|
||||
/*
|
||||
* SHA2-512 truncated to 224 bits (28 bytes)...
|
||||
*/
|
||||
|
||||
if (hashsize < CC_SHA224_DIGEST_LENGTH)
|
||||
goto too_small;
|
||||
|
||||
CC_SHA512_Init(&ctx);
|
||||
CC_SHA512_Update(&ctx, data, (CC_LONG)datalen);
|
||||
CC_SHA512_Final(temp, &ctx);
|
||||
|
||||
memcpy(hash, temp, CC_SHA224_DIGEST_LENGTH);
|
||||
|
||||
return (CC_SHA224_DIGEST_LENGTH);
|
||||
}
|
||||
else if (strcmp(algorithm, "sha2-512_256"))
|
||||
{
|
||||
CC_SHA512_CTX ctx; /* SHA-512 context */
|
||||
unsigned char temp[CC_SHA512_DIGEST_LENGTH];
|
||||
/* SHA-512 hash */
|
||||
|
||||
/*
|
||||
* SHA2-512 truncated to 256 bits (32 bytes)...
|
||||
*/
|
||||
|
||||
if (hashsize < CC_SHA256_DIGEST_LENGTH)
|
||||
goto too_small;
|
||||
|
||||
CC_SHA512_Init(&ctx);
|
||||
CC_SHA512_Update(&ctx, data, (CC_LONG)datalen);
|
||||
CC_SHA512_Final(temp, &ctx);
|
||||
|
||||
memcpy(hash, temp, CC_SHA256_DIGEST_LENGTH);
|
||||
|
||||
return (CC_SHA256_DIGEST_LENGTH);
|
||||
}
|
||||
|
||||
#elif defined(HAVE_GNUTLS)
|
||||
gnutls_digest_algorithm_t alg = GNUTLS_DIG_UNKNOWN;
|
||||
/* Algorithm */
|
||||
unsigned char temp[64]; /* Temporary hash buffer */
|
||||
size_t tempsize = 0; /* Truncate to this size? */
|
||||
|
||||
if (strcmp(algorithm, "sha"))
|
||||
alg = GNUTLS_DIG_SHA1;
|
||||
else if (strcmp(algorithm, "sha2-224"))
|
||||
alg = GNUTLS_DIG_SHA224;
|
||||
else if (strcmp(algorithm, "sha2-256"))
|
||||
alg = GNUTLS_DIG_SHA256;
|
||||
else if (strcmp(algorithm, "sha2-384"))
|
||||
alg = GNUTLS_DIG_SHA384;
|
||||
else if (strcmp(algorithm, "sha2-512"))
|
||||
alg = GNUTLS_DIG_SHA512;
|
||||
else if (strcmp(algorithm, "sha2-512_224"))
|
||||
{
|
||||
alg = GNUTLS_DIG_SHA512;
|
||||
tempsize = 28;
|
||||
}
|
||||
else if (strcmp(algorithm, "sha2-512_256"))
|
||||
{
|
||||
alg = GNUTLS_DIG_SHA512;
|
||||
tempsize = 32;
|
||||
}
|
||||
|
||||
if (alg != GNUTLS_DIG_UNKNOWN)
|
||||
{
|
||||
if (tempsize > 0)
|
||||
{
|
||||
/*
|
||||
* Truncate result to tempsize bytes...
|
||||
*/
|
||||
|
||||
if (hashsize < tempsize)
|
||||
goto too_small;
|
||||
|
||||
gnutls_hash_fast(alg, data, datalen, temp);
|
||||
memcpy(hash, temp, tempsize);
|
||||
|
||||
return ((ssize_t)tempsize);
|
||||
}
|
||||
|
||||
if (hashsize < gnutls_hash_get_len(alg))
|
||||
goto too_small;
|
||||
|
||||
gnutls_hash_fast(alg, data, datalen, hash);
|
||||
|
||||
return (gnutls_hash_get_len(alg));
|
||||
}
|
||||
|
||||
#else
|
||||
/*
|
||||
* No hash support without CommonCrypto or GNU TLS...
|
||||
*/
|
||||
|
||||
if (hashsize < 64)
|
||||
goto too_small;
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
/*
|
||||
* Unknown hash algorithm...
|
||||
*/
|
||||
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Unknown hash algorithm."), 1);
|
||||
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
* We get here if the buffer is too small.
|
||||
*/
|
||||
|
||||
too_small:
|
||||
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Hash buffer too small."), 1);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: hash.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: http-addr.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: http-addr.c 12129 2014-08-28 19:26:31Z msweet $"
|
||||
*
|
||||
* HTTP address routines for CUPS.
|
||||
*
|
||||
@@ -924,5 +924,5 @@ httpResolveHostname(http_t *http, /* I - HTTP connection */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: http-addr.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: http-addr.c 12129 2014-08-28 19:26:31Z msweet $".
|
||||
*/
|
||||
|
||||
+102
-126
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: http-addrlist.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: http-addrlist.c 11627 2014-02-20 16:15:09Z msweet $"
|
||||
*
|
||||
* HTTP address list routines for CUPS.
|
||||
*
|
||||
@@ -68,19 +68,14 @@ httpAddrConnect2(
|
||||
http_addr_t peer; /* Peer address */
|
||||
int flags, /* Socket flags */
|
||||
remaining; /* Remaining timeout */
|
||||
int i, /* Looping var */
|
||||
nfds, /* Number of file descriptors */
|
||||
fds[100], /* Socket file descriptors */
|
||||
result; /* Result from select() or poll() */
|
||||
http_addrlist_t *addrs[100]; /* Addresses */
|
||||
# ifdef HAVE_POLL
|
||||
struct pollfd pfds[100]; /* Polled file descriptors */
|
||||
struct pollfd pfd; /* Polled file descriptor */
|
||||
# else
|
||||
int max_fd = -1; /* Highest file descriptor */
|
||||
fd_set input_set, /* select() input set */
|
||||
output_set; /* select() output set */
|
||||
struct timeval timeout; /* Timeout */
|
||||
# endif /* HAVE_POLL */
|
||||
int nfds; /* Result from select()/poll() */
|
||||
#endif /* O_NONBLOCK */
|
||||
#ifdef DEBUG
|
||||
char temp[256]; /* Temporary address string */
|
||||
@@ -100,39 +95,35 @@ httpAddrConnect2(
|
||||
if (cancel && *cancel)
|
||||
return (NULL);
|
||||
|
||||
if (msec <= 0)
|
||||
if (msec <= 0 || getenv("CUPS_DISABLE_ASYNC_CONNECT"))
|
||||
msec = INT_MAX;
|
||||
|
||||
/*
|
||||
* Loop through each address until we connect or run out of addresses...
|
||||
*/
|
||||
|
||||
for (nfds = 0; addrlist && nfds < (int)(sizeof(fds) / sizeof(fds[0])); addrlist = addrlist->next)
|
||||
while (addrlist)
|
||||
{
|
||||
if (cancel && *cancel)
|
||||
{
|
||||
while (nfds > 0)
|
||||
{
|
||||
nfds --;
|
||||
httpAddrClose(NULL, fds[nfds]);
|
||||
}
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Create the socket...
|
||||
*/
|
||||
|
||||
DEBUG_printf(("2httpAddrConnect2: Trying %s:%d...", httpAddrString(&(addrlist->addr), temp, sizeof(temp)), httpAddrPort(&(addrlist->addr))));
|
||||
DEBUG_printf(("2httpAddrConnect2: Trying %s:%d...",
|
||||
httpAddrString(&(addrlist->addr), temp, sizeof(temp)),
|
||||
httpAddrPort(&(addrlist->addr))));
|
||||
|
||||
if ((fds[nfds] = (int)socket(httpAddrFamily(&(addrlist->addr)), SOCK_STREAM, 0)) < 0)
|
||||
if ((*sock = (int)socket(httpAddrFamily(&(addrlist->addr)), SOCK_STREAM,
|
||||
0)) < 0)
|
||||
{
|
||||
/*
|
||||
* Don't abort yet, as this could just be an issue with the local
|
||||
* system not being configured with IPv4/IPv6/domain socket enabled...
|
||||
*/
|
||||
|
||||
addrlist = addrlist->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -141,16 +132,16 @@ httpAddrConnect2(
|
||||
*/
|
||||
|
||||
val = 1;
|
||||
setsockopt(fds[nfds], SOL_SOCKET, SO_REUSEADDR, CUPS_SOCAST &val, sizeof(val));
|
||||
setsockopt(*sock, SOL_SOCKET, SO_REUSEADDR, CUPS_SOCAST &val, sizeof(val));
|
||||
|
||||
#ifdef SO_REUSEPORT
|
||||
val = 1;
|
||||
setsockopt(fds[nfds], SOL_SOCKET, SO_REUSEPORT, CUPS_SOCAST &val, sizeof(val));
|
||||
setsockopt(*sock, SOL_SOCKET, SO_REUSEPORT, CUPS_SOCAST &val, sizeof(val));
|
||||
#endif /* SO_REUSEPORT */
|
||||
|
||||
#ifdef SO_NOSIGPIPE
|
||||
val = 1;
|
||||
setsockopt(fds[nfds], SOL_SOCKET, SO_NOSIGPIPE, CUPS_SOCAST &val, sizeof(val));
|
||||
setsockopt(*sock, SOL_SOCKET, SO_NOSIGPIPE, CUPS_SOCAST &val, sizeof(val));
|
||||
#endif /* SO_NOSIGPIPE */
|
||||
|
||||
/*
|
||||
@@ -159,14 +150,14 @@ httpAddrConnect2(
|
||||
*/
|
||||
|
||||
val = 1;
|
||||
setsockopt(fds[nfds], IPPROTO_TCP, TCP_NODELAY, CUPS_SOCAST &val, sizeof(val));
|
||||
setsockopt(*sock, IPPROTO_TCP, TCP_NODELAY, CUPS_SOCAST &val, sizeof(val));
|
||||
|
||||
#ifdef FD_CLOEXEC
|
||||
/*
|
||||
* Close this socket when starting another process...
|
||||
*/
|
||||
|
||||
fcntl(fds[nfds], F_SETFD, FD_CLOEXEC);
|
||||
fcntl(*sock, F_SETFD, FD_CLOEXEC);
|
||||
#endif /* FD_CLOEXEC */
|
||||
|
||||
#ifdef O_NONBLOCK
|
||||
@@ -176,157 +167,142 @@ httpAddrConnect2(
|
||||
|
||||
DEBUG_printf(("httpAddrConnect2: Setting non-blocking connect()"));
|
||||
|
||||
flags = fcntl(fds[nfds], F_GETFL, 0);
|
||||
fcntl(fds[nfds], F_SETFL, flags | O_NONBLOCK);
|
||||
flags = fcntl(*sock, F_GETFL, 0);
|
||||
if (msec != INT_MAX)
|
||||
{
|
||||
DEBUG_puts("httpAddrConnect2: Setting non-blocking connect()");
|
||||
|
||||
fcntl(*sock, F_SETFL, flags | O_NONBLOCK);
|
||||
}
|
||||
#endif /* O_NONBLOCK */
|
||||
|
||||
/*
|
||||
* Then connect...
|
||||
*/
|
||||
|
||||
if (!connect(fds[nfds], &(addrlist->addr.addr), (socklen_t)httpAddrLength(&(addrlist->addr))))
|
||||
if (!connect(*sock, &(addrlist->addr.addr), (socklen_t)httpAddrLength(&(addrlist->addr))))
|
||||
{
|
||||
DEBUG_printf(("1httpAddrConnect2: Connected to %s:%d...", httpAddrString(&(addrlist->addr), temp, sizeof(temp)), httpAddrPort(&(addrlist->addr))));
|
||||
DEBUG_printf(("1httpAddrConnect2: Connected to %s:%d...",
|
||||
httpAddrString(&(addrlist->addr), temp, sizeof(temp)),
|
||||
httpAddrPort(&(addrlist->addr))));
|
||||
|
||||
#ifdef O_NONBLOCK
|
||||
fcntl(fds[nfds], F_SETFL, flags);
|
||||
fcntl(*sock, F_SETFL, flags);
|
||||
#endif /* O_NONBLOCK */
|
||||
|
||||
*sock = fds[nfds];
|
||||
|
||||
while (nfds > 0)
|
||||
{
|
||||
nfds --;
|
||||
httpAddrClose(NULL, fds[nfds]);
|
||||
}
|
||||
|
||||
return (addrlist);
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
if (WSAGetLastError() != WSAEINPROGRESS && WSAGetLastError() != WSAEWOULDBLOCK)
|
||||
#else
|
||||
if (errno != EINPROGRESS && errno != EWOULDBLOCK)
|
||||
#endif /* WIN32 */
|
||||
{
|
||||
DEBUG_printf(("1httpAddrConnect2: Unable to connect to %s:%d: %s", httpAddrString(&(addrlist->addr), temp, sizeof(temp)), httpAddrPort(&(addrlist->addr)), strerror(errno)));
|
||||
httpAddrClose(NULL, fds[nfds]);
|
||||
continue;
|
||||
}
|
||||
|
||||
fcntl(fds[nfds], F_SETFL, flags);
|
||||
|
||||
#ifndef HAVE_POLL
|
||||
if (fds[nfds] > max_fd)
|
||||
max_fd = fds[nfds];
|
||||
#endif /* !HAVE_POLL */
|
||||
|
||||
addrs[nfds] = addrlist;
|
||||
nfds ++;
|
||||
}
|
||||
|
||||
#ifdef O_NONBLOCK
|
||||
DEBUG_puts("1httpAddrConnect2: Finishing async connect()");
|
||||
|
||||
for (remaining = msec; remaining > 0; remaining -= 250)
|
||||
{
|
||||
do
|
||||
# ifdef WIN32
|
||||
if (WSAGetLastError() == WSAEINPROGRESS ||
|
||||
WSAGetLastError() == WSAEWOULDBLOCK)
|
||||
# else
|
||||
if (errno == EINPROGRESS || errno == EWOULDBLOCK)
|
||||
# endif /* WIN32 */
|
||||
{
|
||||
if (cancel && *cancel)
|
||||
DEBUG_puts("1httpAddrConnect2: Finishing async connect()");
|
||||
|
||||
fcntl(*sock, F_SETFL, flags);
|
||||
|
||||
for (remaining = msec; remaining > 0; remaining -= 250)
|
||||
{
|
||||
/*
|
||||
* Close this socket and return...
|
||||
*/
|
||||
do
|
||||
{
|
||||
if (cancel && *cancel)
|
||||
{
|
||||
/*
|
||||
* Close this socket and return...
|
||||
*/
|
||||
|
||||
DEBUG_puts("1httpAddrConnect2: Canceled connect()");
|
||||
DEBUG_puts("1httpAddrConnect2: Canceled connect()");
|
||||
|
||||
while (nfds > 0)
|
||||
{
|
||||
nfds --;
|
||||
httpAddrClose(NULL, fds[nfds]);
|
||||
}
|
||||
httpAddrClose(NULL, *sock);
|
||||
|
||||
*sock = -1;
|
||||
*sock = -1;
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
# ifdef HAVE_POLL
|
||||
for (i = 0; i < nfds; i ++)
|
||||
{
|
||||
pfds[i].fd = fds[i];
|
||||
pfds[i].events = POLLIN | POLLOUT;
|
||||
}
|
||||
pfd.fd = *sock;
|
||||
pfd.events = POLLIN | POLLOUT;
|
||||
|
||||
result = poll(pfds, (nfds_t)nfds, remaining > 250 ? 250 : remaining);
|
||||
nfds = poll(&pfd, 1, remaining > 250 ? 250 : remaining);
|
||||
|
||||
DEBUG_printf(("1httpAddrConnect2: poll() returned %d (%d)", result, errno));
|
||||
DEBUG_printf(("1httpAddrConnect2: poll() returned %d (%d)", nfds,
|
||||
errno));
|
||||
|
||||
# else
|
||||
FD_ZERO(&input_set);
|
||||
for (i = 0; i < nfds; i ++)
|
||||
FD_SET(fds[i], &input_set);
|
||||
output_set = input_set;
|
||||
FD_ZERO(&input_set);
|
||||
FD_SET(*sock, &input_set);
|
||||
output_set = input_set;
|
||||
|
||||
timeout.tv_sec = 0;
|
||||
timeout.tv_usec = (remaining > 250 ? 250 : remaining) * 1000;
|
||||
timeout.tv_sec = 0;
|
||||
timeout.tv_usec = (remaining > 250 ? 250 : remaining) * 1000;
|
||||
|
||||
result = select(max_fd + 1, &input_set, &output_set, NULL, &timeout);
|
||||
nfds = select(*sock + 1, &input_set, &output_set, NULL, &timeout);
|
||||
|
||||
DEBUG_printf(("1httpAddrConnect2: select() returned %d (%d)", result, errno));
|
||||
DEBUG_printf(("1httpAddrConnect2: select() returned %d (%d)", nfds,
|
||||
errno));
|
||||
# endif /* HAVE_POLL */
|
||||
}
|
||||
}
|
||||
# ifdef WIN32
|
||||
while (result < 0 && (WSAGetLastError() == WSAEINTR || WSAGetLastError() == WSAEWOULDBLOCK));
|
||||
while (nfds < 0 && (WSAGetLastError() == WSAEINTR ||
|
||||
WSAGetLastError() == WSAEWOULDBLOCK));
|
||||
# else
|
||||
while (result < 0 && (errno == EINTR || errno == EAGAIN));
|
||||
while (nfds < 0 && (errno == EINTR || errno == EAGAIN));
|
||||
# endif /* WIN32 */
|
||||
|
||||
if (result > 0)
|
||||
{
|
||||
for (i = 0; i < nfds; i ++)
|
||||
{
|
||||
# ifdef HAVE_POLL
|
||||
DEBUG_printf(("pfds[%d].revents=%x\n", i, pfds[i].revents));
|
||||
if (pfds[i].revents)
|
||||
# else
|
||||
if (FD_ISSET(fds[i], &input))
|
||||
# endif /* HAVE_POLL */
|
||||
if (nfds > 0)
|
||||
{
|
||||
*sock = fds[i];
|
||||
len = sizeof(peer);
|
||||
if (!getpeername(fds[i], (struct sockaddr *)&peer, &len))
|
||||
{
|
||||
DEBUG_printf(("1httpAddrConnect2: Connected to %s:%d...", httpAddrString(&peer, temp, sizeof(temp)), httpAddrPort(&peer)));
|
||||
len = sizeof(peer);
|
||||
if (!getpeername(*sock, (struct sockaddr *)&peer, &len))
|
||||
{
|
||||
DEBUG_printf(("1httpAddrConnect2: Connected to %s:%d...",
|
||||
httpAddrString(&peer, temp, sizeof(temp)),
|
||||
httpAddrPort(&peer)));
|
||||
|
||||
addrlist = addrs[i];
|
||||
return (addrlist);
|
||||
}
|
||||
}
|
||||
else
|
||||
httpAddrClose(NULL, fds[i]);
|
||||
}
|
||||
|
||||
return (addrlist);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* O_NONBLOCK */
|
||||
|
||||
while (nfds > 0)
|
||||
{
|
||||
nfds --;
|
||||
httpAddrClose(NULL, fds[nfds]);
|
||||
DEBUG_printf(("1httpAddrConnect2: Unable to connect to %s:%d: %s",
|
||||
httpAddrString(&(addrlist->addr), temp, sizeof(temp)),
|
||||
httpAddrPort(&(addrlist->addr)), strerror(errno)));
|
||||
|
||||
#ifndef WIN32
|
||||
if (errno == EINPROGRESS)
|
||||
errno = ETIMEDOUT;
|
||||
#endif /* !WIN32 */
|
||||
|
||||
/*
|
||||
* Close this socket and move to the next address...
|
||||
*/
|
||||
|
||||
httpAddrClose(NULL, *sock);
|
||||
|
||||
*sock = -1;
|
||||
addrlist = addrlist->next;
|
||||
}
|
||||
|
||||
if (!addrlist)
|
||||
#ifdef WIN32
|
||||
_cupsSetError(IPP_STATUS_ERROR_SERVICE_UNAVAILABLE, "Connection failed", 0);
|
||||
_cupsSetError(IPP_STATUS_ERROR_SERVICE_UNAVAILABLE, "Connection failed", 0);
|
||||
#else
|
||||
_cupsSetError(IPP_STATUS_ERROR_SERVICE_UNAVAILABLE, strerror(errno), 0);
|
||||
_cupsSetError(IPP_STATUS_ERROR_SERVICE_UNAVAILABLE, strerror(errno), 0);
|
||||
#endif /* WIN32 */
|
||||
|
||||
return (NULL);
|
||||
return (addrlist);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 'httpAddrCopyList()' - Copy an address list.
|
||||
*
|
||||
@@ -892,5 +868,5 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: http-addrlist.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: http-addrlist.c 11627 2014-02-20 16:15:09Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: http-private.h 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: http-private.h 12645 2015-05-20 01:20:52Z msweet $"
|
||||
*
|
||||
* Private HTTP definitions for CUPS.
|
||||
*
|
||||
@@ -442,5 +442,5 @@ extern int _httpWait(http_t *http, int msec, int usessl);
|
||||
#endif /* !_CUPS_HTTP_PRIVATE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: http-private.h 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: http-private.h 12645 2015-05-20 01:20:52Z msweet $".
|
||||
*/
|
||||
|
||||
+30
-21
@@ -1,7 +1,9 @@
|
||||
/*
|
||||
* "$Id: http-support.c 12970 2015-11-13 20:02:51Z msweet $"
|
||||
*
|
||||
* HTTP support routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -1578,7 +1580,9 @@ _httpResolveURI(
|
||||
#endif /* DEBUG */
|
||||
|
||||
|
||||
DEBUG_printf(("_httpResolveURI(uri=\"%s\", resolved_uri=%p, resolved_size=" CUPS_LLFMT ", options=0x%x, cb=%p, context=%p)", uri, resolved_uri, CUPS_LLCAST resolved_size, options, cb, context));
|
||||
DEBUG_printf(("4_httpResolveURI(uri=\"%s\", resolved_uri=%p, "
|
||||
"resolved_size=" CUPS_LLFMT ")", uri, resolved_uri,
|
||||
CUPS_LLCAST resolved_size));
|
||||
|
||||
/*
|
||||
* Get the device URI...
|
||||
@@ -1599,8 +1603,8 @@ _httpResolveURI(
|
||||
if (options & _HTTP_RESOLVE_STDERR)
|
||||
_cupsLangPrintFilter(stderr, "ERROR", _("Bad device-uri \"%s\"."), uri);
|
||||
|
||||
DEBUG_printf(("2_httpResolveURI: httpSeparateURI returned %d!", status));
|
||||
DEBUG_puts("2_httpResolveURI: Returning NULL");
|
||||
DEBUG_printf(("6_httpResolveURI: httpSeparateURI returned %d!", status));
|
||||
DEBUG_puts("5_httpResolveURI: Returning NULL");
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -1660,7 +1664,7 @@ _httpResolveURI(
|
||||
|
||||
if (regtype <= hostname)
|
||||
{
|
||||
DEBUG_puts("2_httpResolveURI: Bad hostname, returning NULL");
|
||||
DEBUG_puts("5_httpResolveURI: Bad hostname, returning NULL");
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -1689,7 +1693,7 @@ _httpResolveURI(
|
||||
uribuf.resource = resource;
|
||||
uribuf.uuid = uuid;
|
||||
|
||||
DEBUG_printf(("2_httpResolveURI: Resolving hostname=\"%s\", regtype=\"%s\", "
|
||||
DEBUG_printf(("6_httpResolveURI: Resolving hostname=\"%s\", regtype=\"%s\", "
|
||||
"domain=\"%s\"\n", hostname, regtype, domain));
|
||||
if (options & _HTTP_RESOLVE_STDERR)
|
||||
{
|
||||
@@ -1728,7 +1732,7 @@ _httpResolveURI(
|
||||
|
||||
if (cb && !(*cb)(context))
|
||||
{
|
||||
DEBUG_puts("2_httpResolveURI: callback returned 0 (stop)");
|
||||
DEBUG_puts("5_httpResolveURI: callback returned 0 (stop)");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1764,7 +1768,7 @@ _httpResolveURI(
|
||||
{
|
||||
if (errno != EINTR && errno != EAGAIN)
|
||||
{
|
||||
DEBUG_printf(("2_httpResolveURI: poll error: %s", strerror(errno)));
|
||||
DEBUG_printf(("5_httpResolveURI: poll error: %s", strerror(errno)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1960,7 +1964,7 @@ _httpResolveURI(
|
||||
uri = resolved_uri;
|
||||
}
|
||||
|
||||
DEBUG_printf(("2_httpResolveURI: Returning \"%s\"", uri));
|
||||
DEBUG_printf(("5_httpResolveURI: Returning \"%s\"", uri));
|
||||
|
||||
return (uri);
|
||||
}
|
||||
@@ -2147,7 +2151,7 @@ http_resolve_cb(
|
||||
uint8_t valueLen; /* Length of value */
|
||||
|
||||
|
||||
DEBUG_printf(("4http_resolve_cb(sdRef=%p, flags=%x, interfaceIndex=%u, "
|
||||
DEBUG_printf(("7http_resolve_cb(sdRef=%p, flags=%x, interfaceIndex=%u, "
|
||||
"errorCode=%d, fullName=\"%s\", hostTarget=\"%s\", port=%u, "
|
||||
"txtLen=%u, txtRecord=%p, context=%p)", sdRef, flags,
|
||||
interfaceIndex, errorCode, fullName, hostTarget, port, txtLen,
|
||||
@@ -2172,7 +2176,7 @@ http_resolve_cb(
|
||||
fprintf(stderr, "DEBUG: Found UUID %s, looking for %s.", uuid,
|
||||
uribuf->uuid);
|
||||
|
||||
DEBUG_printf(("5http_resolve_cb: Found UUID %s, looking for %s.", uuid,
|
||||
DEBUG_printf(("7http_resolve_cb: Found UUID %s, looking for %s.", uuid,
|
||||
uribuf->uuid));
|
||||
return;
|
||||
}
|
||||
@@ -2262,7 +2266,7 @@ http_resolve_cb(
|
||||
http_addrlist_t *addrlist, /* List of addresses */
|
||||
*addr; /* Current address */
|
||||
|
||||
DEBUG_printf(("5http_resolve_cb: Looking up \"%s\".", hostTarget));
|
||||
DEBUG_printf(("8http_resolve_cb: Looking up \"%s\".", hostTarget));
|
||||
|
||||
snprintf(fqdn, sizeof(fqdn), "%d", ntohs(port));
|
||||
if ((addrlist = httpAddrGetList(hostTarget, AF_UNSPEC, fqdn)) != NULL)
|
||||
@@ -2273,7 +2277,7 @@ http_resolve_cb(
|
||||
|
||||
if (!error)
|
||||
{
|
||||
DEBUG_printf(("5http_resolve_cb: Found \"%s\".", fqdn));
|
||||
DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn));
|
||||
|
||||
if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn ||
|
||||
_cups_strcasecmp(hostptr, ".local"))
|
||||
@@ -2284,7 +2288,7 @@ http_resolve_cb(
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
DEBUG_printf(("5http_resolve_cb: \"%s\" did not resolve: %d",
|
||||
DEBUG_printf(("8http_resolve_cb: \"%s\" did not resolve: %d",
|
||||
httpAddrString(&(addr->addr), fqdn, sizeof(fqdn)),
|
||||
error));
|
||||
#endif /* DEBUG */
|
||||
@@ -2304,7 +2308,7 @@ http_resolve_cb(
|
||||
else
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, uribuf->buffer, (int)uribuf->bufsize, scheme, NULL, hostTarget, ntohs(port), resource);
|
||||
|
||||
DEBUG_printf(("5http_resolve_cb: Resolved URI is \"%s\"...", uribuf->buffer));
|
||||
DEBUG_printf(("8http_resolve_cb: Resolved URI is \"%s\"...", uribuf->buffer));
|
||||
}
|
||||
|
||||
#elif defined(HAVE_AVAHI)
|
||||
@@ -2363,7 +2367,7 @@ http_resolve_cb(
|
||||
size_t valueLen = 0; /* Length of "rp" key */
|
||||
|
||||
|
||||
DEBUG_printf(("4http_resolve_cb(resolver=%p, "
|
||||
DEBUG_printf(("7http_resolve_cb(resolver=%p, "
|
||||
"interface=%d, protocol=%d, event=%d, name=\"%s\", "
|
||||
"type=\"%s\", domain=\"%s\", hostTarget=\"%s\", address=%p, "
|
||||
"port=%d, txt=%p, flags=%d, context=%p)",
|
||||
@@ -2396,7 +2400,7 @@ http_resolve_cb(
|
||||
fprintf(stderr, "DEBUG: Found UUID %s, looking for %s.", uuid,
|
||||
uribuf->uuid);
|
||||
|
||||
DEBUG_printf(("5http_resolve_cb: Found UUID %s, looking for %s.", uuid,
|
||||
DEBUG_printf(("7http_resolve_cb: Found UUID %s, looking for %s.", uuid,
|
||||
uribuf->uuid));
|
||||
return;
|
||||
}
|
||||
@@ -2500,7 +2504,7 @@ http_resolve_cb(
|
||||
http_addrlist_t *addrlist, /* List of addresses */
|
||||
*addr; /* Current address */
|
||||
|
||||
DEBUG_printf(("5http_resolve_cb: Looking up \"%s\".", hostTarget));
|
||||
DEBUG_printf(("8http_resolve_cb: Looking up \"%s\".", hostTarget));
|
||||
|
||||
snprintf(fqdn, sizeof(fqdn), "%d", ntohs(port));
|
||||
if ((addrlist = httpAddrGetList(hostTarget, AF_UNSPEC, fqdn)) != NULL)
|
||||
@@ -2511,7 +2515,7 @@ http_resolve_cb(
|
||||
|
||||
if (!error)
|
||||
{
|
||||
DEBUG_printf(("5http_resolve_cb: Found \"%s\".", fqdn));
|
||||
DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn));
|
||||
|
||||
if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn ||
|
||||
_cups_strcasecmp(hostptr, ".local"))
|
||||
@@ -2522,7 +2526,7 @@ http_resolve_cb(
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
DEBUG_printf(("5http_resolve_cb: \"%s\" did not resolve: %d",
|
||||
DEBUG_printf(("8http_resolve_cb: \"%s\" did not resolve: %d",
|
||||
httpAddrString(&(addr->addr), fqdn, sizeof(fqdn)),
|
||||
error));
|
||||
#endif /* DEBUG */
|
||||
@@ -2538,8 +2542,13 @@ http_resolve_cb(
|
||||
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, uribuf->buffer, uribuf->bufsize, scheme,
|
||||
NULL, hostTarget, port, resource);
|
||||
DEBUG_printf(("5http_resolve_cb: Resolved URI is \"%s\".", uribuf->buffer));
|
||||
DEBUG_printf(("8http_resolve_cb: Resolved URI is \"%s\".", uribuf->buffer));
|
||||
|
||||
avahi_simple_poll_quit(uribuf->poll);
|
||||
}
|
||||
#endif /* HAVE_DNSSD */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: http-support.c 12970 2015-11-13 20:02:51Z msweet $".
|
||||
*/
|
||||
|
||||
+5
-4
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: http.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: http.c 12970 2015-11-13 20:02:51Z msweet $"
|
||||
*
|
||||
* HTTP routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* This file contains Kerberos support code, copyright 2006 by
|
||||
@@ -2428,7 +2428,8 @@ httpReconnect2(http_t *http, /* I - HTTP connection */
|
||||
httpAddrPort(&(current->addr))));
|
||||
#endif /* DEBUG */
|
||||
|
||||
if ((addr = httpAddrConnect2(http->addrlist, &(http->fd), msec, cancel)) == NULL)
|
||||
if ((addr = httpAddrConnect2(http->addrlist, &(http->fd), msec,
|
||||
cancel)) == NULL)
|
||||
{
|
||||
/*
|
||||
* Unable to connect...
|
||||
@@ -4849,5 +4850,5 @@ http_write_chunk(http_t *http, /* I - HTTP connection */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: http.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: http.c 12970 2015-11-13 20:02:51Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: http.h 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: http.h 12848 2015-08-26 18:51:57Z msweet $"
|
||||
*
|
||||
* Hyper-Text Transport Protocol definitions for CUPS.
|
||||
*
|
||||
@@ -656,5 +656,5 @@ extern const char *httpURIStatusString(http_uri_status_t status) _CUPS_API_2_0;
|
||||
#endif /* !_CUPS_HTTP_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: http.h 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: http.h 12848 2015-08-26 18:51:57Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* "$Id: huffman-private.h 11985 2014-07-02 15:41:16Z msweet $"
|
||||
*
|
||||
* HTTP/2 Huffman compression/decompression definitions for CUPS.
|
||||
*
|
||||
* Copyright 2014 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
#ifndef _CUPS_HUFFMAN_PRIVATE_H_
|
||||
# define _CUPS_HUFFMAN_PRIVATE_H_
|
||||
|
||||
/*
|
||||
* Include necessary headers...
|
||||
*/
|
||||
|
||||
# include "versioning.h"
|
||||
# include <stdlib.h>
|
||||
|
||||
|
||||
/*
|
||||
* C++ magic...
|
||||
*/
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif /* __cplusplus */
|
||||
|
||||
|
||||
/*
|
||||
* Functions...
|
||||
*/
|
||||
|
||||
extern size_t _http2HuffmanDecode(char *dst, size_t dstsize, const unsigned char *src, size_t srclen);
|
||||
extern size_t _http2HuffmanEncode(unsigned char *dst, size_t dstsize, const char *src);
|
||||
|
||||
|
||||
/*
|
||||
* C++ magic...
|
||||
*/
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif /* __cplusplus */
|
||||
#endif /* !_CUPS_HUFFMAN_PRIVATE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: huffman-private.h 11985 2014-07-02 15:41:16Z msweet $".
|
||||
*/
|
||||
@@ -1,651 +0,0 @@
|
||||
/*
|
||||
* "$Id: huffman.c 11990 2014-07-02 21:13:22Z msweet $"
|
||||
*
|
||||
* HTTP/2 Huffman compression/decompression routines for CUPS.
|
||||
*
|
||||
* Copyright 2014 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include necessary headers...
|
||||
*/
|
||||
|
||||
#include "debug-private.h"
|
||||
#include "huffman-private.h"
|
||||
#include "thread-private.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/*
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
#define _HTTP2_HUFFMAN_MAX 30 /* Max Huffman bits in table */
|
||||
|
||||
|
||||
/*
|
||||
* Huffman table from HPACK-08 draft.
|
||||
*/
|
||||
|
||||
typedef struct _http2_huffman_s /**** Huffman code table ****/
|
||||
{
|
||||
int code; /* Code */
|
||||
short len; /* Length in bits */
|
||||
short ch; /* Character */
|
||||
} _http2_huffman_t;
|
||||
|
||||
static _http2_huffman_t http2_decode[256];
|
||||
/* Decoder values */
|
||||
static int http2_decode_max[_HTTP2_HUFFMAN_MAX + 1];
|
||||
static const _http2_huffman_t *http2_decode_next[_HTTP2_HUFFMAN_MAX + 1];
|
||||
static int http2_decode_init = 0;
|
||||
static _cups_mutex_t http2_decode_mutex = _CUPS_MUTEX_INITIALIZER;
|
||||
static const _http2_huffman_t http2_encode[256] =
|
||||
{ /* Encoder values */
|
||||
{ 0x1ff8, 13, 0x00 },
|
||||
{ 0x7fffd8, 23, 0x01 },
|
||||
{ 0xfffffe2, 28, 0x02 },
|
||||
{ 0xfffffe3, 28, 0x03 },
|
||||
{ 0xfffffe4, 28, 0x04 },
|
||||
{ 0xfffffe5, 28, 0x05 },
|
||||
{ 0xfffffe6, 28, 0x06 },
|
||||
{ 0xfffffe7, 28, 0x07 },
|
||||
{ 0xfffffe8, 28, 0x08 },
|
||||
{ 0xffffea, 24, 0x09 },
|
||||
{ 0xffffffc, 30, 0x0a },
|
||||
{ 0xfffffe9, 28, 0x0b },
|
||||
{ 0xfffffea, 28, 0x0c },
|
||||
{ 0xffffffd, 30, 0x0d },
|
||||
{ 0xfffffeb, 28, 0x0e },
|
||||
{ 0xfffffec, 28, 0x0f },
|
||||
{ 0xfffffed, 28, 0x10 },
|
||||
{ 0xfffffee, 28, 0x11 },
|
||||
{ 0xfffffef, 28, 0x12 },
|
||||
{ 0xffffff0, 28, 0x13 },
|
||||
{ 0xffffff1, 28, 0x14 },
|
||||
{ 0xffffff2, 28, 0x15 },
|
||||
{ 0xffffffe, 30, 0x16 },
|
||||
{ 0xffffff3, 28, 0x17 },
|
||||
{ 0xffffff4, 28, 0x18 },
|
||||
{ 0xffffff5, 28, 0x19 },
|
||||
{ 0xffffff6, 28, 0x1a },
|
||||
{ 0xffffff7, 28, 0x1b },
|
||||
{ 0xffffff8, 28, 0x1c },
|
||||
{ 0xffffff9, 28, 0x1d },
|
||||
{ 0xffffffa, 28, 0x1e },
|
||||
{ 0xffffffb, 28, 0x1f },
|
||||
{ 0x14, 6, 0x20 },
|
||||
{ 0x3f8, 10, 0x21 },
|
||||
{ 0x3f9, 10, 0x22 },
|
||||
{ 0xffa, 12, 0x23 },
|
||||
{ 0x1ff9, 13, 0x24 },
|
||||
{ 0x15, 6, 0x25 },
|
||||
{ 0xf8, 8, 0x26 },
|
||||
{ 0x7fa, 11, 0x27 },
|
||||
{ 0x3fa, 10, 0x28 },
|
||||
{ 0x3fb, 10, 0x29 },
|
||||
{ 0xf9, 8, 0x2a },
|
||||
{ 0x7fb, 11, 0x2b },
|
||||
{ 0xfa, 8, 0x2c },
|
||||
{ 0x16, 6, 0x2d },
|
||||
{ 0x17, 6, 0x2e },
|
||||
{ 0x18, 6, 0x2f },
|
||||
{ 0x0, 5, 0x30 },
|
||||
{ 0x1, 5, 0x31 },
|
||||
{ 0x2, 5, 0x32 },
|
||||
{ 0x19, 6, 0x33 },
|
||||
{ 0x1a, 6, 0x34 },
|
||||
{ 0x1b, 6, 0x35 },
|
||||
{ 0x1c, 6, 0x36 },
|
||||
{ 0x1d, 6, 0x37 },
|
||||
{ 0x1e, 6, 0x38 },
|
||||
{ 0x1f, 6, 0x39 },
|
||||
{ 0x5c, 7, 0x3a },
|
||||
{ 0xfb, 8, 0x3b },
|
||||
{ 0x7ffc, 15, 0x3c },
|
||||
{ 0x20, 6, 0x3d },
|
||||
{ 0xffb, 12, 0x3e },
|
||||
{ 0x3fc, 10, 0x3f },
|
||||
{ 0x1ffa, 13, 0x40 },
|
||||
{ 0x21, 6, 0x41 },
|
||||
{ 0x5d, 7, 0x42 },
|
||||
{ 0x5e, 7, 0x43 },
|
||||
{ 0x5f, 7, 0x44 },
|
||||
{ 0x60, 7, 0x45 },
|
||||
{ 0x61, 7, 0x46 },
|
||||
{ 0x62, 7, 0x47 },
|
||||
{ 0x63, 7, 0x48 },
|
||||
{ 0x64, 7, 0x49 },
|
||||
{ 0x65, 7, 0x4a },
|
||||
{ 0x66, 7, 0x4b },
|
||||
{ 0x67, 7, 0x4c },
|
||||
{ 0x68, 7, 0x4d },
|
||||
{ 0x69, 7, 0x4e },
|
||||
{ 0x6a, 7, 0x4f },
|
||||
{ 0x6b, 7, 0x50 },
|
||||
{ 0x6c, 7, 0x51 },
|
||||
{ 0x6d, 7, 0x52 },
|
||||
{ 0x6e, 7, 0x53 },
|
||||
{ 0x6f, 7, 0x54 },
|
||||
{ 0x70, 7, 0x55 },
|
||||
{ 0x71, 7, 0x56 },
|
||||
{ 0x72, 7, 0x57 },
|
||||
{ 0xfc, 8, 0x58 },
|
||||
{ 0x73, 7, 0x59 },
|
||||
{ 0xfd, 8, 0x5a },
|
||||
{ 0x1ffb, 13, 0x5b },
|
||||
{ 0x7fff0, 19, 0x5c },
|
||||
{ 0x1ffc, 13, 0x5d },
|
||||
{ 0x3ffc, 14, 0x5e },
|
||||
{ 0x22, 6, 0x5f },
|
||||
{ 0x7ffd, 15, 0x60 },
|
||||
{ 0x3, 5, 0x61 },
|
||||
{ 0x23, 6, 0x62 },
|
||||
{ 0x4, 5, 0x63 },
|
||||
{ 0x24, 6, 0x64 },
|
||||
{ 0x5, 5, 0x65 },
|
||||
{ 0x25, 6, 0x66 },
|
||||
{ 0x26, 6, 0x67 },
|
||||
{ 0x27, 6, 0x68 },
|
||||
{ 0x6, 5, 0x69 },
|
||||
{ 0x74, 7, 0x6a },
|
||||
{ 0x75, 7, 0x6b },
|
||||
{ 0x28, 6, 0x6c },
|
||||
{ 0x29, 6, 0x6d },
|
||||
{ 0x2a, 6, 0x6e },
|
||||
{ 0x7, 5, 0x6f },
|
||||
{ 0x2b, 6, 0x70 },
|
||||
{ 0x76, 7, 0x71 },
|
||||
{ 0x2c, 6, 0x72 },
|
||||
{ 0x8, 5, 0x73 },
|
||||
{ 0x9, 5, 0x74 },
|
||||
{ 0x2d, 6, 0x75 },
|
||||
{ 0x77, 7, 0x76 },
|
||||
{ 0x78, 7, 0x77 },
|
||||
{ 0x79, 7, 0x78 },
|
||||
{ 0x7a, 7, 0x79 },
|
||||
{ 0x7b, 7, 0x7a },
|
||||
{ 0x7ffe, 15, 0x7b },
|
||||
{ 0x7fc, 11, 0x7c },
|
||||
{ 0x3ffd, 14, 0x7d },
|
||||
{ 0x1ffd, 13, 0x7e },
|
||||
{ 0xffffffc, 28, 0x7f },
|
||||
{ 0xfffe6, 20, 0x80 },
|
||||
{ 0x3fffd2, 22, 0x81 },
|
||||
{ 0xfffe7, 20, 0x82 },
|
||||
{ 0xfffe8, 20, 0x83 },
|
||||
{ 0x3fffd3, 22, 0x84 },
|
||||
{ 0x3fffd4, 22, 0x85 },
|
||||
{ 0x3fffd5, 22, 0x86 },
|
||||
{ 0x7fffd9, 23, 0x87 },
|
||||
{ 0x3fffd6, 22, 0x88 },
|
||||
{ 0x7fffda, 23, 0x89 },
|
||||
{ 0x7fffdb, 23, 0x8a },
|
||||
{ 0x7fffdc, 23, 0x8b },
|
||||
{ 0x7fffdd, 23, 0x8c },
|
||||
{ 0x7fffde, 23, 0x8d },
|
||||
{ 0xffffeb, 24, 0x8e },
|
||||
{ 0x7fffdf, 23, 0x8f },
|
||||
{ 0xffffec, 24, 0x90 },
|
||||
{ 0xffffed, 24, 0x91 },
|
||||
{ 0x3fffd7, 22, 0x92 },
|
||||
{ 0x7fffe0, 23, 0x93 },
|
||||
{ 0xffffee, 24, 0x94 },
|
||||
{ 0x7fffe1, 23, 0x95 },
|
||||
{ 0x7fffe2, 23, 0x96 },
|
||||
{ 0x7fffe3, 23, 0x97 },
|
||||
{ 0x7fffe4, 23, 0x98 },
|
||||
{ 0x1fffdc, 21, 0x99 },
|
||||
{ 0x3fffd8, 22, 0x9a },
|
||||
{ 0x7fffe5, 23, 0x9b },
|
||||
{ 0x3fffd9, 22, 0x9c },
|
||||
{ 0x7fffe6, 23, 0x9d },
|
||||
{ 0x7fffe7, 23, 0x9e },
|
||||
{ 0xffffef, 24, 0x9f },
|
||||
{ 0x3fffda, 22, 0xa0 },
|
||||
{ 0x1fffdd, 21, 0xa1 },
|
||||
{ 0xfffe9, 20, 0xa2 },
|
||||
{ 0x3fffdb, 22, 0xa3 },
|
||||
{ 0x3fffdc, 22, 0xa4 },
|
||||
{ 0x7fffe8, 23, 0xa5 },
|
||||
{ 0x7fffe9, 23, 0xa6 },
|
||||
{ 0x1fffde, 21, 0xa7 },
|
||||
{ 0x7fffea, 23, 0xa8 },
|
||||
{ 0x3fffdd, 22, 0xa9 },
|
||||
{ 0x3fffde, 22, 0xaa },
|
||||
{ 0xfffff0, 24, 0xab },
|
||||
{ 0x1fffdf, 21, 0xac },
|
||||
{ 0x3fffdf, 22, 0xad },
|
||||
{ 0x7fffeb, 23, 0xae },
|
||||
{ 0x7fffec, 23, 0xaf },
|
||||
{ 0x1fffe0, 21, 0xb0 },
|
||||
{ 0x1fffe1, 21, 0xb1 },
|
||||
{ 0x3fffe0, 22, 0xb2 },
|
||||
{ 0x1fffe2, 21, 0xb3 },
|
||||
{ 0x7fffed, 23, 0xb4 },
|
||||
{ 0x3fffe1, 22, 0xb5 },
|
||||
{ 0x7fffee, 23, 0xb6 },
|
||||
{ 0x7fffef, 23, 0xb7 },
|
||||
{ 0xfffea, 20, 0xb8 },
|
||||
{ 0x3fffe2, 22, 0xb9 },
|
||||
{ 0x3fffe3, 22, 0xba },
|
||||
{ 0x3fffe4, 22, 0xbb },
|
||||
{ 0x7ffff0, 23, 0xbc },
|
||||
{ 0x3fffe5, 22, 0xbd },
|
||||
{ 0x3fffe6, 22, 0xbe },
|
||||
{ 0x7ffff1, 23, 0xbf },
|
||||
{ 0x3ffffe0, 26, 0xc0 },
|
||||
{ 0x3ffffe1, 26, 0xc1 },
|
||||
{ 0xfffeb, 20, 0xc2 },
|
||||
{ 0x7fff1, 19, 0xc3 },
|
||||
{ 0x3fffe7, 22, 0xc4 },
|
||||
{ 0x7ffff2, 23, 0xc5 },
|
||||
{ 0x3fffe8, 22, 0xc6 },
|
||||
{ 0x1ffffec, 25, 0xc7 },
|
||||
{ 0x3ffffe2, 26, 0xc8 },
|
||||
{ 0x3ffffe3, 26, 0xc9 },
|
||||
{ 0x3ffffe4, 26, 0xca },
|
||||
{ 0x7ffffde, 27, 0xcb },
|
||||
{ 0x7ffffdf, 27, 0xcc },
|
||||
{ 0x3ffffe5, 26, 0xcd },
|
||||
{ 0xfffff1, 24, 0xce },
|
||||
{ 0x1ffffed, 25, 0xcf },
|
||||
{ 0x7fff2, 19, 0xd0 },
|
||||
{ 0x1fffe3, 21, 0xd1 },
|
||||
{ 0x3ffffe6, 26, 0xd2 },
|
||||
{ 0x7ffffe0, 27, 0xd3 },
|
||||
{ 0x7ffffe1, 27, 0xd4 },
|
||||
{ 0x3ffffe7, 26, 0xd5 },
|
||||
{ 0x7ffffe2, 27, 0xd6 },
|
||||
{ 0xfffff2, 24, 0xd7 },
|
||||
{ 0x1fffe4, 21, 0xd8 },
|
||||
{ 0x1fffe5, 21, 0xd9 },
|
||||
{ 0x3ffffe8, 26, 0xda },
|
||||
{ 0x3ffffe9, 26, 0xdb },
|
||||
{ 0xffffffd, 28, 0xdc },
|
||||
{ 0x7ffffe3, 27, 0xdd },
|
||||
{ 0x7ffffe4, 27, 0xde },
|
||||
{ 0x7ffffe5, 27, 0xdf },
|
||||
{ 0xfffec, 20, 0xe0 },
|
||||
{ 0xfffff3, 24, 0xe1 },
|
||||
{ 0xfffed, 20, 0xe2 },
|
||||
{ 0x1fffe6, 21, 0xe3 },
|
||||
{ 0x3fffe9, 22, 0xe4 },
|
||||
{ 0x1fffe7, 21, 0xe5 },
|
||||
{ 0x1fffe8, 21, 0xe6 },
|
||||
{ 0x7ffff3, 23, 0xe7 },
|
||||
{ 0x3fffea, 22, 0xe8 },
|
||||
{ 0x3fffeb, 22, 0xe9 },
|
||||
{ 0x1ffffee, 25, 0xea },
|
||||
{ 0x1ffffef, 25, 0xeb },
|
||||
{ 0xfffff4, 24, 0xec },
|
||||
{ 0xfffff5, 24, 0xed },
|
||||
{ 0x3ffffea, 26, 0xee },
|
||||
{ 0x7ffff4, 23, 0xef },
|
||||
{ 0x3ffffeb, 26, 0xf0 },
|
||||
{ 0x7ffffe6, 27, 0xf1 },
|
||||
{ 0x3ffffec, 26, 0xf2 },
|
||||
{ 0x3ffffed, 26, 0xf3 },
|
||||
{ 0x7ffffe7, 27, 0xf4 },
|
||||
{ 0x7ffffe8, 27, 0xf5 },
|
||||
{ 0x7ffffe9, 27, 0xf6 },
|
||||
{ 0x7ffffea, 27, 0xf7 },
|
||||
{ 0x7ffffeb, 27, 0xf8 },
|
||||
{ 0xffffffe, 28, 0xf9 },
|
||||
{ 0x7ffffec, 27, 0xfa },
|
||||
{ 0x7ffffed, 27, 0xfb },
|
||||
{ 0x7ffffee, 27, 0xfc },
|
||||
{ 0x7ffffef, 27, 0xfd },
|
||||
{ 0x7fffff0, 27, 0xfe },
|
||||
{ 0x3ffffee, 26, 0xff }
|
||||
};
|
||||
static const unsigned char http2_masks[9] = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
|
||||
/* Bitmasks */
|
||||
|
||||
|
||||
/*
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static int http2_compare_decode(const _http2_huffman_t *a, const _http2_huffman_t *b);
|
||||
|
||||
|
||||
/*
|
||||
* '_http2HuffmanDecode()' - Decode (decompress) a HTTP/2 Huffman-encoded string.
|
||||
*
|
||||
* The "dst" string is nul-terminated even if the total length of the Huffman-
|
||||
* encoded string does not fit. The return value contains the actual length
|
||||
* of the string after decoding.
|
||||
*/
|
||||
|
||||
size_t /* O - Actual length of string or 0 on error */
|
||||
_http2HuffmanDecode(
|
||||
char *dst, /* I - Destination string buffer */
|
||||
size_t dstsize, /* I - Size of string buffer */
|
||||
const unsigned char *src, /* I - Incoming Huffman data */
|
||||
size_t srclen) /* I - Length of incoming Huffman data */
|
||||
{
|
||||
char *dstptr, /* Pointer into string buffer */
|
||||
*dstend; /* End of string buffer */
|
||||
const unsigned char *srcend; /* End of Huffman data */
|
||||
unsigned char srcbyte; /* Current source string byte */
|
||||
int srcavail, /* How many bits are available in the current byte? */
|
||||
code, /* Assembled code */
|
||||
len, /* Length of assembled code */
|
||||
bits; /* Bits to grab */
|
||||
const _http2_huffman_t *dptr, /* Pointer into decoder table */
|
||||
*dend; /* End of decoder table */
|
||||
|
||||
|
||||
DEBUG_printf(("4_http2HuffmanDecode(dst=%p, dstsize=" CUPS_LLFMT ", src=%p, srclen=" CUPS_LLFMT ")", dst, CUPS_LLCAST dstsize, src, CUPS_LLCAST srclen));
|
||||
|
||||
/*
|
||||
* Initialize the decoder array as needed...
|
||||
*/
|
||||
|
||||
dend = http2_decode + (sizeof(http2_decode) / sizeof(http2_decode[0]));
|
||||
|
||||
if (!http2_decode_init)
|
||||
{
|
||||
_cupsMutexLock(&http2_decode_mutex);
|
||||
if (!http2_decode_init)
|
||||
{
|
||||
http2_decode_init = 1;
|
||||
memcpy(http2_decode, http2_encode, sizeof(http2_decode));
|
||||
qsort(http2_decode, sizeof(http2_decode) / sizeof(http2_decode[0]), sizeof(http2_decode[0]), (int (*)(const void *, const void *))http2_compare_decode);
|
||||
|
||||
for (len = 0, dptr = http2_decode; dptr < dend; dptr ++)
|
||||
{
|
||||
if (len != dptr->len)
|
||||
{
|
||||
http2_decode_next[len] = dptr;
|
||||
len = dptr->len;
|
||||
}
|
||||
|
||||
if ((dptr + 1) < dend && dptr[1].len != len)
|
||||
http2_decode_max[len] = dptr->code;
|
||||
}
|
||||
}
|
||||
_cupsMutexUnlock(&http2_decode_mutex);
|
||||
}
|
||||
|
||||
/*
|
||||
* Decode the string.
|
||||
*
|
||||
* Note: Initial implementation that has very little optimization applied.
|
||||
*/
|
||||
|
||||
dstptr = dst;
|
||||
dstend = dst + dstsize - 1;
|
||||
srcavail = 0;
|
||||
srcbyte = 0;
|
||||
srcend = src + srclen;
|
||||
|
||||
while (src < srcend || srcavail > 0)
|
||||
{
|
||||
/*
|
||||
* Each Huffman code has a minimum of 5 bits. We do a linear search of the
|
||||
* decode table, which has been sorted in ascending order for length and
|
||||
* code. If we don't find the code in the table we return an error.
|
||||
*/
|
||||
|
||||
code = 0;
|
||||
len = 0;
|
||||
dptr = http2_decode;
|
||||
|
||||
DEBUG_printf(("5_http2HuffmanDecode: init srcbyte=%02x, srcavail=%d", srcbyte, srcavail));
|
||||
|
||||
while (dptr < dend)
|
||||
{
|
||||
while (len < dptr->len)
|
||||
{
|
||||
/*
|
||||
* Get N more bits from the input...
|
||||
*/
|
||||
|
||||
if (srcavail == 0)
|
||||
{
|
||||
if (src < srcend)
|
||||
{
|
||||
srcbyte = *src++;
|
||||
srcavail = 8;
|
||||
|
||||
DEBUG_printf(("5_http2HuffmanDecode: cont srcbyte=%02x, srcavail=%d", srcbyte, srcavail));
|
||||
}
|
||||
else if (len < 8 && code == http2_masks[len])
|
||||
break;
|
||||
else
|
||||
{
|
||||
DEBUG_puts("5_http2HuffmanDecode: Early end-of-string.");
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
if ((bits = dptr->len - len) > srcavail)
|
||||
bits = srcavail;
|
||||
|
||||
DEBUG_printf(("5_http2HuffmanDecode: Pulling %d bits", bits));
|
||||
|
||||
if (bits == srcavail)
|
||||
{
|
||||
if (len == 0)
|
||||
{
|
||||
if (bits == 8)
|
||||
code = srcbyte;
|
||||
else
|
||||
code = srcbyte & http2_masks[bits];
|
||||
}
|
||||
else
|
||||
code = (code << bits) | (srcbyte & http2_masks[bits]);
|
||||
|
||||
srcavail = 0;
|
||||
}
|
||||
else if (len == 0)
|
||||
{
|
||||
code = (srcbyte >> (srcavail - bits)) & http2_masks[bits];
|
||||
srcavail -= bits;
|
||||
}
|
||||
else
|
||||
{
|
||||
code = (code << bits) | ((srcbyte >> (srcavail - bits)) & http2_masks[bits]);
|
||||
srcavail -= bits;
|
||||
}
|
||||
|
||||
len += bits;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (len < dptr->len)
|
||||
DEBUG_printf(("5_http2HuffmanDecode: code=%x, len=%d, srcavail=%d", code, len, srcavail));
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
|
||||
DEBUG_printf(("5_http2HuffmanDecode: code=%x, len=%d, dptr->len=%d", code, len, dptr->len));
|
||||
|
||||
if (len < dptr->len)
|
||||
break;
|
||||
|
||||
if (code > http2_decode_max[len])
|
||||
{
|
||||
dptr = http2_decode_next[len];
|
||||
continue;
|
||||
}
|
||||
|
||||
while (len == dptr->len)
|
||||
if (dptr->code == code)
|
||||
break;
|
||||
else
|
||||
dptr ++;
|
||||
|
||||
if (dptr->code == code && dptr->len == len)
|
||||
{
|
||||
DEBUG_printf(("5_http2HuffmanDecode: code=%x, len=%d, match='%c' (0x%02x)", (unsigned)code, len, dptr->ch, dptr->ch));
|
||||
|
||||
if (dstptr < dstend)
|
||||
*dstptr = (char)dptr->ch;
|
||||
|
||||
dstptr ++;
|
||||
break;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
DEBUG_printf(("5_http2HuffmanDecode: code=%x, len=%d, no match", (unsigned)code, len));
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
}
|
||||
|
||||
if (dstptr < dstend)
|
||||
*dstptr = '\0';
|
||||
else
|
||||
*dstend = '\0';
|
||||
|
||||
return ((size_t)(dstptr - dst));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_http2HuffmanEncode()' - Encode (compress) a string using HTTP/2 Huffman-coding.
|
||||
*
|
||||
* The return value contains the actual length of the string after encoding.
|
||||
*/
|
||||
|
||||
size_t /* O - Number of bytes used for Huffman */
|
||||
_http2HuffmanEncode(
|
||||
unsigned char *dst, /* I - Output buffer */
|
||||
size_t dstsize, /* I - Size of output buffer */
|
||||
const char *src) /* I - String to encode */
|
||||
{
|
||||
unsigned char *dstptr, /* Pointer into buffer */
|
||||
*dstend, /* End of buffer */
|
||||
dstbyte; /* Current output byte */
|
||||
int dstused, /* Current bits used */
|
||||
dstremaining; /* Remaining bits */
|
||||
int ch; /* Current character */
|
||||
int code, /* Huffman code */
|
||||
len; /* Length of Huffman code */
|
||||
|
||||
|
||||
/*
|
||||
* Note: Initial implementation that has very little optimization applied.
|
||||
*/
|
||||
|
||||
dstptr = dst;
|
||||
dstend = dst + dstsize;
|
||||
dstbyte = 0;
|
||||
dstused = 0;
|
||||
|
||||
while (*src)
|
||||
{
|
||||
ch = *src++ & 255;
|
||||
code = http2_encode[ch].code;
|
||||
len = http2_encode[ch].len;
|
||||
|
||||
while (len > 0)
|
||||
{
|
||||
if (dstused == 0)
|
||||
{
|
||||
if (len == 8)
|
||||
{
|
||||
dstbyte = (unsigned char)code;
|
||||
dstused = 8;
|
||||
}
|
||||
else if (len > 8)
|
||||
{
|
||||
dstbyte = (unsigned char)(code >> (len - 8));
|
||||
dstused = 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
dstbyte = (unsigned char)(code << (8 - len));
|
||||
dstused = len;
|
||||
}
|
||||
|
||||
len -= dstused;
|
||||
}
|
||||
else
|
||||
{
|
||||
dstremaining = 8 - dstused;
|
||||
|
||||
if (len == dstremaining)
|
||||
{
|
||||
dstbyte |= (unsigned char)(code & http2_masks[dstremaining]);
|
||||
dstused = 8;
|
||||
len = 0;
|
||||
}
|
||||
else if (len > dstremaining)
|
||||
{
|
||||
dstbyte |= (unsigned char)((code >> (len - dstremaining)) & http2_masks[dstremaining]);
|
||||
dstused = 8;
|
||||
len -= dstremaining;
|
||||
}
|
||||
else
|
||||
{
|
||||
dstbyte |= (unsigned char)((code << (dstremaining - len)) & http2_masks[dstremaining]);
|
||||
dstused += len;
|
||||
len = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (dstused == 8)
|
||||
{
|
||||
/*
|
||||
* "Write" a byte to the output buffer
|
||||
*/
|
||||
|
||||
if (dstptr < dstend)
|
||||
*dstptr = dstbyte;
|
||||
|
||||
dstptr ++;
|
||||
dstused = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dstused)
|
||||
{
|
||||
/*
|
||||
* Pad the output string with 1's as an End-Of-String code...
|
||||
*/
|
||||
|
||||
dstremaining = 8 - dstused;
|
||||
dstbyte |= http2_masks[dstremaining];
|
||||
if (dstptr < dstend)
|
||||
*dstptr = dstbyte;
|
||||
dstptr ++;
|
||||
}
|
||||
|
||||
return ((size_t)(dstptr - dst));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'http2_compare_decode()' - Compare two Huffman codes for decoding.
|
||||
*/
|
||||
|
||||
static int /* O - Result of comparison */
|
||||
http2_compare_decode(
|
||||
const _http2_huffman_t *a, /* I - First code */
|
||||
const _http2_huffman_t *b) /* I - Second code */
|
||||
{
|
||||
int result; /* Result of comparison */
|
||||
|
||||
|
||||
if ((result = a->len - b->len) == 0)
|
||||
result = a->code - b->code;
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: huffman.c 11990 2014-07-02 21:13:22Z msweet $".
|
||||
*/
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp-private.h 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: ipp-private.h 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Private IPP definitions for CUPS.
|
||||
*
|
||||
@@ -77,5 +77,5 @@ extern _ipp_option_t *_ippFindOption(const char *name);
|
||||
#endif /* !_CUPS_IPP_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp-private.h 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: ipp-private.h 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+6
-10
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp-support.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: ipp-support.c 12666 2015-05-25 19:38:09Z msweet $"
|
||||
*
|
||||
* Internet Printing Protocol support functions for CUPS.
|
||||
*
|
||||
@@ -78,8 +78,7 @@ static const char * const ipp_status_oks[] = /* "OK" status codes */
|
||||
"client-error-account-info-needed",
|
||||
"client-error-account-closed",
|
||||
"client-error-account-limit-reached",
|
||||
"client-error-account-authorization-failed",
|
||||
"client-error-not-fetchable"
|
||||
"client-error-account-authorization-failed"
|
||||
},
|
||||
* const ipp_status_480s[] = /* Vendor client errors */
|
||||
{
|
||||
@@ -247,8 +246,7 @@ static const char * const ipp_std_ops[] =
|
||||
},
|
||||
* const ipp_cups_ops2[] =
|
||||
{
|
||||
"CUPS-Get-Document",
|
||||
"CUPS-Create-Local-Printer"
|
||||
"CUPS-Get-Document"
|
||||
},
|
||||
* const ipp_tag_names[] =
|
||||
{ /* Value/group tag names */
|
||||
@@ -1565,7 +1563,6 @@ ippCreateRequestedArray(ipp_t *request) /* I - IPP request */
|
||||
"printer-input-tray", /* IPP JPS3 */
|
||||
"printer-is-accepting-jobs",
|
||||
"printer-is-shared", /* CUPS extension */
|
||||
"printer-is-temporary", /* CUPS extension */
|
||||
"printer-kind", /* IPP Paid Printing */
|
||||
"printer-location",
|
||||
"printer-make-and-model",
|
||||
@@ -1580,7 +1577,6 @@ ippCreateRequestedArray(ipp_t *request) /* I - IPP request */
|
||||
"printer-organization",
|
||||
"printer-organizational-unit",
|
||||
"printer-output-tray", /* IPP JPS3 */
|
||||
"printer-queue-id", /* CUPS extension */
|
||||
"printer-settable-attributes-supported",
|
||||
"printer-state",
|
||||
"printer-state-change-date-time",
|
||||
@@ -2051,8 +2047,8 @@ ippOpString(ipp_op_t op) /* I - Operation ID */
|
||||
return ("windows-ext");
|
||||
else if (op >= IPP_OP_CUPS_GET_DEFAULT && op <= IPP_OP_CUPS_GET_PPD)
|
||||
return (ipp_cups_ops[op - IPP_OP_CUPS_GET_DEFAULT]);
|
||||
else if (op >= IPP_OP_CUPS_GET_DOCUMENT && op <= IPP_OP_CUPS_CREATE_LOCAL_PRINTER)
|
||||
return (ipp_cups_ops2[op - IPP_OP_CUPS_GET_DOCUMENT]);
|
||||
else if (op == IPP_OP_CUPS_GET_DOCUMENT)
|
||||
return (ipp_cups_ops2[0]);
|
||||
|
||||
/*
|
||||
* No, build an "0xxxxx" operation string...
|
||||
@@ -2289,5 +2285,5 @@ ipp_col_string(ipp_t *col, /* I - Collection attribute */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp-support.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: ipp-support.c 12666 2015-05-25 19:38:09Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: ipp.c 12468 2015-02-01 04:50:43Z msweet $"
|
||||
*
|
||||
* Internet Printing Protocol functions for CUPS.
|
||||
*
|
||||
@@ -7062,5 +7062,5 @@ ipp_write_file(int *fd, /* I - File descriptor */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: ipp.c 12468 2015-02-01 04:50:43Z msweet $".
|
||||
*/
|
||||
|
||||
+6
-8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp.h 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: ipp.h 12666 2015-05-25 19:38:09Z msweet $"
|
||||
*
|
||||
* Internet Printing Protocol definitions for CUPS.
|
||||
*
|
||||
@@ -330,13 +330,12 @@ typedef enum ipp_op_e /**** IPP operations ****/
|
||||
IPP_OP_CUPS_ACCEPT_JOBS, /* Accept new jobs on a printer */
|
||||
IPP_OP_CUPS_REJECT_JOBS, /* Reject new jobs on a printer */
|
||||
IPP_OP_CUPS_SET_DEFAULT, /* Set the default printer */
|
||||
IPP_OP_CUPS_GET_DEVICES, /* Get a list of supported devices @deprecated@ */
|
||||
IPP_OP_CUPS_GET_PPDS, /* Get a list of supported drivers @deprecated@ */
|
||||
IPP_OP_CUPS_GET_DEVICES, /* Get a list of supported devices */
|
||||
IPP_OP_CUPS_GET_PPDS, /* Get a list of supported drivers */
|
||||
IPP_OP_CUPS_MOVE_JOB, /* Move a job to a different printer */
|
||||
IPP_OP_CUPS_AUTHENTICATE_JOB, /* Authenticate a job @since CUPS 1.2/OS X 10.5@ */
|
||||
IPP_OP_CUPS_GET_PPD, /* Get a PPD file @deprecated@ */
|
||||
IPP_OP_CUPS_GET_DOCUMENT = 0x4027, /* Get a document file @since CUPS 1.4/OS X 10.6@ */
|
||||
IPP_OP_CUPS_CREATE_LOCAL_PRINTER /* Create a local (temporary) printer @since CUPS 2.2 */
|
||||
IPP_OP_CUPS_GET_PPD, /* Get a PPD file @since CUPS 1.3/OS X 10.5@ */
|
||||
IPP_OP_CUPS_GET_DOCUMENT = 0x4027 /* Get a document file @since CUPS 1.4/OS X 10.6@ */
|
||||
|
||||
# ifndef _CUPS_NO_DEPRECATED
|
||||
# define IPP_PRINT_JOB IPP_OP_PRINT_JOB
|
||||
@@ -537,7 +536,6 @@ typedef enum ipp_status_e /**** IPP status codes ****/
|
||||
/* client-error-account-limit-reached */
|
||||
IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED,
|
||||
/* client-error-account-authorization-failed */
|
||||
IPP_STATUS_ERROR_NOT_FETCHABLE, /* client-error-not-fetchable */
|
||||
|
||||
/* Legacy status codes for paid printing */
|
||||
IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED = 0x049C,
|
||||
@@ -1036,5 +1034,5 @@ extern const char *ippStateString(ipp_state_t state) _CUPS_API_2_0;
|
||||
#endif /* !_CUPS_IPP_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp.h 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: ipp.h 12666 2015-05-25 19:38:09Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: langprintf.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: langprintf.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Localized printf/puts functions for CUPS.
|
||||
*
|
||||
@@ -337,5 +337,5 @@ _cupsSetLocale(char *argv[]) /* IO - Command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: langprintf.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: langprintf.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: language.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: language.c 12841 2015-08-10 17:07:30Z msweet $"
|
||||
*
|
||||
* I18N/language support for CUPS.
|
||||
*
|
||||
@@ -1624,5 +1624,5 @@ cups_unquote(char *d, /* O - Unquoted string */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: language.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: language.c 12841 2015-08-10 17:07:30Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ppd-localize.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: localize.c 12834 2015-08-06 13:56:32Z msweet $"
|
||||
*
|
||||
* PPD localization routines for CUPS.
|
||||
*
|
||||
@@ -775,5 +775,5 @@ ppd_ll_CC(char *ll_CC, /* O - Country-specific locale name */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ppd-localize.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: localize.c 12834 2015-08-06 13:56:32Z msweet $".
|
||||
*/
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ppd-mark.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: mark.c 12258 2014-11-19 12:38:44Z msweet $"
|
||||
*
|
||||
* Option marking routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -22,7 +22,6 @@
|
||||
*/
|
||||
|
||||
#include "cups-private.h"
|
||||
#include "ppd-private.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -1085,5 +1084,5 @@ ppd_mark_option(ppd_file_t *ppd, /* I - PPD file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ppd-mark.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: mark.c 12258 2014-11-19 12:38:44Z msweet $".
|
||||
*/
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: md5.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: md5.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
*
|
||||
* Private MD5 implementation for CUPS.
|
||||
*
|
||||
@@ -342,5 +342,5 @@ _cupsMD5Finish(_cups_md5_state_t *pms, unsigned char digest[16])
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: md5.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: md5.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: options.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
* "$Id: options.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Option routines for CUPS.
|
||||
*
|
||||
@@ -694,5 +694,5 @@ cups_find_option(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: options.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
* End of "$Id: options.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,20 +1,27 @@
|
||||
/*
|
||||
* "$Id: ppd-page.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: page.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* Page size functions for CUPS.
|
||||
* Page size functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* PostScript is a trademark of Adobe Systems, Inc.
|
||||
* PostScript is a trademark of Adobe Systems, Inc.
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* ppdPageSize() - Get the page size record for the given size.
|
||||
* ppdPageSizeLimits() - Return the custom page size limits.
|
||||
* ppdPageWidth() - Get the page width for the given size.
|
||||
* ppdPageLength() - Get the page length for the given size.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -385,5 +392,5 @@ ppdPageLength(ppd_file_t *ppd, /* I - PPD file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ppd-page.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: page.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
+6
-30
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ppd-cache.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
* "$Id: ppd-cache.c 12980 2015-11-17 21:23:32Z msweet $"
|
||||
*
|
||||
* PPD cache implementation for CUPS.
|
||||
*
|
||||
@@ -19,7 +19,6 @@
|
||||
*/
|
||||
|
||||
#include "cups-private.h"
|
||||
#include "ppd-private.h"
|
||||
#include <math.h>
|
||||
|
||||
|
||||
@@ -68,8 +67,7 @@ _cupsConvertOptions(ipp_t *request, /* I - IPP request */
|
||||
cups_option_t *options) /* I - Options */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
const char *keyword, /* PWG keyword */
|
||||
*password; /* Password string */
|
||||
const char *keyword; /* PWG keyword */
|
||||
pwg_size_t *size; /* PWG media size */
|
||||
ipp_t *media_col, /* media-col value */
|
||||
*media_size; /* media-size value */
|
||||
@@ -87,36 +85,14 @@ _cupsConvertOptions(ipp_t *request, /* I - IPP request */
|
||||
* Send standard IPP attributes...
|
||||
*/
|
||||
|
||||
if (pc->password && (password = cupsGetOption("job-password", num_options, options)) != NULL && ippGetOperation(request) != IPP_OP_VALIDATE_JOB)
|
||||
if (pc->password && (keyword = cupsGetOption("job-password", num_options, options)) != NULL && ippGetOperation(request) != IPP_OP_VALIDATE_JOB)
|
||||
{
|
||||
ipp_attribute_t *attr = NULL; /* job-password attribute */
|
||||
ippAddOctetString(request, IPP_TAG_OPERATION, "job-password", keyword, (int)strlen(keyword));
|
||||
|
||||
if ((keyword = cupsGetOption("job-password-encryption", num_options, options)) == NULL)
|
||||
keyword = "none";
|
||||
|
||||
if (!strcmp(keyword, "none"))
|
||||
{
|
||||
/*
|
||||
* Add plain-text job-password...
|
||||
*/
|
||||
|
||||
attr = ippAddOctetString(request, IPP_TAG_OPERATION, "job-password", password, (int)strlen(password));
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Add hashed job-password...
|
||||
*/
|
||||
|
||||
unsigned char hash[64]; /* Hash of password */
|
||||
ssize_t hashlen; /* Length of hash */
|
||||
|
||||
if ((hashlen = cupsHashData(keyword, password, strlen(password), hash, sizeof(hash))) > 0)
|
||||
attr = ippAddOctetString(request, IPP_TAG_OPERATION, "job-password", hash, (int)hashlen);
|
||||
}
|
||||
|
||||
if (attr)
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "job-password-encryption", NULL, keyword);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "job-password-encryption", NULL, keyword);
|
||||
}
|
||||
|
||||
if (pc->account_id)
|
||||
@@ -3835,5 +3811,5 @@ pwg_unppdize_name(const char *ppd, /* I - PPD keyword */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ppd-cache.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
* End of "$Id: ppd-cache.c 12980 2015-11-17 21:23:32Z msweet $".
|
||||
*/
|
||||
|
||||
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