Comparar commits

..

46 Commits

Autor SHA1 Mensagem Data
Michael Sweet d3331249b0 Import CUPS v2.1.2 2016-03-15 10:43:30 -04:00
Michael Sweet bc05464ada Import CUPS v2.1.1 2016-03-15 10:43:26 -04:00
Michael Sweet 348ce78265 Import CUPS v2.1.0 2016-03-15 10:43:24 -04:00
Michael Sweet be91b849f0 Import CUPS v2.1rc1 2016-03-15 10:43:21 -04:00
Michael Sweet c8d724e6bb Import CUPS v2.1b1 2016-03-15 10:43:16 -04:00
Michael Sweet 00d0ae86f6 Import CUPS v2.0.4 2016-03-15 10:40:47 -04:00
Michael Sweet a215cf8413 Import CUPS v2.0.3 2016-03-15 10:40:44 -04:00
Michael Sweet 4ef75dec45 Import CUPS v2.0.2 2016-03-15 10:40:41 -04:00
Michael Sweet 86243a7551 Import CUPS v2.0.1 2016-03-15 10:40:34 -04:00
Michael Sweet b93671244e Import CUPS v2.0.0 2016-03-15 10:40:30 -04:00
Michael Sweet 5d2cc5d32d Import CUPS v2.0rc1 2016-03-15 10:40:26 -04:00
Michael Sweet 1a18c85cd1 Import CUPS v2.0b1 2016-03-15 10:40:21 -04:00
Michael Sweet b60086f8ae Import CUPS v1.7.5 2016-03-15 10:37:32 -04:00
Michael Sweet 215ef63830 Import CUPS v1.7.4 2016-03-15 10:37:23 -04:00
Michael Sweet a51f28ec99 Import CUPS v1.7.3 2016-03-15 10:37:18 -04:00
Michael Sweet 71f63681cb Import CUPS v1.7.2 2016-03-15 10:37:10 -04:00
Michael Sweet 61515785f7 Import CUPS v1.7.1 2016-03-15 10:36:17 -04:00
msweet 75efa1051d Changelog.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11429 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-11-12 14:11:40 +00:00
msweet f9d9f12690 Mirror fix of typo.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11424 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-11-08 19:51:01 +00:00
msweet 7416dfe99a Mirror fix from trunk.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11422 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-11-08 19:44:10 +00:00
msweet dd0eea8e71 Mirror fix from trunk.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11418 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-11-08 15:18:01 +00:00
msweet 0c229544f4 More changelog.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11402 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-11-06 21:38:09 +00:00
msweet b3533f112d Mirror changes from trunk + changelog.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11399 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-11-06 21:36:35 +00:00
msweet 3b2526b366 These files too.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11397 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-11-06 20:09:46 +00:00
msweet ba38d7d9dc Make sure to substitute keywords.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11396 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-11-06 20:09:03 +00:00
msweet 4bdbabf76b Fix "make check" on Linux (<rdar://problem/14292998>)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11395 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-11-06 20:06:50 +00:00
msweet 64e918f26a Ignore generated files.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11394 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-11-06 16:04:55 +00:00
msweet 111ff13a26 Fix compiler warnings when building with newer versions of GNU TLS - code now
requires GNU TLS 2.0 or higher.


git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11392 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-11-06 01:29:56 +00:00
msweet f4515965b3 Mirror changes from trunk.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11383 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-11-05 02:24:05 +00:00
msweet c7233aabe5 Mirror changes from trunk.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11380 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-11-05 01:14:53 +00:00
msweet 8eabd901fe <rdar://problem/15386424> cups.org: gunzip bug prevents use of some gzip'd PPD files (and other issues)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11374 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-11-04 23:49:10 +00:00
msweet 1d708564b3 Mirror fix.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11372 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-11-01 18:22:37 +00:00
msweet e5d9b5e191 Mirror changes from trunk.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11370 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-10-30 15:08:29 +00:00
msweet 00c4573088 Mirror fix from trunk.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11367 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-10-28 15:35:57 +00:00
msweet 27efcd61e0 Add Italian localizations to packaging file.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11359 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-10-24 03:04:17 +00:00
msweet 06cefec35c Mirror fix from trunk.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11356 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-10-23 20:33:21 +00:00
msweet c2def0ced7 Mirror fix from trunk.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11353 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-10-23 19:53:08 +00:00
msweet e9152ac713 Mirror fix from trunk.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11345 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-10-18 21:14:52 +00:00
msweet 3d3f64a982 Mirror fix from trunk.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11319 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-09-27 16:18:26 +00:00
msweet 4ecc320364 Mirror fix from trunk.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11311 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-09-27 14:23:42 +00:00
msweet 60c3ee0499 Mirror fix from trunk.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11308 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-09-27 14:09:25 +00:00
msweet 305331a392 Don't use "rfo" for CUPS queues (mirror previous bug fix for mDNSResponder).
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11269 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-09-04 20:05:00 +00:00
msweet 40e88e9009 Update Japanese localization.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11265 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-08-29 20:11:25 +00:00
msweet 5f19ab52fe Mirror changes from trunk.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11240 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-08-14 20:33:55 +00:00
msweet 4a842d5397 Point source distributions to 1.7 branch.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11226 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-08-06 17:23:54 +00:00
msweet 75ff7c7fea Branch trunk for CUPS 1.7.x.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11224 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-08-06 17:05:52 +00:00
768 arquivos alterados com 66311 adições e 44484 exclusões
-3
Ver Arquivo
@@ -1,3 +0,0 @@
.git* export-ignore
.mailmap export-ignore
tools export-ignore
-153
Ver Arquivo
@@ -1,153 +0,0 @@
*.a
*.bck
*.cgi
*.dylib
*.gz
*.o
*.so
*.so.*
*.tokens
.buildrev
autom4te.cache
config.h
config.log
config.status
cups-config
Makedefs
backend/dnssd
backend/http
backend/ipp
backend/lpd
backend/mdns
backend/snmp
backend/socket
backend/test1284
backend/testbackend
backend/testsupplies
backend/usb
berkeley/lpc
berkeley/lpq
berkeley/lpr
berkeley/lprm
cgi-bin/testcgi
cgi-bin/testhi
cgi-bin/testhi.index
cgi-bin/testtemplate
conf/cups-files.conf
conf/cupsd.conf
conf/mime.convs
conf/pam.std
conf/snmp.conf
cups/locale/
cups/test.pwg
cups/testadmin
cups/testarray
cups/testcache
cups/testconflicts
cups/testcreds
cups/testcups
cups/testdest
cups/testfile
cups/testhttp
cups/testi18n
cups/testipp
cups/testlang
cups/testoptions
cups/testppd
cups/testpwg
cups/testsnmp
cups/tlscheck
desktop/cups.desktop
doc/index.html
doc/*/index.html
filter/commandtops
filter/gziptoany
filter/pstops
filter/rasterbench
filter/rastertoepson
filter/rastertohp
filter/rastertolabel
filter/rastertopwg
filter/test.raster
filter/testraster
locale/checkpo
locale/po2strings
locale/strings2po
man/client.conf.man
man/cups-files.conf.man
man/cups-lpd.man
man/cups-snmp.man
man/cupsaddsmb.man
man/cupsd.conf.man
man/cupsd.man
man/lpoptions.man
man/mantohtml
monitor/bcp
monitor/tbcp
notifier/dbus
notifier/mailto
notifier/rss
notifier/testnotify
packaging/cups.list
patches
ppdc/genstrings
ppdc/ppd/
ppdc/ppd2/
ppdc/ppdc
ppdc/ppdc-static
ppdc/ppdhtml
ppdc/ppdi
ppdc/ppdi-static
ppdc/ppdmerge
ppdc/ppdpo
ppdc/sample-import.drv
ppdc/sample.c
ppdc/testcatalog
scheduler/convert
scheduler/cups-deviced
scheduler/cups-driverd
scheduler/cups-exec
scheduler/cups-lpd
scheduler/cups-lpd.xinetd
scheduler/cups.sh
scheduler/cups.xml
scheduler/cupsd
scheduler/cupsfilter
scheduler/org.cups.cups-lpd.plist
scheduler/org.cups.cups-lpdAT.service
scheduler/org.cups.cupsd.path
scheduler/org.cups.cupsd.service
scheduler/org.cups.cupsd.socket
scheduler/testlpd
scheduler/testmime
scheduler/testspeed
scheduler/testsub
systemv/accept
systemv/cancel
systemv/cupsaccept
systemv/cupsaddsmb
systemv/cupsctl
systemv/cupsdisable
systemv/cupsenable
systemv/cupsreject
systemv/cupstestdsc
systemv/cupstestppd
systemv/lp
systemv/lpadmin
systemv/lpinfo
systemv/lpmove
systemv/lpoptions
systemv/lpstat
systemv/reject
templates/header.tmpl
templates/*/header.tmpl
test/cups-str-*.html
test/error_log-*
test/ippfind
test/ippfind-static
test/ippserver
test/ipptool
test/ipptool-static
xcode/CUPS.xcodeproj/project.xcworkspace/
xcode/CUPS.xcodeproj/xcuserdata/
-11
Ver Arquivo
@@ -1,11 +0,0 @@
# Prevent git from showing duplicate names with commands like "git shortlog"
# See the manpage of git-shortlog for details.
# The syntax is:
# Name that should be used <email that should be used> Bad name <bad email>
#
# You can skip Bad name if it is the same as the one that should be used, and is unique.
#
# This file is up-to-date if the command git log --format="%aN <%aE>" | sort -u
# gives no duplicates.
Michael R Sweet <michaelrsweet@gmail.com> msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Michael R Sweet <michaelrsweet@gmail.com> Michael Sweet <msweet@msweet-imac.local>
-150
Ver Arquivo
@@ -1,150 +0,0 @@
CHANGES-2.1.txt
---------------
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)
- 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 (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)
+168
Ver Arquivo
@@ -0,0 +1,168 @@
CHANGES-IPPTOOL.txt - 2015-05-15
--------------------------------
This file provides a list of changes to the ipptool binary distribution posted
on CUPS.org.
2014-05-15
- Added support for simultaneous XML and test output from ipptool.
- Added support for PAUSE directive in ipptool test files.
2013-07-15
- New ippfind tool now included with ipptool.
- Added support for automatically extending the timeout when all of the
request data has not yet been written (all platforms but Windows
which does not support it...)
- Fixed several ipptool test files that used old STATUS names.
2013-04-18
- Fixed some HTTP issues with authentication and compression.
- The IPP/1.1 test file did not allow for sufficient retries when
printing.
- The IPP/1.1 test file did not allow for empty printer-name values.
- The IPP Everywhere test file contained numerous errors.
- The color.jpg test file used a progressive mode instead of the
baseline JPEG mode.
- The IPP/1.1 test file referenced "color.jpeg" instead of "color.jpg".
2013-01-31
- Added support for DEFINE-MATCH and DEFINE-NO-MATCH as STATUS
predicates.
- Added support for WITH-VALUE and resolution values.
- Added support for SKIP-IF-MISSING (skip test if file is missing)
- Added support for octetString values.
- Added support for document compression in Print-Job and Send-Document
requests.
- Fixed REPEAT-MATCH for STATUS and EXPECT - was incorrectly erroring
out.
- Fixed a bug where bad IPP responses would cause ipptool to crash.
2012-02-28
- Changed behavior of WITH-VALUES "/regex/" to not require all values to
match.
- Added WITH-ALL-VALUES directive for EXPECT predicates that require all
values to match.
- Updated test files to use WITH-ALL-VALUES where necessary.
- Updated test files to use new ABNF for media names from PWG Media
Names 2.0.
2012-02-06
- Fixed the packaging of ipptool on Windows (removed unnecessary DLLs)
- Fixed an crash in ipptool when mixing DISPLAY with -I and a failed
request.
- Added a Print-Job test file.
- Added a "setdebug" batch file for Windows
- Added support for a CUPS_DISABLE_ASYNC_CONNECT environment variable.
2012-01-10
- Fixed an issue with the IPP/1.1 test file where the "waiting for job
completion" test did not work.
- The attribute groups out of order error was not shown for the
operation-attributes-tag group.
2011-12-02
- Fixed a truncated XML output bug that would happen for certain errors.
- Fixed the order-of-groups tests.
- Fixed "WITH-VALUE >N" for rangeOfInteger attributes.
- The Windows installer was missing the get-printer-attributes.test
file.
- The Linux binaries are now compiled for all LSB 4.x-compliant Linux
distributions.
- The Linux binaries no longer support SSL or TLS.
2011-10-05
- Fixed a crasher bug that showed up on Windows.
- The IPP/1.1 test would hang if the initial Print-Job test failed.
- Fixed a typo in the IPP/2.0 test.
2011-10-03
- Using OF-TYPE with the "no-value" or "unknown" out-of-band value tags
now works without special WITH-VALUE strings.
- ipptool now shows an error when an attribute appears more than once
within the same attribute group.
- ipptool did not display attributes as specified by the DISPLAY
directive when a test error failed.
- Fixed one spot where DEFINE-VALUE was still treated as an error when
the EXPECT test failed.
- uriScheme values were not displayed properly.
- Updated the IPP/1.1 tests to properly validate support for
job-hold-until-default and job-hold-until-supported when the Hold-Job
operation is supported.
- Updated the IPP/1.1 tests to properly check for the various standard
media sizes for the printing tests.
- Updated the IPP/1.1 tests to accept "no-value" for media-default an
orientation-requested-default.
- Updated the IPP/1.1 tests to accept "unknown" for job-state.
- Updated the IPP/1.1 tests to not perform the bogus URI printing tests
unless the "document-uri" variable is defined.
- Updated the IPP/2.0 tests to properly validate media-col
"media-xxx-supported" attributes.
- Updated the IPP/2.2 tests to properly validate media-ready and
media-col-ready.
2011-09-28
- Test output now includes a summary and overall score at the end.
- The MATCH-VALUE predicate now correctly deals with a failed EXPECT
condition.
- The IPP/1.1 test suite now looks for legacy media names and uses them
if the corresponding PWG standard names are not present.
- The IPP/1.1 test suite now tests the Print-Job+Release-Job when the
printer supports the job-hold-until attribute, Hold-Job operation, and
Release-Job operation.
2011-09-21
- Fixes for HTTP chunking, timeout, and encryption issues reported by
various users.
- Greatly improved IPP tests with added IPP/2.2 tests.
- New test documents - 1-page and 4-page mixed A4/Letter PDF/PS and a
couple JPEGs.
- New REPEAT directives to programmatically repeat tests as needed.
2011-08-16
- The Windows version no longer requires Visual Studio to be installed.
- The Windows version now supports SSL.
- Added "ipps" URI support.
- Added a new "-T" option.
- Added support for fractional seconds for the -i option and DELAY
directive.
- Added support for authentication.
- Added DEFINE-MATCH, DEFINE-NO-MATCH, DEFINE-VALUE, IF-NOT-DEFINED,
IGNORE-ERRORS, SKIP-IF-DEFINED, SKIP-IF-NOT-DEFINED,
SKIP-PREVIOUS-ERROR directives.
- WITH-VALUE now supports variable expansion.
- Updated the IPP/1.1 conformance test to skip the "my-jobs different
user" test if the printer URI contains a username.
- Updated the IPP conformance tests to validate media, media-default,
and media-supported values.
- No longer error out if a Printer returns a different version number in
the response when the request contains the version 0.0.
2010-10-16
- Initial release of standalone binary.
+97 -103
Ver Arquivo
@@ -1,119 +1,113 @@
CHANGES.txt - 2.2.2 - 2017-01-17
CHANGES.txt - 2.1.2 - 2015-12-02
--------------------------------
CHANGES IN CUPS V2.2.2
CHANGES IN CUPS V2.1.2
- Fixed some issues with the Zebra ZPL printer driver (Issue #4898)
- Fixed some issues with IPP Everywhere printer support (Issue #4893,
Issue #4909, Issue #4916, Issue #4921, Issue #4923, Issue #4932,
Issue #4933, Issue #4938)
- The rastertopwg filter could crash with certain input (Issue #4942)
- Optimized connection usage in the IPP backend
(<rdar://problem/29547323>)
- The scheduler did not detect when an encrypted connection was closed
by the client on Linux (Issue #4901)
- The cups-lpd program did not catch all legacy usage of ISO-8859-1
(Issue #4899)
- Fixed builds on systems without a working poll() implementation
(Issue #4905)
- Added a USB quirk rule for the Kyocera Ecosys P6026cdn (Issue #4900)
- The scheduler no longer creates log files on startup
(<rdar://problem/28332470>)
- The ippContainsString function now uses case-insensitive comparisons
for mimeMediaType, name, and text values in conformance with RFC 2911.
- The network backends now log the addresses that were found for a
printer (<rdar://problem/29268474>)
- Let's Encrypt certificates did not work when the hostname contained
uppercase letters (Issue #4919)
- Fixed reporting of printed pages in the web interface (Issue #4924)
- Updated systemd config files (Issue #4935)
- Updated documentation (PR #4896)
- Updated localizations (PR #4894, PR #4895, PR #4904, PR #4908,
Issue #4946)
- Updated packaging files (Issue #4940)
- 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.2.1
CHANGES IN CUPS V2.1.1
- Added "CreateSelfSignedCerts" directive for cups-files.conf to
control whether the scheduler automatically creates its own
self-signed X.509 certificates for TLS connections (Issue #4876)
- http*Connect did not handle partial failures (Issue #4870)
- Addressed some build warnings on Linux (Issue #4881)
- cupsHashData did not use the correct hashing algorithm
(<rdar://problem/28209220>)
- Updated man pages (PR #4885)
- Updated localizations (PR #4877, PR #4886)
- 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.2.0
CHANGES IN CUPS V2.1.0
- Normalized the TLS certificate validation code and added additional
error messages to aid troubleshooting.
- http*Connect did not work on Linux when cupsd was not running
(Issue #4870)
- The --no-remote-any option of cupsctl had no effect (Issue #4866)
- http*Connect did not return early when all addresses failed
(Issue #4870)
- 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.2rc1
CHANGES IN CUPS V2.1rc1
- Updated the list of supported IPP Everywhere media types.
- The IPP backend did not validate TLS credentials properly.
- The printer-state-message attribute was not cleared after a
print job with no errors (Issue #4851)
- The CUPS-Add-Modify-Class and CUPS-Add-Modify-Printer operations did
not always return an error for failed adds (Issue #4854)
- PPD files with names longer than 127 bytes did not work (Issue #4860)
- Updated localizations (Issue #4846, PR #4858)
- 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.2b2
CHANGES IN CUPS V2.1b1
- Added Upstart support (PR #4825)
- CUPS now supports Let's Encrypt certificates on Linux.
- 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)
CHANGES IN CUPS V2.2b1
- All CUPS commands now support POSIX options (Issue #4813)
- The scheduler now restarts faster (Issue #4760)
- Improved performance of web interface with large numbers of jobs
(Issue #3819)
- Encrypted printing can now be limited to only trusted printers and
servers (<rdar://problem/25711658>)
- The scheduler now advertises PWG Raster attributes for IPP Everywhere
clients (Issue #4428)
- The scheduler now logs informational messages for jobs at LogLevel
"info" (Issue #4815)
- The scheduler now uses the getgrouplist function when available
(Issue #4611)
- The IPP backend no longer enables compression by default except for
certain raster formats that generally benefit from it
(<rdar://problem/25166952>)
- The scheduler did not handle out-of-disk situations gracefully
(Issue #4742)
- The LPD mini-daemon now detects invalid UTF-8 sequences in job,
document, and user names (Issue #4748)
- 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 macOS
(<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>)
- Localization fixes (<rdar://problem/25292403>,
<rdar://problem/25461517>, Issue #4041, Issue #4796)
- Documentation changes (Issue #4624, Issue #4781)
- Packaging fixes (PR #4832)
-635
Ver Arquivo
@@ -1,635 +0,0 @@
# Contributing to CUPS
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. Github pull requests can also be
used to submit changes.
## 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, macOS, 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 macOS system and express any
non-macOS 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.
+5 -7
Ver Arquivo
@@ -1,10 +1,9 @@
CREDITS.txt - 2016-06-21
CREDITS.txt - 2013-07-23
------------------------
Few projects are completed by one person, and CUPS is no exception. We'd
like to thank the following individuals for their contributions:
Niklas 'Nille' Åkerström - Swedish localization.
Nathaniel Barbour - Lots of testing and feedback.
N. Becker - setsid().
Philippe Combes - French localization and buttons script.
@@ -18,20 +17,20 @@ like to thank the following individuals for their contributions:
Wang Jian - CUPS RPM corrections.
Roderick Johnstone - Beta tester of the millenium.
Till Kamppeter - Bug fixes, beta testing, evangelism.
Iñaki Larrañaga - Basque localization.
Kenshi Muto - Japanese localization, patches, and
testing.
Tomohiro Kato - Japanese localization.
Kiko - Bug fixes.
Sergey V. Kovalyov - ESP Print Pro and CUPS beta tester.
Marek Laane - Estonian translation.
Iñaki Larrañaga - Basque localization.
Mark Lawrence - Microsoft interoperability testing.
Jeff Licquia - Bug fixes, beta testing, evangelism.
Jason McMullan - Original CUPS RPM distributions.
Àngel Mompó - Catalan localization.
Wes Morgan - *BSD fixes.
Kenshi Muto - Japanese localization, patches, and
testing.
Brian Norris - Upstart support.
Daniel Nylander - Swedish localization.
Niklas 'Nille' Åkerström - Swedish localization.
Naruiko Ogasawara - Japanese localization.
Giulio Orsero - Bug fixes and testing.
Michal Osowiecki - Polish localization.
@@ -41,7 +40,6 @@ like to thank the following individuals for their contributions:
Petter Reinholdtsen - HP-UX compiler stuff.
Juan Pablo González Riopedre - Spanish localization.
Giovanni Scafora - Italian localization.
Joachim Schwender - German localization.
Opher Shachar - Hebrew localization.
Stuart Stevens - HP JetDirect IPP information.
Andrea Suatoni - IRIX desktop integration and testing.
+16 -15
Ver Arquivo
@@ -1,4 +1,4 @@
INSTALL - CUPS v2.2.2 - 2017-01-17
INSTALL - CUPS v2.1.2 - 2015-12-02
----------------------------------
This file describes how to compile and install CUPS from source code. For more
@@ -30,15 +30,24 @@ BEFORE YOU BEGIN
make does not support "include".
Besides these tools you'll want ZLIB library for compression support, the
GNU TLS library for encryption support on platforms other than iOS, macOS,
or Windows, and either MIT (1.6.3 or higher) or Heimdal Kerberos for
Kerberos support. CUPS will compile and run without these, however you'll
miss out on many of the features provided by CUPS.
CDSA, GNU TLS, or OpenSSL libraries for encryption support, and either MIT
(1.6.3 or higher) or Heimdal Kerberos for Kerberos support. CUPS will
compile and run without these, however you'll miss out on many of the
features provided by CUPS.
Also, please note that CUPS does not include print filters to support PDF
or raster printing. You *must* download GPL Ghostscript and/or the Open
Printing CUPS filters package separately to print on operating systems
other than macOS.
other than OS X.
COMPILING THE SUBVERSION REPOSITORY CODE
The CUPS Subversion repository doesn't hold a copy of the pre-built
configure script. You'll need to run the GNU autoconf software (2.60 or
higher) to create it:
autoconf
CONFIGURATION
@@ -89,19 +98,11 @@ CONFIGURATION
and diagnose a variety of common problems - use the "--enable-unit-tests"
configure option to run them at build time.
On macOS, use the "--with-archflags" option to build with the correct set of
On OS X, use the "--with-archflags" option to build with the correct set of
architectures:
./configure --with-archflags="-arch i386 -arch x86_64" ...
Note: Current versions of macOS DO NOT allow installation to
/usr with the default system integrity settings. In addition,
we do not recommend replacing the CUPS supplied with macOS
because not all versions of CUPS are compatible with every
macOS release, and because software updates will replace parts
of your local installation potentially rendering your system
unusable.
Once you have configured things, just type:
make ENTER
+232
Ver Arquivo
@@ -0,0 +1,232 @@
IPPTOOL.txt - 2013-07-15
------------------------
See the file CHANGES-IPPTOOL.txt for a list of changes to this software.
INTRODUCTION
CUPS includes two user programs for IPP printers. The first is called
ipptool and can be used to send arbitrary IPP requests to a CUPS server or
IPP printer. This tool started life as part of the CUPS automated test
suite and has grown to support complex conformance tests and a simple way
to query printer, job, and subscription attributes.
The second program called ippfind that can be used to find IPP printers
that have registered themselves using Bonjour (DNS-SD, mDNS, and Zeroconf)
and run commands such as ipptool.
READING THE DOCUMENTATION
Full documentation on the ipptool command can be found in the
"man-ipptool.html" and "man-ipptoolfile.html" files; the latter describes
the test file format supported by ipptool.
Full documentation on the ippfind command can be found in the
"man-ippfind.html" file.
IPPFIND BASIC USAGE
The ippfind command can be used to discover IPP printers on your network.
For example, the following command prints the printer URI of registered IPP
printers:
ippfind
To find all color IPP printers, run:
ippfind --txt-color T
And to run the IPP Everywhere conformance test file on every registered IPP
printer, run the following command:
ippfind _ipp._tcp,_print --exec ipptool -t '{}' ipp-everywhere.test \;
IPPTOOL BASIC USAGE
The ipptool command requires a printer URI and one or more "test" files that
describe the operations, attributes to display, and expected status and
attribute values. Several standard files are included with CUPS, for example
to show a list of pending print jobs on a CUPS printer called "myprinter"
you'd run:
ipptool ipp://localhost/printers/myprinter get-jobs.test
which would produce something like this:
job-id job-state job-name job-originating-user-name
------ ------------ ------------ -------------------------
72 pending testfile.pdf msweet
73 pending testfile.ps msweet
74 pending-held testfile.jpg msweet
75 pending-held testfile.txt msweet
To get output suitable for import into a spreadsheet, use the "-c" (CSV)
option:
ipptool -c ipp://localhost/printers/myprinter get-jobs.test
which will produce something like this:
job-id,job-state,job-name,job-originating-user-name
72,pending,testfile.pdf,msweet
73,pending,testfile.ps,msweet
74,pending-held,testfile.jpg,msweet
75,pending-held,testfile.txt,msweet
STANDARD TEST FILES
The following standard test files are included with ipptool:
create-printer-subscription.test Creates a printer subscription for
state change notifications
get-completed-jobs.test Shows a list of completed jobs
get-jobs.test Shows a list of pending jobs
get-notifications.test Shows events for an ippget
subscription.
get-printer-attributes.test Shows printer attributes
get-subscriptions.test Shows a list of subscriptions
ipp-1.1.test IPP/1.1 conformance test suite
ipp-2.0.test IPP/2.0 conformance test suite
ipp-2.1.test IPP/2.1 conformance test suite
ipp-2.2.test IPP/2.2 conformance test suite
ipp-everywhere.test IPP Everywhere conformance test
suite
print-job.test Prints a file
print-job-deflate.test Prints a file, compressing with
deflate.
print-job-gzip.test Prints a file, compressing with gzip
validate-job.test Validates attributes for a job
submission.
CONFORMANCE TESTS
We provide basic IPP conformance tests for IPP/1.1, IPP/2.0, IPP/2.1,
IPP/2.2, and IPP Everywhere. For a given printer URI, the following
commands perform tests at each level:
ipptool -tf filename [options] -I printer-uri ipp-1.1.test
ipptool -tf filename [options] -I -V 2.0 printer-uri ipp-2.0.test
ipptool -tf filename [options] -I -V 2.1 printer-uri ipp-2.1.test
ipptool -tf filename [options] -I -V 2.2 printer-uri ipp-2.2.test
The filename must use a format supported by the printer; ipptool will guess
the MIME media type using the extension, otherwise application/octet stream
will be used. The following standard test files are included:
color.jpg
document-a4.pdf
document-a4.ps
document-letter.pdf
document-letter.ps
gray.jpg
onepage-a4.pdf
onepage-a4.ps
onepage-letter.pdf
onepage-letter.ps
testfile.jpg
testfile.pcl
testfile.pdf
testfile.ps
testfile.txt
Useful options include the following:
-4 Connect using IPv4
-6 Connect using IPv6
-C Send chunked requests (default)
-d name=val Define a variable
-E Test IPP with HTTP Upgrade to TLS
-L Send requests using the Content-Length header (HTTP/1.0)
-S Test IPP over HTTPS (default for ipps: URIs)
-T seconds Set a timeout for responses in seconds
-v Be verbose, showing all attributes sent and received
-X Produce XML (Apple plist) output
The printer-uri must be a URI supported by the printer using the "ipp" or
"ipps" scheme, for example:
ipp://192.168.0.1/ipp
ipps://192.168.0.1/ipp/print
Print-by-reference (URL) printing can be tested by defining the document-uri
variable as a URL, for example:
ipptool -tf filename -d document-uri=url -I printer-uri ipp-1.1.test
The standard test files are available on cups.org under the "test"
directory, for example:
ipptool -tf document-a4.pdf \
-d document-uri=http://www.cups.org/test/document-a4.pdf \
ipp://192.168.0.1/ipp -I -V 2.0 ipp-2.0.test
The "document" test files contain 4 pages each. Doing the IPP conformance
tests will will produce up to 90 pages on various media, depending on the
printer.
IPP EVERYWHERE TESTING
The IPP Everywhere tests use sample PWG raster files available from:
ftp://ftp.pwg.org/pub/pwg/ipp/examples
Extract the corresponding ZIP archives into the current directory before
running the ipp-everywhere.test file. The test file will attempt to print
each PWG Raster file that is supported by the printer being tested - up to
372 pages including the 90 pages produced by the regular IPP test suite.
GETTING SUPPORT AND OTHER RESOURCES
If you have problems, READ THE DOCUMENTATION FIRST! We also provide
discussion forums which are available at:
http://www.cups.org/
REPORTING BUGS
If you believe you have discovered a bug in ippfind or ipptool, please fill
out the bug form at:
http://www.cups.org/str.php
Be sure to identify the version of CUPS and ippfind/ipptool (if you
downloaded the standalone version) you are using, the printer (if any) and
firmware version, and include any files that apply.
If you downloaded the standalone version of ippfind/ipptool, please also
re-run the command with debug logging enabled. Run the following commands
on Windows to enable debug logging:
setdebug.bat
For Linux and Mac OS X use:
CUPS_DEBUG_LOG=ipptool.log; export CUPS_DEBUG_LOG
CUPS_DEBUG_LEVEL=6; export CUPS_DEBUG_LEVEL
Then when you run the ippfind or ipptool command a new "ipptool.log" file
will be created with detailed information - attach this file to the bug you
file as well.
LEGAL STUFF
CUPS is Copyright 2007-2013 by Apple Inc. CUPS and the CUPS logo are
trademarks of Apple Inc.
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
CUPS is provided under the terms of version 2 of the GNU General Public
License and GNU Library General Public License. This program is distributed
in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the "doc/help/license.html" or "LICENSE.txt" files for more information.
+3 -3
Ver Arquivo
@@ -1,6 +1,6 @@
CUPS License Agreement
Copyright 2007-2016 by Apple Inc.
Copyright 2007-2013 by Apple Inc.
1 Infinite Loop
Cupertino, CA 95014 USA
@@ -70,8 +70,8 @@ the following special exception:
b. An Apple Operating System means any operating system
software developed and/or marketed by Apple Inc.,
including but not limited to all existing releases and
versions of Apple's Darwin, iOS, macOS, macOS Server, and
tvOS products and all follow-on releases and future
versions of Apple's Darwin, OS X, and OS X Server
products and all follow-on releases and future
versions thereof.
c. This exception is only available for Apple
+8 -1
Ver Arquivo
@@ -1,4 +1,6 @@
#
# "$Id: Makedefs.in 12519 2015-02-17 13:10:19Z msweet $"
#
# Common makefile definitions for CUPS.
#
# Copyright 2007-2014 by Apple Inc.
@@ -8,7 +10,7 @@
# 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
# missing or damaged, see the license at "http://www.cups.org/".
# file is missing or damaged, see the license at "http://www.cups.org/".
#
#
@@ -259,3 +261,8 @@ USBQUIRKS = @USBQUIRKS@
echo -n Compressing $<...
$(RM) $@
gzip -v9 <$< >$@
#
# End of "$Id: Makedefs.in 12519 2015-02-17 13:10:19Z msweet $"
#
+24 -7
Ver Arquivo
@@ -1,14 +1,16 @@
#
# "$Id: Makefile 12414 2015-01-21 00:02:04Z msweet $"
#
# Top-level Makefile for CUPS.
#
# Copyright 2007-2016 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
# 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
# missing or damaged, see the license at "http://www.cups.org/".
# file is missing or damaged, see the license at "http://www.cups.org/".
#
include Makedefs
@@ -128,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:
@@ -266,11 +265,17 @@ debugcheck: all unittests
#
apihelp:
for dir in cups filter; do\
for dir in cgi-bin cups filter ppdc scheduler; do\
echo Generating API help in $$dir... ;\
(cd $$dir; $(MAKE) $(MFLAGS) apihelp) || exit 1;\
done
framedhelp:
for dir in cgi-bin cups filter ppdc scheduler; do\
echo Generating framed API help in $$dir... ;\
(cd $$dir; $(MAKE) $(MFLAGS) framedhelp) || exit 1;\
done
#
# Create an Xcode docset using Mini-XML's mxmldoc (http://www.msweet.org/)...
@@ -314,15 +319,22 @@ sloc:
EPMFLAGS = -v --output-dir dist $(EPMARCH)
bsd deb epm pkg rpm slackware:
bsd deb pkg slackware:
epm $(EPMFLAGS) -f $@ cups packaging/cups.list
epm:
epm $(EPMFLAGS) -s packaging/installer.gif cups packaging/cups.list
rpm:
epm $(EPMFLAGS) -f rpm -s packaging/installer.gif cups packaging/cups.list
.PHONEY: dist
dist: all
$(RM) -r dist
$(MAKE) $(MFLAGS) epm
case `uname` in \
*BSD*) $(MAKE) $(MFLAGS) bsd;; \
Darwin*) $(MAKE) $(MFLAGS) osx;; \
Linux*) test ! -x /usr/bin/rpm || $(MAKE) $(MFLAGS) rpm;; \
SunOS*) $(MAKE) $(MFLAGS) pkg;; \
esac
@@ -333,3 +345,8 @@ dist: all
#
.NOTPARALLEL:
#
# End of "$Id: Makefile 12414 2015-01-21 00:02:04Z msweet $".
#
+4 -9
Ver Arquivo
@@ -1,4 +1,4 @@
README - CUPS v2.2.2 - 2017-01-17
README - CUPS v2.1.2 - 2015-12-02
---------------------------------
Looking for compile instructions? Read the file "INSTALL.txt" instead...
@@ -7,7 +7,7 @@ Looking for compile instructions? Read the file "INSTALL.txt" instead...
INTRODUCTION
CUPS is a standards-based, open source printing system developed by Apple
Inc. for macOS® and other UNIX®-like operating systems. CUPS uses the
Inc. for OS® X and other UNIX®-like operating systems. CUPS uses the
Internet Printing Protocol ("IPP") and provides System V and Berkeley
command-line interfaces, a web interface, and a C API to manage printers and
print jobs. It supports printing to both local (parallel, serial, USB) and
@@ -44,7 +44,7 @@ GETTING SUPPORT AND OTHER RESOURCES
If you have problems, READ THE DOCUMENTATION FIRST! We also provide two
mailing lists which are available at:
http://lists.cups.org/mailman/listinfo
http://www.cups.org/lists.php
See the CUPS web site at "http://www.cups.org/" for other resources.
@@ -111,11 +111,6 @@ SETTING UP PRINTER QUEUES FROM THE COMMAND-LINE
The sample drivers provide basic printing capabilities, but generally do not
exercise the full potential of the printers or CUPS.
CUPS also supports IPP Everywhere printers using the "everywhere" model,
for example:
lpadmin -p printername -E -v ipp://11.22.33.44/ipp/print -m everywhere
PRINTING FILES
@@ -145,7 +140,7 @@ PRINTING FILES
LEGAL STUFF
CUPS is Copyright 2007-2017 by Apple Inc. CUPS and the CUPS logo are
CUPS is Copyright 2007-2015 by Apple Inc. CUPS and the CUPS logo are
trademarks of Apple Inc.
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
+25 -20
Ver Arquivo
@@ -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
+17 -16
Ver Arquivo
@@ -1,16 +1,18 @@
#
# Backend makefile for CUPS.
# "$Id: Makefile 11859 2014-05-08 22:42:44Z msweet $"
#
# Copyright 2007-2016 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
# Backend makefile for CUPS.
#
# 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
# missing or damaged, see the license at "http://www.cups.org/".
# Copyright 2007-2014 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
#
# This file is subject to the Apple OS-Developed Software exception.
# 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 ../Makedefs
@@ -86,7 +88,7 @@ unittests: $(UNITTESTS)
#
clean:
$(RM) $(OBJS) $(TARGETS) $(UNITTESTS) $(LIBOBJS) http https ipps mdns socket-static
$(RM) $(OBJS) $(TARGETS) $(UNITTESTS) $(LIBOBJS) http https ipps mdns
#
@@ -293,12 +295,6 @@ socket: socket.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
$(CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS)
socket-static: socket.o ../cups/$(LIBCUPSSTATIC) libbackend.a
echo Linking $@...
$(CC) $(LDFLAGS) -o socket-static socket.o libbackend.a \
../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
$(COMMONLIBS) $(LIBZ)
#
# usb
@@ -316,3 +312,8 @@ usb.o: usb.c usb-darwin.c usb-libusb.c usb-unix.c
#
include Dependencies
#
# End of "$Id: Makefile 11859 2014-05-08 22:42:44Z msweet $".
#
+7 -1
Ver Arquivo
@@ -1,4 +1,6 @@
/*
* "$Id: backend-private.h 11558 2014-02-06 18:33:34Z msweet $"
*
* Backend support definitions for CUPS.
*
* Copyright 2007-2014 by Apple Inc.
@@ -312,7 +314,6 @@ extern int backendGetDeviceID(int fd, char *device_id,
extern int backendGetMakeModel(const char *device_id,
char *make_model,
size_t make_model_size);
extern http_addrlist_t *backendLookup(const char *hostname, int port, int *cancel);
extern int backendNetworkSideCB(int print_fd, int device_fd,
int snmp_fd, http_addr_t *addr,
int use_bc);
@@ -330,3 +331,8 @@ extern int backendWaitLoop(int snmp_fd, http_addr_t *addr,
}
# endif /* __cplusplus */
#endif /* !_CUPS_BACKEND_PRIVATE_H_ */
/*
* End of "$Id: backend-private.h 11558 2014-02-06 18:33:34Z msweet $".
*/
+16 -5
Ver Arquivo
@@ -1,4 +1,6 @@
/*
* "$Id: dnssd.c 12970 2015-11-13 20:02:51Z msweet $"
*
* DNS-SD discovery backend for CUPS.
*
* Copyright 2008-2015 by Apple Inc.
@@ -1040,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...
@@ -1053,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...
@@ -1188,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)
{
/*
@@ -1200,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);
}
}
@@ -1313,3 +1319,8 @@ unquote(char *dst, /* I - Destination buffer */
*dst = '\0';
}
/*
* End of "$Id: dnssd.c 12970 2015-11-13 20:02:51Z msweet $".
*/
+9 -3
Ver Arquivo
@@ -1,7 +1,9 @@
/*
* "$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
@@ -18,7 +20,6 @@
*/
#include "backend-private.h"
#include <cups/ppd-private.h>
/*
@@ -88,7 +89,7 @@ backendGetDeviceID(
*device_id = '\0';
# ifdef __linux
if (ioctl(fd, LPIOC_GET_DEVICE_ID((unsigned)device_id_size), device_id))
if (ioctl(fd, LPIOC_GET_DEVICE_ID(device_id_size), device_id))
{
/*
* Linux has to implement things differently for every device it seems.
@@ -471,3 +472,8 @@ backendGetMakeModel(
return (0);
}
/*
* End of "$Id: ieee1284.c 11594 2014-02-14 20:09:01Z msweet $".
*/
+135 -202
Ver Arquivo
@@ -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",
@@ -160,7 +160,6 @@ static void cancel_job(http_t *http, const char *uri, int id,
static ipp_pstate_t check_printer_state(http_t *http, const char *uri,
const char *resource,
const char *user, int version);
static void debug_attributes(ipp_t *ipp);
static void *monitor_printer(_cups_monitor_t *monitor);
static ipp_t *new_request(ipp_op_t op, int version, const char *uri,
const char *user, const char *title,
@@ -223,6 +222,7 @@ main(int argc, /* I - Number of command-line args */
*compatfile = NULL; /* Compatibility filename */
off_t compatsize = 0; /* Size of compatibility file */
int port; /* Port number (not used) */
char portname[255]; /* Port name */
char uri[HTTP_MAX_URI]; /* Updated URI without user/pass */
char print_job_name[1024]; /* Update job-name for Print-Job */
http_status_t http_status; /* Status of HTTP request */
@@ -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 */
@@ -663,12 +661,69 @@ main(int argc, /* I - Number of command-line args */
start_time = time(NULL);
addrlist = backendLookup(hostname, port, &job_canceled);
sprintf(portname, "%d", port);
update_reasons(NULL, "+connecting-to-device");
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
while ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
{
_cupsLangPrintFilter(stderr, "INFO",
_("Unable to locate printer \"%s\"."), hostname);
sleep(10);
if (getenv("CLASS") != NULL)
{
update_reasons(NULL, "-connecting-to-device");
return (CUPS_BACKEND_STOP);
}
if (job_canceled)
return (CUPS_BACKEND_OK);
}
http = httpConnect2(hostname, port, addrlist, AF_UNSPEC, cupsEncryption(), 1,
0, NULL);
httpSetTimeout(http, 30.0, timeout_cb, NULL);
if (httpIsEncrypted(http))
{
/*
* Validate TLS credentials...
*/
cups_array_t *creds; /* TLS credentials */
cups_array_t *lcreds = NULL; /* Loaded credentials */
http_trust_t trust; /* Trust level */
static const char *trusts[] = { NULL, "+cups-pki-invalid", "+cups-pki-changed", "+cups-pki-expired", NULL, "+cups-pki-unknown" };
/* Trust keywords */
if (!httpCopyCredentials(http, &creds))
{
trust = httpCredentialsGetTrust(creds, hostname);
update_reasons(NULL, "-cups-pki-invalid,cups-pki-changed,cups-pki-expired,cups-pki-unknown");
if (trusts[trust])
{
update_reasons(NULL, trusts[trust]);
return (CUPS_BACKEND_STOP);
}
if (httpLoadCredentials(NULL, &lcreds, hostname))
{
/*
* Could not load the credentials, let's save the ones we have so we
* can detect changes...
*/
httpSaveCredentials(NULL, creds, hostname);
}
httpFreeCredentials(lcreds);
httpFreeCredentials(creds);
}
}
/*
* See if the printer supports SNMP...
*/
@@ -799,76 +854,6 @@ main(int argc, /* I - Number of command-line args */
else if (!http)
return (CUPS_BACKEND_FAILED);
if (httpIsEncrypted(http))
{
/*
* Validate TLS credentials...
*/
cups_array_t *creds; /* TLS credentials */
cups_array_t *lcreds = NULL; /* Loaded credentials */
http_trust_t trust; /* Trust level */
char credinfo[1024], /* Information on credentials */
lcredinfo[1024];/* Information on saved credentials */
static const char * const trusts[] = { NULL, "+cups-pki-invalid", "+cups-pki-changed", "+cups-pki-expired", NULL, "+cups-pki-unknown" };
/* Trust keywords */
static const char * const trust_msgs[] =
{
"Credentials are OK/trusted",
"Credentials are invalid",
"Credentials have changed",
"Credentials are expired",
"Credentials have been renewed",
"Credentials are unknown/new"
};
fputs("DEBUG: Connection is encrypted.\n", stderr);
if (!httpCopyCredentials(http, &creds))
{
trust = httpCredentialsGetTrust(creds, hostname);
httpCredentialsString(creds, credinfo, sizeof(credinfo));
fprintf(stderr, "DEBUG: %s (%s)\n", trust_msgs[trust], cupsLastErrorString());
fprintf(stderr, "DEBUG: Printer credentials: %s\n", credinfo);
if (!httpLoadCredentials(NULL, &lcreds, hostname))
{
httpCredentialsString(lcreds, lcredinfo, sizeof(lcredinfo));
fprintf(stderr, "DEBUG: Stored credentials: %s\n", lcredinfo);
}
else
fputs("DEBUG: No stored credentials.\n", stderr);
update_reasons(NULL, "-cups-pki-invalid,cups-pki-changed,cups-pki-expired,cups-pki-unknown");
if (trusts[trust])
{
update_reasons(NULL, trusts[trust]);
return (CUPS_BACKEND_STOP);
}
if (!lcreds)
{
/*
* Could not load the credentials, let's save the ones we have so we
* can detect changes...
*/
httpSaveCredentials(NULL, creds, hostname);
}
httpFreeCredentials(lcreds);
httpFreeCredentials(creds);
}
else
{
fputs("DEBUG: No printer credentials.\n", stderr);
update_reasons(NULL, "cups-pki-unknown");
return (CUPS_BACKEND_STOP);
}
}
update_reasons(NULL, "-connecting-to-device");
_cupsLangPrintFilter(stderr, "INFO", _("Connected to printer."));
@@ -895,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;
@@ -1109,7 +1093,7 @@ main(int argc, /* I - Number of command-line args */
"compression value \"%s\".\n", compression);
compression = NULL;
}
else if (!compression && (!strcmp(final_content_type, "image/pwg-raster") || !strcmp(final_content_type, "image/urf")))
else if (!compression)
{
if (ippContainsString(compression_sup, "gzip"))
compression = "gzip";
@@ -1141,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)
{
@@ -1327,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;
@@ -1370,10 +1317,24 @@ main(int argc, /* I - Number of command-line args */
if (format_sup != NULL)
{
if (ippContainsString(format_sup, final_content_type))
document_format = final_content_type;
else if (ippContainsString(format_sup, "application/octet-stream"))
document_format = "application/octet-stream";
for (i = 0; i < format_sup->num_values; i ++)
if (!_cups_strcasecmp(final_content_type,
format_sup->values[i].string.text))
{
document_format = final_content_type;
break;
}
if (!document_format)
{
for (i = 0; i < format_sup->num_values; i ++)
if (!_cups_strcasecmp("application/octet-stream",
format_sup->values[i].string.text))
{
document_format = "application/octet-stream";
break;
}
}
}
fprintf(stderr, "DEBUG: final_content_type=\"%s\", document_format=\"%s\"\n",
@@ -1480,7 +1441,6 @@ main(int argc, /* I - Number of command-line args */
fprintf(stderr, "DEBUG: Validate-Job: %s (%s)\n",
ippErrorString(ipp_status), cupsLastErrorString());
debug_attributes(response);
if ((job_auth = ippFindAttribute(response, "job-authorization-uri",
IPP_TAG_URI)) != NULL)
@@ -1651,7 +1611,6 @@ main(int argc, /* I - Number of command-line args */
fprintf(stderr, "DEBUG: %s: %s (%s)\n",
(num_files > 1 || create_job) ? "Create-Job" : "Print-Job",
ippErrorString(ipp_status), cupsLastErrorString());
debug_attributes(response);
if (ipp_status > IPP_OK_CONFLICT)
{
@@ -1786,9 +1745,6 @@ main(int argc, /* I - Number of command-line args */
"compression", NULL, compression);
fprintf(stderr, "DEBUG: Sending file %d using chunking...\n", i + 1);
fprintf(stderr, "DEBUG: IPP/%d.%d %s #%d\n", version / 10, version % 10, ippOpString(ippGetOperation(request)), ippGetRequestId(request));
debug_attributes(request);
http_status = cupsSendRequest(http, request, resource, 0);
if (http_status == HTTP_CONTINUE && request->state == IPP_DATA)
{
@@ -1838,13 +1794,11 @@ main(int argc, /* I - Number of command-line args */
fprintf(stderr, "DEBUG: Error writing document data for "
"Send-Document: %s\n", strerror(httpError(http)));
response = cupsGetResponse(http, resource);
ippDelete(cupsGetResponse(http, resource));
ippDelete(request);
fprintf(stderr, "DEBUG: Send-Document: %s (%s)\n",
ippErrorString(cupsLastError()), cupsLastErrorString());
debug_attributes(response);
ippDelete(response);
if (cupsLastError() > IPP_OK_CONFLICT && !job_canceled)
{
@@ -1973,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...
@@ -2011,9 +1965,6 @@ main(int argc, /* I - Number of command-line args */
"requested-attributes", sizeof(jattrs) / sizeof(jattrs[0]),
NULL, jattrs);
fprintf(stderr, "DEBUG: IPP/%d.%d %s #%d\n", version / 10, version % 10, ippOpString(ippGetOperation(request)), ippGetRequestId(request));
debug_attributes(request);
/*
* Do the request...
*/
@@ -2038,7 +1989,6 @@ main(int argc, /* I - Number of command-line args */
fprintf(stderr, "DEBUG: Get-Job-Attributes: %s (%s)\n",
ippErrorString(ipp_status), cupsLastErrorString());
debug_attributes(response);
if (ipp_status <= IPP_OK_CONFLICT)
password_tries = 0;
@@ -2088,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;
@@ -2315,9 +2264,6 @@ check_printer_state(
"requested-attributes",
(int)(sizeof(pattrs) / sizeof(pattrs[0])), NULL, pattrs);
fprintf(stderr, "DEBUG: IPP/%d.%d %s #%d\n", version / 10, version % 10, ippOpString(ippGetOperation(request)), ippGetRequestId(request));
debug_attributes(request);
if ((response = cupsDoRequest(http, request, resource)) != NULL)
{
report_printer_state(response);
@@ -2325,12 +2271,12 @@ check_printer_state(
if ((attr = ippFindAttribute(response, "printer-state",
IPP_TAG_ENUM)) != NULL)
printer_state = (ipp_pstate_t)attr->values[0].integer;
ippDelete(response);
}
fprintf(stderr, "DEBUG: Get-Printer-Attributes: %s (%s)\n",
ippErrorString(cupsLastError()), cupsLastErrorString());
debug_attributes(response);
ippDelete(response);
/*
* Return the printer-state value...
@@ -2340,51 +2286,6 @@ check_printer_state(
}
/*
* 'debug_attributes()' - Print out the request or response attributes as DEBUG
* messages...
*/
static void
debug_attributes(ipp_t *ipp) /* I - Request or response message */
{
ipp_tag_t group; /* Current group */
ipp_attribute_t *attr; /* Current attribute */
char buffer[1024]; /* Value buffer */
for (group = IPP_TAG_ZERO, attr = ippFirstAttribute(ipp);
attr;
attr = ippNextAttribute(ipp))
{
const char *name = ippGetName(attr);
if (!name)
{
group = IPP_TAG_ZERO;
continue;
}
if (group != ippGetGroupTag(attr))
{
group = ippGetGroupTag(attr);
fprintf(stderr, "DEBUG: ---- %s ----\n", ippTagString(group));
}
if (!strcmp(name, "job-password"))
strlcpy(buffer, "---", sizeof(buffer));
else
ippAttributeString(attr, buffer, sizeof(buffer));
fprintf(stderr, "DEBUG: %s %s%s %s\n", name,
ippGetCount(attr) > 1 ? "1setOf " : "",
ippTagString(ippGetValueTag(attr)), buffer);
}
fprintf(stderr, "DEBUG: ---- %s ----\n", ippTagString(IPP_TAG_END));
}
/*
* 'monitor_printer()' - Monitor the printer state.
*/
@@ -2430,13 +2331,10 @@ monitor_printer(
while (monitor->job_state < IPP_JOB_CANCELED && !job_canceled)
{
/*
* Reconnect to the printer as needed...
* Reconnect to the printer...
*/
if (httpGetFd(http) < 0)
httpReconnect(http);
if (httpGetFd(http) >= 0)
if (!httpReconnect(http))
{
/*
* Connected, so check on the printer state...
@@ -2455,7 +2353,7 @@ monitor_printer(
* No job-id yet, so continue...
*/
goto monitor_sleep;
goto monitor_disconnect;
}
/*
@@ -2616,14 +2514,20 @@ monitor_printer(
(monitor->job_state == IPP_JOB_CANCELED ||
monitor->job_state == IPP_JOB_ABORTED))
job_canceled = -1;
/*
* Disconnect from the printer - we'll reconnect on the next poll...
*/
monitor_disconnect:
_httpDisconnect(http);
}
/*
* Sleep for N seconds...
*/
monitor_sleep:
sleep((unsigned)delay);
delay = _cupsNextDelay(delay, &prev_delay);
@@ -2635,10 +2539,7 @@ monitor_printer(
if (job_canceled > 0 && monitor->job_id > 0)
{
if (httpGetFd(http) < 0)
httpReconnect(http);
if (httpGetFd(http) >= 0)
if (!httpReconnect(http))
{
cancel_job(http, monitor->uri, monitor->job_id, monitor->resource,
monitor->user, monitor->version);
@@ -2686,6 +2587,9 @@ new_request(
{
ipp_t *request; /* Request data */
const char *keyword; /* PWG keyword */
ipp_tag_t group; /* Current group */
ipp_attribute_t *attr; /* Current attribute */
char buffer[1024]; /* Value buffer */
/*
@@ -2809,8 +2713,33 @@ new_request(
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "copies", copies);
}
fprintf(stderr, "DEBUG: IPP/%d.%d %s #%d\n", version / 10, version % 10, ippOpString(ippGetOperation(request)), ippGetRequestId(request));
debug_attributes(request);
fprintf(stderr, "DEBUG: IPP/%d.%d %s #%d\n", version / 10, version % 10,
ippOpString(ippGetOperation(request)), ippGetRequestId(request));
for (group = IPP_TAG_ZERO, attr = ippFirstAttribute(request);
attr;
attr = ippNextAttribute(request))
{
const char *name = ippGetName(attr);
if (!name)
{
group = IPP_TAG_ZERO;
continue;
}
if (group != ippGetGroupTag(attr))
{
group = ippGetGroupTag(attr);
fprintf(stderr, "DEBUG: ---- %s ----\n", ippTagString(group));
}
ippAttributeString(attr, buffer, sizeof(buffer));
fprintf(stderr, "DEBUG: %s %s%s %s\n", name,
ippGetCount(attr) > 1 ? "1setOf " : "",
ippTagString(ippGetValueTag(attr)), buffer);
}
fprintf(stderr, "DEBUG: ---- %s ----\n", ippTagString(IPP_TAG_END));
return (request);
}
@@ -3361,7 +3290,7 @@ sigterm_handler(int sig) /* I - Signal */
if (tmpfilename[0])
unlink(tmpfilename);
_exit(1);
exit(1);
}
@@ -3571,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 $".
*/
+109 -85
Ver Arquivo
@@ -1,7 +1,9 @@
/*
* "$Id: lpd.c 12024 2014-07-15 12:58:39Z 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
@@ -75,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,
@@ -84,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);
@@ -111,6 +115,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
*filename, /* File to print */
title[256]; /* Title string */
int port; /* Port number */
char portname[256]; /* Port name (string) */
http_addrlist_t *addrlist; /* List of addresses for printer */
int snmp_enabled = 1; /* Is SNMP enabled? */
int snmp_fd; /* SNMP socket */
@@ -410,11 +415,23 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Find the printer...
*/
addrlist = backendLookup(hostname, port, NULL);
snprintf(portname, sizeof(portname), "%d", port);
/*
* See if the printer supports SNMP...
*/
fputs("STATE: +connecting-to-device\n", stderr);
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
while ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
{
_cupsLangPrintFilter(stderr, "INFO",
_("Unable to locate printer \"%s\"."), hostname);
sleep(10);
if (getenv("CLASS") != NULL)
{
fputs("STATE: -connecting-to-device\n", stderr);
exit(CUPS_BACKEND_FAILED);
}
}
if (snmp_enabled)
snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family);
@@ -555,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.
*/
@@ -814,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);
@@ -1287,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 = 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.
*/
@@ -1298,3 +1317,8 @@ sigterm_handler(int sig) /* I - Signal */
abort_job = 1;
}
/*
* End of "$Id: lpd.c 12024 2014-07-15 12:58:39Z msweet $".
*/
+9 -60
Ver Arquivo
@@ -1,7 +1,9 @@
/*
* "$Id: network.c 12124 2014-08-28 15:37:22Z msweet $"
*
* Common backend network APIs for CUPS.
*
* Copyright 2007-2016 by Apple Inc.
* Copyright 2007-2014 by Apple Inc.
* Copyright 2006-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -26,6 +28,7 @@
* 'backendCheckSideChannel()' - Check the side-channel for pending requests.
*/
void
backendCheckSideChannel(
int snmp_fd, /* I - SNMP socket */
@@ -45,65 +48,6 @@ backendCheckSideChannel(
}
/*
* 'backendLookup()' - Lookup the given host and log addresses.
*/
http_addrlist_t * /* O - List of addresses or NULL */
backendLookup(const char *hostname, /* I - Hostname */
int port, /* I - Port number */
int *cancel) /* I - Variable to watch for job cancel */
{
char portname[32], /* Port number as string */
addrname[256]; /* Address as string */
http_addrlist_t *addrlist, /* List of addresses */
*current; /* Current address */
/*
* Lookup the address for the named host...
*/
snprintf(portname, sizeof(portname), "%d", port);
fputs("STATE: +connecting-to-device\n", stderr);
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
while ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
{
_cupsLangPrintFilter(stderr, "INFO", _("Unable to locate printer \"%s\"."), hostname);
sleep(10);
if (getenv("CLASS") != NULL)
{
fputs("STATE: -connecting-to-device\n", stderr);
exit(CUPS_BACKEND_STOP);
}
if (cancel && *cancel)
{
fputs("STATE: -connecting-to-device\n", stderr);
exit(CUPS_BACKEND_OK);
}
}
fputs("STATE: -connecting-to-device\n", stderr);
/*
* Log the addresses we got...
*/
for (current = addrlist; current; current = current->next)
fprintf(stderr, "DEBUG: %s=%s\n", hostname, httpAddrString(&current->addr, addrname, sizeof(addrname)));
/*
* Return...
*/
return (addrlist);
}
/*
* 'backendNetworkSideCB()' - Handle common network side-channel commands.
*/
@@ -357,3 +301,8 @@ backendNetworkSideCB(
return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
}
/*
* End of "$Id: network.c 12124 2014-08-28 15:37:22Z msweet $".
*/
+29 -38
Ver Arquivo
@@ -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 (Issue #4155)
# Canon, Inc. PIXMA iP4200 Printer, http://www.cups.org/str.php?L4155
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 (Issue #4155)
# Canon, Inc. MP550 Printer, http://www.cups.org/str.php?L4155
0x04a9 0x173d unidir
# Canon, Inc. MP560 Printer (Issue #4155)
# Canon, Inc. MP560 Printer, http://www.cups.org/str.php?L4155
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,36 +217,27 @@
# Lexmark E238 (<rdar://problem/14493054>)
0x043d 0x00d7 no-reattach
# Lexmark E238 (Issue #4448)
# Lexmark E238 (STR #4448)
0x043d 0x009a no-reattach
# Canon MX310 (Issue #4482)
# Canon MX310 (STR #4482)
0x04a9 0x1728 unidir
# Canon MX320 (Issue #4482)
# Canon MX320 (STR #4482)
0x04A9 0x1736 unidir
# All Intermec devices (Issue #4553)
# All Intermec devices (STR #4553)
0x067e no-reattach
# HP LaserJet 1150 (Issue #4549)
# HP LaserJet 1150 (STR #4549)
0x03f0 0x0f17 delay-close
# HP LaserJet 1300 (Issue #4549)
# HP LaserJet 1300 (STR #4549)
0x03f0 0x1017 delay-close
0x03f0 0x1117 delay-close
# HP LaserJet 1320 (Issue #4549)
# HP LaserJet 1320 (STR #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
# Kyocera Ecosys P6026cdn (Issue #4900)
0x0482 0x063f no-reattach
+14 -8
Ver Arquivo
@@ -1,16 +1,18 @@
#!/bin/sh
#
# Psuedo-backend for CUPS testing purposes.
# "$Id$"
#
# Copyright 2011 by Apple Inc.
# Psuedo-backend for CUPS testing purposes.
#
# 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/".
# Copyright 2011 by Apple Inc.
#
# This file is subject to the Apple OS-Developed Software exception.
# 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.
#
if test $# = 0; then
@@ -22,3 +24,7 @@ fi
cat $6 >/dev/null
sleep 5
exit 0
#
# End of "$Id$".
#
+7
Ver Arquivo
@@ -1,4 +1,6 @@
/*
* "$Id: runloop.c 11558 2014-02-06 18:33:34Z msweet $"
*
* Common run loop APIs for CUPS backends.
*
* Copyright 2007-2014 by Apple Inc.
@@ -523,3 +525,8 @@ backendWaitLoop(
return (1);
}
/*
* End of "$Id: runloop.c 11558 2014-02-06 18:33:34Z msweet $".
*/
+8 -2
Ver Arquivo
@@ -1,7 +1,9 @@
/*
* "$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
@@ -17,7 +19,6 @@
*/
#include "backend-private.h"
#include <cups/ppd-private.h>
#include <cups/array.h>
@@ -1094,3 +1095,8 @@ utf16_to_utf8(
cupsUTF32ToUTF8(dst, temp, (int)dstsize);
}
/*
* End of "$Id: snmp-supplies.c 12227 2014-10-21 13:42:04Z msweet $".
*/
+7
Ver Arquivo
@@ -1,4 +1,6 @@
/*
* "$Id: snmp.c 11594 2014-02-14 20:09:01Z msweet $"
*
* SNMP discovery backend for CUPS.
*
* Copyright 2007-2014 by Apple Inc.
@@ -1359,3 +1361,8 @@ update_cache(snmp_cache_t *device, /* I - Device */
list_device(device);
}
/*
* End of "$Id: snmp.c 11594 2014-02-14 20:09:01Z msweet $".
*/
+26 -2
Ver Arquivo
@@ -1,7 +1,9 @@
/*
* "$Id: socket.c 11907 2014-06-09 18:35:32Z msweet $"
*
* AppSocket backend for CUPS.
*
* Copyright 2007-2016 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
@@ -69,6 +71,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
int contimeout; /* Connection timeout */
int waiteof; /* Wait for end-of-file? */
int port; /* Port number */
char portname[255]; /* Port name */
int delay; /* Delay for retries... */
int device_fd; /* AppSocket */
int error; /* Error code (if any) */
@@ -263,7 +266,23 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
start_time = time(NULL);
addrlist = backendLookup(hostname, port, NULL);
sprintf(portname, "%d", port);
fputs("STATE: +connecting-to-device\n", stderr);
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
while ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
{
_cupsLangPrintFilter(stderr, "INFO",
_("Unable to locate printer \"%s\"."), hostname);
sleep(10);
if (getenv("CLASS") != NULL)
{
fputs("STATE: -connecting-to-device\n", stderr);
return (CUPS_BACKEND_STOP);
}
}
/*
* See if the printer supports SNMP...
@@ -495,3 +514,8 @@ wait_bc(int device_fd, /* I - Socket */
else
return (-1);
}
/*
* End of "$Id: socket.c 11907 2014-06-09 18:35:32Z msweet $".
*/
+20 -9
Ver Arquivo
@@ -1,16 +1,22 @@
/*
* IEEE-1284 support functions test program for CUPS.
* "$Id: test1284.c 10996 2013-05-29 11:51:34Z msweet $"
*
* Copyright 2007-2010 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
* IEEE-1284 support functions test program for CUPS.
*
* 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"
* "LICENSE" which should have been included with this file. If this
* file is missing or damaged, see the license at "http://www.cups.org/".
* Copyright 2007-2010 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
* This file is subject to the Apple OS-Developed Software exception.
* 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"
* "LICENSE" which should have been included with this file. If this
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*
* Contents:
*
* main() - Test the device-ID functions.
*/
/*
@@ -71,3 +77,8 @@ main(int argc, /* I - Number of command-line args */
return (0);
}
/*
* End of "$Id: test1284.c 10996 2013-05-29 11:51:34Z msweet $".
*/
+7
Ver Arquivo
@@ -1,4 +1,6 @@
/*
* "$Id: testbackend.c 11594 2014-02-14 20:09:01Z msweet $"
*
* Backend test program for CUPS.
*
* Copyright 2007-2014 by Apple Inc.
@@ -675,3 +677,8 @@ walk_cb(const char *oid, /* I - OID */
printf("CUPS_SC_CMD_SNMP_WALK %s, %d bytes (%s)\n", oid, datalen, temp);
}
/*
* End of "$Id: testbackend.c 11594 2014-02-14 20:09:01Z msweet $".
*/
+19 -8
Ver Arquivo
@@ -1,15 +1,21 @@
/*
* SNMP supplies test program for CUPS.
* "$Id: testsupplies.c 3247 2011-05-12 06:22:31Z msweet $"
*
* Copyright 2008-2011 by Apple Inc.
* SNMP supplies test program for CUPS.
*
* 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"
* "LICENSE" which should have been included with this file. If this
* file is missing or damaged, see the license at "http://www.cups.org/".
* Copyright 2008-2011 by Apple Inc.
*
* This file is subject to the Apple OS-Developed Software exception.
* 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"
* "LICENSE" which should have been included with this file. If this
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*
* Contents:
*
* main() - Show the supplies state of a printer.
*/
/*
@@ -70,3 +76,8 @@ main(int argc, /* I - Number of command-line args */
sleep(5);
}
}
/*
* End of "$Id: testsupplies.c 3247 2011-05-12 06:22:31Z msweet $".
*/
+258 -186
Ver Arquivo
@@ -1,5 +1,7 @@
/*
* Copyright 2005-2016 Apple Inc. All rights reserved.
* "$Id: usb-darwin.c 12928 2015-10-23 21:31:58Z msweet $"
*
* Copyright 2005-2015 Apple Inc. All rights reserved.
*
* IMPORTANT: This Apple software is supplied to you by Apple Computer,
* Inc. ("Apple") in consideration of your agreement to the following
@@ -61,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>
@@ -202,7 +203,7 @@ typedef struct classdriver_s /**** g.classdriver context ****/
} classdriver_t;
typedef Boolean (*iterator_callback_t)(io_service_t obj, printer_interface_t printerIntf, void *refcon);
typedef Boolean (*iterator_callback_t)(void *refcon, io_service_t obj, CFStringRef deviceIDString, UInt32 deviceLocation, UInt8 interfaceNum, UInt8 alternateSetting);
typedef struct iterator_reference_s /**** Iterator reference data */
{
@@ -231,7 +232,6 @@ typedef struct globals_s
UInt32 location;
UInt8 interfaceNum;
UInt8 alternateSetting;
UInt8 interfaceProtocol;
CFRunLoopTimerRef status_timer;
@@ -265,8 +265,8 @@ int Iterating = 0; /* Are we iterating the bus? */
* Local functions...
*/
static Boolean list_device_cb(io_service_t obj, printer_interface_t printerIntf, void *refcon);
static Boolean find_device_cb(io_service_t obj, printer_interface_t printerIntf, void *refcon);
static Boolean find_device_cb(void *refcon, io_service_t obj, CFStringRef deviceIDString, UInt32 deviceLocation, UInt8 interfaceNum, UInt8 alternateSetting);
static Boolean list_device_cb(void *refcon, io_service_t obj, CFStringRef deviceIDString, UInt32 deviceLocation, UInt8 interfaceNum, UInt8 alternateSetting);
static CFStringRef cfstr_create_trim(const char *cstr);
static CFStringRef copy_value_for_key(CFStringRef deviceID, CFStringRef *keys);
@@ -285,6 +285,7 @@ static void parse_options(char *options, char *serial, int serial_size, UInt32 *
static void setup_cfLanguage(void);
static void soft_reset(void);
static void status_timer_cb(CFRunLoopTimerRef timer, void *info);
static void log_usb_class_driver(int is_64bit);
#define IS_64BIT 1
#define IS_NOT_64BIT 0
@@ -301,7 +302,7 @@ static void parse_pserror (char *sockBuffer, int len);
#endif /* PARSE_PS_ERRORS */
static printer_interface_t usb_printer_interface_interface(io_service_t usbClass);
static IOUSBDeviceInterface **usb_device_interface_for_device(io_service_t usbDevice);
static CFStringRef copy_printer_interface_deviceid(printer_interface_t printer, UInt8 alternateSetting);
static CFStringRef copy_printer_interface_indexed_description(printer_interface_t printer, UInt8 index, UInt16 language);
static CFStringRef deviceIDCopyManufacturer(CFStringRef deviceID);
@@ -418,17 +419,10 @@ print_device(const char *uri, /* I - Device URI */
g.printer_obj = 0x0;
g.classdriver = 0x0;
}
fprintf(stderr, "DEBUG: Looking for '%s %s'\n", hostname, resource);
do
{
iterate_printers(find_device_cb, NULL);
if (g.printer_obj != 0x0)
break;
_cupsLangPrintFilter(stderr, "INFO", _("Waiting for printer to become available."));
sleep(5);
} while (true);
iterate_printers(find_device_cb, NULL);
fputs("DEBUG: Opening connection\n", stderr);
@@ -470,6 +464,11 @@ print_device(const char *uri, /* I - Device URI */
return (CUPS_BACKEND_STOP);
}
#ifdef __x86_64__
if (status == noErr && driverBundlePath != NULL && CFStringCompare(driverBundlePath, kUSBGenericTOPrinterClassDriver, 0) != kCFCompareEqualTo)
log_usb_class_driver(IS_64BIT);
#endif /* __x86_64__ */
if (driverBundlePath)
CFRelease(driverBundlePath);
@@ -1118,234 +1117,257 @@ sidechannel_thread(void *reference)
/*
* 'iterate_printers()' - Iterate over all the printers.
*/
static void iterate_printers(iterator_callback_t callBack, void *userdata)
{
Iterating = 1;
Iterating = 1;
iterator_reference_t reference = { callBack, userdata, true };
mach_port_t masterPort = 0x0;
kern_return_t kr = IOMasterPort (bootstrap_port, &masterPort);
IONotificationPortRef addNotification = IONotificationPortCreate(kIOMasterPortDefault);
int printingClass = kUSBPrintingClass;
int printingSubclass = kUSBPrintingSubclass;
CFNumberRef interfaceClass = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &printingClass);
CFNumberRef interfaceSubClass = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &printingSubclass);
CFMutableDictionaryRef usbPrinterMatchDictionary = IOServiceMatching(kIOUSBInterfaceClassName);
CFDictionaryAddValue(usbPrinterMatchDictionary, CFSTR("bInterfaceClass"), interfaceClass);
CFDictionaryAddValue(usbPrinterMatchDictionary, CFSTR("bInterfaceSubClass"), interfaceSubClass);
CFRelease(interfaceClass);
CFRelease(interfaceSubClass);
io_iterator_t add_iterator = IO_OBJECT_NULL;
IOServiceAddMatchingNotification(addNotification, kIOMatchedNotification,
usbPrinterMatchDictionary, &device_added, &reference, &add_iterator);
if (add_iterator != IO_OBJECT_NULL)
{
device_added (&reference, add_iterator);
if (reference.keepRunning)
if (kr == kIOReturnSuccess && masterPort != 0x0)
{
CFRunLoopAddSource(CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource(addNotification), kCFRunLoopDefaultMode);
CFRunLoopRun();
iterator_reference_t reference = { callBack, userdata, true };
IONotificationPortRef addNotification = IONotificationPortCreate(masterPort);
io_iterator_t addIterator = IO_OBJECT_NULL;
kr = IOServiceAddMatchingNotification(addNotification, kIOFirstMatchNotification, IOServiceMatching(kIOUSBDeviceClassName),
&device_added, &reference, &addIterator);
if (kr == kIOReturnSuccess && addIterator != IO_OBJECT_NULL)
{
device_added(&reference, addIterator);
if (reference.keepRunning)
{
CFRunLoopAddSource(CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource(addNotification), kCFRunLoopDefaultMode);
CFRunLoopRun();
}
IOObjectRelease(addIterator);
}
mach_port_deallocate(mach_task_self(), masterPort);
}
IOObjectRelease(add_iterator);
}
Iterating = 0;
Iterating = 0;
}
/*
* 'device_added()' - Device added notifier.
*/
#define IsPrintingInterface(c,s,p) ((c) == kUSBPrintingInterfaceClass && (s) == kUSBPrintingSubclass && (p) != kUSBPrintingProtocolIPP)
static void device_added(void *userdata, io_iterator_t iterator)
{
iterator_reference_t *reference = userdata;
io_service_t intf;
iterator_reference_t *reference = userdata;
io_service_t device;
while (reference->keepRunning && (intf = IOIteratorNext(iterator)) != 0x0)
{
printer_interface_t printerIntf = usb_printer_interface_interface(intf);
if (printerIntf != NULL)
while (reference->keepRunning && (device = IOIteratorNext(iterator)) != 0x0)
{
UInt8 intfClass = 0, intfSubClass = 0;
UInt32 locationID = 0;
IOUSBDeviceInterface **devIntf = NULL;
io_iterator_t intfIterator = IO_OBJECT_NULL;
io_object_t intf = IO_OBJECT_NULL;
(*printerIntf)->GetInterfaceClass(printerIntf, &intfClass);
(*printerIntf)->GetInterfaceSubClass(printerIntf, &intfSubClass);
if (intfClass == kUSBPrintingInterfaceClass && intfSubClass == kUSBPrintingSubclass)
reference->keepRunning = reference->callback(intf, printerIntf, userdata);
(*printerIntf)->Release(printerIntf);
}
IOObjectRelease(intf);
devIntf = usb_device_interface_for_device(device);
if (devIntf == NULL)
goto device_added_done;
UInt16 vendorUniqueID;
if ((*devIntf)->GetDeviceVendor(devIntf, &vendorUniqueID) != kIOReturnSuccess || vendorUniqueID == kAppleVendorID || vendorUniqueID == 0x0A5C)
goto device_added_done;
if ((*devIntf)->GetLocationID(devIntf, &locationID) != kIOReturnSuccess)
goto device_added_done;
IOUSBFindInterfaceRequest req = { kIOUSBFindInterfaceDontCare, kIOUSBFindInterfaceDontCare, kIOUSBFindInterfaceDontCare, kIOUSBFindInterfaceDontCare };
if ((*devIntf)->CreateInterfaceIterator(devIntf, &req, &intfIterator) != kIOReturnSuccess)
goto device_added_done;
while (reference->keepRunning && (intf = IOIteratorNext(intfIterator)))
{
printer_interface_t printerIntf = usb_printer_interface_interface(intf);
if (printerIntf != NULL)
{
UInt8 intfClass = 0, intfSubclass = 0, intfProtocol = 0, intfNumber = 0;
(*printerIntf)->GetInterfaceClass(printerIntf, &intfClass);
(*printerIntf)->GetInterfaceSubClass(printerIntf, &intfSubclass);
(*printerIntf)->GetInterfaceProtocol(printerIntf, &intfProtocol);
(*printerIntf)->GetInterfaceNumber(printerIntf, &intfNumber);
if (IsPrintingInterface(intfClass, intfSubclass, intfProtocol))
{
CFStringRef deviceIDString = copy_printer_interface_deviceid(printerIntf, 0);
if (deviceIDString != NULL)
{
reference->keepRunning = reference->callback(userdata, intf, deviceIDString, locationID, intfNumber, 0);
CFRelease(deviceIDString);
}
}
IOUSBInterfaceDescriptor *intfDesc = NULL;
while (reference->keepRunning && (intfDesc = (IOUSBInterfaceDescriptor *)(*printerIntf)->FindNextAssociatedDescriptor(printerIntf, intfDesc, kUSBInterfaceDesc)))
{
intfClass = intfDesc->bInterfaceClass;
intfSubclass = intfDesc->bInterfaceSubClass;
intfProtocol = intfDesc->bInterfaceProtocol;
if ((IsPrintingInterface(intfClass, intfSubclass, intfProtocol)))
{
CFStringRef deviceIDString = copy_printer_interface_deviceid(printerIntf, intfDesc->bAlternateSetting);
if (deviceIDString != NULL)
{
reference->keepRunning = reference->callback(userdata, intf, deviceIDString, locationID, intfNumber, intfDesc->bAlternateSetting);
CFRelease(deviceIDString);
}
}
}
(*printerIntf)->Release(printerIntf);
}
IOObjectRelease(intf);
}
device_added_done:
if (devIntf != NULL) (*devIntf)->Release(devIntf);
if (intfIterator != IO_OBJECT_NULL) IOObjectRelease(intfIterator);
IOObjectRelease(device);
}
/* One last call to the call back now that we are not longer have printers left to iterate...
*/
if (reference->keepRunning && reference->callback)
reference->keepRunning = reference->callback(IO_OBJECT_NULL, NULL, reference->userdata);
reference->keepRunning = reference->callback(reference->userdata, IO_OBJECT_NULL, NULL, 0, 0, 0);
if (!reference->keepRunning)
CFRunLoopStop(CFRunLoopGetCurrent());
CFRunLoopStop(CFRunLoopGetCurrent());
}
/*
* 'list_device_cb()' - list_device iterator callback.
*/
static Boolean list_device_cb(io_service_t obj, printer_interface_t printerIntf, void *refcon)
static Boolean list_device_cb(void *refcon, io_service_t obj, CFStringRef deviceIDString, UInt32 deviceLocation, UInt8 interfaceNum, UInt8 alternateSetting)
{
(void)refcon;
(void)refcon;
(void)interfaceNum;
(void)alternateSetting;
if (obj != IO_OBJECT_NULL)
{
CFStringRef deviceIDString = NULL;
CFStringRef make = NULL;
CFStringRef model = NULL;
CFStringRef serial = NULL;
UInt32 intfLocation;
if (obj != IO_OBJECT_NULL)
{
CFStringRef make = deviceIDCopyManufacturer(deviceIDString);
CFStringRef model = deviceIDCopyModel(deviceIDString);
CFStringRef serial = deviceIDCopySerialNumber(deviceIDString);
deviceIDString = copy_printer_interface_deviceid(printerIntf, 0);
if (deviceIDString == NULL)
goto list_device_done;
char uristr[1024], makestr[1024], modelstr[1024], serialstr[1024];
char optionsstr[1024], idstr[1024], make_modelstr[1024];
make = deviceIDCopyManufacturer(deviceIDString);
model = deviceIDCopyModel(deviceIDString);
serial = deviceIDCopySerialNumber(deviceIDString);
CFStringGetCString(deviceIDString, idstr, sizeof(idstr), kCFStringEncodingUTF8);
backendGetMakeModel(idstr, make_modelstr, sizeof(make_modelstr));
char uristr[1024], makestr[1024], modelstr[1024], serialstr[1024];
char optionsstr[1024], idstr[1024], make_modelstr[1024];
modelstr[0] = '/';
CFStringGetCString(deviceIDString, idstr, sizeof(idstr), kCFStringEncodingUTF8);
backendGetMakeModel(idstr, make_modelstr, sizeof(make_modelstr));
if (make == NULL || !CFStringGetCString(make, makestr, sizeof(makestr), kCFStringEncodingUTF8))
strlcpy(makestr, "Unknown", sizeof(makestr));
modelstr[0] = '/';
if (model == NULL || !CFStringGetCString(model, &modelstr[1], sizeof(modelstr)-1, kCFStringEncodingUTF8))
strlcpy(modelstr + 1, "Printer", sizeof(modelstr) - 1);
if (make == NULL || !CFStringGetCString(make, makestr, sizeof(makestr), kCFStringEncodingUTF8))
strlcpy(makestr, "Unknown", sizeof(makestr));
optionsstr[0] = '\0';
if (serial != NULL && CFStringGetCString(serial, serialstr, sizeof(serialstr), kCFStringEncodingUTF8))
snprintf(optionsstr, sizeof(optionsstr), "?serial=%s", serialstr);
else if (deviceLocation != 0)
snprintf(optionsstr, sizeof(optionsstr), "?location=%x", (unsigned)deviceLocation);
if (model == NULL || !CFStringGetCString(model, &modelstr[1], sizeof(modelstr)-1, kCFStringEncodingUTF8))
strlcpy(modelstr + 1, "Printer", sizeof(modelstr) - 1);
httpAssembleURI(HTTP_URI_CODING_ALL, uristr, sizeof(uristr), "usb", NULL, makestr, 0, modelstr);
strlcat(uristr, optionsstr, sizeof(uristr));
optionsstr[0] = '\0';
if (serial != NULL && CFStringGetCString(serial, serialstr, sizeof(serialstr), kCFStringEncodingUTF8))
snprintf(optionsstr, sizeof(optionsstr), "?serial=%s", serialstr);
else if ((*printerIntf)->GetLocationID(printerIntf, &intfLocation) == kIOReturnSuccess)
snprintf(optionsstr, sizeof(optionsstr), "?location=%x", (unsigned)intfLocation);
httpAssembleURI(HTTP_URI_CODING_ALL, uristr, sizeof(uristr), "usb", NULL, makestr, 0, modelstr);
strlcat(uristr, optionsstr, sizeof(uristr));
cupsBackendReport("direct", uristr, make_modelstr, make_modelstr, idstr,
cupsBackendReport("direct", uristr, make_modelstr, make_modelstr, idstr,
NULL);
list_device_done:
if (make != NULL) CFRelease(make);
if (model != NULL) CFRelease(model);
if (serial != NULL) CFRelease(serial);
}
return obj != IO_OBJECT_NULL;
if (make != NULL) CFRelease(make);
if (model != NULL) CFRelease(model);
if (serial != NULL) CFRelease(serial);
}
return obj != IO_OBJECT_NULL;
}
/*
* 'find_device_cb()' - print_device iterator callback.
*/
static Boolean find_device_cb(io_service_t obj, printer_interface_t printerIntf, void *refcon)
static Boolean find_device_cb(void *refcon, io_service_t obj, CFStringRef deviceIDString, UInt32 deviceLocation, UInt8 interfaceNum, UInt8 alternateSetting)
{
(void)refcon;
Boolean keepLooking = true;
Boolean keepLooking = true;
if (obj != IO_OBJECT_NULL)
{
CFStringRef deviceIDString = NULL;
CFStringRef make = NULL;
CFStringRef model = NULL;
CFStringRef serial = NULL;
deviceIDString = copy_printer_interface_deviceid(printerIntf, 0);
if (deviceIDString == NULL)
goto find_device_done;
make = deviceIDCopyManufacturer(deviceIDString);
model = deviceIDCopyModel(deviceIDString);
serial = deviceIDCopySerialNumber(deviceIDString);
if (make && CFStringCompare(make, g.make, kCFCompareCaseInsensitive) == kCFCompareEqualTo)
if (obj != IO_OBJECT_NULL)
{
if (model && CFStringCompare(model, g.model, kCFCompareCaseInsensitive) == kCFCompareEqualTo)
{
UInt8 intfAltSetting = 0, intfNumber = 0, intfProtocol = 0;
UInt32 intfLocation = 0;
CFStringRef make = deviceIDCopyManufacturer(deviceIDString);
CFStringRef model = deviceIDCopyModel(deviceIDString);
CFStringRef serial = deviceIDCopySerialNumber(deviceIDString);
(*printerIntf)->GetInterfaceProtocol(printerIntf, &intfProtocol);
(*printerIntf)->GetAlternateSetting(printerIntf, &intfAltSetting);
(*printerIntf)->GetInterfaceNumber(printerIntf, &intfNumber);
(*printerIntf)->GetLocationID(printerIntf, &intfLocation);
if (g.serial != NULL && CFStringGetLength(g.serial) > 0)
if (make && CFStringCompare(make, g.make, kCFCompareCaseInsensitive) == kCFCompareEqualTo)
{
if (serial != NULL && CFStringCompare(serial, g.serial, kCFCompareCaseInsensitive) == kCFCompareEqualTo)
{
g.interfaceProtocol = intfProtocol;
g.location = intfLocation;
g.alternateSetting = intfAltSetting;
if (intfProtocol != kUSBPrintingProtocolIPP)
if (model && CFStringCompare(model, g.model, kCFCompareCaseInsensitive) == kCFCompareEqualTo)
{
g.printer_obj = obj;
IOObjectRetain(obj);
if (g.serial != NULL && CFStringGetLength(g.serial) > 0)
{
if (serial != NULL && CFStringCompare(serial, g.serial, kCFCompareCaseInsensitive) == kCFCompareEqualTo)
{
IOObjectRetain(obj);
g.printer_obj = obj;
g.location = deviceLocation;
g.alternateSetting = alternateSetting;
keepLooking = false;
}
}
else
{
if (g.printer_obj != 0)
IOObjectRelease(g.printer_obj);
g.alternateSetting = alternateSetting;
g.printer_obj = obj;
IOObjectRetain(obj);
if (g.location == 0 || g.location == deviceLocation)
keepLooking = false;
}
if ( !keepLooking )
g.interfaceNum = interfaceNum;
}
keepLooking = (intfProtocol == kUSBPrintingProtocolIPP);
}
}
else
{
if (g.printer_obj != 0)
IOObjectRelease(g.printer_obj);
g.location = intfLocation;
g.alternateSetting = intfAltSetting;
g.interfaceProtocol = intfProtocol;
g.printer_obj = obj;
IOObjectRetain(obj);
if (g.location == 0 || g.location == intfLocation)
keepLooking = false;
}
if (!keepLooking)
g.interfaceNum = intfNumber;
}
if (make) CFRelease(make);
if (model) CFRelease(model);
if (serial) CFRelease(serial);
}
find_device_done:
if (deviceIDString != NULL) CFRelease(deviceIDString);
if (make != NULL) CFRelease(make);
if (model != NULL) CFRelease(model);
if (serial != NULL) CFRelease(serial);
}
else
{
keepLooking = (g.printer_obj == 0 && g.interfaceProtocol != kUSBPrintingProtocolIPP);
if (obj == IO_OBJECT_NULL && keepLooking)
else
{
CFRunLoopTimerContext context = { 0, refcon, NULL, NULL, NULL };
CFRunLoopTimerRef timer = CFRunLoopTimerCreate(NULL, CFAbsoluteTimeGetCurrent() + 1.0, 10, 0x0, 0x0, status_timer_cb, &context);
if (timer != NULL)
{
CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, kCFRunLoopDefaultMode);
g.status_timer = timer;
}
keepLooking = (g.printer_obj == 0);
if (obj == IO_OBJECT_NULL && keepLooking)
{
CFRunLoopTimerContext context = { 0, refcon, NULL, NULL, NULL };
CFRunLoopTimerRef timer = CFRunLoopTimerCreate(NULL, CFAbsoluteTimeGetCurrent() + 1.0, 10, 0x0, 0x0, status_timer_cb, &context);
if (timer != NULL)
{
CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, kCFRunLoopDefaultMode);
g.status_timer = timer;
}
}
}
}
if (!keepLooking && g.status_timer != NULL)
{
fputs("STATE: -offline-report\n", stderr);
_cupsLangPrintFilter(stderr, "INFO", _("The printer is now online."));
CFRunLoopRemoveTimer(CFRunLoopGetCurrent(), g.status_timer, kCFRunLoopDefaultMode);
CFRelease(g.status_timer);
g.status_timer = NULL;
}
if (!keepLooking && g.status_timer != NULL)
{
fputs("STATE: -offline-report\n", stderr);
_cupsLangPrintFilter(stderr, "INFO", _("The printer is now online."));
CFRunLoopRemoveTimer(CFRunLoopGetCurrent(), g.status_timer, kCFRunLoopDefaultMode);
CFRelease(g.status_timer);
g.status_timer = NULL;
}
return keepLooking;
return keepLooking;
}
static CFStringRef deviceIDCopySerialNumber(CFStringRef deviceID)
@@ -1545,6 +1567,23 @@ static printer_interface_t usb_printer_interface_interface(io_service_t usbClass
return intf;
}
static IOUSBDeviceInterface **usb_device_interface_for_device(io_service_t usbDevice)
{
IOUSBDeviceInterface ** intf = NULL;
IOCFPlugInInterface **plugin = NULL;
SInt32 score;
int kr = IOCreatePlugInInterfaceForService(usbDevice, kIOUSBDeviceUserClientTypeID, kIOCFPlugInInterfaceID, &plugin, &score);
if (kr == kIOReturnSuccess)
{
(*plugin)->QueryInterface(plugin, CFUUIDGetUUIDBytes(kIOUSBDeviceInterfaceID), (LPVOID *)&intf);
IODestroyPlugInInterface(plugin);
}
return intf;
}
static CFStringRef copy_printer_interface_deviceid(printer_interface_t printer, UInt8 alternateSetting)
{
// I have tried to make this function as neat as I can, but the possibility of needing to resend
@@ -2091,6 +2130,8 @@ static void run_legacy_backend(int argc,
if (!usb_legacy_status)
{
log_usb_class_driver(IS_NOT_64BIT);
/*
* Setup a SIGTERM handler then block it before forking...
*/
@@ -2467,3 +2508,34 @@ static void get_device_id(cups_sc_status_t *status,
*status = CUPS_SC_STATUS_OK;
}
static void
log_usb_class_driver(int is_64bit) /* I - Is the USB class driver 64-bit? */
{
/*
* Report the usage of legacy USB class drivers to Apple if the user opts into providing
* feedback to Apple...
*/
aslmsg aslm = asl_new(ASL_TYPE_MSG);
if (aslm)
{
ppd_file_t *ppd = ppdOpenFile(getenv("PPD"));
const char *make_model = ppd ? ppd->nickname : NULL;
ppd_attr_t *version = ppdFindAttr(ppd, "FileVersion", "");
asl_set(aslm, "com.apple.message.domain", "com.apple.printing.usb.64bit");
asl_set(aslm, "com.apple.message.result", is_64bit ? "yes" : "no");
asl_set(aslm, "com.apple.message.signature", make_model ? make_model : "Unknown");
asl_set(aslm, "com.apple.message.signature2", version ? version->value : "?.?");
asl_set(aslm, "com.apple.message.summarize", "YES");
asl_log(NULL, aslm, ASL_LEVEL_NOTICE, "");
asl_free(aslm);
}
}
/*
* End of "$Id: usb-darwin.c 12928 2015-10-23 21:31:58Z msweet $".
*/
+9 -2
Ver Arquivo
@@ -1,4 +1,6 @@
/*
* "$Id: usb-libusb.c 12881 2015-09-15 21:20:02Z msweet $"
*
* LIBUSB interface code for CUPS.
*
* Copyright 2007-2015 by Apple Inc.
@@ -7,7 +9,7 @@
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
@@ -16,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>
@@ -2017,3 +2018,9 @@ soft_reset_printer(
return (errcode);
}
/*
* End of "$Id: usb-libusb.c 12881 2015-09-15 21:20:02Z msweet $".
*/
+7
Ver Arquivo
@@ -1,4 +1,6 @@
/*
* "$Id: usb-unix.c 12124 2014-08-28 15:37:22Z msweet $"
*
* USB port backend for CUPS.
*
* This file is included from "usb.c" when compiled on UNIX/Linux.
@@ -598,3 +600,8 @@ side_cb(int print_fd, /* I - Print file */
return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
}
/*
* End of "$Id: usb-unix.c 12124 2014-08-28 15:37:22Z msweet $".
*/
+22 -9
Ver Arquivo
@@ -1,16 +1,24 @@
/*
* USB printer backend for CUPS.
* "$Id: usb.c 10996 2013-05-29 11:51:34Z msweet $"
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
* USB port backend for CUPS.
*
* 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"
* "LICENSE" which should have been included with this file. If this
* file is missing or damaged, see the license at "http://www.cups.org/".
* Copyright 2007-2012 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* This file is subject to the Apple OS-Developed Software exception.
* 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"
* "LICENSE" which should have been included with this file. If this
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*
* Contents:
*
* list_devices() - List all available USB devices to stdout.
* print_device() - Print a file to a USB device.
* main() - Send a file to the specified USB port.
*/
/*
@@ -249,3 +257,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
return (status);
}
/*
* End of "$Id: usb.c 10996 2013-05-29 11:51:34Z msweet $".
*/
+7 -4
Ver Arquivo
@@ -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
+15 -8
Ver Arquivo
@@ -1,14 +1,16 @@
#
# Berkeley commands makefile for CUPS.
# "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $"
#
# Copyright 2007-2012 by Apple Inc.
# Copyright 1997-2006 by Easy Software Products, all rights reserved.
# Berkeley commands makefile for CUPS.
#
# 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
# missing or damaged, see the license at "http://www.cups.org/".
# 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/".
#
include ../Makedefs
@@ -159,3 +161,8 @@ lprm: lprm.o ../cups/$(LIBCUPS)
#
include Dependencies
#
# End of "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $".
#
+8 -1
Ver Arquivo
@@ -1,4 +1,6 @@
/*
* "$Id: lpc.c 11558 2014-02-06 18:33:34Z msweet $"
*
* "lpc" command for CUPS.
*
* Copyright 2007-2014 by Apple Inc.
@@ -8,7 +10,7 @@
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
@@ -433,3 +435,8 @@ show_status(http_t *http, /* I - HTTP connection to server */
ippDelete(response);
}
}
/*
* End of "$Id: lpc.c 11558 2014-02-06 18:33:34Z msweet $".
*/
+102 -106
Ver Arquivo
@@ -1,14 +1,16 @@
/*
* "$Id: lpq.c 11558 2014-02-06 18:33:34Z msweet $"
*
* "lpq" command for CUPS.
*
* Copyright 2007-2016 by Apple Inc.
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
@@ -39,8 +41,7 @@ main(int argc, /* I - Number of command-line arguments */
{
int i; /* Looping var */
http_t *http; /* Connection to server */
const char *opt, /* Option pointer */
*dest, /* Desired printer */
const char *dest, /* Desired printer */
*user, /* Desired user */
*val; /* Environment variable name */
char *instance; /* Printer instance */
@@ -66,138 +67,128 @@ main(int argc, /* I - Number of command-line arguments */
all = 0;
for (i = 1; i < argc; i ++)
{
if (argv[i][0] == '+')
{
interval = atoi(argv[i] + 1);
}
else if (argv[i][0] == '-')
{
for (opt = argv[i] + 1; *opt; opt ++)
switch (argv[i][1])
{
switch (*opt)
{
case 'E' : /* Encrypt */
case 'E' : /* Encrypt */
#ifdef HAVE_SSL
cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
if (http)
httpEncryption(http, HTTP_ENCRYPT_REQUIRED);
if (http)
httpEncryption(http, HTTP_ENCRYPT_REQUIRED);
#else
_cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."), argv[0]);
_cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."),
argv[0]);
#endif /* HAVE_SSL */
break;
break;
case 'U' : /* Username */
if (opt[1] != '\0')
case 'U' : /* Username */
if (argv[i][2] != '\0')
cupsSetUser(argv[i] + 2);
else
{
i ++;
if (i >= argc)
{
cupsSetUser(opt + 1);
opt += strlen(opt) - 1;
}
else
{
i ++;
if (i >= argc)
{
_cupsLangPrintf(stderr, _("%s: Error - expected username after \"-U\" option."), argv[0]);
return (1);
}
cupsSetUser(argv[i]);
}
break;
case 'P' : /* Printer */
if (opt[1] != '\0')
{
dest = opt + 1;
opt += strlen(opt) - 1;
}
else
{
i ++;
if (i >= argc)
{
httpClose(http);
usage();
}
dest = argv[i];
_cupsLangPrintf(stderr,
_("%s: Error - expected username after "
"\"-U\" option."), argv[0]);
return (1);
}
if ((instance = strchr(dest, '/')) != NULL)
*instance++ = '\0';
cupsSetUser(argv[i]);
}
break;
http = connect_server(argv[0], http);
case 'P' : /* Printer */
if (argv[i][2])
dest = argv[i] + 2;
else
{
i ++;
if ((named_dest = cupsGetNamedDest(http, dest, instance)) == NULL)
{
if (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED)
_cupsLangPrintf(stderr, _("%s: Error - add '/version=1.1' to server name."), argv[0]);
else if (instance)
_cupsLangPrintf(stderr, _("%s: Error - unknown destination \"%s/%s\"."), argv[0], dest, instance);
else
_cupsLangPrintf(stderr, _("%s: Unknown destination \"%s\"."), argv[0], dest);
return (1);
}
cupsFreeDests(1, named_dest);
break;
case 'a' : /* All printers */
all = 1;
break;
case 'h' : /* Connect to host */
if (http)
if (i >= argc)
{
httpClose(http);
http = NULL;
usage();
}
if (opt[1] != '\0')
{
cupsSetServer(opt + 1);
opt += strlen(opt) - 1;
}
else
{
i ++;
dest = argv[i];
}
if (i >= argc)
{
_cupsLangPrintf(stderr, _("%s: Error - expected hostname after \"-h\" option."), argv[0]);
return (1);
}
else
cupsSetServer(argv[i]);
}
break;
if ((instance = strchr(dest, '/')) != NULL)
*instance++ = '\0';
case 'l' : /* Long status */
longstatus = 1;
break;
http = connect_server(argv[0], http);
default :
if ((named_dest = cupsGetNamedDest(http, dest, instance)) == NULL)
{
if (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED)
_cupsLangPrintf(stderr,
_("%s: Error - add '/version=1.1' to server "
"name."), argv[0]);
else if (instance)
_cupsLangPrintf(stderr,
_("%s: Error - unknown destination \"%s/%s\"."),
argv[0], dest, instance);
else
_cupsLangPrintf(stderr, _("%s: Unknown destination \"%s\"."),
argv[0], dest);
return (1);
}
cupsFreeDests(1, named_dest);
break;
case 'a' : /* All printers */
all = 1;
break;
case 'h' : /* Connect to host */
if (http)
{
httpClose(http);
http = NULL;
}
usage();
}
if (argv[i][2] != '\0')
cupsSetServer(argv[i] + 2);
else
{
i ++;
if (i >= argc)
{
_cupsLangPrintf(stderr,
_("%s: Error - expected hostname after "
"\"-h\" option."), argv[0]);
return (1);
}
else
cupsSetServer(argv[i]);
}
break;
case 'l' : /* Long status */
longstatus = 1;
break;
default :
httpClose(http);
usage();
}
}
else if (isdigit(argv[i][0] & 255))
{
id = atoi(argv[i]);
}
else
{
user = argv[i];
}
}
http = connect_server(argv[0], http);
@@ -647,3 +638,8 @@ usage(void)
"[-l] [+interval]"));
exit(1);
}
/*
* End of "$Id: lpq.c 11558 2014-02-06 18:33:34Z msweet $".
*/
+211 -213
Ver Arquivo
@@ -1,14 +1,16 @@
/*
* "$Id: lpr.c 11558 2014-02-06 18:33:34Z msweet $"
*
* "lpr" command for CUPS.
*
* Copyright 2007-2016 by Apple Inc.
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-2007 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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
@@ -30,8 +32,7 @@ main(int argc, /* I - Number of command-line arguments */
int job_id; /* Job ID */
char ch; /* Option character */
char *printer, /* Destination printer or class */
*instance, /* Instance */
*opt; /* Option pointer */
*instance; /* Instance */
const char *title, /* Job title */
*val; /* Environment variable name */
int num_copies; /* Number of copies per file */
@@ -55,235 +56,229 @@ main(int argc, /* I - Number of command-line arguments */
title = NULL;
for (i = 1; i < argc; i ++)
{
if (argv[i][0] == '-')
{
for (opt = argv[i] + 1; *opt; opt ++)
switch (ch = argv[i][1])
{
switch (ch = *opt)
{
case 'E' : /* Encrypt */
case 'E' : /* Encrypt */
#ifdef HAVE_SSL
cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
#else
_cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."), argv[0]);
_cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."),
argv[0]);
#endif /* HAVE_SSL */
break;
break;
case 'U' : /* Username */
if (opt[1] != '\0')
case 'U' : /* Username */
if (argv[i][2] != '\0')
cupsSetUser(argv[i] + 2);
else
{
i ++;
if (i >= argc)
{
cupsSetUser(opt + 1);
opt += strlen(opt) - 1;
_cupsLangPrintf(stderr,
_("%s: Error - expected username after "
"\"-U\" option."), argv[0]);
return (1);
}
cupsSetUser(argv[i]);
}
break;
case 'H' : /* Connect to host */
if (argv[i][2] != '\0')
cupsSetServer(argv[i] + 2);
else
{
i ++;
if (i >= argc)
{
_cupsLangPrintf(stderr,
_("%s: Error - expected hostname after "
"\"-H\" option."), argv[0]);
return (1);
}
else
cupsSetServer(argv[i]);
}
break;
case '1' : /* TROFF font set 1 */
case '2' : /* TROFF font set 2 */
case '3' : /* TROFF font set 3 */
case '4' : /* TROFF font set 4 */
case 'i' : /* indent */
case 'w' : /* width */
if (argv[i][2] == '\0')
{
i ++;
if (i >= argc)
{
i ++;
if (i >= argc)
{
_cupsLangPrintf(stderr, _("%s: Error - expected username after \"-U\" option."), argv[0]);
return (1);
}
cupsSetUser(argv[i]);
}
break;
case 'H' : /* Connect to host */
if (opt[1] != '\0')
{
cupsSetServer(opt + 1);
opt += strlen(opt) - 1;
}
else
{
i ++;
if (i >= argc)
{
_cupsLangPrintf(stderr, _("%s: Error - expected hostname after \"-H\" option."), argv[0]);
return (1);
}
else
cupsSetServer(argv[i]);
}
break;
case '1' : /* TROFF font set 1 */
case '2' : /* TROFF font set 2 */
case '3' : /* TROFF font set 3 */
case '4' : /* TROFF font set 4 */
case 'i' : /* indent */
case 'w' : /* width */
if (opt[1] != '\0')
{
opt += strlen(opt) - 1;
}
else
{
i ++;
if (i >= argc)
{
_cupsLangPrintf(stderr,
_("%s: Error - expected value after \"-%c\" "
"option."), argv[0], ch);
return (1);
}
}
case 'c' : /* CIFPLOT */
case 'd' : /* DVI */
case 'f' : /* FORTRAN */
case 'g' : /* plot */
case 'n' : /* Ditroff */
case 't' : /* Troff */
case 'v' : /* Raster image */
_cupsLangPrintf(stderr, _("%s: Warning - \"%c\" format modifier not supported - output may not be correct."), argv[0], ch);
break;
case 'o' : /* Option */
if (opt[1] != '\0')
{
num_options = cupsParseOptions(opt + 1, num_options, &options);
opt += strlen(opt) - 1;
}
else
{
i ++;
if (i >= argc)
{
_cupsLangPrintf(stderr, _("%s: Error - expected option=value after \"-o\" option."), argv[0]);
return (1);
}
num_options = cupsParseOptions(argv[i], num_options, &options);
}
break;
case 'l' : /* Literal/raw */
num_options = cupsAddOption("raw", "true", num_options, &options);
break;
case 'p' : /* Prettyprint */
num_options = cupsAddOption("prettyprint", "true", num_options, &options);
break;
case 'h' : /* Suppress burst page */
num_options = cupsAddOption("job-sheets", "none", num_options, &options);
break;
case 's' : /* Don't use symlinks */
break;
case 'm' : /* Mail on completion */
{
char email[1024]; /* EMail address */
snprintf(email, sizeof(email), "mailto:%s@%s", cupsUser(), httpGetHostname(NULL, buffer, sizeof(buffer)));
num_options = cupsAddOption("notify-recipient-uri", email, num_options, &options);
}
break;
case 'q' : /* Queue file but don't print */
num_options = cupsAddOption("job-hold-until", "indefinite", num_options, &options);
break;
case 'r' : /* Remove file after printing */
deletefile = 1;
break;
case 'P' : /* Destination printer or class */
if (opt[1] != '\0')
{
printer = opt + 1;
opt += strlen(opt) - 1;
}
else
{
i ++;
if (i >= argc)
{
_cupsLangPrintf(stderr, _("%s: Error - expected destination after \"-P\" option."), argv[0]);
return (1);
}
printer = argv[i];
}
if ((instance = strrchr(printer, '/')) != NULL)
*instance++ = '\0';
if ((dest = cupsGetNamedDest(NULL, printer, instance)) != NULL)
{
for (j = 0; j < dest->num_options; j ++)
if (cupsGetOption(dest->options[j].name, num_options,
options) == NULL)
num_options = cupsAddOption(dest->options[j].name,
dest->options[j].value,
num_options, &options);
}
else if (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED)
{
_cupsLangPrintf(stderr, _("%s: Error - add '/version=1.1' to server name."), argv[0]);
_cupsLangPrintf(stderr,
_("%s: Error - expected value after \"-%c\" "
"option."), argv[0], ch);
return (1);
}
break;
}
case '#' : /* Number of copies */
if (opt[1] != '\0')
{
num_copies = atoi(opt + 1);
opt += strlen(opt) - 1;
}
else
{
i ++;
if (i >= argc)
{
_cupsLangPrintf(stderr, _("%s: Error - expected copies after \"-#\" option."), argv[0]);
return (1);
}
case 'c' : /* CIFPLOT */
case 'd' : /* DVI */
case 'f' : /* FORTRAN */
case 'g' : /* plot */
case 'n' : /* Ditroff */
case 't' : /* Troff */
case 'v' : /* Raster image */
_cupsLangPrintf(stderr,
_("%s: Warning - \"%c\" format modifier not "
"supported - output may not be correct."),
argv[0], ch);
break;
num_copies = atoi(argv[i]);
}
if (num_copies < 1)
case 'o' : /* Option */
if (argv[i][2] != '\0')
num_options = cupsParseOptions(argv[i] + 2, num_options, &options);
else
{
i ++;
if (i >= argc)
{
_cupsLangPrintf(stderr, _("%s: Error - copies must be 1 or more."), argv[0]);
_cupsLangPrintf(stderr,
_("%s: Error - expected option=value after "
"\"-o\" option."), argv[0]);
return (1);
}
sprintf(buffer, "%d", num_copies);
num_options = cupsAddOption("copies", buffer, num_options, &options);
break;
num_options = cupsParseOptions(argv[i], num_options, &options);
}
break;
case 'C' : /* Class */
case 'J' : /* Job name */
case 'T' : /* Title */
if (opt[1] != '\0')
case 'l' : /* Literal/raw */
num_options = cupsAddOption("raw", "true", num_options, &options);
break;
case 'p' : /* Prettyprint */
num_options = cupsAddOption("prettyprint", "true", num_options,
&options);
break;
case 'h' : /* Suppress burst page */
num_options = cupsAddOption("job-sheets", "none", num_options,
&options);
break;
case 's' : /* Don't use symlinks */
break;
case 'm' : /* Mail on completion */
{
char email[1024]; /* EMail address */
snprintf(email, sizeof(email), "mailto:%s@%s", cupsUser(),
httpGetHostname(NULL, buffer, sizeof(buffer)));
num_options = cupsAddOption("notify-recipient-uri", email,
num_options, &options);
}
break;
case 'q' : /* Queue file but don't print */
num_options = cupsAddOption("job-hold-until", "indefinite",
num_options, &options);
break;
case 'r' : /* Remove file after printing */
deletefile = 1;
break;
case 'P' : /* Destination printer or class */
if (argv[i][2] != '\0')
printer = argv[i] + 2;
else
{
i ++;
if (i >= argc)
{
title = opt + 1;
opt += strlen(opt) - 1;
_cupsLangPrintf(stderr,
_("%s: Error - expected destination after "
"\"-P\" option."), argv[0]);
return (1);
}
else
{
i ++;
if (i >= argc)
{
_cupsLangPrintf(stderr, _("%s: Error - expected name after \"-%c\" option."), argv[0], ch);
return (1);
}
title = argv[i];
}
break;
printer = argv[i];
}
default :
_cupsLangPrintf(stderr, _("%s: Error - unknown option \"%c\"."), argv[0], *opt);
if ((instance = strrchr(printer, '/')) != NULL)
*instance++ = '\0';
if ((dest = cupsGetNamedDest(NULL, printer, instance)) != NULL)
{
for (j = 0; j < dest->num_options; j ++)
if (cupsGetOption(dest->options[j].name, num_options,
options) == NULL)
num_options = cupsAddOption(dest->options[j].name,
dest->options[j].value,
num_options, &options);
}
else if (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED)
{
_cupsLangPrintf(stderr,
_("%s: Error - add '/version=1.1' to server "
"name."), argv[0]);
return (1);
}
}
break;
case '#' : /* Number of copies */
if (argv[i][2] != '\0')
num_copies = atoi(argv[i] + 2);
else
{
i ++;
if (i >= argc)
{
_cupsLangPrintf(stderr,
_("%s: Error - expected copies after "
"\"-#\" option."), argv[0]);
return (1);
}
num_copies = atoi(argv[i]);
}
sprintf(buffer, "%d", num_copies);
num_options = cupsAddOption("copies", buffer, num_options, &options);
break;
case 'C' : /* Class */
case 'J' : /* Job name */
case 'T' : /* Title */
if (argv[i][2] != '\0')
title = argv[i] + 2;
else
{
i ++;
if (i >= argc)
{
_cupsLangPrintf(stderr,
_("%s: Error - expected name after \"-%c\" "
"option."), argv[0], ch);
return (1);
}
title = argv[i];
}
break;
default :
_cupsLangPrintf(stderr,
_("%s: Error - unknown option \"%c\"."), argv[0],
argv[i][1]);
return (1);
}
}
else if (num_files < 1000)
@@ -312,11 +307,9 @@ main(int argc, /* I - Number of command-line arguments */
}
}
else
{
_cupsLangPrintf(stderr, _("%s: Error - too many files - \"%s\"."), argv[0], argv[i]);
}
}
_cupsLangPrintf(stderr,
_("%s: Error - too many files - \"%s\"."), argv[0],
argv[i]);
/*
* See if we have any files to print; if not, print from stdin...
*/
@@ -436,3 +429,8 @@ main(int argc, /* I - Number of command-line arguments */
return (0);
}
/*
* End of "$Id: lpr.c 11558 2014-02-06 18:33:34Z msweet $".
*/
+87 -84
Ver Arquivo
@@ -1,14 +1,20 @@
/*
* "lprm" command for CUPS.
* "$Id: lprm.c 10996 2013-05-29 11:51:34Z msweet $"
*
* Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
* "lprm" command for CUPS.
*
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* Copyright 2007-2010 by Apple Inc.
* Copyright 1997-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/".
*
* Contents:
*
* main() - Parse options and cancel jobs.
*/
/*
@@ -29,8 +35,7 @@ main(int argc, /* I - Number of command-line arguments */
int i; /* Looping var */
int job_id; /* Job ID */
const char *name; /* Destination printer */
char *instance, /* Pointer to instance name */
*opt; /* Option pointer */
char *instance; /* Pointer to instance name */
cups_dest_t *dest, /* Destination */
*defdest; /* Default destination */
int did_cancel; /* Did we cancel something? */
@@ -51,96 +56,90 @@ main(int argc, /* I - Number of command-line arguments */
*/
for (i = 1; i < argc; i ++)
{
if (argv[i][0] == '-' && argv[i][1] != '\0')
{
for (opt = argv[i] + 1; *opt; opt ++)
switch (argv[i][1])
{
switch (*opt)
{
case 'E' : /* Encrypt */
case 'E' : /* Encrypt */
#ifdef HAVE_SSL
cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
#else
_cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."), argv[0]);
_cupsLangPrintf(stderr,
_("%s: Sorry, no encryption support."), argv[0]);
#endif /* HAVE_SSL */
break;
break;
case 'P' : /* Cancel jobs on a printer */
if (opt[1] != '\0')
case 'P' : /* Cancel jobs on a printer */
if (argv[i][2])
name = argv[i] + 2;
else
{
i ++;
name = argv[i];
}
if ((instance = strchr(name, '/')) != NULL)
*instance = '\0';
if ((dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, name,
NULL)) == NULL)
{
_cupsLangPrintf(stderr,
_("%s: Error - unknown destination \"%s\"."),
argv[0], name);
goto error;
}
cupsFreeDests(1, dest);
break;
case 'U' : /* Username */
if (argv[i][2] != '\0')
cupsSetUser(argv[i] + 2);
else
{
i ++;
if (i >= argc)
{
name = opt + 1;
opt += strlen(opt) - 1;
}
else
{
i ++;
name = argv[i];
_cupsLangPrintf(stderr,
_("%s: Error - expected username after "
"\"-U\" option."), argv[0]);
goto error;
}
if ((instance = strchr(name, '/')) != NULL)
*instance = '\0';
cupsSetUser(argv[i]);
}
break;
case 'h' : /* Connect to host */
if (argv[i][2] != '\0')
cupsSetServer(argv[i] + 2);
else
{
i ++;
if ((dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, name, NULL)) == NULL)
if (i >= argc)
{
_cupsLangPrintf(stderr, _("%s: Error - unknown destination \"%s\"."), argv[0], name);
_cupsLangPrintf(stderr,
_("%s: Error - expected hostname after "
"\"-h\" option."), argv[0]);
goto error;
}
cupsFreeDests(1, dest);
break;
case 'U' : /* Username */
if (opt[1] != '\0')
{
cupsSetUser(opt + 1);
opt += strlen(opt) - 1;
}
}
else
{
i ++;
if (i >= argc)
{
_cupsLangPrintf(stderr, _("%s: Error - expected username after \"-U\" option."), argv[0]);
goto error;
}
cupsSetServer(argv[i]);
}
cupsSetUser(argv[i]);
}
break;
if (defdest)
cupsFreeDests(1, defdest);
case 'h' : /* Connect to host */
if (opt[1] != '\0')
{
cupsSetServer(opt + 1);
opt += strlen(opt) - 1;
}
else
{
i ++;
defdest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, NULL, NULL);
name = defdest ? defdest->name : NULL;
break;
if (i >= argc)
{
_cupsLangPrintf(stderr, _("%s: Error - expected hostname after \"-h\" option."), argv[0]);
goto error;
}
else
cupsSetServer(argv[i]);
}
if (defdest)
cupsFreeDests(1, defdest);
defdest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, NULL, NULL);
name = defdest ? defdest->name : NULL;
break;
default :
_cupsLangPrintf(stderr, _("%s: Error - unknown option \"%c\"."), argv[0], *opt);
goto error;
}
default :
_cupsLangPrintf(stderr, _("%s: Error - unknown option \"%c\"."),
argv[0], argv[i][1]);
goto error;
}
}
else
{
/*
@@ -183,7 +182,6 @@ main(int argc, /* I - Number of command-line arguments */
did_cancel = 1;
}
}
/*
* If nothing has been canceled yet, cancel the current job on the specified
@@ -212,3 +210,8 @@ main(int argc, /* I - Number of command-line arguments */
return (1);
}
/*
* End of "$Id: lprm.c 10996 2013-05-29 11:51:34Z msweet $".
*/
+1 -3
Ver Arquivo
@@ -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 \
+38 -14
Ver Arquivo
@@ -1,14 +1,16 @@
#
# "$Id: Makefile 12519 2015-02-17 13:10:19Z msweet $"
#
# CGI makefile for CUPS.
#
# Copyright 2007-2016 by Apple Inc.
# Copyright 2007-2014 by Apple Inc.
# Copyright 1997-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
# missing or damaged, see the license at "http://www.cups.org/".
# file is missing or damaged, see the license at "http://www.cups.org/".
#
include ../Makedefs
@@ -126,13 +128,10 @@ install-exec:
#
install-headers:
if test "x$(privateinclude)" != x; then \
echo Installing private header files into $(PRIVATEINCLUDE)...; \
$(INSTALL_DIR) -m 755 $(PRIVATEINCLUDE); \
for file in cgi.h help-index.h; do \
$(INSTALL_DATA) $$file $(PRIVATEINCLUDE); \
done; \
fi
echo Installing header files in $(INCLUDEDIR)/cups...
$(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
$(INSTALL_DATA) cgi.h $(INCLUDEDIR)/cups
$(INSTALL_DATA) help-index.h $(INCLUDEDIR)/cups
#
@@ -179,11 +178,31 @@ uninstall:
$(RM) $(LIBDIR)/libcupscgi.so
$(RM) $(LIBDIR)/libcupscgi.so.1
-$(RMDIR) $(LIBDIR)
-if test "x$(privateinclude)" != x; then \
$(RM) $(PRIVATEINCLUDE)/cgi.h; \
$(RM) $(PRIVATEINCLUDE)/help-index.h; \
$(RMDIR) $(PRIVATEINCLUDE); \
fi
$(RM) $(INCLUDEDIR)/cups/cgi.h
$(RM) $(INCLUDEDIR)/cups/help-index.h
-$(RMDIR) $(INCLUDEDIR)/cups
#
# Automatic API help files...
#
apihelp:
mxmldoc --section "Programming" \
--title "CGI API" \
--css ../doc/cups-printable.css \
--header api-cgi.header --intro api-cgi.shtml \
cgi.h help-index.h $(LIBOBJS:.o=.c) >../doc/help/api-cgi.html
mxmldoc --tokens help/api-cgi.html api-cgi.xml >../doc/help/api-cgi.tokens
$(RM) api-cgi.xml
framedhelp:
mxmldoc --framed api-cgi \
--section "Programming" \
--title "CGI API" \
--css ../doc/cups-printable.css \
--header api-cgi.header --intro api-cgi.shtml \
cgi.h help-index.h $(LIBOBJS:.o=.c)
#
@@ -331,3 +350,8 @@ testtemplate: testtemplate.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
#
include Dependencies
#
# End of "$Id: Makefile 12519 2015-02-17 13:10:19Z msweet $".
#
+8 -1
Ver Arquivo
@@ -1,4 +1,6 @@
/*
* "$Id: admin.c 12516 2015-02-12 20:18:11Z msweet $"
*
* Administration CGI for CUPS.
*
* Copyright 2007-2015 by Apple Inc.
@@ -8,7 +10,7 @@
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
@@ -4272,3 +4274,8 @@ get_printer_ppd(const char *uri, /* I - Printer URI */
else
return (NULL);
}
/*
* End of "$Id: admin.c 12516 2015-02-12 20:18:11Z msweet $".
*/
@@ -1,7 +1,9 @@
<!--
Administrative API header for CUPS.
"$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
Copyright 2016 by Apple Inc.
CGI API header for CUPS.
Copyright 2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
@@ -10,25 +12,23 @@
file is missing or damaged, see the license at "http://www.cups.org/".
-->
<h1 class='title'>Administrative APIs</h1>
<h1 class='title'>CGI API</h1>
<div class='summary'><table summary='General Information'>
<thead>
<tr>
<th>Header</th>
<th>cups/adminutil.h</th>
<th>cups/cgi.h</th>
</tr>
</thead>
<tbody>
<tr>
<th>Library</th>
<td>-lcups</td>
<td>-lcupscgi</td>
</tr>
<tr>
<th>See Also</th>
<td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a><br>
Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br>
Programming: <a href='api-httpipp.html' target='_top'>HTTP and IPP APIs</a></td>
<td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
</tr>
</tbody>
</table></div>
+17
Ver Arquivo
@@ -0,0 +1,17 @@
<!--
"$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
CGI API introduction for CUPS.
Copyright 2009 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/".
-->
<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
<p>The CGI API provides Common Gateway Interface functions for CUPS.</p>
+15 -8
Ver Arquivo
@@ -1,14 +1,16 @@
/*
* Private CGI definitions for CUPS.
* "$Id: cgi-private.h 10996 2013-05-29 11:51:34Z msweet $"
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
* Private CGI definitions for CUPS.
*
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* Copyright 2007-2011 by Apple Inc.
* Copyright 1997-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/".
*/
/*
@@ -27,3 +29,8 @@
*/
#define CUPS_PAGE_MAX 100 /* Maximum items per page */
/*
* End of "$Id: cgi-private.h 10996 2013-05-29 11:51:34Z msweet $".
*/
+14 -8
Ver Arquivo
@@ -1,14 +1,16 @@
/*
* CGI support library definitions for CUPS.
* "$Id: cgi.h 10996 2013-05-29 11:51:34Z msweet $"
*
* Copyright 2007-2010 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
* CGI support library definitions for CUPS.
*
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* Copyright 2007-2010 by Apple Inc.
* Copyright 1997-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/".
*/
#ifndef _CUPS_CGI_H_
@@ -111,3 +113,7 @@ extern const char *cgiText(const char *message);
# endif /* __cplusplus */
#endif /* !_CUPS_CGI_H_ */
/*
* End of "$Id: cgi.h 10996 2013-05-29 11:51:34Z msweet $".
*/
+30 -13
Ver Arquivo
@@ -1,14 +1,16 @@
/*
* "$Id: classes.c 11928 2014-06-13 00:08:32Z msweet $"
*
* Class status CGI for CUPS.
*
* Copyright 2007-2016 by Apple Inc.
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
@@ -297,7 +299,8 @@ show_all_classes(http_t *http, /* I - Connection to server */
*response; /* IPP response */
cups_array_t *classes; /* Array of class objects */
ipp_attribute_t *pclass; /* Class object */
int first, /* First class to show */
int ascending, /* Order of classes (0 = descending) */
first, /* First class to show */
count; /* Number of classes */
const char *var; /* Form variable */
void *search; /* Search data */
@@ -369,10 +372,25 @@ show_all_classes(http_t *http, /* I - Connection to server */
sprintf(val, "%d", count);
cgiSetVariable("TOTAL", val);
for (i = 0, pclass = (ipp_attribute_t *)cupsArrayIndex(classes, first);
i < CUPS_PAGE_MAX && pclass;
i ++, pclass = (ipp_attribute_t *)cupsArrayNext(classes))
cgiSetIPPObjectVars(pclass, NULL, i);
if ((var = cgiGetVariable("ORDER")) != NULL && *var)
ascending = !_cups_strcasecmp(var, "asc");
else
ascending = 1;
if (ascending)
{
for (i = 0, pclass = (ipp_attribute_t *)cupsArrayIndex(classes, first);
i < CUPS_PAGE_MAX && pclass;
i ++, pclass = (ipp_attribute_t *)cupsArrayNext(classes))
cgiSetIPPObjectVars(pclass, NULL, i);
}
else
{
for (i = 0, pclass = (ipp_attribute_t *)cupsArrayIndex(classes, count - first - 1);
i < CUPS_PAGE_MAX && pclass;
i ++, pclass = (ipp_attribute_t *)cupsArrayPrev(classes))
cgiSetIPPObjectVars(pclass, NULL, i);
}
/*
* Save navigation URLs...
@@ -392,12 +410,6 @@ show_all_classes(http_t *http, /* I - Connection to server */
cgiSetVariable("NEXT", val);
}
if (count > CUPS_PAGE_MAX)
{
snprintf(val, sizeof(val), "%d", CUPS_PAGE_MAX * (count / CUPS_PAGE_MAX));
cgiSetVariable("LAST", val);
}
/*
* Then show everything...
*/
@@ -531,3 +543,8 @@ show_class(http_t *http, /* I - Connection to server */
cgiEndHTML();
}
/*
* End of "$Id: classes.c 11928 2014-06-13 00:08:32Z msweet $".
*/
+8 -1
Ver Arquivo
@@ -1,4 +1,6 @@
/*
* "$Id: help-index.c 12644 2015-05-19 21:22:35Z msweet $"
*
* Online help index routines for CUPS.
*
* Copyright 2007-2015 by Apple Inc.
@@ -8,7 +10,7 @@
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
@@ -1301,3 +1303,8 @@ help_sort_words(help_word_t *w1, /* I - Second word */
return (_cups_strcasecmp(w1->text, w2->text));
}
/*
* End of "$Id: help-index.c 12644 2015-05-19 21:22:35Z msweet $".
*/
+14 -8
Ver Arquivo
@@ -1,14 +1,16 @@
/*
* Online help index definitions for CUPS.
* "$Id: help-index.h 10996 2013-05-29 11:51:34Z msweet $"
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
* Online help index definitions for CUPS.
*
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 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/".
*/
#ifndef _CUPS_HELP_INDEX_H_
@@ -79,3 +81,7 @@ extern help_index_t *helpSearchIndex(help_index_t *hi, const char *query,
# endif /* __cplusplus */
#endif /* !_CUPS_HELP_INDEX_H_ */
/*
* End of "$Id: help-index.h 10996 2013-05-29 11:51:34Z msweet $".
*/
+19 -8
Ver Arquivo
@@ -1,14 +1,20 @@
/*
* Online help CGI for CUPS.
* "$Id: help.c 10996 2013-05-29 11:51:34Z msweet $"
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
* Online help CGI for CUPS.
*
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* Copyright 2007-2011 by Apple Inc.
* Copyright 1997-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/".
*
* Contents:
*
* main() - Main entry for CGI.
*/
/*
@@ -384,3 +390,8 @@ main(int argc, /* I - Number of command-line arguments */
return (0);
}
/*
* End of "$Id: help.c 10996 2013-05-29 11:51:34Z msweet $".
*/
+26 -9
Ver Arquivo
@@ -1,14 +1,26 @@
/*
* HTML support functions for CUPS.
* "$Id: html.c 10996 2013-05-29 11:51:34Z msweet $"
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
* HTML support functions for CUPS.
*
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* Copyright 2007-2011 by Apple Inc.
* Copyright 1997-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/".
*
* Contents:
*
* cgiEndHTML() - End a HTML page.
* cgiEndMultipart() - End the delivery of a multipart web page.
* cgiFormEncode() - Encode a string as a form variable.
* cgiStartHTML() - Start a HTML page.
* cgiStartMultipart() - Start a multipart delivery of a web page.
* cgiSupportsMultipart() - Does the browser support multi-part documents?
* cgi_null_passwd() - Return a NULL password for authentication.
*/
/*
@@ -91,7 +103,7 @@ cgiFormEncode(char *dst, /* I - Destination string */
for (dstptr = dst; *src && dstptr < dstend;)
{
switch (*src)
{
{
case ' ' :
/*
* Encode spaces with a "+"...
@@ -220,3 +232,8 @@ cgi_null_passwd(const char *prompt) /* I - Prompt string (unused) */
return (NULL);
}
/*
* End of "$Id: html.c 10996 2013-05-29 11:51:34Z msweet $".
*/
+48 -26
Ver Arquivo
@@ -1,14 +1,16 @@
/*
* "$Id: ipp-var.c 12768 2015-06-30 16:13:38Z msweet $"
*
* CGI <-> IPP variable routines for CUPS.
*
* Copyright 2007-2016 by Apple Inc.
* Copyright 2007-2015 by Apple Inc.
* Copyright 1997-2007 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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
@@ -1323,7 +1325,7 @@ cgiSetIPPVars(ipp_t *response, /* I - Response data to be copied... */
attr = cgiSetIPPObjectVars(attr, prefix, element);
}
fprintf(stderr, "DEBUG2: Returning %d from cgiSetIPPVars()...\n", element);
fprintf(stderr, "DEBUG2: Returing %d from cgiSetIPPVars()...\n", element);
return (element);
}
@@ -1358,7 +1360,8 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
*response; /* IPP response */
cups_array_t *jobs; /* Array of job objects */
ipp_attribute_t *job; /* Job object */
int first, /* First job to show */
int ascending, /* Order of jobs (0 = descending) */
first, /* First job to show */
count; /* Number of jobs */
const char *var, /* Form variable */
*query, /* Query string */
@@ -1394,17 +1397,6 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "which-jobs",
NULL, which_jobs);
if ((var = cgiGetVariable("FIRST")) != NULL)
{
if ((first = atoi(var)) < 0)
first = 0;
}
else
first = 0;
if (first > 0)
ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "first-index", first + 1);
cgiGetAttributes(request, "jobs.tmpl");
/*
@@ -1427,7 +1419,7 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
}
jobs = cgiGetIPPObjects(response, search);
count = cupsArrayCount(jobs) + first;
count = cupsArrayCount(jobs);
if (search)
cgiFreeSearch(search);
@@ -1436,6 +1428,25 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
* Figure out which jobs to display...
*/
if ((var = cgiGetVariable("FIRST")) != NULL)
first = atoi(var);
else
first = 0;
if (first >= count)
first = count - CUPS_PAGE_MAX;
first = (first / CUPS_PAGE_MAX) * CUPS_PAGE_MAX;
if (first < 0)
first = 0;
if ((var = cgiGetVariable("ORDER")) != NULL && *var)
ascending = !_cups_strcasecmp(var, "asc");
else
ascending = !which_jobs || !*which_jobs ||
!_cups_strcasecmp(which_jobs, "not-completed");
section = cgiGetVariable("SECTION");
cgiClearVariables();
@@ -1443,6 +1454,8 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
if (query)
cgiSetVariable("QUERY", query);
cgiSetVariable("ORDER", ascending ? "asc" : "dec");
cgiSetVariable("SECTION", section);
sprintf(val, "%d", count);
@@ -1451,10 +1464,20 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
if (which_jobs)
cgiSetVariable("WHICH_JOBS", which_jobs);
for (i = 0, job = (ipp_attribute_t *)cupsArrayFirst(jobs);
i < CUPS_PAGE_MAX && job;
i ++, job = (ipp_attribute_t *)cupsArrayNext(jobs))
cgiSetIPPObjectVars(job, NULL, i);
if (ascending)
{
for (i = 0, job = (ipp_attribute_t *)cupsArrayIndex(jobs, first);
i < CUPS_PAGE_MAX && job;
i ++, job = (ipp_attribute_t *)cupsArrayNext(jobs))
cgiSetIPPObjectVars(job, NULL, i);
}
else
{
for (i = 0, job = (ipp_attribute_t *)cupsArrayIndex(jobs, count - first - 1);
i < CUPS_PAGE_MAX && job;
i ++, job = (ipp_attribute_t *)cupsArrayPrev(jobs))
cgiSetIPPObjectVars(job, NULL, i);
}
/*
* Save navigation URLs...
@@ -1483,12 +1506,6 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
cgiSetVariable("NEXT", val);
}
if (count > CUPS_PAGE_MAX)
{
snprintf(val, sizeof(val), "%d", CUPS_PAGE_MAX * (count / CUPS_PAGE_MAX));
cgiSetVariable("LAST", val);
}
/*
* Then show everything...
*/
@@ -1530,3 +1547,8 @@ cgiText(const char *message) /* I - Message */
return (_cupsLangString(language, message));
}
/*
* End of "$Id: ipp-var.c 12768 2015-06-30 16:13:38Z msweet $".
*/
+8 -1
Ver Arquivo
@@ -1,4 +1,6 @@
/*
* "$Id: jobs.c 11558 2014-02-06 18:33:34Z msweet $"
*
* Job status CGI for CUPS.
*
* Copyright 2007-2014 by Apple Inc.
@@ -8,7 +10,7 @@
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
@@ -199,3 +201,8 @@ do_job_op(http_t *http, /* I - HTTP connection */
cgiEndHTML();
}
/*
* End of "$Id: jobs.c 11558 2014-02-06 18:33:34Z msweet $".
*/
+25 -8
Ver Arquivo
@@ -1,18 +1,30 @@
/*
* Xcode documentation set generator.
* "$Id: makedocset.c 3833 2012-05-23 22:51:18Z msweet $"
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
* Xcode documentation set generator.
*
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* Copyright 2007-2012 by Apple Inc.
* Copyright 1997-2007 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/".
*
* Usage:
*
* makedocset directory *.tokens
*
* Contents:
*
* main() - Test the help index code.
* compare_html() - Compare the titles of two HTML files.
* compare_sections() - Compare the names of two help sections.
* compare_sections_files() - Compare the number of files and section names.
* write_index() - Write an index file for the CUPS help.
* write_info() - Write the Info.plist file.
* write_nodes() - Write the Nodes.xml file.
*/
/*
@@ -467,3 +479,8 @@ write_nodes(const char *path, /* I - File to write */
cupsFileClose(fp);
}
/*
* End of "$Id: makedocset.c 3833 2012-05-23 22:51:18Z msweet $".
*/
+30 -13
Ver Arquivo
@@ -1,14 +1,16 @@
/*
* "$Id: printers.c 11928 2014-06-13 00:08:32Z msweet $"
*
* Printer status CGI for CUPS.
*
* Copyright 2007-2016 by Apple Inc.
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
@@ -304,7 +306,8 @@ show_all_printers(http_t *http, /* I - Connection to server */
*response; /* IPP response */
cups_array_t *printers; /* Array of printer objects */
ipp_attribute_t *printer; /* Printer object */
int first, /* First printer to show */
int ascending, /* Order of printers (0 = descending) */
first, /* First printer to show */
count; /* Number of printers */
const char *var; /* Form variable */
void *search; /* Search data */
@@ -386,10 +389,25 @@ show_all_printers(http_t *http, /* I - Connection to server */
sprintf(val, "%d", count);
cgiSetVariable("TOTAL", val);
for (i = 0, printer = (ipp_attribute_t *)cupsArrayIndex(printers, first);
i < CUPS_PAGE_MAX && printer;
i ++, printer = (ipp_attribute_t *)cupsArrayNext(printers))
cgiSetIPPObjectVars(printer, NULL, i);
if ((var = cgiGetVariable("ORDER")) != NULL && *var)
ascending = !_cups_strcasecmp(var, "asc");
else
ascending = 1;
if (ascending)
{
for (i = 0, printer = (ipp_attribute_t *)cupsArrayIndex(printers, first);
i < CUPS_PAGE_MAX && printer;
i ++, printer = (ipp_attribute_t *)cupsArrayNext(printers))
cgiSetIPPObjectVars(printer, NULL, i);
}
else
{
for (i = 0, printer = (ipp_attribute_t *)cupsArrayIndex(printers, count - first - 1);
i < CUPS_PAGE_MAX && printer;
i ++, printer = (ipp_attribute_t *)cupsArrayPrev(printers))
cgiSetIPPObjectVars(printer, NULL, i);
}
/*
* Save navigation URLs...
@@ -409,12 +427,6 @@ show_all_printers(http_t *http, /* I - Connection to server */
cgiSetVariable("NEXT", val);
}
if (count > CUPS_PAGE_MAX)
{
snprintf(val, sizeof(val), "%d", CUPS_PAGE_MAX * (count / CUPS_PAGE_MAX));
cgiSetVariable("LAST", val);
}
/*
* Then show everything...
*/
@@ -551,3 +563,8 @@ show_printer(http_t *http, /* I - Connection to server */
cgiEndHTML();
}
/*
* End of "$Id: printers.c 11928 2014-06-13 00:08:32Z msweet $".
*/
+8 -1
Ver Arquivo
@@ -1,4 +1,6 @@
/*
* "$Id: search.c 11558 2014-02-06 18:33:34Z msweet $"
*
* Search routines for CUPS.
*
* Copyright 2007-2014 by Apple Inc.
@@ -8,7 +10,7 @@
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
@@ -366,3 +368,8 @@ cgiFreeSearch(void *search) /* I - Search context */
{
regfree((regex_t *)search);
}
/*
* End of "$Id: search.c 11558 2014-02-06 18:33:34Z msweet $".
*/
+8 -1
Ver Arquivo
@@ -1,4 +1,6 @@
/*
* "$Id: template.c 12700 2015-06-08 18:32:35Z msweet $"
*
* CGI template function.
*
* Copyright 2007-2015 by Apple Inc.
@@ -8,7 +10,7 @@
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
#include "cgi-private.h"
@@ -681,3 +683,8 @@ cgi_puturi(const char *s, /* I - String to output */
s ++;
}
}
/*
* End of "$Id: template.c 12700 2015-06-08 18:32:35Z msweet $".
*/
+8 -1
Ver Arquivo
@@ -1,4 +1,6 @@
/*
* "$Id: testcgi.c 11558 2014-02-06 18:33:34Z msweet $"
*
* CGI test program for CUPS.
*
* Copyright 2007-2014 by Apple Inc.
@@ -8,7 +10,7 @@
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
@@ -60,3 +62,8 @@ main(void)
return (0);
}
/*
* End of "$Id: testcgi.c 11558 2014-02-06 18:33:34Z msweet $".
*/
+20 -8
Ver Arquivo
@@ -1,14 +1,21 @@
/*
* Help index test program for CUPS.
* "$Id: testhi.c 10996 2013-05-29 11:51:34Z msweet $"
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
* Help index test program for CUPS.
*
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 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/".
*
* Contents:
*
* main() - Test the help index code.
* list_nodes() - List nodes in an array...
*/
/*
@@ -99,3 +106,8 @@ list_nodes(const char *title, /* I - Title string */
printf(" (%d words)\n", cupsArrayCount(node->words));
}
}
/*
* End of "$Id: testhi.c 10996 2013-05-29 11:51:34Z msweet $".
*/
+19 -8
Ver Arquivo
@@ -1,14 +1,20 @@
/*
* CGI template test program for CUPS.
* "$Id: testtemplate.c 10996 2013-05-29 11:51:34Z msweet $"
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 2006 by Easy Software Products.
* CGI template test program for CUPS.
*
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* Copyright 2007-2011 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/".
*
* Contents:
*
* main() - Test the template code.
*/
/*
@@ -90,3 +96,8 @@ main(int argc, /* I - Number of command-line arguments */
return (0);
}
/*
* End of "$Id: testtemplate.c 10996 2013-05-29 11:51:34Z msweet $".
*/
+8 -1
Ver Arquivo
@@ -1,4 +1,6 @@
/*
* "$Id: var.c 12621 2015-05-06 21:32:18Z msweet $"
*
* CGI form variable and array functions for CUPS.
*
* Copyright 2007-2015 by Apple Inc.
@@ -8,7 +10,7 @@
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
@@ -1292,3 +1294,8 @@ cgi_unlink_file(void)
form_file = NULL;
}
}
/*
* End of "$Id: var.c 12621 2015-05-06 21:32:18Z msweet $".
*/
+15 -8
Ver Arquivo
@@ -1,14 +1,16 @@
#
# Configuration file makefile for CUPS.
# "$Id: Makefile 12533 2015-02-27 12:30:26Z msweet $"
#
# Copyright 2007-2015 by Apple Inc.
# Copyright 1993-2006 by Easy Software Products.
# Configuration file makefile for CUPS.
#
# 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
# missing or damaged, see the license at "http://www.cups.org/".
# Copyright 2007-2015 by Apple Inc.
# Copyright 1993-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/".
#
include ../Makedefs
@@ -134,3 +136,8 @@ uninstall:
$(RM) $(BUILDROOT)$(PAMDIR)/cups; \
$(RMDIR) $(BUILDROOT)$(PAMDIR); \
fi
#
# End of "$Id: Makefile 12533 2015-02-27 12:30:26Z msweet $".
#
-46
Ver Arquivo
@@ -134,49 +134,3 @@ WebInterface @CUPS_WEBIF@
Order deny,allow
</Limit>
</Policy>
# Set the kerberized printer/job policies...
<Policy kerberos>
# Job/subscription privacy...
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI Validate-Job>
AuthType Negotiate
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Negotiate
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @CUPS_DEFAULT_PRINTOPERATOR_AUTH@
Order deny,allow
</Limit>
# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Negotiate
Require user @OWNER @CUPS_DEFAULT_PRINTOPERATOR_AUTH@
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
+17 -12
Ver Arquivo
@@ -1,18 +1,20 @@
#
# DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
# VERSIONS OF CUPS. Instead, create a "local.convs" file that
# reflects your local configuration changes.
# "$Id: mime.convs.in 11025 2013-06-07 01:00:33Z msweet $"
#
# Base MIME conversions file for CUPS.
# DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
# VERSIONS OF CUPS. Instead, create a "local.convs" file that
# reflects your local configuration changes.
#
# Copyright 2007-2016 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products.
# Base MIME conversions file for CUPS.
#
# 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/".
# Copyright 2007-2011 by Apple Inc.
# Copyright 1997-2007 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/".
#
########################################################################
@@ -45,7 +47,6 @@ application/postscript application/vnd.cups-postscript 66 pstops
# PWG Raster filter for IPP Everywhere...
application/vnd.cups-raster image/pwg-raster 100 rastertopwg
application/vnd.cups-raster image/urf 100 rastertopwg
########################################################################
#
@@ -56,3 +57,7 @@ application/vnd.cups-raster image/urf 100 rastertopwg
#
@DEFAULT_RAW_PRINTING@application/octet-stream application/vnd.cups-raw 0 -
#
# End of "$Id: mime.convs.in 11025 2013-06-07 01:00:33Z msweet $".
#
+7 -2
Ver Arquivo
@@ -1,11 +1,13 @@
#
# "$Id: mime.types 7670 2008-06-17 22:42:08Z mike $"
#
# Base MIME types file for CUPS.
#
# DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
# VERSIONS OF CUPS. Instead, create a "local.types" file that
# reflects your local configuration changes.
#
# Copyright 2007-2016 by Apple Inc.
# Copyright 2007-2015 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products.
#
# These coded instructions, statements, and computer programs are the
@@ -112,7 +114,6 @@ image/x-xpixmap xpm ascii(0,1024) + string(3,"XPM")
image/x-sun-raster ras string(0,<59a66a95>)
#image/fpx fpx
image/urf urf string(0,UNIRAST<00>)
image/x-alias pix short(8,8) short(8,24)
image/x-bitmap bmp string(0,BM) + !printable(2,14)
image/x-icon ico
@@ -175,3 +176,7 @@ application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
#
application/octet-stream
#
# End of "$Id: mime.types 7670 2008-06-17 22:42:08Z mike $".
#
+25 -7
Ver Arquivo
@@ -1,22 +1,38 @@
dnl
dnl "$Id: cups-common.m4 12852 2015-08-28 13:29:21Z msweet $"
dnl
dnl Common configuration stuff for CUPS.
dnl
dnl Copyright 2007-2016 by Apple Inc.
dnl Copyright 2007-2015 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
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
dnl Set the name of the config header file...
AC_CONFIG_HEADER(config.h)
dnl Version number information...
CUPS_VERSION="AC_PACKAGE_VERSION"
CUPS_REVISION=""
CUPS_VERSION=2.1.2
case "$CUPS_VERSION" in
*svn)
if test -z "$CUPS_REVISION" -a -d .svn; then
CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
else
CUPS_REVISION=""
fi
;;
*)
CUPS_REVISION=""
;;
esac
CUPS_BUILD="cups-$CUPS_VERSION"
AC_ARG_WITH(cups_build, [ --with-cups-build set "cups-config --build" string ],
@@ -129,6 +145,7 @@ AC_CHECK_HEADER(bstring.h,AC_DEFINE(HAVE_BSTRING_H))
AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H))
AC_CHECK_HEADER(sys/param.h,AC_DEFINE(HAVE_SYS_PARAM_H))
AC_CHECK_HEADER(sys/ucred.h,AC_DEFINE(HAVE_SYS_UCRED_H))
AC_CHECK_HEADER(asl.h,AC_DEFINE(HAVE_ASL_H))
dnl Checks for iconv.h and iconv_open
AC_CHECK_HEADER(iconv.h,
@@ -198,9 +215,6 @@ AC_CHECK_FUNCS(waitpid wait3)
dnl Check for posix_spawn
AC_CHECK_FUNCS(posix_spawn)
dnl Check for getgrouplist
AC_CHECK_FUNCS(getgrouplist)
dnl See if the tm structure has the tm_gmtoff member...
AC_MSG_CHECKING(for tm_gmtoff member in tm structure)
AC_TRY_COMPILE([#include <time.h>],[struct tm t;
@@ -458,3 +472,7 @@ case "$COMPONENTS" in
esac
AC_SUBST(BUILDDIRS)
dnl
dnl End of "$Id: cups-common.m4 12852 2015-08-28 13:29:21Z msweet $".
dnl
+7 -1
Ver Arquivo
@@ -1,4 +1,6 @@
dnl
dnl "$Id: cups-compiler.m4 12742 2015-06-23 14:48:53Z msweet $"
dnl
dnl Compiler stuff for CUPS.
dnl
dnl Copyright 2007-2014 by Apple Inc.
@@ -8,7 +10,7 @@ dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
dnl Clear the debugging and non-shared library options unless the user asks
@@ -242,3 +244,7 @@ case $uname in
OPTIM="$OPTIM -D_GNU_SOURCE"
;;
esac
dnl
dnl End of "$Id: cups-compiler.m4 12742 2015-06-23 14:48:53Z msweet $".
dnl
+17 -11
Ver Arquivo
@@ -1,14 +1,16 @@
dnl
dnl Default cupsd configuration settings for CUPS.
dnl "$Id: cups-defaults.m4 12846 2015-08-26 18:26:22Z msweet $"
dnl
dnl Copyright 2007-2015 by Apple Inc.
dnl Copyright 2006-2007 by Easy Software Products, all rights reserved.
dnl Default cupsd configuration settings for CUPS.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl Copyright 2007-2015 by Apple Inc.
dnl Copyright 2006-2007 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
dnl Default languages...
@@ -22,8 +24,8 @@ AC_ARG_WITH(languages, [ --with-languages set installed languages, defau
esac])
AC_SUBST(LANGUAGES)
dnl macOS bundle-based localization support
AC_ARG_WITH(bundledir, [ --with-bundledir set macOS localization bundle directory ],
dnl OS X bundle-based localization support
AC_ARG_WITH(bundledir, [ --with-bundledir set OS X localization bundle directory ],
CUPS_BUNDLEDIR="$withval",
if test "x$uname" = xDarwin -a $uversion -ge 100; then
CUPS_BUNDLEDIR="/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A"
@@ -382,7 +384,7 @@ AC_SUBST(DEFAULT_IPP_PORT)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
dnl Web interface...
AC_ARG_ENABLE(webif, [ --enable-webif enable the web interface by default, default=no for macOS])
AC_ARG_ENABLE(webif, [ --enable-webif enable the web interface by default, default=no for OS X])
case "x$enable_webif" in
xno)
CUPS_WEBIF=No
@@ -405,3 +407,7 @@ esac
AC_SUBST(CUPS_WEBIF)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_WEBIF, $CUPS_DEFAULT_WEBIF)
dnl
dnl End of "$Id: cups-defaults.m4 12846 2015-08-26 18:26:22Z msweet $".
dnl
+10 -4
Ver Arquivo
@@ -1,14 +1,16 @@
dnl
dnl "$Id: cups-directories.m4 11717 2014-03-21 16:42:53Z msweet $"
dnl
dnl Directory stuff for CUPS.
dnl
dnl Copyright 2007-2016 by Apple Inc.
dnl Copyright 2007-2014 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
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
AC_PREFIX_DEFAULT(/)
@@ -267,7 +269,7 @@ AC_SUBST(CUPS_REQUESTS)
# Server executables...
case "$uname" in
*BSD* | Darwin*)
# *BSD and Darwin (macOS)
# *BSD and Darwin (MacOS X)
INSTALL_SYSV=""
CUPS_SERVERBIN="$exec_prefix/libexec/cups"
;;
@@ -291,7 +293,7 @@ AC_SUBST(CUPS_SERVERROOT)
AC_ARG_WITH(rundir, [ --with-rundir set transient run-time state directory],CUPS_STATEDIR="$withval",[
case "$uname" in
Darwin*)
# Darwin (macOS)
# Darwin (OS X)
CUPS_STATEDIR="$CUPS_SERVERROOT"
;;
*)
@@ -301,3 +303,7 @@ AC_ARG_WITH(rundir, [ --with-rundir set transient run-time state dire
esac])
AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR")
AC_SUBST(CUPS_STATEDIR)
dnl
dnl End of "$Id: cups-directories.m4 11717 2014-03-21 16:42:53Z msweet $".
dnl
+14 -8
Ver Arquivo
@@ -1,13 +1,15 @@
dnl
dnl DNS Service Discovery (aka Bonjour) stuff for CUPS.
dnl "$Id: cups-dnssd.m4 12845 2015-08-26 18:23:53Z msweet $"
dnl
dnl Copyright 2007-2016 by Apple Inc.
dnl DNS Service Discovery (aka Bonjour) stuff for CUPS.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl Copyright 2007-2015 by Apple Inc.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
AC_ARG_ENABLE(avahi, [ --disable-avahi disable DNS Service Discovery support using Avahi])
@@ -43,7 +45,7 @@ if test "x$DNSSD_BACKEND" = x -a x$enable_dnssd != xno; then
AC_CHECK_HEADER(dns_sd.h, [
case "$uname" in
Darwin*)
# Darwin and macOS...
# Darwin and MacOS X...
AC_DEFINE(HAVE_DNSSD)
DNSSDLIBS="-framework CoreFoundation -framework SystemConfiguration"
DNSSD_BACKEND="dnssd"
@@ -78,3 +80,7 @@ AC_SUBST(DNSSDLIBS)
AC_SUBST(DNSSD_BACKEND)
AC_SUBST(IPPFIND_BIN)
AC_SUBST(IPPFIND_MAN)
dnl
dnl End of "$Id: cups-dnssd.m4 12845 2015-08-26 18:23:53Z msweet $".
dnl
+17 -11
Ver Arquivo
@@ -1,17 +1,19 @@
dnl
dnl GSSAPI/Kerberos library detection for CUPS.
dnl "$Id: cups-gssapi.m4 11911 2014-06-10 13:54:53Z msweet $"
dnl
dnl Copyright 2007-2013 by Apple Inc.
dnl Copyright 2006-2007 by Easy Software Products.
dnl GSSAPI/Kerberos library detection for CUPS.
dnl
dnl This file contains Kerberos support code, copyright 2006 by
dnl Jelmer Vernooij.
dnl Copyright 2007-2013 by Apple Inc.
dnl Copyright 2006-2007 by Easy Software Products.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl This file contains Kerberos support code, copyright 2006 by
dnl Jelmer Vernooij.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
AC_ARG_ENABLE(gssapi, [ --disable-gssapi disable GSSAPI support])
@@ -24,7 +26,7 @@ if test x$enable_gssapi != xno; then
if test "x$KRB5CONFIG" != x; then
case "$uname" in
Darwin)
# macOS weak-links to the Kerberos framework...
# OS X weak-links to the Kerberos framework...
LIBGSSAPI="-weak_framework Kerberos"
AC_MSG_CHECKING(for GSS framework)
if test -d /System/Library/Frameworks/GSS.framework; then
@@ -125,3 +127,7 @@ fi
AC_SUBST(CUPS_DEFAULT_GSSSERVICENAME)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GSSSERVICENAME, "$CUPS_DEFAULT_GSSSERVICENAME")
dnl
dnl End of "$Id: cups-gssapi.m4 11911 2014-06-10 13:54:53Z msweet $".
dnl
+14 -8
Ver Arquivo
@@ -1,14 +1,16 @@
dnl
dnl Large file support stuff for CUPS.
dnl "$Id: cups-largefile.m4 11324 2013-10-04 03:11:42Z msweet $"
dnl
dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
dnl Large file support stuff for CUPS.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
dnl Check for largefile support...
@@ -44,3 +46,7 @@ if test $ac_cv_c_long_long = yes; then
fi
AC_CHECK_FUNC(strtoll, AC_DEFINE(HAVE_STRTOLL))
dnl
dnl End of "$Id: cups-largefile.m4 11324 2013-10-04 03:11:42Z msweet $".
dnl
+14 -8
Ver Arquivo
@@ -1,14 +1,16 @@
dnl
dnl Libtool stuff for CUPS.
dnl "$Id: cups-libtool.m4 11324 2013-10-04 03:11:42Z msweet $"
dnl
dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
dnl Libtool stuff for CUPS.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
AC_ARG_ENABLE(libtool_unsupported, [ --enable-libtool-unsupported
@@ -31,3 +33,7 @@ if test x$LIBTOOL != x; then
LINKCUPSIMAGE="../filter/\$(LIBCUPSIMAGE)"
DSO="\$(CC)"
fi
dnl
dnl End of "$Id: cups-libtool.m4 11324 2013-10-04 03:11:42Z msweet $".
dnl
+10 -4
Ver Arquivo
@@ -1,14 +1,16 @@
dnl
dnl "$Id: cups-manpages.m4 11342 2013-10-18 20:36:01Z msweet $"
dnl
dnl Manpage stuff for CUPS.
dnl
dnl Copyright 2007-2016 by Apple Inc.
dnl Copyright 2007-2013 by Apple Inc.
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
dnl Fix "mandir" variable...
@@ -21,7 +23,7 @@ fi
if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then
case "$uname" in
Darwin* | Linux | GNU | *BSD*)
# Darwin, macOS, Linux, GNU HURD, and *BSD
# Darwin, MacOS X, Linux, GNU HURD, and *BSD
mandir="/usr/share/man"
AMANDIR="/usr/share/man"
PMANDIR="/usr/share/man"
@@ -52,7 +54,7 @@ case "$uname" in
MAN8DIR=1m
;;
Linux* | GNU* | Darwin*)
# Linux, GNU Hurd, and macOS
# Linux, GNU Hurd, and OS X
MAN1EXT=1.gz
MAN5EXT=5.gz
MAN7EXT=7.gz
@@ -74,3 +76,7 @@ AC_SUBST(MAN5EXT)
AC_SUBST(MAN7EXT)
AC_SUBST(MAN8EXT)
AC_SUBST(MAN8DIR)
dnl
dnl End of "$Id: cups-manpages.m4 11342 2013-10-18 20:36:01Z msweet $".
dnl
+9 -3
Ver Arquivo
@@ -1,14 +1,16 @@
dnl
dnl "$Id: cups-network.m4 12324 2014-12-09 20:28:39Z msweet $"
dnl
dnl Networking stuff for CUPS.
dnl
dnl Copyright 2007-2016 by Apple Inc.
dnl Copyright 2007-2014 by Apple Inc.
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
AC_CHECK_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H),,[
@@ -47,7 +49,7 @@ if test x$enable_domainsocket != xno -a x$default_domainsocket != xno; then
if test "x$default_domainsocket" = x; then
case "$uname" in
Darwin*)
# Darwin and macOS do their own thing...
# Darwin and MaxOS X do their own thing...
CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd"
;;
*)
@@ -68,3 +70,7 @@ fi
AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)
dnl
dnl End of "$Id: cups-network.m4 12324 2014-12-09 20:28:39Z msweet $".
dnl
+15 -9
Ver Arquivo
@@ -1,14 +1,16 @@
dnl
dnl Operating system stuff for CUPS.
dnl "$Id: cups-opsys.m4 11324 2013-10-04 03:11:42Z msweet $"
dnl
dnl Copyright 2007-2012 by Apple Inc.
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
dnl Operating system stuff for CUPS.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl Copyright 2007-2012 by Apple Inc.
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
dnl Get the operating system, version number, and architecture...
@@ -20,7 +22,7 @@ case "$uname" in
Darwin*)
uname="Darwin"
if test $uversion -lt 120; then
AC_MSG_ERROR([Sorry, this version of CUPS requires macOS 10.8 or higher.])
AC_MSG_ERROR([Sorry, this version of CUPS requires OS X 10.8 or higher.])
fi
;;
@@ -31,3 +33,7 @@ case "$uname" in
uname="Linux"
;;
esac
dnl
dnl "$Id: cups-opsys.m4 11324 2013-10-04 03:11:42Z msweet $"
dnl
+9 -3
Ver Arquivo
@@ -1,5 +1,7 @@
dnl
dnl PAM stuff for CUPS.
dnl "$Id: cups-pam.m4 11342 2013-10-18 20:36:01Z msweet $"
dnl
dnl PAM stuff for CUPS.
dnl
dnl Copyright 2007-2013 by Apple Inc.
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
@@ -8,7 +10,7 @@ dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
AC_ARG_ENABLE(pam, [ --disable-pam disable PAM support])
@@ -54,7 +56,7 @@ if test x$enable_pam != xno; then
case "$uname" in
Darwin*)
# Darwin/macOS
# Darwin/OS X
if test "x$with_pam_module" != x; then
PAMFILE="pam.$with_pam_module"
elif test -f /usr/lib/pam/pam_opendirectory.so.2; then
@@ -89,3 +91,7 @@ AC_SUBST(PAMFILE)
AC_SUBST(PAMLIBS)
AC_SUBST(PAMMOD)
AC_SUBST(PAMMODAUTH)
dnl
dnl End of "$Id: cups-pam.m4 11342 2013-10-18 20:36:01Z msweet $".
dnl
+14 -8
Ver Arquivo
@@ -1,16 +1,22 @@
dnl
dnl Select/poll stuff for CUPS.
dnl "$Id: cups-poll.m4 11324 2013-10-04 03:11:42Z msweet $"
dnl
dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 2006 by Easy Software Products, all rights reserved.
dnl Select/poll stuff for CUPS.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 2006 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
AC_CHECK_FUNC(poll, AC_DEFINE(HAVE_POLL))
AC_CHECK_FUNC(epoll_create, AC_DEFINE(HAVE_EPOLL))
AC_CHECK_FUNC(kqueue, AC_DEFINE(HAVE_KQUEUE))
dnl
dnl End of "$Id: cups-poll.m4 11324 2013-10-04 03:11:42Z msweet $".
dnl
+14 -8
Ver Arquivo
@@ -1,14 +1,16 @@
dnl
dnl Scripting configuration stuff for CUPS.
dnl "$Id: cups-scripting.m4 11324 2013-10-04 03:11:42Z msweet $"
dnl
dnl Copyright 2007-2010 by Apple Inc.
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
dnl Scripting configuration stuff for CUPS.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl Copyright 2007-2010 by Apple Inc.
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
dnl Do we have Java?
@@ -81,3 +83,7 @@ AC_DEFINE_UNQUOTED(CUPS_PYTHON, "$CUPS_PYTHON")
if test "x$CUPS_PYTHON" != x; then
AC_DEFINE(HAVE_PYTHON)
fi
dnl
dnl End of "$Id: cups-scripting.m4 11324 2013-10-04 03:11:42Z msweet $".
dnl
+7 -1
Ver Arquivo
@@ -1,4 +1,6 @@
dnl
dnl "$Id: cups-sharedlibs.m4 11342 2013-10-18 20:36:01Z msweet $"
dnl
dnl Shared library support for CUPS.
dnl
dnl Copyright 2007-2013 by Apple Inc.
@@ -8,7 +10,7 @@ dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
PICFLAG=1
@@ -154,3 +156,7 @@ fi
AC_SUBST(DSOLIBS)
AC_SUBST(IMGLIBS)
AC_SUBST(EXPORT_LDFLAGS)
dnl
dnl End of "$Id: cups-sharedlibs.m4 11342 2013-10-18 20:36:01Z msweet $".
dnl
+7 -1
Ver Arquivo
@@ -1,4 +1,6 @@
dnl
dnl "$Id: cups-ssl.m4 12645 2015-05-20 01:20:52Z msweet $"
dnl
dnl TLS stuff for CUPS.
dnl
dnl Copyright 2007-2015 by Apple Inc.
@@ -8,7 +10,7 @@ dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
AC_ARG_ENABLE(ssl, [ --disable-ssl disable SSL/TLS support])
@@ -104,3 +106,7 @@ AC_SUBST(SSLLIBS)
EXPORT_SSLLIBS="$SSLLIBS"
AC_SUBST(EXPORT_SSLLIBS)
dnl
dnl End of "$Id: cups-ssl.m4 12645 2015-05-20 01:20:52Z msweet $".
dnl
+17 -18
Ver Arquivo
@@ -1,14 +1,16 @@
dnl
dnl "$Id: cups-startup.m4 12857 2015-08-31 15:00:45Z msweet $"
dnl
dnl Launch-on-demand/startup stuff for CUPS.
dnl
dnl Copyright 2007-2016 by Apple Inc.
dnl Copyright 2007-2015 by Apple Inc.
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
ONDEMANDFLAGS=""
@@ -16,20 +18,23 @@ ONDEMANDLIBS=""
AC_SUBST(ONDEMANDFLAGS)
AC_SUBST(ONDEMANDLIBS)
dnl Launchd is used on macOS/Darwin...
dnl Launchd is used on OS X/Darwin...
AC_ARG_ENABLE(launchd, [ --disable-launchd disable launchd support])
LAUNCHD_DIR=""
AC_SUBST(LAUNCHD_DIR)
if test x$enable_launchd != xno; then
AC_CHECK_FUNC(launch_activate_socket, [
AC_DEFINE(HAVE_LAUNCHD)
AC_DEFINE(HAVE_ONDEMAND)])
AC_CHECK_FUNC(launch_msg, AC_DEFINE(HAVE_LAUNCHD))
if test $uversion -ge 140; then
AC_CHECK_FUNC(launch_activate_socket, [
AC_DEFINE(HAVE_LAUNCHD)
AC_DEFINE(HAVE_LAUNCH_ACTIVATE_SOCKET)])
fi
AC_CHECK_HEADER(launch.h, AC_DEFINE(HAVE_LAUNCH_H))
case "$uname" in
Darwin*)
# Darwin, macOS
# Darwin, MacOS X
LAUNCHD_DIR="/System/Library/LaunchDaemons"
# liblaunch is already part of libSystem
;;
@@ -74,7 +79,6 @@ if test x$enable_systemd != xno; then
if test $have_systemd = yes; then
AC_DEFINE(HAVE_SYSTEMD)
AC_DEFINE(HAVE_ONDEMAND)
AC_CHECK_HEADER(systemd/sd-journal.h,AC_DEFINE(HAVE_SYSTEMD_SD_JOURNAL_H))
if test "x$SYSTEMD_DIR" = x; then
SYSTEMD_DIR="`$PKGCONFIG --variable=systemdsystemunitdir systemd`"
@@ -83,16 +87,6 @@ if test x$enable_systemd != xno; then
fi
fi
dnl Upstart is also used on Linux (e.g., Chrome OS)
AC_ARG_ENABLE(upstart, [ --enable-upstart enable upstart support])
if test "x$enable_upstart" = "xyes"; then
if test "x$have_systemd" = "xyes"; then
AC_MSG_ERROR(Cannot support both systemd and upstart.)
fi
AC_DEFINE(HAVE_UPSTART)
AC_DEFINE(HAVE_ONDEMAND)
fi
dnl Solaris uses smf
SMFMANIFESTDIR=""
AC_SUBST(SMFMANIFESTDIR)
@@ -191,3 +185,8 @@ if test "x$xinetd" = x; then
elif test "x$xinetd" != xno; then
XINETD="$xinetd"
fi
dnl
dnl End of "$Id: cups-startup.m4 12857 2015-08-31 15:00:45Z msweet $".
dnl
+14 -8
Ver Arquivo
@@ -1,14 +1,16 @@
dnl
dnl Threading stuff for CUPS.
dnl "$Id: cups-threads.m4 11324 2013-10-04 03:11:42Z msweet $"
dnl
dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
dnl Threading stuff for CUPS.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
AC_ARG_ENABLE(threads, [ --disable-threads disable multi-threading support])
@@ -46,3 +48,7 @@ if test "x$enable_threads" != xno; then
fi
AC_SUBST(PTHREAD_FLAGS)
dnl
dnl End of "$Id: cups-threads.m4 11324 2013-10-04 03:11:42Z msweet $".
dnl
+36 -25
Ver Arquivo
@@ -1,14 +1,16 @@
/*
* "$Id: config.h.in 12687 2015-06-03 17:19:04Z msweet $"
*
* Configuration file for CUPS.
*
* Copyright 2007-2017 by Apple Inc.
* Copyright 2007-2015 by Apple Inc.
* Copyright 1997-2007 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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
#ifndef _CUPS_CONFIG_H_
@@ -240,6 +242,13 @@
#undef HAVE_VSYSLOG
/*
* Do we have the ASL functions?
*/
#undef HAVE_ASL_H
/*
* Do we have the systemd journal functions?
*/
@@ -472,19 +481,13 @@
#undef HAVE_PTHREAD_H
/*
* Do we have on-demand support (launchd/systemd/upstart)?
*/
#undef HAVE_ONDEMAND
/*
* Do we have launchd support?
*/
#undef HAVE_LAUNCH_H
#undef HAVE_LAUNCHD
#undef HAVE_LAUNCH_ACTIVATE_SOCKET
/*
@@ -494,13 +497,6 @@
#undef HAVE_SYSTEMD
/*
* Do we have upstart support?
*/
#undef HAVE_UPSTART
/*
* Various scripting languages...
*/
@@ -515,6 +511,24 @@
#define CUPS_PYTHON "/usr/bin/python"
/*
* Location of the poppler/Xpdf pdftops program...
*/
#undef HAVE_PDFTOPS
#undef HAVE_PDFTOPS_WITH_ORIGPAGESIZES
#define CUPS_PDFTOPS "/usr/bin/pdftops"
/*
* Location of the Ghostscript gs program...
*/
#undef HAVE_GHOSTSCRIPT
#undef HAVE_GHOSTSCRIPT_PS2WRITE
#define CUPS_GHOSTSCRIPT "/usr/bin/gs"
/*
* Do we have CoreFoundation public and private headers?
*/
@@ -539,14 +553,7 @@
/*
* Do we have the getgrouplist() function?
*/
#undef HAVE_GETGROUPLIST
/*
* Do we have macOS 10.4's mbr_XXX functions?
* Do we have OS X 10.4's mbr_XXX functions?
*/
#undef HAVE_MEMBERSHIP_H
@@ -692,7 +699,7 @@
/*
* Location of macOS localization bundle, if any.
* Location of OS X localization bundle, if any.
*/
#undef CUPS_BUNDLEDIR
@@ -731,3 +738,7 @@ static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
#endif /* !HAVE_ABS && !abs */
#endif /* !_CUPS_CONFIG_H_ */
/*
* End of "$Id: config.h.in 12687 2015-06-03 17:19:04Z msweet $".
*/
externo
+86 -68
Ver Arquivo
@@ -1,8 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for CUPS 2.2.2.
# Generated by GNU Autoconf 2.68 for CUPS 2.1.2.
#
# Report bugs to <https://github.com/apple/cups/issues>.
# Report bugs to <https://www.cups.org/str.php>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -239,7 +239,7 @@ fi
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
$as_echo "$0: Please tell bug-autoconf@gnu.org and
$0: https://github.com/apple/cups/issues about your system,
$0: https://www.cups.org/str.php about your system,
$0: including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
@@ -560,9 +560,9 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='CUPS'
PACKAGE_TARNAME='cups'
PACKAGE_VERSION='2.2.2'
PACKAGE_STRING='CUPS 2.2.2'
PACKAGE_BUGREPORT='https://github.com/apple/cups/issues'
PACKAGE_VERSION='2.1.2'
PACKAGE_STRING='CUPS 2.1.2'
PACKAGE_BUGREPORT='https://www.cups.org/str.php'
PACKAGE_URL='https://www.cups.org/'
# Factoring default headers for most tests.
@@ -858,7 +858,6 @@ with_dnssd_includes
enable_launchd
enable_systemd
with_systemd
enable_upstart
with_smfmanifestdir
with_rcdir
with_rclevels
@@ -1448,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.2.2 to adapt to many kinds of systems.
\`configure' configures CUPS 2.1.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1509,7 +1508,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of CUPS 2.2.2:";;
short | recursive ) echo "Configuration of CUPS 2.1.2:";;
esac
cat <<\_ACEOF
@@ -1543,13 +1542,12 @@ Optional Features:
--disable-dnssd disable DNS Service Discovery support using mDNSResponder
--disable-launchd disable launchd support
--disable-systemd disable systemd support
--enable-upstart enable upstart support
--enable-page-logging enable page_log by default
--disable-browsing disable Browsing by default
--disable-default-shared
disable DefaultShared by default
--disable-raw-printing do not allow raw printing by default
--enable-webif enable the web interface by default, default=no for macOS
--enable-webif enable the web interface by default, default=no for OS X
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1587,7 +1585,7 @@ Optional Packages:
--with-rcstop set stop number for rc scripts
--with-xinetd set path for xinetd config files
--with-languages set installed languages, default=all
--with-bundledir set macOS localization bundle directory
--with-bundledir set OS X localization bundle directory
--with-config-file-perm set default ConfigFilePerm value, default=0640
--with-cupsd-file-perm set default cupsd permissions, default=0500
--with-log-file-perm set default LogFilePerm value, default=0644
@@ -1625,7 +1623,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <https://github.com/apple/cups/issues>.
Report bugs to <https://www.cups.org/str.php>.
CUPS home page: <https://www.cups.org/>.
_ACEOF
ac_status=$?
@@ -1689,7 +1687,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
CUPS configure 2.2.2
CUPS configure 2.1.2
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1974,9 +1972,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
( $as_echo "## --------------------------------------------------- ##
## Report this to https://github.com/apple/cups/issues ##
## --------------------------------------------------- ##"
( $as_echo "## ------------------------------------------- ##
## Report this to https://www.cups.org/str.php ##
## ------------------------------------------- ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
@@ -2153,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.2.2, which was
It was created by CUPS $as_me 2.1.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2511,7 +2509,7 @@ case "$uname" in
Darwin*)
uname="Darwin"
if test $uversion -lt 120; then
as_fn_error $? "Sorry, this version of CUPS requires macOS 10.8 or higher." "$LINENO" 5
as_fn_error $? "Sorry, this version of CUPS requires OS X 10.8 or higher." "$LINENO" 5
fi
;;
@@ -2524,11 +2522,26 @@ case "$uname" in
esac
ac_config_headers="$ac_config_headers config.h"
CUPS_VERSION="2.2.2"
CUPS_REVISION=""
CUPS_VERSION=2.1.2
case "$CUPS_VERSION" in
*svn)
if test -z "$CUPS_REVISION" -a -d .svn; then
CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[a-zA-Z]*//g'`"
else
CUPS_REVISION=""
fi
;;
*)
CUPS_REVISION=""
;;
esac
CUPS_BUILD="cups-$CUPS_VERSION"
@@ -4915,6 +4928,13 @@ if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
fi
ac_fn_c_check_header_mongrel "$LINENO" "asl.h" "ac_cv_header_asl_h" "$ac_includes_default"
if test "x$ac_cv_header_asl_h" = xyes; then :
$as_echo "#define HAVE_ASL_H 1" >>confdefs.h
fi
ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
if test "x$ac_cv_header_iconv_h" = xyes; then :
@@ -5285,18 +5305,6 @@ fi
done
for ac_func in getgrouplist
do :
ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
if test "x$ac_cv_func_getgrouplist" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_GETGROUPLIST 1
_ACEOF
fi
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff member in tm structure" >&5
$as_echo_n "checking for tm_gmtoff member in tm structure... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5930,6 +5938,7 @@ esac
if test "$prefix" = "NONE"; then
prefix="/"
fi
@@ -6272,7 +6281,7 @@ _ACEOF
# Server executables...
case "$uname" in
*BSD* | Darwin*)
# *BSD and Darwin (macOS)
# *BSD and Darwin (MacOS X)
INSTALL_SYSV=""
CUPS_SERVERBIN="$exec_prefix/libexec/cups"
;;
@@ -6307,7 +6316,7 @@ else
case "$uname" in
Darwin*)
# Darwin (macOS)
# Darwin (OS X)
CUPS_STATEDIR="$CUPS_SERVERROOT"
;;
*)
@@ -6324,6 +6333,7 @@ _ACEOF
if test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/"; then
# New GNU "standards" break previous ones, so make sure we use
# the right default location for the operating system...
@@ -6333,7 +6343,7 @@ fi
if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then
case "$uname" in
Darwin* | Linux | GNU | *BSD*)
# Darwin, macOS, Linux, GNU HURD, and *BSD
# Darwin, MacOS X, Linux, GNU HURD, and *BSD
mandir="/usr/share/man"
AMANDIR="/usr/share/man"
PMANDIR="/usr/share/man"
@@ -6363,7 +6373,7 @@ case "$uname" in
MAN8DIR=1m
;;
Linux* | GNU* | Darwin*)
# Linux, GNU Hurd, and macOS
# Linux, GNU Hurd, and OS X
MAN1EXT=1.gz
MAN5EXT=5.gz
MAN7EXT=7.gz
@@ -6388,6 +6398,7 @@ esac
PICFLAG=1
DSOFLAGS="${DSOFLAGS:=}"
@@ -6536,6 +6547,7 @@ fi
# Check whether --enable-libtool_unsupported was given.
if test "${enable_libtool_unsupported+set}" = set; then :
enableval=$enable_libtool_unsupported; if test x$enable_libtool_unsupported != xno; then
@@ -6560,6 +6572,7 @@ if test x$LIBTOOL != x; then
fi
INSTALL_STRIP=""
OPTIM=""
@@ -6923,6 +6936,7 @@ esac
ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
#include <sys/socket.h>
#include <netinet/in.h>
@@ -7541,7 +7555,7 @@ if test x$enable_domainsocket != xno -a x$default_domainsocket != xno; then
if test "x$default_domainsocket" = x; then
case "$uname" in
Darwin*)
# Darwin and macOS do their own thing...
# Darwin and MaxOS X do their own thing...
CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd"
;;
*)
@@ -7567,6 +7581,7 @@ fi
ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
if test "x$ac_cv_func_poll" = xyes; then :
$as_echo "#define HAVE_POLL 1" >>confdefs.h
@@ -7587,6 +7602,7 @@ fi
# Check whether --enable-gssapi was given.
if test "${enable_gssapi+set}" = set; then :
enableval=$enable_gssapi;
@@ -7698,7 +7714,7 @@ fi
if test "x$KRB5CONFIG" != x; then
case "$uname" in
Darwin)
# macOS weak-links to the Kerberos framework...
# OS X weak-links to the Kerberos framework...
LIBGSSAPI="-weak_framework Kerberos"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS framework" >&5
$as_echo_n "checking for GSS framework... " >&6; }
@@ -8022,6 +8038,7 @@ _ACEOF
# Check whether --enable-threads was given.
if test "${enable_threads+set}" = set; then :
enableval=$enable_threads;
@@ -8084,6 +8101,7 @@ fi
# Check whether --enable-ssl was given.
if test "${enable_ssl+set}" = set; then :
enableval=$enable_ssl;
@@ -8448,6 +8466,7 @@ EXPORT_SSLLIBS="$SSLLIBS"
# Check whether --enable-pam was given.
if test "${enable_pam+set}" = set; then :
enableval=$enable_pam;
@@ -8678,7 +8697,7 @@ fi
case "$uname" in
Darwin*)
# Darwin/macOS
# Darwin/OS X
if test "x$with_pam_module" != x; then
PAMFILE="pam.$with_pam_module"
elif test -f /usr/lib/pam/pam_opendirectory.so.2; then
@@ -8715,6 +8734,7 @@ fi
# Check whether --enable-largefile was given.
if test "${enable_largefile+set}" = set; then :
enableval=$enable_largefile;
@@ -8971,6 +8991,7 @@ fi
# Check whether --enable-avahi was given.
if test "${enable_avahi+set}" = set; then :
enableval=$enable_avahi;
@@ -9026,7 +9047,7 @@ if test "x$ac_cv_header_dns_sd_h" = xyes; then :
case "$uname" in
Darwin*)
# Darwin and macOS...
# Darwin and MacOS X...
$as_echo "#define HAVE_DNSSD 1" >>confdefs.h
DNSSDLIBS="-framework CoreFoundation -framework SystemConfiguration"
@@ -9084,6 +9105,7 @@ fi
ONDEMANDFLAGS=""
ONDEMANDLIBS=""
@@ -9098,15 +9120,23 @@ LAUNCHD_DIR=""
if test x$enable_launchd != xno; then
ac_fn_c_check_func "$LINENO" "launch_activate_socket" "ac_cv_func_launch_activate_socket"
if test "x$ac_cv_func_launch_activate_socket" = xyes; then :
$as_echo "#define HAVE_LAUNCHD 1" >>confdefs.h
$as_echo "#define HAVE_ONDEMAND 1" >>confdefs.h
ac_fn_c_check_func "$LINENO" "launch_msg" "ac_cv_func_launch_msg"
if test "x$ac_cv_func_launch_msg" = xyes; then :
$as_echo "#define HAVE_LAUNCHD 1" >>confdefs.h
fi
if test $uversion -ge 140; then
ac_fn_c_check_func "$LINENO" "launch_activate_socket" "ac_cv_func_launch_activate_socket"
if test "x$ac_cv_func_launch_activate_socket" = xyes; then :
$as_echo "#define HAVE_LAUNCHD 1" >>confdefs.h
$as_echo "#define HAVE_LAUNCH_ACTIVATE_SOCKET 1" >>confdefs.h
fi
fi
ac_fn_c_check_header_mongrel "$LINENO" "launch.h" "ac_cv_header_launch_h" "$ac_includes_default"
if test "x$ac_cv_header_launch_h" = xyes; then :
$as_echo "#define HAVE_LAUNCH_H 1" >>confdefs.h
@@ -9117,7 +9147,7 @@ fi
case "$uname" in
Darwin*)
# Darwin, macOS
# Darwin, MacOS X
LAUNCHD_DIR="/System/Library/LaunchDaemons"
# liblaunch is already part of libSystem
;;
@@ -9176,8 +9206,6 @@ $as_echo "no" >&6; }
if test $have_systemd = yes; then
$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
$as_echo "#define HAVE_ONDEMAND 1" >>confdefs.h
ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-journal.h" "ac_cv_header_systemd_sd_journal_h" "$ac_includes_default"
if test "x$ac_cv_header_systemd_sd_journal_h" = xyes; then :
$as_echo "#define HAVE_SYSTEMD_SD_JOURNAL_H 1" >>confdefs.h
@@ -9192,21 +9220,6 @@ fi
fi
fi
# Check whether --enable-upstart was given.
if test "${enable_upstart+set}" = set; then :
enableval=$enable_upstart;
fi
if test "x$enable_upstart" = "xyes"; then
if test "x$have_systemd" = "xyes"; then
as_fn_error $? "Cannot support both systemd and upstart." "$LINENO" 5
fi
$as_echo "#define HAVE_UPSTART 1" >>confdefs.h
$as_echo "#define HAVE_ONDEMAND 1" >>confdefs.h
fi
SMFMANIFESTDIR=""
@@ -9344,6 +9357,8 @@ elif test "x$xinetd" != xno; then
fi
LANGUAGES="`ls -1 locale/cups_*.po 2>/dev/null | sed -e '1,$s/locale\/cups_//' -e '1,$s/\.po//' | tr '\n' ' '`"
@@ -9907,6 +9922,7 @@ _ACEOF
# Check whether --with-java was given.
if test "${with_java+set}" = set; then :
withval=$with_java; CUPS_JAVA="$withval"
@@ -10205,6 +10221,7 @@ if test "x$CUPS_PYTHON" != x; then
fi
INSTALL_LANGUAGES=""
UNINSTALL_LANGUAGES=""
LANGFILES=""
@@ -10748,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.2.2, which was
This file was extended by CUPS $as_me 2.1.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -10804,14 +10821,14 @@ $config_files
Configuration headers:
$config_headers
Report bugs to <https://github.com/apple/cups/issues>.
Report bugs to <https://www.cups.org/str.php>.
CUPS home page: <https://www.cups.org/>."
_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.2.2
CUPS config.status 2.1.2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@@ -11545,3 +11562,4 @@ fi
chmod +x cups-config
+9 -3
Ver Arquivo
@@ -1,21 +1,23 @@
dnl
dnl "$Id: configure.ac 12998 2015-12-02 15:09:04Z msweet $"
dnl
dnl Configuration script for CUPS.
dnl
dnl Copyright 2007-2016 by Apple Inc.
dnl Copyright 2007-2015 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
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http://www.cups.org/".
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
dnl We need at least autoconf 2.60...
AC_PREREQ(2.60)
dnl Package name and version...
AC_INIT([CUPS], [2.2.2], [https://github.com/apple/cups/issues], [cups], [https://www.cups.org/])
AC_INIT([CUPS], [2.1.2], [https://www.cups.org/str.php], [cups], [https://www.cups.org/])
sinclude(config-scripts/cups-opsys.m4)
sinclude(config-scripts/cups-common.m4)
@@ -91,3 +93,7 @@ AC_OUTPUT(Makedefs
$LANGFILES)
chmod +x cups-config
dnl
dnl End of "$Id: configure.ac 12998 2015-12-02 15:09:04Z msweet $".
dnl
+16 -10
Ver Arquivo
@@ -1,19 +1,21 @@
#!/bin/sh
#! /bin/sh
#
# CUPS configuration utility.
# "$Id: cups-config.in 10996 2013-05-29 11:51:34Z msweet $"
#
# Copyright 2007-2016 by Apple Inc.
# Copyright 2001-2006 by Easy Software Products, all rights reserved.
# CUPS configuration utility.
#
# 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/".
# Copyright 2007-2011 by Apple Inc.
# Copyright 2001-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/".
#
VERSION="@CUPS_VERSION@"
APIVERSION="2.2"
APIVERSION="1.6"
BUILD="@CUPS_BUILD@"
prefix=@prefix@
@@ -138,3 +140,7 @@ while test $# -gt 0; do
shift
done
#
# End of "$Id: cups-config.in 10996 2013-05-29 11:51:34Z msweet $".
#
+119 -117
Ver Arquivo
@@ -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 adminutil.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,143 +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
testcreds.o: testcreds.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
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 \
@@ -276,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 \
@@ -285,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
+68 -37
Ver Arquivo
@@ -1,14 +1,16 @@
#
# "$Id: Makefile 12850 2015-08-27 19:29:06Z msweet $"
#
# API library Makefile for CUPS.
#
# Copyright 2007-2016 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
# 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
# missing or damaged, see the license at "http://www.cups.org/".
# file is missing or damaged, see the license at "http://www.cups.org/".
#
# This file is subject to the Apple OS-Developed Software exception.
#
@@ -30,22 +32,25 @@ 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 \
@@ -54,20 +59,15 @@ LIBOBJS = \
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 \
@@ -85,7 +85,6 @@ TESTOBJS = \
testarray.o \
testcache.o \
testconflicts.o \
testcreds.o \
testcups.o \
testdest.o \
testfile.o \
@@ -154,7 +153,6 @@ UNITTARGETS = \
testarray \
testcache \
testconflicts \
testcreds \
testcups \
testdest \
testfile \
@@ -322,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) \
@@ -345,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)
@@ -367,7 +364,7 @@ libcups.a: $(LIBOBJS)
libcups2.def: $(LIBOBJS) Makefile
echo Generating $@...
echo "LIBRARY libcups2" >libcups2.def
echo "VERSION 2.12" >>libcups2.def
echo "VERSION 2.11" >>libcups2.def
echo "EXPORTS" >>libcups2.def
(nm $(LIBOBJS) 2>/dev/null | grep "T _" | awk '{print $$3}'; \
echo __cups_strcpy; echo __cups_strlcat; echo __cups_strlcpy) | \
@@ -419,16 +416,6 @@ testconflicts: testconflicts.o $(LIBCUPSSTATIC)
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
#
# testcreds (dependency on static CUPS library is intentional)
#
testcreds: testcreds.o $(LIBCUPSSTATIC)
echo Linking $@...
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testcreds.o $(LIBCUPSSTATIC) \
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
#
# testcups (dependency on static CUPS library is intentional)
#
@@ -576,13 +563,6 @@ apihelp:
--css ../doc/cups-printable.css \
--header api-overview.header --intro api-overview.shtml \
>../doc/help/api-overview.html
mxmldoc --section "Programming" --title "Administration APIs" \
--css ../doc/cups-printable.css \
--header api-admin.header --intro api-admin.shtml \
api-admin.xml \
adminutil.c adminutil.h getdevices.c >../doc/help/api-admin.html
mxmldoc --tokens help/api-admin.html api-admin.xml >../doc/help/api-admin.tokens
$(RM) api-admin.xml
mxmldoc --section "Programming" --title "Array API" \
--css ../doc/cups-printable.css \
--header api-array.header --intro api-array.shtml \
@@ -609,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" \
@@ -631,6 +613,50 @@ apihelp:
mxmldoc --tokens help/api-filter.html api-filter.xml >../doc/help/api-filter.tokens
$(RM) api-filter.xml
framedhelp:
echo Generating CUPS API help files...
mxmldoc --framed api-overview \
--section "Programming" \
--title "Introduction to CUPS Programming" \
--css ../doc/cups-printable.css \
--header api-overview.header --intro api-overview.shtml
mxmldoc --framed api-array \
--section "Programming" --title "Array API" \
--css ../doc/cups-printable.css \
--header api-array.header --intro api-array.shtml \
array.h array.c
mxmldoc --framed api-cups \
--section "Programming" --title "CUPS API" \
--css ../doc/cups-printable.css \
--header api-cups.header --intro api-cups.shtml \
cups.h adminutil.c dest*.c language.c notify.c \
options.c tempfile.c usersys.c \
util.c
mxmldoc --framed api-filedir \
--section "Programming" --title "File and Directory APIs" \
--css ../doc/cups-printable.css \
--header api-filedir.header --intro api-filedir.shtml \
file.h file.c dir.h dir.c
mxmldoc --framed api-ppd \
--section "Programming" --title "PPD API (DEPRECATED)" \
--css ../doc/cups-printable.css \
--header api-ppd.header --intro api-ppd.shtml \
ppd.h attr.c conflicts.c custom.c emit.c localize.c mark.c \
page.c ppd.c
mxmldoc --framed api-httpipp \
--section "Programming" --title "HTTP and IPP APIs" \
--css ../doc/cups-printable.css \
--header api-httpipp.header --intro api-httpipp.shtml \
http.h ipp.h auth.c getdevices.c getputfile.c encode.c \
http.c http-addr.c http-support.c ipp.c ipp-support.c \
md5passwd.c request.c
mxmldoc --framed api-filter \
--section "Programming" \
--title "Filter and Backend Programming" \
--css ../doc/cups-printable.css \
--header api-filter.header --intro api-filter.shtml \
backchannel.c backend.h backend.c sidechannel.c sidechannel.h
#
# Lines of code computation...
@@ -649,3 +675,8 @@ sloc:
include Dependencies
tls.o: tls-darwin.c tls-gnutls.c tls-sspi.c
#
# End of "$Id: Makefile 12850 2015-08-27 19:29:06Z msweet $".
#
+26 -37
Ver Arquivo
@@ -1,14 +1,16 @@
/*
* "$Id: adminutil.c 12945 2015-10-26 19:46:02Z msweet $"
*
* Administration utility API definitions for CUPS.
*
* Copyright 2007-2016 by Apple Inc.
* Copyright 2007-2015 by Apple Inc.
* Copyright 2001-2007 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
* missing or damaged, see the license at "http://www.cups.org/".
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*/
@@ -18,7 +20,6 @@
*/
#include "cups-private.h"
#include "ppd.h"
#include "adminutil.h"
#include <fcntl.h>
#include <sys/stat.h>
@@ -831,7 +832,7 @@ cupsAdminExportSamba(
* The returned settings should be freed with cupsFreeOptions() when
* you are done with them.
*
* @since CUPS 1.3/macOS 10.5@
* @since CUPS 1.3/OS X 10.5@
*/
int /* O - 1 on success, 0 on failure */
@@ -1147,7 +1148,7 @@ cupsAdminGetServerSettings(
/*
* 'cupsAdminSetServerSettings()' - Set settings on the server.
*
* @since CUPS 1.3/macOS 10.5@
* @since CUPS 1.3/OS X 10.5@
*/
int /* O - 1 on success, 0 on failure */
@@ -1194,7 +1195,6 @@ cupsAdminSetServerSettings(
int cupsd_num_settings; /* New number of settings */
int old_share_printers, /* Share local printers */
old_remote_admin, /* Remote administration allowed? */
old_remote_any, /* Remote access from anywhere? */
old_user_cancel_any, /* Cancel-job policy set? */
old_debug_logging; /* LogLevel debug set? */
cups_option_t *cupsd_settings, /* New settings */
@@ -1260,12 +1260,12 @@ cupsAdminSetServerSettings(
if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ANY, cupsd_num_settings,
cupsd_settings)) != NULL)
old_remote_any = atoi(val);
remote_any = atoi(val);
else
old_remote_any = 0;
remote_any = 0;
DEBUG_printf(("1cupsAdminSetServerSettings: old remote_any=%d",
old_remote_any));
remote_any));
if ((val = cupsGetOption(CUPS_SERVER_SHARE_PRINTERS, cupsd_num_settings,
cupsd_settings)) != NULL)
@@ -1311,23 +1311,12 @@ cupsAdminSetServerSettings(
DEBUG_printf(("1cupsAdminSetServerSettings: debug_logging=%d",
debug_logging));
if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ANY, num_settings, settings)) != NULL)
{
if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ANY, num_settings,
settings)) != NULL)
remote_any = atoi(val);
if (remote_any == old_remote_any)
{
/*
* No change to this setting...
*/
remote_any = -1;
}
}
else
remote_any = -1;
DEBUG_printf(("1cupsAdminSetServerSettings: remote_any=%d", remote_any));
DEBUG_printf(("1cupsAdminSetServerSettings: remote_any=%d",
remote_any));
if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ADMIN, num_settings,
settings)) != NULL)
@@ -1442,7 +1431,7 @@ cupsAdminSetServerSettings(
while (cupsFileGetConf(cupsd, line, sizeof(line), &value, &linenum))
{
if ((!_cups_strcasecmp(line, "Port") || !_cups_strcasecmp(line, "Listen")) &&
(remote_admin >= 0 || remote_any >= 0 || share_printers >= 0))
(remote_admin >= 0 || remote_any > 0 || share_printers >= 0))
{
if (!wrote_port_listen)
{
@@ -1628,7 +1617,7 @@ cupsAdminSetServerSettings(
remote_any > 0 ? "all" : "@LOCAL");
}
else if (in_root_location &&
(remote_admin >= 0 || remote_any >= 0 || share_printers >= 0))
(remote_admin >= 0 || remote_any > 0 || share_printers >= 0))
{
wrote_root_location = 1;
@@ -1731,7 +1720,7 @@ cupsAdminSetServerSettings(
in_cancel_job = 0;
}
else if ((((in_admin_location || in_conf_location || in_root_location) &&
(remote_admin >= 0 || remote_any >= 0)) ||
(remote_admin >= 0 || remote_any > 0)) ||
(in_root_location && share_printers >= 0)) &&
(!_cups_strcasecmp(line, "Allow") || !_cups_strcasecmp(line, "Deny") ||
!_cups_strcasecmp(line, "Order")))
@@ -1823,7 +1812,7 @@ cupsAdminSetServerSettings(
}
if (!wrote_port_listen &&
(remote_admin >= 0 || remote_any >= 0 || share_printers >= 0))
(remote_admin >= 0 || remote_any > 0 || share_printers >= 0))
{
if (remote_admin > 0 || remote_any > 0 || share_printers > 0)
{
@@ -1844,7 +1833,7 @@ cupsAdminSetServerSettings(
}
if (!wrote_root_location &&
(remote_admin >= 0 || remote_any >= 0 || share_printers >= 0))
(remote_admin >= 0 || remote_any > 0 || share_printers >= 0))
{
if (remote_admin > 0 && share_printers > 0)
cupsFilePuts(temp,
@@ -2021,14 +2010,9 @@ cupsAdminSetServerSettings(
old_remote_admin ? "1" : "0",
cupsd_num_settings, &cupsd_settings);
if (remote_any >= 0)
cupsd_num_settings = cupsAddOption(CUPS_SERVER_REMOTE_ANY,
remote_any ? "1" : "0",
cupsd_num_settings, &cupsd_settings);
else
cupsd_num_settings = cupsAddOption(CUPS_SERVER_REMOTE_ANY,
old_remote_any ? "1" : "0",
cupsd_num_settings, &cupsd_settings);
cupsd_num_settings = cupsAddOption(CUPS_SERVER_REMOTE_ANY,
remote_any ? "1" : "0",
cupsd_num_settings, &cupsd_settings);
if (share_printers >= 0)
cupsd_num_settings = cupsAddOption(CUPS_SERVER_SHARE_PRINTERS,
@@ -2382,3 +2366,8 @@ write_option(cups_file_t *dstfp, /* I - PPD file */
cupsFilePrintf(dstfp, "*JCLCloseUI: *%s\n\n", name);
}
/*
* End of "$Id: adminutil.c 12945 2015-10-26 19:46:02Z msweet $".
*/
+16 -28
Ver Arquivo
@@ -1,16 +1,18 @@
/*
* Administration utility API definitions for CUPS.
* "$Id: adminutil.h 10996 2013-05-29 11:51:34Z msweet $"
*
* Copyright 2007-2016 by Apple Inc.
* Copyright 2001-2007 by Easy Software Products.
* Administration utility API definitions for CUPS.
*
* 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
* missing or damaged, see the license at "http://www.cups.org/".
* Copyright 2007-2012 by Apple Inc.
* Copyright 2001-2007 by Easy Software Products.
*
* This file is subject to the Apple OS-Developed Software exception.
* 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_ADMINUTIL_H_
@@ -40,23 +42,11 @@ extern "C" {
# define CUPS_SERVER_DEBUG_LOGGING "_debug_logging"
# define CUPS_SERVER_REMOTE_ADMIN "_remote_admin"
# define CUPS_SERVER_REMOTE_ANY "_remote_any"
/*# define CUPS_SERVER_REMOTE_PRINTERS "_remote_printers"*/
# define CUPS_SERVER_SHARE_PRINTERS "_share_printers"
# define CUPS_SERVER_USER_CANCEL_ANY "_user_cancel_any"
/*
* Types and structures...
*/
typedef void (*cups_device_cb_t)(const char *device_class,
const char *device_id, const char *device_info,
const char *device_make_and_model,
const char *device_uri,
const char *device_location, void *user_data);
/* Device callback
* @since CUPS 1.4/macOS 10.6@ */
/*
* Functions...
*/
@@ -79,15 +69,13 @@ extern int cupsAdminSetServerSettings(http_t *http,
cups_option_t *settings)
_CUPS_API_1_3;
extern ipp_status_t cupsGetDevices(http_t *http, int timeout,
const char *include_schemes,
const char *exclude_schemes,
cups_device_cb_t callback,
void *user_data) _CUPS_API_1_4;
# ifdef __cplusplus
}
# endif /* __cplusplus */
#endif /* !_CUPS_ADMINUTIL_H_ */
/*
* End of "$Id: adminutil.h 10996 2013-05-29 11:51:34Z msweet $".
*/
-96
Ver Arquivo
@@ -1,96 +0,0 @@
<!--
Administrative API documentation for CUPS.
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/".
-->
<h2 class="title"><a name="OVERVIEW">Overview</a></h2>
<p>The administrative APIs provide convenience functions to perform certain administrative functions with the CUPS scheduler.</p>
<blockquote><b>Note:<b>
<p>Administrative functions normally require administrative privileges to execute and must not be used in ordinary user applications!</p>
</blockquote>
<h3><a name="SETTINGS">Scheduler Settings</a></h3>
<p>The <a href="#cupsAdminGetServerSettings"><code>cupsAdminGetServerSettings</code></a> and <a href="#cupsAdminSetServerSettings"><code>cupsAdminSetServerSettings</code></a> functions allow you to get and set simple directives and their values, respectively, in the <var>cupsd.conf</var> file for the CUPS scheduler. Settings are stored in CUPS option arrays which provide a simple list of string name/value pairs. While any simple <var>cupsd.conf</var> directive name can be specified, the following convenience names are also defined to control common complex directives:</p>
<ul>
<li><code>CUPS_SERVER_DEBUG_LOGGING</code></li>: For <code>cupsAdminGetServerSettings</code>, a value of "1" means that the <code>LogLevel</code> directive is set to <code>debug</code> or <code>debug2</code> while a value of "0" means it is set to any other value. For <code>cupsAdminSetServerSettings</code> a value of "1" sets the <code>LogLeveL</code> to <code>debug</code> while a value of "0" sets it to <code>warn</code>.</li>
<li><code>CUPS_SERVER_REMOTE_ADMIN</code></li>: A value of "1" specifies that administrative requests are accepted from remote addresses while "0" specifies that requests are only accepted from local addresses (loopback interface and domain sockets).</li>
<li><code>CUPS_SERVER_REMOTE_ANY</code></li>: A value of "1" specifies that requests are accepts from any address while "0" specifies that requests are only accepted from the local subnet (when sharing is enabled) or local addresses (loopback interface and domain sockets).</li>
<li><code>CUPS_SERVER_SHARE_PRINTERS</code></li>: A value of "1" specifies that printer sharing is enabled for selected printers and remote requests are accepted while a value of "0" specifies that printer sharing is disables and remote requests are not accepted.</li>
<li><code>CUPS_SERVER_USER_CANCEL_ANY</code></li>: A value of "1" specifies that the default security policy allows any user to cancel any print job, regardless of the owner. A value of "0" specifies that only administrative users can cancel other user's jobs.</li>
</ul>
<blockquote><b>Note:</b>
<p>Changing settings will restart the CUPS scheduler.</p>
<p>When printer sharing or the web interface are enabled, the scheduler's launch-on-demand functionality is effectively disabled. This can affect power usage, system performance, and the security profile of a system.</p>
</blockquote>
<p>The recommended way to make changes to the <var>cupsd.conf</var> is to first call <a href="#cupsAdminGetServerSettings"><code>cupsAdminGetServerSettings</code></a>, make any changes to the returned option array, and then call <a href="#cupsAdminSetServerSettings"><code>cupsAdminSetServerSettings</code></a> to save those settings. For example, to enable the web interface:</p>
<pre class="example">
#include &lt;cups/cups.h&gt;
#include &lt;cups/adminutil.h&gt;
void
enable_web_interface(void)
{
int num_settings = 0; /* Number of settings */
cups_option_t *settings = NULL; /* Settings */
if (!<a href="#cupsAdminGetServerSettings">cupsAdminGetServerSettings</a>(CUPS_HTTP_DEFAULT, &amp;num_settings, &amp;settings))
{
fprintf(stderr, "ERROR: Unable to get server settings: %s\n", cupsLastErrorString());
return;
}
num_settings = <a href="api-cups.html#cupsAddOption">cupsAddOption</a>("WebInterface", "Yes", num_settings, &amp;settings);
if (!<a href="#cupsAdminSetServerSettings">cupsAdminSetServerSettings</a>(CUPS_HTTP_DEFAULT, num_settings, settings))
{
fprintf(stderr, "ERROR: Unable to set server settings: %s\n", cupsLastErrorString());
}
<a href="api-cups.html#cupsFreeOptions">cupsFreeOptions</a>(num_settings, settings);
}
</pre>
<h3><a name="DEVICES">Devices</a></h3>
<p>Printers can be discovered through the CUPS scheduler using the <a href="#cupsGetDevices"><code>cupsGetDevices</code></a> API. Typically this API is used to locate printers to add the the system. Each device that is found will cause a supplied callback function to be executed. For example, to list the available printer devices that can be found within 30 seconds:</p>
<pre class="example">
#include &lt;cups/cups.h&gt;
#include &lt;cups/adminutil.h&gt;
void
get_devices_cb(
const char *device_class, /* I - Class */
const char *device_id, /* I - 1284 device ID */
const char *device_info, /* I - Description */
const char *device_make_and_model, /* I - Make and model */
const char *device_uri, /* I - Device URI */
const char *device_location, /* I - Location */
void *user_data) /* I - User data */
{
puts(device_uri);
}
void
show_devices(void)
{
<a href="#cupsGetDevices">cupsGetDevices</a>(CUPS_HTTP_DEFAULT, 30, NULL, NULL, get_devices_cb, NULL);
}
</pre>
+2
Ver Arquivo
@@ -1,4 +1,6 @@
<!--
"$Id: api-array.header 7266 2008-01-29 02:15:29Z mike $"
Array API header for CUPS.
Copyright 2008-2011 by Apple Inc.
+2
Ver Arquivo
@@ -1,4 +1,6 @@
<!--
"$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
Array API introduction for CUPS.
Copyright 2007-2011 by Apple Inc.
+2
Ver Arquivo
@@ -1,4 +1,6 @@
<!--
"$Id: api-cups.header 7279 2008-01-31 01:50:44Z mike $"
CUPS API header for CUPS.
Copyright 2008-2011 by Apple Inc.
+2
Ver Arquivo
@@ -1,4 +1,6 @@
<!--
"$Id: api-cups.shtml 7337 2008-02-22 04:44:04Z mike $"
API introduction for CUPS.
Copyright 2007-2013 by Apple Inc.
+2
Ver Arquivo
@@ -1,4 +1,6 @@
<!--
"$Id: api-filedir.header 7279 2008-01-31 01:50:44Z mike $"
File and Directory API header for CUPS.
Copyright 2008-2011 by Apple Inc.
+2
Ver Arquivo
@@ -1,4 +1,6 @@
<!--
"$Id: api-filedir.shtml 7279 2008-01-31 01:50:44Z mike $"
File and directory API introduction for CUPS.
Copyright 2007-2011 by Apple Inc.

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais