Comparar commits
35 Commits
xform
...
release-2.0b1
| Autor | SHA1 | Data | |
|---|---|---|---|
| 1a18c85cd1 | |||
| b60086f8ae | |||
| 215ef63830 | |||
| a51f28ec99 | |||
| 71f63681cb | |||
| 61515785f7 | |||
| 75efa1051d | |||
| f9d9f12690 | |||
| 7416dfe99a | |||
| dd0eea8e71 | |||
| 0c229544f4 | |||
| b3533f112d | |||
| 3b2526b366 | |||
| ba38d7d9dc | |||
| 4bdbabf76b | |||
| 64e918f26a | |||
| 111ff13a26 | |||
| f4515965b3 | |||
| c7233aabe5 | |||
| 8eabd901fe | |||
| 1d708564b3 | |||
| e5d9b5e191 | |||
| 00c4573088 | |||
| 27efcd61e0 | |||
| 06cefec35c | |||
| c2def0ced7 | |||
| e9152ac713 | |||
| 3d3f64a982 | |||
| 4ecc320364 | |||
| 60c3ee0499 | |||
| 305331a392 | |||
| 40e88e9009 | |||
| 5f19ab52fe | |||
| 4a842d5397 | |||
| 75ff7c7fea |
@@ -3,6 +3,8 @@ CHANGES-1.6.txt
|
||||
|
||||
CHANGES IN CUPS V1.6.4
|
||||
|
||||
- Removed some duplicate size definitions for some ISO sizes that were
|
||||
causing problems (<rdar://problem/14722721>)
|
||||
- The IPP backend did not add the "last-document" attribute
|
||||
(<rdar://problem/114660379>)
|
||||
- Added a SyncOnClose directive to cups-files.conf to force cupsd to
|
||||
|
||||
@@ -0,0 +1,250 @@
|
||||
CHANGES-1.7.txt
|
||||
---------------
|
||||
|
||||
CHANGES IN CUPS V1.7.5
|
||||
|
||||
- Security: Addressed some more situations where symlinked files would
|
||||
be served by the web interface (STR #4455)
|
||||
- The LPD backend did not work with some versions of glibc (STR #4452)
|
||||
- CGI scripts did not work (STR #4454)
|
||||
- The cupsd.conf man page did not list the ErrorPolicy directive
|
||||
(STR #4457)
|
||||
- Updated the Brazilian Portuguese translation (STR #4456)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.7.4
|
||||
|
||||
- Security: The web interface incorrectly served symlinked files and
|
||||
files that were not world-readable, potentially leading to a
|
||||
disclosure of information (STR #4450)
|
||||
- The CUPS headers incorrectly needed libdispatch for blocks support
|
||||
(STR #4397)
|
||||
- CUPS did not compile when Avahi or mDNSResponder was not present
|
||||
(STR #4402, STR #4424)
|
||||
- The "snmp" option did not work with the network backends (STR #4422)
|
||||
- The User directive in client.conf did not override the USER
|
||||
environment variable (STR #4426)
|
||||
- The web interface now properly shows a "Go" button for all text-based
|
||||
browsers (STR #4425)
|
||||
- The MaxJobTime directive now properly supports time values (STR #4434)
|
||||
- The RPM spec file did not work due to the new Brazilian Portuguese
|
||||
localization (STR #4436)
|
||||
- Fixed an "IPP read error" issue (STR #4440)
|
||||
- Fixed the --disable-libusb configure option (STR #4439)
|
||||
- Fixed the debug output from the DNS-SD backend when using Avahi
|
||||
(STR #4444)
|
||||
- Fixed a bug in the CUPS_SC_GET_DEVICE_ID handling by the network
|
||||
backends (STR #4447)
|
||||
- Added USB quirk rule for Lexmark E230 (STR #4448)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.7.3
|
||||
|
||||
- Added Brazilian Portuguese translation (STR #4409)
|
||||
- Fixed mapping of OutputBin values such as "Tray1"
|
||||
(<rdar://problem/16685606>)
|
||||
- Several ippGet* functions incorrectly returned -1 instead of 0 on
|
||||
error.
|
||||
- The cupsGetResponse function did not work properly with
|
||||
CUPS_HTTP_DEFAULT (<rdar://problem/16762593>)
|
||||
- The IPP backend did not abort a job when the printer did not validate
|
||||
the supplied options (<rdar://problem/16836752>)
|
||||
- Fixed an authentication race condition in cupsSendRequest (STR #4403)
|
||||
- The scheduler did not add the "job-hold-until-specified" reason when
|
||||
holding a job using the lp command (STR #4405)
|
||||
- The configure script incorrectly added libgcrypt as a GNU TLS
|
||||
dependency (STR #4399)
|
||||
- cupsGetDestMediaCount did not work for CUPS_MEDIA_FLAGS DEFAULT
|
||||
(STR #4414)
|
||||
- Auto-typing of PWG Raster files did not work (STR #4417)
|
||||
- IPP queues using hardcoded credentials would ask for credentials
|
||||
(STR #4371)
|
||||
- Dates in non-UTF-8 locales did not display correctly (STR #4388)
|
||||
- The RPM spec file now looks for libusb-devel 1.0 or later.
|
||||
- Fixed the "create-printer-subscription.test" file for IPPTOOL
|
||||
(STR #4420)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.7.2
|
||||
|
||||
- Security: The scheduler now blocks URLs containing embedded HTML
|
||||
(STR #4356)
|
||||
- Documentation fixes (STR #3259, STR #4346, STR #4355)
|
||||
- Fixed the Japanese localization (STR #4385)
|
||||
- Added a German localization (STR #4363)
|
||||
- The cupsfilter command incorrectly read the cupsd.conf file; it now
|
||||
reads the cups-files.conf file instead.
|
||||
- Fixed OS X builds with Xcode 5.x (<rdar://problem/15914959>)
|
||||
- Fixed SSL support on Windows (STR #4358)
|
||||
- Fixed documentation and naming of Create-Job/Printer-Subscriptions
|
||||
operations (STR #4389)
|
||||
- Phone numbers in fax jobs were not properly filtered for IPP FaxOut
|
||||
(<rdar://problem/16351701>)
|
||||
- Updated Linux "relro" support (STR #4349)
|
||||
- Fixed a memory leak in the label printer driver (STR #4393)
|
||||
- cupsEnumDests did not set the "is_default" field (STR #4332)
|
||||
- cupsDoIORequest could miss the server status, causing failed lpadmin
|
||||
and other administrative commands (STR #4386)
|
||||
- cupsEnumDests didn't always call the callback function (STR #4380)
|
||||
- "lp -i job-id -H hold" did not work (STR #nnn)
|
||||
- CUPS didn't compile on older platforms (STR #4338)
|
||||
- Several libcups files did not have the Apple license exception
|
||||
notice (STR #4361)
|
||||
- Fixed a D-BUS threading issue that caused the scheduler to crash
|
||||
(STR #4347)
|
||||
- The scheduler now automatically reconnects to Avahi as needed
|
||||
(STR #4370, STR #4373)
|
||||
- The scheduler did not handle GET requests for the log files properly
|
||||
(STR #3265)
|
||||
- The dnssd backend did not always report all discovered printers using
|
||||
Avahi (STR #4365)
|
||||
- The Zebra printer driver did not properly handle negative "label top"
|
||||
values (STR #4354)
|
||||
- The scheduler did not always update the MakeModel value in
|
||||
printers.conf after updating the driver (STR #4264)
|
||||
- The LPD mini daemon did not support print jobs larger than 2GB
|
||||
(STR #4351)
|
||||
- Fixed a bug in the status reading code when sending a compressed data
|
||||
stream to an IPP printer/server (<rdar://problem/16019623>)
|
||||
- The IPP backend might not include all job attributes in Validate-Job
|
||||
operations (<rdar://problem/16025435>)
|
||||
- Fixed some clang-reported issues (<rdar://problem/15936066>)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.7.1
|
||||
|
||||
- Security: the lppasswd program incorrectly used settings from
|
||||
~/.cups/client.conf (STR #4319)
|
||||
- Auto debug logging was broken in 1.7.0 (<rdar://problem/15331639>)
|
||||
- Some gzip'd PPD files could not be used (<rdar://problem/15386424>)
|
||||
- Cleaned up some job logging in the scheduler
|
||||
(<rdar://problem/15332672>)
|
||||
- ATTR messages could cause string pool memory corruption in the
|
||||
scheduler (<rdar://problem/15382819>)
|
||||
- The RPM spec file did not list the build requirements; this was on
|
||||
purpose, but now we are listing the Red Hat package names
|
||||
(<rdar://problem/15375760>, STR #4322)
|
||||
- Printing to a raw queue could result in corrupt output due to
|
||||
opportunistic compression (<rdar://problem/15008524>)
|
||||
- The GNU TLS support code triggered many compiler warnings due to the
|
||||
use of old GNU TLS compatibility type names
|
||||
(<rdar://problem/15392966>)
|
||||
- The "make check" test suite did not work on Linux without the
|
||||
cups-filters package installed (<rdar://problem/14292998>)
|
||||
- Japanese PPDs using with the Shift-JIS encoding did not work
|
||||
(<rdar://problem/15427759>)
|
||||
- "tel:" URIs incorrectly had slashes (<rdar://problem/15418463>)
|
||||
- The libusb-based USB backend incorrectly used write timeouts
|
||||
(<rdar://problem/15564888>)
|
||||
- Shared printers could become inaccessible after a few days on OS X
|
||||
(<rdar://problem/15426838>)
|
||||
- The IPP backend did not wait for a busy printer to become available
|
||||
before attempting to print (<rdar://problem/15465667>)
|
||||
- CUPS did not support "auto-monochrome" or "process-monochrome" for the
|
||||
"print-color-mode" option (<rdar://problem/15482520>)
|
||||
- Using "@IF(name)" in an Allow or Deny rule did not work (STR #4328)
|
||||
- lpq and lpstat did not list jobs in the correct order when priorities
|
||||
were specified (STR #4326)
|
||||
- The D-BUS notifier did not remove its lockfile (STR #4314)
|
||||
- CUPS incorrectly used the USER environment variable when the name did
|
||||
not match the user ID (STR #4327)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.7.0
|
||||
|
||||
- Updated the Japanese localization.
|
||||
- The lpadmin command did not send the PPD name from the "-m" option
|
||||
(<rdar://problem/15264697>)
|
||||
- Network backends now use the prtMarkerSuppliesClass property to
|
||||
determine the direction of supply level values
|
||||
(<rdar://problem/14302628>)
|
||||
- The scheduler did not remove backup PPD files when a printer was
|
||||
deleted (<rdar://problem/15065555>)
|
||||
- The scheduler incorrectly responded to HEAD requests when the web
|
||||
interface was disabled (<rdar://problem/15090332>)
|
||||
- The scheduler did not respond using the hostname specified by the
|
||||
client (<rdar://problem/14583574>)
|
||||
- Fax queues did not work when shared via Bonjour
|
||||
(<rdar://problem/14498310>)
|
||||
- Error messages from the scheduler were not localized using the
|
||||
language specified in the client's IPP request
|
||||
(<rdar://problem/14128011>)
|
||||
- Added an Italian localization (<rdar://problem/14481578>)
|
||||
- Fixed a couple memory leaks in ippfind that were reported by Clang.
|
||||
- Fixed a compile issue on 64-bit Linux with Clang - need to use the
|
||||
-pie option instead of -Wl,-pie now (<rdar://problem/14480938>)
|
||||
- The ippfind utility reported the wrong port numbers when compiled
|
||||
against Avahi (<rdar://problem/14508324>)
|
||||
- httpGetFd, httpGetFile, httpPutFd, and httpPutFile did not
|
||||
automatically reconnect if the server closed the connecion after the
|
||||
previous response.
|
||||
- Fixed a compile error in libcups (<rdar://problem/14467141>)
|
||||
- The scheduler incorrectly did not pass a FINAL_CONTENT_TYPE
|
||||
environment variable to the filters or backend
|
||||
(<rdar://problem/14355011>)
|
||||
- The cups-exec helper program could fail randomly on OS X due to
|
||||
sandbox violations when closing excess file descriptors
|
||||
(<rdar://problem/14421943>)
|
||||
- The scheduler incorrectly did not use the kqueue interface on OS X.
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.7rc1
|
||||
|
||||
- Printer xxx-default values were not reported by Get-Printer-Attributes
|
||||
or lpoptions (<rdar://problem/14401795>)
|
||||
- Fixed deprecation warnings for many functions on OS X so they are tied
|
||||
to the deployment version when building (<rdar://problem/14210079>)
|
||||
- Fixed a build issue on ARM-based Linux systems - unable to validate
|
||||
va_list arguments.
|
||||
- Added a new ippfind tool for finding IPP printers and other Bonjour
|
||||
services (<rdar://problem/13876199>)
|
||||
- Fixed some issues with conversion of PWG media size names to
|
||||
hundredths of millimeters (<rdar://problem/14065748>)
|
||||
- The IPP backend could crash on OS X when printing to a Kerberized
|
||||
printer (<rdar://problem/14040186>)
|
||||
- The ipptool program now automatically extends timeouts when the
|
||||
output buffer is filled (<rdar://problem/14016099>)
|
||||
- The ipptool program now supports the --help and --version options.
|
||||
- The ipptool program did not continue past include file errors by
|
||||
default (<rdar://problem/13875803>)
|
||||
- The ipptool program now supports FILE-ID and TEST-ID directives and
|
||||
includes their values in its XML output (<rdar://problem/13876038>)
|
||||
- The ipptool program now supports WITH-HOSTNAME, WITH-RESOURCE, and
|
||||
WITH-SCHEME expect predicates to compare the corresponding URI
|
||||
components (<rdar://problem/13876091>)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.7b1
|
||||
|
||||
- The configure script now supports a --with-rundir option to change
|
||||
the transient run-time state directory from the default to other
|
||||
locations like /run/cups (STR #4306)
|
||||
- The scheduler now supports PPD lookups for classes (STR #4296)
|
||||
- The cupsfilter program did not set the FINAL_CONTENT_TYPE
|
||||
environment variable for filters.
|
||||
- Added a new "-x" option to the cancel command (STR #4103)
|
||||
- Made the PWG media handling APIs public (STR #4267)
|
||||
- Implemented ready media support for the cupsGetDestMediaXxx APIs
|
||||
(STR #4289)
|
||||
- Added new cupsFindDestDefault, cupsFindDestReady, and
|
||||
cupsFindDestSupported APIs (STR #4289)
|
||||
- Added new cupsGetDestMediaByIndex, cupsGetDestMediaCount, and
|
||||
cupsGetDestMediaDefault APIs (STR #4289)
|
||||
- Added new ippGet/SetOctetString APIs for getting and setting an
|
||||
octetString value (STR #4289)
|
||||
- Added new ippCreateRequestedArray API for generating a array of
|
||||
attributes from the requested-attributes attribute.
|
||||
- The ipptool utility now supports compression, conditional tests based
|
||||
on the presence of files, and new DEFINE predicates for STATUS.
|
||||
- Added new IPP APIs for checking values (STR #4167)
|
||||
- Added new IPP APis for adding and setting formatted strings.
|
||||
- Added new HTTP APIs to support basic server functionality via libcups.
|
||||
- The dnssd backend now generates a 1284 device ID as needed (STR #3702)
|
||||
- CUPS now supports compressing and decompressing streamed data
|
||||
(STR #4168)
|
||||
- CUPS now supports higher-level PIN printing, external accounting
|
||||
systems, and "print here" printing environments (STR #4169)
|
||||
- IRIX is no longer a supported operating system (STR #4092)
|
||||
- The PPD compiler now supports JCL options properly (STR #4115)
|
||||
- The web interface now checks whether the web browser has cookies
|
||||
enabled and displays a suitable error message (STR #4141)
|
||||
@@ -1,8 +1,14 @@
|
||||
CHANGES-IPPTOOL.txt - 2013-07-15
|
||||
CHANGES-IPPTOOL.txt - 2015-05-15
|
||||
--------------------------------
|
||||
|
||||
This file provides a list of changes to the ipptool binary distribution posted
|
||||
on cups.org.
|
||||
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
|
||||
|
||||
|
||||
+58
-88
@@ -1,91 +1,61 @@
|
||||
CHANGES.txt - 1.7.0 - 2013-08-01
|
||||
CHANGES.txt - 2.0b1 - 2014-07-30
|
||||
--------------------------------
|
||||
|
||||
CHANGES IN CUPS V1.7.0
|
||||
CHANGES IN CUPS V2.0b1
|
||||
|
||||
- The scheduler did not respond using the hostname specified by the
|
||||
client (<rdar://problem/14583574>)
|
||||
- Fax queues did not work when shared via Bonjour
|
||||
(<rdar://problem/14498310>)
|
||||
- Error messages from the scheduler were not localized using the
|
||||
language specified in the client's IPP request
|
||||
(<rdar://problem/14128011>)
|
||||
- Added an Italian localization (<rdar://problem/14481578>)
|
||||
- Fixed a couple memory leaks in ippfind that were reported by Clang.
|
||||
- Fixed a compile issue on 64-bit Linux with Clang - need to use the
|
||||
-pie option instead of -Wl,-pie now (<rdar://problem/14480938>)
|
||||
- The ippfind utility reported the wrong port numbers when compiled
|
||||
against Avahi (<rdar://problem/14508324>)
|
||||
- httpGetFd, httpGetFile, httpPutFd, and httpPutFile did not
|
||||
automatically reconnect if the server closed the connecion after the
|
||||
previous response.
|
||||
- Fixed a compile error in libcups (<rdar://problem/14467141>)
|
||||
- The scheduler incorrectly did not pass a FINAL_CONTENT_TYPE
|
||||
environment variable to the filters or backend
|
||||
(<rdar://problem/14355011>)
|
||||
- The cups-exec helper program could fail randomly on OS X due to
|
||||
sandbox violations when closing excess file descriptors
|
||||
(<rdar://problem/14421943>)
|
||||
- The scheduler incorrectly did not use the kqueue interface on OS X.
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.7rc1
|
||||
|
||||
- Printer xxx-default values were not reported by Get-Printer-Attributes
|
||||
or lpoptions (<rdar://problem/14401795>)
|
||||
- Fixed deprecation warnings for many functions on OS X so they are tied
|
||||
to the deployment version when building (<rdar://problem/14210079>)
|
||||
- Fixed a build issue on ARM-based Linux systems - unable to validate
|
||||
va_list arguments.
|
||||
- Added a new ippfind tool for finding IPP printers and other Bonjour
|
||||
services (<rdar://problem/13876199>)
|
||||
- Fixed some issues with conversion of PWG media size names to
|
||||
hundredths of millimeters (<rdar://problem/14065748>)
|
||||
- The IPP backend could crash on OS X when printing to a Kerberized
|
||||
printer (<rdar://problem/14040186>)
|
||||
- The ipptool program now automatically extends timeouts when the
|
||||
output buffer is filled (<rdar://problem/14016099>)
|
||||
- The ipptool program now supports the --help and --version options.
|
||||
- The ipptool program did not continue past include file errors by
|
||||
default (<rdar://problem/13875803>)
|
||||
- The ipptool program now supports FILE-ID and TEST-ID directives and
|
||||
includes their values in its XML output (<rdar://problem/13876038>)
|
||||
- The ipptool program now supports WITH-HOSTNAME, WITH-RESOURCE, and
|
||||
WITH-SCHEME expect predicates to compare the corresponding URI
|
||||
components (<rdar://problem/13876091>)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.7b1
|
||||
|
||||
- The configure script now supports a --with-rundir option to change
|
||||
the transient run-time state directory from the default to other
|
||||
locations like /run/cups (STR #4306)
|
||||
- The scheduler now supports PPD lookups for classes (STR #4296)
|
||||
- The cupsfilter program did not set the FINAL_CONTENT_TYPE
|
||||
environment variable for filters.
|
||||
- Added a new "-x" option to the cancel command (STR #4103)
|
||||
- Made the PWG media handling APIs public (STR #4267)
|
||||
- Implemented ready media support for the cupsGetDestMediaXxx APIs
|
||||
(STR #4289)
|
||||
- Added new cupsFindDestDefault, cupsFindDestReady, and
|
||||
cupsFindDestSupported APIs (STR #4289)
|
||||
- Added new cupsGetDestMediaByIndex, cupsGetDestMediaCount, and
|
||||
cupsGetDestMediaDefault APIs (STR #4289)
|
||||
- Added new ippGet/SetOctetString APIs for getting and setting an
|
||||
octetString value (STR #4289)
|
||||
- Added new ippCreateRequestedArray API for generating a array of
|
||||
attributes from the requested-attributes attribute.
|
||||
- The ipptool utility now supports compression, conditional tests based
|
||||
on the presence of files, and new DEFINE predicates for STATUS.
|
||||
- Added new IPP APIs for checking values (STR #4167)
|
||||
- Added new IPP APis for adding and setting formatted strings.
|
||||
- Added new HTTP APIs to support basic server functionality via libcups.
|
||||
- The dnssd backend now generates a 1284 device ID as needed (STR #3702)
|
||||
- CUPS now supports compressing and decompressing streamed data
|
||||
(STR #4168)
|
||||
- CUPS now supports higher-level PIN printing, external accounting
|
||||
systems, and "print here" printing environments (STR #4169)
|
||||
- IRIX is no longer a supported operating system (STR #4092)
|
||||
- The PPD compiler now supports JCL options properly (STR #4115)
|
||||
- The web interface now checks whether the web browser has cookies
|
||||
enabled and displays a suitable error message (STR #4141)
|
||||
- Added a "--list-filters" option to the cupsfilter command (STR #4325)
|
||||
- Added systemd support (STR #3917)
|
||||
- Added support for re-sending a job as a raster file if a higher-level
|
||||
format such as PDF fails (<rdar://problem/15583721>)
|
||||
- Added support for regular expression matching in the MIME type rules
|
||||
(<rdar://problem/11131245>)
|
||||
- Added support for TLS certificate validation and policy enforcement
|
||||
(STR #1616)
|
||||
- Added support for simultaneous XML and test output from ipptool.
|
||||
- Added support for PAUSE directive in ipptool test files.
|
||||
- Added support for auto-typing of TIFF files by ipptool (STR #4418)
|
||||
- The scheduler now returns completed jobs in the correct newest-to-
|
||||
oldest order (STR #4396)
|
||||
- The configure script now supports target-specific tools for pkg-config
|
||||
and others (STR #4423)
|
||||
- The ipptool program now supports EXPECT statements for collection
|
||||
member attributes (<rdar://problem/15355218>)
|
||||
- The ipptool program now supports collection attributes with multiple
|
||||
values (<rdar://problem/15355124>)
|
||||
- The sample drivers now include all of the installed localizations by
|
||||
default (<rdar://problem/14756625>)
|
||||
- Adopted Linux man page conventions and updated all man pages
|
||||
(STR #4372, STR #4329)
|
||||
- The scheduler now supports the "first-index" operation attribute for
|
||||
the Get-Jobs operation (STR #2913)
|
||||
- Changed the default AccessLogLevel and PageLogFormat to disable the
|
||||
access_log and page_log files by default (<rdar://problem/16495000>)
|
||||
- cupsRasterInterpretPPD now supports the Orientation header in order to
|
||||
support long-edge feed raster printers (<rdar://problem/15837926>)
|
||||
- The scheduler now allows run-as-root backends to have group read and
|
||||
execute permissions (STR #2935)
|
||||
- The ippFindAttribute and ippFindNextAttribute functions now support
|
||||
hierarchical searches (STR #4395)
|
||||
- Dropped OpenSSL support in favor of GNU TLS.
|
||||
- Dropped "dark wake" support on OS X, which was preventing portables
|
||||
from going to sleep when there was a stuck job. We now use a variation
|
||||
of the CUPS 1.4 sleep support to do a cleaner sleep
|
||||
(<rdar://problem/14323704>)
|
||||
- Dropped support for AIX, HP-UX, and OSF/1 (aka Digital UNIX)
|
||||
- Dropped lppasswd and support for Digest authentication in in the
|
||||
scheduler (STR #4321)
|
||||
- The cupsGetClasses, cupsGetPrinters, and cupsTempFile functions are no
|
||||
longer supported.
|
||||
- The scheduler now caches more job history data and limits the number
|
||||
of completed jobs returned by Get-Jobs as needed in order to prevent a
|
||||
denial-of-service on busy servers (STR #2913)
|
||||
- The filter/backend sandbox on OS X now defaults to a more strict
|
||||
whitelist (<rdar://problem/15939788>)
|
||||
- Increased the default idle exit timeout to 60 seconds on OS X
|
||||
(<rdar://problem/16041820>)
|
||||
- Printer classes were not accessible on OS X
|
||||
(<rdar://problem/16385643>)
|
||||
- The scheduler now uses </DefaultPrinter> to close the default printer
|
||||
definition in printers.conf (STR #4153)
|
||||
- Canceling all jobs in the web interface now just cancels the jobs
|
||||
(STR #1914)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
INSTALL - CUPS v1.7.0 - 2013-07-16
|
||||
INSTALL - CUPS v2.0b1 - 2014-07-30
|
||||
----------------------------------
|
||||
|
||||
This file describes how to compile and install CUPS from source code. For more
|
||||
|
||||
+7
-13
@@ -1,6 +1,6 @@
|
||||
CUPS License Agreement
|
||||
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
1 Infinite Loop
|
||||
Cupertino, CA 95014 USA
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
INTRODUCTION
|
||||
|
||||
CUPS(tm) is provided under the GNU General Public License ("GPL")
|
||||
and GNU Library General Public License ("LGPL"), Version 2, with
|
||||
exceptions for Apple operating systems and the OpenSSL toolkit. A
|
||||
copy of the exceptions and licenses follow this introduction.
|
||||
and GNU Library General Public License ("LGPL"), Version 2, with an
|
||||
exception for Apple operating systems. A copy of the exception and
|
||||
licenses follow this introduction.
|
||||
|
||||
The GNU LGPL applies to the CUPS and CUPS Imaging libraries
|
||||
located in the "cups" and "filter" subdirectories of the CUPS
|
||||
@@ -45,7 +45,7 @@ application, driver, or filter.
|
||||
LICENSE EXCEPTIONS
|
||||
|
||||
In addition, as the copyright holder of CUPS, Apple Inc. grants
|
||||
the following special exceptions:
|
||||
the following special exception:
|
||||
|
||||
1. Apple Operating System Development License Exception;
|
||||
|
||||
@@ -86,14 +86,8 @@ the following special exceptions:
|
||||
This file is subject to the Apple OS-Developed
|
||||
Software exception.
|
||||
|
||||
2. OpenSSL Toolkit License Exception;
|
||||
|
||||
a. Apple Inc. explicitly allows the compilation and
|
||||
distribution of the CUPS software with the OpenSSL
|
||||
Toolkit.
|
||||
|
||||
No developer is required to provide these exceptions in a
|
||||
derived work.
|
||||
No developer is required to provide this exception in a derived
|
||||
work.
|
||||
|
||||
|
||||
KERBEROS SUPPORT CODE
|
||||
|
||||
+23
-20
@@ -1,16 +1,16 @@
|
||||
#
|
||||
# "$Id$"
|
||||
# "$Id: Makedefs.in 11716 2014-03-21 14:50:24Z msweet $"
|
||||
#
|
||||
# Common makefile definitions for CUPS.
|
||||
# Common makefile definitions for CUPS.
|
||||
#
|
||||
# Copyright 2007-2013 by Apple Inc.
|
||||
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
# 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
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
#
|
||||
|
||||
#
|
||||
@@ -121,9 +121,9 @@ INSTALLXPC = @INSTALLXPC@
|
||||
#
|
||||
|
||||
ALL_CFLAGS = -I.. -D_CUPS_SOURCE $(CFLAGS) $(SSLFLAGS) \
|
||||
@LARGEFILE@ @PTHREAD_FLAGS@ $(OPTIONS)
|
||||
@LARGEFILE@ @PTHREAD_FLAGS@ $(ONDEMANDFLAGS) $(OPTIONS)
|
||||
ALL_CXXFLAGS = -I.. -D_CUPS_SOURCE $(CXXFLAGS) $(SSLFLAGS) \
|
||||
@LARGEFILE@ @PTHREAD_FLAGS@ $(OPTIONS)
|
||||
@LARGEFILE@ @PTHREAD_FLAGS@ $(ONDEMANDFLAGS) $(OPTIONS)
|
||||
ARCHFLAGS = @ARCHFLAGS@
|
||||
ARFLAGS = @ARFLAGS@
|
||||
BACKLIBS = @BACKLIBS@
|
||||
@@ -140,13 +140,14 @@ DSOLIBS = @DSOLIBS@ $(COMMONLIBS)
|
||||
DNSSDLIBS = @DNSSDLIBS@
|
||||
IPPFIND_BIN = @IPPFIND_BIN@
|
||||
IPPFIND_MAN = @IPPFIND_MAN@
|
||||
LAUNCHDLIBS = @LAUNCHDLIBS@
|
||||
LDFLAGS = -L../cgi-bin -L../cups -L../filter -L../ppdc \
|
||||
-L../scheduler @LDARCHFLAGS@ \
|
||||
@LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
|
||||
LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(LIBZ)
|
||||
LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(DNSSDLIBS) $(LIBZ)
|
||||
LINKCUPSIMAGE = @LINKCUPSIMAGE@
|
||||
LIBS = $(LINKCUPS) $(COMMONLIBS)
|
||||
ONDEMANDFLAGS = @ONDEMANDFLAGS@
|
||||
ONDEMANDLIBS = @ONDEMANDLIBS@
|
||||
OPTIM = @OPTIM@
|
||||
OPTIONS =
|
||||
PAMLIBS = @PAMLIBS@
|
||||
@@ -200,8 +201,6 @@ DATADIR = $(BUILDROOT)@CUPS_DATADIR@
|
||||
DOCDIR = $(BUILDROOT)@CUPS_DOCROOT@
|
||||
ICONDIR = @ICONDIR@
|
||||
INCLUDEDIR = $(BUILDROOT)$(includedir)
|
||||
INITDIR = @INITDIR@
|
||||
INITDDIR = @INITDDIR@
|
||||
LIBDIR = $(BUILDROOT)$(libdir)
|
||||
LOCALEDIR = $(BUILDROOT)@CUPS_LOCALEDIR@
|
||||
LOGDIR = $(BUILDROOT)@CUPS_LOGDIR@
|
||||
@@ -216,10 +215,7 @@ REQUESTS = $(BUILDROOT)@CUPS_REQUESTS@
|
||||
SBINDIR = $(BUILDROOT)@sbindir@
|
||||
SERVERBIN = $(BUILDROOT)@CUPS_SERVERBIN@
|
||||
SERVERROOT = $(BUILDROOT)@CUPS_SERVERROOT@
|
||||
SMFMANIFESTDIR = @SMFMANIFESTDIR@
|
||||
STATEDIR = $(BUILDROOT)@CUPS_STATEDIR@
|
||||
USBQUIRKS = @USBQUIRKS@
|
||||
XINETD = @XINETD@
|
||||
|
||||
MAN1EXT = @MAN1EXT@
|
||||
MAN5EXT = @MAN5EXT@
|
||||
@@ -230,8 +226,15 @@ MAN8DIR = @MAN8DIR@
|
||||
PAMDIR = @PAMDIR@
|
||||
PAMFILE = @PAMFILE@
|
||||
|
||||
DEFAULT_LAUNCHD_CONF = @DEFAULT_LAUNCHD_CONF@
|
||||
DBUSDIR = @DBUSDIR@
|
||||
INITDIR = @INITDIR@
|
||||
INITDDIR = @INITDDIR@
|
||||
LAUNCHD_DIR = @LAUNCHD_DIR@
|
||||
SMFMANIFESTDIR = @SMFMANIFESTDIR@
|
||||
SYSTEMD_DIR = @SYSTEMD_DIR@
|
||||
XINETD = @XINETD@
|
||||
|
||||
USBQUIRKS = @USBQUIRKS@
|
||||
|
||||
|
||||
#
|
||||
@@ -261,5 +264,5 @@ DBUSDIR = @DBUSDIR@
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id$"
|
||||
# End of "$Id: Makedefs.in 11716 2014-03-21 14:50:24Z msweet $"
|
||||
#
|
||||
|
||||
+44
-25
@@ -1,16 +1,16 @@
|
||||
#
|
||||
# "$Id$"
|
||||
# "$Id: Makefile 12074 2014-07-31 01:10:14Z msweet $"
|
||||
#
|
||||
# Top-level Makefile for CUPS.
|
||||
# Top-level Makefile for CUPS.
|
||||
#
|
||||
# Copyright 2007-2013 by Apple Inc.
|
||||
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
# 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
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
#
|
||||
|
||||
include Makedefs
|
||||
@@ -98,22 +98,18 @@ clean:
|
||||
|
||||
distclean: clean
|
||||
$(RM) Makedefs config.h config.log config.status
|
||||
$(RM) conf/cups-files.conf conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf
|
||||
$(RM) cups-config
|
||||
$(RM) conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf
|
||||
$(RM) doc/help/ref-cupsd-conf.html doc/help/standard.html doc/index.html
|
||||
$(RM) man/client.conf.man
|
||||
$(RM) man/cups-deviced.man man/cups-driverd.man
|
||||
$(RM) man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man
|
||||
$(RM) man/cupsd.conf.man man/drv.man man/lpoptions.man
|
||||
$(RM) packaging/cups.list
|
||||
$(RM) packaging/cups-desc.plist packaging/cups-info.plist
|
||||
$(RM) templates/header.tmpl
|
||||
$(RM) data/testprint
|
||||
$(RM) desktop/cups.desktop
|
||||
$(RM) scheduler/cups.sh scheduler/cups-lpd.xinetd
|
||||
$(RM) scheduler/org.cups.cups-lpd.plist scheduler/cups.xml
|
||||
$(RM) doc/index.html
|
||||
$(RM) 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
|
||||
$(RM) packaging/cups.list
|
||||
$(RM) scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/org.cups.cupsd.path scheduler/org.cups.cupsd.service scheduler/org.cups.cupsd.socket
|
||||
$(RM) templates/header.tmpl
|
||||
-$(RM) doc/*/index.html
|
||||
-$(RM) templates/*/header.tmpl
|
||||
-$(RM) -r autom4te*.cache clang cups/charmaps cups/locale driver/test
|
||||
-$(RM) -r autom4te*.cache clang cups/charmaps cups/locale
|
||||
|
||||
|
||||
#
|
||||
@@ -128,8 +124,11 @@ depend:
|
||||
|
||||
|
||||
#
|
||||
# Run the clang.llvm.org static code analysis tool on the C sources.
|
||||
# (at least checker-231 is required for scan-build to work this way)
|
||||
# Run the Clang static code analysis tool on the sources, available here:
|
||||
#
|
||||
# http://clang-analyzer.llvm.org
|
||||
#
|
||||
# At least checker-231 is required.
|
||||
#
|
||||
|
||||
.PHONY: clang clang-changes
|
||||
@@ -140,6 +139,26 @@ clang-changes:
|
||||
scan-build -V -k -o `pwd`/clang $(MAKE) $(MFLAGS) all
|
||||
|
||||
|
||||
#
|
||||
# Run the STACK tool on the sources, available here:
|
||||
#
|
||||
# http://css.csail.mit.edu/stack/
|
||||
#
|
||||
# Do the following to pass options to configure:
|
||||
#
|
||||
# make CONFIGFLAGS="--foo --bar" stack
|
||||
#
|
||||
|
||||
.PHONY: stack
|
||||
stack:
|
||||
stack-build ./configure $(CONFIGFLAGS)
|
||||
stack-build $(MAKE) $(MFLAGS) clean all
|
||||
poptck
|
||||
$(MAKE) $(MFLAGS) distclean
|
||||
$(RM) */*.ll
|
||||
$(RM) */*.ll.out
|
||||
|
||||
|
||||
#
|
||||
# Generate a ctags file...
|
||||
#
|
||||
@@ -300,7 +319,7 @@ sloc:
|
||||
|
||||
EPMFLAGS = -v --output-dir dist $(EPMARCH)
|
||||
|
||||
aix bsd deb depot inst pkg setld slackware swinstall tardist:
|
||||
bsd deb pkg slackware tardist:
|
||||
epm $(EPMFLAGS) -f $@ cups packaging/cups.list
|
||||
|
||||
epm:
|
||||
@@ -329,5 +348,5 @@ dist: all
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
# End of "$Id: Makefile 12074 2014-07-31 01:10:14Z msweet $".
|
||||
#
|
||||
|
||||
+15
-2
@@ -1,6 +1,19 @@
|
||||
README - CUPS v1.7.0 - 2013-07-16
|
||||
README - CUPS v2.0b1 - 2014-07-30
|
||||
---------------------------------
|
||||
|
||||
********************************************************************************
|
||||
********************************************************************************
|
||||
******** ********
|
||||
******** ********
|
||||
******** THIS IS BETA-RELEASE SOFTWARE AND SHOULD NOT BE USED ON ********
|
||||
******** PRODUCTION SYSTEMS. ********
|
||||
******** ********
|
||||
******** ********
|
||||
********************************************************************************
|
||||
********************************************************************************
|
||||
|
||||
|
||||
|
||||
Looking for compile instructions? Read the file "INSTALL.txt" instead...
|
||||
|
||||
|
||||
@@ -149,7 +162,7 @@ PRINTING FILES
|
||||
|
||||
LEGAL STUFF
|
||||
|
||||
CUPS is Copyright 2007-2013 by Apple Inc. CUPS and the CUPS logo are
|
||||
CUPS is Copyright 2007-2014 by Apple Inc. CUPS and the CUPS logo are
|
||||
trademarks of Apple Inc.
|
||||
|
||||
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
|
||||
|
||||
+62
-55
@@ -1,70 +1,77 @@
|
||||
ipp.o: ipp.c backend-private.h ../cups/cups-private.h \
|
||||
../cups/string-private.h ../config.h ../cups/debug-private.h \
|
||||
../cups/versioning.h ../cups/ipp-private.h ../cups/ipp.h \
|
||||
../cups/http.h ../cups/array.h ../cups/http-private.h \
|
||||
../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \
|
||||
../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h \
|
||||
../cups/array-private.h
|
||||
lpd.o: lpd.c ../cups/http-private.h ../config.h ../cups/http.h \
|
||||
../cups/versioning.h ../cups/array.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/language-private.h ../cups/transcode.h \
|
||||
../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.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/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/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/ipp-private.h ../cups/ipp.h \
|
||||
../cups/http.h ../cups/array.h ../cups/http-private.h \
|
||||
../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \
|
||||
../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.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/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/ipp-private.h ../cups/ipp.h \
|
||||
../cups/http.h ../cups/array.h ../cups/http-private.h \
|
||||
../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \
|
||||
../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.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/http.h \
|
||||
../cups/versioning.h ../cups/array.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/language-private.h ../cups/transcode.h \
|
||||
../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.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/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/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/ipp-private.h ../cups/ipp.h \
|
||||
../cups/http.h ../cups/array.h ../cups/http-private.h \
|
||||
../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \
|
||||
../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.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/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/http.h ../cups/array.h ../cups/language.h ../cups/pwg.h \
|
||||
../cups/sidechannel.h
|
||||
testsupplies.o: testsupplies.c backend-private.h ../cups/cups-private.h \
|
||||
../cups/string-private.h ../config.h ../cups/debug-private.h \
|
||||
../cups/versioning.h ../cups/ipp-private.h ../cups/ipp.h \
|
||||
../cups/http.h ../cups/array.h ../cups/http-private.h \
|
||||
../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \
|
||||
../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.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/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/ipp-private.h ../cups/ipp.h \
|
||||
../cups/http.h ../cups/array.h ../cups/http-private.h \
|
||||
../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \
|
||||
../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.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
|
||||
../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/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
|
||||
|
||||
+23
-9
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# "$Id$"
|
||||
# "$Id: Makefile 11859 2014-05-08 22:42:44Z msweet $"
|
||||
#
|
||||
# Backend makefile for CUPS.
|
||||
#
|
||||
# Copyright 2007-2013 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
|
||||
@@ -23,8 +23,8 @@ include ../Makedefs
|
||||
|
||||
# RBACKENDS are installed mode 0700 so cupsd will run them as root...
|
||||
#
|
||||
# UBACKENDS are installed mode 0755 so cupsd will run them as an unprivileged
|
||||
# user...
|
||||
# UBACKENDS and ULBACKENDS are installed mode 0755 so cupsd will run them as
|
||||
# an unprivileged user...
|
||||
#
|
||||
# See http://www.cups.org/documentation.php/api-filter.html for more info...
|
||||
RBACKENDS = \
|
||||
@@ -33,7 +33,8 @@ RBACKENDS = \
|
||||
$(DNSSD_BACKEND)
|
||||
UBACKENDS = \
|
||||
snmp \
|
||||
socket \
|
||||
socket
|
||||
ULBACKENDS = \
|
||||
usb
|
||||
UNITTESTS = \
|
||||
test1284 \
|
||||
@@ -42,7 +43,8 @@ UNITTESTS = \
|
||||
TARGETS = \
|
||||
libbackend.a \
|
||||
$(RBACKENDS) \
|
||||
$(UBACKENDS)
|
||||
$(UBACKENDS) \
|
||||
$(ULBACKENDS)
|
||||
LIBOBJS = \
|
||||
ieee1284.o \
|
||||
network.o \
|
||||
@@ -71,7 +73,7 @@ all: $(TARGETS)
|
||||
# Make library targets...
|
||||
#
|
||||
|
||||
libs:
|
||||
libs: $(ULBACKENDS)
|
||||
|
||||
|
||||
#
|
||||
@@ -167,6 +169,18 @@ install-headers:
|
||||
#
|
||||
|
||||
install-libs:
|
||||
echo Installing backends in $(SERVERBIN)/backend
|
||||
$(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
|
||||
for file in $(ULBACKENDS); do \
|
||||
$(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
|
||||
done
|
||||
if test "x$(SYMROOT)" != "x"; then \
|
||||
$(INSTALL_DIR) $(SYMROOT); \
|
||||
for file in $(ULBACKENDS); do \
|
||||
cp $$file $(SYMROOT); \
|
||||
dsymutil $(SYMROOT)/$$file; \
|
||||
done \
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
@@ -179,7 +193,7 @@ uninstall:
|
||||
$(RM) $(SERVERBIN)/apple/$$file; \
|
||||
done
|
||||
-$(RMDIR) $(SERVERBIN)/apple
|
||||
for file in $(RBACKENDS) $(UBACKENDS); do \
|
||||
for file in $(RBACKENDS) $(UBACKENDS) $(ULBACKENDS); do \
|
||||
$(RM) $(SERVERBIN)/backend/$$file; \
|
||||
done
|
||||
for file in $(IPPALIASES); do \
|
||||
@@ -301,5 +315,5 @@ include Dependencies
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
# End of "$Id: Makefile 11859 2014-05-08 22:42:44Z msweet $".
|
||||
#
|
||||
|
||||
+12
-12
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: backend-private.h 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Backend support definitions for CUPS.
|
||||
* Backend support definitions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
* 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"
|
||||
* "LICENSE" which should have been included with this file. If this
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* "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.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
#ifndef _CUPS_BACKEND_PRIVATE_H_
|
||||
@@ -313,7 +313,7 @@ extern int backendGetDeviceID(int fd, char *device_id,
|
||||
int uri_size);
|
||||
extern int backendGetMakeModel(const char *device_id,
|
||||
char *make_model,
|
||||
int make_model_size);
|
||||
size_t make_model_size);
|
||||
extern int backendNetworkSideCB(int print_fd, int device_fd,
|
||||
int snmp_fd, http_addr_t *addr,
|
||||
int use_bc);
|
||||
@@ -334,5 +334,5 @@ extern int backendWaitLoop(int snmp_fd, http_addr_t *addr,
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: backend-private.h 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+57
-47
@@ -1,33 +1,17 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: dnssd.c 11969 2014-06-30 14:27:01Z msweet $"
|
||||
*
|
||||
* DNS-SD discovery backend for CUPS.
|
||||
* DNS-SD discovery backend for CUPS.
|
||||
*
|
||||
* Copyright 2008-2012 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
|
||||
* 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/".
|
||||
* 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() - Browse for printers.
|
||||
* browse_callback() - Browse devices.
|
||||
* browse_local_callback() - Browse local devices.
|
||||
* client_callback() - Avahi client callback function.
|
||||
* compare_devices() - Compare two devices.
|
||||
* exec_backend() - Execute the backend that corresponds to the
|
||||
* resolved service name.
|
||||
* device_type() - Get DNS-SD type enumeration from string.
|
||||
* get_device() - Create or update a device.
|
||||
* query_callback() - Process query data.
|
||||
* find_device() - Find a device from its name and domain.
|
||||
* sigterm_handler() - Handle termination signals.
|
||||
* unquote() - Unquote a name string.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -77,7 +61,8 @@ typedef struct
|
||||
*domain, /* Domain name */
|
||||
*fullName, /* Full name */
|
||||
*make_and_model, /* Make and model from TXT record */
|
||||
*device_id; /* 1284 device ID from TXT record */
|
||||
*device_id, /* 1284 device ID from TXT record */
|
||||
*uuid; /* UUID from TXT record */
|
||||
cups_devtype_t type; /* Device registration type */
|
||||
int priority, /* Priority associated with type */
|
||||
cups_shared, /* CUPS shared printer? */
|
||||
@@ -95,6 +80,7 @@ static int job_canceled = 0;
|
||||
static AvahiSimplePoll *simple_poll = NULL;
|
||||
/* Poll information */
|
||||
static int got_data = 0; /* Got data from poll? */
|
||||
static int browsers = 0; /* Number of running browsers */
|
||||
#endif /* HAVE_AVAHI */
|
||||
|
||||
|
||||
@@ -137,7 +123,7 @@ static void client_callback(AvahiClient *client,
|
||||
#endif /* HAVE_AVAHI */
|
||||
|
||||
static int compare_devices(cups_device_t *a, cups_device_t *b);
|
||||
static void exec_backend(char **argv);
|
||||
static void exec_backend(char **argv) __attribute__((noreturn));
|
||||
static cups_device_t *get_device(cups_array_t *devices,
|
||||
const char *serviceName,
|
||||
const char *regtype,
|
||||
@@ -345,6 +331,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
return (1);
|
||||
}
|
||||
|
||||
browsers = 6;
|
||||
avahi_service_browser_new(client, AVAHI_IF_UNSPEC,
|
||||
AVAHI_PROTO_UNSPEC,
|
||||
"_fax-ipp._tcp", NULL, 0,
|
||||
@@ -513,9 +500,15 @@ main(int argc, /* I - Number of command-line args */
|
||||
{
|
||||
unquote(uriName, best->fullName, sizeof(uriName));
|
||||
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, device_uri, sizeof(device_uri),
|
||||
"dnssd", NULL, uriName, 0,
|
||||
best->cups_shared ? "/cups" : "/");
|
||||
if (best->uuid)
|
||||
httpAssembleURIf(HTTP_URI_CODING_ALL, device_uri,
|
||||
sizeof(device_uri), "dnssd", NULL, uriName, 0,
|
||||
best->cups_shared ? "/cups?uuid=%s" : "/?uuid=%s",
|
||||
best->uuid);
|
||||
else
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, device_uri,
|
||||
sizeof(device_uri), "dnssd", NULL, uriName, 0,
|
||||
best->cups_shared ? "/cups" : "/");
|
||||
|
||||
cupsBackendReport("network", device_uri, best->make_and_model,
|
||||
best->name, best->device_id, NULL);
|
||||
@@ -546,9 +539,15 @@ main(int argc, /* I - Number of command-line args */
|
||||
{
|
||||
unquote(uriName, best->fullName, sizeof(uriName));
|
||||
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, device_uri, sizeof(device_uri),
|
||||
"dnssd", NULL, uriName, 0,
|
||||
best->cups_shared ? "/cups" : "/");
|
||||
if (best->uuid)
|
||||
httpAssembleURIf(HTTP_URI_CODING_ALL, device_uri,
|
||||
sizeof(device_uri), "dnssd", NULL, uriName, 0,
|
||||
best->cups_shared ? "/cups?uuid=%s" : "/?uuid=%s",
|
||||
best->uuid);
|
||||
else
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, device_uri,
|
||||
sizeof(device_uri), "dnssd", NULL, uriName, 0,
|
||||
best->cups_shared ? "/cups" : "/");
|
||||
|
||||
cupsBackendReport("network", device_uri, best->make_and_model,
|
||||
best->name, best->device_id, NULL);
|
||||
@@ -558,7 +557,11 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
fprintf(stderr, "DEBUG: sent=%d, count=%d\n", sent, count);
|
||||
|
||||
#ifdef HAVE_AVAHI
|
||||
if (sent == cupsArrayCount(devices) && browsers == 0)
|
||||
#else
|
||||
if (sent == cupsArrayCount(devices))
|
||||
#endif /* HAVE_AVAHI */
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -710,9 +713,12 @@ browse_callback(
|
||||
break;
|
||||
|
||||
case AVAHI_BROWSER_REMOVE:
|
||||
case AVAHI_BROWSER_ALL_FOR_NOW:
|
||||
case AVAHI_BROWSER_CACHE_EXHAUSTED:
|
||||
break;
|
||||
|
||||
case AVAHI_BROWSER_ALL_FOR_NOW:
|
||||
browsers--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -824,8 +830,8 @@ exec_backend(char **argv) /* I - Command-line arguments */
|
||||
* 'device_type()' - Get DNS-SD type enumeration from string.
|
||||
*/
|
||||
|
||||
static int
|
||||
device_type(const char *regtype)
|
||||
static cups_devtype_t /* O - Device type */
|
||||
device_type(const char *regtype) /* I - Service registration type */
|
||||
{
|
||||
#ifdef HAVE_AVAHI
|
||||
if (!strcmp(regtype, "_ipp._tcp"))
|
||||
@@ -915,8 +921,12 @@ get_device(cups_array_t *devices, /* I - Device array */
|
||||
* Yes, add the device...
|
||||
*/
|
||||
|
||||
fprintf(stderr, "DEBUG: Found \"%s.%s%s\"...\n", serviceName, regtype,
|
||||
replyDomain);
|
||||
#ifdef HAVE_DNSSD
|
||||
DNSServiceConstructFullName(fullName, serviceName, regtype, replyDomain);
|
||||
#else /* HAVE_AVAHI */
|
||||
avahi_service_name_join(fullName, kDNSServiceMaxDomainName,
|
||||
serviceName, regtype, replyDomain);
|
||||
#endif /* HAVE_DNSSD */
|
||||
|
||||
device = calloc(sizeof(cups_device_t), 1);
|
||||
device->name = strdup(serviceName);
|
||||
@@ -1102,7 +1112,7 @@ query_callback(
|
||||
datanext = data + datalen;
|
||||
|
||||
for (ptr = key; data < datanext && *data != '='; data ++)
|
||||
*ptr++ = *data;
|
||||
*ptr++ = (char)*data;
|
||||
*ptr = '\0';
|
||||
|
||||
if (data < datanext && *data == '=')
|
||||
@@ -1110,7 +1120,7 @@ query_callback(
|
||||
data ++;
|
||||
|
||||
if (data < datanext)
|
||||
memcpy(value, data, datanext - data);
|
||||
memcpy(value, data, (size_t)(datanext - data));
|
||||
value[datanext - data] = '\0';
|
||||
|
||||
fprintf(stderr, "DEBUG2: query_callback: \"%s=%s\".\n",
|
||||
@@ -1130,8 +1140,7 @@ query_callback(
|
||||
*/
|
||||
|
||||
ptr = device_id + strlen(device_id);
|
||||
snprintf(ptr, sizeof(device_id) - (ptr - device_id), "%s:%s;",
|
||||
key + 4, value);
|
||||
snprintf(ptr, sizeof(device_id) - (size_t)(ptr - device_id), "%s:%s;", key + 4, value);
|
||||
}
|
||||
|
||||
if (!_cups_strcasecmp(key, "usb_MFG") || !_cups_strcasecmp(key, "usb_MANU") ||
|
||||
@@ -1180,6 +1189,8 @@ query_callback(
|
||||
if (device->type == CUPS_DEVICE_PRINTER)
|
||||
device->sent = 1;
|
||||
}
|
||||
else if (!_cups_strcasecmp(key, "UUID"))
|
||||
device->uuid = strdup(value);
|
||||
}
|
||||
|
||||
if (device->device_id)
|
||||
@@ -1200,7 +1211,7 @@ query_callback(
|
||||
* Assume the first word is the make...
|
||||
*/
|
||||
|
||||
memcpy(make_and_model, model, ptr - model);
|
||||
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",
|
||||
@@ -1235,7 +1246,7 @@ query_callback(
|
||||
while (isalnum(*ptr & 255) || *ptr == '-' || *ptr == '.')
|
||||
{
|
||||
if (isalnum(*ptr & 255) && valptr < (value + sizeof(value) - 1))
|
||||
*valptr++ = toupper(*ptr++ & 255);
|
||||
*valptr++ = (char)toupper(*ptr++ & 255);
|
||||
else
|
||||
break;
|
||||
}
|
||||
@@ -1244,8 +1255,7 @@ query_callback(
|
||||
}
|
||||
|
||||
ptr = device_id + strlen(device_id);
|
||||
snprintf(ptr, sizeof(device_id) - (ptr - device_id), "CMD:%s;",
|
||||
value + 1);
|
||||
snprintf(ptr, sizeof(device_id) - (size_t)(ptr - device_id), "CMD:%s;", value + 1);
|
||||
}
|
||||
|
||||
if (device_id[0])
|
||||
@@ -1320,5 +1330,5 @@ unquote(char *dst, /* I - Destination buffer */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: dnssd.c 11969 2014-06-30 14:27:01Z msweet $".
|
||||
*/
|
||||
|
||||
+18
-30
@@ -1,24 +1,18 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: ieee1284.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
*
|
||||
* IEEE-1284 support functions for CUPS.
|
||||
* IEEE-1284 support functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2011 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
* 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"
|
||||
* "LICENSE" which should have been included with this file. If this
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* "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:
|
||||
*
|
||||
* backendGetDeviceID() - Get the IEEE-1284 device ID string and
|
||||
* corresponding URI.
|
||||
* backendGetMakeModel() - Get the make and model string from the device ID.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -26,7 +20,6 @@
|
||||
*/
|
||||
|
||||
#include "backend-private.h"
|
||||
#include <cups/cups-private.h>
|
||||
|
||||
|
||||
/*
|
||||
@@ -148,8 +141,7 @@ backendGetDeviceID(
|
||||
* Read the 1284 device ID...
|
||||
*/
|
||||
|
||||
if ((length = read(devparportfd, device_id,
|
||||
device_id_size - 1)) >= 2)
|
||||
if ((length = read(devparportfd, device_id, (size_t)device_id_size - 1)) >= 2)
|
||||
{
|
||||
device_id[length] = '\0';
|
||||
got_id = 1;
|
||||
@@ -178,8 +170,7 @@ backendGetDeviceID(
|
||||
* bytes. The 1284 spec says the length is stored MSB first...
|
||||
*/
|
||||
|
||||
length = (((unsigned)device_id[0] & 255) << 8) +
|
||||
((unsigned)device_id[1] & 255);
|
||||
length = (int)((((unsigned)device_id[0] & 255) << 8) + ((unsigned)device_id[1] & 255));
|
||||
|
||||
/*
|
||||
* Check to see if the length is larger than our buffer; first
|
||||
@@ -188,8 +179,7 @@ backendGetDeviceID(
|
||||
*/
|
||||
|
||||
if (length > device_id_size || length < 14)
|
||||
length = (((unsigned)device_id[1] & 255) << 8) +
|
||||
((unsigned)device_id[0] & 255);
|
||||
length = (int)((((unsigned)device_id[1] & 255) << 8) + ((unsigned)device_id[0] & 255));
|
||||
|
||||
if (length > device_id_size)
|
||||
length = device_id_size;
|
||||
@@ -221,7 +211,7 @@ backendGetDeviceID(
|
||||
|
||||
length -= 2;
|
||||
|
||||
memmove(device_id, device_id + 2, length);
|
||||
memmove(device_id, device_id + 2, (size_t)length);
|
||||
device_id[length] = '\0';
|
||||
}
|
||||
}
|
||||
@@ -287,7 +277,7 @@ backendGetDeviceID(
|
||||
*/
|
||||
|
||||
if (make_model)
|
||||
backendGetMakeModel(device_id, make_model, make_model_size);
|
||||
backendGetMakeModel(device_id, make_model, (size_t)make_model_size);
|
||||
|
||||
/*
|
||||
* Then generate a device URI...
|
||||
@@ -372,7 +362,7 @@ int /* O - 0 on success, -1 on failure */
|
||||
backendGetMakeModel(
|
||||
const char *device_id, /* O - 1284 device ID */
|
||||
char *make_model, /* O - Make/model */
|
||||
int make_model_size) /* I - Size of buffer */
|
||||
size_t make_model_size) /* I - Size of buffer */
|
||||
{
|
||||
int num_values; /* Number of keys and values */
|
||||
cups_option_t *values; /* Keys and values */
|
||||
@@ -381,9 +371,7 @@ backendGetMakeModel(
|
||||
*des; /* Description string */
|
||||
|
||||
|
||||
DEBUG_printf(("backendGetMakeModel(device_id=\"%s\", "
|
||||
"make_model=%p, make_model_size=%d)\n", device_id,
|
||||
make_model, make_model_size));
|
||||
DEBUG_printf(("backendGetMakeModel(device_id=\"%s\", make_model=%p, make_model_size=" CUPS_LLFMT ")\n", device_id, make_model, CUPS_LLCAST make_model_size));
|
||||
|
||||
/*
|
||||
* Range check input...
|
||||
@@ -487,5 +475,5 @@ backendGetMakeModel(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: ieee1284.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
*/
|
||||
|
||||
+210
-133
@@ -1,36 +1,18 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: ipp.c 12048 2014-07-18 14:26:14Z msweet $"
|
||||
*
|
||||
* IPP backend for CUPS.
|
||||
* IPP backend for CUPS.
|
||||
*
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
* 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"
|
||||
* "LICENSE" which should have been included with this file. If this
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* "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() - Send a file to the printer or server.
|
||||
* cancel_job() - Cancel a print job.
|
||||
* check_printer_state() - Check the printer state.
|
||||
* monitor_printer() - Monitor the printer state.
|
||||
* new_request() - Create a new print creation or validation
|
||||
* request.
|
||||
* password_cb() - Disable the password prompt for
|
||||
* cupsDoFileRequest().
|
||||
* quote_string() - Quote a string value.
|
||||
* report_attr() - Report an IPP attribute value.
|
||||
* report_printer_state() - Report the printer state.
|
||||
* run_as_user() - Run the IPP backend as the printing user.
|
||||
* sigterm_handler() - Handle 'terminate' signals that stop the backend.
|
||||
* timeout_cb() - Handle HTTP timeouts.
|
||||
* update_reasons() - Update the printer-state-reasons values.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -97,7 +79,7 @@ typedef struct _cups_monitor_s /**** Monitoring data ****/
|
||||
static const char *auth_info_required;
|
||||
/* New auth-info-required value */
|
||||
#if defined(HAVE_GSSAPI) && defined(HAVE_XPC)
|
||||
static int child_pid = 0; /* Child process ID */
|
||||
static pid_t child_pid = 0; /* Child process ID */
|
||||
#endif /* HAVE_GSSAPI && HAVE_XPC */
|
||||
static const char * const jattrs[] = /* Job attributes we want */
|
||||
{
|
||||
@@ -109,8 +91,10 @@ static const char * const jattrs[] = /* Job attributes we want */
|
||||
"job-state",
|
||||
"job-state-reasons"
|
||||
};
|
||||
static int job_canceled = 0;
|
||||
static int job_canceled = 0,
|
||||
/* Job cancelled? */
|
||||
uri_credentials = 0;
|
||||
/* Credentials supplied in URI? */
|
||||
static char username[256] = "",
|
||||
/* Username for device URI */
|
||||
*password = NULL;
|
||||
@@ -133,6 +117,7 @@ static const char * const pattrs[] = /* Printer attributes we want */
|
||||
"media-col-supported",
|
||||
"multiple-document-handling-supported",
|
||||
"operations-supported",
|
||||
"print-color-mode-supported",
|
||||
"printer-alert",
|
||||
"printer-alert-description",
|
||||
"printer-is-accepting-jobs",
|
||||
@@ -180,7 +165,7 @@ static ipp_t *new_request(ipp_op_t op, int version, const char *uri,
|
||||
ppd_file_t *ppd,
|
||||
ipp_attribute_t *media_col_sup,
|
||||
ipp_attribute_t *doc_handling_sup,
|
||||
int print_color_mode);
|
||||
ipp_attribute_t *print_color_mode_sup);
|
||||
static const char *password_cb(const char *prompt, http_t *http,
|
||||
const char *method, const char *resource,
|
||||
int *user_data);
|
||||
@@ -267,12 +252,12 @@ main(int argc, /* I - Number of command-line args */
|
||||
ipp_attribute_t *doc_handling_sup; /* multiple-document-handling-supported */
|
||||
ipp_attribute_t *printer_state; /* printer-state attribute */
|
||||
ipp_attribute_t *printer_accepting; /* printer-is-accepting-jobs */
|
||||
ipp_attribute_t *print_color_mode_sup;/* Does printer support print-color-mode? */
|
||||
int create_job = 0, /* Does printer support Create-Job? */
|
||||
get_job_attrs = 0, /* Does printer support Get-Job-Attributes? */
|
||||
send_document = 0, /* Does printer support Send-Document? */
|
||||
validate_job = 0, /* Does printer support Validate-Job? */
|
||||
print_color_mode = 0; /* Does printer support print-color-mode? */
|
||||
int copies, /* Number of copies for job */
|
||||
copies, /* Number of copies for job */
|
||||
copies_remaining; /* Number of copies remaining */
|
||||
const char *content_type, /* CONTENT_TYPE environment variable */
|
||||
*final_content_type, /* FINAL_CONTENT_TYPE environment var */
|
||||
@@ -543,8 +528,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
*/
|
||||
|
||||
snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") ||
|
||||
_cups_strcasecmp(value, "yes") ||
|
||||
_cups_strcasecmp(value, "true");
|
||||
!_cups_strcasecmp(value, "yes") ||
|
||||
!_cups_strcasecmp(value, "true");
|
||||
}
|
||||
else if (!_cups_strcasecmp(name, "version"))
|
||||
{
|
||||
@@ -647,6 +632,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
*password++ = '\0';
|
||||
|
||||
cupsSetUser(username);
|
||||
uri_credentials = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -696,6 +682,44 @@ main(int argc, /* I - Number of command-line args */
|
||||
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...
|
||||
*/
|
||||
@@ -802,7 +826,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(delay);
|
||||
sleep((unsigned)delay);
|
||||
|
||||
delay = _cupsNextDelay(delay, &prev_delay);
|
||||
}
|
||||
@@ -848,15 +872,16 @@ main(int argc, /* I - Number of command-line args */
|
||||
*/
|
||||
|
||||
#ifdef HAVE_LIBZ
|
||||
compression_sup = NULL;
|
||||
compression_sup = NULL;
|
||||
#endif /* HAVE_LIBZ */
|
||||
copies_sup = NULL;
|
||||
cups_version = NULL;
|
||||
format_sup = NULL;
|
||||
media_col_sup = NULL;
|
||||
supported = NULL;
|
||||
operations_sup = NULL;
|
||||
doc_handling_sup = NULL;
|
||||
copies_sup = NULL;
|
||||
cups_version = NULL;
|
||||
format_sup = NULL;
|
||||
media_col_sup = NULL;
|
||||
supported = NULL;
|
||||
operations_sup = NULL;
|
||||
doc_handling_sup = NULL;
|
||||
print_color_mode_sup = NULL;
|
||||
|
||||
do
|
||||
{
|
||||
@@ -871,9 +896,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
*/
|
||||
|
||||
request = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES);
|
||||
request->request.op.version[0] = version / 10;
|
||||
request->request.op.version[1] = version % 10;
|
||||
|
||||
ippSetVersion(request, version / 10, version % 10);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, uri);
|
||||
|
||||
@@ -922,7 +945,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
report_printer_state(supported);
|
||||
|
||||
sleep(delay);
|
||||
sleep((unsigned)delay);
|
||||
|
||||
delay = _cupsNextDelay(delay, &prev_delay);
|
||||
}
|
||||
@@ -1036,12 +1059,13 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
report_printer_state(supported);
|
||||
|
||||
sleep(delay);
|
||||
sleep((unsigned)delay);
|
||||
|
||||
delay = _cupsNextDelay(delay, &prev_delay);
|
||||
|
||||
ippDelete(supported);
|
||||
supported = NULL;
|
||||
supported = NULL;
|
||||
ipp_status = IPP_STATUS_ERROR_BUSY;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -1117,9 +1141,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
media_col_sup->values[i].string.text);
|
||||
}
|
||||
|
||||
print_color_mode = ippFindAttribute(supported,
|
||||
"print-color-mode-supported",
|
||||
IPP_TAG_KEYWORD) != NULL;
|
||||
print_color_mode_sup = ippFindAttribute(supported, "print-color-mode-supported", IPP_TAG_KEYWORD);
|
||||
|
||||
if ((operations_sup = ippFindAttribute(supported, "operations-supported",
|
||||
IPP_TAG_ENUM)) != NULL)
|
||||
@@ -1326,7 +1348,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
_cupsLangPrintFilter(stderr, "INFO", _("Copying print data."));
|
||||
|
||||
if ((compatsize = write(fd, buffer, bytes)) < 0)
|
||||
if ((compatsize = write(fd, buffer, (size_t)bytes)) < 0)
|
||||
{
|
||||
perror("DEBUG: Unable to write temporary file");
|
||||
return (CUPS_BACKEND_FAILED);
|
||||
@@ -1401,7 +1423,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
request = new_request(IPP_VALIDATE_JOB, version, uri, argv[2],
|
||||
monitor.job_name, num_options, options, compression,
|
||||
copies_sup ? copies : 1, document_format, pc, ppd,
|
||||
media_col_sup, doc_handling_sup, print_color_mode);
|
||||
media_col_sup, doc_handling_sup, print_color_mode_sup);
|
||||
|
||||
response = cupsDoRequest(http, request, resource);
|
||||
|
||||
@@ -1428,6 +1450,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
sleep(10);
|
||||
}
|
||||
else if (ipp_status == IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED ||
|
||||
ipp_status == IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES ||
|
||||
ipp_status == IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED ||
|
||||
ipp_status == IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED ||
|
||||
ipp_status == IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED ||
|
||||
@@ -1487,7 +1510,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
version, uri, argv[2], monitor.job_name, num_options,
|
||||
options, compression, copies_sup ? copies : 1,
|
||||
document_format, pc, ppd, media_col_sup,
|
||||
doc_handling_sup, print_color_mode);
|
||||
doc_handling_sup, print_color_mode_sup);
|
||||
|
||||
/*
|
||||
* Do the request...
|
||||
@@ -1524,7 +1547,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
else
|
||||
{
|
||||
fd = 0;
|
||||
http_status = cupsWriteRequestData(http, buffer, bytes);
|
||||
http_status = cupsWriteRequestData(http, buffer, (size_t)bytes);
|
||||
}
|
||||
|
||||
while (http_status == HTTP_CONTINUE &&
|
||||
@@ -1550,7 +1573,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Read %d bytes...\n", (int)bytes);
|
||||
|
||||
if ((http_status = cupsWriteRequestData(http, buffer, bytes))
|
||||
if ((http_status = cupsWriteRequestData(http, buffer, (size_t)bytes))
|
||||
!= HTTP_CONTINUE)
|
||||
break;
|
||||
}
|
||||
@@ -1686,8 +1709,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
*/
|
||||
|
||||
request = ippNewRequest(IPP_SEND_DOCUMENT);
|
||||
request->request.op.version[0] = version / 10;
|
||||
request->request.op.version[1] = version % 10;
|
||||
ippSetVersion(request, version / 10, version % 10);
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, uri);
|
||||
@@ -1720,7 +1742,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
if (num_files == 0)
|
||||
{
|
||||
fd = 0;
|
||||
http_status = cupsWriteRequestData(http, buffer, bytes);
|
||||
http_status = cupsWriteRequestData(http, buffer, (size_t)bytes);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1739,7 +1761,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
while (!job_canceled && http_status == HTTP_CONTINUE &&
|
||||
(bytes = read(fd, buffer, sizeof(buffer))) > 0)
|
||||
{
|
||||
if ((http_status = cupsWriteRequestData(http, buffer, bytes))
|
||||
if ((http_status = cupsWriteRequestData(http, buffer, (size_t)bytes))
|
||||
!= HTTP_CONTINUE)
|
||||
break;
|
||||
else
|
||||
@@ -1789,6 +1811,20 @@ main(int argc, /* I - Number of command-line args */
|
||||
fprintf(stderr, "PAGE: 1 %d\n", copies_sup ? atoi(argv[4]) : 1);
|
||||
copies_remaining --;
|
||||
}
|
||||
else if ((ipp_status == IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR || ipp_status == IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE) &&
|
||||
argc == 6 &&
|
||||
document_format && strcmp(document_format, "image/pwg-raster") && strcmp(document_format, "image/urf"))
|
||||
{
|
||||
/*
|
||||
* Need to reprocess the job as raster...
|
||||
*/
|
||||
|
||||
fputs("JOBSTATE: cups-retry-as-raster\n", stderr);
|
||||
if (job_id > 0)
|
||||
cancel_job(http, uri, job_id, resource, argv[2], version);
|
||||
|
||||
goto cleanup;
|
||||
}
|
||||
else if (ipp_status == IPP_SERVICE_UNAVAILABLE ||
|
||||
ipp_status == IPP_NOT_POSSIBLE ||
|
||||
ipp_status == IPP_PRINTER_BUSY)
|
||||
@@ -1872,6 +1908,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
if (!job_id || !waitjob || !get_job_attrs)
|
||||
continue;
|
||||
|
||||
fputs("STATE: +cups-waiting-for-job-completed\n", stderr);
|
||||
|
||||
_cupsLangPrintFilter(stderr, "INFO", _("Waiting for job to complete."));
|
||||
|
||||
for (delay = _cupsNextDelay(0, &prev_delay); !job_canceled;)
|
||||
@@ -1896,8 +1934,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
*/
|
||||
|
||||
request = ippNewRequest(IPP_GET_JOB_ATTRIBUTES);
|
||||
request->request.op.version[0] = version / 10;
|
||||
request->request.op.version[1] = version % 10;
|
||||
ippSetVersion(request, version / 10, version % 10);
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, uri);
|
||||
@@ -2022,7 +2059,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
* Wait before polling again...
|
||||
*/
|
||||
|
||||
sleep(delay);
|
||||
sleep((unsigned)delay);
|
||||
|
||||
delay = _cupsNextDelay(delay, &prev_delay);
|
||||
}
|
||||
@@ -2033,8 +2070,13 @@ main(int argc, /* I - Number of command-line args */
|
||||
*/
|
||||
|
||||
if (job_canceled > 0 && job_id > 0)
|
||||
{
|
||||
cancel_job(http, uri, job_id, resource, argv[2], version);
|
||||
|
||||
if (cupsLastError() > IPP_OK_CONFLICT)
|
||||
_cupsLangPrintFilter(stderr, "ERROR", _("Unable to cancel print job."));
|
||||
}
|
||||
|
||||
/*
|
||||
* Check the printer state and report it if necessary...
|
||||
*/
|
||||
@@ -2156,8 +2198,7 @@ cancel_job(http_t *http, /* I - HTTP connection */
|
||||
_cupsLangPrintFilter(stderr, "INFO", _("Canceling print job."));
|
||||
|
||||
request = ippNewRequest(IPP_CANCEL_JOB);
|
||||
request->request.op.version[0] = version / 10;
|
||||
request->request.op.version[1] = version % 10;
|
||||
ippSetVersion(request, version / 10, version % 10);
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, uri);
|
||||
@@ -2172,9 +2213,6 @@ cancel_job(http_t *http, /* I - HTTP connection */
|
||||
*/
|
||||
|
||||
ippDelete(cupsDoRequest(http, request, resource));
|
||||
|
||||
if (cupsLastError() > IPP_OK_CONFLICT)
|
||||
_cupsLangPrintFilter(stderr, "ERROR", _("Unable to cancel print job."));
|
||||
}
|
||||
|
||||
|
||||
@@ -2202,8 +2240,7 @@ check_printer_state(
|
||||
*/
|
||||
|
||||
request = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES);
|
||||
request->request.op.version[0] = version / 10;
|
||||
request->request.op.version[1] = version % 10;
|
||||
ippSetVersion(request, version / 10, version % 10);
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, uri);
|
||||
@@ -2306,8 +2343,7 @@ monitor_printer(
|
||||
job_op = (monitor->job_id > 0 && monitor->get_job_attrs) ?
|
||||
IPP_GET_JOB_ATTRIBUTES : IPP_GET_JOBS;
|
||||
request = ippNewRequest(job_op);
|
||||
request->request.op.version[0] = monitor->version / 10;
|
||||
request->request.op.version[1] = monitor->version % 10;
|
||||
ippSetVersion(request, monitor->version / 10, monitor->version % 10);
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, monitor->uri);
|
||||
@@ -2369,7 +2405,7 @@ monitor_printer(
|
||||
job_name = attr->values[0].string.text;
|
||||
else if (!strcmp(attr->name, "job-state") &&
|
||||
attr->value_tag == IPP_TAG_ENUM)
|
||||
job_state = attr->values[0].integer;
|
||||
job_state = (ipp_jstate_t)attr->values[0].integer;
|
||||
else if (!strcmp(attr->name, "job-originating-user-name") &&
|
||||
(attr->value_tag == IPP_TAG_NAME ||
|
||||
attr->value_tag == IPP_TAG_NAMELANG))
|
||||
@@ -2456,7 +2492,7 @@ monitor_printer(
|
||||
* Sleep for N seconds...
|
||||
*/
|
||||
|
||||
sleep(delay);
|
||||
sleep((unsigned)delay);
|
||||
|
||||
delay = _cupsNextDelay(delay, &prev_delay);
|
||||
}
|
||||
@@ -2466,10 +2502,17 @@ monitor_printer(
|
||||
*/
|
||||
|
||||
if (job_canceled > 0 && monitor->job_id > 0)
|
||||
{
|
||||
if (!httpReconnect(http))
|
||||
{
|
||||
cancel_job(http, monitor->uri, monitor->job_id, monitor->resource,
|
||||
monitor->user, monitor->version);
|
||||
|
||||
if (cupsLastError() > IPP_OK_CONFLICT)
|
||||
_cupsLangPrintFilter(stderr, "ERROR", _("Unable to cancel print job."));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Cleanup and return...
|
||||
*/
|
||||
@@ -2500,7 +2543,8 @@ new_request(
|
||||
ppd_file_t *ppd, /* I - PPD file data */
|
||||
ipp_attribute_t *media_col_sup, /* I - media-col-supported values */
|
||||
ipp_attribute_t *doc_handling_sup, /* I - multiple-document-handling-supported values */
|
||||
int print_color_mode) /* I - Printer supports print-color-mode */
|
||||
ipp_attribute_t *print_color_mode_sup)
|
||||
/* I - Printer supports print-color-mode */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
ipp_t *request; /* Request data */
|
||||
@@ -2522,9 +2566,8 @@ new_request(
|
||||
* Create the IPP request...
|
||||
*/
|
||||
|
||||
request = ippNewRequest(op);
|
||||
request->request.op.version[0] = version / 10;
|
||||
request->request.op.version[1] = version % 10;
|
||||
request = ippNewRequest(op);
|
||||
ippSetVersion(request, version / 10, version % 10);
|
||||
|
||||
fprintf(stderr, "DEBUG: %s IPP/%d.%d\n",
|
||||
ippOpString(request->request.op.operation_id),
|
||||
@@ -2591,8 +2634,7 @@ new_request(
|
||||
(keyword = cupsGetOption("job-password", num_options,
|
||||
options)) != NULL)
|
||||
{
|
||||
ippAddOctetString(request, IPP_TAG_OPERATION, "job-password",
|
||||
keyword, strlen(keyword));
|
||||
ippAddOctetString(request, IPP_TAG_OPERATION, "job-password", keyword, (int)strlen(keyword));
|
||||
|
||||
if ((keyword = cupsGetOption("job-password-encryption", num_options,
|
||||
options)) == NULL)
|
||||
@@ -2671,10 +2713,17 @@ new_request(
|
||||
}
|
||||
break;
|
||||
case IPP_TAG_STRING :
|
||||
ippAddOctetString(request, IPP_TAG_JOB, mandatory, keyword,
|
||||
strlen(keyword));
|
||||
ippAddOctetString(request, IPP_TAG_JOB, mandatory, keyword, (int)strlen(keyword));
|
||||
break;
|
||||
default :
|
||||
if (!strcmp(mandatory, "print-color-mode") && !strcmp(keyword, "monochrome"))
|
||||
{
|
||||
if (ippContainsString(print_color_mode_sup, "auto-monochrome"))
|
||||
keyword = "auto-monochrome";
|
||||
else if (ippContainsString(print_color_mode_sup, "process-monochrome") && !ippContainsString(print_color_mode_sup, "monochrome"))
|
||||
keyword = "process-monochrome";
|
||||
}
|
||||
|
||||
ippAddString(request, IPP_TAG_JOB, value_tag, mandatory,
|
||||
NULL, keyword);
|
||||
break;
|
||||
@@ -2749,21 +2798,31 @@ new_request(
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "output-bin",
|
||||
NULL, keyword);
|
||||
|
||||
color_attr_name = print_color_mode ? "print-color-mode" : "output-mode";
|
||||
color_attr_name = print_color_mode_sup ? "print-color-mode" : "output-mode";
|
||||
|
||||
if ((keyword = cupsGetOption("print-color-mode", num_options,
|
||||
options)) != NULL)
|
||||
options)) == NULL)
|
||||
{
|
||||
if ((choice = ppdFindMarkedChoice(ppd, "ColorModel")) != NULL)
|
||||
{
|
||||
if (!_cups_strcasecmp(choice->choice, "Gray"))
|
||||
keyword = "monochrome";
|
||||
else
|
||||
keyword = "color";
|
||||
}
|
||||
}
|
||||
|
||||
if (keyword && !strcmp(keyword, "monochrome"))
|
||||
{
|
||||
if (ippContainsString(print_color_mode_sup, "auto-monochrome"))
|
||||
keyword = "auto-monochrome";
|
||||
else if (ippContainsString(print_color_mode_sup, "process-monochrome") && !ippContainsString(print_color_mode_sup, "monochrome"))
|
||||
keyword = "process-monochrome";
|
||||
}
|
||||
|
||||
if (keyword)
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, color_attr_name,
|
||||
NULL, keyword);
|
||||
else if ((choice = ppdFindMarkedChoice(ppd, "ColorModel")) != NULL)
|
||||
{
|
||||
if (!_cups_strcasecmp(choice->choice, "Gray"))
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD,
|
||||
color_attr_name, NULL, "monochrome");
|
||||
else
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD,
|
||||
color_attr_name, NULL, "color");
|
||||
}
|
||||
|
||||
if ((keyword = cupsGetOption("print-quality", num_options,
|
||||
options)) != NULL)
|
||||
@@ -2876,19 +2935,39 @@ new_request(
|
||||
if ((keyword = cupsGetOption("phone", num_options, options)) != NULL)
|
||||
{
|
||||
ipp_t *destination; /* destination collection */
|
||||
char tel_uri[1024]; /* tel: URI */
|
||||
char phone[1024], /* Phone number string */
|
||||
*ptr, /* Pointer into string */
|
||||
tel_uri[1024]; /* tel: URI */
|
||||
static const char * const allowed = "0123456789#*-+.()";
|
||||
/* Allowed characters */
|
||||
|
||||
destination = ippNew();
|
||||
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, tel_uri, sizeof(tel_uri), "tel",
|
||||
NULL, NULL, 0, keyword);
|
||||
ippAddString(destination, IPP_TAG_JOB, IPP_TAG_URI, "destination-uri",
|
||||
NULL, tel_uri);
|
||||
/*
|
||||
* Unescape and filter out spaces and other characters that are not
|
||||
* allowed in a tel: URI.
|
||||
*/
|
||||
|
||||
_httpDecodeURI(phone, keyword, sizeof(phone));
|
||||
for (ptr = phone; *ptr;)
|
||||
{
|
||||
if (!strchr(allowed, *ptr))
|
||||
_cups_strcpy(ptr, ptr + 1);
|
||||
else
|
||||
ptr ++;
|
||||
}
|
||||
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, tel_uri, sizeof(tel_uri), "tel", NULL, NULL, 0, phone);
|
||||
ippAddString(destination, IPP_TAG_JOB, IPP_TAG_URI, "destination-uri", NULL, tel_uri);
|
||||
|
||||
if ((keyword = cupsGetOption("faxPrefix", num_options,
|
||||
options)) != NULL && *keyword)
|
||||
ippAddString(destination, IPP_TAG_JOB, IPP_TAG_TEXT,
|
||||
"pre-dial-string", NULL, keyword);
|
||||
{
|
||||
char predial[1024]; /* Pre-dial string */
|
||||
|
||||
_httpDecodeURI(predial, keyword, sizeof(predial));
|
||||
ippAddString(destination, IPP_TAG_JOB, IPP_TAG_TEXT, "pre-dial-string", NULL, predial);
|
||||
}
|
||||
|
||||
ippAddCollection(request, IPP_TAG_JOB, "destination-uris", destination);
|
||||
ippDelete(destination);
|
||||
@@ -2964,26 +3043,31 @@ password_cb(const char *prompt, /* I - Prompt (not used) */
|
||||
(void)method;
|
||||
(void)resource;
|
||||
|
||||
/*
|
||||
* Remember that we need to authenticate...
|
||||
*/
|
||||
|
||||
auth_info_required = "username,password";
|
||||
|
||||
if (httpGetSubField(http, HTTP_FIELD_WWW_AUTHENTICATE, "username",
|
||||
def_username))
|
||||
if (!uri_credentials)
|
||||
{
|
||||
char quoted[HTTP_MAX_VALUE * 2 + 4];
|
||||
/* Quoted string */
|
||||
/*
|
||||
* Remember that we need to authenticate...
|
||||
*/
|
||||
|
||||
fprintf(stderr, "ATTR: auth-info-default=%s,\n",
|
||||
quote_string(def_username, quoted, sizeof(quoted)));
|
||||
auth_info_required = "username,password";
|
||||
|
||||
if (httpGetSubField(http, HTTP_FIELD_WWW_AUTHENTICATE, "username",
|
||||
def_username))
|
||||
{
|
||||
char quoted[HTTP_MAX_VALUE * 2 + 4];
|
||||
/* Quoted string */
|
||||
|
||||
fprintf(stderr, "ATTR: auth-info-default=%s,\n",
|
||||
quote_string(def_username, quoted, sizeof(quoted)));
|
||||
}
|
||||
}
|
||||
|
||||
if (password && *password && *password_tries < 3)
|
||||
{
|
||||
(*password_tries) ++;
|
||||
|
||||
cupsSetUser(username);
|
||||
|
||||
return (password);
|
||||
}
|
||||
else
|
||||
@@ -3026,7 +3110,7 @@ quote_string(const char *s, /* I - String */
|
||||
{
|
||||
if (*s == '\\' || *s == '\"' || *s == '\'')
|
||||
{
|
||||
if (q < (qend - 3))
|
||||
if (qptr < (qend - 4))
|
||||
{
|
||||
*qptr++ = '\\';
|
||||
*qptr++ = '\\';
|
||||
@@ -3075,16 +3159,14 @@ report_attr(ipp_attribute_t *attr) /* I - Attribute */
|
||||
{
|
||||
case IPP_TAG_INTEGER :
|
||||
case IPP_TAG_ENUM :
|
||||
snprintf(valptr, sizeof(value) - (valptr - value), "%d",
|
||||
attr->values[i].integer);
|
||||
snprintf(valptr, sizeof(value) - (size_t)(valptr - value), "%d", attr->values[i].integer);
|
||||
valptr += strlen(valptr);
|
||||
break;
|
||||
|
||||
case IPP_TAG_TEXT :
|
||||
case IPP_TAG_NAME :
|
||||
case IPP_TAG_KEYWORD :
|
||||
quote_string(attr->values[i].string.text, valptr,
|
||||
value + sizeof(value) - valptr);
|
||||
quote_string(attr->values[i].string.text, valptr, (size_t)(value + sizeof(value) - valptr));
|
||||
valptr += strlen(valptr);
|
||||
break;
|
||||
|
||||
@@ -3335,12 +3417,12 @@ run_as_user(char *argv[], /* I - Command-line arguments */
|
||||
|
||||
if (response)
|
||||
{
|
||||
child_pid = xpc_dictionary_get_int64(response, "child-pid");
|
||||
child_pid = (pid_t)xpc_dictionary_get_int64(response, "child-pid");
|
||||
|
||||
xpc_release(response);
|
||||
|
||||
if (child_pid)
|
||||
fprintf(stderr, "DEBUG: Child PID=%d.\n", child_pid);
|
||||
fprintf(stderr, "DEBUG: Child PID=%d.\n", (int)child_pid);
|
||||
else
|
||||
{
|
||||
_cupsLangPrintFilter(stderr, "ERROR",
|
||||
@@ -3386,7 +3468,7 @@ run_as_user(char *argv[], /* I - Command-line arguments */
|
||||
|
||||
if (response)
|
||||
{
|
||||
status = xpc_dictionary_get_int64(response, "status");
|
||||
status = (int)xpc_dictionary_get_int64(response, "status");
|
||||
|
||||
if (status == SIGTERM || status == SIGKILL || status == SIGPIPE)
|
||||
{
|
||||
@@ -3585,8 +3667,7 @@ update_reasons(ipp_attribute_t *attr, /* I - printer-state-reasons or NULL */
|
||||
temp = (char *)cupsArrayNext(state_reasons))
|
||||
if (!strncmp(temp, "cups-remote-", 12))
|
||||
{
|
||||
snprintf(remptr, sizeof(rem) - (remptr - rem), "%s%s", remprefix,
|
||||
temp);
|
||||
snprintf(remptr, sizeof(rem) - (size_t)(remptr - rem), "%s%s", remprefix, temp);
|
||||
remptr += strlen(remptr);
|
||||
remprefix = ",";
|
||||
|
||||
@@ -3599,8 +3680,7 @@ update_reasons(ipp_attribute_t *attr, /* I - printer-state-reasons or NULL */
|
||||
|
||||
cupsArrayAdd(state_reasons, reason);
|
||||
|
||||
snprintf(addptr, sizeof(add) - (addptr - add), "%s%s", addprefix,
|
||||
reason);
|
||||
snprintf(addptr, sizeof(add) - (size_t)(addptr - add), "%s%s", addprefix, reason);
|
||||
addptr += strlen(addptr);
|
||||
addprefix = ",";
|
||||
}
|
||||
@@ -3618,8 +3698,7 @@ update_reasons(ipp_attribute_t *attr, /* I - printer-state-reasons or NULL */
|
||||
{
|
||||
if (cupsArrayFind(state_reasons, reason))
|
||||
{
|
||||
snprintf(remptr, sizeof(rem) - (remptr - rem), "%s%s", remprefix,
|
||||
reason);
|
||||
snprintf(remptr, sizeof(rem) - (size_t)(remptr - rem), "%s%s", remprefix, reason);
|
||||
remptr += strlen(remptr);
|
||||
remprefix = ",";
|
||||
|
||||
@@ -3639,8 +3718,7 @@ update_reasons(ipp_attribute_t *attr, /* I - printer-state-reasons or NULL */
|
||||
{
|
||||
if (strncmp(reason, "cups-", 5) && !cupsArrayFind(new_reasons, reason))
|
||||
{
|
||||
snprintf(remptr, sizeof(rem) - (remptr - rem), "%s%s", remprefix,
|
||||
reason);
|
||||
snprintf(remptr, sizeof(rem) - (size_t)(remptr - rem), "%s%s", remprefix, reason);
|
||||
remptr += strlen(remptr);
|
||||
remprefix = ",";
|
||||
|
||||
@@ -3656,8 +3734,7 @@ update_reasons(ipp_attribute_t *attr, /* I - printer-state-reasons or NULL */
|
||||
{
|
||||
cupsArrayAdd(state_reasons, reason);
|
||||
|
||||
snprintf(addptr, sizeof(add) - (addptr - add), "%s%s", addprefix,
|
||||
reason);
|
||||
snprintf(addptr, sizeof(add) - (size_t)(addptr - add), "%s%s", addprefix, reason);
|
||||
addptr += strlen(addptr);
|
||||
addprefix = ",";
|
||||
}
|
||||
@@ -3679,5 +3756,5 @@ update_reasons(ipp_attribute_t *attr, /* I - printer-state-reasons or NULL */
|
||||
}
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: ipp.c 12048 2014-07-18 14:26:14Z msweet $".
|
||||
*/
|
||||
|
||||
+47
-58
@@ -1,27 +1,18 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: lpd.c 12024 2014-07-15 12:58:39Z msweet $"
|
||||
*
|
||||
* Line Printer Daemon backend for CUPS.
|
||||
* Line Printer Daemon backend for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* "LICENSE" which should have been included with this file. If this
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* "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() - Send a file to the printer or server.
|
||||
* lpd_command() - Send an LPR command sequence and wait for a reply.
|
||||
* lpd_queue() - Queue a file using the Line Printer Daemon protocol.
|
||||
* lpd_write() - Write a buffer of data to an LPD server.
|
||||
* rresvport_af() - A simple implementation of rresvport_af().
|
||||
* sigterm_handler() - Handle 'terminate' signals that stop the backend.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -93,7 +84,7 @@ static int lpd_queue(const char *hostname, http_addrlist_t *addrlist,
|
||||
int copies, int banner, int format, int order,
|
||||
int reserve, int manual_copies, int timeout,
|
||||
int contimeout, const char *orighost);
|
||||
static int lpd_write(int lpd_fd, char *buffer, int length);
|
||||
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 */
|
||||
@@ -393,8 +384,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
*/
|
||||
|
||||
snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") ||
|
||||
_cups_strcasecmp(value, "yes") ||
|
||||
_cups_strcasecmp(value, "true");
|
||||
!_cups_strcasecmp(value, "yes") ||
|
||||
!_cups_strcasecmp(value, "true");
|
||||
}
|
||||
else if (!_cups_strcasecmp(name, "timeout"))
|
||||
{
|
||||
@@ -481,7 +472,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
_cupsLangPrintFilter(stderr, "INFO", _("Copying print data."));
|
||||
|
||||
if (bytes > 0)
|
||||
write(fd, buffer, bytes);
|
||||
write(fd, buffer, (size_t)bytes);
|
||||
|
||||
backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, 0,
|
||||
backendNetworkSideCB);
|
||||
@@ -592,7 +583,7 @@ lpd_command(int fd, /* I - Socket connection to LPD host */
|
||||
{
|
||||
va_list ap; /* Argument pointer */
|
||||
char buf[1024]; /* Output buffer */
|
||||
int bytes; /* Number of bytes to output */
|
||||
ssize_t bytes; /* Number of bytes to output */
|
||||
char status; /* Status from command */
|
||||
|
||||
|
||||
@@ -617,9 +608,9 @@ lpd_command(int fd, /* I - Socket connection to LPD host */
|
||||
* Send the command...
|
||||
*/
|
||||
|
||||
fprintf(stderr, "DEBUG: Sending command string (%d bytes)...\n", bytes);
|
||||
fprintf(stderr, "DEBUG: Sending command string (" CUPS_LLFMT " bytes)...\n", CUPS_LLCAST bytes);
|
||||
|
||||
if (lpd_write(fd, buf, bytes) < bytes)
|
||||
if (lpd_write(fd, buf, (size_t)bytes) < bytes)
|
||||
{
|
||||
perror("DEBUG: Unable to send LPD command");
|
||||
return (-1);
|
||||
@@ -634,7 +625,7 @@ lpd_command(int fd, /* I - Socket connection to LPD host */
|
||||
if (recv(fd, &status, 1, 0) < 1)
|
||||
{
|
||||
_cupsLangPrintFilter(stderr, "WARNING", _("The printer did not respond."));
|
||||
status = errno;
|
||||
status = (char)errno;
|
||||
}
|
||||
|
||||
fprintf(stderr, "DEBUG: lpd_command returning %d\n", status);
|
||||
@@ -680,7 +671,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
int have_supplies; /* Printer supports supply levels? */
|
||||
int copy; /* Copies written */
|
||||
time_t start_time; /* Time of first connect */
|
||||
size_t nbytes; /* Number of bytes written */
|
||||
ssize_t nbytes; /* Number of bytes written */
|
||||
off_t tbytes; /* Total bytes written */
|
||||
char buffer[32768]; /* Output buffer */
|
||||
#ifdef WIN32
|
||||
@@ -782,7 +773,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
return (CUPS_BACKEND_FAILED);
|
||||
}
|
||||
|
||||
if (!connect(fd, &(addr->addr.addr), httpAddrLength(&(addr->addr))))
|
||||
if (!connect(fd, &(addr->addr.addr), (socklen_t)httpAddrLength(&(addr->addr))))
|
||||
break;
|
||||
|
||||
error = errno;
|
||||
@@ -846,7 +837,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(delay);
|
||||
sleep((unsigned)delay);
|
||||
|
||||
if (delay < 30)
|
||||
delay += 5;
|
||||
@@ -967,7 +958,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
|
||||
if (banner)
|
||||
{
|
||||
snprintf(cptr, sizeof(control) - (cptr - control),
|
||||
snprintf(cptr, sizeof(control) - (size_t)(cptr - control),
|
||||
"C%.31s\n" /* RFC 1179, Section 7.2 - class name <= 31 chars */
|
||||
"L%s\n",
|
||||
localhost, user);
|
||||
@@ -976,13 +967,13 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
|
||||
while (copies > 0)
|
||||
{
|
||||
snprintf(cptr, sizeof(control) - (cptr - control), "%cdfA%03d%.15s\n",
|
||||
snprintf(cptr, sizeof(control) - (size_t)(cptr - control), "%cdfA%03d%.15s\n",
|
||||
format, (int)getpid() % 1000, localhost);
|
||||
cptr += strlen(cptr);
|
||||
copies --;
|
||||
}
|
||||
|
||||
snprintf(cptr, sizeof(control) - (cptr - control),
|
||||
snprintf(cptr, sizeof(control) - (size_t)(cptr - control),
|
||||
"UdfA%03d%.15s\n"
|
||||
"N%.131s\n", /* RFC 1179, Section 7.2 - sourcefile name <= 131 chars */
|
||||
(int)getpid() % 1000, localhost, title);
|
||||
@@ -1012,9 +1003,9 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
fprintf(stderr, "DEBUG: Sending control file (%u bytes)\n",
|
||||
(unsigned)strlen(control));
|
||||
|
||||
if (lpd_write(fd, control, strlen(control) + 1) < (strlen(control) + 1))
|
||||
if ((size_t)lpd_write(fd, control, strlen(control) + 1) < (strlen(control) + 1))
|
||||
{
|
||||
status = errno;
|
||||
status = (char)errno;
|
||||
perror("DEBUG: Unable to write control file");
|
||||
|
||||
}
|
||||
@@ -1024,7 +1015,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
{
|
||||
_cupsLangPrintFilter(stderr, "WARNING",
|
||||
_("The printer did not respond."));
|
||||
status = errno;
|
||||
status = (char)errno;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1074,7 +1065,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
_("Spooling job, %.0f%% complete."),
|
||||
100.0 * tbytes / filestats.st_size);
|
||||
|
||||
if (lpd_write(fd, buffer, nbytes) < nbytes)
|
||||
if (lpd_write(fd, buffer, (size_t)nbytes) < nbytes)
|
||||
{
|
||||
perror("DEBUG: Unable to send print file to printer");
|
||||
break;
|
||||
@@ -1087,11 +1078,11 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
if (mode == MODE_STANDARD)
|
||||
{
|
||||
if (tbytes < filestats.st_size)
|
||||
status = errno;
|
||||
status = (char)errno;
|
||||
else if (lpd_write(fd, "", 1) < 1)
|
||||
{
|
||||
perror("DEBUG: Unable to send trailing nul to printer");
|
||||
status = errno;
|
||||
status = (char)errno;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1145,9 +1136,9 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
fprintf(stderr, "DEBUG: Sending control file (%lu bytes)\n",
|
||||
(unsigned long)strlen(control));
|
||||
|
||||
if (lpd_write(fd, control, strlen(control) + 1) < (strlen(control) + 1))
|
||||
if ((size_t)lpd_write(fd, control, strlen(control) + 1) < (strlen(control) + 1))
|
||||
{
|
||||
status = errno;
|
||||
status = (char)errno;
|
||||
perror("DEBUG: Unable to write control file");
|
||||
}
|
||||
else
|
||||
@@ -1156,7 +1147,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
{
|
||||
_cupsLangPrintFilter(stderr, "WARNING",
|
||||
_("The printer did not respond."));
|
||||
status = errno;
|
||||
status = (char)errno;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1169,6 +1160,8 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
_("Control file sent successfully."));
|
||||
}
|
||||
|
||||
fputs("STATE: +cups-waiting-for-job-completed\n", stderr);
|
||||
|
||||
/*
|
||||
* Collect the final supply levels as needed...
|
||||
*/
|
||||
@@ -1204,32 +1197,32 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
* 'lpd_write()' - Write a buffer of data to an LPD server.
|
||||
*/
|
||||
|
||||
static int /* O - Number of bytes written or -1 on error */
|
||||
lpd_write(int lpd_fd, /* I - LPD socket */
|
||||
char *buffer, /* I - Buffer to write */
|
||||
int length) /* I - Number of bytes to write */
|
||||
static ssize_t /* O - Number of bytes written or -1 on error */
|
||||
lpd_write(int lpd_fd, /* I - LPD socket */
|
||||
char *buffer, /* I - Buffer to write */
|
||||
size_t length) /* I - Number of bytes to write */
|
||||
{
|
||||
int bytes, /* Number of bytes written */
|
||||
total; /* Total number of bytes written */
|
||||
ssize_t bytes, /* Number of bytes written */
|
||||
total; /* Total number of bytes written */
|
||||
|
||||
|
||||
if (abort_job)
|
||||
return (-1);
|
||||
|
||||
total = 0;
|
||||
while ((bytes = send(lpd_fd, buffer, length - total, 0)) >= 0)
|
||||
while ((bytes = send(lpd_fd, buffer, length - (size_t)total, 0)) >= 0)
|
||||
{
|
||||
total += bytes;
|
||||
buffer += bytes;
|
||||
|
||||
if (total == length)
|
||||
if ((size_t)total == length)
|
||||
break;
|
||||
}
|
||||
|
||||
if (bytes < 0)
|
||||
return (-1);
|
||||
else
|
||||
return (length);
|
||||
return (total);
|
||||
}
|
||||
|
||||
|
||||
@@ -1276,7 +1269,7 @@ rresvport_af(int *port, /* IO - Port number to bind to */
|
||||
* Try binding the port to the socket; return if all is OK...
|
||||
*/
|
||||
|
||||
if (!bind(fd, (struct sockaddr *)&addr, sizeof(addr)))
|
||||
if (!bind(fd, (struct sockaddr *)&addr, httpAddrLength(&addr)))
|
||||
return (fd);
|
||||
|
||||
/*
|
||||
@@ -1285,11 +1278,7 @@ rresvport_af(int *port, /* IO - Port number to bind to */
|
||||
|
||||
if (errno != EADDRINUSE)
|
||||
{
|
||||
# ifdef WIN32
|
||||
closesocket(fd);
|
||||
# else
|
||||
close(fd);
|
||||
# endif /* WIN32 */
|
||||
httpAddrClose(NULL, fd);
|
||||
|
||||
return (-1);
|
||||
}
|
||||
@@ -1331,5 +1320,5 @@ sigterm_handler(int sig) /* I - Signal */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: lpd.c 12024 2014-07-15 12:58:39Z msweet $".
|
||||
*/
|
||||
|
||||
+39
-57
@@ -1,23 +1,18 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: network.c 11970 2014-07-01 14:35:25Z msweet $"
|
||||
*
|
||||
* Common backend network APIs for CUPS.
|
||||
* Common backend network APIs for CUPS.
|
||||
*
|
||||
* Copyright 2007-2011 by Apple Inc.
|
||||
* Copyright 2006-2007 by Easy Software Products, all rights reserved.
|
||||
* 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
|
||||
* 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/".
|
||||
* 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:
|
||||
*
|
||||
* backendCheckSideChannel() - Check the side-channel for pending requests.
|
||||
* backendNetworkSideCB() - Handle common network side-channel commands.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -26,11 +21,7 @@
|
||||
|
||||
#include "backend-private.h"
|
||||
#include <limits.h>
|
||||
#ifdef __hpux
|
||||
# include <sys/time.h>
|
||||
#else
|
||||
# include <sys/select.h>
|
||||
#endif /* __hpux */
|
||||
#include <sys/select.h>
|
||||
|
||||
|
||||
/*
|
||||
@@ -100,7 +91,7 @@ backendNetworkSideCB(
|
||||
|
||||
case CUPS_SC_CMD_GET_BIDI :
|
||||
status = CUPS_SC_STATUS_OK;
|
||||
data[0] = use_bc;
|
||||
data[0] = (char)use_bc;
|
||||
datalen = 1;
|
||||
break;
|
||||
|
||||
@@ -139,13 +130,13 @@ backendNetworkSideCB(
|
||||
for (dataptr = data + strlen(data) + 1;
|
||||
count > 0 && dataptr < (data + sizeof(data) - 1);
|
||||
count --, dataptr += strlen(dataptr))
|
||||
strlcpy(dataptr, snmp_value, sizeof(data) - (dataptr - data));
|
||||
strlcpy(dataptr, snmp_value, sizeof(data) - (size_t)(dataptr - data));
|
||||
|
||||
fprintf(stderr, "DEBUG: Returning %s %s\n", data,
|
||||
data + strlen(data) + 1);
|
||||
|
||||
status = CUPS_SC_STATUS_OK;
|
||||
datalen = dataptr - data;
|
||||
datalen = (int)(dataptr - data);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -168,7 +159,7 @@ backendNetworkSideCB(
|
||||
{
|
||||
if (_cupsSNMPRead(snmp_fd, &packet, 1.0))
|
||||
{
|
||||
int i; /* Looping var */
|
||||
size_t i; /* Looping var */
|
||||
|
||||
|
||||
if (!_cupsSNMPOIDToString(packet.object_name, data, sizeof(data)))
|
||||
@@ -183,26 +174,22 @@ backendNetworkSideCB(
|
||||
switch (packet.object_type)
|
||||
{
|
||||
case CUPS_ASN1_BOOLEAN :
|
||||
snprintf(dataptr, sizeof(data) - (dataptr - data), "%d",
|
||||
packet.object_value.boolean);
|
||||
datalen += (int)strlen(dataptr);
|
||||
snprintf(dataptr, sizeof(data) - (size_t)(dataptr - data), "%d", packet.object_value.boolean);
|
||||
datalen += strlen(dataptr);
|
||||
break;
|
||||
|
||||
case CUPS_ASN1_INTEGER :
|
||||
snprintf(dataptr, sizeof(data) - (dataptr - data), "%d",
|
||||
snprintf(dataptr, sizeof(data) - (size_t)(dataptr - data), "%d",
|
||||
packet.object_value.integer);
|
||||
datalen += (int)strlen(dataptr);
|
||||
datalen += strlen(dataptr);
|
||||
break;
|
||||
|
||||
case CUPS_ASN1_BIT_STRING :
|
||||
case CUPS_ASN1_OCTET_STRING :
|
||||
if (packet.object_value.string.num_bytes < 0)
|
||||
i = 0;
|
||||
else if (packet.object_value.string.num_bytes <
|
||||
(sizeof(data) - (dataptr - data)))
|
||||
if (packet.object_value.string.num_bytes < (sizeof(data) - (size_t)(dataptr - data)))
|
||||
i = packet.object_value.string.num_bytes;
|
||||
else
|
||||
i = (int)(sizeof(data) - (dataptr - data));
|
||||
i = sizeof(data) - (size_t)(dataptr - data);
|
||||
|
||||
memcpy(dataptr, packet.object_value.string.bytes, i);
|
||||
|
||||
@@ -211,8 +198,8 @@ backendNetworkSideCB(
|
||||
|
||||
case CUPS_ASN1_OID :
|
||||
_cupsSNMPOIDToString(packet.object_value.oid, dataptr,
|
||||
sizeof(data) - (dataptr - data));
|
||||
datalen += (int)strlen(dataptr);
|
||||
sizeof(data) - (size_t)(dataptr - data));
|
||||
datalen += strlen(dataptr);
|
||||
break;
|
||||
|
||||
case CUPS_ASN1_HEX_STRING :
|
||||
@@ -220,32 +207,27 @@ backendNetworkSideCB(
|
||||
i < packet.object_value.string.num_bytes &&
|
||||
dataptr < (data + sizeof(data) - 3);
|
||||
i ++, dataptr += 2)
|
||||
sprintf(dataptr, "%02X",
|
||||
packet.object_value.string.bytes[i]);
|
||||
datalen += (int)strlen(dataptr);
|
||||
sprintf(dataptr, "%02X", packet.object_value.string.bytes[i]);
|
||||
datalen += strlen(dataptr);
|
||||
break;
|
||||
|
||||
case CUPS_ASN1_COUNTER :
|
||||
snprintf(dataptr, sizeof(data) - (dataptr - data), "%d",
|
||||
packet.object_value.counter);
|
||||
datalen += (int)strlen(dataptr);
|
||||
snprintf(dataptr, sizeof(data) - (size_t)(dataptr - data), "%u", packet.object_value.counter);
|
||||
datalen += strlen(dataptr);
|
||||
break;
|
||||
|
||||
case CUPS_ASN1_GAUGE :
|
||||
snprintf(dataptr, sizeof(data) - (dataptr - data), "%u",
|
||||
packet.object_value.gauge);
|
||||
datalen += (int)strlen(dataptr);
|
||||
snprintf(dataptr, sizeof(data) - (size_t)(dataptr - data), "%u", packet.object_value.gauge);
|
||||
datalen += strlen(dataptr);
|
||||
break;
|
||||
|
||||
case CUPS_ASN1_TIMETICKS :
|
||||
snprintf(dataptr, sizeof(data) - (dataptr - data), "%u",
|
||||
packet.object_value.timeticks);
|
||||
datalen += (int)strlen(dataptr);
|
||||
snprintf(dataptr, sizeof(data) - (size_t)(dataptr - data), "%u", packet.object_value.timeticks);
|
||||
datalen += strlen(dataptr);
|
||||
break;
|
||||
|
||||
default :
|
||||
fprintf(stderr, "DEBUG: Unknown OID value type %02X!\n",
|
||||
packet.object_type);
|
||||
fprintf(stderr, "DEBUG: Unknown OID value type %02X.\n", packet.object_type);
|
||||
|
||||
case CUPS_ASN1_NULL_VALUE :
|
||||
dataptr[0] = '\0';
|
||||
@@ -268,6 +250,12 @@ backendNetworkSideCB(
|
||||
datalen = 0;
|
||||
break;
|
||||
|
||||
case CUPS_SC_CMD_GET_CONNECTED :
|
||||
status = CUPS_SC_STATUS_OK;
|
||||
data[0] = device_fd != -1;
|
||||
datalen = 1;
|
||||
break;
|
||||
|
||||
case CUPS_SC_CMD_GET_DEVICE_ID :
|
||||
if (snmp_fd >= 0)
|
||||
{
|
||||
@@ -305,12 +293,6 @@ backendNetworkSideCB(
|
||||
break;
|
||||
}
|
||||
|
||||
case CUPS_SC_CMD_GET_CONNECTED :
|
||||
status = CUPS_SC_STATUS_OK;
|
||||
data[0] = device_fd != -1;
|
||||
datalen = 1;
|
||||
break;
|
||||
|
||||
default :
|
||||
status = CUPS_SC_STATUS_NOT_IMPLEMENTED;
|
||||
datalen = 0;
|
||||
@@ -322,5 +304,5 @@ backendNetworkSideCB(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: network.c 11970 2014-07-01 14:35:25Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -212,3 +212,6 @@
|
||||
|
||||
# Lexmark E238 (<rdar://problem/14493054>)
|
||||
0x043d 0x00d7 no-reattach
|
||||
|
||||
# Lexmark E238 (STR #4448)
|
||||
0x043d 0x009a no-reattach
|
||||
|
||||
+15
-26
@@ -1,25 +1,18 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: runloop.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Common run loop APIs for CUPS backends.
|
||||
* Common run loop APIs for CUPS backends.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 2006-2007 by Easy Software Products, all rights reserved.
|
||||
* 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
|
||||
* 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/".
|
||||
* 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:
|
||||
*
|
||||
* backendDrainOutput() - Drain pending print data to the device.
|
||||
* backendRunLoop() - Read and write print and back-channel data.
|
||||
* backendWaitLoop() - Wait for input from stdin while handling
|
||||
* side-channel queries.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -28,11 +21,7 @@
|
||||
|
||||
#include "backend-private.h"
|
||||
#include <limits.h>
|
||||
#ifdef __hpux
|
||||
# include <sys/time.h>
|
||||
#else
|
||||
# include <sys/select.h>
|
||||
#endif /* __hpux */
|
||||
#include <sys/select.h>
|
||||
|
||||
|
||||
/*
|
||||
@@ -113,7 +102,7 @@ backendDrainOutput(int print_fd, /* I - Print file descriptor */
|
||||
|
||||
for (print_ptr = print_buffer; print_bytes > 0;)
|
||||
{
|
||||
if ((bytes = write(device_fd, print_ptr, print_bytes)) < 0)
|
||||
if ((bytes = write(device_fd, print_ptr, (size_t)print_bytes)) < 0)
|
||||
{
|
||||
/*
|
||||
* Write error - bail if we don't see an error we can retry...
|
||||
@@ -293,7 +282,7 @@ backendRunLoop(
|
||||
fprintf(stderr,
|
||||
"DEBUG: Received " CUPS_LLFMT " bytes of back-channel data\n",
|
||||
CUPS_LLCAST bc_bytes);
|
||||
cupsBackChannelWrite(bc_buffer, bc_bytes, 1.0);
|
||||
cupsBackChannelWrite(bc_buffer, (size_t)bc_bytes, 1.0);
|
||||
}
|
||||
else if (bc_bytes < 0 && errno != EAGAIN && errno != EINTR)
|
||||
{
|
||||
@@ -350,7 +339,7 @@ backendRunLoop(
|
||||
|
||||
if (print_bytes && FD_ISSET(device_fd, &output))
|
||||
{
|
||||
if ((bytes = write(device_fd, print_ptr, print_bytes)) < 0)
|
||||
if ((bytes = write(device_fd, print_ptr, (size_t)print_bytes)) < 0)
|
||||
{
|
||||
/*
|
||||
* Write error - bail if we don't see an error we can retry...
|
||||
@@ -539,5 +528,5 @@ backendWaitLoop(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: runloop.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+56
-33
@@ -1,24 +1,17 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: snmp-supplies.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* SNMP supplies functions for CUPS.
|
||||
* SNMP supplies functions for CUPS.
|
||||
*
|
||||
* Copyright 2008-2012 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
|
||||
* 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/".
|
||||
* 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:
|
||||
*
|
||||
* backendSNMPSupplies() - Get the current supplies for a device.
|
||||
* backend_init_supplies() - Initialize the supplies list.
|
||||
* backend_walk_cb() - Interpret the supply value responses.
|
||||
* utf16_to_utf8() - Convert UTF-16 text to UTF-8.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -62,6 +55,7 @@ typedef struct /**** Printer supply data ****/
|
||||
char name[CUPS_SNMP_MAX_STRING], /* Name of supply */
|
||||
color[8]; /* Color: "#RRGGBB" or "none" */
|
||||
int colorant, /* Colorant index */
|
||||
sclass, /* Supply class */
|
||||
type, /* Supply type */
|
||||
max_capacity, /* Maximum capacity */
|
||||
level; /* Current level value */
|
||||
@@ -148,6 +142,13 @@ static const int prtMarkerSuppliesMaxCapacity[] =
|
||||
(sizeof(prtMarkerSuppliesMaxCapacity) /
|
||||
sizeof(prtMarkerSuppliesMaxCapacity[0]));
|
||||
/* Offset to supply index */
|
||||
static const int prtMarkerSuppliesClass[] =
|
||||
{ CUPS_OID_prtMarkerSuppliesClass, -1 },
|
||||
/* Class OID */
|
||||
prtMarkerSuppliesClassOffset =
|
||||
(sizeof(prtMarkerSuppliesClass) /
|
||||
sizeof(prtMarkerSuppliesClass[0]));
|
||||
/* Offset to supply index */
|
||||
static const int prtMarkerSuppliesType[] =
|
||||
{ CUPS_OID_prtMarkerSuppliesType, -1 },
|
||||
/* Type OID */
|
||||
@@ -257,6 +258,9 @@ backendSNMPSupplies(
|
||||
else
|
||||
percent = 50;
|
||||
|
||||
if (supplies[i].sclass == CUPS_TC_receptacleThatIsFilled)
|
||||
percent = 100 - percent;
|
||||
|
||||
if (percent <= 5)
|
||||
{
|
||||
switch (supplies[i].type)
|
||||
@@ -318,9 +322,9 @@ backendSNMPSupplies(
|
||||
|
||||
if ((supplies[i].max_capacity > 0 || (quirks & CUPS_SNMP_CAPACITY)) &&
|
||||
supplies[i].level >= 0)
|
||||
snprintf(ptr, sizeof(value) - (ptr - value), "%d", percent);
|
||||
snprintf(ptr, sizeof(value) - (size_t)(ptr - value), "%d", percent);
|
||||
else
|
||||
strlcpy(ptr, "-1", sizeof(value) - (ptr - value));
|
||||
strlcpy(ptr, "-1", sizeof(value) - (size_t)(ptr - value));
|
||||
}
|
||||
|
||||
fprintf(stderr, "ATTR: marker-levels=%s\n", value);
|
||||
@@ -561,20 +565,20 @@ backend_init_supplies(
|
||||
/*
|
||||
* Yes, read the cache file:
|
||||
*
|
||||
* 2 num_supplies charset
|
||||
* 3 num_supplies charset
|
||||
* device description
|
||||
* supply structures...
|
||||
*/
|
||||
|
||||
if (cupsFileGets(cachefile, value, sizeof(value)))
|
||||
{
|
||||
if (sscanf(value, "2 %d%d", &num_supplies, &charset) == 2 &&
|
||||
if (sscanf(value, "3 %d%d", &num_supplies, &charset) == 2 &&
|
||||
num_supplies <= CUPS_MAX_SUPPLIES &&
|
||||
cupsFileGets(cachefile, value, sizeof(value)))
|
||||
{
|
||||
if (!strcmp(description, value))
|
||||
cupsFileRead(cachefile, (char *)supplies,
|
||||
num_supplies * sizeof(backend_supplies_t));
|
||||
(size_t)num_supplies * sizeof(backend_supplies_t));
|
||||
else
|
||||
{
|
||||
num_supplies = -1;
|
||||
@@ -664,12 +668,12 @@ backend_init_supplies(
|
||||
|
||||
if ((cachefile = cupsFileOpen(cachefilename, "w")) != NULL)
|
||||
{
|
||||
cupsFilePrintf(cachefile, "2 %d %d\n", num_supplies, charset);
|
||||
cupsFilePrintf(cachefile, "3 %d %d\n", num_supplies, charset);
|
||||
cupsFilePrintf(cachefile, "%s\n", description);
|
||||
|
||||
if (num_supplies > 0)
|
||||
cupsFileWrite(cachefile, (char *)supplies,
|
||||
num_supplies * sizeof(backend_supplies_t));
|
||||
(size_t)num_supplies * sizeof(backend_supplies_t));
|
||||
|
||||
cupsFileClose(cachefile);
|
||||
}
|
||||
@@ -697,7 +701,7 @@ backend_init_supplies(
|
||||
if (i)
|
||||
*ptr++ = ',';
|
||||
|
||||
strlcpy(ptr, supplies[i].color, sizeof(value) - (ptr - value));
|
||||
strlcpy(ptr, supplies[i].color, sizeof(value) - (size_t)(ptr - value));
|
||||
}
|
||||
|
||||
fprintf(stderr, "ATTR: marker-colors=%s\n", value);
|
||||
@@ -745,9 +749,9 @@ backend_init_supplies(
|
||||
type = supplies[i].type;
|
||||
|
||||
if (type < CUPS_TC_other || type > CUPS_TC_covers)
|
||||
strlcpy(ptr, "unknown", sizeof(value) - (ptr - value));
|
||||
strlcpy(ptr, "unknown", sizeof(value) - (size_t)(ptr - value));
|
||||
else
|
||||
strlcpy(ptr, types[type - CUPS_TC_other], sizeof(value) - (ptr - value));
|
||||
strlcpy(ptr, types[type - CUPS_TC_other], sizeof(value) - (size_t)(ptr - value));
|
||||
}
|
||||
|
||||
fprintf(stderr, "ATTR: marker-types=%s\n", value);
|
||||
@@ -969,6 +973,25 @@ backend_walk_cb(cups_snmp_t *packet, /* I - SNMP packet */
|
||||
packet->object_value.integer > 0)
|
||||
supplies[i - 1].max_capacity = packet->object_value.integer;
|
||||
}
|
||||
else if (_cupsSNMPIsOIDPrefixed(packet, prtMarkerSuppliesClass))
|
||||
{
|
||||
/*
|
||||
* Get marker class...
|
||||
*/
|
||||
|
||||
i = packet->object_name[prtMarkerSuppliesClassOffset];
|
||||
if (i < 1 || i > CUPS_MAX_SUPPLIES ||
|
||||
packet->object_type != CUPS_ASN1_INTEGER)
|
||||
return;
|
||||
|
||||
fprintf(stderr, "DEBUG2: prtMarkerSuppliesClass.1.%d = %d\n", i,
|
||||
packet->object_value.integer);
|
||||
|
||||
if (i > num_supplies)
|
||||
num_supplies = i;
|
||||
|
||||
supplies[i - 1].sclass = packet->object_value.integer;
|
||||
}
|
||||
else if (_cupsSNMPIsOIDPrefixed(packet, prtMarkerSuppliesType))
|
||||
{
|
||||
/*
|
||||
@@ -1032,9 +1055,9 @@ utf16_to_utf8(
|
||||
for (ptr = temp; srcsize >= 2;)
|
||||
{
|
||||
if (le)
|
||||
ch = src[0] | (src[1] << 8);
|
||||
ch = (cups_utf32_t)(src[0] | (src[1] << 8));
|
||||
else
|
||||
ch = (src[0] << 8) | src[1];
|
||||
ch = (cups_utf32_t)((src[0] << 8) | src[1]);
|
||||
|
||||
src += 2;
|
||||
srcsize -= 2;
|
||||
@@ -1045,13 +1068,13 @@ utf16_to_utf8(
|
||||
* Multi-word UTF-16 char...
|
||||
*/
|
||||
|
||||
int lch; /* Lower word */
|
||||
cups_utf32_t lch; /* Lower word */
|
||||
|
||||
|
||||
if (le)
|
||||
lch = src[0] | (src[1] << 8);
|
||||
lch = (cups_utf32_t)(src[0] | (src[1] << 8));
|
||||
else
|
||||
lch = (src[0] << 8) | src[1];
|
||||
lch = (cups_utf32_t)((src[0] << 8) | src[1]);
|
||||
|
||||
if (lch >= 0xdc00 && lch <= 0xdfff)
|
||||
{
|
||||
@@ -1068,10 +1091,10 @@ utf16_to_utf8(
|
||||
|
||||
*ptr = '\0';
|
||||
|
||||
cupsUTF32ToUTF8(dst, temp, dstsize);
|
||||
cupsUTF32ToUTF8(dst, temp, (int)dstsize);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: snmp-supplies.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+20
-47
@@ -1,44 +1,18 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: snmp.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
*
|
||||
* SNMP discovery backend for CUPS.
|
||||
* SNMP discovery backend for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 2006-2007 by Easy Software Products, all rights reserved.
|
||||
* 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
|
||||
* 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/".
|
||||
* 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() - Discover printers via SNMP.
|
||||
* add_array() - Add a string to an array.
|
||||
* add_cache() - Add a cached device...
|
||||
* add_device_uri() - Add a device URI to the cache.
|
||||
* alarm_handler() - Handle alarm signals...
|
||||
* compare_cache() - Compare two cache entries.
|
||||
* debug_printf() - Display some debugging information.
|
||||
* fix_make_model() - Fix common problems in the make-and-model
|
||||
* string.
|
||||
* free_array() - Free an array of strings.
|
||||
* free_cache() - Free the array of cached devices.
|
||||
* get_interface_addresses() - Get the broadcast address(es) associated with
|
||||
* an interface.
|
||||
* list_device() - List a device we found...
|
||||
* password_cb() - Handle authentication requests.
|
||||
* probe_device() - Probe a device to discover whether it is a
|
||||
* printer.
|
||||
* read_snmp_conf() - Read the snmp.conf file.
|
||||
* read_snmp_response() - Read and parse a SNMP response...
|
||||
* run_time() - Return the total running time...
|
||||
* scan_devices() - Scan for devices using SNMP.
|
||||
* try_connect() - Try connecting on a port...
|
||||
* update_cache() - Update a cached device...
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -532,17 +506,16 @@ fix_make_model(
|
||||
make_model[0] = 'H';
|
||||
make_model[1] = 'P';
|
||||
make_model[2] = ' ';
|
||||
strlcpy(make_model + 3, mmptr, make_model_size - 3);
|
||||
strlcpy(make_model + 3, mmptr, (size_t)make_model_size - 3);
|
||||
}
|
||||
else if (!_cups_strncasecmp(old_make_model, "deskjet", 7))
|
||||
snprintf(make_model, make_model_size, "HP DeskJet%s", old_make_model + 7);
|
||||
snprintf(make_model, (size_t)make_model_size, "HP DeskJet%s", old_make_model + 7);
|
||||
else if (!_cups_strncasecmp(old_make_model, "officejet", 9))
|
||||
snprintf(make_model, make_model_size, "HP OfficeJet%s", old_make_model + 9);
|
||||
snprintf(make_model, (size_t)make_model_size, "HP OfficeJet%s", old_make_model + 9);
|
||||
else if (!_cups_strncasecmp(old_make_model, "stylus_pro_", 11))
|
||||
snprintf(make_model, make_model_size, "EPSON Stylus Pro %s",
|
||||
old_make_model + 11);
|
||||
snprintf(make_model, (size_t)make_model_size, "EPSON Stylus Pro %s", old_make_model + 11);
|
||||
else
|
||||
strlcpy(make_model, old_make_model, make_model_size);
|
||||
strlcpy(make_model, old_make_model, (size_t)make_model_size);
|
||||
|
||||
if ((mmptr = strstr(make_model, ", Inc.,")) != NULL)
|
||||
{
|
||||
@@ -753,7 +726,7 @@ probe_device(snmp_cache_t *device) /* I - Device */
|
||||
* Insert hostname/address...
|
||||
*/
|
||||
|
||||
strlcpy(uriptr, device->addrname, sizeof(uri) - (uriptr - uri));
|
||||
strlcpy(uriptr, device->addrname, sizeof(uri) - (size_t)(uriptr - uri));
|
||||
uriptr += strlen(uriptr);
|
||||
format += 2;
|
||||
}
|
||||
@@ -1233,7 +1206,7 @@ scan_devices(int ipv4, /* I - SNMP IPv4 socket */
|
||||
for (addr = addrs; addr; addr = addr->next)
|
||||
{
|
||||
#ifdef AF_INET6
|
||||
if (_httpAddrFamily(&(addr->addr)) == AF_INET6)
|
||||
if (httpAddrFamily(&(addr->addr)) == AF_INET6)
|
||||
fd = ipv6;
|
||||
else
|
||||
#endif /* AF_INET6 */
|
||||
@@ -1335,7 +1308,7 @@ try_connect(http_addr_t *addr, /* I - Socket address */
|
||||
debug_printf("DEBUG: %.3f Trying %s://%s:%d...\n", run_time(),
|
||||
port == 515 ? "lpd" : "socket", addrname, port);
|
||||
|
||||
if ((fd = socket(_httpAddrFamily(addr), SOCK_STREAM, 0)) < 0)
|
||||
if ((fd = socket(httpAddrFamily(addr), SOCK_STREAM, 0)) < 0)
|
||||
{
|
||||
fprintf(stderr, "ERROR: Unable to create socket: %s\n",
|
||||
strerror(errno));
|
||||
@@ -1346,7 +1319,7 @@ try_connect(http_addr_t *addr, /* I - Socket address */
|
||||
|
||||
alarm(1);
|
||||
|
||||
status = connect(fd, (void *)addr, httpAddrLength(addr));
|
||||
status = connect(fd, (void *)addr, (socklen_t)httpAddrLength(addr));
|
||||
|
||||
close(fd);
|
||||
alarm(0);
|
||||
@@ -1391,5 +1364,5 @@ update_cache(snmp_cache_t *device, /* I - Device */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: snmp.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
*/
|
||||
|
||||
+20
-23
@@ -1,23 +1,18 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: socket.c 11907 2014-06-09 18:35:32Z msweet $"
|
||||
*
|
||||
* AppSocket backend for CUPS.
|
||||
* AppSocket backend for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
* 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"
|
||||
* "LICENSE" which should have been included with this file. If this
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* "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() - Send a file to the printer or server.
|
||||
* wait_bc() - Wait for back-channel data...
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -46,7 +41,7 @@
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static int wait_bc(int device_fd, int secs);
|
||||
static ssize_t wait_bc(int device_fd, int secs);
|
||||
|
||||
|
||||
/*
|
||||
@@ -250,8 +245,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
*/
|
||||
|
||||
snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") ||
|
||||
_cups_strcasecmp(value, "yes") ||
|
||||
_cups_strcasecmp(value, "true");
|
||||
!_cups_strcasecmp(value, "yes") ||
|
||||
!_cups_strcasecmp(value, "true");
|
||||
}
|
||||
else if (!_cups_strcasecmp(name, "contimeout"))
|
||||
{
|
||||
@@ -385,7 +380,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(delay);
|
||||
sleep((unsigned)delay);
|
||||
|
||||
if (delay < 30)
|
||||
delay += 5;
|
||||
@@ -415,7 +410,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
tbytes = 0;
|
||||
|
||||
if (bytes > 0)
|
||||
tbytes += write(device_fd, buffer, bytes);
|
||||
tbytes += write(device_fd, buffer, (size_t)bytes);
|
||||
|
||||
while (copies > 0 && tbytes >= 0)
|
||||
{
|
||||
@@ -434,6 +429,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
_cupsLangPrintFilter(stderr, "INFO", _("Print file sent."));
|
||||
}
|
||||
|
||||
fputs("STATE: +cups-waiting-for-job-completed\n", stderr);
|
||||
|
||||
if (waiteof)
|
||||
{
|
||||
/*
|
||||
@@ -479,7 +476,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
* 'wait_bc()' - Wait for back-channel data...
|
||||
*/
|
||||
|
||||
static int /* O - # bytes read or -1 on error */
|
||||
static ssize_t /* O - # bytes read or -1 on error */
|
||||
wait_bc(int device_fd, /* I - Socket */
|
||||
int secs) /* I - Seconds to wait */
|
||||
{
|
||||
@@ -509,7 +506,7 @@ wait_bc(int device_fd, /* I - Socket */
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Received %d bytes of back-channel data\n",
|
||||
(int)bytes);
|
||||
cupsBackChannelWrite(buffer, bytes, 1.0);
|
||||
cupsBackChannelWrite(buffer, (size_t)bytes, 1.0);
|
||||
}
|
||||
|
||||
return (bytes);
|
||||
@@ -520,5 +517,5 @@ wait_bc(int device_fd, /* I - Socket */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: socket.c 11907 2014-06-09 18:35:32Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: test1284.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* IEEE-1284 support functions test program for CUPS.
|
||||
*
|
||||
@@ -80,5 +80,5 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: test1284.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
+20
-24
@@ -1,25 +1,18 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: testbackend.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
*
|
||||
* Backend test program for CUPS.
|
||||
* Backend test program for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2005 by Easy Software Products, all rights reserved.
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 1997-2005 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"
|
||||
* "LICENSE" which should have been included with this file. If this
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* "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() - Run the named backend.
|
||||
* sigterm_handler() - Flag when we get SIGTERM.
|
||||
* usage() - Show usage information.
|
||||
* walk_cb() - Show results of cupsSideChannelSNMPWalk...
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -97,7 +90,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
if (getcwd(libpath, sizeof(libpath)) &&
|
||||
(ptr = strrchr(libpath, '/')) != NULL && !strcmp(ptr, "/backend"))
|
||||
{
|
||||
strlcpy(ptr, "/cups", sizeof(libpath) - (ptr - libpath));
|
||||
strlcpy(ptr, "/cups", sizeof(libpath) - (size_t)(ptr - libpath));
|
||||
if (!access(libpath, 0))
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
@@ -311,7 +304,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
*/
|
||||
|
||||
if ((bytes = cupsBackChannelRead(buffer, sizeof(buffer), 0)) > 0)
|
||||
write(2, buffer, bytes);
|
||||
write(2, buffer, (size_t)bytes);
|
||||
|
||||
/*
|
||||
* Throttle output to ~100hz...
|
||||
@@ -339,7 +332,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
*/
|
||||
|
||||
while ((bytes = cupsBackChannelRead(buffer, sizeof(buffer), 5.0)) > 0)
|
||||
write(2, buffer, bytes);
|
||||
write(2, buffer, (size_t)bytes);
|
||||
|
||||
exit(0);
|
||||
}
|
||||
@@ -414,7 +407,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
while ((bytes = cupsBackChannelRead(buffer, sizeof(buffer),
|
||||
timeout)) > 0)
|
||||
{
|
||||
write(2, buffer, bytes);
|
||||
write(2, buffer, (size_t)bytes);
|
||||
timeout = 5.0;
|
||||
}
|
||||
write(2, "\nDEBUG: END\n", 12);
|
||||
@@ -668,14 +661,17 @@ walk_cb(const char *oid, /* I - OID */
|
||||
void *context) /* I - Context (unused) */
|
||||
{
|
||||
char temp[80];
|
||||
if (datalen > (sizeof(temp) - 1))
|
||||
|
||||
(void)context;
|
||||
|
||||
if ((size_t)datalen > (sizeof(temp) - 1))
|
||||
{
|
||||
memcpy(temp, data, sizeof(temp) - 1);
|
||||
temp[sizeof(temp) - 1] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(temp, data, datalen);
|
||||
memcpy(temp, data, (size_t)datalen);
|
||||
temp[datalen] = '\0';
|
||||
}
|
||||
|
||||
@@ -684,5 +680,5 @@ walk_cb(const char *oid, /* I - OID */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: testbackend.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: testsupplies.c 3247 2011-05-12 06:22:31Z msweet $"
|
||||
*
|
||||
* SNMP supplies test program for CUPS.
|
||||
*
|
||||
@@ -79,5 +79,5 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: testsupplies.c 3247 2011-05-12 06:22:31Z msweet $".
|
||||
*/
|
||||
|
||||
+96
-87
@@ -1,75 +1,46 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
*
|
||||
* Copyright 2005-2013 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
|
||||
* terms, and your use, installation, modification or redistribution of
|
||||
* this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or
|
||||
* redistribute this Apple software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, Apple grants you a personal, non-exclusive
|
||||
* license, under Apple's copyrights in this original Apple software (the
|
||||
* "Apple Software"), to use, reproduce, modify and redistribute the Apple
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the Apple Software in its entirety and
|
||||
* without modifications, you must retain this notice and the following
|
||||
* text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer,
|
||||
* Inc. may be used to endorse or promote products derived from the Apple
|
||||
* Software without specific prior written permission from Apple. Except
|
||||
* as expressly stated in this notice, no other rights or licenses, express
|
||||
* or implied, are granted by Apple herein, including but not limited to
|
||||
* any patent rights that may be infringed by your derivative works or by
|
||||
* other works in which the Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE
|
||||
* MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
|
||||
* THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
|
||||
* OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
|
||||
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
|
||||
* MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
|
||||
* AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
|
||||
* STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* list_devices() - List all USB devices.
|
||||
* print_device() - Print a file to a USB device.
|
||||
* read_thread() - Thread to read the backchannel data on.
|
||||
* sidechannel_thread() - Handle side-channel requests.
|
||||
* iterate_printers() - Iterate over all the printers.
|
||||
* device_added() - Device added notifier.
|
||||
* list_device_cb() - list_device iterator callback.
|
||||
* find_device_cb() - print_device iterator callback.
|
||||
* status_timer_cb() - Status timer callback.
|
||||
* copy_deviceinfo() - Copy strings from the 1284 device ID.
|
||||
* release_deviceinfo() - Release deviceinfo strings.
|
||||
* load_classdriver() - Load a classdriver.
|
||||
* unload_classdriver() - Unload a classdriver.
|
||||
* load_printerdriver() - Load vendor's classdriver.
|
||||
* registry_open() - Open a connection to the printer.
|
||||
* registry_close() - Close the connection to the printer.
|
||||
* copy_deviceid() - Copy the 1284 device id string.
|
||||
* copy_devicestring() - Copy the 1284 device id string.
|
||||
* copy_value_for_key() - Copy value string associated with a key.
|
||||
* cfstr_create_trim() - Create CFString and trim whitespace characters.
|
||||
* parse_options() - Parse URI options.
|
||||
* sigterm_handler() - SIGTERM handler.
|
||||
* next_line() - Find the next line in a buffer.
|
||||
* parse_pserror() - Scan the backchannel data for postscript errors.
|
||||
* soft_reset() - Send a soft reset to the device.
|
||||
* get_device_id() - Return IEEE-1284 device ID.
|
||||
*/
|
||||
* "$Id: usb-darwin.c 11669 2014-03-04 14:53:34Z msweet $"
|
||||
*
|
||||
* Copyright 2005-2014 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
|
||||
* terms, and your use, installation, modification or redistribution of
|
||||
* this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or
|
||||
* redistribute this Apple software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, Apple grants you a personal, non-exclusive
|
||||
* license, under Apple's copyrights in this original Apple software (the
|
||||
* "Apple Software"), to use, reproduce, modify and redistribute the Apple
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the Apple Software in its entirety and
|
||||
* without modifications, you must retain this notice and the following
|
||||
* text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer,
|
||||
* Inc. may be used to endorse or promote products derived from the Apple
|
||||
* Software without specific prior written permission from Apple. Except
|
||||
* as expressly stated in this notice, no other rights or licenses, express
|
||||
* or implied, are granted by Apple herein, including but not limited to
|
||||
* any patent rights that may be infringed by your derivative works or by
|
||||
* other works in which the Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE
|
||||
* MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
|
||||
* THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
|
||||
* OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
|
||||
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
|
||||
* MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
|
||||
* AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
|
||||
* STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include necessary headers.
|
||||
@@ -97,7 +68,7 @@
|
||||
#include <IOKit/usb/IOUSBLib.h>
|
||||
#include <IOKit/IOCFPlugIn.h>
|
||||
#include <libproc.h>
|
||||
|
||||
#include <asl.h>
|
||||
#include <spawn.h>
|
||||
#include <pthread.h>
|
||||
|
||||
@@ -309,13 +280,16 @@ static void release_deviceinfo(CFStringRef *make, CFStringRef *model, CFStringRe
|
||||
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
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
static pid_t child_pid; /* Child PID */
|
||||
static void run_legacy_backend(int argc, char *argv[], int fd); /* Starts child backend process running as a ppc executable */
|
||||
static void run_legacy_backend(int argc, char *argv[], int fd) __attribute__((noreturn)); /* Starts child backend process running as a ppc executable */
|
||||
#endif /* __i386__ || __x86_64__ */
|
||||
static void sigterm_handler(int sig); /* SIGTERM handler */
|
||||
static void sigquit_handler(int sig, siginfo_t *si, void *unused);
|
||||
static void sigquit_handler(int sig, siginfo_t *si, void *unused) __attribute__((noreturn));
|
||||
|
||||
#ifdef PARSE_PS_ERRORS
|
||||
static const char *next_line (const char *buffer);
|
||||
@@ -477,6 +451,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);
|
||||
|
||||
@@ -709,7 +688,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
|
||||
if (g.print_bytes)
|
||||
{
|
||||
bytes = g.print_bytes;
|
||||
bytes = (UInt32)g.print_bytes;
|
||||
iostatus = (*g.classdriver)->WritePipe(g.classdriver, (UInt8*)print_ptr, &bytes, 0);
|
||||
|
||||
/*
|
||||
@@ -731,7 +710,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
{
|
||||
fputs("DEBUG: Got USB pipe stalled during write\n", stderr);
|
||||
|
||||
bytes = g.print_bytes;
|
||||
bytes = (UInt32)g.print_bytes;
|
||||
iostatus = (*g.classdriver)->WritePipe(g.classdriver, (UInt8*)print_ptr, &bytes, 0);
|
||||
}
|
||||
|
||||
@@ -751,7 +730,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
sleep(5);
|
||||
#endif /* DEBUG_WRITES */
|
||||
|
||||
bytes = g.print_bytes;
|
||||
bytes = (UInt32)g.print_bytes;
|
||||
iostatus = (*g.classdriver)->WritePipe(g.classdriver, (UInt8*)print_ptr, &bytes, 0);
|
||||
}
|
||||
|
||||
@@ -790,6 +769,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
}
|
||||
|
||||
fprintf(stderr, "DEBUG: Sent %lld bytes...\n", (off_t)total_bytes);
|
||||
fputs("STATE: +cups-waiting-for-job-completed\n", stderr);
|
||||
|
||||
/*
|
||||
* Signal the side channel thread to exit...
|
||||
@@ -1038,7 +1018,7 @@ sidechannel_thread(void *reference)
|
||||
fputs("DEBUG: CUPS_SC_CMD_GET_BIDI received from driver...\n",
|
||||
stderr);
|
||||
|
||||
data[0] = g.bidi_flag;
|
||||
data[0] = (char)g.bidi_flag;
|
||||
cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0);
|
||||
|
||||
fprintf(stderr,
|
||||
@@ -1054,7 +1034,7 @@ sidechannel_thread(void *reference)
|
||||
get_device_id(&status, data, &datalen);
|
||||
cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, datalen, 1.0);
|
||||
|
||||
if (datalen < sizeof(data))
|
||||
if ((size_t)datalen < sizeof(data))
|
||||
data[datalen] = '\0';
|
||||
else
|
||||
data[sizeof(data) - 1] = '\0';
|
||||
@@ -1257,7 +1237,7 @@ static Boolean find_device_cb(void *refcon,
|
||||
if (obj != 0x0)
|
||||
{
|
||||
CFStringRef idString = NULL;
|
||||
UInt32 location = -1;
|
||||
UInt32 location = ~0U;
|
||||
UInt8 interfaceNum = 0;
|
||||
|
||||
copy_devicestring(obj, &idString, &location, &interfaceNum);
|
||||
@@ -1607,7 +1587,7 @@ static OSStatus copy_deviceid(classdriver_t **classdriver,
|
||||
CFStringRef deviceMake = NULL;
|
||||
CFStringRef deviceModel = NULL;
|
||||
CFStringRef deviceSerial = NULL;
|
||||
|
||||
|
||||
*deviceID = NULL;
|
||||
|
||||
OSStatus err = (*classdriver)->GetDeviceID(classdriver, &devID, DEFAULT_TIMEOUT);
|
||||
@@ -1682,13 +1662,13 @@ static OSStatus copy_deviceid(classdriver_t **classdriver,
|
||||
CFRange range = (deviceSerial != NULL ? CFStringFind(deviceSerial, CFSTR("+"), 0) : CFRangeMake(0, 0));
|
||||
if (range.length == 1) {
|
||||
range = CFStringFind(*deviceID, deviceSerial, 0);
|
||||
|
||||
|
||||
CFMutableStringRef deviceIDString = CFStringCreateMutableCopy(NULL, 0, *deviceID);
|
||||
CFStringFindAndReplace(deviceIDString, CFSTR("+"), CFSTR(""), range, 0);
|
||||
CFRelease(*deviceID);
|
||||
*deviceID = deviceIDString;
|
||||
}
|
||||
|
||||
|
||||
release_deviceinfo(&deviceMake, &deviceModel, &deviceSerial);
|
||||
|
||||
return err;
|
||||
@@ -1897,7 +1877,7 @@ static void parse_options(char *options,
|
||||
else if (!_cups_strcasecmp(name, "serial"))
|
||||
strlcpy(serial, value, serial_size);
|
||||
else if (!_cups_strcasecmp(name, "location") && location)
|
||||
*location = strtol(value, NULL, 16);
|
||||
*location = (UInt32)strtoul(value, NULL, 16);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1960,6 +1940,7 @@ static void run_legacy_backend(int argc,
|
||||
char *my_argv[32];
|
||||
char *usb_legacy_status;
|
||||
|
||||
|
||||
/*
|
||||
* If we're running as x86_64 or i386 and couldn't load the class driver
|
||||
* (because it's ppc or i386), then try to re-exec ourselves in ppc or i386
|
||||
@@ -1976,6 +1957,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...
|
||||
*/
|
||||
@@ -2043,7 +2026,7 @@ static void run_legacy_backend(int argc,
|
||||
cups_serverbin = CUPS_SERVERBIN;
|
||||
snprintf(usbpath, sizeof(usbpath), "%s/backend/usb", cups_serverbin);
|
||||
|
||||
for (i = 0; i < argc && i < (sizeof(my_argv) / sizeof(my_argv[0])) - 1; i ++)
|
||||
for (i = 0; i < argc && i < (int)(sizeof(my_argv) / sizeof(my_argv[0])) - 1; i ++)
|
||||
my_argv[i] = argv[i];
|
||||
|
||||
my_argv[i] = NULL;
|
||||
@@ -2331,13 +2314,39 @@ static void get_device_id(cups_sc_status_t *status,
|
||||
if (deviceIDString)
|
||||
{
|
||||
CFStringGetCString(deviceIDString, data, *datalen, kCFStringEncodingUTF8);
|
||||
*datalen = strlen(data);
|
||||
*datalen = (int)strlen(data);
|
||||
CFRelease(deviceIDString);
|
||||
}
|
||||
*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$".
|
||||
* End of "$Id: usb-darwin.c 11669 2014-03-04 14:53:34Z msweet $".
|
||||
*/
|
||||
|
||||
+18
-40
@@ -1,35 +1,15 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: usb-libusb.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
*
|
||||
* LIBUSB interface code for CUPS.
|
||||
* LIBUSB interface code for CUPS.
|
||||
*
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* list_devices() - List the available printers.
|
||||
* print_device() - Print a file to a USB device.
|
||||
* close_device() - Close the connection to the USB printer.
|
||||
* compare_quirks() - Compare two quirks entries.
|
||||
* find_device() - Find or enumerate USB printers.
|
||||
* find_quirks() - Find the quirks for the given printer, if any.
|
||||
* get_device_id() - Get the IEEE-1284 device ID for the printer.
|
||||
* list_cb() - List USB printers for discovery.
|
||||
* load_quirks() - Load all quirks files in the /usr/share/cups/usb
|
||||
* directory.
|
||||
* make_device_uri() - Create a device URI for a USB printer.
|
||||
* open_device() - Open a connection to the USB printer.
|
||||
* print_cb() - Find a USB printer for printing.
|
||||
* read_thread() - Thread to read the backchannel data on.
|
||||
* sidechannel_thread() - Handle side-channel requests.
|
||||
* soft_reset() - Send a soft reset to the device.
|
||||
* soft_reset_printer() - Do the soft reset request specific to printers
|
||||
* 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/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -496,7 +476,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
iostatus = libusb_bulk_transfer(g.printer->handle,
|
||||
g.printer->write_endp,
|
||||
print_buffer, g.print_bytes,
|
||||
&bytes, 60000);
|
||||
&bytes, 0);
|
||||
/*
|
||||
* Ignore timeout errors, but retain the number of bytes written to
|
||||
* avoid sending duplicate data...
|
||||
@@ -519,7 +499,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
iostatus = libusb_bulk_transfer(g.printer->handle,
|
||||
g.printer->write_endp,
|
||||
print_buffer, g.print_bytes,
|
||||
&bytes, 60000);
|
||||
&bytes, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -534,7 +514,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
iostatus = libusb_bulk_transfer(g.printer->handle,
|
||||
g.printer->write_endp,
|
||||
print_buffer, g.print_bytes,
|
||||
&bytes, 60000);
|
||||
&bytes, 0);
|
||||
}
|
||||
|
||||
if (iostatus)
|
||||
@@ -920,8 +900,8 @@ find_device(usb_cb_t cb, /* I - Callback function */
|
||||
fprintf(stderr, "DEBUG: Printer does not report class 7 and/or "
|
||||
"subclass 1 but works as a printer anyway\n");
|
||||
|
||||
read_endp = -1;
|
||||
write_endp = -1;
|
||||
read_endp = 0xff;
|
||||
write_endp = 0xff;
|
||||
|
||||
for (endp = 0, endpptr = altptr->endpoint;
|
||||
endp < altptr->bNumEndpoints;
|
||||
@@ -1085,8 +1065,7 @@ get_device_id(usb_printer_t *printer, /* I - Printer */
|
||||
* bytes. The 1284 spec says the length is stored MSB first...
|
||||
*/
|
||||
|
||||
length = (((unsigned)buffer[0] & 255) << 8) |
|
||||
((unsigned)buffer[1] & 255);
|
||||
length = (int)((((unsigned)buffer[0] & 255) << 8) | ((unsigned)buffer[1] & 255));
|
||||
|
||||
/*
|
||||
* Check to see if the length is larger than our buffer or less than 14 bytes
|
||||
@@ -1097,8 +1076,7 @@ get_device_id(usb_printer_t *printer, /* I - Printer */
|
||||
*/
|
||||
|
||||
if (length > bufsize || length < 14)
|
||||
length = (((unsigned)buffer[1] & 255) << 8) |
|
||||
((unsigned)buffer[0] & 255);
|
||||
length = (int)((((unsigned)buffer[1] & 255) << 8) | ((unsigned)buffer[0] & 255));
|
||||
|
||||
if (length > bufsize)
|
||||
length = bufsize;
|
||||
@@ -1120,7 +1098,7 @@ get_device_id(usb_printer_t *printer, /* I - Printer */
|
||||
* nul-terminate.
|
||||
*/
|
||||
|
||||
memmove(buffer, buffer + 2, length);
|
||||
memmove(buffer, buffer + 2, (size_t)length);
|
||||
buffer[length] = '\0';
|
||||
|
||||
return (0);
|
||||
@@ -1734,7 +1712,7 @@ static void *read_thread(void *reference)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Read %d bytes of back-channel data...\n",
|
||||
(int)rbytes);
|
||||
cupsBackChannelWrite((const char *)readbuffer, rbytes, 1.0);
|
||||
cupsBackChannelWrite((const char *)readbuffer, (size_t)rbytes, 1.0);
|
||||
}
|
||||
else if (readstatus == LIBUSB_ERROR_TIMEOUT)
|
||||
fputs("DEBUG: Got USB transaction timeout during read.\n", stderr);
|
||||
@@ -2021,6 +1999,6 @@ soft_reset_printer(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: usb-libusb.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
*/
|
||||
|
||||
|
||||
+12
-21
@@ -1,27 +1,20 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: usb-unix.c 11342 2013-10-18 20:36:01Z msweet $"
|
||||
*
|
||||
* USB port backend for CUPS.
|
||||
* USB port backend for CUPS.
|
||||
*
|
||||
* This file is included from "usb.c" when compiled on UNIX/Linux.
|
||||
* This file is included from "usb.c" when compiled on UNIX/Linux.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* "LICENSE" which should have been included with this file. If this
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* "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:
|
||||
*
|
||||
* print_device() - Print a file to a USB device.
|
||||
* list_devices() - List all USB devices.
|
||||
* open_device() - Open a USB device...
|
||||
* side_cb() - Handle side-channel requests...
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -285,8 +278,6 @@ list_devices(void)
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
#elif defined(__hpux)
|
||||
#elif defined(__osf)
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
|
||||
int i; /* Looping var */
|
||||
char device[255]; /* Device filename */
|
||||
@@ -612,5 +603,5 @@ side_cb(int print_fd, /* I - Print file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: usb-unix.c 11342 2013-10-18 20:36:01Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: usb.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* USB port backend for CUPS.
|
||||
*
|
||||
@@ -260,5 +260,5 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: usb.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
+22
-19
@@ -1,25 +1,28 @@
|
||||
lpc.o: lpc.c ../cups/cups-private.h ../cups/string-private.h ../config.h \
|
||||
../cups/debug-private.h ../cups/versioning.h ../cups/ipp-private.h \
|
||||
../cups/ipp.h ../cups/http.h ../cups/array.h ../cups/http-private.h \
|
||||
../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \
|
||||
../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/ppd-private.h ../cups/ppd.h ../cups/thread-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/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/ipp-private.h \
|
||||
../cups/ipp.h ../cups/http.h ../cups/array.h ../cups/http-private.h \
|
||||
../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \
|
||||
../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/ppd-private.h ../cups/ppd.h ../cups/thread-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/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/ipp-private.h \
|
||||
../cups/ipp.h ../cups/http.h ../cups/array.h ../cups/http-private.h \
|
||||
../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \
|
||||
../cups/language.h ../cups/pwg-private.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/ppd-private.h ../cups/ppd.h ../cups/thread-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/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/ipp-private.h ../cups/ipp.h ../cups/http.h ../cups/array.h \
|
||||
../cups/http-private.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/language.h \
|
||||
../cups/pwg-private.h ../cups/cups.h ../cups/file.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/ppd-private.h ../cups/ppd.h ../cups/thread-private.h
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id$"
|
||||
# "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $"
|
||||
#
|
||||
# Berkeley commands makefile for CUPS.
|
||||
#
|
||||
@@ -164,5 +164,5 @@ include Dependencies
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
# End of "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $".
|
||||
#
|
||||
|
||||
+13
-21
@@ -1,24 +1,16 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: lpc.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* "lpc" command for CUPS.
|
||||
* "lpc" command for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
* 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* main() - Parse options and commands.
|
||||
* compare_strings() - Compare two command-line strings.
|
||||
* do_command() - Do an lpc command...
|
||||
* show_help() - Show help messages.
|
||||
* show_status() - Show printers.
|
||||
* 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/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -32,7 +24,7 @@
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static int compare_strings(const char *, const char *, int);
|
||||
static int compare_strings(const char *, const char *, size_t);
|
||||
static void do_command(http_t *, const char *, const char *);
|
||||
static void show_help(const char *);
|
||||
static void show_status(http_t *, const char *);
|
||||
@@ -158,9 +150,9 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
static int /* O - -1 or 1 = no match, 0 = match */
|
||||
compare_strings(const char *s, /* I - Command-line string */
|
||||
const char *t, /* I - Option string */
|
||||
int tmin) /* I - Minimum number of unique chars in option */
|
||||
size_t tmin) /* I - Minimum number of unique chars in option */
|
||||
{
|
||||
int slen; /* Length of command-line string */
|
||||
size_t slen; /* Length of command-line string */
|
||||
|
||||
|
||||
slen = strlen(s);
|
||||
@@ -446,5 +438,5 @@ show_status(http_t *http, /* I - HTTP connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: lpc.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+11
-49
@@ -1,27 +1,16 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: lpq.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* "lpq" command for CUPS.
|
||||
* "lpq" command for CUPS.
|
||||
*
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
* 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* main() - Parse options and commands.
|
||||
* show_jobs() - Show jobs.
|
||||
* show_printer() - Show printer status.
|
||||
* usage() - Show program usage.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include necessary headers...
|
||||
* 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/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -194,7 +183,6 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
httpClose(http);
|
||||
|
||||
usage();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (isdigit(argv[i][0] & 255))
|
||||
@@ -262,7 +250,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
if (i && interval)
|
||||
{
|
||||
fflush(stdout);
|
||||
sleep(interval);
|
||||
sleep((unsigned)interval);
|
||||
}
|
||||
else
|
||||
break;
|
||||
@@ -323,9 +311,6 @@ show_jobs(const char *command, /* I - Command name */
|
||||
ipp_jstate_t jobstate; /* job-state */
|
||||
int jobid, /* job-id */
|
||||
jobsize, /* job-k-octets */
|
||||
#ifdef __osf__
|
||||
jobpriority, /* job-priority */
|
||||
#endif /* __osf__ */
|
||||
jobcount, /* Number of jobs */
|
||||
jobcopies, /* Number of copies */
|
||||
rank; /* Rank of job */
|
||||
@@ -448,9 +433,6 @@ show_jobs(const char *command, /* I - Command name */
|
||||
|
||||
jobid = 0;
|
||||
jobsize = 0;
|
||||
#ifdef __osf__
|
||||
jobpriority = 50;
|
||||
#endif /* __osf__ */
|
||||
jobstate = IPP_JOB_PENDING;
|
||||
jobname = "unknown";
|
||||
jobuser = "unknown";
|
||||
@@ -467,12 +449,6 @@ show_jobs(const char *command, /* I - Command name */
|
||||
attr->value_tag == IPP_TAG_INTEGER)
|
||||
jobsize = attr->values[0].integer;
|
||||
|
||||
#ifdef __osf__
|
||||
if (!strcmp(attr->name, "job-priority") &&
|
||||
attr->value_tag == IPP_TAG_INTEGER)
|
||||
jobpriority = attr->values[0].integer;
|
||||
#endif /* __osf__ */
|
||||
|
||||
if (!strcmp(attr->name, "job-state") &&
|
||||
attr->value_tag == IPP_TAG_ENUM)
|
||||
jobstate = (ipp_jstate_t)attr->values[0].integer;
|
||||
@@ -510,16 +486,9 @@ show_jobs(const char *command, /* I - Command name */
|
||||
}
|
||||
|
||||
if (!longstatus && jobcount == 0)
|
||||
#ifdef __osf__
|
||||
_cupsLangPuts(stdout,
|
||||
/* TRANSLATORS: Pri is job priority. */
|
||||
_("Rank Owner Pri Job Files"
|
||||
" Total Size"));
|
||||
#else
|
||||
_cupsLangPuts(stdout,
|
||||
_("Rank Owner Job File(s)"
|
||||
" Total Size"));
|
||||
#endif /* __osf__ */
|
||||
|
||||
jobcount ++;
|
||||
|
||||
@@ -560,16 +529,9 @@ show_jobs(const char *command, /* I - Command name */
|
||||
namestr, 1024.0 * jobsize);
|
||||
}
|
||||
else
|
||||
#ifdef __osf__
|
||||
_cupsLangPrintf(stdout,
|
||||
_("%-6s %-10.10s %-4d %-10d %-27.27s %.0f bytes"),
|
||||
rankstr, jobuser, jobpriority, jobid, jobname,
|
||||
1024.0 * jobsize);
|
||||
#else
|
||||
_cupsLangPrintf(stdout,
|
||||
_("%-7s %-7.7s %-7d %-31.31s %.0f bytes"),
|
||||
rankstr, jobuser, jobid, jobname, 1024.0 * jobsize);
|
||||
#endif /* __osf */
|
||||
|
||||
if (attr == NULL)
|
||||
break;
|
||||
@@ -679,5 +641,5 @@ usage(void)
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: lpq.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+11
-15
@@ -1,20 +1,16 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: lpr.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* "lpr" command for CUPS.
|
||||
* "lpr" command for CUPS.
|
||||
*
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
* 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* main() - Parse options and send files for printing.
|
||||
* 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/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -406,7 +402,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
while (status == HTTP_CONTINUE &&
|
||||
(bytes = read(0, buffer, sizeof(buffer))) > 0)
|
||||
status = cupsWriteRequestData(CUPS_HTTP_DEFAULT, buffer, bytes);
|
||||
status = cupsWriteRequestData(CUPS_HTTP_DEFAULT, buffer, (size_t)bytes);
|
||||
|
||||
if (status != HTTP_CONTINUE)
|
||||
{
|
||||
@@ -436,5 +432,5 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: lpr.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: lprm.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* "lprm" command for CUPS.
|
||||
*
|
||||
@@ -213,5 +213,5 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: lprm.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
+19
-20
@@ -1,73 +1,72 @@
|
||||
help-index.o: help-index.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 help-index.h \
|
||||
../cups/array.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/dir.h
|
||||
html.o: html.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 help-index.h ../cups/debug-private.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
|
||||
ipp-var.o: ipp-var.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 help-index.h ../cups/debug-private.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
|
||||
search.o: search.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 help-index.h ../cups/debug-private.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
|
||||
template.o: template.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 help-index.h ../cups/debug-private.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
|
||||
var.o: var.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 help-index.h ../cups/debug-private.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/md5-private.h
|
||||
admin.o: admin.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 help-index.h ../cups/debug-private.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/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 help-index.h ../cups/debug-private.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
|
||||
help.o: help.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 help-index.h ../cups/debug-private.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
|
||||
jobs.o: jobs.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 help-index.h ../cups/debug-private.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
|
||||
makedocset.o: makedocset.c cgi.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \
|
||||
../cups/language.h help-index.h
|
||||
makedocset.o: makedocset.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 ../cups/language-private.h ../cups/transcode.h \
|
||||
../cups/string-private.h ../config.h ../cups/ipp-private.h
|
||||
printers.o: printers.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 help-index.h ../cups/debug-private.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
|
||||
testcgi.o: testcgi.c cgi.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \
|
||||
../cups/language.h help-index.h
|
||||
../cups/language.h ../cups/pwg.h help-index.h
|
||||
testhi.o: testhi.c cgi.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \
|
||||
../cups/language.h help-index.h
|
||||
../cups/language.h ../cups/pwg.h help-index.h
|
||||
testtemplate.o: testtemplate.c cgi.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \
|
||||
../cups/language.h help-index.h
|
||||
websearch.o: websearch.c cgi.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \
|
||||
../cups/language.h help-index.h
|
||||
../cups/language.h ../cups/pwg.h help-index.h
|
||||
|
||||
+16
-43
@@ -1,16 +1,16 @@
|
||||
#
|
||||
# "$Id$"
|
||||
# "$Id: Makefile 11777 2014-03-28 19:18:10Z msweet $"
|
||||
#
|
||||
# CGI makefile for CUPS.
|
||||
# CGI makefile for CUPS.
|
||||
#
|
||||
# Copyright 2007-2012 by Apple Inc.
|
||||
# Copyright 1997-2006 by Easy Software Products.
|
||||
# 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
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
#
|
||||
|
||||
include ../Makedefs
|
||||
@@ -32,8 +32,7 @@ OBJS = \
|
||||
printers.o \
|
||||
testcgi.o \
|
||||
testhi.o \
|
||||
testtemplate.o \
|
||||
websearch.o
|
||||
testtemplate.o
|
||||
CGIS = \
|
||||
admin.cgi \
|
||||
classes.cgi \
|
||||
@@ -42,8 +41,7 @@ CGIS = \
|
||||
printers.cgi
|
||||
LIBTARGETS = \
|
||||
libcupscgi.a \
|
||||
$(LIBCUPSCGI) \
|
||||
websearch
|
||||
$(LIBCUPSCGI)
|
||||
|
||||
UNITTARGETS = \
|
||||
testcgi \
|
||||
@@ -82,7 +80,7 @@ unittests: $(UNITTARGETS)
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJS) $(TARGETS) $(UNITTARGETS) makedocset
|
||||
$(RM) libcupscgi.so libcupscgi.sl libcupscgi.dylib
|
||||
$(RM) libcupscgi.so libcupscgi.dylib
|
||||
|
||||
|
||||
#
|
||||
@@ -144,7 +142,7 @@ install-libs: $(INSTALLSTATIC)
|
||||
echo Installing libraries in $(LIBDIR)...
|
||||
$(INSTALL_DIR) -m 755 $(LIBDIR)
|
||||
$(INSTALL_LIB) $(LIBCUPSCGI) $(LIBDIR)
|
||||
if test $(LIBCUPSCGI) = "libcupscgi.so.1" -o $(LIBCUPSCGI) = "libcupscgi.sl.1"; then \
|
||||
if test $(LIBCUPSCGI) = "libcupscgi.so.1"; then \
|
||||
$(RM) $(LIBDIR)/`basename $(LIBCUPSCGI) .1`; \
|
||||
$(LN) $(LIBCUPSCGI) $(LIBDIR)/`basename $(LIBCUPSCGI) .1`; \
|
||||
fi
|
||||
@@ -177,9 +175,6 @@ uninstall:
|
||||
$(RM) $(LIBDIR)/libcupscgi.1.dylib
|
||||
$(RM) $(LIBDIR)/libcupscgi.a
|
||||
$(RM) $(LIBDIR)/libcupscgi.dylib
|
||||
$(RM) $(LIBDIR)/libcupscgi_s.a
|
||||
$(RM) $(LIBDIR)/libcupscgi.sl
|
||||
$(RM) $(LIBDIR)/libcupscgi.sl.1
|
||||
$(RM) $(LIBDIR)/libcupscgi.so
|
||||
$(RM) $(LIBDIR)/libcupscgi.so.1
|
||||
-$(RMDIR) $(LIBDIR)
|
||||
@@ -211,10 +206,10 @@ framedhelp:
|
||||
|
||||
|
||||
#
|
||||
# libcupscgi.so.1, libcupscgi.sl.1
|
||||
# libcupscgi.so.1
|
||||
#
|
||||
|
||||
libcupscgi.so.1 libcupscgi.sl.1: $(LIBOBJS)
|
||||
libcupscgi.so.1: $(LIBOBJS)
|
||||
echo Linking $@...
|
||||
$(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS) $(LIBS)
|
||||
$(RM) `basename $@ .1`
|
||||
@@ -237,17 +232,6 @@ libcupscgi.1.dylib: $(LIBOBJS) libcupscgi.exp
|
||||
$(LN) $@ libcupscgi.dylib
|
||||
|
||||
|
||||
#
|
||||
# libcupscgi_s.a
|
||||
#
|
||||
|
||||
libcupscgi_s.a: $(LIBOBJS)
|
||||
echo Creating $@...
|
||||
$(DSO) $(DSOFLAGS) -o libcupscgi_s.o $(LIBOBJS) $(LIBS)
|
||||
$(RM) $@
|
||||
$(AR) $(ARFLAGS) $@ libcupscgi_s.o
|
||||
|
||||
|
||||
#
|
||||
# libcupscgi.la
|
||||
#
|
||||
@@ -361,17 +345,6 @@ testtemplate: testtemplate.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
|
||||
$(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) $(LIBZ) $(LIBGSSAPI)
|
||||
|
||||
|
||||
#
|
||||
# websearch
|
||||
#
|
||||
|
||||
websearch: websearch.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ websearch.o libcupscgi.a \
|
||||
../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
|
||||
$(LIBZ) $(LIBGSSAPI)
|
||||
|
||||
|
||||
#
|
||||
# Dependencies...
|
||||
#
|
||||
@@ -380,5 +353,5 @@ include Dependencies
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
# End of "$Id: Makefile 11777 2014-03-28 19:18:10Z msweet $".
|
||||
#
|
||||
|
||||
+36
-56
@@ -1,37 +1,16 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: admin.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
*
|
||||
* Administration CGI for CUPS.
|
||||
* Administration CGI for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
* 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* main() - Main entry for CGI.
|
||||
* choose_device_cb() - Add a device to the device selection page.
|
||||
* do_add_rss_subscription() - Add a RSS subscription.
|
||||
* do_am_class() - Add or modify a class.
|
||||
* do_am_printer() - Add or modify a printer.
|
||||
* do_cancel_subscription() - Cancel a subscription.
|
||||
* do_config_server() - Configure server settings.
|
||||
* do_delete_class() - Delete a class.
|
||||
* do_delete_printer() - Delete a printer.
|
||||
* do_export() - Export printers to Samba.
|
||||
* do_list_printers() - List available printers.
|
||||
* do_menu() - Show the main menu.
|
||||
* do_set_allowed_users() - Set the allowed/denied users for a queue.
|
||||
* do_set_default() - Set the server default printer/class.
|
||||
* do_set_options() - Configure the default options for a queue.
|
||||
* do_set_sharing() - Set printer-is-shared value.
|
||||
* get_option_value() - Return the value of an option.
|
||||
* get_points() - Get a value in points.
|
||||
* 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/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -89,8 +68,7 @@ static double get_points(double number, const char *uval);
|
||||
*/
|
||||
|
||||
int /* O - Exit status */
|
||||
main(int argc, /* I - Number of command-line arguments */
|
||||
char *argv[]) /* I - Command-line arguments */
|
||||
main(void)
|
||||
{
|
||||
http_t *http; /* Connection to the server */
|
||||
const char *op; /* Operation name */
|
||||
@@ -1172,7 +1150,7 @@ do_am_printer(http_t *http, /* I - HTTP connection */
|
||||
char filename[1024]; /* PPD filename */
|
||||
ppd_file_t *ppd; /* PPD information */
|
||||
char buffer[1024]; /* Buffer */
|
||||
int bytes; /* Number of bytes */
|
||||
ssize_t bytes; /* Number of bytes */
|
||||
http_status_t get_status; /* Status of GET */
|
||||
|
||||
|
||||
@@ -1194,7 +1172,7 @@ do_am_printer(http_t *http, /* I - HTTP connection */
|
||||
else if ((fd = cupsTempFd(filename, sizeof(filename))) >= 0)
|
||||
{
|
||||
while ((bytes = httpRead2(http, buffer, sizeof(buffer))) > 0)
|
||||
write(fd, buffer, bytes);
|
||||
write(fd, buffer, (size_t)bytes);
|
||||
|
||||
close(fd);
|
||||
|
||||
@@ -1211,8 +1189,10 @@ do_am_printer(http_t *http, /* I - HTTP connection */
|
||||
}
|
||||
else
|
||||
{
|
||||
int linenum; /* Line number */
|
||||
|
||||
fprintf(stderr, "ERROR: Unable to open PPD file %s: %s\n",
|
||||
filename, ppdErrorString(ppdLastError(&bytes)));
|
||||
filename, ppdErrorString(ppdLastError(&linenum)));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1348,20 +1328,20 @@ do_am_printer(http_t *http, /* I - HTTP connection */
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, uri);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
var = cgiGetVariable("PPD_NAME");
|
||||
if (strcmp(var, "__no_change__"))
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
|
||||
NULL, var);
|
||||
}
|
||||
|
||||
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-location",
|
||||
NULL, cgiGetVariable("PRINTER_LOCATION"));
|
||||
|
||||
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-info",
|
||||
NULL, cgiGetVariable("PRINTER_INFO"));
|
||||
|
||||
if (!file)
|
||||
{
|
||||
var = cgiGetVariable("PPD_NAME");
|
||||
if (strcmp(var, "__no_change__"))
|
||||
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME, "ppd-name",
|
||||
NULL, var);
|
||||
}
|
||||
|
||||
strlcpy(uri, cgiGetVariable("DEVICE_URI"), sizeof(uri));
|
||||
|
||||
/*
|
||||
@@ -1380,7 +1360,7 @@ do_am_printer(http_t *http, /* I - HTTP connection */
|
||||
if ((uriptr = strchr(uri, '?')) == NULL)
|
||||
uriptr = uri + strlen(uri);
|
||||
|
||||
snprintf(uriptr, sizeof(uri) - (uriptr - uri),
|
||||
snprintf(uriptr, sizeof(uri) - (size_t)(uriptr - uri),
|
||||
"?baud=%s+bits=%s+parity=%s+flow=%s",
|
||||
cgiGetVariable("BAUDRATE"), cgiGetVariable("BITS"),
|
||||
cgiGetVariable("PARITY"), cgiGetVariable("FLOW"));
|
||||
@@ -1881,7 +1861,7 @@ do_config_server(http_t *http) /* I - HTTP connection */
|
||||
if ((end = strstr(start, "\n")) == NULL)
|
||||
end = start + strlen(start);
|
||||
|
||||
cupsFileWrite(temp, start, end - start);
|
||||
cupsFileWrite(temp, start, (size_t)(end - start));
|
||||
cupsFilePutChar(temp, '\n');
|
||||
|
||||
if (*end == '\r')
|
||||
@@ -2006,9 +1986,9 @@ do_config_server(http_t *http) /* I - HTTP connection */
|
||||
* Allocate memory and load the file into a string buffer...
|
||||
*/
|
||||
|
||||
if ((buffer = calloc(1, info.st_size + 1)) != NULL)
|
||||
if ((buffer = calloc(1, (size_t)info.st_size + 1)) != NULL)
|
||||
{
|
||||
cupsFileRead(cupsd, buffer, info.st_size);
|
||||
cupsFileRead(cupsd, buffer, (size_t)info.st_size);
|
||||
cgiSetVariable("CUPSDCONF", buffer);
|
||||
free(buffer);
|
||||
}
|
||||
@@ -2025,7 +2005,7 @@ do_config_server(http_t *http) /* I - HTTP connection */
|
||||
if (!stat(filename, &info) && info.st_size < (1024 * 1024) &&
|
||||
(cupsd = cupsFileOpen(filename, "r")) != NULL)
|
||||
{
|
||||
if ((buffer = calloc(1, 2 * info.st_size + 1)) != NULL)
|
||||
if ((buffer = calloc(1, 2 * (size_t)info.st_size + 1)) != NULL)
|
||||
{
|
||||
bufend = buffer + 2 * info.st_size - 1;
|
||||
|
||||
@@ -2035,7 +2015,7 @@ do_config_server(http_t *http) /* I - HTTP connection */
|
||||
if (ch == '\\' || ch == '\"')
|
||||
{
|
||||
*bufptr++ = '\\';
|
||||
*bufptr++ = ch;
|
||||
*bufptr++ = (char)ch;
|
||||
}
|
||||
else if (ch == '\n')
|
||||
{
|
||||
@@ -2048,7 +2028,7 @@ do_config_server(http_t *http) /* I - HTTP connection */
|
||||
*bufptr++ = 't';
|
||||
}
|
||||
else if (ch >= ' ')
|
||||
*bufptr++ = ch;
|
||||
*bufptr++ = (char)ch;
|
||||
}
|
||||
|
||||
*bufptr = '\0';
|
||||
@@ -3882,7 +3862,7 @@ do_set_sharing(http_t *http) /* I - HTTP connection */
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, uri);
|
||||
|
||||
ippAddBoolean(request, IPP_TAG_OPERATION, "printer-is-shared", atoi(shared));
|
||||
ippAddBoolean(request, IPP_TAG_OPERATION, "printer-is-shared", (char)atoi(shared));
|
||||
|
||||
/*
|
||||
* Do the request and get back a response...
|
||||
@@ -4096,7 +4076,7 @@ get_option_value(
|
||||
if ((val = cgiGetVariable(keyword)) == NULL)
|
||||
return (NULL);
|
||||
|
||||
snprintf(bufptr, bufend - bufptr, "%s%s=", prefix, cparam->name);
|
||||
snprintf(bufptr, (size_t)(bufend - bufptr), "%s%s=", prefix, cparam->name);
|
||||
bufptr += strlen(bufptr);
|
||||
prefix = " ";
|
||||
|
||||
@@ -4110,7 +4090,7 @@ get_option_value(
|
||||
number > cparam->maximum.custom_real)
|
||||
return (NULL);
|
||||
|
||||
snprintf(bufptr, bufend - bufptr, "%g", number);
|
||||
snprintf(bufptr, (size_t)(bufend - bufptr), "%g", number);
|
||||
break;
|
||||
|
||||
case PPD_CUSTOM_INT :
|
||||
@@ -4120,7 +4100,7 @@ get_option_value(
|
||||
integer > cparam->maximum.custom_int)
|
||||
return (NULL);
|
||||
|
||||
snprintf(bufptr, bufend - bufptr, "%ld", integer);
|
||||
snprintf(bufptr, (size_t)(bufend - bufptr), "%ld", integer);
|
||||
break;
|
||||
|
||||
case PPD_CUSTOM_POINTS :
|
||||
@@ -4138,7 +4118,7 @@ get_option_value(
|
||||
number_points > cparam->maximum.custom_points)
|
||||
return (NULL);
|
||||
|
||||
snprintf(bufptr, bufend - bufptr, "%g%s", number, uval);
|
||||
snprintf(bufptr, (size_t)(bufend - bufptr), "%g%s", number, uval);
|
||||
break;
|
||||
|
||||
case PPD_CUSTOM_PASSCODE :
|
||||
@@ -4218,5 +4198,5 @@ get_points(double number, /* I - Original number */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: admin.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: cgi-private.h 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* Private CGI definitions for CUPS.
|
||||
*
|
||||
@@ -32,5 +32,5 @@
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: cgi-private.h 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: cgi.h 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* CGI support library definitions for CUPS.
|
||||
*
|
||||
@@ -115,5 +115,5 @@ extern const char *cgiText(const char *message);
|
||||
#endif /* !_CUPS_CGI_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: cgi.h 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
+15
-23
@@ -1,23 +1,16 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: classes.c 11928 2014-06-13 00:08:32Z msweet $"
|
||||
*
|
||||
* Class status CGI for CUPS.
|
||||
* Class status CGI for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
* 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* main() - Main entry for CGI.
|
||||
* do_class_op() - Do a class operation.
|
||||
* show_all_classes() - Show all classes...
|
||||
* show_class() - Show a single class.
|
||||
* 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/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -42,8 +35,7 @@ static void show_class(http_t *http, const char *printer);
|
||||
*/
|
||||
|
||||
int /* O - Exit status */
|
||||
main(int argc, /* I - Number of command-line arguments */
|
||||
char *argv[]) /* I - Command-line arguments */
|
||||
main(void)
|
||||
{
|
||||
const char *pclass; /* Class name */
|
||||
const char *user; /* Username */
|
||||
@@ -169,8 +161,8 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
do_class_op(http, pclass, CUPS_ACCEPT_JOBS, cgiText(_("Accept Jobs")));
|
||||
else if (!strcmp(op, "reject-jobs"))
|
||||
do_class_op(http, pclass, CUPS_REJECT_JOBS, cgiText(_("Reject Jobs")));
|
||||
else if (!strcmp(op, "purge-jobs"))
|
||||
do_class_op(http, pclass, IPP_PURGE_JOBS, cgiText(_("Purge Jobs")));
|
||||
else if (!strcmp(op, "cancel-jobs"))
|
||||
do_class_op(http, pclass, IPP_OP_CANCEL_JOBS, cgiText(_("Cancel Jobs")));
|
||||
else if (!_cups_strcasecmp(op, "print-test-page"))
|
||||
cgiPrintTestPage(http, pclass);
|
||||
else if (!_cups_strcasecmp(op, "move-jobs"))
|
||||
@@ -286,8 +278,8 @@ do_class_op(http_t *http, /* I - HTTP connection */
|
||||
cgiCopyTemplateLang("printer-accept.tmpl");
|
||||
else if (op == CUPS_REJECT_JOBS)
|
||||
cgiCopyTemplateLang("printer-reject.tmpl");
|
||||
else if (op == IPP_PURGE_JOBS)
|
||||
cgiCopyTemplateLang("printer-purge.tmpl");
|
||||
else if (op == IPP_OP_CANCEL_JOBS)
|
||||
cgiCopyTemplateLang("printer-cancel-jobs.tmpl");
|
||||
}
|
||||
|
||||
cgiEndHTML();
|
||||
@@ -554,5 +546,5 @@ show_class(http_t *http, /* I - Connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: classes.c 11928 2014-06-13 00:08:32Z msweet $".
|
||||
*/
|
||||
|
||||
+16
-34
@@ -1,34 +1,16 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: help-index.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
*
|
||||
* Online help index routines for CUPS.
|
||||
* Online help index routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
* 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* helpDeleteIndex() - Delete an index, freeing all memory used.
|
||||
* helpFindNode() - Find a node in an index.
|
||||
* helpLoadIndex() - Load a help index from disk.
|
||||
* helpSaveIndex() - Save a help index to disk.
|
||||
* helpSearchIndex() - Search an index.
|
||||
* help_add_word() - Add a word to a node.
|
||||
* help_compile_search() - Convert a search string into a regular expression.
|
||||
* help_delete_node() - Free all memory used by a node.
|
||||
* help_delete_word() - Free all memory used by a word.
|
||||
* help_load_directory() - Load a directory of files into an index.
|
||||
* help_load_file() - Load a HTML files into an index.
|
||||
* help_new_node() - Create a new node and add it to an index.
|
||||
* help_sort_nodes_by_name() - Sort nodes by section, filename, and anchor.
|
||||
* help_sort_nodes_by_score() - Sort nodes by score and text.
|
||||
* help_sort_words() - Sort words alphabetically.
|
||||
* 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/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -346,7 +328,7 @@ helpLoadIndex(const char *hifile, /* I - Index filename */
|
||||
mtime = strtol(ptr, &ptr, 10);
|
||||
|
||||
offset = strtoll(ptr, &ptr, 10);
|
||||
length = strtoll(ptr, &ptr, 10);
|
||||
length = (size_t)strtoll(ptr, &ptr, 10);
|
||||
|
||||
while (isspace(*ptr & 255))
|
||||
ptr ++;
|
||||
@@ -1019,14 +1001,14 @@ help_load_file(
|
||||
|
||||
*ptr++ = ' ';
|
||||
|
||||
if (!cupsFileGets(fp, ptr, sizeof(line) - (ptr - line) - 1))
|
||||
if (!cupsFileGets(fp, ptr, sizeof(line) - (size_t)(ptr - line) - 1))
|
||||
break;
|
||||
}
|
||||
|
||||
*ptr = '\0';
|
||||
|
||||
if (node)
|
||||
node->length = offset - node->offset;
|
||||
node->length = (size_t)(offset - node->offset);
|
||||
|
||||
if (!*text)
|
||||
{
|
||||
@@ -1179,9 +1161,9 @@ help_load_file(
|
||||
|
||||
for (text = ptr, ptr ++; *ptr && isalnum(*ptr & 255); ptr ++);
|
||||
|
||||
wordlen = ptr - text;
|
||||
wordlen = (int)(ptr - text);
|
||||
|
||||
memcpy(temp, text, wordlen);
|
||||
memcpy(temp, text, (size_t)wordlen);
|
||||
temp[wordlen] = '\0';
|
||||
|
||||
ptr --;
|
||||
@@ -1206,7 +1188,7 @@ help_load_file(
|
||||
cupsFileClose(fp);
|
||||
|
||||
if (node)
|
||||
node->length = offset - node->offset;
|
||||
node->length = (size_t)(offset - node->offset);
|
||||
|
||||
return (0);
|
||||
}
|
||||
@@ -1324,5 +1306,5 @@ help_sort_words(help_word_t *w1, /* I - Second word */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: help-index.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: help-index.h 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* Online help index definitions for CUPS.
|
||||
*
|
||||
@@ -83,5 +83,5 @@ extern help_index_t *helpSearchIndex(help_index_t *hi, const char *query,
|
||||
#endif /* !_CUPS_HELP_INDEX_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: help-index.h 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: help.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* Online help CGI for CUPS.
|
||||
*
|
||||
@@ -393,5 +393,5 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: help.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: html.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* HTML support functions for CUPS.
|
||||
*
|
||||
@@ -235,5 +235,5 @@ cgi_null_passwd(const char *prompt) /* I - Prompt string (unused) */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: html.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
+28
-56
@@ -1,31 +1,16 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: ipp-var.c 11889 2014-05-22 13:54:15Z msweet $"
|
||||
*
|
||||
* CGI <-> IPP variable routines for CUPS.
|
||||
* CGI <-> IPP variable routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
* 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* cgiGetAttributes() - Get the list of attributes that are needed by the
|
||||
* template file.
|
||||
* cgiGetIPPObjects() - Get the objects in an IPP response.
|
||||
* cgiMoveJobs() - Move one or more jobs.
|
||||
* cgiPrintCommand() - Print a CUPS command job.
|
||||
* cgiPrintTestPage() - Print a test page.
|
||||
* cgiRewriteURL() - Rewrite a printer URI into a web browser URL...
|
||||
* cgiSetIPPObjectVars() - Set CGI variables from an IPP object.
|
||||
* cgiSetIPPVars() - Set CGI variables from an IPP response.
|
||||
* cgiShowIPPError() - Show the last IPP error message.
|
||||
* cgiShowJobs() - Show print jobs.
|
||||
* cgiText() - Return localized text.
|
||||
* 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/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -65,7 +50,7 @@ cgiGetAttributes(ipp_t *request, /* I - IPP request */
|
||||
{
|
||||
for (i = 0; lang[i] && i < 15; i ++)
|
||||
if (isalnum(lang[i] & 255))
|
||||
locale[i] = tolower(lang[i]);
|
||||
locale[i] = (char)tolower(lang[i]);
|
||||
else
|
||||
locale[i] = '_';
|
||||
|
||||
@@ -107,7 +92,7 @@ cgiGetAttributes(ipp_t *request, /* I - IPP request */
|
||||
while ((ch = getc(in)) != EOF)
|
||||
if (ch == '\\')
|
||||
getc(in);
|
||||
else if (ch == '{' && num_attrs < (sizeof(attrs) / sizeof(attrs[0])))
|
||||
else if (ch == '{' && num_attrs < (int)(sizeof(attrs) / sizeof(attrs[0])))
|
||||
{
|
||||
/*
|
||||
* Grab the name...
|
||||
@@ -123,7 +108,7 @@ cgiGetAttributes(ipp_t *request, /* I - IPP request */
|
||||
if (ch == '_')
|
||||
*nameptr++ = '-';
|
||||
else
|
||||
*nameptr++ = ch;
|
||||
*nameptr++ = (char)ch;
|
||||
}
|
||||
|
||||
*nameptr = '\0';
|
||||
@@ -917,7 +902,7 @@ cgiRewriteURL(const char *uri, /* I - Current URI */
|
||||
* Make URI relative to the current server...
|
||||
*/
|
||||
|
||||
strlcpy(url, resource, urlsize);
|
||||
strlcpy(url, resource, (size_t)urlsize);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -926,17 +911,13 @@ cgiRewriteURL(const char *uri, /* I - Current URI */
|
||||
*/
|
||||
|
||||
if (userpass[0])
|
||||
snprintf(url, urlsize, "%s://%s@%s:%d%s",
|
||||
ishttps ? "https" : "http",
|
||||
userpass, hostname, port, resource);
|
||||
snprintf(url, (size_t)urlsize, "%s://%s@%s:%d%s", ishttps ? "https" : "http", userpass, hostname, port, resource);
|
||||
else
|
||||
snprintf(url, urlsize, "%s://%s:%d%s",
|
||||
ishttps ? "https" : "http",
|
||||
hostname, port, resource);
|
||||
snprintf(url, (size_t)urlsize, "%s://%s:%d%s", ishttps ? "https" : "http", hostname, port, resource);
|
||||
}
|
||||
}
|
||||
else
|
||||
strlcpy(url, uri, urlsize);
|
||||
strlcpy(url, uri, (size_t)urlsize);
|
||||
|
||||
return (url);
|
||||
}
|
||||
@@ -958,7 +939,6 @@ cgiSetIPPObjectVars(
|
||||
*nameptr, /* Pointer into name */
|
||||
value[16384], /* Value(s) */
|
||||
*valptr; /* Pointer into value */
|
||||
struct tm *date; /* Date information */
|
||||
|
||||
|
||||
fprintf(stderr, "DEBUG2: cgiSetIPPObjectVars(obj=%p, prefix=\"%s\", "
|
||||
@@ -1039,7 +1019,7 @@ cgiSetIPPObjectVars(
|
||||
*valptr++ = ' ';
|
||||
}
|
||||
|
||||
remaining = sizeof(value) - (valptr - value);
|
||||
remaining = sizeof(value) - (size_t)(valptr - value);
|
||||
|
||||
if (!strcmp(attr->values[i].string.text, "printer-stopped"))
|
||||
strlcpy(valptr, _("Printer Paused"), remaining);
|
||||
@@ -1177,7 +1157,7 @@ cgiSetIPPObjectVars(
|
||||
for (i = 0; i < attr->num_values; i ++)
|
||||
{
|
||||
if (i)
|
||||
strlcat(valptr, ", ", sizeof(value) - (valptr - value));
|
||||
strlcat(valptr, ", ", sizeof(value) - (size_t)(valptr - value));
|
||||
|
||||
valptr += strlen(valptr);
|
||||
|
||||
@@ -1186,36 +1166,28 @@ cgiSetIPPObjectVars(
|
||||
case IPP_TAG_INTEGER :
|
||||
case IPP_TAG_ENUM :
|
||||
if (strncmp(name, "time_at_", 8) == 0)
|
||||
{
|
||||
time_t t; /* Temporary time value */
|
||||
|
||||
t = (time_t)attr->values[i].integer;
|
||||
date = localtime(&t);
|
||||
|
||||
strftime(valptr, sizeof(value) - (valptr - value), "%c", date);
|
||||
}
|
||||
_cupsStrDate(valptr, sizeof(value) - (size_t)(valptr - value), (time_t)ippGetInteger(attr, i));
|
||||
else
|
||||
snprintf(valptr, sizeof(value) - (valptr - value),
|
||||
"%d", attr->values[i].integer);
|
||||
snprintf(valptr, sizeof(value) - (size_t)(valptr - value), "%d", ippGetInteger(attr, i));
|
||||
break;
|
||||
|
||||
case IPP_TAG_BOOLEAN :
|
||||
snprintf(valptr, sizeof(value) - (valptr - value),
|
||||
snprintf(valptr, sizeof(value) - (size_t)(valptr - value),
|
||||
"%d", attr->values[i].boolean);
|
||||
break;
|
||||
|
||||
case IPP_TAG_NOVALUE :
|
||||
strlcat(valptr, "novalue", sizeof(value) - (valptr - value));
|
||||
strlcat(valptr, "novalue", sizeof(value) - (size_t)(valptr - value));
|
||||
break;
|
||||
|
||||
case IPP_TAG_RANGE :
|
||||
snprintf(valptr, sizeof(value) - (valptr - value),
|
||||
snprintf(valptr, sizeof(value) - (size_t)(valptr - value),
|
||||
"%d-%d", attr->values[i].range.lower,
|
||||
attr->values[i].range.upper);
|
||||
break;
|
||||
|
||||
case IPP_TAG_RESOLUTION :
|
||||
snprintf(valptr, sizeof(value) - (valptr - value),
|
||||
snprintf(valptr, sizeof(value) - (size_t)(valptr - value),
|
||||
"%dx%d%s", attr->values[i].resolution.xres,
|
||||
attr->values[i].resolution.yres,
|
||||
attr->values[i].resolution.units == IPP_RES_PER_INCH ?
|
||||
@@ -1238,13 +1210,13 @@ cgiSetIPPObjectVars(
|
||||
cgiRewriteURL(attr->values[i].string.text, url,
|
||||
sizeof(url), NULL);
|
||||
|
||||
snprintf(valptr, sizeof(value) - (valptr - value),
|
||||
snprintf(valptr, sizeof(value) - (size_t)(valptr - value),
|
||||
"<A HREF=\"%s\">%s</A>", url,
|
||||
strrchr(attr->values[i].string.text, '/') + 1);
|
||||
}
|
||||
else
|
||||
cgiRewriteURL(attr->values[i].string.text, valptr,
|
||||
sizeof(value) - (valptr - value), NULL);
|
||||
(int)(sizeof(value) - (size_t)(valptr - value)), NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1256,7 +1228,7 @@ cgiSetIPPObjectVars(
|
||||
case IPP_TAG_LANGUAGE :
|
||||
case IPP_TAG_MIMETYPE :
|
||||
strlcat(valptr, attr->values[i].string.text,
|
||||
sizeof(value) - (valptr - value));
|
||||
sizeof(value) - (size_t)(valptr - value));
|
||||
break;
|
||||
|
||||
case IPP_TAG_BEGIN_COLLECTION :
|
||||
@@ -1589,5 +1561,5 @@ cgiText(const char *message) /* I - Message */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: ipp-var.c 11889 2014-05-22 13:54:15Z msweet $".
|
||||
*/
|
||||
|
||||
+11
-17
@@ -1,21 +1,16 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: jobs.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Job status CGI for CUPS.
|
||||
* Job status CGI for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
* 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* main() - Main entry for CGI.
|
||||
* do_job_op() - Do a job operation.
|
||||
* 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/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -37,8 +32,7 @@ static void do_job_op(http_t *http, int job_id, ipp_op_t op);
|
||||
*/
|
||||
|
||||
int /* O - Exit status */
|
||||
main(int argc, /* I - Number of command-line arguments */
|
||||
char *argv[]) /* I - Command-line arguments */
|
||||
main(void)
|
||||
{
|
||||
http_t *http; /* Connection to the server */
|
||||
const char *op; /* Operation name */
|
||||
@@ -210,5 +204,5 @@ do_job_op(http_t *http, /* I - HTTP connection */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: jobs.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: makedocset.c 3833 2012-05-23 22:51:18Z msweet $"
|
||||
*
|
||||
* Xcode documentation set generator.
|
||||
*
|
||||
@@ -482,5 +482,5 @@ write_nodes(const char *path, /* I - File to write */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: makedocset.c 3833 2012-05-23 22:51:18Z msweet $".
|
||||
*/
|
||||
|
||||
+15
-23
@@ -1,23 +1,16 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: printers.c 11928 2014-06-13 00:08:32Z msweet $"
|
||||
*
|
||||
* Printer status CGI for CUPS.
|
||||
* Printer status CGI for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
* 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* main() - Main entry for CGI.
|
||||
* do_printer_op() - Do a printer operation.
|
||||
* show_all_printers() - Show all printers...
|
||||
* show_printer() - Show a single printer.
|
||||
* 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/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -43,8 +36,7 @@ static void show_printer(http_t *http, const char *printer);
|
||||
*/
|
||||
|
||||
int /* O - Exit status */
|
||||
main(int argc, /* I - Number of command-line arguments */
|
||||
char *argv[]) /* I - Command-line arguments */
|
||||
main(void)
|
||||
{
|
||||
const char *printer; /* Printer name */
|
||||
const char *user; /* Username */
|
||||
@@ -172,8 +164,8 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
do_printer_op(http, printer, CUPS_ACCEPT_JOBS, cgiText(_("Accept Jobs")));
|
||||
else if (!strcmp(op, "reject-jobs"))
|
||||
do_printer_op(http, printer, CUPS_REJECT_JOBS, cgiText(_("Reject Jobs")));
|
||||
else if (!strcmp(op, "purge-jobs"))
|
||||
do_printer_op(http, printer, IPP_PURGE_JOBS, cgiText(_("Purge Jobs")));
|
||||
else if (!strcmp(op, "cancel-jobs"))
|
||||
do_printer_op(http, printer, IPP_OP_CANCEL_JOBS, cgiText(_("Cancel Jobs")));
|
||||
else if (!_cups_strcasecmp(op, "print-self-test-page"))
|
||||
cgiPrintCommand(http, printer, "PrintSelfTestPage",
|
||||
cgiText(_("Print Self-Test Page")));
|
||||
@@ -293,8 +285,8 @@ do_printer_op(http_t *http, /* I - HTTP connection */
|
||||
cgiCopyTemplateLang("printer-accept.tmpl");
|
||||
else if (op == CUPS_REJECT_JOBS)
|
||||
cgiCopyTemplateLang("printer-reject.tmpl");
|
||||
else if (op == IPP_PURGE_JOBS)
|
||||
cgiCopyTemplateLang("printer-purge.tmpl");
|
||||
else if (op == IPP_OP_CANCEL_JOBS)
|
||||
cgiCopyTemplateLang("printer-cancel-jobs.tmpl");
|
||||
}
|
||||
|
||||
cgiEndHTML();
|
||||
@@ -574,5 +566,5 @@ show_printer(http_t *http, /* I - Connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: printers.c 11928 2014-06-13 00:08:32Z msweet $".
|
||||
*/
|
||||
|
||||
+14
-20
@@ -1,22 +1,16 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: search.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Search routines for CUPS.
|
||||
* Search routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
* 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* cgiCompileSearch() - Compile a search string.
|
||||
* cgiDoSearch() - Do a search of some text.
|
||||
* cgiFreeSearch() - Free a compiled search context.
|
||||
* 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/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -38,12 +32,12 @@ cgiCompileSearch(const char *query) /* I - Query string */
|
||||
char *s, /* Regular expression string */
|
||||
*sptr, /* Pointer into RE string */
|
||||
*sword; /* Pointer to start of word */
|
||||
int slen; /* Allocated size of RE string */
|
||||
size_t slen; /* Allocated size of RE string */
|
||||
const char *qptr, /* Pointer into query string */
|
||||
*qend; /* End of current word */
|
||||
const char *prefix; /* Prefix to add to next word */
|
||||
int quoted; /* Word is quoted */
|
||||
int wlen; /* Word length */
|
||||
size_t wlen; /* Word length */
|
||||
char *lword; /* Last word in query */
|
||||
|
||||
|
||||
@@ -139,7 +133,7 @@ cgiCompileSearch(const char *query) /* I - Query string */
|
||||
for (qend = qptr + 1; *qend && !isspace(*qend); qend ++);
|
||||
}
|
||||
|
||||
wlen = qend - qptr;
|
||||
wlen = (size_t)(qend - qptr);
|
||||
|
||||
/*
|
||||
* Look for logic words: AND, OR
|
||||
@@ -174,7 +168,7 @@ cgiCompileSearch(const char *query) /* I - Query string */
|
||||
* string + RE overhead...
|
||||
*/
|
||||
|
||||
wlen = (sptr - s) + 2 * 4 * wlen + 2 * strlen(prefix) + 11;
|
||||
wlen = (size_t)(sptr - s) + 2 * 4 * wlen + 2 * strlen(prefix) + 11;
|
||||
if (lword)
|
||||
wlen += strlen(lword);
|
||||
|
||||
@@ -377,5 +371,5 @@ cgiFreeSearch(void *search) /* I - Search context */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: search.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+20
-31
@@ -1,27 +1,16 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: template.c 11685 2014-03-05 20:03:29Z msweet $"
|
||||
*
|
||||
* CGI template function.
|
||||
* CGI template function.
|
||||
*
|
||||
* Copyright 2007-2011 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
* 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* cgiCopyTemplateFile() - Copy a template file and replace all the
|
||||
* '{variable}' strings with the variable value.
|
||||
* cgiCopyTemplateLang() - Copy a template file using a language...
|
||||
* cgiGetTemplateDir() - Get the templates directory...
|
||||
* cgiSetServerVersion() - Set the server name and CUPS version...
|
||||
* cgi_copy() - Copy the template file, substituting as needed...
|
||||
* cgi_puts() - Put a string to the output file, quoting as
|
||||
* needed...
|
||||
* 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 "cgi-private.h"
|
||||
@@ -266,7 +255,7 @@ cgi_copy(FILE *out, /* I - Output file */
|
||||
else if (s > name && ch == '?')
|
||||
break;
|
||||
else if (s < (name + sizeof(name) - 1))
|
||||
*s++ = ch;
|
||||
*s++ = (char)ch;
|
||||
|
||||
*s = '\0';
|
||||
|
||||
@@ -443,7 +432,7 @@ cgi_copy(FILE *out, /* I - Output file */
|
||||
* {name~refex?true:false} Regex match
|
||||
*/
|
||||
|
||||
op = ch;
|
||||
op = (char)ch;
|
||||
|
||||
if (ch == '?')
|
||||
{
|
||||
@@ -486,7 +475,7 @@ cgi_copy(FILE *out, /* I - Output file */
|
||||
innerptr = innername;
|
||||
while ((ch = getc(in)) != EOF && ch != '}')
|
||||
if (innerptr < (innername + sizeof(innername) - 1))
|
||||
*innerptr++ = ch;
|
||||
*innerptr++ = (char)ch;
|
||||
*innerptr = '\0';
|
||||
|
||||
if (innername[0] == '#')
|
||||
@@ -498,26 +487,26 @@ cgi_copy(FILE *out, /* I - Output file */
|
||||
if ((innerval = cgiGetArray(innername, atoi(innerptr) - 1)) == NULL)
|
||||
*s = '\0';
|
||||
else
|
||||
strlcpy(s, innerval, sizeof(compare) - (s - compare));
|
||||
strlcpy(s, innerval, sizeof(compare) - (size_t)(s - compare));
|
||||
}
|
||||
else if (innername[0] == '?')
|
||||
{
|
||||
if ((innerval = cgiGetArray(innername + 1, element)) == NULL)
|
||||
*s = '\0';
|
||||
else
|
||||
strlcpy(s, innerval, sizeof(compare) - (s - compare));
|
||||
strlcpy(s, innerval, sizeof(compare) - (size_t)(s - compare));
|
||||
}
|
||||
else if ((innerval = cgiGetArray(innername, element)) == NULL)
|
||||
snprintf(s, sizeof(compare) - (s - compare), "{%s}", innername);
|
||||
snprintf(s, sizeof(compare) - (size_t)(s - compare), "{%s}", innername);
|
||||
else
|
||||
strlcpy(s, innerval, sizeof(compare) - (s - compare));
|
||||
strlcpy(s, innerval, sizeof(compare) - (size_t)(s - compare));
|
||||
|
||||
s += strlen(s);
|
||||
}
|
||||
else if (ch == '\\')
|
||||
*s++ = getc(in);
|
||||
*s++ = (char)getc(in);
|
||||
else
|
||||
*s++ = ch;
|
||||
*s++ = (char)ch;
|
||||
|
||||
*s = '\0';
|
||||
|
||||
@@ -553,7 +542,7 @@ cgi_copy(FILE *out, /* I - Output file */
|
||||
if (regcomp(&re, compare, REG_EXTENDED | REG_ICASE))
|
||||
{
|
||||
fprintf(stderr,
|
||||
"ERROR: Unable to compile regular expresion \"%s\"!\n",
|
||||
"ERROR: Unable to compile regular expression \"%s\"!\n",
|
||||
compare);
|
||||
result = 0;
|
||||
}
|
||||
@@ -729,5 +718,5 @@ cgi_puturi(const char *s, /* I - String to output */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: template.c 11685 2014-03-05 20:03:29Z msweet $".
|
||||
*/
|
||||
|
||||
+11
-17
@@ -1,21 +1,16 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: testcgi.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* CGI test program for CUPS.
|
||||
* CGI test program for CUPS.
|
||||
*
|
||||
* Copyright 2007-2011 by Apple Inc.
|
||||
* Copyright 1997-2005 by Easy Software Products.
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 1997-2005 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...
|
||||
* 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/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -30,8 +25,7 @@
|
||||
*/
|
||||
|
||||
int /* O - Exit status */
|
||||
main(int argc, /* I - Number of command-line arguments */
|
||||
char *argv[]) /* I - Command-line arguments */
|
||||
main(void)
|
||||
{
|
||||
/*
|
||||
* Test file upload/multi-part submissions...
|
||||
@@ -71,5 +65,5 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: testcgi.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: testhi.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* Help index test program for CUPS.
|
||||
*
|
||||
@@ -109,5 +109,5 @@ list_nodes(const char *title, /* I - Title string */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: testhi.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: testtemplate.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* CGI template test program for CUPS.
|
||||
*
|
||||
@@ -99,5 +99,5 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: testtemplate.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
+41
-70
@@ -1,49 +1,20 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: var.c 12034 2014-07-16 19:37:34Z msweet $"
|
||||
*
|
||||
* CGI form variable and array functions for CUPS.
|
||||
* CGI form variable and array functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2011 by Apple Inc.
|
||||
* Copyright 1997-2005 by Easy Software Products.
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 1997-2005 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:
|
||||
*
|
||||
* cgiCheckVariables() - Check for the presence of "required"
|
||||
* variables.
|
||||
* cgiClearVariables() - Clear all form variables.
|
||||
* cgiGetArray() - Get an element from a form array.
|
||||
* cgiGetCookie() - Get a cookie value.
|
||||
* cgiGetFile() - Get the file (if any) that was submitted in
|
||||
* the form.
|
||||
* cgiGetSize() - Get the size of a form array value.
|
||||
* cgiGetVariable() - Get a CGI variable from the database.
|
||||
* cgiInitialize() - Initialize the CGI variable "database".
|
||||
* cgiIsPOST() - Determine whether this page was POSTed.
|
||||
* cgiSetArray() - Set array element N to the specified string.
|
||||
* cgiSetCookie() - Set a cookie value.
|
||||
* cgiSetSize() - Set the array size.
|
||||
* cgiSetVariable() - Set a CGI variable in the database.
|
||||
* cgi_add_variable() - Add a form variable.
|
||||
* cgi_compare_variables() - Compare two variables.
|
||||
* cgi_find_variable() - Find a variable.
|
||||
* cgi_initialize_cookies() - Initialize cookies.
|
||||
* cgi_initialize_get() - Initialize form variables using the GET
|
||||
* method.
|
||||
* cgi_initialize_multipart() - Initialize variables and file using the POST
|
||||
* method.
|
||||
* cgi_initialize_post() - Initialize variables using the POST method.
|
||||
* cgi_initialize_string() - Initialize form variables from a string.
|
||||
* cgi_passwd() - Catch authentication requests and notify the
|
||||
* server.
|
||||
* cgi_set_sid() - Set the CUPS session ID.
|
||||
* cgi_sort_variables() - Sort all form variables for faster lookup.
|
||||
* cgi_unlink_file() - Remove the uploaded form.
|
||||
* 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 necessary headers...
|
||||
*/
|
||||
|
||||
/*#define DEBUG*/
|
||||
@@ -417,7 +388,7 @@ cgiSetArray(const char *name, /* I - Name of variable */
|
||||
const char **temp; /* Temporary pointer */
|
||||
|
||||
temp = (const char **)realloc((void *)(var->values),
|
||||
sizeof(char *) * (element + 16));
|
||||
sizeof(char *) * (size_t)(element + 16));
|
||||
if (!temp)
|
||||
return;
|
||||
|
||||
@@ -466,9 +437,9 @@ cgiSetCookie(const char *name, /* I - Name */
|
||||
printf(" expires=%s;", httpGetDateString2(expires, date, sizeof(date)));
|
||||
}
|
||||
if (secure)
|
||||
puts(" secure;");
|
||||
puts(" httponly; secure;");
|
||||
else
|
||||
putchar('\n');
|
||||
puts(" httponly;");
|
||||
}
|
||||
|
||||
|
||||
@@ -495,7 +466,7 @@ cgiSetSize(const char *name, /* I - Name of variable */
|
||||
const char **temp; /* Temporary pointer */
|
||||
|
||||
temp = (const char **)realloc((void *)(var->values),
|
||||
sizeof(char *) * (size + 16));
|
||||
sizeof(char *) * (size_t)(size + 16));
|
||||
if (!temp)
|
||||
return;
|
||||
|
||||
@@ -581,7 +552,7 @@ cgi_add_variable(const char *name, /* I - Variable name */
|
||||
if (form_alloc == 0)
|
||||
temp_vars = malloc(sizeof(_cgi_var_t) * 16);
|
||||
else
|
||||
temp_vars = realloc(form_vars, (form_alloc + 16) * sizeof(_cgi_var_t));
|
||||
temp_vars = realloc(form_vars, (size_t)(form_alloc + 16) * sizeof(_cgi_var_t));
|
||||
|
||||
if (!temp_vars)
|
||||
return;
|
||||
@@ -592,7 +563,7 @@ cgi_add_variable(const char *name, /* I - Variable name */
|
||||
|
||||
var = form_vars + form_count;
|
||||
|
||||
if ((var->values = calloc(element + 1, sizeof(char *))) == NULL)
|
||||
if ((var->values = calloc((size_t)element + 1, sizeof(char *))) == NULL)
|
||||
return;
|
||||
|
||||
var->name = _cupsStrAlloc(name);
|
||||
@@ -632,7 +603,7 @@ cgi_find_variable(const char *name) /* I - Name of variable */
|
||||
|
||||
key.name = name;
|
||||
|
||||
return ((_cgi_var_t *)bsearch(&key, form_vars, form_count, sizeof(_cgi_var_t),
|
||||
return ((_cgi_var_t *)bsearch(&key, form_vars, (size_t)form_count, sizeof(_cgi_var_t),
|
||||
(int (*)(const void *, const void *))cgi_compare_variables));
|
||||
}
|
||||
|
||||
@@ -769,8 +740,8 @@ cgi_initialize_multipart(
|
||||
*ptr, /* Pointer into name/filename */
|
||||
*end; /* End of buffer */
|
||||
int ch, /* Character from file */
|
||||
fd, /* Temporary file descriptor */
|
||||
blen; /* Length of boundary string */
|
||||
fd; /* Temporary file descriptor */
|
||||
size_t blen; /* Length of boundary string */
|
||||
|
||||
|
||||
DEBUG_printf(("cgi_initialize_multipart(boundary=\"%s\")\n", boundary));
|
||||
@@ -835,22 +806,22 @@ cgi_initialize_multipart(
|
||||
|
||||
while ((ch = getchar()) != EOF)
|
||||
{
|
||||
*ptr++ = ch;
|
||||
*ptr++ = (char)ch;
|
||||
|
||||
if ((ptr - line) >= blen && !memcmp(ptr - blen, bstring, blen))
|
||||
if ((size_t)(ptr - line) >= blen && !memcmp(ptr - blen, bstring, blen))
|
||||
{
|
||||
ptr -= blen;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((ptr - line - blen) >= 8192)
|
||||
if ((ptr - line - (int)blen) >= 8192)
|
||||
{
|
||||
/*
|
||||
* Write out the first 8k of the buffer...
|
||||
*/
|
||||
|
||||
write(fd, line, 8192);
|
||||
memmove(line, line + 8192, ptr - line - 8192);
|
||||
memmove(line, line + 8192, (size_t)(ptr - line - 8192));
|
||||
ptr -= 8192;
|
||||
}
|
||||
}
|
||||
@@ -860,7 +831,7 @@ cgi_initialize_multipart(
|
||||
*/
|
||||
|
||||
if (ptr > line)
|
||||
write(fd, line, ptr - line);
|
||||
write(fd, line, (size_t)(ptr - line));
|
||||
|
||||
close(fd);
|
||||
}
|
||||
@@ -877,9 +848,9 @@ cgi_initialize_multipart(
|
||||
while ((ch = getchar()) != EOF)
|
||||
{
|
||||
if (ptr < end)
|
||||
*ptr++ = ch;
|
||||
*ptr++ = (char)ch;
|
||||
|
||||
if ((ptr - line) >= blen && !memcmp(ptr - blen, bstring, blen))
|
||||
if ((size_t)(ptr - line) >= blen && !memcmp(ptr - blen, bstring, blen))
|
||||
{
|
||||
ptr -= blen;
|
||||
break;
|
||||
@@ -979,12 +950,12 @@ cgi_initialize_multipart(
|
||||
static int /* O - 1 if form data was read */
|
||||
cgi_initialize_post(void)
|
||||
{
|
||||
char *content_length, /* Length of input data (string) */
|
||||
*data; /* Pointer to form data string */
|
||||
int length, /* Length of input data */
|
||||
nbytes, /* Number of bytes read this read() */
|
||||
tbytes, /* Total number of bytes read */
|
||||
status; /* Return status */
|
||||
char *content_length, /* Length of input data (string) */
|
||||
*data; /* Pointer to form data string */
|
||||
size_t length, /* Length of input data */
|
||||
tbytes; /* Total number of bytes read */
|
||||
ssize_t nbytes; /* Number of bytes read this read() */
|
||||
int status; /* Return status */
|
||||
|
||||
|
||||
DEBUG_puts("cgi_initialize_post: Initializing variables using POST method...");
|
||||
@@ -1001,7 +972,7 @@ cgi_initialize_post(void)
|
||||
* Get the length of the input stream and allocate a buffer for it...
|
||||
*/
|
||||
|
||||
length = atoi(content_length);
|
||||
length = (size_t)strtol(content_length, NULL, 10);
|
||||
data = malloc(length + 1);
|
||||
|
||||
if (data == NULL)
|
||||
@@ -1011,8 +982,8 @@ cgi_initialize_post(void)
|
||||
* Read the data into the buffer...
|
||||
*/
|
||||
|
||||
for (tbytes = 0; tbytes < length; tbytes += nbytes)
|
||||
if ((nbytes = read(0, data + tbytes, length - tbytes)) < 0)
|
||||
for (tbytes = 0; tbytes < length; tbytes += (size_t)nbytes)
|
||||
if ((nbytes = read(0, data + tbytes, (size_t)(length - tbytes))) < 0)
|
||||
{
|
||||
if (errno != EAGAIN)
|
||||
{
|
||||
@@ -1126,7 +1097,7 @@ cgi_initialize_string(const char *data) /* I - Form data string */
|
||||
ch = *data - '0';
|
||||
if (ch > 9)
|
||||
ch -= 7;
|
||||
*s = ch << 4;
|
||||
*s = (char)(ch << 4);
|
||||
|
||||
data ++;
|
||||
ch = *data - '0';
|
||||
@@ -1264,7 +1235,7 @@ cgi_sort_variables(void)
|
||||
if (form_count < 2)
|
||||
return;
|
||||
|
||||
qsort(form_vars, form_count, sizeof(_cgi_var_t),
|
||||
qsort(form_vars, (size_t)form_count, sizeof(_cgi_var_t),
|
||||
(int (*)(const void *, const void *))cgi_compare_variables);
|
||||
|
||||
#ifdef DEBUG
|
||||
@@ -1307,5 +1278,5 @@ cgi_unlink_file(void)
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: var.c 12034 2014-07-16 19:37:34Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
*
|
||||
* Web search program for www.cups.org.
|
||||
*
|
||||
* Copyright 2007-2009 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:
|
||||
*
|
||||
* websearch directory "search string"
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* main() - Search a directory of help files.
|
||||
* list_nodes() - List matching nodes.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include necessary headers...
|
||||
*/
|
||||
|
||||
#include "cgi.h"
|
||||
|
||||
|
||||
/*
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static void list_nodes(help_index_t *hi, const char *title,
|
||||
cups_array_t *nodes);
|
||||
|
||||
|
||||
/*
|
||||
* 'main()' - Test the help index code.
|
||||
*/
|
||||
|
||||
int /* O - Exit status */
|
||||
main(int argc, /* I - Number of command-line args */
|
||||
char *argv[]) /* I - Command-line arguments */
|
||||
{
|
||||
help_index_t *hi, /* Help index */
|
||||
*search; /* Search index */
|
||||
char indexname[1024]; /* Name of index file */
|
||||
|
||||
|
||||
if (argc != 3)
|
||||
{
|
||||
puts("Usage: websearch directory \"search terms\"");
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the help index...
|
||||
*/
|
||||
|
||||
snprintf(indexname, sizeof(indexname), "%s/.index", argv[1]);
|
||||
hi = helpLoadIndex(indexname, argv[1]);
|
||||
|
||||
/*
|
||||
* Do any searches...
|
||||
*/
|
||||
|
||||
search = helpSearchIndex(hi, argv[2], NULL, NULL);
|
||||
|
||||
if (search)
|
||||
list_nodes(hi, argv[1], search->sorted);
|
||||
|
||||
/*
|
||||
* Return with no errors...
|
||||
*/
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'list_nodes()' - List nodes in an array...
|
||||
*/
|
||||
|
||||
static void
|
||||
list_nodes(help_index_t *hi, /* I - Help index */
|
||||
const char *title, /* I - Title string */
|
||||
cups_array_t *nodes) /* I - Nodes */
|
||||
{
|
||||
help_node_t *node, /* Current node */
|
||||
*file; /* File node */
|
||||
|
||||
|
||||
printf("%d\n", cupsArrayCount(nodes));
|
||||
for (node = (help_node_t *)cupsArrayFirst(nodes);
|
||||
node;
|
||||
node = (help_node_t *)cupsArrayNext(nodes))
|
||||
{
|
||||
if (node->anchor)
|
||||
{
|
||||
file = helpFindNode(hi, node->filename, NULL);
|
||||
printf("%d|%s#%s|%s|%s\n", node->score, node->filename, node->anchor,
|
||||
node->text, file ? file->text : node->filename);
|
||||
}
|
||||
else
|
||||
printf("%d|%s|%s|%s\n", node->score, node->filename, node->text,
|
||||
node->text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
*/
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id$"
|
||||
# "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $"
|
||||
#
|
||||
# Configuration file makefile for CUPS.
|
||||
#
|
||||
@@ -139,5 +139,5 @@ uninstall:
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
# End of "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $".
|
||||
#
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# Sample file/directory/user/group configuration file for the CUPS scheduler.
|
||||
# File/directory/user/group configuration file for the CUPS scheduler.
|
||||
# See "man cups-files.conf" for a complete description of this file.
|
||||
#
|
||||
|
||||
@@ -95,7 +93,3 @@ PageLog @CUPS_LOGDIR@/page_log
|
||||
# scheduler startup and cannot be one of the standard (public) temporary
|
||||
# directory locations for security reasons...
|
||||
#TempDir @CUPS_REQUESTS@/tmp
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
#
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a
|
||||
# Configuration file for the CUPS scheduler. See "man cupsd.conf" for a
|
||||
# complete description of this file.
|
||||
#
|
||||
|
||||
# Log general information in error_log - change "@CUPS_LOG_LEVEL@" to "debug"
|
||||
# for troubleshooting...
|
||||
LogLevel @CUPS_LOG_LEVEL@
|
||||
@CUPS_PAGE_LOG_FORMAT@
|
||||
|
||||
# Only listen for connections from the local machine.
|
||||
Listen localhost:@DEFAULT_IPP_PORT@
|
||||
@@ -128,7 +127,3 @@ WebInterface @CUPS_WEBIF@
|
||||
Order deny,allow
|
||||
</Limit>
|
||||
</Policy>
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id$"
|
||||
# "$Id: mime.convs.in 11025 2013-06-07 01:00:33Z msweet $"
|
||||
#
|
||||
# DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
|
||||
# VERSIONS OF CUPS. Instead, create a "local.convs" file that
|
||||
@@ -59,5 +59,5 @@ application/vnd.cups-raster image/pwg-raster 100 rastertopwg
|
||||
@DEFAULT_RAW_PRINTING@application/octet-stream application/vnd.cups-raw 0 -
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
# End of "$Id: mime.convs.in 11025 2013-06-07 01:00:33Z msweet $".
|
||||
#
|
||||
|
||||
+16
-15
@@ -1,20 +1,20 @@
|
||||
#
|
||||
# "$Id: mime.types 7670 2008-06-17 22:42:08Z mike $"
|
||||
#
|
||||
# Base MIME types file for CUPS.
|
||||
# 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.
|
||||
# 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-2011 by Apple Inc.
|
||||
# Copyright 1997-2007 by Easy Software Products.
|
||||
# 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
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
#
|
||||
|
||||
########################################################################
|
||||
@@ -37,6 +37,7 @@
|
||||
# 100=default, 200=highest)
|
||||
# printable(offset,length) True if bytes are printable 8-bit chars
|
||||
# (CR, NL, TAB, BS, 32-126, 128-254)
|
||||
# regex(offset,"regex") True if bytes match regular expression
|
||||
# string(offset,"string") True if bytes are identical to string
|
||||
# istring(offset,"string") True if bytes are identical to
|
||||
# case-insensitive string
|
||||
@@ -70,7 +71,7 @@
|
||||
#
|
||||
|
||||
#application/msword doc string(0,<D0CF11E0A1B11AE1>)
|
||||
application/pdf pdf string(0,%PDF)
|
||||
application/pdf pdf regex(0,^[\\n\\r]*%PDF)
|
||||
application/postscript ai eps ps string(0,%!) string(0,<04>%!) \
|
||||
contains(0,128,<1B>%-12345X) + \
|
||||
(contains(0,4096,"LANGUAGE=POSTSCRIPT") \
|
||||
@@ -92,7 +93,7 @@ image/jpeg jpeg jpg jpe string(0,<FFD8FF>) +\
|
||||
char(3,0xe4) char(3,0xe5) char(3,0xe6) char(3,0xe7)\
|
||||
char(3,0xe8) char(3,0xe9) char(3,0xea) char(3,0xeb)\
|
||||
char(3,0xec) char(3,0xed) char(3,0xee) char(3,0xef))
|
||||
image/pwg-raster string(0,"RaS2") + string(4,PwgRaster<00>) priority(100)
|
||||
image/pwg-raster string(0,"RaS2") + string(4,PwgRaster<00>) priority(150)
|
||||
image/tiff tiff tif string(0,MM<002A>) string(0,II<2A00>)
|
||||
image/x-photocd pcd string(2048,PCD_IPI)
|
||||
image/x-portable-anymap pnm
|
||||
@@ -123,7 +124,7 @@ application/x-shell sh printable(0,1024) + string(0,#!) +\
|
||||
(contains(2,80,/bash) contains(2,80,/ksh)\
|
||||
contains(2,80,/sh) contains(2,80,/zsh))
|
||||
application/x-csource c cxx cpp cc C h hpp \
|
||||
printable(0,1024) + \
|
||||
printable(0,1024) + ! css + \
|
||||
(string(0,/*) string(0,//)
|
||||
string(0,#include) contains(0,1024,<0a>#include) \
|
||||
string(0,#define) contains(0,1024,<0a>#define))
|
||||
@@ -152,7 +153,7 @@ application/vnd.cups-pdf
|
||||
application/vnd.cups-postscript
|
||||
application/vnd.cups-ppd ppd string(0,"*PPD-Adobe:")
|
||||
application/vnd.cups-raster string(0,"RaSt") string(0,"tSaR") \
|
||||
string(0,"RaS2") string(0,"2SaR") \
|
||||
(string(0,"RaS2") + !string(4,PwgRaster<00>)) string(0,"2SaR") \
|
||||
string(0,"RaS3") string(0,"3SaR")
|
||||
application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
|
||||
string(0,<1B>@) \
|
||||
|
||||
+2
-8
@@ -1,13 +1,7 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# Sample SNMP configuration file for CUPS. See "man cups-snmp.conf" for a
|
||||
# complete description of this file.
|
||||
# SNMP configuration file for CUPS. See "man cups-snmp.conf" for a complete
|
||||
# description of this file.
|
||||
#
|
||||
|
||||
@CUPS_SNMP_ADDRESS@
|
||||
@CUPS_SNMP_COMMUNITY@
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
#
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
dnl
|
||||
dnl "$Id: cups-common.m4 8781 2009-08-28 17:34:54Z mike $"
|
||||
dnl "$Id: cups-common.m4 12073 2014-07-31 00:58:00Z msweet $"
|
||||
dnl
|
||||
dnl Common configuration stuff for CUPS.
|
||||
dnl Common configuration stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2013 by Apple Inc.
|
||||
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
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 file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
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 We need at least autoconf 2.60...
|
||||
@@ -20,8 +20,8 @@ dnl Set the name of the config header file...
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Version number information...
|
||||
CUPS_VERSION="1.7.0"
|
||||
CUPS_REVISION=""
|
||||
CUPS_VERSION=2.0b1
|
||||
CUPS_REVISION=
|
||||
#if test -z "$CUPS_REVISION" -a -d .svn; then
|
||||
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
|
||||
#fi
|
||||
@@ -89,7 +89,7 @@ fi
|
||||
AC_SUBST(INSTALLSTATIC)
|
||||
|
||||
dnl Check for pkg-config, which is used for some other tests later on...
|
||||
AC_PATH_PROG(PKGCONFIG, pkg-config)
|
||||
AC_PATH_TOOL(PKGCONFIG, pkg-config)
|
||||
|
||||
dnl Check for libraries...
|
||||
AC_SEARCH_LIBS(abs, m, AC_DEFINE(HAVE_ABS))
|
||||
@@ -134,11 +134,9 @@ AC_CHECK_HEADER(stdint.h,AC_DEFINE(HAVE_STDINT_H))
|
||||
AC_CHECK_HEADER(string.h,AC_DEFINE(HAVE_STRING_H))
|
||||
AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H))
|
||||
AC_CHECK_HEADER(bstring.h,AC_DEFINE(HAVE_BSTRING_H))
|
||||
AC_CHECK_HEADER(usersec.h,AC_DEFINE(HAVE_USERSEC_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(scsi/sg.h,AC_DEFINE(HAVE_SCSI_SG_H))
|
||||
|
||||
dnl Checks for iconv.h and iconv_open
|
||||
AC_CHECK_HEADER(iconv.h,
|
||||
@@ -202,6 +200,9 @@ AC_CHECK_FUNCS(sigaction)
|
||||
dnl Checks for wait functions.
|
||||
AC_CHECK_FUNCS(waitpid wait3)
|
||||
|
||||
dnl Check for posix_spawn
|
||||
AC_CHECK_FUNCS(posix_spawn)
|
||||
|
||||
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;
|
||||
@@ -230,7 +231,7 @@ AC_SUBST(LIBUSB)
|
||||
AC_SUBST(USBQUIRKS)
|
||||
|
||||
if test "x$PKGCONFIG" != x; then
|
||||
if test x$enable_libusb = xyes -o $uname != Darwin; then
|
||||
if test x$enable_libusb != xno -a $uname != Darwin; then
|
||||
AC_MSG_CHECKING(for libusb-1.0)
|
||||
if $PKGCONFIG --exists libusb-1.0; then
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -240,6 +241,9 @@ if test "x$PKGCONFIG" != x; then
|
||||
USBQUIRKS="\$(DATADIR)/usb"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test x$enable_libusb = xyes; then
|
||||
AC_MSG_ERROR(libusb required for --enable-libusb.)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
elif test x$enable_libusb = xyes; then
|
||||
@@ -303,16 +307,11 @@ fi
|
||||
LIBS="$SAVELIBS"
|
||||
|
||||
dnl Check for DBUS support
|
||||
if test -d /etc/dbus-1; then
|
||||
DBUSDIR="/etc/dbus-1"
|
||||
else
|
||||
DBUSDIR=""
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(dbus, [ --disable-dbus build without DBUS support])
|
||||
AC_ARG_WITH(dbusdir, [ --with-dbusdir set DBUS configuration directory ],
|
||||
DBUSDIR="$withval")
|
||||
|
||||
DBUSDIR=""
|
||||
DBUS_NOTIFIER=""
|
||||
DBUS_NOTIFIERLIBS=""
|
||||
|
||||
@@ -329,7 +328,12 @@ if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x; then
|
||||
LIBS="$LIBS $DBUS_NOTIFIERLIBS"
|
||||
AC_CHECK_FUNC(dbus_message_iter_init_append,
|
||||
AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND))
|
||||
AC_CHECK_FUNC(dbus_threads_init,
|
||||
AC_DEFINE(HAVE_DBUS_THREADS_INIT))
|
||||
LIBS="$SAVELIBS"
|
||||
if test -d /etc/dbus-1; then
|
||||
DBUSDIR="/etc/dbus-1"
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
@@ -356,7 +360,6 @@ case $uname in
|
||||
AC_CHECK_HEADER(CoreFoundation/CoreFoundation.h,AC_DEFINE(HAVE_COREFOUNDATION_H))
|
||||
AC_CHECK_HEADER(CoreFoundation/CFPriv.h,AC_DEFINE(HAVE_CFPRIV_H))
|
||||
AC_CHECK_HEADER(CoreFoundation/CFBundlePriv.h,AC_DEFINE(HAVE_CFBUNDLEPRIV_H))
|
||||
AC_CHECK_HEADER(IOKit/pwr_mgt/IOPMLibPrivate.h,AC_DEFINE(HAVE_IOKIT_PWR_MGT_IOPMLIBPRIVATE_H))
|
||||
|
||||
dnl Check for dynamic store function...
|
||||
AC_CHECK_FUNCS(SCDynamicStoreCopyComputerName)
|
||||
@@ -462,5 +465,5 @@ esac
|
||||
AC_SUBST(BUILDDIRS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-common.m4 8781 2009-08-28 17:34:54Z mike $".
|
||||
dnl End of "$Id: cups-common.m4 12073 2014-07-31 00:58:00Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
dnl
|
||||
dnl "$Id: cups-compiler.m4 7871 2008-08-27 21:12:43Z mike $"
|
||||
dnl "$Id: cups-compiler.m4 11683 2014-03-05 20:00:54Z msweet $"
|
||||
dnl
|
||||
dnl Compiler stuff for CUPS.
|
||||
dnl Compiler stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2013 by Apple Inc.
|
||||
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
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 file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
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 Clear the debugging and non-shared library options unless the user asks
|
||||
@@ -103,7 +103,7 @@ if test -n "$GCC"; then
|
||||
fi
|
||||
|
||||
# Generate position-independent code as needed...
|
||||
if test $PICFLAG = 1 -a $uname != AIX; then
|
||||
if test $PICFLAG = 1; then
|
||||
OPTIM="-fPIC $OPTIM"
|
||||
fi
|
||||
|
||||
@@ -154,20 +154,20 @@ if test -n "$GCC"; then
|
||||
|
||||
if test "x$with_optim" = x; then
|
||||
# Add useful warning options for tracking down problems...
|
||||
OPTIM="-Wall -Wno-format-y2k -Wunused $OPTIM"
|
||||
OPTIM="-Wall -Wno-format-y2k -Wsign-conversion -Wunused $OPTIM"
|
||||
|
||||
AC_MSG_CHECKING(if GCC supports -Wno-tautological-compare)
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror -Wno-tautological-compare"
|
||||
AC_TRY_COMPILE(,,
|
||||
[OPTIM="$OPTIM -Wno-tautological-compare"
|
||||
AC_MSG_RESULT(yes)],
|
||||
AC_MSG_RESULT(no))
|
||||
CFLAGS="$OLDCFLAGS"
|
||||
|
||||
# Additional warning options for development testing...
|
||||
if test -d .svn; then
|
||||
OPTIM="-Wshadow -Werror $OPTIM"
|
||||
else
|
||||
AC_MSG_CHECKING(if GCC supports -Wno-tautological-compare)
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror -Wno-tautological-compare"
|
||||
AC_TRY_COMPILE(,,
|
||||
[OPTIM="$OPTIM -Wno-tautological-compare"
|
||||
AC_MSG_RESULT(yes)],
|
||||
AC_MSG_RESULT(no))
|
||||
CFLAGS="$OLDCFLAGS"
|
||||
OPTIM="-Werror $OPTIM"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -185,47 +185,13 @@ if test -n "$GCC"; then
|
||||
# The -z relro option is provided by the Linux linker command to
|
||||
# make relocatable data read-only.
|
||||
if test x$enable_relro = xyes; then
|
||||
RELROFLAGS="-Wl,-z,relro"
|
||||
RELROFLAGS="-Wl,-z,relro,-z,now"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
# Add vendor-specific compiler options...
|
||||
case $uname in
|
||||
AIX*)
|
||||
if test -z "$OPTIM"; then
|
||||
if test "x$with_optim" = x; then
|
||||
OPTIM="-O2 -qmaxmem=6000"
|
||||
else
|
||||
OPTIM="$with_optim $OPTIM"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
HP-UX*)
|
||||
if test -z "$OPTIM"; then
|
||||
if test "x$with_optim" = x; then
|
||||
OPTIM="+O2"
|
||||
else
|
||||
OPTIM="$with_optim $OPTIM"
|
||||
fi
|
||||
fi
|
||||
|
||||
CFLAGS="-Ae $CFLAGS"
|
||||
|
||||
if test $PICFLAG = 1; then
|
||||
OPTIM="+z $OPTIM"
|
||||
fi
|
||||
;;
|
||||
OSF*)
|
||||
# Tru64 UNIX aka Digital UNIX aka OSF/1
|
||||
if test -z "$OPTIM"; then
|
||||
if test "x$with_optim" = x; then
|
||||
OPTIM="-O"
|
||||
else
|
||||
OPTIM="$with_optim"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
SunOS*)
|
||||
# Solaris
|
||||
if test -z "$OPTIM"; then
|
||||
@@ -236,20 +202,6 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $PICFLAG = 1; then
|
||||
OPTIM="-KPIC $OPTIM"
|
||||
fi
|
||||
;;
|
||||
UNIX_SVR*)
|
||||
# UnixWare
|
||||
if test -z "$OPTIM"; then
|
||||
if test "x$with_optim" = x; then
|
||||
OPTIM="-O"
|
||||
else
|
||||
OPTIM="$with_optim $OPTIM"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $PICFLAG = 1; then
|
||||
OPTIM="-KPIC $OPTIM"
|
||||
fi
|
||||
@@ -268,33 +220,13 @@ fi
|
||||
|
||||
# Add general compiler options per platform...
|
||||
case $uname in
|
||||
HP-UX*)
|
||||
# HP-UX 10.20 (at least) needs this definition to get the
|
||||
# h_errno global...
|
||||
OPTIM="$OPTIM -D_XOPEN_SOURCE_EXTENDED"
|
||||
|
||||
# HP-UX 11.00 (at least) needs this definition to get the
|
||||
# u_short type used by the IP headers...
|
||||
OPTIM="$OPTIM -D_INCLUDE_HPUX_SOURCE"
|
||||
|
||||
# HP-UX 11.23 (at least) needs this definition to get the
|
||||
# IPv6 header to work...
|
||||
OPTIM="$OPTIM -D_HPUX_SOURCE"
|
||||
;;
|
||||
|
||||
Linux*)
|
||||
# glibc 2.8 and higher breaks peer credentials unless you
|
||||
# define _GNU_SOURCE...
|
||||
OPTIM="$OPTIM -D_GNU_SOURCE"
|
||||
;;
|
||||
|
||||
OSF*)
|
||||
# Tru64 UNIX aka Digital UNIX aka OSF/1 need to be told
|
||||
# to be POSIX-compliant...
|
||||
OPTIM="$OPTIM -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_OSF_SOURCE"
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-compiler.m4 7871 2008-08-27 21:12:43Z mike $".
|
||||
dnl End of "$Id: cups-compiler.m4 11683 2014-03-05 20:00:54Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-defaults.m4 7959 2008-09-17 19:30:58Z mike $"
|
||||
dnl "$Id: cups-defaults.m4 11789 2014-04-02 16:52:53Z msweet $"
|
||||
dnl
|
||||
dnl Default cupsd configuration settings for CUPS.
|
||||
dnl
|
||||
@@ -78,12 +78,21 @@ AC_SUBST(CUPS_LOG_LEVEL)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LOG_LEVEL, "$CUPS_LOG_LEVEL")
|
||||
|
||||
dnl Default AccessLogLevel
|
||||
AC_ARG_WITH(access_log_level, [ --with-access-log-level set default AccessLogLevel value, default=actions],
|
||||
AC_ARG_WITH(access_log_level, [ --with-access-log-level set default AccessLogLevel value, default=none],
|
||||
CUPS_ACCESS_LOG_LEVEL="$withval",
|
||||
CUPS_ACCESS_LOG_LEVEL="actions")
|
||||
CUPS_ACCESS_LOG_LEVEL="none")
|
||||
AC_SUBST(CUPS_ACCESS_LOG_LEVEL)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_ACCESS_LOG_LEVEL, "$CUPS_ACCESS_LOG_LEVEL")
|
||||
|
||||
dnl Default PageLogFormat
|
||||
AC_ARG_WITH(page_logging, [ --enable-page-logging enable page_log by default])
|
||||
if test "x$enable_page_logging" = xyes; then
|
||||
CUPS_PAGE_LOG_FORMAT=""
|
||||
else
|
||||
CUPS_PAGE_LOG_FORMAT="PageLogFormat"
|
||||
fi
|
||||
AC_SUBST(CUPS_PAGE_LOG_FORMAT)
|
||||
|
||||
dnl Default Browsing
|
||||
AC_ARG_ENABLE(browsing, [ --disable-browsing disable Browsing by default])
|
||||
if test "x$enable_browsing" = xno; then
|
||||
@@ -400,5 +409,5 @@ AC_SUBST(CUPS_WEBIF)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_WEBIF, $CUPS_DEFAULT_WEBIF)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-defaults.m4 7959 2008-09-17 19:30:58Z mike $".
|
||||
dnl End of "$Id: cups-defaults.m4 11789 2014-04-02 16:52:53Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
dnl
|
||||
dnl "$Id: cups-directories.m4 7799 2008-07-25 20:06:08Z mike $"
|
||||
dnl "$Id: cups-directories.m4 11717 2014-03-21 16:42:53Z msweet $"
|
||||
dnl
|
||||
dnl Directory stuff for CUPS.
|
||||
dnl Directory stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2013 by Apple Inc.
|
||||
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
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 file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
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_PREFIX_DEFAULT(/)
|
||||
@@ -107,11 +107,6 @@ if test "$libdir" = "\${exec_prefix}/lib"; then
|
||||
libdir="$exec_prefix/lib64"
|
||||
fi
|
||||
;;
|
||||
HP-UX*)
|
||||
if test -d /usr/lib/hpux32; then
|
||||
libdir="$exec_prefix/lib/hpux32"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -126,119 +121,6 @@ fi
|
||||
AC_SUBST(privateinclude)
|
||||
AC_SUBST(PRIVATEINCLUDE)
|
||||
|
||||
dnl Setup init.d locations...
|
||||
AC_ARG_WITH(rcdir, [ --with-rcdir set path for rc scripts],rcdir="$withval",rcdir="")
|
||||
AC_ARG_WITH(rclevels, [ --with-rclevels set run levels for rc scripts],rclevels="$withval",rclevels="2 3 5")
|
||||
AC_ARG_WITH(rcstart, [ --with-rcstart set start number for rc scripts],rcstart="$withval",rcstart="99")
|
||||
AC_ARG_WITH(rcstop, [ --with-rcstop set stop number for rc scripts],rcstop="$withval",rcstop="00")
|
||||
AC_ARG_WITH(smfmanifestdir, [ --with-smfmanifestdir set path for Solaris SMF manifest],smfmanifestdir="$withval",smfmanifestdir="")
|
||||
|
||||
INITDIR=""
|
||||
INITDDIR=""
|
||||
RCLEVELS="$rclevels"
|
||||
RCSTART="$rcstart"
|
||||
RCSTOP="$rcstop"
|
||||
SMFMANIFESTDIR=""
|
||||
|
||||
if test x$rcdir = x; then
|
||||
case "$uname" in
|
||||
AIX*)
|
||||
INITDIR="/etc/rc.d"
|
||||
;;
|
||||
|
||||
Darwin*)
|
||||
# Darwin and MacOS X...
|
||||
if test -x /sbin/launchd; then
|
||||
INITDDIR="/System/Library/LaunchDaemons"
|
||||
else
|
||||
INITDDIR="/System/Library/StartupItems/PrintingServices"
|
||||
fi
|
||||
;;
|
||||
|
||||
FreeBSD* | OpenBSD* | MirBSD* | ekkoBSD*)
|
||||
# FreeBSD and OpenBSD
|
||||
;;
|
||||
|
||||
HP-UX*)
|
||||
INITDIR="/sbin"
|
||||
RCLEVELS="2"
|
||||
RCSTART="380"
|
||||
RCSTOP="620"
|
||||
;;
|
||||
|
||||
Linux | GNU | GNU/k*BSD*)
|
||||
# Linux/HURD seems to choose an init.d directory at random...
|
||||
if test -d /sbin/init.d; then
|
||||
# SuSE
|
||||
INITDIR="/sbin/init.d"
|
||||
else
|
||||
if test -d /etc/init.d; then
|
||||
# Others
|
||||
INITDIR="/etc"
|
||||
else
|
||||
# RedHat
|
||||
INITDIR="/etc/rc.d"
|
||||
fi
|
||||
fi
|
||||
RCSTART="81"
|
||||
RCSTOP="36"
|
||||
;;
|
||||
|
||||
NetBSD*)
|
||||
# NetBSD
|
||||
INITDDIR="/etc/rc.d"
|
||||
;;
|
||||
|
||||
OSF1*)
|
||||
INITDIR="/sbin"
|
||||
;;
|
||||
|
||||
SunOS*)
|
||||
# Solaris
|
||||
if test "x$smfmanifestdir" != x; then
|
||||
SMFMANIFESTDIR=$smfmanifestdir
|
||||
else
|
||||
INITDIR="/etc"
|
||||
RCSTART="81"
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
INITDIR="/etc"
|
||||
;;
|
||||
|
||||
esac
|
||||
elif test "x$rcdir" != xno; then
|
||||
if test "x$rclevels" = x; then
|
||||
INITDDIR="$rcdir"
|
||||
else
|
||||
INITDIR="$rcdir"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(INITDIR)
|
||||
AC_SUBST(INITDDIR)
|
||||
AC_SUBST(RCLEVELS)
|
||||
AC_SUBST(RCSTART)
|
||||
AC_SUBST(RCSTOP)
|
||||
AC_SUBST(SMFMANIFESTDIR)
|
||||
|
||||
dnl Xinetd support...
|
||||
AC_ARG_WITH(xinetd, [ --with-xinetd set path for xinetd config files],XINETD="$withval",XINETD="")
|
||||
|
||||
if test "x$XINETD" = x -a ! -x /sbin/launchd; then
|
||||
for dir in /private/etc/xinetd.d /etc/xinetd.d /usr/local/etc/xinetd.d; do
|
||||
if test -d $dir; then
|
||||
XINETD="$dir"
|
||||
break
|
||||
fi
|
||||
done
|
||||
elif test "x$XINETD" = xno; then
|
||||
XINETD=""
|
||||
fi
|
||||
|
||||
AC_SUBST(XINETD)
|
||||
|
||||
dnl LPD sharing support...
|
||||
AC_ARG_WITH(lpdconfig, [ --with-lpdconfig set URI for LPD config file],
|
||||
LPDCONFIG="$withval", LPDCONFIG="")
|
||||
@@ -355,10 +237,6 @@ if test "$localedir" = "\${datarootdir}/locale"; then
|
||||
CUPS_LOCALEDIR="$datarootdir/locale"
|
||||
;;
|
||||
|
||||
OSF1* | AIX*)
|
||||
CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg"
|
||||
;;
|
||||
|
||||
*)
|
||||
# This is the standard System V location...
|
||||
CUPS_LOCALEDIR="$exec_prefix/lib/locale"
|
||||
@@ -427,5 +305,5 @@ AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR")
|
||||
AC_SUBST(CUPS_STATEDIR)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-directories.m4 7799 2008-07-25 20:06:08Z mike $".
|
||||
dnl End of "$Id: cups-directories.m4 11717 2014-03-21 16:42:53Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-dnssd.m4 7890 2008-08-29 22:19:39Z mike $"
|
||||
dnl "$Id: cups-dnssd.m4 11324 2013-10-04 03:11:42Z msweet $"
|
||||
dnl
|
||||
dnl DNS Service Discovery (aka Bonjour) stuff for CUPS.
|
||||
dnl
|
||||
@@ -82,5 +82,5 @@ AC_SUBST(IPPFIND_BIN)
|
||||
AC_SUBST(IPPFIND_MAN)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-dnssd.m4 7890 2008-08-29 22:19:39Z mike $".
|
||||
dnl End of "$Id: cups-dnssd.m4 11324 2013-10-04 03:11:42Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dnl
|
||||
dnl "$Id$"
|
||||
dnl "$Id: cups-gssapi.m4 11911 2014-06-10 13:54:53Z msweet $"
|
||||
dnl
|
||||
dnl GSSAPI/Kerberos library detection for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2012 by Apple Inc.
|
||||
dnl Copyright 2007-2013 by Apple Inc.
|
||||
dnl Copyright 2006-2007 by Easy Software Products.
|
||||
dnl
|
||||
dnl This file contains Kerberos support code, copyright 2006 by
|
||||
@@ -22,7 +22,7 @@ LIBGSSAPI=""
|
||||
AC_SUBST(LIBGSSAPI)
|
||||
|
||||
if test x$enable_gssapi != xno; then
|
||||
AC_PATH_PROG(KRB5CONFIG, krb5-config)
|
||||
AC_PATH_TOOL(KRB5CONFIG, krb5-config)
|
||||
if test "x$KRB5CONFIG" != x; then
|
||||
case "$uname" in
|
||||
Darwin)
|
||||
@@ -71,38 +71,9 @@ if test x$enable_gssapi != xno; then
|
||||
if test "x$LIBGSSAPI" != x; then
|
||||
AC_CHECK_HEADER(krb5.h, AC_DEFINE(HAVE_KRB5_H))
|
||||
if test -d /System/Library/Frameworks/GSS.framework; then
|
||||
gssdir="/System/Library/Frameworks/GSS.framework"
|
||||
AC_MSG_CHECKING(for GSS/gssapi.h presence)
|
||||
if test -f $gssdir/Headers/gssapi.h; then
|
||||
AC_DEFINE(HAVE_GSS_GSSAPI_H)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_MSG_CHECKING(for GSS/gssapi_generic.h presence)
|
||||
if test -f $gssdir/Headers/gssapi_generic.h; then
|
||||
AC_DEFINE(HAVE_GSSAPI_GENERIC_H)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_MSG_CHECKING(for GSS/gssapi_spi.h presence)
|
||||
if test -f $gssdir/PrivateHeaders/gssapi_spi.h; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_MSG_CHECKING(for GSS/gssapi_spi.h usability)
|
||||
if test -s $gssdir/PrivateHeaders/gssapi_spi.h; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GSS_GSSAPI_SPI_H)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test $uversion -ge 110 -a $uversion -lt 120; then
|
||||
# Broken public headers in 10.7.x...
|
||||
AC_MSG_ERROR(Run 'sudo mkdir -p $gssdir/PrivateHeaders' and 'sudo touch $gssdir/PrivateHeaders/gssapi_spi.h' to build CUPS.)
|
||||
fi
|
||||
fi
|
||||
AC_CHECK_HEADER(GSS/gssapi.h, AC_DEFINE(HAVE_GSS_GSSAPI_H))
|
||||
AC_CHECK_HEADER(GSS/gssapi_generic.h, AC_DEFINE(HAVE_GSS_GSSAPI_GENERIC_H))
|
||||
AC_CHECK_HEADER(GSS/gssapi_spi.h, AC_DEFINE(HAVE_GSS_GSSAPI_SPI_H))
|
||||
else
|
||||
AC_CHECK_HEADER(gssapi.h, AC_DEFINE(HAVE_GSSAPI_H))
|
||||
AC_CHECK_HEADER(gssapi/gssapi.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_H))
|
||||
@@ -158,5 +129,5 @@ AC_SUBST(CUPS_DEFAULT_GSSSERVICENAME)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GSSSERVICENAME, "$CUPS_DEFAULT_GSSSERVICENAME")
|
||||
|
||||
dnl
|
||||
dnl End of "$Id$".
|
||||
dnl End of "$Id: cups-gssapi.m4 11911 2014-06-10 13:54:53Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-largefile.m4 6649 2007-07-11 21:46:42Z mike $"
|
||||
dnl "$Id: cups-largefile.m4 11324 2013-10-04 03:11:42Z msweet $"
|
||||
dnl
|
||||
dnl Large file support stuff for CUPS.
|
||||
dnl
|
||||
@@ -48,5 +48,5 @@ fi
|
||||
AC_CHECK_FUNC(strtoll, AC_DEFINE(HAVE_STRTOLL))
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-largefile.m4 6649 2007-07-11 21:46:42Z mike $".
|
||||
dnl End of "$Id: cups-largefile.m4 11324 2013-10-04 03:11:42Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
dnl
|
||||
dnl "$Id: cups-launchd.m4 6649 2007-07-11 21:46:42Z mike $"
|
||||
dnl
|
||||
dnl launchd stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2010 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(launchd, [ --disable-launchd disable launchd support])
|
||||
|
||||
DEFAULT_LAUNCHD_CONF=""
|
||||
LAUNCHDLIBS=""
|
||||
|
||||
if test x$enable_launchd != xno; then
|
||||
AC_CHECK_FUNC(launch_msg, AC_DEFINE(HAVE_LAUNCHD))
|
||||
AC_CHECK_HEADER(launch.h, AC_DEFINE(HAVE_LAUNCH_H))
|
||||
|
||||
case "$uname" in
|
||||
Darwin*)
|
||||
# Darwin, MacOS X
|
||||
DEFAULT_LAUNCHD_CONF="/System/Library/LaunchDaemons/org.cups.cupsd.plist"
|
||||
# liblaunch is already part of libSystem
|
||||
;;
|
||||
*)
|
||||
# All others; this test will need to be updated
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_SUBST(DEFAULT_LAUNCHD_CONF)
|
||||
AC_SUBST(LAUNCHDLIBS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-launchd.m4 6649 2007-07-11 21:46:42Z mike $".
|
||||
dnl
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-libtool.m4 6649 2007-07-11 21:46:42Z mike $"
|
||||
dnl "$Id: cups-libtool.m4 11324 2013-10-04 03:11:42Z msweet $"
|
||||
dnl
|
||||
dnl Libtool stuff for CUPS.
|
||||
dnl
|
||||
@@ -35,5 +35,5 @@ if test x$LIBTOOL != x; then
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-libtool.m4 6649 2007-07-11 21:46:42Z mike $".
|
||||
dnl End of "$Id: cups-libtool.m4 11324 2013-10-04 03:11:42Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
dnl
|
||||
dnl "$Id: cups-manpages.m4 6649 2007-07-11 21:46:42Z mike $"
|
||||
dnl "$Id: cups-manpages.m4 11342 2013-10-18 20:36:01Z msweet $"
|
||||
dnl
|
||||
dnl Manpage stuff for CUPS.
|
||||
dnl Manpage stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2012 by Apple Inc.
|
||||
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
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 file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
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 Fix "mandir" variable...
|
||||
@@ -22,8 +22,8 @@ fi
|
||||
|
||||
if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then
|
||||
case "$uname" in
|
||||
Darwin* | Linux | GNU | *BSD* | AIX*)
|
||||
# Darwin, MacOS X, Linux, GNU HURD, *BSD, and AIX
|
||||
Darwin* | Linux | GNU | *BSD*)
|
||||
# Darwin, MacOS X, Linux, GNU HURD, and *BSD
|
||||
mandir="/usr/share/man"
|
||||
AMANDIR="/usr/share/man"
|
||||
PMANDIR="/usr/share/man"
|
||||
@@ -45,8 +45,8 @@ AC_SUBST(PMANDIR)
|
||||
|
||||
dnl Setup manpage extensions...
|
||||
case "$uname" in
|
||||
SunOS* | HP-UX*)
|
||||
# Solaris and HP-UX
|
||||
SunOS*)
|
||||
# Solaris
|
||||
MAN1EXT=1
|
||||
MAN5EXT=5
|
||||
MAN7EXT=7
|
||||
@@ -78,5 +78,5 @@ AC_SUBST(MAN8EXT)
|
||||
AC_SUBST(MAN8DIR)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-manpages.m4 6649 2007-07-11 21:46:42Z mike $".
|
||||
dnl End of "$Id: cups-manpages.m4 11342 2013-10-18 20:36:01Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
dnl
|
||||
dnl "$Id: cups-network.m4 7918 2008-09-08 22:03:01Z mike $"
|
||||
dnl "$Id: cups-network.m4 11719 2014-03-21 18:07:23Z msweet $"
|
||||
dnl
|
||||
dnl Networking stuff for CUPS.
|
||||
dnl Networking stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2011 by Apple Inc.
|
||||
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
|
||||
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 file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
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_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H))
|
||||
@@ -66,9 +66,6 @@ fi
|
||||
AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
|
||||
AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)
|
||||
|
||||
AC_CHECK_HEADERS(AppleTalk/at_proto.h,AC_DEFINE(HAVE_APPLETALK_AT_PROTO_H),,
|
||||
[#include <netat/appletalk.h>])
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-network.m4 7918 2008-09-08 22:03:01Z mike $".
|
||||
dnl End of "$Id: cups-network.m4 11719 2014-03-21 18:07:23Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-opsys.m4 6649 2007-07-11 21:46:42Z mike $"
|
||||
dnl "$Id: cups-opsys.m4 11324 2013-10-04 03:11:42Z msweet $"
|
||||
dnl
|
||||
dnl Operating system stuff for CUPS.
|
||||
dnl
|
||||
@@ -35,5 +35,5 @@ case "$uname" in
|
||||
esac
|
||||
|
||||
dnl
|
||||
dnl "$Id: cups-opsys.m4 6649 2007-07-11 21:46:42Z mike $"
|
||||
dnl "$Id: cups-opsys.m4 11324 2013-10-04 03:11:42Z msweet $"
|
||||
dnl
|
||||
|
||||
@@ -1,26 +1,21 @@
|
||||
dnl
|
||||
dnl "$Id: cups-pam.m4 7960 2008-09-17 19:42:02Z mike $"
|
||||
dnl "$Id: cups-pam.m4 11342 2013-10-18 20:36:01Z msweet $"
|
||||
dnl
|
||||
dnl PAM stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2012 by Apple Inc.
|
||||
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
|
||||
dnl Copyright 2007-2013 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 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(pam, [ --disable-pam disable PAM support])
|
||||
AC_ARG_WITH(pam_module, [ --with-pam-module specify the PAM module to use])
|
||||
|
||||
dnl Don't use PAM with AIX...
|
||||
if test $uname = AIX; then
|
||||
enable_pam=no
|
||||
fi
|
||||
|
||||
PAMDIR=""
|
||||
PAMFILE="pam.std"
|
||||
PAMLIBS=""
|
||||
@@ -98,5 +93,5 @@ AC_SUBST(PAMMOD)
|
||||
AC_SUBST(PAMMODAUTH)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-pam.m4 7960 2008-09-17 19:42:02Z mike $".
|
||||
dnl End of "$Id: cups-pam.m4 11342 2013-10-18 20:36:01Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id$"
|
||||
dnl "$Id: cups-poll.m4 11324 2013-10-04 03:11:42Z msweet $"
|
||||
dnl
|
||||
dnl Select/poll stuff for CUPS.
|
||||
dnl
|
||||
@@ -18,5 +18,5 @@ AC_CHECK_FUNC(epoll_create, AC_DEFINE(HAVE_EPOLL))
|
||||
AC_CHECK_FUNC(kqueue, AC_DEFINE(HAVE_KQUEUE))
|
||||
|
||||
dnl
|
||||
dnl End of "$Id$".
|
||||
dnl End of "$Id: cups-poll.m4 11324 2013-10-04 03:11:42Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-scripting.m4 7915 2008-09-07 22:18:29Z mike $"
|
||||
dnl "$Id: cups-scripting.m4 11324 2013-10-04 03:11:42Z msweet $"
|
||||
dnl
|
||||
dnl Scripting configuration stuff for CUPS.
|
||||
dnl
|
||||
@@ -85,5 +85,5 @@ if test "x$CUPS_PYTHON" != x; then
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-scripting.m4 7915 2008-09-07 22:18:29Z mike $".
|
||||
dnl End of "$Id: cups-scripting.m4 11324 2013-10-04 03:11:42Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
dnl
|
||||
dnl "$Id: cups-sharedlibs.m4 7630 2008-06-09 22:31:44Z mike $"
|
||||
dnl "$Id: cups-sharedlibs.m4 11342 2013-10-18 20:36:01Z msweet $"
|
||||
dnl
|
||||
dnl Shared library support for CUPS.
|
||||
dnl Shared library support for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2012 by Apple Inc.
|
||||
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
|
||||
dnl Copyright 2007-2013 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 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
|
||||
|
||||
PICFLAG=1
|
||||
@@ -34,51 +34,7 @@ if test x$enable_shared != xno; then
|
||||
DSOXX="\$(CXX)"
|
||||
DSOFLAGS="$DSOFLAGS -Wl,-h\`basename \$@\` -G \$(OPTIM)"
|
||||
;;
|
||||
UNIX_S*)
|
||||
LIBCUPS="lib$cupsbase.so.2"
|
||||
LIBCUPSCGI="libcupscgi.so.1"
|
||||
LIBCUPSIMAGE="libcupsimage.so.2"
|
||||
LIBCUPSMIME="libcupsmime.so.1"
|
||||
LIBCUPSPPDC="libcupsppdc.so.1"
|
||||
DSO="\$(CC)"
|
||||
DSOXX="\$(CXX)"
|
||||
DSOFLAGS="$DSOFLAGS -Wl,-h,\`basename \$@\` -G \$(OPTIM)"
|
||||
;;
|
||||
HP-UX*)
|
||||
case "$uarch" in
|
||||
ia64)
|
||||
LIBCUPS="lib$cupsbase.so.2"
|
||||
LIBCUPSCGI="libcupscgi.so.1"
|
||||
LIBCUPSIMAGE="libcupsimage.so.2"
|
||||
LIBCUPSMIME="libcupsmime.so.1"
|
||||
LIBCUPSPPDC="libcupsppdc.so.1"
|
||||
DSO="\$(CC)"
|
||||
DSOXX="\$(CXX)"
|
||||
DSOFLAGS="$DSOFLAGS -Wl,-b,-z,+h,\`basename \$@\`"
|
||||
;;
|
||||
*)
|
||||
LIBCUPS="lib$cupsbase.sl.2"
|
||||
LIBCUPSCGI="libcupscgi.sl.1"
|
||||
LIBCUPSIMAGE="libcupsimage.sl.2"
|
||||
LIBCUPSMIME="libcupsmime.sl.1"
|
||||
LIBCUPSPPDC="libcupsppdc.sl.1"
|
||||
DSO="\$(LD)"
|
||||
DSOXX="\$(LD)"
|
||||
DSOFLAGS="$DSOFLAGS -b -z +h \`basename \$@\`"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
IRIX)
|
||||
LIBCUPS="lib$cupsbase.so.2"
|
||||
LIBCUPSCGI="libcupscgi.so.1"
|
||||
LIBCUPSIMAGE="libcupsimage.so.2"
|
||||
LIBCUPSMIME="libcupsmime.so.1"
|
||||
LIBCUPSPPDC="libcupsppdc.so.1"
|
||||
DSO="\$(CC)"
|
||||
DSOXX="\$(CXX)"
|
||||
DSOFLAGS="$DSOFLAGS -set_version,sgi2.6,-soname,\`basename \$@\` -shared \$(OPTIM)"
|
||||
;;
|
||||
OSF1* | Linux | GNU | *BSD*)
|
||||
Linux | GNU | *BSD*)
|
||||
LIBCUPS="lib$cupsbase.so.2"
|
||||
LIBCUPSCGI="libcupscgi.so.1"
|
||||
LIBCUPSIMAGE="libcupsimage.so.2"
|
||||
@@ -98,17 +54,6 @@ if test x$enable_shared != xno; then
|
||||
DSOXX="\$(CXX)"
|
||||
DSOFLAGS="$DSOFLAGS -dynamiclib -single_module -lc"
|
||||
;;
|
||||
AIX*)
|
||||
LIBCUPS="lib${cupsbase}_s.a"
|
||||
LIBCUPSBASE="${cupsbase}_s"
|
||||
LIBCUPSCGI="libcupscgi_s.a"
|
||||
LIBCUPSIMAGE="libcupsimage_s.a"
|
||||
LIBCUPSMIME="libcupsmime_s.a"
|
||||
LIBCUPSPPDC="libcupsppdc_s.a"
|
||||
DSO="\$(CC)"
|
||||
DSOXX="\$(CXX)"
|
||||
DSOFLAGS="$DSOFLAGS -Wl,-bexpall,-bM:SRE,-bnoentry,-blibpath:\$(libdir)"
|
||||
;;
|
||||
*)
|
||||
echo "Warning: shared libraries may not be supported. Trying -shared"
|
||||
echo " option with compiler."
|
||||
@@ -151,19 +96,11 @@ if test x$enable_shared = xno; then
|
||||
EXTLINKCUPS="-lcups"
|
||||
EXTLINKCUPSIMAGE="-lcupsimage"
|
||||
else
|
||||
if test $uname = AIX; then
|
||||
LINKCUPS="-l${cupsbase}_s"
|
||||
LINKCUPSIMAGE="-lcupsimage_s"
|
||||
LINKCUPS="-l${cupsbase}"
|
||||
LINKCUPSIMAGE="-lcupsimage"
|
||||
|
||||
EXTLINKCUPS="-lcups_s"
|
||||
EXTLINKCUPSIMAGE="-lcupsimage_s"
|
||||
else
|
||||
LINKCUPS="-l${cupsbase}"
|
||||
LINKCUPSIMAGE="-lcupsimage"
|
||||
|
||||
EXTLINKCUPS="-lcups"
|
||||
EXTLINKCUPSIMAGE="-lcupsimage"
|
||||
fi
|
||||
EXTLINKCUPS="-lcups"
|
||||
EXTLINKCUPSIMAGE="-lcupsimage"
|
||||
fi
|
||||
|
||||
AC_SUBST(EXTLINKCUPS)
|
||||
@@ -186,19 +123,6 @@ if test "$DSO" != ":"; then
|
||||
# need this option, even when the library is installed in a
|
||||
# standard location...
|
||||
case $uname in
|
||||
HP-UX*)
|
||||
# HP-UX needs the path, even for /usr/lib...
|
||||
case "$uarch" in
|
||||
ia64)
|
||||
DSOFLAGS="-Wl,+s,+b,$libdir $DSOFLAGS"
|
||||
;;
|
||||
*)
|
||||
DSOFLAGS="+s +b $libdir $DSOFLAGS"
|
||||
;;
|
||||
esac
|
||||
LDFLAGS="$LDFLAGS -Wl,+s,+b,$libdir"
|
||||
EXPORT_LDFLAGS="-Wl,+s,+b,$libdir"
|
||||
;;
|
||||
SunOS*)
|
||||
# Solaris...
|
||||
if test $exec_prefix != /usr; then
|
||||
@@ -234,5 +158,5 @@ AC_SUBST(IMGLIBS)
|
||||
AC_SUBST(EXPORT_LDFLAGS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-sharedlibs.m4 7630 2008-06-09 22:31:44Z mike $".
|
||||
dnl End of "$Id: cups-sharedlibs.m4 11342 2013-10-18 20:36:01Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,28 +1,21 @@
|
||||
dnl
|
||||
dnl "$Id: cups-ssl.m4 7241 2008-01-22 22:34:52Z mike $"
|
||||
dnl "$Id: cups-ssl.m4 11911 2014-06-10 13:54:53Z msweet $"
|
||||
dnl
|
||||
dnl OpenSSL/GNUTLS stuff for CUPS.
|
||||
dnl TLS stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2012 by Apple Inc.
|
||||
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
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 file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
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(ssl, [ --disable-ssl disable SSL/TLS support])
|
||||
AC_ARG_ENABLE(cdsassl, [ --enable-cdsassl use CDSA for SSL/TLS support, default=first])
|
||||
AC_ARG_ENABLE(gnutls, [ --enable-gnutls use GNU TLS for SSL/TLS support, default=second])
|
||||
AC_ARG_ENABLE(openssl, [ --enable-openssl use OpenSSL for SSL/TLS support, default=third])
|
||||
AC_ARG_WITH(openssl-libs, [ --with-openssl-libs set directory for OpenSSL library],
|
||||
LDFLAGS="-L$withval $LDFLAGS"
|
||||
DSOFLAGS="-L$withval $DSOFLAGS",)
|
||||
AC_ARG_WITH(openssl-includes, [ --with-openssl-includes set directory for OpenSSL includes],
|
||||
CFLAGS="-I$withval $CFLAGS"
|
||||
CPPFLAGS="-I$withval $CPPFLAGS",)
|
||||
|
||||
SSLFLAGS=""
|
||||
SSLLIBS=""
|
||||
@@ -59,14 +52,15 @@ if test x$enable_ssl != xno; then
|
||||
AC_CHECK_HEADER(Security/SecIdentitySearchPriv.h,
|
||||
AC_DEFINE(HAVE_SECIDENTITYSEARCHPRIV_H))
|
||||
|
||||
AC_DEFINE(HAVE_CSSMERRORSTRING)])
|
||||
AC_DEFINE(HAVE_CSSMERRORSTRING)
|
||||
AC_DEFINE(HAVE_SECKEYCHAINOPEN)])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Then look for GNU TLS...
|
||||
if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then
|
||||
AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config)
|
||||
AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config)
|
||||
AC_PATH_TOOL(LIBGNUTLSCONFIG,libgnutls-config)
|
||||
AC_PATH_TOOL(LIBGCRYPTCONFIG,libgcrypt-config)
|
||||
if $PKGCONFIG --exists gnutls; then
|
||||
have_ssl=1
|
||||
SSLLIBS=`$PKGCONFIG --libs gnutls`
|
||||
@@ -84,58 +78,8 @@ if test x$enable_ssl != xno; then
|
||||
if test $have_ssl = 1; then
|
||||
CUPS_SERVERCERT="ssl/server.crt"
|
||||
CUPS_SERVERKEY="ssl/server.key"
|
||||
|
||||
if $PKGCONFIG --exists gcrypt; then
|
||||
SSLLIBS="$SSLLIBS `$PKGCONFIG --libs gcrypt`"
|
||||
SSLFLAGS="$SSLFLAGS `$PKGCONFIG --cflags gcrypt`"
|
||||
elif test "x$LIBGCRYPTCONFIG" != x; then
|
||||
SSLLIBS="$SSLLIBS `$LIBGCRYPTCONFIG --libs`"
|
||||
SSLFLAGS="$SSLFLAGS `$LIBGCRYPTCONFIG --cflags`"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Check for the OpenSSL library last...
|
||||
if test $have_ssl = 0 -a "x$enable_openssl" != "xno"; then
|
||||
AC_CHECK_HEADER(openssl/ssl.h,[
|
||||
dnl Save the current libraries so the crypto stuff isn't always
|
||||
dnl included...
|
||||
SAVELIBS="$LIBS"
|
||||
|
||||
dnl Some ELF systems can't resolve all the symbols in libcrypto
|
||||
dnl if libcrypto was linked against RSAREF, and fail to link the
|
||||
dnl test program correctly, even though a correct installation
|
||||
dnl of OpenSSL exists. So we test the linking three times in
|
||||
dnl case the RSAREF libraries are needed.
|
||||
|
||||
for libcrypto in \
|
||||
"-lcrypto" \
|
||||
"-lcrypto -lrsaref" \
|
||||
"-lcrypto -lRSAglue -lrsaref"
|
||||
do
|
||||
AC_CHECK_LIB(ssl,SSL_new,
|
||||
[have_ssl=1
|
||||
SSLFLAGS="-DOPENSSL_DISABLE_OLD_DES_SUPPORT"
|
||||
SSLLIBS="-lssl $libcrypto"
|
||||
AC_DEFINE(HAVE_SSL)
|
||||
AC_DEFINE(HAVE_LIBSSL)],,
|
||||
$libcrypto)
|
||||
|
||||
if test "x${SSLLIBS}" != "x"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test "x${SSLLIBS}" != "x"; then
|
||||
CUPS_SERVERCERT="ssl/server.crt"
|
||||
CUPS_SERVERKEY="ssl/server.key"
|
||||
|
||||
LIBS="$SAVELIBS $SSLLIBS"
|
||||
AC_CHECK_FUNCS(SSL_set_tlsext_host_name)
|
||||
fi
|
||||
|
||||
LIBS="$SAVELIBS"])
|
||||
fi
|
||||
fi
|
||||
|
||||
IPPALIASES="http"
|
||||
@@ -143,7 +87,7 @@ if test $have_ssl = 1; then
|
||||
AC_MSG_RESULT([ Using SSLLIBS="$SSLLIBS"])
|
||||
AC_MSG_RESULT([ Using SSLFLAGS="$SSLFLAGS"])
|
||||
IPPALIASES="http https ipps"
|
||||
elif test x$enable_cdsa = xyes -o x$enable_gnutls = xyes -o x$enable_openssl = xyes; then
|
||||
elif test x$enable_cdsa = xyes -o x$enable_gnutls = xyes; then
|
||||
AC_MSG_ERROR([Unable to enable SSL support.])
|
||||
fi
|
||||
|
||||
@@ -157,5 +101,5 @@ EXPORT_SSLLIBS="$SSLLIBS"
|
||||
AC_SUBST(EXPORT_SSLLIBS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-ssl.m4 7241 2008-01-22 22:34:52Z mike $".
|
||||
dnl End of "$Id: cups-ssl.m4 11911 2014-06-10 13:54:53Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
dnl
|
||||
dnl "$Id: cups-startup.m4 11747 2014-03-27 01:15:48Z msweet $"
|
||||
dnl
|
||||
dnl Launch-on-demand/startup stuff for CUPS.
|
||||
dnl
|
||||
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 file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
ONDEMANDFLAGS=""
|
||||
ONDEMANDLIBS=""
|
||||
AC_SUBST(ONDEMANDFLAGS)
|
||||
AC_SUBST(ONDEMANDLIBS)
|
||||
|
||||
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_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 X
|
||||
LAUNCHD_DIR="/System/Library/LaunchDaemons"
|
||||
# liblaunch is already part of libSystem
|
||||
;;
|
||||
*)
|
||||
# All others; this test will need to be updated
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
dnl Systemd is used on Linux...
|
||||
AC_ARG_ENABLE(systemd, [ --disable-systemd disable systemd support])
|
||||
AC_ARG_WITH(systemd, [ --with-systemd set directory for systemd service files],
|
||||
SYSTEMD_DIR="$withval", SYSTEMD_DIR="")
|
||||
AC_SUBST(SYSTEMD_DIR)
|
||||
|
||||
if test x$enable_systemd != xno; then
|
||||
if test "x$PKGCONFIG" = x; then
|
||||
if test x$enable_systemd = xyes; then
|
||||
AC_MSG_ERROR(Need pkg-config to enable systemd support.)
|
||||
fi
|
||||
else
|
||||
AC_MSG_CHECKING(for libsystemd-daemon)
|
||||
if $PKGCONFIG --exists libsystemd-daemon; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd-daemon`
|
||||
ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd-daemon`
|
||||
AC_DEFINE(HAVE_SYSTEMD)
|
||||
if test "x$SYSTEMD_DIR" = x; then
|
||||
SYSTEMD_DIR="`$PKGCONFIG --variable=systemdsystemunitdir systemd`"
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Solaris uses smf
|
||||
SMFMANIFESTDIR=""
|
||||
AC_SUBST(SMFMANIFESTDIR)
|
||||
AC_ARG_WITH(smfmanifestdir, [ --with-smfmanifestdir set path for Solaris SMF manifest],SMFMANIFESTDIR="$withval")
|
||||
|
||||
dnl Use init on other platforms...
|
||||
AC_ARG_WITH(rcdir, [ --with-rcdir set path for rc scripts],rcdir="$withval",rcdir="")
|
||||
AC_ARG_WITH(rclevels, [ --with-rclevels set run levels for rc scripts],rclevels="$withval",rclevels="2 3 5")
|
||||
AC_ARG_WITH(rcstart, [ --with-rcstart set start number for rc scripts],rcstart="$withval",rcstart="")
|
||||
AC_ARG_WITH(rcstop, [ --with-rcstop set stop number for rc scripts],rcstop="$withval",rcstop="")
|
||||
|
||||
if test x$rcdir = x; then
|
||||
if test x$LAUNCHD_DIR = x -a x$SYSTEMD_DIR = x -a x$SMFMANIFESTDIR = x; then
|
||||
# Fall back on "init", the original service startup interface...
|
||||
if test -d /sbin/init.d; then
|
||||
# SuSE
|
||||
rcdir="/sbin/init.d"
|
||||
elif test -d /etc/init.d; then
|
||||
# Others
|
||||
rcdir="/etc"
|
||||
else
|
||||
# RedHat, NetBSD
|
||||
rcdir="/etc/rc.d"
|
||||
fi
|
||||
else
|
||||
rcdir="no"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$rcstart" = x; then
|
||||
case "$uname" in
|
||||
Linux | GNU | GNU/k*BSD*)
|
||||
# Linux
|
||||
rcstart="81"
|
||||
;;
|
||||
|
||||
SunOS*)
|
||||
# Solaris
|
||||
rcstart="81"
|
||||
;;
|
||||
|
||||
*)
|
||||
# Others
|
||||
rcstart="99"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if test "x$rcstop" = x; then
|
||||
case "$uname" in
|
||||
Linux | GNU | GNU/k*BSD*)
|
||||
# Linux
|
||||
rcstop="36"
|
||||
;;
|
||||
|
||||
*)
|
||||
# Others
|
||||
rcstop="00"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
INITDIR=""
|
||||
INITDDIR=""
|
||||
RCLEVELS="$rclevels"
|
||||
RCSTART="$rcstart"
|
||||
RCSTOP="$rcstop"
|
||||
AC_SUBST(INITDIR)
|
||||
AC_SUBST(INITDDIR)
|
||||
AC_SUBST(RCLEVELS)
|
||||
AC_SUBST(RCSTART)
|
||||
AC_SUBST(RCSTOP)
|
||||
|
||||
if test "x$rcdir" != xno; then
|
||||
if test "x$rclevels" = x; then
|
||||
INITDDIR="$rcdir"
|
||||
else
|
||||
INITDIR="$rcdir"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Xinetd support...
|
||||
AC_ARG_WITH(xinetd, [ --with-xinetd set path for xinetd config files],xinetd="$withval",xinetd="")
|
||||
XINETD=""
|
||||
AC_SUBST(XINETD)
|
||||
|
||||
if test "x$xinetd" = x; then
|
||||
if test ! -x /sbin/launchd; then
|
||||
for dir in /etc/xinetd.d /usr/local/etc/xinetd.d; do
|
||||
if test -d $dir; then
|
||||
XINETD="$dir"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
elif test "x$xinet" != xno; then
|
||||
XINETD="$xinetd"
|
||||
fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-startup.m4 11747 2014-03-27 01:15:48Z msweet $".
|
||||
dnl
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-threads.m4 6649 2007-07-11 21:46:42Z mike $"
|
||||
dnl "$Id: cups-threads.m4 11324 2013-10-04 03:11:42Z msweet $"
|
||||
dnl
|
||||
dnl Threading stuff for CUPS.
|
||||
dnl
|
||||
@@ -50,5 +50,5 @@ fi
|
||||
AC_SUBST(PTHREAD_FLAGS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-threads.m4 6649 2007-07-11 21:46:42Z mike $".
|
||||
dnl End of "$Id: cups-threads.m4 11324 2013-10-04 03:11:42Z msweet $".
|
||||
dnl
|
||||
|
||||
+40
-32
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: config.h.in 11717 2014-03-21 16:42:53Z msweet $"
|
||||
*
|
||||
* Configuration file for CUPS.
|
||||
* Configuration file for CUPS.
|
||||
*
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
* 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
#ifndef _CUPS_CONFIG_H_
|
||||
@@ -131,6 +131,13 @@
|
||||
#define CUPS_STATEDIR "/var/run/cups"
|
||||
|
||||
|
||||
/*
|
||||
* Do we have posix_spawn?
|
||||
*/
|
||||
|
||||
#undef HAVE_POSIX_SPAWN
|
||||
|
||||
|
||||
/*
|
||||
* Do we have ZLIB?
|
||||
*/
|
||||
@@ -290,17 +297,9 @@
|
||||
|
||||
#undef HAVE_CDSASSL
|
||||
#undef HAVE_GNUTLS
|
||||
#undef HAVE_LIBSSL
|
||||
#undef HAVE_SSL
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the SSL_set_tlsext_host_name function?
|
||||
*/
|
||||
|
||||
#undef HAVE_SSL_SET_TLSEXT_HOST_NAME
|
||||
|
||||
|
||||
/*
|
||||
* What Security framework headers do we have?
|
||||
*/
|
||||
@@ -323,6 +322,20 @@
|
||||
#undef HAVE_CSSMERRORSTRING
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the SecGenerateSelfSignedCertificate function?
|
||||
*/
|
||||
|
||||
#undef HAVE_SECGENERATESELFSIGNEDCERTIFICATE
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the SecKeychainOpen function?
|
||||
*/
|
||||
|
||||
#undef HAVE_SECKEYCHAINOPEN
|
||||
|
||||
|
||||
/*
|
||||
* Do we have libpaper?
|
||||
*/
|
||||
@@ -428,13 +441,6 @@
|
||||
#undef HAVE_STRUCT_SOCKADDR_SA_LEN
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the AIX usersec.h header file?
|
||||
*/
|
||||
|
||||
#undef HAVE_USERSEC_H
|
||||
|
||||
|
||||
/*
|
||||
* Do we have pthread support?
|
||||
*/
|
||||
@@ -448,6 +454,14 @@
|
||||
|
||||
#undef HAVE_LAUNCH_H
|
||||
#undef HAVE_LAUNCHD
|
||||
#undef HAVE_LAUNCH_ACTIVATE_SOCKET
|
||||
|
||||
|
||||
/*
|
||||
* Do we have systemd support?
|
||||
*/
|
||||
|
||||
#undef HAVE_SYSTEMD
|
||||
|
||||
|
||||
/*
|
||||
@@ -522,19 +536,13 @@
|
||||
#undef HAVE_NOTIFY_POST
|
||||
|
||||
|
||||
/*
|
||||
* Do we have Darwin's IOKit private headers?
|
||||
*/
|
||||
|
||||
#undef HAVE_IOKIT_PWR_MGT_IOPMLIBPRIVATE_H
|
||||
|
||||
|
||||
/*
|
||||
* Do we have DBUS?
|
||||
*/
|
||||
|
||||
#undef HAVE_DBUS
|
||||
#undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND
|
||||
#undef HAVE_DBUS_THREADS_INIT
|
||||
|
||||
|
||||
/*
|
||||
@@ -706,5 +714,5 @@ static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
|
||||
#endif /* !_CUPS_CONFIG_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: config.h.in 11717 2014-03-21 16:42:53Z msweet $".
|
||||
*/
|
||||
|
||||
+11396
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -1,16 +1,16 @@
|
||||
dnl
|
||||
dnl "$Id$"
|
||||
dnl "$Id: configure.ac 11823 2014-04-21 12:22:03Z msweet $"
|
||||
dnl
|
||||
dnl Configuration script for CUPS.
|
||||
dnl Configuration script for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2012 by Apple Inc.
|
||||
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
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 file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
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_INIT(cups/cups.h)
|
||||
@@ -32,7 +32,7 @@ sinclude(config-scripts/cups-ssl.m4)
|
||||
sinclude(config-scripts/cups-pam.m4)
|
||||
sinclude(config-scripts/cups-largefile.m4)
|
||||
sinclude(config-scripts/cups-dnssd.m4)
|
||||
sinclude(config-scripts/cups-launchd.m4)
|
||||
sinclude(config-scripts/cups-startup.m4)
|
||||
sinclude(config-scripts/cups-defaults.m4)
|
||||
sinclude(config-scripts/cups-scripting.m4)
|
||||
|
||||
@@ -68,12 +68,8 @@ AC_OUTPUT(Makedefs
|
||||
cups-config
|
||||
data/testprint
|
||||
desktop/cups.desktop
|
||||
doc/help/ref-cups-files-conf.html
|
||||
doc/help/ref-cupsd-conf.html
|
||||
doc/index.html
|
||||
man/client.conf.man
|
||||
man/cups-deviced.man
|
||||
man/cups-driverd.man
|
||||
man/cups-files.conf.man
|
||||
man/cups-lpd.man
|
||||
man/cups-snmp.man
|
||||
@@ -85,6 +81,9 @@ AC_OUTPUT(Makedefs
|
||||
scheduler/cups.sh
|
||||
scheduler/cups.xml
|
||||
scheduler/org.cups.cups-lpd.plist
|
||||
scheduler/org.cups.cupsd.path
|
||||
scheduler/org.cups.cupsd.service
|
||||
scheduler/org.cups.cupsd.socket
|
||||
templates/header.tmpl
|
||||
packaging/cups.list
|
||||
$LANGFILES)
|
||||
@@ -92,5 +91,5 @@ AC_OUTPUT(Makedefs
|
||||
chmod +x cups-config
|
||||
|
||||
dnl
|
||||
dnl End of "$Id$".
|
||||
dnl End of "$Id: configure.ac 11823 2014-04-21 12:22:03Z msweet $".
|
||||
dnl
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# "$Id$"
|
||||
# "$Id: cups-config.in 10996 2013-05-29 11:51:34Z msweet $"
|
||||
#
|
||||
# CUPS configuration utility.
|
||||
#
|
||||
@@ -142,5 +142,5 @@ while test $# -gt 0; do
|
||||
done
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
# End of "$Id: cups-config.in 10996 2013-05-29 11:51:34Z msweet $".
|
||||
#
|
||||
|
||||
+246
-193
@@ -1,260 +1,313 @@
|
||||
adminutil.o: adminutil.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.h adminutil.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 adminutil.h
|
||||
array.o: array.c string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h array-private.h ../cups/array.h
|
||||
attr.o: attr.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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 ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
backchannel.o: backchannel.c cups.h file.h versioning.h ipp.h http.h \
|
||||
array.h language.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 ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.h backend.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 backend.h
|
||||
conflicts.o: conflicts.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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 ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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 ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
dest.o: dest.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
dest-job.o: dest-job.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
dest-localization.o: dest-localization.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h ipp-private.h \
|
||||
../cups/ipp.h http.h array.h http-private.h md5-private.h \
|
||||
language-private.h ../cups/transcode.h language.h pwg-private.h \
|
||||
../cups/cups.h file.h ppd-private.h ../cups/ppd.h thread-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
|
||||
dest-options.o: dest-options.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h ipp-private.h \
|
||||
../cups/ipp.h http.h array.h http-private.h md5-private.h \
|
||||
language-private.h ../cups/transcode.h language.h pwg-private.h \
|
||||
../cups/cups.h file.h ppd-private.h ../cups/ppd.h thread-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
|
||||
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 ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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 ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
file.o: file.c file-private.h cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
getdevices.o: getdevices.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.h
|
||||
getifaddrs.o: getifaddrs.c http-private.h ../config.h ../cups/http.h \
|
||||
versioning.h array.h md5-private.h ipp-private.h ../cups/ipp.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
|
||||
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
|
||||
getputfile.o: getputfile.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
globals.o: globals.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
http.o: http.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
http-addr.o: http-addr.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
http-addrlist.o: http-addrlist.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h ipp-private.h \
|
||||
../cups/ipp.h http.h array.h http-private.h md5-private.h \
|
||||
language-private.h ../cups/transcode.h language.h pwg-private.h \
|
||||
../cups/cups.h file.h ppd-private.h ../cups/ppd.h thread-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
|
||||
http-support.o: http-support.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h ipp-private.h \
|
||||
../cups/ipp.h http.h array.h http-private.h md5-private.h \
|
||||
language-private.h ../cups/transcode.h language.h pwg-private.h \
|
||||
../cups/cups.h file.h ppd-private.h ../cups/ppd.h thread-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
|
||||
ipp.o: ipp.c cups-private.h string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h ipp-private.h ../cups/ipp.h http.h array.h \
|
||||
http-private.h md5-private.h language-private.h ../cups/transcode.h \
|
||||
language.h pwg-private.h ../cups/cups.h file.h ppd-private.h \
|
||||
../cups/ppd.h thread-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
|
||||
ipp-support.o: ipp-support.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
langprintf.o: langprintf.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
language.o: language.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
localize.o: localize.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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 ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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/http.h \
|
||||
versioning.h array.h md5-private.h ipp-private.h ../cups/ipp.h \
|
||||
string-private.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 \
|
||||
../cups/ipp.h string-private.h
|
||||
notify.o: notify.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
options.o: options.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
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
|
||||
language.h pwg.h
|
||||
ppd.o: ppd.c cups-private.h string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h ipp-private.h ../cups/ipp.h http.h array.h \
|
||||
http-private.h md5-private.h language-private.h ../cups/transcode.h \
|
||||
language.h pwg-private.h ../cups/cups.h file.h ppd-private.h \
|
||||
../cups/ppd.h thread-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
|
||||
ppd-cache.o: ppd-cache.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
pwg-media.o: pwg-media.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
request.o: request.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
sidechannel.o: sidechannel.c sidechannel.h versioning.h cups-private.h \
|
||||
string-private.h ../config.h debug-private.h ipp-private.h \
|
||||
../cups/ipp.h http.h array.h http-private.h md5-private.h \
|
||||
language-private.h ../cups/transcode.h language.h pwg-private.h \
|
||||
../cups/cups.h file.h ppd-private.h ../cups/ppd.h thread-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 \
|
||||
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 ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.h snmp-private.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 snmp-private.h
|
||||
snprintf.o: snprintf.c string-private.h ../config.h
|
||||
string.o: string.c string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h thread-private.h array.h
|
||||
tempfile.o: tempfile.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
thread.o: thread.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
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 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 ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
usersys.o: usersys.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
util.o: util.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
testadmin.o: testadmin.c adminutil.h cups.h file.h versioning.h ipp.h \
|
||||
http.h array.h language.h string-private.h ../config.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.h dir.h
|
||||
../cups/versioning.h array-private.h ../cups/array.h dir.h
|
||||
testconflicts.o: testconflicts.c cups.h file.h versioning.h ipp.h http.h \
|
||||
array.h language.h ppd.h string-private.h ../config.h
|
||||
array.h language.h pwg.h ppd.h string-private.h ../config.h
|
||||
testcups.o: testcups.c string-private.h ../config.h cups.h file.h \
|
||||
versioning.h ipp.h http.h array.h language.h ppd.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 \
|
||||
../cups/versioning.h file.h
|
||||
testhttp.o: testhttp.c string-private.h ../config.h http-private.h \
|
||||
../cups/http.h versioning.h array.h md5-private.h ipp-private.h \
|
||||
../cups/ipp.h
|
||||
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 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 \
|
||||
ipp-private.h ../cups/ipp.h http.h array.h
|
||||
testoptions.o: testoptions.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
testlang.o: testlang.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
testppd.o: testppd.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.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
|
||||
testpwg.o: testpwg.c ppd-private.h ../cups/cups.h file.h versioning.h \
|
||||
ipp.h http.h array.h language.h ../cups/ppd.h pwg-private.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 ipp-private.h http-private.h md5-private.h \
|
||||
language-private.h ../cups/transcode.h thread-private.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 ipp-private.h ../cups/ipp.h \
|
||||
http.h array.h http-private.h md5-private.h language-private.h \
|
||||
../cups/transcode.h language.h pwg-private.h ../cups/cups.h file.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.h snmp-private.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 snmp-private.h
|
||||
|
||||
+59
-33
@@ -1,18 +1,18 @@
|
||||
#
|
||||
# "$Id$"
|
||||
# "$Id: Makefile 12032 2014-07-15 20:37:32Z msweet $"
|
||||
#
|
||||
# API library Makefile for CUPS.
|
||||
# API library Makefile for CUPS.
|
||||
#
|
||||
# Copyright 2007-2013 by Apple Inc.
|
||||
# Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
# 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
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
#
|
||||
# This file is subject to the Apple OS-Developed Software exception.
|
||||
# This file is subject to the Apple OS-Developed Software exception.
|
||||
#
|
||||
|
||||
include ../Makedefs
|
||||
@@ -76,6 +76,7 @@ LIBOBJS = \
|
||||
string.o \
|
||||
tempfile.o \
|
||||
thread.o \
|
||||
tls.o \
|
||||
transcode.o \
|
||||
usersys.o \
|
||||
util.o
|
||||
@@ -84,6 +85,7 @@ TESTOBJS = \
|
||||
testarray.o \
|
||||
testconflicts.o \
|
||||
testcups.o \
|
||||
testdest.o \
|
||||
testfile.o \
|
||||
testhttp.o \
|
||||
testi18n.o \
|
||||
@@ -147,8 +149,10 @@ LIBTARGETS = \
|
||||
UNITTARGETS = \
|
||||
testadmin \
|
||||
testarray \
|
||||
testcache \
|
||||
testconflicts \
|
||||
testcups \
|
||||
testdest \
|
||||
testfile \
|
||||
testhttp \
|
||||
testi18n \
|
||||
@@ -190,7 +194,7 @@ unittests: $(UNITTARGETS)
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJS) $(TARGETS) $(UNITTARGETS)
|
||||
$(RM) libcups.so libcups.sl libcups.dylib
|
||||
$(RM) libcups.so libcups.dylib
|
||||
|
||||
|
||||
#
|
||||
@@ -257,7 +261,7 @@ install-libs: $(INSTALLSTATIC)
|
||||
echo Installing libraries in $(LIBDIR)...
|
||||
$(INSTALL_DIR) -m 755 $(LIBDIR)
|
||||
$(INSTALL_LIB) $(LIBCUPS) $(LIBDIR)
|
||||
if test $(LIBCUPS) = "libcups.so.2" -o $(LIBCUPS) = "libcups.sl.2"; then \
|
||||
if test $(LIBCUPS) = "libcups.so.2"; then \
|
||||
$(RM) $(LIBDIR)/`basename $(LIBCUPS) .2`; \
|
||||
$(LN) $(LIBCUPS) $(LIBDIR)/`basename $(LIBCUPS) .2`; \
|
||||
fi
|
||||
@@ -286,9 +290,6 @@ uninstall:
|
||||
$(RM) $(LIBDIR)/libcups.2.dylib
|
||||
$(RM) $(LIBDIR)/$(LIBCUPSSTATIC)
|
||||
$(RM) $(LIBDIR)/libcups.dylib
|
||||
$(RM) $(LIBDIR)/libcups_s.a
|
||||
$(RM) $(LIBDIR)/libcups.sl
|
||||
$(RM) $(LIBDIR)/libcups.sl.2
|
||||
$(RM) $(LIBDIR)/libcups.so
|
||||
$(RM) $(LIBDIR)/libcups.so.2
|
||||
-$(RMDIR) $(LIBDIR)
|
||||
@@ -299,10 +300,10 @@ uninstall:
|
||||
|
||||
|
||||
#
|
||||
# libcups.so.2, libcups.sl.2
|
||||
# libcups.so.2
|
||||
#
|
||||
|
||||
libcups.so.2 libcups.sl.2: $(LIBOBJS)
|
||||
libcups.so.2: $(LIBOBJS)
|
||||
echo Linking $@...
|
||||
$(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS) $(LIBGSSAPI) \
|
||||
$(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
@@ -322,7 +323,7 @@ libcups.2.dylib: $(LIBOBJS) $(LIBCUPSORDER)
|
||||
echo Linking $@...
|
||||
$(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
|
||||
-install_name $(libdir)/$@ \
|
||||
-current_version 2.10.0 \
|
||||
-current_version 2.11.0 \
|
||||
-compatibility_version 2.0.0 \
|
||||
-exported_symbols_list t.exp \
|
||||
$(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
|
||||
@@ -331,19 +332,6 @@ libcups.2.dylib: $(LIBOBJS) $(LIBCUPSORDER)
|
||||
$(LN) $@ libcups.dylib
|
||||
|
||||
|
||||
#
|
||||
# libcups_s.a
|
||||
#
|
||||
|
||||
libcups_s.a: $(LIBOBJS) libcups_s.exp
|
||||
echo Creating $@...
|
||||
$(DSO) $(DSOFLAGS) -Wl,-bexport:libcups_s.exp -o libcups_s.o \
|
||||
$(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
|
||||
$(COMMONLIBS) $(LIBZ)
|
||||
$(RM) $@
|
||||
$(AR) $(ARFLAGS) $@ libcups_s.o
|
||||
|
||||
|
||||
#
|
||||
# libcups.la
|
||||
#
|
||||
@@ -351,7 +339,7 @@ libcups_s.a: $(LIBOBJS) libcups_s.exp
|
||||
libcups.la: $(LIBOBJS)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) \
|
||||
-rpath $(LIBDIR) -version-info 2:10 $(LIBGSSAPI) $(SSLLIBS) \
|
||||
-rpath $(LIBDIR) -version-info 2:11 $(LIBGSSAPI) $(SSLLIBS) \
|
||||
$(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
@@ -366,6 +354,23 @@ libcups.a: $(LIBOBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
|
||||
#
|
||||
# libcups2.def (Windows DLL exports file...)
|
||||
#
|
||||
|
||||
libcups2.def: $(LIBOBJS) Makefile
|
||||
echo Generating $@...
|
||||
echo "LIBRARY libcups2" >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) | \
|
||||
grep -v -E \
|
||||
-e 'cups_debug|Apple|BackChannel|Backend|FileCheck|Filter|GSSService|SetNegotiate|SideChannel' \
|
||||
-e 'Block$$' | \
|
||||
sed -e '1,$$s/^_//' | sort >>libcups2.def
|
||||
|
||||
|
||||
#
|
||||
# testadmin (dependency on static CUPS library is intentional)
|
||||
#
|
||||
@@ -388,6 +393,16 @@ testarray: testarray.o $(LIBCUPSSTATIC)
|
||||
./testarray
|
||||
|
||||
|
||||
#
|
||||
# testcache (dependency on static CUPS library is intentional)
|
||||
#
|
||||
|
||||
testcache: testcache.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ testcache.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
#
|
||||
# testconflicts (dependency on static CUPS library is intentional)
|
||||
#
|
||||
@@ -408,6 +423,16 @@ testcups: testcups.o $(LIBCUPSSTATIC)
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
#
|
||||
# testdest (dependency on static CUPS library is intentional)
|
||||
#
|
||||
|
||||
testdest: testdest.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ testdest.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
#
|
||||
# testfile (dependency on static CUPS library is intentional)
|
||||
#
|
||||
@@ -636,8 +661,9 @@ sloc:
|
||||
#
|
||||
|
||||
include Dependencies
|
||||
tls.o: tls-darwin.c tls-gnutls.c tls-sspi.c
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
# End of "$Id: Makefile 12032 2014-07-15 20:37:32Z msweet $".
|
||||
#
|
||||
|
||||
+15
-26
@@ -1,29 +1,18 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: adminutil.c 11598 2014-02-18 18:58:19Z msweet $"
|
||||
*
|
||||
* Administration utility API definitions for CUPS.
|
||||
* Administration utility API definitions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 2001-2007 by Easy Software Products.
|
||||
* Copyright 2007-2014 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* cupsAdminCreateWindowsPPD() - Create the Windows PPD file for a printer.
|
||||
* cupsAdminExportSamba() - Export a printer to Samba.
|
||||
* cupsAdminGetServerSettings() - Get settings from the server.
|
||||
* cupsAdminSetServerSettings() - Set settings on the server.
|
||||
* do_samba_command() - Do a SAMBA command.
|
||||
* get_cupsd_conf() - Get the current cupsd.conf file.
|
||||
* invalidate_cupsd_cache() - Invalidate the cached cupsd.conf settings.
|
||||
* write_option() - Write a CUPS option to a PPD file.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -52,7 +41,7 @@ static int do_samba_command(const char *command,
|
||||
FILE *logfile);
|
||||
static http_status_t get_cupsd_conf(http_t *http, _cups_globals_t *cg,
|
||||
time_t last_update, char *name,
|
||||
int namelen, int *remote);
|
||||
size_t namelen, int *remote);
|
||||
static void invalidate_cupsd_cache(_cups_globals_t *cg);
|
||||
static void write_option(cups_file_t *dstfp, int order,
|
||||
const char *name, const char *text,
|
||||
@@ -319,7 +308,7 @@ cupsAdminCreateWindowsPPD(
|
||||
}
|
||||
}
|
||||
|
||||
snprintf(ptr + 1, sizeof(line) - (ptr - line + 1),
|
||||
snprintf(ptr + 1, sizeof(line) - (size_t)(ptr - line + 1),
|
||||
"%%cupsJobTicket: %s=%s\n\"\n*End", option, choice);
|
||||
|
||||
cupsFilePrintf(dstfp, "*%% Changed for CUPS Windows Driver...\n%s\n",
|
||||
@@ -2120,7 +2109,7 @@ get_cupsd_conf(
|
||||
_cups_globals_t *cg, /* I - Global data */
|
||||
time_t last_update, /* I - Last update time for file */
|
||||
char *name, /* I - Filename buffer */
|
||||
int namesize, /* I - Size of filename buffer */
|
||||
size_t namesize, /* I - Size of filename buffer */
|
||||
int *remote) /* O - Remote file? */
|
||||
{
|
||||
int fd; /* Temporary file descriptor */
|
||||
@@ -2176,7 +2165,7 @@ get_cupsd_conf(
|
||||
* Read cupsd.conf via a HTTP GET request...
|
||||
*/
|
||||
|
||||
if ((fd = cupsTempFd(name, namesize)) < 0)
|
||||
if ((fd = cupsTempFd(name, (int)namesize)) < 0)
|
||||
{
|
||||
*name = '\0';
|
||||
|
||||
@@ -2337,5 +2326,5 @@ write_option(cups_file_t *dstfp, /* I - PPD file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: adminutil.c 11598 2014-02-18 18:58:19Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: adminutil.h 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* Administration utility API definitions for CUPS.
|
||||
*
|
||||
@@ -77,5 +77,5 @@ extern int cupsAdminSetServerSettings(http_t *http,
|
||||
#endif /* !_CUPS_ADMINUTIL_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: adminutil.h 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
Filter and backend programming header for CUPS.
|
||||
|
||||
Copyright 2008-2011 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
|
||||
|
||||
+97
-8
@@ -237,7 +237,7 @@ prefix strings:</p>
|
||||
<code>marker-types</code>, <code>printer-alert</code>, and
|
||||
<code>printer-alert-description</code> printer attributes. Standard
|
||||
<code>marker-types</code> values are listed in <a href='#TABLE1'>Table
|
||||
1</a>.</dd>
|
||||
1</a>. String values need special handling - see <a href="#ATTR_STRINGS">Reporting Attribute String Values</a> below.</dd>
|
||||
|
||||
<dt>CRIT: message</dt>
|
||||
<dd>Sets the printer-state-message attribute and adds the specified
|
||||
@@ -320,11 +320,11 @@ the "DEBUG:" prefix string.</p>
|
||||
<td>Fuser unit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fuserCleaningPad</td>
|
||||
<td>fuser-cleaning-pad</td>
|
||||
<td>Fuser cleaning pad</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fuserOil</td>
|
||||
<td>fuser-oil</td>
|
||||
<td>Fuser oil</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -336,7 +336,7 @@ the "DEBUG:" prefix string.</p>
|
||||
<td>Photo conductor</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>solidWax</td>
|
||||
<td>solid-wax</td>
|
||||
<td>Wax supply</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -348,19 +348,19 @@ the "DEBUG:" prefix string.</p>
|
||||
<td>Toner supply</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>transferUnit</td>
|
||||
<td>transfer-unit</td>
|
||||
<td>Transfer unit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>wasteInk</td>
|
||||
<td>waste-ink</td>
|
||||
<td>Waste ink tank</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>wasteToner</td>
|
||||
<td>waste-toner</td>
|
||||
<td>Waste toner tank</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>wasteWax</td>
|
||||
<td>waste-wax</td>
|
||||
<td>Waste wax tank</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -440,6 +440,95 @@ the "DEBUG:" prefix string.</p>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
||||
|
||||
<h4><a name="ATTR_STRINGS">Reporting Attribute String Values</a></h4>
|
||||
|
||||
<p>When reporting string values using "ATTR:" messages, a filter or backend must take special care to appropriately quote those values. The scheduler uses the CUPS option parsing code for attributes, so the general syntax is:</p>
|
||||
|
||||
<pre class="example">
|
||||
name=simple
|
||||
name=simple,simple,...
|
||||
name='complex value'
|
||||
name="complex value"
|
||||
name='"complex value"','"complex value"',...
|
||||
</pre>
|
||||
|
||||
<p>Simple values are strings that do not contain spaces, quotes, backslashes, or the comma and can be placed verbatim in the "ATTR:" message, for example:</p>
|
||||
|
||||
<pre class="example">
|
||||
int levels[4] = { 40, 50, 60, 70 }; /* CMYK */
|
||||
|
||||
fputs("ATTR: marker-colors=#00FFFF,#FF00FF,#FFFF00,#000000\n", stderr);
|
||||
fputs("ATTR: marker-high-levels=100,100,100,100\n", stderr);
|
||||
fprintf(stderr, "ATTR: marker-levels=%d,%d,%d,%d\n", levels[0], levels[1],
|
||||
levels[2], levels[3], levels[4]);
|
||||
fputs("ATTR: marker-low-levels=5,5,5,5\n", stderr);
|
||||
fputs("ATTR: marker-types=toner,toner,toner,toner\n", stderr);
|
||||
</pre>
|
||||
|
||||
<p>Complex values that contains spaces, quotes, backslashes, or the comma must be quoted. For a single value a single set of quotes is sufficient:</p>
|
||||
|
||||
<pre class="example">
|
||||
fputs("ATTR: marker-message='Levels shown are approximate.'\n", stderr);
|
||||
</pre>
|
||||
|
||||
<p>When multiple values are reported, each value must be enclosed by a set of single and double quotes:</p>
|
||||
|
||||
<pre class="example">
|
||||
fputs("ATTR: marker-names='\"Cyan Toner\"','\"Magenta Toner\"',"
|
||||
"'\"Yellow Toner\"','\"Black Toner\"'\n", stderr);
|
||||
</pre>
|
||||
|
||||
<p>The IPP backend includes a <var>quote_string</var> function that may be used to properly quote a complex value in an "ATTR:" message:</p>
|
||||
|
||||
<pre class="example">
|
||||
static const char * /* O - Quoted string */
|
||||
quote_string(const char *s, /* I - String */
|
||||
char *q, /* I - Quoted string buffer */
|
||||
size_t qsize) /* I - Size of quoted string buffer */
|
||||
{
|
||||
char *qptr, /* Pointer into string buffer */
|
||||
*qend; /* End of string buffer */
|
||||
|
||||
|
||||
qptr = q;
|
||||
qend = q + qsize - 5;
|
||||
|
||||
if (qend < q)
|
||||
{
|
||||
*q = '\0';
|
||||
return (q);
|
||||
}
|
||||
|
||||
*qptr++ = '\'';
|
||||
*qptr++ = '\"';
|
||||
|
||||
while (*s && qptr < qend)
|
||||
{
|
||||
if (*s == '\\' || *s == '\"' || *s == '\'')
|
||||
{
|
||||
if (qptr < (qend - 4))
|
||||
{
|
||||
*qptr++ = '\\';
|
||||
*qptr++ = '\\';
|
||||
*qptr++ = '\\';
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
*qptr++ = *s++;
|
||||
}
|
||||
|
||||
*qptr++ = '\"';
|
||||
*qptr++ = '\'';
|
||||
*qptr = '\0';
|
||||
|
||||
return (q);
|
||||
}
|
||||
</pre>
|
||||
|
||||
|
||||
<h4><a name="MANAGING_STATE">Managing Printer State in a Filter</a></h4>
|
||||
|
||||
<p>Filters are responsible for managing the state keywords they set using
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: array-private.h 3933 2012-10-01 03:01:10Z msweet $"
|
||||
*
|
||||
* Private array definitions for CUPS.
|
||||
*
|
||||
@@ -48,5 +48,5 @@ extern cups_array_t *_cupsArrayNewStrings(const char *s, char delim)
|
||||
#endif /* !_CUPS_ARRAY_PRIVATE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: array-private.h 3933 2012-10-01 03:01:10Z msweet $".
|
||||
*/
|
||||
|
||||
+30
-62
@@ -1,56 +1,25 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: array.c 12031 2014-07-15 19:57:59Z msweet $"
|
||||
*
|
||||
* Sorted array routines for CUPS.
|
||||
* Sorted array routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
* 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* cupsArrayAdd() - Add an element to the array.
|
||||
* _cupsArrayAddStrings() - Add zero or more comma-delimited strings to an
|
||||
* array.
|
||||
* cupsArrayClear() - Clear the array.
|
||||
* cupsArrayCount() - Get the number of elements in the array.
|
||||
* cupsArrayCurrent() - Return the current element in the array.
|
||||
* cupsArrayDelete() - Free all memory used by the array.
|
||||
* cupsArrayDup() - Duplicate the array.
|
||||
* cupsArrayFind() - Find an element in the array.
|
||||
* cupsArrayFirst() - Get the first element in the array.
|
||||
* cupsArrayGetIndex() - Get the index of the current element.
|
||||
* cupsArrayGetInsert() - Get the index of the last inserted element.
|
||||
* cupsArrayIndex() - Get the N-th element in the array.
|
||||
* cupsArrayInsert() - Insert an element in the array.
|
||||
* cupsArrayLast() - Get the last element in the array.
|
||||
* cupsArrayNew() - Create a new array.
|
||||
* cupsArrayNew2() - Create a new array with hash.
|
||||
* cupsArrayNew3() - Create a new array with hash and/or free function.
|
||||
* _cupsArrayNewStrings() - Create a new array of comma-delimited strings.
|
||||
* cupsArrayNext() - Get the next element in the array.
|
||||
* cupsArrayPrev() - Get the previous element in the array.
|
||||
* cupsArrayRemove() - Remove an element from the array.
|
||||
* cupsArrayRestore() - Reset the current element to the last @link
|
||||
* cupsArraySave@.
|
||||
* cupsArraySave() - Mark the current element for a later @link
|
||||
* cupsArrayRestore@.
|
||||
* cupsArrayUserData() - Return the user data for an array.
|
||||
* cups_array_add() - Insert or append an element to the array.
|
||||
* cups_array_find() - Find an element in the array.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include necessary headers...
|
||||
*/
|
||||
|
||||
#include <cups/cups.h>
|
||||
#include "string-private.h"
|
||||
#include "debug-private.h"
|
||||
#include "array-private.h"
|
||||
@@ -423,7 +392,7 @@ cupsArrayDup(cups_array_t *a) /* I - Array */
|
||||
* Allocate memory for the elements...
|
||||
*/
|
||||
|
||||
da->elements = malloc(a->num_elements * sizeof(void *));
|
||||
da->elements = malloc((size_t)a->num_elements * sizeof(void *));
|
||||
if (!da->elements)
|
||||
{
|
||||
free(da);
|
||||
@@ -451,7 +420,7 @@ cupsArrayDup(cups_array_t *a) /* I - Array */
|
||||
* Just copy raw pointers...
|
||||
*/
|
||||
|
||||
memcpy(da->elements, a->elements, a->num_elements * sizeof(void *));
|
||||
memcpy(da->elements, a->elements, (size_t)a->num_elements * sizeof(void *));
|
||||
}
|
||||
|
||||
da->num_elements = a->num_elements;
|
||||
@@ -794,7 +763,7 @@ cupsArrayNew3(cups_array_func_t f, /* I - Comparison function or @code NULL@ fo
|
||||
{
|
||||
a->hashfunc = h;
|
||||
a->hashsize = hsize;
|
||||
a->hash = malloc(hsize * sizeof(int));
|
||||
a->hash = malloc((size_t)hsize * sizeof(int));
|
||||
|
||||
if (!a->hash)
|
||||
{
|
||||
@@ -802,7 +771,7 @@ cupsArrayNew3(cups_array_func_t f, /* I - Comparison function or @code NULL@ fo
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
memset(a->hash, -1, hsize * sizeof(int));
|
||||
memset(a->hash, -1, (size_t)hsize * sizeof(int));
|
||||
}
|
||||
|
||||
a->copyfunc = cf;
|
||||
@@ -918,9 +887,9 @@ int /* O - 1 on success, 0 on failure */
|
||||
cupsArrayRemove(cups_array_t *a, /* I - Array */
|
||||
void *e) /* I - Element */
|
||||
{
|
||||
int i, /* Looping var */
|
||||
current, /* Current element */
|
||||
diff; /* Difference */
|
||||
ssize_t i, /* Looping var */
|
||||
current; /* Current element */
|
||||
int diff; /* Difference */
|
||||
|
||||
|
||||
/*
|
||||
@@ -952,7 +921,7 @@ cupsArrayRemove(cups_array_t *a, /* I - Array */
|
||||
|
||||
if (current < a->num_elements)
|
||||
memmove(a->elements + current, a->elements + current + 1,
|
||||
(a->num_elements - current) * sizeof(void *));
|
||||
(size_t)(a->num_elements - current) * sizeof(void *));
|
||||
|
||||
if (current <= a->current)
|
||||
a->current --;
|
||||
@@ -1053,9 +1022,9 @@ cups_array_add(cups_array_t *a, /* I - Array */
|
||||
void *e, /* I - Element to add */
|
||||
int insert) /* I - 1 = insert, 0 = append */
|
||||
{
|
||||
int i, /* Looping var */
|
||||
current, /* Current element */
|
||||
diff; /* Comparison with current element */
|
||||
int i, /* Looping var */
|
||||
current; /* Current element */
|
||||
int diff; /* Comparison with current element */
|
||||
|
||||
|
||||
DEBUG_printf(("7cups_array_add(a=%p, e=%p, insert=%d)", a, e, insert));
|
||||
@@ -1079,7 +1048,7 @@ cups_array_add(cups_array_t *a, /* I - Array */
|
||||
if (a->alloc_elements == 0)
|
||||
{
|
||||
count = 16;
|
||||
temp = malloc(count * sizeof(void *));
|
||||
temp = malloc((size_t)count * sizeof(void *));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1088,10 +1057,10 @@ cups_array_add(cups_array_t *a, /* I - Array */
|
||||
else
|
||||
count = a->alloc_elements + 1024;
|
||||
|
||||
temp = realloc(a->elements, count * sizeof(void *));
|
||||
temp = realloc(a->elements, (size_t)count * sizeof(void *));
|
||||
}
|
||||
|
||||
DEBUG_printf(("9cups_array_add: count=%d", count));
|
||||
DEBUG_printf(("9cups_array_add: count=" CUPS_LLFMT, CUPS_LLCAST count));
|
||||
|
||||
if (!temp)
|
||||
{
|
||||
@@ -1181,7 +1150,7 @@ cups_array_add(cups_array_t *a, /* I - Array */
|
||||
*/
|
||||
|
||||
memmove(a->elements + current + 1, a->elements + current,
|
||||
(a->num_elements - current) * sizeof(void *));
|
||||
(size_t)(a->num_elements - current) * sizeof(void *));
|
||||
|
||||
if (a->current >= current)
|
||||
a->current ++;
|
||||
@@ -1190,11 +1159,11 @@ cups_array_add(cups_array_t *a, /* I - Array */
|
||||
if (a->saved[i] >= current)
|
||||
a->saved[i] ++;
|
||||
|
||||
DEBUG_printf(("9cups_array_add: insert element at index %d...", current));
|
||||
DEBUG_printf(("9cups_array_add: insert element at index " CUPS_LLFMT, CUPS_LLCAST current));
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
DEBUG_printf(("9cups_array_add: append element at %d...", current));
|
||||
DEBUG_printf(("9cups_array_add: append element at " CUPS_LLFMT, CUPS_LLCAST current));
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (a->copyfunc)
|
||||
@@ -1213,8 +1182,7 @@ cups_array_add(cups_array_t *a, /* I - Array */
|
||||
|
||||
#ifdef DEBUG
|
||||
for (current = 0; current < a->num_elements; current ++)
|
||||
DEBUG_printf(("9cups_array_add: a->elements[%d]=%p", current,
|
||||
a->elements[current]));
|
||||
DEBUG_printf(("9cups_array_add: a->elements[" CUPS_LLFMT "]=%p", CUPS_LLCAST current, a->elements[current]));
|
||||
#endif /* DEBUG */
|
||||
|
||||
DEBUG_puts("9cups_array_add: returning 1");
|
||||
@@ -1362,5 +1330,5 @@ cups_array_find(cups_array_t *a, /* I - Array */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: array.c 12031 2014-07-15 19:57:59Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: array.h 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* Sorted array definitions for CUPS.
|
||||
*
|
||||
@@ -88,5 +88,5 @@ extern void *cupsArrayUserData(cups_array_t *a) _CUPS_API_1_2;
|
||||
#endif /* !_CUPS_ARRAY_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: array.h 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: attr.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* PPD model-specific attribute routines for CUPS.
|
||||
*
|
||||
@@ -331,5 +331,5 @@ _ppdNormalizeMakeAndModel(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: attr.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
+19
-31
@@ -1,32 +1,21 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: auth.c 11776 2014-03-28 19:16:05Z msweet $"
|
||||
*
|
||||
* Authentication functions for CUPS.
|
||||
* Authentication functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* This file contains Kerberos support code, copyright 2006 by
|
||||
* Jelmer Vernooij.
|
||||
* This file contains Kerberos support code, copyright 2006 by
|
||||
* Jelmer Vernooij.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* cupsDoAuthentication() - Authenticate a request.
|
||||
* _cupsSetNegotiateAuthString() - Set the Kerberos authentication string.
|
||||
* cups_gss_acquire() - Kerberos credentials callback.
|
||||
* cups_gss_getname() - Get CUPS service credentials for
|
||||
* authentication.
|
||||
* cups_gss_printf() - Show debug error messages from GSSAPI.
|
||||
* cups_local_auth() - Get the local authorization certificate if
|
||||
* available/applicable.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -272,7 +261,6 @@ cupsDoAuthentication(
|
||||
char encode[33], /* MD5 buffer */
|
||||
digest[1024]; /* Digest auth data */
|
||||
|
||||
|
||||
httpGetSubField(http, HTTP_FIELD_WWW_AUTHENTICATE, "realm", realm);
|
||||
httpGetSubField(http, HTTP_FIELD_WWW_AUTHENTICATE, "nonce", nonce);
|
||||
|
||||
@@ -453,21 +441,21 @@ _cupsSetNegotiateAuthString(
|
||||
* arbitrarily large credentials...
|
||||
*/
|
||||
|
||||
int authsize = 10 + /* "Negotiate " */
|
||||
output_token.length * 4 / 3 + 1 + /* Base64 */
|
||||
1; /* nul */
|
||||
int authsize = 10 + /* "Negotiate " */
|
||||
(int)output_token.length * 4 / 3 + 1 + 1;
|
||||
/* Base64 + nul */
|
||||
|
||||
httpSetAuthString(http, NULL, NULL);
|
||||
|
||||
if ((http->authstring = malloc(authsize)) == NULL)
|
||||
if ((http->authstring = malloc((size_t)authsize)) == NULL)
|
||||
{
|
||||
http->authstring = http->_authstring;
|
||||
authsize = sizeof(http->_authstring);
|
||||
}
|
||||
|
||||
strlcpy(http->authstring, "Negotiate ", authsize);
|
||||
strlcpy(http->authstring, "Negotiate ", (size_t)authsize);
|
||||
httpEncode64_2(http->authstring + 10, authsize - 10, output_token.value,
|
||||
output_token.length);
|
||||
(int)output_token.length);
|
||||
|
||||
gss_release_buffer(&minor_status, &output_token);
|
||||
}
|
||||
@@ -888,5 +876,5 @@ cups_local_auth(http_t *http) /* I - HTTP connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: auth.c 11776 2014-03-28 19:16:05Z msweet $".
|
||||
*/
|
||||
|
||||
+12
-18
@@ -1,24 +1,18 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: backchannel.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Backchannel functions for CUPS.
|
||||
* Backchannel functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
* 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* cupsBackChannelRead() - Read data from the backchannel.
|
||||
* cupsBackChannelWrite() - Write data to the backchannel.
|
||||
* cups_setup() - Setup select()
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -169,7 +163,7 @@ cupsBackChannelWrite(
|
||||
*/
|
||||
|
||||
buffer += count;
|
||||
total += count;
|
||||
total += (size_t)count;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,5 +189,5 @@ cups_setup(fd_set *set, /* I - Set for select() */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: backchannel.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: backend.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* Backend functions for CUPS.
|
||||
*
|
||||
@@ -150,5 +150,5 @@ quote_string(const char *s) /* I - String to write */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: backend.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: backend.h 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
* Backend definitions for CUPS.
|
||||
*
|
||||
@@ -74,5 +74,5 @@ extern void cupsBackendReport(const char *device_scheme,
|
||||
#endif /* !_CUPS_BACKEND_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: backend.h 10996 2013-05-29 11:51:34Z msweet $".
|
||||
*/
|
||||
|
||||
+14
-28
@@ -1,34 +1,20 @@
|
||||
/*
|
||||
* "$Id$"
|
||||
* "$Id: conflicts.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Option marking routines for CUPS.
|
||||
* Option marking routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
* 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
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* PostScript is a trademark of Adobe Systems, Inc.
|
||||
* PostScript is a trademark of Adobe Systems, Inc.
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* cupsGetConflicts() - Get a list of conflicting options in a marked
|
||||
* PPD.
|
||||
* cupsResolveConflicts() - Resolve conflicts in a marked PPD.
|
||||
* ppdConflicts() - Check to see if there are any conflicts among
|
||||
* the marked option choices.
|
||||
* ppdInstallableConflict() - Test whether an option choice conflicts with an
|
||||
* installable option.
|
||||
* ppd_is_installable() - Determine whether an option is in the
|
||||
* InstallableOptions group.
|
||||
* ppd_load_constraints() - Load constraints from a PPD file.
|
||||
* ppd_test_constraints() - See if any constraints are active.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -193,7 +179,7 @@ cupsResolveConflicts(
|
||||
tries, /* Number of tries */
|
||||
num_newopts; /* Number of new options */
|
||||
cups_option_t *newopts; /* New options */
|
||||
cups_array_t *active, /* Active constraints */
|
||||
cups_array_t *active = NULL, /* Active constraints */
|
||||
*pass, /* Resolvers for this pass */
|
||||
*resolvers, /* Resolvers we have used */
|
||||
*test; /* Test array for conflicts */
|
||||
@@ -886,7 +872,7 @@ ppd_load_constraints(ppd_file_t *ppd) /* I - PPD file */
|
||||
return;
|
||||
}
|
||||
|
||||
if ((constptr = calloc(i, sizeof(_ppd_cups_uiconst_t))) == NULL)
|
||||
if ((constptr = calloc((size_t)i, sizeof(_ppd_cups_uiconst_t))) == NULL)
|
||||
{
|
||||
free(consts);
|
||||
DEBUG_puts("8ppd_load_constraints: Unable to allocate memory for "
|
||||
@@ -1210,5 +1196,5 @@ ppd_test_constraints(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
* End of "$Id: conflicts.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário