Comparar commits

..

1 Commits

Autor SHA1 Mensagem Data
msweet 92d0e90813 Import cups.org releases
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/tags/release-1.4.1@4306 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-05-10 18:56:23 +00:00
1444 arquivos alterados com 465781 adições e 506429 exclusões
-843
Ver Arquivo
@@ -1,843 +0,0 @@
CHANGES-1.4.txt
---------------
CHANGES IN CUPS V1.4.8
- The scheduler would delete job data files when restarted (STR #3880)
- The network backends could crash if a printer returned a value of 0
for the maximum capacity for a supply (STR #3875)
CHANGES IN CUPS V1.4.7
- Documentation changes (STR #3710, STR #3720, STR #3745, STR #3750,
STR #3757, STR #3758, STR #3782, STR #3826, STR #3829, STR #3837)
- Web interface fixes (STR #3412, STR #3345, STR #3455, STR #3707,
STR #3755, STR #3769, STR #3783)
- Configure script fixes (STR #3659, STR #3691)
- Compilation fixes (STR #3718, STR #3771, STR #3774)
- The imageto* filters could crash with bad GIF files (STR #3867)
- The scheduler might leave old job data files in the spool directory
(STR #3795)
- CUPS did not work with locales using the ASCII character set
(STR #3832)
- httpAddrString() did not return a URI-style IPv6 numeric address
(STR #3814)
- Fixed an issue when reading compressed CUPS raster streams (STR #3812)
- Fixed an issue with PostScript printer auto-configuration (STR #3443)
- Fixed some compatibility issues with the libusb-based USB backend
(STR #3799)
- The network backends no longer try to collect SNMP supply and status
information for raw queues (STR #3809)
- The DBUS notifier did not report job state changes (STR #3805)
- The scheduler did not always report that the "normal" print-quality
value was supported (STR #3803)
- The gziptoany filter did not report the correct error if it was unable
to write the uncompressed document to the next filter or backend in
the chain (STR #3797)
- The Epson and Oki 9-pin drivers had a bad resolution option
(STR #3798)
- The scheduler did not always register the correct default ICC profile
on Mac OS X.
- The scheduler did not use the job owner when authorizing access for
the CUPS-Get-Document operation, preventing non-admins from accessing
their own jobs.
- CUPS did not work with some printers that incorrectly implemented the
HTTP/1.1 standard (STR #3778, STR #3791)
- The scheduler did not retry fax jobs properly.
- The scheduler now recognizes an empty cupsCommands PPD keyword as
meaning that CUPS commands are not supported for a printer (STR #3773)
- Fixed a crash bug in the scheduler when the application/octet-stream
MIME type was not defined (STR #3690)
- Polled printers were advertised more slowly than necessary (STR #3574)
- cupsResolveConflicts() did not handle resolving multiple UIConstraints
issues (STR #3705)
- The SetEnv and PassEnv directives had no effect (STR #3664)
- The libusb-based USB backend printed slowly to the LaserJet 1300 and
other printers (STR #3405)
- "lp" and "lpr" failed to print with Kerberos enabled (STR #3768)
- The cupsctl program now displays an error if you try to directly set
the Port or Listen directives (STR #3749)
- PPD files with "*JobPatchFile: bla" no longer fail to load in relaxed
conformance mode (STR #3747)
- The scheduler generated a bad notify-text string for printer state
change notifications (STR #3739)
- The scheduler incorrectly updated printers.conf when it really needed
to update classes.conf or remote.cache (STR #3726)
- Hardwired remote printers with options did not work (STR #3717)
- Accessing the CUPS web interface using a CNAME-based hostname would
sometimes fail due to redirection to the actual hostname (STR #3701)
- Subscription events had a misspelled attribute (STR #3693)
- "make check" failed if LC_MESSAGES was set (STR #3765)
- Fixed the configure script to always look for the pkg-config script
(STR #3761)
- The scheduler now only looks up interface hostnames if HostNameLookups
are enabled (STR #3737)
- Fixed a compilation problem on DragonFly BSD (STR #3738)
- The default PageLogFormat value had the username and job ID swapped
from CUPS 1.3.x (STR #3727)
- The scheduler could crash if a browsed printer times out while a job
is printing (STR #3754)
- The scheduler incorrectly mapped custom page sizes to standard sizes
(STR #3764)
- cupsfilter and pstops did not map IPP attributes to PPD options due to
a change in cupsMarkOptions (STR #3756)
- The scheduler did not always show the most recent status message from
the print filters (STR #3731)
- The PostScript filter did not apply the mirror and number-up options
properly, leading to offset and clipped output (STR #3732)
- The network backends always reported "low toner" or "out of toner"
states, even for inkjet printers (STR #3733)
CHANGES IN CUPS V1.4.6
- Fixed a "make check" issue on Solaris (STR #3729)
- Regression: The pstops filter did not support landscape printing of
PostScript files (STR #3722)
- The scheduler killed retried (fax) jobs after restarting them
(STR #3697)
- The cupsAdminSetServerSettings() function disabled sharing when
debug logging was enabled (STR #3712)
CHANGES IN CUPS V1.4.5
- Documentation fixes (STR #3542, STR #3650)
- Localization fixes (STR #3635, STR #3636, STR #3647, STR #3666)
- Security: Fixed a memory corruption bug reported in CVE-2010-2941
(STR #3648)
- The CUPS API incorrectly mapped the HTTP_UNAUTHORIZED status to the
IPP_NOT_AUTHORIZED status code, when IPP_NOT_AUTHENTICATED would be
the correct mapping (STR #3684)
- The scheduler would restart jobs while shutting down (STR #3679)
- Fixed a PPD loader bug that could cause a crash in cupsd (STR #3680)
- Improved the mapping of non-standard PPD and PWG names (STR #3671)
- The scheduler did not initialize Kerberos in all cases (STR #3662)
- cupsAdminSetServerSettings duplicated Listen and Order lines
(STR #3645)
- Added DeviceN colorspace support to the CUPS Raster format (STR #3419)
- ppdMarkDefaults() did not clear the marked field of the previous
choices (STR #3642)
- The serial backend would not allow a raw job to be canceled
(STR #3649)
- The socket backend could go into an infinite loop with certain
printers (STR #3622)
- Setting the PRINTER or LPDEST environment variables to "name/instance"
did not work (STR #3485)
- The scheduler did not handle the JobRetryLimit setting properly
(STR #3466)
- The lpstat command always showed a remote job ID of 0 for shared
printers (STR #3627)
- Increased the write timeout for the libusb-based USB backend to 5
minutes (STR #3595)
- The libusb-base USB backend did not check whether the printer has a
serial number (STR #3590)
- The lpadmin command did not support setting of custom option values
(STR #3631)
- The lpadmin command did not support setting of the location or
description of a class (STR #3613)
- The cupsaddsmb command did not give up after too many failed attempts
(STR #3615)
- The CUPS library no longer uses certain problematic ctype macros that
change based on the locale's character set.
- PJL value substitution of more than 9 values was broken (STR #3621)
- Custom options with missing string values caused ppdEmit* to segfault
(STR #3620)
- Fixed an issue with the Italian version of the web interface
(STR #3624)
- Fixed the Solaris SMF configuration file for cups-lpd (STR #3611)
- The scheduler did not set the notify-subscribed-event attribute when
delivering printer-added or printer-modified events (STR #3608)
- The mailto notifier could get into an infinite loop (STR #3609)
- Date/time information was not shown in banner pages.
- Relational operators were broken in #if/#elif/#else/#endif expressions
for the PPD compiler.
- Moving a job via the web interface failed without asking for
authentication (STR #3559)
- The scheduler now clears the printer-state-reasons when the driver is
changed (STR #3570)
- The web interface did not allow a user to change the driver
(STR #3537, STR #3601)
- The scheduler was not setting the PATH_INFO environment variable when
needed (STR #3600)
- The scheduler incorrectly set the CUPSD_AUTH_TYPE environment
variable instead of AUTH_TYPE (STR #3599)
- Fixed a buffer overrun in the PPD compiler (STR #3594)
- Fixed some additional IPP job template attribute mapping issues in the
scheduler.
CHANGES IN CUPS V1.4.4
- Documentation updates (STR #3453, STR #3527, STR #3528, STR #3529)
- Security: The fix for CVE-2009-3553 was incomplete (STR #3490)
- Security: The texttops filter did not check the results of allocations
(STR #3516)
- Security: The web admin interface could disclose the contents of
memory (STR #3577)
- Security: CUPS could overwrite files as root in directories owned or
writable by non-root users (STR #3510)
- The cups-config utility did not return the correct linker options on
AIX (STR #3587)
- Fixed some IPP conformance issues with the scheduler's
ippget-event-life, operations-supported, output-bin, and sides
attributes (STR #3554)
- The OpenSSL interfaces have been made thread-safe and the GNU TLS
interface is explicitly forbidden when threading is enabled
(STR #3461)
- Fixed an IPP conformance issue with the scheduler's Send-Document
implementation (STR #3514)
- Added additional validation checks for the 1284 device ID (STR #3534)
- Fixed a problem with the RPM spec file (STR #3544)
- The lpstat command did not limit the job list to the specified
printers (STR #3541)
- The cupsfilter command did not set the RIP_MAX_CACHE environment
variable (STR #3531)
- Fixed support for media-col and page size variants (STR #3394)
- The PostScript filter did not support all media selection options for
the first page (STR #3525)
- The scheduler did not always remove job control files (STR #3425)
- The scheduler could crash on restart if classes were defined
(STR #3524)
- The scheduler no longer looks up network interface hostnames by
default on Mac OS X (STR #3523)
- ippWriteIO did not write collection (member) attributes properly in
all cases (STR #3521)
- The "cupsctl --remote-any" and corresponding web interface check box
(allow printing from the Internet) did not work reliably (STR #3520)
- The lpq and lpr commands would sometimes choose different default
printers (STR #3503)
- cupsDo*Request did not flush error text, leading to multiple issues
(STR #3325, STR #3519)
- cupsDoAuthentication did not cancel password authentication after 3
failures (STR #3518)
- Fixed several LDAP browsing bugs (STR #3392)
- The Dymo driver did not support copies (STR #3457)
- The scheduler did not update the classes.conf file when deleting a
printer belonging to a class (STR #3505)
- The lppasswd command did not use localized password prompts
(STR #3492)
- The socket backend no longer waits for back-channel data on platforms
other than Mac OS X (STR #3495)
- The scheduler didn't send events when a printer started accepting or
rejecting jobs (STR #3480)
- The web interface now includes additional CSRF protection (STR #3498)
CHANGES IN CUPS V1.4.3
- SECURITY: The scheduler could try responding on a closed client
connection, leading to a crash (STR #3200)
- SECURITY: The lppasswd program allowed the localization files to be
overridden when running in setuid mode (STR #3482)
- Localization updates (STR #3352, STR #3409, STR #3422, STR #3452,
STR #3473, STR #3502)
- Documentation updates (STR #3451, STR #3504)
- The IPP backend now sets the printer-state-message to "Ready to
print." at the end of a successful job (STR #3460)
- The PPD compiler did not correctly add the manufacturer to the output
filename when using the "-m" option (STR #3469)
- The IPP backend did not handle authentication properly for the Get-
Printer-Attributes operation (STR 3458)
- Getting SNMP values larger than 127 bytes did not work.
- IPP conformance: Get-Jobs has a default value for requested-attributes
(STR #3383)
- cupsPrintFiles() did not report all errors (STR #3449)
- cupsAddDest() could read freed memory (STR #3448)
- The DBUS notifier did not build (STR #3447)
- The scheduler would crash when an active printer was deleted.
- The snmp backend did not work with some printers (STR #3413)
- The web interface did not show the conflicting values when setting
options (STR #3440)
- Setting options in the web interface did not always work (STR #3439)
- The scheduler did not use the Get-Job-Attributes policy for a printer
(STR #3431)
- The scheduler added two job-name attributes to each job object
(STR #3428)
- CSS files would not print (STR #3442)
- The scheduler did not clean out completed jobs when PreserveJobHistory
was turned off (STR #3425)
- The web interface did not show completed jobs for a printer
(STR #3436)
- Authenticated printing did not always work when printing directly to
a remote server (STR #3435)
- The USB backend did not work on Solaris (STR #3423)
- cupstestppd didn't catch problems with JobPatchFile definitions
(STR #3421)
- The socket backend could crash if a SNMP string had a negative length.
- Fixed some termination issues with the USB backend on Mac OS X.
- The side-channel APIs did not handle interrupts properly.
- The network backends incorrectly cleared the media-empty-warning
state.
- The web interface did not allow users to successfully add serial
printers (STR #3391)
- cupsTempFd() did not work in some situations (STR #3382)
- Some C API headers were missing C++ wrapper logic.
- The PPD compiler did not localize single-language PPD options properly
(STR #3386)
- Modifying a printer from the web interface sometimes caused the wrong
driver to be selected (STR #3418)
- The scheduler did not handle out-of-memory conditions properly when
loading a job (STR #3407)
- When adding printers from the web interface, the dynamic updates of
the device list made it hard to pick a device (STR #3406)
- Fixed a typo in the web interface admin page template (STR 3403)
- The web interface did not preserve the "printer is shared" state when
modifying a printer (STR #3390)
- The PPD compiler incorrectly inserted translations of empty strings
(STR #3411)
- The scheduler did not reset the SIGPIPE handler of child processes
(STR #3399)
- cupsGetNamedDest() incorrectly returned the default printer if the
named printer did not exist (STR #3397)
- Fixed a GNU TLS error handling bug (STR #3381)
CHANGES IN CUPS V1.4.2
- SECURITY: The CUPS web interface was vulnerable to several XSS and
HTTP header/body attacks via attribute injection (STR #3367,
STR #3401)
- Fixed localization errors (STR #3359, STR #3372, STR #3380, STR #3387)
- The documentation for classes.conf and printers.conf did not provide
the correct instructions for manual changes (STR #3351)
- The scheduler did not always rebuild printer cache files when the
driver was changed (STR #3356)
- The documentation makefile failed to install localizations when using
newer versions of Bash (STR #3360)
- The configure script did not use the --with-xinetd value for the
default LPD configuration path (STR #3347)
- The configure script incorrectly required glib for DBUS support
(STR #3346)
- The cupstestppd program incorrectly reported filters with bad
permisssions as missing (STR #3363)
- The cups.desktop file used the wrong locale names (STR #3358)
- cupsSideChannelRead() did not return an error for short reads.
- The installed PAM configuration file did not use the correct options
with the pam_unix2 module (STR #3313)
- The scheduler did not preserve default options that contained special
characters (STR #3340)
- The scheduler did not remove old pre-filters when updating a printer
driver (STR #3342)
- The HP/GL-2 filter did not check for early end-of-file (STR #3319)
- The USB backend did not compile on some platforms (STR #3332)
- cupsSideChannelSNMPWalk() could go into an infinite loop with broken
SNMP implementations.
CHANGES IN CUPS V1.4.1
- Documention fixes (STR #3296)
- SNMP supply levels and states were wrong for some printers.
- The IPP backend did not update the auth-info-required value.
- The libusb-based USB backend would hang at the end of the job
(STR #3315, STR #3318)
- DNS-SD registrations for raw queues had an empty "ty" key (STR #3299)
- The JPEG and BMP MIME type rules were broken (STR #3284)
- cupsGetNamedDest returned the default printer when the named
destination did not exist (STR #3285)
- The JobKillDelay was not triggered for canceled jobs (STR #3292)
- The PPD compiler could get in an infinite loop (STR #3293)
- The configure check for dns-sd.h was broken (STR #3297)
- The "Query Printer for Default Options" page did not go away if the
query job was held (STR #3302)
- Boolean options did not show up as selected in the web interface
(STR #3303)
- The scheduler did not cache or report driver information files
correctly, leading to a variety of issues (STR #3283, STR #3297,
STR #3305)
- cupsDoIORequest() did not abort on permanent errors (STR #3311)
- Modifying a class in the web interface did not work (STR #3312)
- BrowseLocalProtocols could be cleared when changing the sharing
setting (STR #3287)
- The scheduler could return an empty supported document format
(STR #3308)
- The PPD compiler generated invalid PPD files when the locale used
something other than "." for the decimal point (STR #3300)
- The IPP backend did not handle some non-comforming IPP printer
implementations (STR #3262)
- The scheduler leaked three file descriptors to each job filter
(STR #3263)
- The scheduler now uses a default CUPS-Get-Devices timeout of 15
seconds (STR #3307)
CHANGES IN CUPS V1.4.0
- Localization updates (STR #3223, STR #3246, STR #3248, STR #3250)
- Documentation updates (STR #3225, STR #3230, STR #3242, STR #3260)
- The --with-pdftops configure option did not accept a full path to the
filter (STR #3278)
- The banner filter did not position the back side image correctly
(STR #3277)
- The dnssd backend could crash (STR #3272)
- The 1284 device ID sometimes contained trailing garbage (STR #3266)
- The USB backend returned different URIs for some printers than in
CUPS 1.3 (STR #3259)
- The scheduler did not do local job-hold-until processing for remote
queues (STR #3258)
- The scheduler did not try all possible SSL certificates on Mac OS X.
- The scheduler did not always remove a file descriptor when using the
kqueue interface (STR #3256)
- The scheduler did not protect against bad job control files in all
cases (STR #3253)
- The scheduler did not encode "+" in model names (STR #3254)
- The web interface didn't show the default options (STR #3244)
- The IPP and LPD backends needed print data before they would do an
SNMP query.
- Fixed a GNU TLS compatibility issue (STR #3231)
- Fixed a HTML error in the add and modify printer web interface
templates (STR #3229)
- The scheduler did not minimize the number of printer state events that
were generated by filter STATE: messages, which could lead to poor
performance.
- The USB backend on Mac OS X did not cleanly cancel a job.
- The network backends now set the connecting-to-device printer-state-
reasons value when looking up the address and copying the print data
for consistency.
- The scheduler now supports the com.apple.print.recoverable-warning
reason on all platforms.
CHANGES IN CUPS V1.4rc1
- The PPD compiler documentation was missing information on localization
(STR #3212)
- The IPP backend now reconnects after every request when talking to
printers that claim IPP support but only use HTTP/1.0.
- The PPD compiler crashed when both "Resolution" and "Group foo Option
Resolution" were specified in the .drv file.
- The PPD compiler's #if/#elif/#else/#endif did not work for undefined
variables (STR #3210)
- Static libraries could not be installed by a non-root user on systems
needing a ranlib program (STR #3209)
- The scheduler incorrectly always tried to copy Kerberos credentials
for print jobs.
- Updated the Spanish localization (STR #3204)
- The scheduler crashed when getting the default paper size from
libpaper (STR #3205, STR #3206)
- The PPD compiler now defines six variables: CUPS_VERSION,
CUPS_VERSION_MAJOR, CUPS_VERSION_MINOR, CUPS_VERSION_PATCH,
PLATFORM_NAME, and PLATFORM_ARCH (STR #3203)
- Fixed a whitespace skipping bug in cupsRasterInterpretPPD.
- The scheduler did not return HTTP 403 (Forbidden) for authenticated
users that were not authorized to do IPP operations (STR #3193)
- The scheduler did not report more than 8 Product strings from a PPD
file. Some PPD files have as many as 24.
- ppdOpen*() could crash if a keyword had no value string (something
that cupstestppd looks for...)
- cupsLangDefault() did not return the correct language on Mac OS X.
- The Mac OS X USB backend did not handle aborted or stalled pipe
conditions properly, which prevented drivers from ejecting partial
pages when a job was canceled or held.
CHANGES IN CUPS V1.4b3
- Documentation fixes (STR #3044, STR #3057, STR #3153, STR #3158,
STR #3173)
- Added complete localizations for German, Japanese, Polish, and
Russian and partial localizations for Chinese, Danish, Finnish,
French, Italian, Korean, Norwegian, Portuguese, and Swedish
(STR #3096, STR #3098, STR #3109, STR #3111, STR #3141)
- Updated the configure check for -fstack-protector (STR #3198)
- The network backends now correctly convert SNMP supply descriptions to
UTF-8 encoding as needed.
- The scheduler could crash when deleting an attribute (STR #3197)
- The cups-driverd program did not detect symlink loops (STR #3185)
- The EPSON 24-pin series driver should now feed the correct amount
(STR #2624)
- The scheduler now automatically logs the last N debug messages for
failed print jobs.
- You can now modify a raw print queue (STR #3133)
- Fixed a number of ppdi issues and added a unit test to validate that
ppdc + ppdi can generate and import the same data (STR #3152)
- Moving jobs in the web interface now shows an error if you only have
one printer or class added (STR #3094)
- Since classes have never truly supported the printer-error-policy
stuff added in CUPS 1.2, update the code to reflect the current
reality and support only the retry-current-job policy for now
(STR #3171)
- Revised the password callback support (STR #2953)
- ppdEmit*() did not choose between PageSize and PageRegion properly.
- Make some fairly substantial changes to the Kerberos support code so
that CUPS can work in multi-realm environments and does not require
delegatable credentials. Shared printing still requires delegation,
however "delegation by policy" can be enabled in the KDC to make this
all work.
- "AccessLogLevel actions" did not hide client-error-not-found errors.
- AP_FIRST_InputSlot did not work with number-up.
- cupsBackChannelRead() and cupsBackChannelWrite() could fail due to a
lack of kernel buffers.
- The IPP and LPD backends did not respond to side-channel requests
while copying print data to a temporary file.
- cupsWriteRequestData() flushed the output buffer unnecessarily,
causing reduced performance in some situations.
- If a CGI process died before sending its MIME headers, the request
would hang on the client.
- The printer/class/job search feature on the web interface did not
work (STR #3132)
- The scheduler did not write the printers out for classes.
- CUPS-Get-PPDs did not work properly when filtering by language,
product, or psversion (STR #3136)
- The scheduler now kills job filters when it takes more than 30 seconds
(configurable) to cancel or hold the job.
- The cupstestppd program did not validate the capitalization of
filenames in the PPD file.
- The cupstestppd program did not validate the PageSize and PageRegion
values.
- The cups-deviced helper program could miss reporting some backend
devices (STR #3108)
- The cupsSideChannelSNMP* functions did not work.
- The scheduler could consume 100% CPU when jobs were canceled.
- Clicking on "Select Another Make/Manufacturer" in the web interface
incorrectly added the printer (STR #3095)
- The scheduler no longer uses programs with insecure file
permissions.
- httpAssembleURI*() did not escape backslashes in hostnames.
- The dnssd backend did not unquote "full names" before creating the
device URI.
- The scheduler now supports JobRetryInterval values less than 10
seconds.
- Updated the Spanish localization (STR #3090)
- The scheduler did not redo Bonjour/DNS-SD registrations when updating
them failed.
- The "authenticated" policy incorrectly required authentication for
status operations.
- ppdOpen*() incorrectly loaded PPDs with multiple JobPatchFile
keywords.
- The network backends no longer report the SNMP "offline" or
maintenance status bits since they are inconsistently implemented and
often unreliable.
- The scheduler no longer logs child processes killed via SIGKILL as
"crashed".
- The printer link shown on the "job moved" template was bad (STR #3085)
- Updated the HTML templates to use the final HTML 4 DOCTYPE (STR #3086)
- The scheduler did not track the "paused" reason properly if a
printer had other reasons associated with it.
- cupsSendRequest() did not clear old local certificate auth data.
- The PPD compiler did not search for localization files properly
(STR #3084)
- cupsGetNamedDest() did not use the fallback default like
cupsGetDests*() (STR #3082)
- The scheduler now provides a LogTimeFormat directive to enable
microseconds in the date and time that are logged.
- The scheduler now provides a MultipleOperationTimeout directive to
control the timeout for multi-file print jobs.
- The configure script incorrectly allowed Avahi to be used for DNS-SD
printer discovery (STR #3065)
- The web interface and scheduler did not support URIs up to 1024 bytes
in length (STR #3072)
- Fixed pdftops issues with page sizes (STR #3063)
- Fixed pdftops issues with Ghostscript (STR #3062)
- The scheduler incorrectly registered default profiles for PostScript
printers with no specified colorspace.
- The scheduler incorrectly created an empty org.cups.printers.plist
file on Mac OS X.
- cupsGetPPD3() did not look for local PPDs in the right directory.
- SNMP lookups via side-channel did not work for NULL-VALUE and
and OCTET-STRING OIDs containing nul characters.
- The libusb-based USB backend did not work.
- The scheduler did not set the printer-commands attribute correctly
for some PPDs.
- The ppdi utility did not work.
- The web interface no longer uses multi-part output with old or broken
web browsers (STR #3049)
- CUPS now conforms to the draft IPP/2.0 and IPP/2.1 specification.
- Added a new cupsGetConflicts() API to get a list of conflicting
options.
- The PPD compiler didn't localize options or choices that did not
have associated translation text (STR #3045)
- Updated the Spanish localization (STR #3043)
- Fixed build problems (STR #3040, STR #3047)
- cupsResolveConflicts() did not resolve using the default option
choice in some cases due to the mirror UIConstraints that are
present in most PPD files.
- The scheduler did not honor MIME type priorities.
- The commandtops filter incorrectly used the JCLBegin code to end
its jobs.
- The default BrowseLocalProtocols value was not set properly.
- Since the commandtops filter does not actually support ReportLevels
all on its own, don't list that printer command by default for PS
printers.
- The scheduler did not give filters a chance to log errors or update
printer attributes when a job was canceled.
- The scheduler did not clear the "connecting-to-device" reason keyword
when a job finished.
CHANGES IN CUPS V1.4b2
- Documentation updates (STR #2983, STR #2998, STR #3021)
- The cupstestppd utility now validates the FileVersion and
FormatVersion values in PPD files.
- The default cupsd.conf file did not reflect the
--with-local-protocols value set at compile-time (STR #3037)
- The cupsGetPPD* APIs now create symlinks to local PPD files
rather than copying them whenever possible.
- Various performance optimizations in the string pool, dests, and
options implementations.
- The cupsGetDests* APIs now return the marker and printer-commands
attributes.
- Side-channel SNMP lookups would not work when cupsSNMPSupplies
was set to False in the PPD file.
- Localized the device descriptions for the SCSI, serial,
and network backends (STR #3014)
- Added a Spanish localization (STR #3015)
- Added support for marker-low-levels and marker-high-levels
attributes.
- The scheduler could hang writing a long log line.
- The cupsGetDevices() function now has an "include_schemes"
parameter.
- The lpinfo command now supports --include-schemes and
--exclude-schemes options.
- The CUPS-Get-PPDs operation now supports the include-schemes
and exclude-schemes attributes.
- The CUPS-Get-Devices operation now supports the include-schemes
attribute.
- The print filters now support a replacement for the fitplot
option called "fit-to-page".
- The LPD backend no longer tries to collect page accounting
information since the LPD protocol does not allow us to
prevent race conditions.
- The scheduler did not save the last marker-change-time value.
- Fixed a problem with printing to some IPP printers, including
CUPS 1.1.x.
- Fixed a redirection problem with the printer web page (STR #3012)
- Fixed a PPD compiler problem with the loading of message
catalogs (STR #2990)
- Fixed a PPD compiler problem with the loading of .strings files
(STR #2989)
- The cupsfilter utility did not set the CONTENT_TYPE environment
variable when running filters.
- The scheduler now waits to allow system sleep until the jobs
have all stopped.
- The IPP, LPD, and socket backends used different "connecting"
progress messages.
CHANGES IN CUPS V1.4b1
- Documentation updates (STR #2567)
- The PPD compiler now allows local message catalogs to
override the standard CUPS translations (STR #2642)
- The ppdmerge command did not merge custom option strings
(STR #2863)
- The scheduler now supports the Hold-New-Jobs and
Release-Held-New-Jobs operations; these are exposed via the
cupsdisable and cupsenable commands (STR #2332)
- The lpstat command is now much faster when displaying the
status of a single printer (STR #2843)
- The scheduler now caches information from PPD files to provide
significantly faster startup time with large numbers of PPDs
(STR #1293)
- CUPS-Get-Driver now provides much better driver matching based
on the IEEE-1284 device ID and make/model strings (STR #2707)
- Now support the cupsSNMPSupplies keyword to control whether
the network backends query the SNMP Printer MIB for supply
levels.
- Now support and use a new banner file format for better text
support and easier customization (STR #2490)
- The scheduler now sets the PRINTER_INFO and PRINTER_LOCATION
environment variables from the corresponding IPP attributes.
- The ippRead*() and ippWrite*() functions no longer use a
stack-based buffer (STR #2388)
- The CUPS-Add-Modify-Printer operation now allows you to set
the printer-state-reasons attribute.
- The "set printer options" page now supports auto-configuration
of printer options (STR #1440)
- The web interface now provides an advanced server settings
form.
- The web interface's "modify printer" pages now make it
easier to change just one setting (STR #1919)
- The scheduler now supports a plist PrintcapFormat.
- The scheduler now supports multiple addresses in Allow and
Deny lines, just like Apache (STR #2947)
- Added CUPS_JOBTYPE environment variable for job filters so
they know whether they are printing a banner or document
file (STR #2799)
- Added support for printer filtering by the cupsfilter
command (STR #2562)
- Added a SSLOptions directive to allow Windows clients to
talk to CUPS in FIPS mode (STR #2827)
- Renamed the accept and reject commands to cupsaccept and
cupsreject; the old names are still available (STR #2936)
- The locale/translate utility needed an update to work with
Google (STR #2882)
- The lpstat command now supports a -H option to display the
default server (STR #2833)
- The scheduler now supports a FatalErrors directive to control
which errors should cause the scheduler to exit (STR #2536)
- The scheduler now uses the php-cgi program if it is available
(STR #2923)
- The scheduler now supports a DefaultPaperSize directive
(STR #2848)
- The scheduler now passes the job-originating-host-name
value to filters in the options argument (STR #2558)
- CUPS now supports job tickets in PDF files (STR #2903)
- Added a DBUS notifier (STR #2529)
- The LPD mini-daemon now passes the document name when queuing
print jobs (STR #2482)
- The IPP backend did not relay com.apple.print.recoverable-message
values.
- The scheduler now supports a job-media-progress attribute to
track the progress of individual pages.
- The sample HP driver now supports A5 (STR #2798)
- The CUPS web interface menu item now uses the xdg-open
command, when available (STR #2724)
- The cups-lpd program now supports the -h option (STR #2794)
- The scheduler now sets the PAM_TTY parameter and the
PAM_ESTABLISH_CRED credential flag (STR #2745)
- The scheduler now logs unsuccessful requests to the error_log
file as errors (STR #2616)
- Added support for a "retry-current-job" error policy that
retries the current job immediately when the backend encounters
an error (STR #2555)
- The scheduler now returns a "forbidden" error when a user
correctly authenticates but does not have permission to
continue further (STR #2101)
- The scheduler now loads both the server and CA certificates
(if present) from the ServerCertificate file (STR #2146)
- New RSS subscriptions now create their feed files immediately
(STR #2853)
- Added support for a device-location attribute which provides
the physical location of a printer device.
- Added a cupsBackendReport() API which handles quoting of the
device data by a backend.
- Added support for custom options in the web interface
(STR #1729)
- Added support for Mozilla LDAP, reconnection to LDAP servers,
and improved LDAP performance (STR #1962)
- Added Solaris SMF support (STR #1477)
- Added optional support for using TCP wrappers to limit access
to CUPS (STR #263)
- Added ppdPageSizeLimits API.
- Added support for new cupsMediaQualifier2, cupsMediaQualifier3,
cupsMinSize, and cupsMaxSize attributes.
- Added cupsResolveConflicts and ppdInstallableConflict APIs.
- Added support for new cupsUIConstraints and cupsUIResolver
attributes for better option conflict detection and
resolution.
- Increased the maximum size of 1284 device ID strings to
256 bytes (STR #2877)
- Added an AccessLogLevel directive to cupsd.conf to control
what is logged to the access_log file.
- The default LogLevel is now "warn" instead of "info" to reduce
the amount of logging that is done to disk by default.
- The PPD compiler did not include OID query keywords in PPD
files (STR #2871)
- The cups-driverd helper program now directly supports driver
information files.
- The USB backend now uses libusb when available (STR #1575)
- Added ppdLocalizeAttr function to get the localized version
of an attribute.
- MIME types now support a priority() attribute (STR #2719)
- The standard MIME types are now installed in
DataDir/mime (STR #2719)
- The lpoptions command now describes custom options and
the necessary parameters (STR #2660)
- The ppdmerge program did not support Simplified Chinese
or Traditional Chinese language version strings (STR #2851)
- The PPD compiler now supports localizable attributes
(STR #2738)
- The ppdpo utility now includes cupsIPPReasons values in
the message catalogs it generates (STR #2754)
- The PPD compiler now supports conditional directives
(STR #2636)
- The ppdc utility now supports a "-t" option to test PPD
files (STR #2739)
- The ppdc utility now supports a "-m" option to use the
ModelName value as the output filename.
- The ppdc utility now supports a FileName directive to
set an alternate output filename (STR #2740)
- The side-channel API now supports SNMP queries for the
standard network backends.
- Added a PageLogFormat directive to the cupsd.conf file to
control the format of lines in the page_log file.
- Filters can now send PPD: messages to stderr to set PPD
keywords like DefaultPageSize while a job is printing.
- Added a mdns backend for discovery and printing to printers
that advertise themselves via DNS-SD (Bonjour)
- The ipp, lpd, and socket backends now support DNS-SD service
name resolution.
- The scheduler now uses a single shared file descriptor for
all DNS-SD registrations (STR #2674)
- The ipp, lpd, and socket backends now support SNMP-based
page accounting and supply level monitoring (STR #1655)
- Added support for cupsPJLDisplay attribute to control what
PJL commands are used to display the job information.
- Driver information files can now be installed in
/Library/Printers/PPDs.drv on Mac OS X.
- The CUPS image library now supports reading images larger
than 2GB.
- The scheduler now delays writing config and state files to
reduce disk activity (STR #2684)
- The CUPS-Get-Devices operation now supports the
exclude-schemes and timeout attributes to control which
backends are polled and for how long.
- The cups-deviced helper application now runs backends in
parallel to get the list of devices faster.
- Added --enable-pap configure option.
- The default cupsd.conf file now includes an "authenticated"
policy which requires authentication for remote print jobs.
- Added support for Czech and Hungarian in PPD files
(STR #2735, STR #2736)
- The PPD compiler tools now support Mac OS X .strings files
for localization (STR #2737)
- ppdOpen*() now default the colorspace member to PPD_CS_N
when no DefaultColorSpace attribute is present in the PPD
file.
- The build system has been updated to support separate
installation of data, program, header, and library files.
- All support libraries are now built as shared libraries
by default.
- The scheduler now manages ICC color profiles on Mac OS X.
- The network backends (ipp, lpd, socket) now support
SNMP-based supply and page count monitoring (STR #1655)
- The lppasswd program is no longer installed setuid to
root to make the default installation more secure.
- Added a new ppdLocalizeMarkerName() function to get
the localized version of a marker-names value.
- The scheduler now provides the printer-dns-sd-name
attribute for printers shared via DNS-SD/Bonjour.
- The pdftops filter now executes the Xpdf or poppler
pdftops utility to convert PDF files (STR #1471)
- Bonjour printer registrations now advertise as local or
global based on the current access policies for the
printer.
- cupsGetDests*() and cupsSetDests*() now track the last
used printer preference on Mac OS X.
- Added a new streaming request API (STR #2261)
- Added a new cupsGetNamedDest() function to the CUPS
library for faster printing with lp and lpr (STR #2638)
- The scheduler now sets the PAM RHOST value on systems
that support it (STR #2637)
- The scheduler now sandboxes child processes when
possible.
- The Cancel-Job operation now supports a purge-job
attriibute to purge a specified job.
- ppdEmit* and ppdCollect* now use the NonUIOrderDependency
attributes for custom option selections.
- The web interface now enables/disables the printer
sharing (formerly publishing) controls based on the
server-is-sharing-printers state (STR #2233)
- The scheduler now tracks printer sharing via the
server-is-sharing-printers attribute, and manages LPD
and SMB sharing as well (STR #2233)
- The web interface now allows you to go back to the make/
manufacturer page if there is no matching printer driver
on the model page (STR #2436)
- The printer list now shows the default media, banner, and
duplex options as well as the color and duplex capabilities
of printers (STR #1175)
- The web interface look-n-feel has been updated (STR #2492)
- The scheduler now supports a CUPS-Get-Document operation
that returns the specified print job document (STR #118)
- The cupsfilter utility now supports a "-J jobid" option
to filter the document from the specified job.
- The scheduler (cupsd) now supports a new option (-t) to
do a syntax check of the cupsd.conf file (STR #2003)
- Added new cupsGetPPD3() API to allow applications to
cache PPDs safely (STR #1473)
- Added generic PostScript and PCL printer driver PPDs.
-312
Ver Arquivo
@@ -1,312 +0,0 @@
CHANGES-1.5.txt
---------------
CHANGES IN CUPS V1.5.4
- Documentation updates (STR #4112, STR #4130, STR #4134)
- Fixes for libusb-based USB backend (STR #4128)
- The lpq command did not show the owner or title of jobs unless passed
a username on the command-line (STR #4135)
- Localized empty strings contained the message catalog metadata
(STR #4119)
- Fixed a crash in the libusb-based USB backend (STR #4099)
- The cups-lpd mini-daemon no longer handled jobs with multiple copies
(STR #4118)
- Multiple libusb backend fixes (STR #4098, STR #4100)
- The IPP backend no longer tries to get the job status for printers
that do not implement the required operation (STR #4083)
- Sending a document in an unsupported format to an IPP printer now
automatically cancels the job (STR #4093)
- Fix some error reporting issues when printing from /dev/null and
other unusual situations (STR #4015)
- The scheduler now sets the CUPS_MAX_MESSAGE environment variable for
filters (STR #4074)
- Fixed a build issue when using older versions of autoconf (STR #4084)
- The IPP backend now treats the client-error-not-possible status code
as a job history issue, allowing IPP printing to Windows to work
(STR #4047)
- The IPP backend incorrectly included the document-format and
compression attributes in Create-Job requests (STR #4086)
- The libusb-based USB backend did not work on non-Linux platforms
(STR #4088)
CHANGES IN CUPS V1.5.3
- httpReconnect() did not reset the read/write buffers (STR #4065)
- Compiling without threading support failed (STR #4060)
- Fixed compile problem with old versions of OpenSSL (STR #4036)
- The network backends did not check SNMP supply levels regularly
(STR #4040)
- The online help always included the "help on help" text (STR #4042)
- Fixed a SSL handshake issue on OS X (STR #4045)
- The scheduler could crash if a PPD file contained an invalid paper
size (STR #4049)
- The CUPS polling daemon did not reinitialize its connection to the
remote server on errors in all cases (STR #4031)
- PostScript auto-configuration was slow and unreliable with some
printers (STR #4028)
- Missing localizations caused empty output (STR #4033)
- The cups-driverd program could temporarily "forget" a PPD file if it
was updated in place.
- The dnssd backend now prefers IPPS over IPP.
- The USB backend now uses and requires LIBUSB 1.0 or later (STR #3477)
- The LIBUSB-based USB backend now supports the back-channel (STR #2890)
- Changed how timeouts are implemented in the LPD backend (STR #4013)
- Added more supported color names for SNMP supplies (STR #3981)
- The default InputSlot setting was never used (STR #3957)
- POSIX ACLs are now set properly on certificate files (STR #3970)
- Supplies with commas in their names were not reported correctly
(STR #4020)
- The cupsGetPPD3() function created a temporary file when one was not
needed (STR #4018)
- The scheduler now ensures that job notifications contain a value for
the notify-printer-uri attribute (STR #4014)
- The lp and lpr commands did not cancel jobs queued from stdin on an
error (STR #4015)
- Fixed the IPP backend's handling of HTTP/1.0 compatibility (STR #3988)
- The IPP backend did not always setup username/password authentication
for printers (STR #3985)
- The IPP backend no longer re-queues print jobs that are too large for
the printer/server (STR #3977)
- The RPM spec file did not work (STR #4021, STR #4057)
- Encryption did not work when the server name ended with "."
(STR #4011)
- The multi-purpose tray is now mapped to the IPP "by-pass-tray"
(STR #4009)
- The correct media size was not always passed to IPP printers
(STR #4001)
- Finishing options were not passed to IPP printers (STR #3995)
- Fixed iCloud-based Back to My Mac printing (STR #3996)
CHANGES IN CUPS V1.5.2
- Reposted what should have been CUPS 1.5.1.
CHANGES IN CUPS V1.5.1
- Documentation updates (STR #3885, STR #3886, STR #3946, STR #3969)
- Localization updates (STR #3840, STR #3989, STR #3997)
- Build fixes (STR #3956, STR #3999)
- The SNMP backend did not validate the device URIs reported by printers
(STR #4004)
- cupsBackendReport() did not handle newlines in 1284 Device IDs
(STR #4005)
- USB backend fixes for libusb (STR #3965, STR #3978)
- The DBUS notifier did not validate string parameters (STR #3984)
- Group quota ACLs did not work with Kerberos (STR #3972)
- The IPP backend did not retry when a printer responded with
client-error-not-possible (STR #3963)
- PostScript PPDs with filters used the wrong command filter (STR #3973)
- The scheduler incorrectly used free() on a POSIX ACL value, which
could cause a crash (STR #3970)
- PPD files using the MacStandard encoding did not work.
- The web interface did not work on some platforms (STR #3902)
- The lpstat command would crash when then "-u" option was used by a
non-administrator (STR #3953)
- Japanese supply level reporting did not always work.
- The DBUS notifier could crash (STR #3947)
- Relaxed some of the page size checks in cupstestppd.
- The ipptool program now reports attributes that are repeated within
the same attribute group.
- Updated the PWG raster support to match the current draft
specification.
- Fixed some IPP conformance issues in the scheduler.
- Added ipptool support for repeating requests.
- Added IPP/2.2 conformance tests and greatly improved the IPP/1.1,
IPP/2.0, and IPP/2.1 conformance testing.
- IPP messages containing mixed integer/rangeOfInteger values did not
work (STR #3942)
- The ipptool program now provides additional diagnostics for badly-
formatted responses (STR #3857)
- When possible, the IPP backend now stops sending job data early on a
cancel.
- cupsSendRequest and cupsWriteRequestData did not properly read all
HTTP headers, preventing authentication and encryption upgrades from
working in all cases.
- The client.conf Server directive is no longer supported on Mac OS X
10.7 and later.
- The IPP backend sent the wrong margins in media-col.
- The scheduler did not save or restore large Kerberos credentials for
jobs.
- The dnssd backend did not properly browse for secure IPP printers.
- httpAssembleURI* did not properly escape all special characters in the
username/password field.
- The scheduler now logs config file errors to stderr (STR #3936)
- The configure script incorrectly used bundle-based localizations on
Linux (STR #3938)
- The cups-driverd helper program did not cache .drv files properly,
sometimes leading to a crash (STR #3921)
- CUPS did not build on stock Mac OS X installations.
- Encryption was broken with OpenSSL.
- ipptool's XML output used date/time values with timezone offsets,
which are not supported by Mac OS X's NSDate class.
- Several programs did not support the cupsFilter2 keyword in PPD files.
- The IPP backend incorrectly reported spool-area-full states.
- cupsMarkOptions() did not protect against a bad PPD that was missing
one or more standard Duplex options.
- The PostScript filter did not mirror N-up output properly.
- The ipptool program did not validate UTF-8 strings in XML output.
- Fixed supply level reporting for some printers.
- The scheduler no longer automatically logs debug messages for jobs
that were held or canceled.
- The cupsSendRequest function did not flush remaining response data
from a previous request, leading to apparent chunking issues.
- The scheduler did not report the correct version in the Server: header
(STR #3903)
- The scheduler did not support 1284 device IDs reported by driver
interface programs longer than 127 characters (STR #3871)
- The image filters did not support loading images larger than the
RIPCache setting (STR #3901)
- "PAGE: total NNN" messages did not get logged properly (STR #3887)
- Updated the PWG Raster support to conform to the current draft of the
PWG Raster Format specification.
- The PWG Raster filter did not always write the correct number of
padding lines on the bottom of the page (STR #3904)
- When reporting a denial-of-service attack from the domain socket, the
address reported does not always contain the correct path (STR #3888)
- Badly formed GIF files could cause the image filters to crash
(STR #3914)
- Jobs canceled at the printer were retried by the IPP backend.
- "cupsfilter -u" deleted the input file instead of the PPD file.
- The scheduler did not compute the cost of PPD filters defined using
the cupsFilter2 keyword properly.
- The scheduler did not correctly support the maxsize() attribute for
PPD filters.
CHANGES IN CUPS V1.5.0
- Documentation updates.
- Localization update (STR #3865)
- Needed to limit TLS to v1.0 on some versions of Mac OS X.
- The snmp backend did not work with some printers.
CHANGES IN CUPS V1.5rc1
- Compile fixes (STR #3849, STR #3850)
- The scheduler didn't check for empty values for several configuration
directives (STR #3861)
- ipptool didn't generate valid XML when a test was skipped.
- Added additional error checking to the 1284 device ID code (STR #3858)
- Fixed some compatibility issues migrating from the old usblp backend
to the libusb backend (STR #3860)
- Fixed the wake-from-sleep printing behavior on Mac OS X.
- The scheduler incorrectly allowed jobs to be held from a terminating
state.
- The cups-driverd program could crash when a PPD was renamed.
- The dnssd backend took too long to discover printers on large or busy
networks with the new default timeout used by lpinfo and the web
interface. This resulted in "lost" printers.
CHANGES IN CUPS V1.5b2
- Documentation updates.
- Localization updates (STR #3845)
- Compiler warning cleanup.
- Fixed PIE support for Linux (STR #3846)
- Made httpSetTimeout API public and use it in the IPP backend to avoid
timeout errors.
- The scheduler incorrectly set the "authenticated" printer-type bit for
remote queues using authentication.
CHANGES IN CUPS V1.5b1
- The CUPS library now supports per-connection HTTP timeouts and
callbacks.
- The CUPS library now supports (limited) SSL/TLS X.509 certificate
validation and revocation (STR #1616)
- Updated the PostScript filter to support IncludeFeature in more
circumstances (STR #3417)
- The schedule did not correctly parse some IPv6 addresses and masks in
the cupsd.conf file (STR #3533)
- Fixed a case-insensitive string comparison issue for locales that do
not treat "I" and "i" as equivalent (STR #3800)
- The scheduler reported an incorrect job-printer-uri value when sharing
was not enabled (STR #3639)
- The scheduler now allows the ServerAlias directive to contain multiple
hostnames separated by spaces or commas (STR #3813)
- The scheduler now sets the process group for child processes and
manages the group (STR #2829)
- Fixed some minor issues discovered by a Coverity scan (STR #3838)
- The scheduler now more carefully creates and removes configuration,
cache, and state files (STR #3715)
- The lpadmin command now allows default option values to be deleted
(STR #2959)
- The lpadmin command now allows the cupsIPPSupplies and
cupsSNMPSupplies keywords to be set in a PPD file (STR #3825)
- Moving a held job no longer releases it (STR #3839)
- Restored support for GNU TLS and OpenSSL with threading enabled
(STR #3605)
- Fixed a confusing error message from cups-polld (STR #3806)
- Increased the default RIPCache value to 128MB (STR #3535)
- MIME errors are now routed to the error_log file (STR #2410)
- Updated PDF filter to support new Ghostscript ps2write device
(STR #3766)
- Updated PDF filter to support new Poppler option to preserve page
sizes in PDF files when the user has not selected a particular media
size (STR #3689)
- Added new PWG Raster filter for IPP Everywhere printer support.
- Added job-uuid, printer-uuid, and subscription-uuid attributes.
- Added support for the cupsSingleFile PPD keyword.
- Dropped support for the printer-state-history attribute (STR #3654)
- Added support for a new cupsIPPSupplies keyword in PPD files to allow
drivers to disable IPP supply level reporting.
- Added support for a new cupsFilter2 keyword in PPD files to allow for
the propagation of the actual MIME media type produced by a filter.
- The scheduler did not always get the correct Kerberos username when
authenticating (STR #3670)
- Added new cupsRasterOpenIO function and CUPS_RASTER_WRITE_PWG to the
CUPS imaging library to support printing to IPP Everywhere raster
printers.
- The scheduler now provides default values for the pages-per-minute and
pages-per-minute-color attributes for PPD files that lack a
Throughput keyword.
- Email notifications did not work on Mac OS X.
- The cupstestppd program now shows an error for files missing a
CloseGroup keyword (STR #3668)
- Name resolution errors no longer cause queues to stop (STR #3719,
STR #3753)
- Added a new cups-exec helper program that applies security profiles
to filters, port monitors, backends, CGI programs, and mini-daemons.
- The web interface can now be disabled using the WebInterface directive
in cupsd.conf (STR #2625)
- The scheduler now provides privacy controls for jobs and subscriptions
(STR #2969)
- Added new cupsArrayNew3 API which offers memory management of array
elements.
- Added several new color spaces to the CUPS raster format (STR #3419)
- The Validate-Job operation now uses the same policy as Print-Job by
default.
- CUPS now uses iconv to implement all of its character encoding
support (STR #3097)
- The scheduler now implements the Cancel-Jobs, Cancel-My-Jobs, and
Close-Job operations along with the job-ids operation attribute from
PWG 5100.11.
- The main CUPS header (<cups/cups.h>) no longer includes the PPD header
(<cups/ppd.h>).
- The scheduler and CUPS API now support the print-quality job template
attribute.
- The scheduler no longer supports the old Mac OS X Server quota
plugin.
- The scheduler now allows writing to /Users/Shared from print filters
on Mac OS X.
- CUPS no longer supports the old ~/.cupsrc or ~/.lpoptions files from
CUPS 1.1.x. The ~/.cups/client.conf and ~/.cups/lpoptions files that
were introduced in CUPS 1.2 must now be used.
- The ipptest tool is now a first-class user program and has several
improvements along with new documentation (STR #3484)
- The cupstestppd tool now warns about non-unique filenames and
provides a way to ignore all filename warnings.
- Dropped support for the recoverable: and recovered: message prefixes.
- The scheduler now requires that filters and backends have group write
permissions disabled.
- The PPD compiler now checks for overlapping filenames when writing
PPD files.
- The HP-GL/2 filter is no longer included with CUPS (STR #3322)
- The SCSI backend is no longer included with CUPS (STR #3500)
-207
Ver Arquivo
@@ -1,207 +0,0 @@
CHANGES-1.6.txt
---------------
CHANGES IN CUPS V1.6.3
- The configure script now prefers Clang over GCC.
- Fixed a compile problem on AIX (STR #4307)
- Fixed several ipptool test files that used old STATUS names.
- Kerberos credentials could get truncated when printing to a shared
printer.
- Printing using "ipps" URIs was not encrypted.
- Insecure ICC profiles prevented installation of user profiles for a
printer on OS X.
- Added more USB quirks for the libusb-based backend (STR #4311,
<rdar://problem/13736470>)
- The Russian web interface templates were broken (STR #4310)
- The scheduler no longer tries to do Kerberos authentication over the
loopback interface.
- The IPP backend could fail to pause a job for authentication
(STR #4298)
- Fixed a regression on the handling of auth keys on OS X if the
cups-files.conf was not present or did not contain a SystemAuthKey
value.
- The scheduler incorrectly did a reverse lookup of the server address
when HostNameLookups was turned off (STR #4302)
- The scheduler incorrectly computed the final content type value when
null filters were present.
CHANGES IN CUPS V1.6.2
- Documentation fixes (STR #4229, STR #4239, STR #4234, STR #4248,
STR #4259)
- Security: All file, directory, user, and group settings are now stored
in a separate cups-files.conf configuration file that cannot be set
through the CUPS web interface or APIs (STR #4223)
- Added a Czech localization (STR #4201)
- Added a French localization (STR #4247)
- Added a Russian localization (STR #4228, STR #4285)
- Updated the Catalan localization (STR #4202)
- Local certificate authentication did not guard against an empty
certification file (STR #4293)
- The scheduler did not reject device URIs with spaces.
- Added USB quirk rule for Epson Stylus Photo 750 (STR #4286)
- The IPP backend could crash if the printer disconnects early
(STR #4284)
- cupsGetPPD did not work with statically-configured CUPS shared
queues (STR #4178)
- The scheduler did not support long MIME media types (STR #4270)
- The cupsfilter command did not set the CHARSET environment variable
for the text filters (STR #4273)
- The lp command did not show errors for unknown "--foo" (STR #4261)
- Bad IPP responses could crash ipptool (STR #4262)
- Updated USB quirk rules for Canon and Xerox printers (STR #4217,
STR #4263)
- Added USB blacklisting for printers that require a custom backend
(STR #4218)
- The PPD compiler did not correctly JCL options (STR #4115, STR #4203)
- The ipptool program now supports DEFINE-MATCH and DEFINE-NO-MATCH
predicates for STATUS directives.
- Fixed a problem with local Kerberos authentication (STR #4140)
- Coverity scan: fixed some minor issues (STR #4242)
- The scheduler did not remove color profiles after deleting a printer
(STR #4232, STR #4276)
- The CUPS library did not always detect a timed out connection to the
server which could cause temporary loss of printing from applications
(STR #4187)
- The ipptool program now supports variable substitution in OPERATION
and DELAY directives (STR #4175)
- The IPP backend now stops queues when the server configuration
prevents successful job submission (STR #4125)
- The XML output of ipptool contained empty dictionaries (STR #4136)
- The scheduler did not delete job control backup files (STR #4244)
- cupsGetPPD3 could return a local PPD instead of the correct remote
PPD.
- The scheduler incorrectly advertised auth-info-required for local
queues needing local authentication (STR #4205)
- CUPS 1.6 clients using the ServerName directive in client.conf did not
work with CUPS 1.3.x or older servers (STR #4231, STR #4291)
- The SNMP backend now tries to work around broken printers that use a
newline to separate key/value pairs.
- The IPP backend did not send a cancel request to printers when a job
was canceled and the printer did not support Create-Job.
- Fixed EPM packaging files (STR #4199)
- OpenBSD build fix (STR #4195, STR #4196, STR #4197)
- The scheduler could crash when using Avahi (STR #4183, STR #4192,
STR #4200, STR #4213)
- The IPP backend could get stuck in an endless loop on certain network
errors (STR #4194)
- 32-bit builds failed on Debian (STR #4133)
- The scheduler no longer accepts or sends job description attributes.
- The IPP backend now works around some conformance issues for broken
printers (STR #4190)
- cupsBackendReport() now filters out all control characters from the
reported 1284 device IDs (STR #4124)
- The scheduler no longer allows job-name values that are not valid
network Unicode strings (STR #4072)
- The web interface did not preserve the order of classes, jobs, or
printers (STR #4170)
- The network backends now support disabling of SNMP supply level
queries via the "snmp" URI option (STR #4106)
- The IPP backend did not specify the compression used (STR #4181)
- ipptool did not support octetString values.
- The scheduler did not recognize dnssd: or ipps: URIs as Bonjour shared
queues (STR #4158)
- Applications could not get the PPD file for statically-configured
Bonjour-shared print queues (STR #4159)
- The cupsd.conf file included obsolete browsing directives (STR #4157)
- Fixed a USB backend compatibility issue on systems using libusb
(STR #4155, STR #4191)
- Some Bonjour features were not available on systems with Avahi
(STR #4156)
- CUPS now includes the port number in the Host: header for HTTP
requests.
- Fixed REPEAT-MATCH for STATUS and EXPECT - was incorrectly erroring
out.
CHANGES IN CUPS V1.6.1
- Documentation fix (STR #4149)
- RPM packaging fixes (STR #4129, #4145)
- The Japanese and English web interface headers were swapped
(STR #4148)
CHANGES IN CUPS V1.6.0
- Document changes (STR #4131)
- Added new Catalan (STR #4107) and Spanish (STR #4137) localizations.
CHANGES IN CUPS V1.6rc1
- Added a new Japanese localization (STR #4122)
- The SNMP backend no longer exits if it is unable to obtain an IPv6
socket (STR #4109)
- The LPD backend incorrectly used "localhost" in the control file
instead of the current hostname.
CHANGES IN CUPS V1.6b1
- Documentation updates (STR #3927, STR #3980, STR #4010, STR #4068)
- The scheduler now consolidates all PPD updates from filters at the
end of the job (STR #4075)
- CUPS now supports color management using colord (STR #3808)
- CUPS now supports Bonjour using Avahi (STR #3066)
- The PreserveJobFiles and PreserveJobHistory directives now support
specification of a time interval (STR #3143)
- PPD files can now be archived in (gzip'd) tar files to further reduce
the disk space used by PPD files (STR #3772)
- The network backends now deal with printers that report their levels
in percent but do not specify a maximum capacity of 100 (STR #3551)
- The network backends now report full/almost-full waste bins in
printers along with end-of-life for cleaning pads (STR #4017)
- Added a configure option to set the permissions of the installed
cupsd (STR #3459)
- Added a new WITH-ALL-VALUES directive to ipptool EXPECT predicates
(STR #3949)
- CUPS now supports a User directive in client.conf and the CUPS_USER
environment variable for overriding the default username (STR #3114)
- Now set the PJL USERNAME variable as needed (STR #3100)
- Added support for usernames and passwords longer than 32 characters
(STR #2856)
- Added a new MaxHoldTime directive to automatically cancel jobs that
have been held indefinitely after a specific number of seconds
(STR #2291)
- The LPD backend now uses the originating host name when it is not the
local system (STR #2053)
- CUPS now prefers the suffix "dpcm" when reporting resolution in dots-
per-centimeter (STR #4006)
- The configure script and build system no longer support building of
separate 32-bit and 64-bit libraries.
- The "brightness", "columns", "fitplot", "gamma", "hue",
"natural-scaling", "penwidth", "position", "ppi", "saturation", and
"scaling" options are not longer supported (STR #4010)
- The "page-bottom", "page-left", "page-right", "page-top",
"prettyprint", and "wrap" options have been deprecated (STR #4010)
- The scheduler now reports the standard "number-of-documents" attribute
instead of the CUPS-specific "document-count" attribute in
job objects.
- Added new destination connection and enumeration functions (STR #3924)
- Added new option, localization, and job submission functions that do
not depend on PPD files (STR #3925)
- Added a new MaxJobTime directive for cupsd that specifies the maximum
amount of time allowed for a job to complete before it is canceled.
- The default password callback now supports passwords up to 127
characters.
- The scheduler now supports a DefaultAuthType of "auto" to
automatically choose between Basic (username/password) and Negotiate
(Kerberos) authentication.
- cupsSideChannelSNMPGet/Walk now support OIDs and values up to 64k in
length.
- CUPS no longer supports automatic remote printers or implicit classes
via the CUPS, LDAP, or SLP protocols (STR #3922, STR #3923)
- The PPD APIs are now deprecated and will be removed in a future
version of CUPS (STR #3927)
- The default IPP version for requests is now 2.0 (STR #3929)
- The IPP APIs no longer expose the ipp_t or ipp_attribute_t structures
and instead provide accessor functions (STR #3928)
- The scheduler will no longer run programs with group write permission.
- The PHP module has been removed (STR #3932)
- The bannertops, commandtoescpx, commandtopclx, imagetops,
imagetoraster, pdftops, rastertoescpx, rastertopclx, and texttops
filters have been removed (STR #3930)
- The serial and parallel backends have been removed (STR 3935)
-158
Ver Arquivo
@@ -1,158 +0,0 @@
CHANGES-IPPTOOL.txt - 2013-05-02
--------------------------------
This file provides a list of changes to the ipptool binary distribution posted
on cups.org.
2013-05-02
- Fixed several ipptool test files that used old STATUS names.
2013-04-18
- Fixed some HTTP issues with authentication and compression.
- The IPP/1.1 test file did not allow for sufficient retries when
printing.
- The IPP/1.1 test file did not allow for empty printer-name values.
- The IPP Everywhere test file contained numerous errors.
- The color.jpg test file used a progressive mode instead of the
baseline JPEG mode.
- The IPP/1.1 test file referenced "color.jpeg" instead of "color.jpg".
2013-01-31
- Added support for DEFINE-MATCH and DEFINE-NO-MATCH as STATUS
predicates.
- Added support for WITH-VALUE and resolution values.
- Added support for SKIP-IF-MISSING (skip test if file is missing)
- Added support for octetString values.
- Added support for document compression in Print-Job and Send-Document
requests.
- Fixed REPEAT-MATCH for STATUS and EXPECT - was incorrectly erroring
out.
- Fixed a bug where bad IPP responses would cause ipptool to crash.
2012-02-28
- Changed behavior of WITH-VALUES "/regex/" to not require all values to
match.
- Added WITH-ALL-VALUES directive for EXPECT predicates that require all
values to match.
- Updated test files to use WITH-ALL-VALUES where necessary.
- Updated test files to use new ABNF for media names from PWG Media
Names 2.0.
2012-02-06
- Fixed the packaging of ipptool on Windows (removed unnecessary DLLs)
- Fixed an crash in ipptool when mixing DISPLAY with -I and a failed
request.
- Added a Print-Job test file.
- Added a "setdebug" batch file for Windows
- Added support for a CUPS_DISABLE_ASYNC_CONNECT environment variable.
2012-01-10
- Fixed an issue with the IPP/1.1 test file where the "waiting for job
completion" test did not work.
- The attribute groups out of order error was not shown for the
operation-attributes-tag group.
2011-12-02
- Fixed a truncated XML output bug that would happen for certain errors.
- Fixed the order-of-groups tests.
- Fixed "WITH-VALUE >N" for rangeOfInteger attributes.
- The Windows installer was missing the get-printer-attributes.test
file.
- The Linux binaries are now compiled for all LSB 4.x-compliant Linux
distributions.
- The Linux binaries no longer support SSL or TLS.
2011-10-05
- Fixed a crasher bug that showed up on Windows.
- The IPP/1.1 test would hang if the initial Print-Job test failed.
- Fixed a typo in the IPP/2.0 test.
2011-10-03
- Using OF-TYPE with the "no-value" or "unknown" out-of-band value tags
now works without special WITH-VALUE strings.
- ipptool now shows an error when an attribute appears more than once
within the same attribute group.
- ipptool did not display attributes as specified by the DISPLAY
directive when a test error failed.
- Fixed one spot where DEFINE-VALUE was still treated as an error when
the EXPECT test failed.
- uriScheme values were not displayed properly.
- Updated the IPP/1.1 tests to properly validate support for
job-hold-until-default and job-hold-until-supported when the Hold-Job
operation is supported.
- Updated the IPP/1.1 tests to properly check for the various standard
media sizes for the printing tests.
- Updated the IPP/1.1 tests to accept "no-value" for media-default an
orientation-requested-default.
- Updated the IPP/1.1 tests to accept "unknown" for job-state.
- Updated the IPP/1.1 tests to not perform the bogus URI printing tests
unless the "document-uri" variable is defined.
- Updated the IPP/2.0 tests to properly validate media-col
"media-xxx-supported" attributes.
- Updated the IPP/2.2 tests to properly validate media-ready and
media-col-ready.
2011-09-28
- Test output now includes a summary and overall score at the end.
- The MATCH-VALUE predicate now correctly deals with a failed EXPECT
condition.
- The IPP/1.1 test suite now looks for legacy media names and uses them
if the corresponding PWG standard names are not present.
- The IPP/1.1 test suite now tests the Print-Job+Release-Job when the
printer supports the job-hold-until attribute, Hold-Job operation, and
Release-Job operation.
2011-09-21
- Fixes for HTTP chunking, timeout, and encryption issues reported by
various users.
- Greatly improved IPP tests with added IPP/2.2 tests.
- New test documents - 1-page and 4-page mixed A4/Letter PDF/PS and a
couple JPEGs.
- New REPEAT directives to programmatically repeat tests as needed.
2011-08-16
- The Windows version no longer requires Visual Studio to be installed.
- The Windows version now supports SSL.
- Added "ipps" URI support.
- Added a new "-T" option.
- Added support for fractional seconds for the -i option and DELAY
directive.
- Added support for authentication.
- Added DEFINE-MATCH, DEFINE-NO-MATCH, DEFINE-VALUE, IF-NOT-DEFINED,
IGNORE-ERRORS, SKIP-IF-DEFINED, SKIP-IF-NOT-DEFINED,
SKIP-PREVIOUS-ERROR directives.
- WITH-VALUE now supports variable expansion.
- Updated the IPP/1.1 conformance test to skip the "my-jobs different
user" test if the printer URI contains a username.
- Updated the IPP conformance tests to validate media, media-default,
and media-supported values.
- No longer error out if a Printer returns a different version number in
the response when the request contains the version 0.0.
2010-10-16
- Initial release of standalone binary.
+516 -35
Ver Arquivo
@@ -1,37 +1,518 @@
CHANGES.txt - 1.7b1 - 2013-04-18
--------------------------------
CHANGES.txt - 2009-09-11
------------------------
CHANGES IN CUPS V1.7b1
CHANGES IN CUPS V1.4.1
- 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)
- Documention fixes (STR #3296)
- SNMP supply levels and states were wrong for some printers.
- The IPP backend did not update the auth-info-required value.
- The libusb-based USB backend would hang at the end of the job
(STR #3315, STR #3318)
- DNS-SD registrations for raw queues had an empty "ty" key (STR #3299)
- The JPEG and BMP MIME type rules were broken (STR #3284)
- cupsGetNamedDest returned the default printer when the named
destination did not exist (STR #3285)
- The JobKillDelay was not triggered for canceled jobs (STR #3292)
- The PPD compiler could get in an infinite loop (STR #3293)
- The configure check for dns-sd.h was broken (STR #3297)
- The "Query Printer for Default Options" page did not go away if the
query job was held (STR #3302)
- Boolean options did not show up as selected in the web interface
(STR #3303)
- The scheduler did not cache or report driver information files
correctly, leading to a variety of issues (STR #3283, STR #3297,
STR #3305)
- cupsDoIORequest() did not abort on permanent errors (STR #3311)
- Modifying a class in the web interface did not work (STR #3312)
- BrowseLocalProtocols could be cleared when changing the sharing
setting (STR #3287)
- The scheduler could return an empty supported document format
(STR #3308)
- The PPD compiler generated invalid PPD files when the locale used
something other than "." for the decimal point (STR #3300)
- The IPP backend did not handle some non-comforming IPP printer
implementations (STR #3262)
- The scheduler leaked three file descriptors to each job filter
(STR #3263)
- The scheduler now uses a default CUPS-Get-Devices timeout of 15
seconds (STR #3307)
CHANGES IN CUPS V1.4.0
- Localization updates (STR #3223, STR #3246, STR #3248, STR #3250)
- Documentation updates (STR #3225, STR #3230, STR #3242, STR #3260)
- The --with-pdftops configure option did not accept a full path to the
filter (STR #3278)
- The banner filter did not position the back side image correctly
(STR #3277)
- The dnssd backend could crash (STR #3272)
- The 1284 device ID sometimes contained trailing garbage (STR #3266)
- The USB backend returned different URIs for some printers than in
CUPS 1.3 (STR #3259)
- The scheduler did not do local job-hold-until processing for remote
queues (STR #3258)
- The scheduler did not try all possible SSL certificates on Mac OS X.
- The scheduler did not always remove a file descriptor when using the
kqueue interface (STR #3256)
- The scheduler did not protect against bad job control files in all
cases (STR #3253)
- The scheduler did not encode "+" in model names (STR #3254)
- The web interface didn't show the default options (STR #3244)
- The IPP and LPD backends needed print data before they would do an
SNMP query.
- Fixed a GNU TLS compatibility issue (STR #3231)
- Fixed a HTML error in the add and modify printer web interface
templates (STR #3229)
- The scheduler did not minimize the number of printer state events that
were generated by filter STATE: messages, which could lead to poor
performance.
- The USB backend on Mac OS X did not cleanly cancel a job.
- The network backends now set the connecting-to-device printer-state-
reasons value when looking up the address and copying the print data
for consistency.
- The scheduler now supports the com.apple.print.recoverable-warning
reason on all platforms.
CHANGES IN CUPS V1.4rc1
- The PPD compiler documentation was missing information on localization
(STR #3212)
- The IPP backend now reconnects after every request when talking to
printers that claim IPP support but only use HTTP/1.0.
- The PPD compiler crashed when both "Resolution" and "Group foo Option
Resolution" were specified in the .drv file.
- The PPD compiler's #if/#elif/#else/#endif did not work for undefined
variables (STR #3210)
- Static libraries could not be installed by a non-root user on systems
needing a ranlib program (STR #3209)
- The scheduler incorrectly always tried to copy Kerberos credentials
for print jobs.
- Updated the Spanish localization (STR #3204)
- The scheduler crashed when getting the default paper size from
libpaper (STR #3205, STR #3206)
- The PPD compiler now defines six variables: CUPS_VERSION,
CUPS_VERSION_MAJOR, CUPS_VERSION_MINOR, CUPS_VERSION_PATCH,
PLATFORM_NAME, and PLATFORM_ARCH (STR #3203)
- Fixed a whitespace skipping bug in cupsRasterInterpretPPD.
- The scheduler did not return HTTP 403 (Forbidden) for authenticated
users that were not authorized to do IPP operations (STR #3193)
- The scheduler did not report more than 8 Product strings from a PPD
file. Some PPD files have as many as 24.
- ppdOpen*() could crash if a keyword had no value string (something
that cupstestppd looks for...)
- cupsLangDefault() did not return the correct language on Mac OS X.
- The Mac OS X USB backend did not handle aborted or stalled pipe
conditions properly, which prevented drivers from ejecting partial
pages when a job was canceled or held.
CHANGES IN CUPS V1.4b3
- Documentation fixes (STR #3044, STR #3057, STR #3153, STR #3158,
STR #3173)
- Added complete localizations for German, Japanese, Polish, and
Russian and partial localizations for Chinese, Danish, Finnish,
French, Italian, Korean, Norwegian, Portuguese, and Swedish
(STR #3096, STR #3098, STR #3109, STR #3111, STR #3141)
- Updated the configure check for -fstack-protector (STR #3198)
- The network backends now correctly convert SNMP supply descriptions to
UTF-8 encoding as needed.
- The scheduler could crash when deleting an attribute (STR #3197)
- The cups-driverd program did not detect symlink loops (STR #3185)
- The EPSON 24-pin series driver should now feed the correct amount
(STR #2624)
- The scheduler now automatically logs the last N debug messages for
failed print jobs.
- You can now modify a raw print queue (STR #3133)
- Fixed a number of ppdi issues and added a unit test to validate that
ppdc + ppdi can generate and import the same data (STR #3152)
- Moving jobs in the web interface now shows an error if you only have
one printer or class added (STR #3094)
- Since classes have never truly supported the printer-error-policy
stuff added in CUPS 1.2, update the code to reflect the current
reality and support only the retry-current-job policy for now
(STR #3171)
- Revised the password callback support (STR #2953)
- ppdEmit*() did not choose between PageSize and PageRegion properly.
- Make some fairly substantial changes to the Kerberos support code so
that CUPS can work in multi-realm environments and does not require
delegatable credentials. Shared printing still requires delegation,
however "delegation by policy" can be enabled in the KDC to make this
all work.
- "AccessLogLevel actions" did not hide client-error-not-found errors.
- AP_FIRST_InputSlot did not work with number-up.
- cupsBackChannelRead() and cupsBackChannelWrite() could fail due to a
lack of kernel buffers.
- The IPP and LPD backends did not respond to side-channel requests
while copying print data to a temporary file.
- cupsWriteRequestData() flushed the output buffer unnecessarily,
causing reduced performance in some situations.
- If a CGI process died before sending its MIME headers, the request
would hang on the client.
- The printer/class/job search feature on the web interface did not
work (STR #3132)
- The scheduler did not write the printers out for classes.
- CUPS-Get-PPDs did not work properly when filtering by language,
product, or psversion (STR #3136)
- The scheduler now kills job filters when it takes more than 30 seconds
(configurable) to cancel or hold the job.
- The cupstestppd program did not validate the capitalization of
filenames in the PPD file.
- The cupstestppd program did not validate the PageSize and PageRegion
values.
- The cups-deviced helper program could miss reporting some backend
devices (STR #3108)
- The cupsSideChannelSNMP* functions did not work.
- The scheduler could consume 100% CPU when jobs were canceled.
- Clicking on "Select Another Make/Manufacturer" in the web interface
incorrectly added the printer (STR #3095)
- The scheduler no longer uses programs with insecure file
permissions.
- httpAssembleURI*() did not escape backslashes in hostnames.
- The dnssd backend did not unquote "full names" before creating the
device URI.
- The scheduler now supports JobRetryInterval values less than 10
seconds.
- Updated the Spanish localization (STR #3090)
- The scheduler did not redo Bonjour/DNS-SD registrations when updating
them failed.
- The "authenticated" policy incorrectly required authentication for
status operations.
- ppdOpen*() incorrectly loaded PPDs with multiple JobPatchFile
keywords.
- The network backends no longer report the SNMP "offline" or
maintenance status bits since they are inconsistently implemented and
often unreliable.
- The scheduler no longer logs child processes killed via SIGKILL as
"crashed".
- The printer link shown on the "job moved" template was bad (STR #3085)
- Updated the HTML templates to use the final HTML 4 DOCTYPE (STR #3086)
- The scheduler did not track the "paused" reason properly if a
printer had other reasons associated with it.
- cupsSendRequest() did not clear old local certificate auth data.
- The PPD compiler did not search for localization files properly
(STR #3084)
- cupsGetNamedDest() did not use the fallback default like
cupsGetDests*() (STR #3082)
- The scheduler now provides a LogTimeFormat directive to enable
microseconds in the date and time that are logged.
- The scheduler now provides a MultipleOperationTimeout directive to
control the timeout for multi-file print jobs.
- The configure script incorrectly allowed Avahi to be used for DNS-SD
printer discovery (STR #3065)
- The web interface and scheduler did not support URIs up to 1024 bytes
in length (STR #3072)
- Fixed pdftops issues with page sizes (STR #3063)
- Fixed pdftops issues with Ghostscript (STR #3062)
- The scheduler incorrectly registered default profiles for PostScript
printers with no specified colorspace.
- The scheduler incorrectly created an empty org.cups.printers.plist
file on Mac OS X.
- cupsGetPPD3() did not look for local PPDs in the right directory.
- SNMP lookups via side-channel did not work for NULL-VALUE and
and OCTET-STRING OIDs containing nul characters.
- The libusb-based USB backend did not work.
- The scheduler did not set the printer-commands attribute correctly
for some PPDs.
- The ppdi utility did not work.
- The web interface no longer uses multi-part output with old or broken
web browsers (STR #3049)
- CUPS now conforms to the draft IPP/2.0 and IPP/2.1 specification.
- Added a new cupsGetConflicts() API to get a list of conflicting
options.
- The PPD compiler didn't localize options or choices that did not
have associated translation text (STR #3045)
- Updated the Spanish localization (STR #3043)
- Fixed build problems (STR #3040, STR #3047)
- cupsResolveConflicts() did not resolve using the default option
choice in some cases due to the mirror UIConstraints that are
present in most PPD files.
- The scheduler did not honor MIME type priorities.
- The commandtops filter incorrectly used the JCLBegin code to end
its jobs.
- The default BrowseLocalProtocols value was not set properly.
- Since the commandtops filter does not actually support ReportLevels
all on its own, don't list that printer command by default for PS
printers.
- The scheduler did not give filters a chance to log errors or update
printer attributes when a job was canceled.
- The scheduler did not clear the "connecting-to-device" reason keyword
when a job finished.
CHANGES IN CUPS V1.4b2
- Documentation updates (STR #2983, STR #2998, STR #3021)
- The cupstestppd utility now validates the FileVersion and
FormatVersion values in PPD files.
- The default cupsd.conf file did not reflect the
--with-local-protocols value set at compile-time (STR #3037)
- The cupsGetPPD* APIs now create symlinks to local PPD files
rather than copying them whenever possible.
- Various performance optimizations in the string pool, dests, and
options implementations.
- The cupsGetDests* APIs now return the marker and printer-commands
attributes.
- Side-channel SNMP lookups would not work when cupsSNMPSupplies
was set to False in the PPD file.
- Localized the device descriptions for the SCSI, serial,
and network backends (STR #3014)
- Added a Spanish localization (STR #3015)
- Added support for marker-low-levels and marker-high-levels
attributes.
- The scheduler could hang writing a long log line.
- The cupsGetDevices() function now has an "include_schemes"
parameter.
- The lpinfo command now supports --include-schemes and
--exclude-schemes options.
- The CUPS-Get-PPDs operation now supports the include-schemes
and exclude-schemes attributes.
- The CUPS-Get-Devices operation now supports the include-schemes
attribute.
- The print filters now support a replacement for the fitplot
option called "fit-to-page".
- The LPD backend no longer tries to collect page accounting
information since the LPD protocol does not allow us to
prevent race conditions.
- The scheduler did not save the last marker-change-time value.
- Fixed a problem with printing to some IPP printers, including
CUPS 1.1.x.
- Fixed a redirection problem with the printer web page (STR #3012)
- Fixed a PPD compiler problem with the loading of message
catalogs (STR #2990)
- Fixed a PPD compiler problem with the loading of .strings files
(STR #2989)
- The cupsfilter utility did not set the CONTENT_TYPE environment
variable when running filters.
- The scheduler now waits to allow system sleep until the jobs
have all stopped.
- The IPP, LPD, and socket backends used different "connecting"
progress messages.
CHANGES IN CUPS V1.4b1
- Documentation updates (STR #2567)
- The PPD compiler now allows local message catalogs to
override the standard CUPS translations (STR #2642)
- The ppdmerge command did not merge custom option strings
(STR #2863)
- The scheduler now supports the Hold-New-Jobs and
Release-Held-New-Jobs operations; these are exposed via the
cupsdisable and cupsenable commands (STR #2332)
- The lpstat command is now much faster when displaying the
status of a single printer (STR #2843)
- The scheduler now caches information from PPD files to provide
significantly faster startup time with large numbers of PPDs
(STR #1293)
- CUPS-Get-Driver now provides much better driver matching based
on the IEEE-1284 device ID and make/model strings (STR #2707)
- Now support the cupsSNMPSupplies keyword to control whether
the network backends query the SNMP Printer MIB for supply
levels.
- Now support and use a new banner file format for better text
support and easier customization (STR #2490)
- The scheduler now sets the PRINTER_INFO and PRINTER_LOCATION
environment variables from the corresponding IPP attributes.
- The ippRead*() and ippWrite*() functions no longer use a
stack-based buffer (STR #2388)
- The CUPS-Add-Modify-Printer operation now allows you to set
the printer-state-reasons attribute.
- The "set printer options" page now supports auto-configuration
of printer options (STR #1440)
- The web interface now provides an advanced server settings
form.
- The web interface's "modify printer" pages now make it
easier to change just one setting (STR #1919)
- The scheduler now supports a plist PrintcapFormat.
- The scheduler now supports multiple addresses in Allow and
Deny lines, just like Apache (STR #2947)
- Added CUPS_JOBTYPE environment variable for job filters so
they know whether they are printing a banner or document
file (STR #2799)
- Added support for printer filtering by the cupsfilter
command (STR #2562)
- Added a SSLOptions directive to allow Windows clients to
talk to CUPS in FIPS mode (STR #2827)
- Renamed the accept and reject commands to cupsaccept and
cupsreject; the old names are still available (STR #2936)
- The locale/translate utility needed an update to work with
Google (STR #2882)
- The lpstat command now supports a -H option to display the
default server (STR #2833)
- The scheduler now supports a FatalErrors directive to control
which errors should cause the scheduler to exit (STR #2536)
- The scheduler now uses the php-cgi program if it is available
(STR #2923)
- The scheduler now supports a DefaultPaperSize directive
(STR #2848)
- The scheduler now passes the job-originating-host-name
value to filters in the options argument (STR #2558)
- CUPS now supports job tickets in PDF files (STR #2903)
- Added a DBUS notifier (STR #2529)
- The LPD mini-daemon now passes the document name when queuing
print jobs (STR #2482)
- The IPP backend did not relay com.apple.print.recoverable-message
values.
- The scheduler now supports a job-media-progress attribute to
track the progress of individual pages.
- The sample HP driver now supports A5 (STR #2798)
- The CUPS web interface menu item now uses the xdg-open
command, when available (STR #2724)
- The cups-lpd program now supports the -h option (STR #2794)
- The scheduler now sets the PAM_TTY parameter and the
PAM_ESTABLISH_CRED credential flag (STR #2745)
- The scheduler now logs unsuccessful requests to the error_log
file as errors (STR #2616)
- Added support for a "retry-current-job" error policy that
retries the current job immediately when the backend encounters
an error (STR #2555)
- The scheduler now returns a "forbidden" error when a user
correctly authenticates but does not have permission to
continue further (STR #2101)
- The scheduler now loads both the server and CA certificates
(if present) from the ServerCertificate file (STR #2146)
- New RSS subscriptions now create their feed files immediately
(STR #2853)
- Added support for a device-location attribute which provides
the physical location of a printer device.
- Added a cupsBackendReport() API which handles quoting of the
device data by a backend.
- Added support for custom options in the web interface
(STR #1729)
- Added support for Mozilla LDAP, reconnection to LDAP servers,
and improved LDAP performance (STR #1962)
- Added Solaris SMF support (STR #1477)
- Added optional support for using TCP wrappers to limit access
to CUPS (STR #263)
- Added ppdPageSizeLimits API.
- Added support for new cupsMediaQualifier2, cupsMediaQualifier3,
cupsMinSize, and cupsMaxSize attributes.
- Added cupsResolveConflicts and ppdInstallableConflict APIs.
- Added support for new cupsUIConstraints and cupsUIResolver
attributes for better option conflict detection and
resolution.
- Increased the maximum size of 1284 device ID strings to
256 bytes (STR #2877)
- Added an AccessLogLevel directive to cupsd.conf to control
what is logged to the access_log file.
- The default LogLevel is now "warn" instead of "info" to reduce
the amount of logging that is done to disk by default.
- The PPD compiler did not include OID query keywords in PPD
files (STR #2871)
- The cups-driverd helper program now directly supports driver
information files.
- The USB backend now uses libusb when available (STR #1575)
- Added ppdLocalizeAttr function to get the localized version
of an attribute.
- MIME types now support a priority() attribute (STR #2719)
- The standard MIME types are now installed in
DataDir/mime (STR #2719)
- The lpoptions command now describes custom options and
the necessary parameters (STR #2660)
- The ppdmerge program did not support Simplified Chinese
or Traditional Chinese language version strings (STR #2851)
- The PPD compiler now supports localizable attributes
(STR #2738)
- The ppdpo utility now includes cupsIPPReasons values in
the message catalogs it generates (STR #2754)
- The PPD compiler now supports conditional directives
(STR #2636)
- The ppdc utility now supports a "-t" option to test PPD
files (STR #2739)
- The ppdc utility now supports a "-m" option to use the
ModelName value as the output filename.
- The ppdc utility now supports a FileName directive to
set an alternate output filename (STR #2740)
- The side-channel API now supports SNMP queries for the
standard network backends.
- Added a PageLogFormat directive to the cupsd.conf file to
control the format of lines in the page_log file.
- Filters can now send PPD: messages to stderr to set PPD
keywords like DefaultPageSize while a job is printing.
- Added a mdns backend for discovery and printing to printers
that advertise themselves via DNS-SD (Bonjour)
- The ipp, lpd, and socket backends now support DNS-SD service
name resolution.
- The scheduler now uses a single shared file descriptor for
all DNS-SD registrations (STR #2674)
- The ipp, lpd, and socket backends now support SNMP-based
page accounting and supply level monitoring (STR #1655)
- Added support for cupsPJLDisplay attribute to control what
PJL commands are used to display the job information.
- Driver information files can now be installed in
/Library/Printers/PPDs.drv on Mac OS X.
- The CUPS image library now supports reading images larger
than 2GB.
- The scheduler now delays writing config and state files to
reduce disk activity (STR #2684)
- The CUPS-Get-Devices operation now supports the
exclude-schemes and timeout attributes to control which
backends are polled and for how long.
- The cups-deviced helper application now runs backends in
parallel to get the list of devices faster.
- Added --enable-pap configure option.
- The default cupsd.conf file now includes an "authenticated"
policy which requires authentication for remote print jobs.
- Added support for Czech and Hungarian in PPD files
(STR #2735, STR #2736)
- The PPD compiler tools now support Mac OS X .strings files
for localization (STR #2737)
- ppdOpen*() now default the colorspace member to PPD_CS_N
when no DefaultColorSpace attribute is present in the PPD
file.
- The build system has been updated to support separate
installation of data, program, header, and library files.
- All support libraries are now built as shared libraries
by default.
- The scheduler now manages ICC color profiles on Mac OS X.
- The network backends (ipp, lpd, socket) now support
SNMP-based supply and page count monitoring (STR #1655)
- The lppasswd program is no longer installed setuid to
root to make the default installation more secure.
- Added a new ppdLocalizeMarkerName() function to get
the localized version of a marker-names value.
- The scheduler now provides the printer-dns-sd-name
attribute for printers shared via DNS-SD/Bonjour.
- The pdftops filter now executes the Xpdf or poppler
pdftops utility to convert PDF files (STR #1471)
- Bonjour printer registrations now advertise as local or
global based on the current access policies for the
printer.
- cupsGetDests*() and cupsSetDests*() now track the last
used printer preference on Mac OS X.
- Added a new streaming request API (STR #2261)
- Added a new cupsGetNamedDest() function to the CUPS
library for faster printing with lp and lpr (STR #2638)
- The scheduler now sets the PAM RHOST value on systems
that support it (STR #2637)
- The scheduler now sandboxes child processes when
possible.
- The Cancel-Job operation now supports a purge-job
attriibute to purge a specified job.
- ppdEmit* and ppdCollect* now use the NonUIOrderDependency
attributes for custom option selections.
- The web interface now enables/disables the printer
sharing (formerly publishing) controls based on the
server-is-sharing-printers state (STR #2233)
- The scheduler now tracks printer sharing via the
server-is-sharing-printers attribute, and manages LPD
and SMB sharing as well (STR #2233)
- The web interface now allows you to go back to the make/
manufacturer page if there is no matching printer driver
on the model page (STR #2436)
- The printer list now shows the default media, banner, and
duplex options as well as the color and duplex capabilities
of printers (STR #1175)
- The web interface look-n-feel has been updated (STR #2492)
- The scheduler now supports a CUPS-Get-Document operation
that returns the specified print job document (STR #118)
- The cupsfilter utility now supports a "-J jobid" option
to filter the document from the specified job.
- The scheduler (cupsd) now supports a new option (-t) to
do a syntax check of the cupsd.conf file (STR #2003)
- Added new cupsGetPPD3() API to allow applications to
cache PPDs safely (STR #1473)
- Added generic PostScript and PCL printer driver PPDs.
+5 -7
Ver Arquivo
@@ -1,4 +1,4 @@
CREDITS.txt - 2012-07-16
CREDITS.txt - 2009-07-07
------------------------
Few projects are completed by one person, and CUPS is no exception. We'd
@@ -17,7 +17,7 @@ like to thank the following individuals for their contributions:
Wang Jian - CUPS RPM corrections.
Roderick Johnstone - Beta tester of the millenium.
Till Kamppeter - Bug fixes, beta testing, evangelism.
Iñaki Larrañaga - Basque localization.
Iaki Larraaga - Basque localization.
Kenshi Muto - Japanese localization, patches, and
testing.
Tomohiro Kato - Japanese localization.
@@ -27,22 +27,20 @@ like to thank the following individuals for their contributions:
Mark Lawrence - Microsoft interoperability testing.
Jeff Licquia - Bug fixes, beta testing, evangelism.
Jason McMullan - Original CUPS RPM distributions.
Àngel Mompó - Catalan localization.
Wes Morgan - *BSD fixes.
Daniel Nylander - Swedish localization.
Niklas 'Nille' Åkerström - Swedish localization.
Naruiko Ogasawara - Japanese localization.
Niklas 'Nille' kerstršm - Swedish localization.
Giulio Orsero - Bug fixes and testing.
Michal Osowiecki - Polish localization.
Citra Paska - Indonesian localization.
Kurt Pfeifle - Bug fixes, beta testing, evangelism.
Vincenzo Reale - Italian localization.
Petter Reinholdtsen - HP-UX compiler stuff.
Juan Pablo González Riopedre - Spanish localization.
Juan Pablo Gonzlez Riopedre - Spanish localization.
Opher Shachar - Hebrew localization.
Stuart Stevens - HP JetDirect IPP information.
Andrea Suatoni - IRIX desktop integration and testing.
Teppo Turliainen - Finnish localization.
Teppo Turlianen - Finnish localization.
Tim Waugh - Lots of patches, testing, and Linux
integration.
Yugami - LDAP browsing support.
+17 -20
Ver Arquivo
@@ -1,20 +1,14 @@
INSTALL - CUPS v1.7b1 - 2013-04-18
INSTALL - CUPS v1.4.0 - 2009-06-26
----------------------------------
This file describes how to compile and install CUPS from source code. For more
information on CUPS see the file called "README.txt". A complete change log can
be found in "CHANGES.txt".
*******************************************************************************
*******************************************************************************
**** ****
**** USING CUPS REQUIRES ADDITIONAL THIRD-PARTY SUPPORT SOFTWARE AND ****
**** PRINTER DRIVERS. THESE ARE TYPICALLY INCLUDED WITH YOUR OPERATING ****
**** SYSTEM DISTRIBUTION. APPLE DOES NOT ENDORSE OR SUPPORT THIRD-PARTY ****
**** SUPPORT SOFTWARE FOR CUPS. ****
**** ****
*******************************************************************************
*******************************************************************************
**** IF YOU HAVE A NON-POSTSCRIPT PRINTER AND ARE NOT ****
**** RUNNING MAC OS X, YOU WILL ALSO NEED TO INSTALL GPL ****
**** GHOSTSCRIPT WITH THE "cups" DRIVER AFTER YOU INSTALL ****
**** CUPS. ****
BEFORE YOU BEGIN
@@ -29,16 +23,18 @@ BEFORE YOU BEGIN
Compaq, HP, SGI, and Sun. BSD users should use GNU make (gmake) since BSD
make does not support "include".
Besides these tools you'll want ZLIB library for compression support, the
CDSA, GNU TLS, or OpenSSL libraries for encryption support, and either MIT
(1.6.3 or higher) or Heimdal Kerberos for Kerberos support. CUPS will
compile and run without these, however you'll miss out on many of the
features provided by CUPS.
Besides these tools you'll want the JPEG, PNG, TIFF, and ZLIB libraries for
image support, the CDSA, GNU TLS, or OpenSSL libraries for encryption
support, the OpenLDAP and OpenSLP libraries for directory services support,
and either MIT (1.6.3 or higher) or Heimdal Kerberos for Kerberos support.
CUPS will compile and run without these, however you'll miss out on many of
the features provided by CUPS.
Also, please note that CUPS does not include print filters to support PDF
or raster printing. You *must* download GPL Ghostscript and/or the Open
Printing CUPS filters package separately to print on operating systems
other than OS X.
Also, please note that CUPS does not include the Ghostscript-based
PostScript filter needed by non-PostScript printers. You *must* download
GPL Ghostscript separately from the CUPS web site if you want to print
PostScript files to non-PostScript printers on operating systems other than
Mac OS X.
COMPILING THE SUBVERSION REPOSITORY CODE
@@ -170,6 +166,7 @@ CREATING BINARY DISTRIBUTIONS WITH EPM
deb - Builds a Debian package
depot - Builds a HP-UX package (also swinstall)
inst - Builds an IRIX package (also tardist)
osx - Builds a MacOS X package
pkg - Builds a Solaris package
rpm - Builds a RPM package
setld - Build a Tru64 UNIX package
-209
Ver Arquivo
@@ -1,209 +0,0 @@
IPPTOOL.txt - 2013-05-02
------------------------
See the file CHANGES-IPPTOOL.txt for a list of changes to this software.
INTRODUCTION
CUPS includes a user program called ipptool that can be used to send
arbitrary IPP requests to a CUPS server or IPP printer. This tool started
life as part of the CUPS automated test suite and has grown to support
complex conformance tests and a simple way to query printer, job, and
subscription attributes.
BASIC USAGE
The ipptool command requires a printer URI and one or more "test" files that
describe the operations, attributes to display, and expected status and
attribute values. Several standard files are included with CUPS, for example
to show a list of pending print jobs on a CUPS printer called "myprinter"
you'd run:
ipptool ipp://localhost/printers/myprinter get-jobs.test
which would produce something like this:
job-id job-state job-name job-originating-user-name
------ ------------ ------------ -------------------------
72 pending testfile.pdf msweet
73 pending testfile.ps msweet
74 pending-held testfile.jpg msweet
75 pending-held testfile.txt msweet
To get output suitable for import into a spreadsheet, use the "-c" (CSV)
option:
ipptool -c ipp://localhost/printers/myprinter get-jobs.test
which will produce something like this:
job-id,job-state,job-name,job-originating-user-name
72,pending,testfile.pdf,msweet
73,pending,testfile.ps,msweet
74,pending-held,testfile.jpg,msweet
75,pending-held,testfile.txt,msweet
STANDARD TEST FILES
The following standard test files are included with ipptool:
create-printer-subscription.test Creates a printer subscription for
state change notifications
get-completed-jobs.test Shows a list of completed jobs
get-jobs.test Shows a list of pending jobs
get-notifications.test Shows events for an ippget
subscription.
get-printer-attributes.test Shows printer attributes
get-subscriptions.test Shows a list of subscriptions
ipp-1.1.test IPP/1.1 conformance test suite
ipp-2.0.test IPP/2.0 conformance test suite
ipp-2.1.test IPP/2.1 conformance test suite
ipp-2.2.test IPP/2.2 conformance test suite
ipp-everywhere.test IPP Everywhere conformance test
suite
print-job.test Prints a file
print-job-deflate.test Prints a file, compressing with
deflate.
print-job-gzip.test Prints a file, compressing with gzip
validate-job.test Validates attributes for a job
submission.
CONFORMANCE TESTS
We provide basic IPP conformance tests for IPP/1.1, IPP/2.0, IPP/2.1,
IPP/2.2, and IPP Everywhere. For a given printer URI, the following
commands perform tests at each level:
ipptool -tf filename [options] -I printer-uri ipp-1.1.test
ipptool -tf filename [options] -I -V 2.0 printer-uri ipp-2.0.test
ipptool -tf filename [options] -I -V 2.1 printer-uri ipp-2.1.test
ipptool -tf filename [options] -I -V 2.2 printer-uri ipp-2.2.test
The filename must use a format supported by the printer; ipptool will guess
the MIME media type using the extension, otherwise application/octet stream
will be used. The following standard test files are included:
color.jpg
document-a4.pdf
document-a4.ps
document-letter.pdf
document-letter.ps
gray.jpg
onepage-a4.pdf
onepage-a4.ps
onepage-letter.pdf
onepage-letter.ps
testfile.jpg
testfile.pcl
testfile.pdf
testfile.ps
testfile.txt
Useful options include the following:
-4 Connect using IPv4
-6 Connect using IPv6
-C Send chunked requests (default)
-d name=val Define a variable
-E Test IPP with HTTP Upgrade to TLS
-L Send requests using the Content-Length header (HTTP/1.0)
-S Test IPP over HTTPS (default for ipps: URIs)
-T seconds Set a timeout for responses in seconds
-v Be verbose, showing all attributes sent and received
-X Produce XML (Apple plist) output
The printer-uri must be a URI supported by the printer using the "ipp" or
"ipps" scheme, for example:
ipp://192.168.0.1/ipp
ipps://192.168.0.1/ipp/print
Print-by-reference (URL) printing can be tested by defining the document-uri
variable as a URL, for example:
ipptool -tf filename -d document-uri=url -I printer-uri ipp-1.1.test
The standard test files are available on cups.org under the "test"
directory, for example:
ipptool -tf document-a4.pdf \
-d document-uri=http://www.cups.org/test/document-a4.pdf \
ipp://192.168.0.1/ipp -I -V 2.0 ipp-2.0.test
The "document" test files contain 4 pages each. Doing the IPP conformance
tests will will produce up to 90 pages on various media, depending on the
printer.
IPP EVERYWHERE TESTING
The IPP Everywhere tests use sample PWG raster files available from:
ftp://ftp.pwg.org/pub/pwg/ipp/examples
Extract the corresponding ZIP archives into the current directory before
running the ipp-everywhere.test file. The test file will attempt to print
each PWG Raster file that is supported by the printer being tested - up to
372 pages including the 90 pages produced by the regular IPP test suite.
READING THE DOCUMENTATION
The command usage is described in the ipptest(1) man page, while the file
format is described in the ipptestfile(5) man page. Both are provided in
HTML format with the standalone releases of ipptool.
GETTING SUPPORT AND OTHER RESOURCES
If you have problems, READ THE DOCUMENTATION FIRST! We also provide many
discussion forums which are available at:
http://www.cups.org/newsgroups.php
See the CUPS web site at "http://www.cups.org/" for other resources.
REPORTING BUGS
If you believe you have discovered a bug in ipptool, please fill out the
bug form at:
http://www.cups.org/str.php
Be sure to identify the version of CUPS and ipptool (if you downloaded the
standalone version) you are using, the printer (if any) and firmware
version, and include any files that apply.
If you downloaded the standalone version of ipptool, please also re-run the
test with debug logging enabled. Run the following commands on Windows to
enable debug logging:
setdebug.bat
For Linux and Mac OS X use:
CUPS_DEBUG_LOG=ipptool.log; export CUPS_DEBUG_LOG
CUPS_DEBUG_LEVEL=6; export CUPS_DEBUG_LEVEL
Then when you run the ipptool command a new "ipptool.log" file will be
created with detailed information - attach this file to the bug you file
as well.
LEGAL STUFF
CUPS is Copyright 2007-2013 by Apple Inc. CUPS and the CUPS logo are
trademarks of Apple Inc.
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
CUPS is provided under the terms of version 2 of the GNU General Public
License and GNU Library General Public License. This program is distributed
in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the "doc/help/license.html" or "LICENSE.txt" files for more information.
+11 -9
Ver Arquivo
@@ -1,6 +1,6 @@
CUPS License Agreement
Copyright 2007-2012 by Apple Inc.
Copyright 2007-2009 by Apple Inc.
1 Infinite Loop
Cupertino, CA 95014 USA
@@ -16,8 +16,10 @@ copy of the exceptions 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
source distribution and the files in the "test" subdirectory. The
GNU GPL applies to the remainder of the CUPS distribution.
source distribution and in the "cups" include directory and
library files in the binary distributions. The GNU GPL applies to
the remainder of the CUPS distribution, including the "pdftops"
filter which is based upon Xpdf.
For those not familiar with the GNU GPL, the license basically
allows you to:
@@ -68,11 +70,11 @@ the following special exceptions:
source code of the Apple OS-Developed Software.
b. An Apple Operating System means any operating system
software developed and/or marketed by Apple Inc.,
including but not limited to all existing releases and
versions of Apple's Darwin, OS X, and OS X Server
products and all follow-on releases and future
versions thereof.
software developed and/or marketed by Apple Computer,
Inc., including but not limited to all existing
releases and versions of Apple's Darwin, Mac OS X,
and Mac OS X Server products and all follow-on
releases and future versions thereof.
c. This exception is only available for Apple
OS-Developed Software and does not apply to software
@@ -129,7 +131,7 @@ redistribute it freely, subject to the following restrictions:
software.
3. This notice may not be removed or altered from any source
distribution.
distribution.
TRADEMARKS
+60 -29
Ver Arquivo
@@ -1,9 +1,9 @@
#
# "$Id$"
#
# Common makefile definitions for CUPS.
# Common makefile definitions for the Common UNIX Printing System (CUPS).
#
# Copyright 2007-2012 by Apple Inc.
# Copyright 2007-2009 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
@@ -24,12 +24,13 @@ CHMOD = @CHMOD@
CXX = @LIBTOOL@ @CXX@
DSO = @DSO@
DSOXX = @DSOXX@
GZIP = @GZIP@
HTMLDOC = @HTMLDOC@
INSTALL = @INSTALL@
LD = @LD@
LIBTOOL = @LIBTOOL@
LN = @LN@ -sf
MV = @MV@
PHPCONFIG = @PHPCONFIG@
RANLIB = @RANLIB@
RM = @RM@ -f
RMDIR = @RMDIR@
@@ -41,7 +42,6 @@ SHELL = /bin/sh
#
INSTALL_BIN = $(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@
INSTALL_COMPDATA = $(INSTALL) -c -m 444 @INSTALL_GZIP@
INSTALL_CONFIG = $(INSTALL) -c -m @CUPS_CONFIG_FILE_PERM@
INSTALL_DATA = $(INSTALL) -c -m 444
INSTALL_DIR = $(INSTALL) -d
@@ -63,7 +63,6 @@ CUPS_PRIMARY_SYSTEM_GROUP = @CUPS_PRIMARY_SYSTEM_GROUP@
#
CUPS_CONFIG_FILE_PERM = @CUPS_CONFIG_FILE_PERM@
CUPS_CUPSD_FILE_PERM = @CUPS_CUPSD_FILE_PERM@
CUPS_LOG_FILE_PERM = @CUPS_LOG_FILE_PERM@
#
@@ -80,14 +79,18 @@ UNINSTALL_LANGUAGES = @UNINSTALL_LANGUAGES@
LIBCUPS = @LIBCUPS@
LIBCUPSCGI = @LIBCUPSCGI@
LIBCUPSDRIVER = @LIBCUPSDRIVER@
LIBCUPSIMAGE = @LIBCUPSIMAGE@
LIBCUPSMIME = @LIBCUPSMIME@
LIBCUPSPPDC = @LIBCUPSPPDC@
LIBCUPSSTATIC = @LIBCUPSSTATIC@
LIBGSSAPI = @LIBGSSAPI@
LIBJPEG = @LIBJPEG@
LIBLDAP = @LIBLDAP@
LIBMALLOC = @LIBMALLOC@
LIBMXML = @LIBMXML@
LIBPAPER = @LIBPAPER@
LIBPNG = @LIBPNG@
LIBSLP = @LIBSLP@
LIBGSSAPI = @LIBGSSAPI@
LIBTIFF = @LIBTIFF@
LIBUSB = @LIBUSB@
LIBWRAP = @LIBWRAP@
LIBZ = @LIBZ@
@@ -98,22 +101,14 @@ LIBZ = @LIBZ@
INSTALLSTATIC = @INSTALLSTATIC@
#
# IPP backend aliases...
#
IPPALIASES = @IPPALIASES@
#
# Install XPC backends?
#
INSTALLXPC = @INSTALLXPC@
#
# Program options...
#
# ARCHFLAGS Defines the default architecture build options.
# ARCH32FLAGS Defines the 32-bit architecture build options, used
# when compiling separate 32/64-bit libraries.
# ARCH64FLAGS Defines the 64-bit architecture build options, used
# when compiling separate 32/64-bit libraries.
# OPTIM Defines the common compiler optimization/debugging options
# for all architectures.
# OPTIONS Defines other compile-time options (currently only -DDEBUG
@@ -127,9 +122,10 @@ ALL_CXXFLAGS = -I.. -D_CUPS_SOURCE $(CXXFLAGS) $(SSLFLAGS) \
ARCHFLAGS = @ARCHFLAGS@
ARFLAGS = @ARFLAGS@
BACKLIBS = @BACKLIBS@
BUILDDIRS = @BUILDDIRS@
BANNERTOPS = @BANNERTOPS@
CFLAGS = @CPPFLAGS@ @CFLAGS@
COMMONLIBS = @LIBS@
CUPSDLIBS = @CUPSDLIBS@
CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@
CXXLIBS = @CXXLIBS@
DBUS_NOTIFIER = @DBUS_NOTIFIER@
@@ -138,22 +134,52 @@ DNSSD_BACKEND = @DNSSD_BACKEND@
DSOFLAGS = -L../cups @DSOFLAGS@
DSOLIBS = @DSOLIBS@ $(COMMONLIBS)
DNSSDLIBS = @DNSSDLIBS@
FONTS = @FONTS@
IMGLIBS = @IMGLIBS@
IMGFILTERS = @IMGFILTERS@
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)
LEGACY_BACKENDS = @LEGACY_BACKENDS@
LIBCUPSORDER = @LIBCUPSORDER@
LIBCUPSIMAGEORDER = @LIBCUPSIMAGEORDER@
LINKCUPS = @LINKCUPS@ $(SSLLIBS) $(DNSSDLIBS)
LINKCUPSIMAGE = @LINKCUPSIMAGE@
LIBS = $(LINKCUPS) $(COMMONLIBS)
OPTIM = @OPTIM@
OPTIONS =
PAMLIBS = @PAMLIBS@
SERVERLIBS = @SERVERLIBS@
PAP = @PAP@
PDFTOPS = @PDFTOPS@
PHPDIR = @PHPDIR@
PHPOPTIONS = @PHPOPTIONS@ -I../.. `$(PHPCONFIG) --includes`
SSLFLAGS = @SSLFLAGS@
SSLLIBS = @SSLLIBS@
TEXTTOPS = @TEXTTOPS@
UNITTESTS = @UNITTESTS@
#
# Separate 32/64-bit library support...
#
ARCH32FLAGS = @ARCH32FLAGS@
DSO32FLAGS = @DSO32FLAGS@
INSTALL32 = @INSTALL32@
LIB32CUPS = @LIB32CUPS@
LIB32CUPSIMAGE = @LIB32CUPSIMAGE@
LIB32DIR = $(BUILDROOT)@LIB32DIR@
UNINSTALL32 = @UNINSTALL32@
ARCH64FLAGS = @ARCH64FLAGS@
DSO64FLAGS = @DSO64FLAGS@
INSTALL64 = @INSTALL64@
LIB64CUPS = @LIB64CUPS@
LIB64CUPSIMAGE = @LIB64CUPSIMAGE@
LIB64DIR = $(BUILDROOT)@LIB64DIR@
UNINSTALL64 = @UNINSTALL64@
#
# Directories...
#
@@ -181,7 +207,6 @@ localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
privateinclude = @privateinclude@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -192,7 +217,6 @@ BUILDROOT = $(DSTROOT)
AMANDIR = $(BUILDROOT)@AMANDIR@
BINDIR = $(BUILDROOT)@bindir@
BUNDLEDIR = @CUPS_BUNDLEDIR@
CACHEDIR = $(BUILDROOT)@CUPS_CACHEDIR@
DATADIR = $(BUILDROOT)@CUPS_DATADIR@
DOCDIR = $(BUILDROOT)@CUPS_DOCROOT@
@@ -206,7 +230,6 @@ LOGDIR = $(BUILDROOT)@CUPS_LOGDIR@
MANDIR = $(BUILDROOT)@mandir@
MENUDIR = @MENUDIR@
PMANDIR = $(BUILDROOT)@PMANDIR@
PRIVATEINCLUDE = $(BUILDROOT)@PRIVATEINCLUDE@
RCLEVELS = @RCLEVELS@
RCSTART = @RCSTART@
RCSTOP = @RCSTOP@
@@ -236,15 +259,23 @@ DBUSDIR = @DBUSDIR@
#
.SILENT:
.SUFFIXES: .1 .1.gz .1m .1m.gz .3 .3.gz .5 .5.gz .7 .7.gz .8 .8.gz .a .c .cxx .h .man .o .gz
.SUFFIXES: .1 .1.gz .1m .1m.gz .3 .3.gz .5 .5.gz .7 .7.gz .8 .8.gz .a .c .cxx .h .man .o .32.o .64.o .gz
.c.o:
echo Compiling $<...
$(CC) $(ARCHFLAGS) $(OPTIM) $(ALL_CFLAGS) -c -o $@ $<
$(CC) $(ARCHFLAGS) $(OPTIM) $(ALL_CFLAGS) -c $<
.c.32.o:
echo Compiling 32-bit $<...
$(CC) $(ARCH32FLAGS) $(OPTIM) $(ALL_CFLAGS) -c -o $@ $<
.c.64.o:
echo Compiling 64-bit $<...
$(CC) $(ARCH64FLAGS) $(OPTIM) $(ALL_CFLAGS) -c -o $@ $<
.cxx.o:
echo Compiling $<...
$(CXX) $(ARCHFLAGS) $(OPTIM) $(ALL_CXXFLAGS) -c -o $@ $<
$(CXX) $(ARCHFLAGS) $(OPTIM) $(ALL_CXXFLAGS) -c $<
.man.1 .man.1m .man.3 .man.5 .man.7 .man.8:
echo Linking $<...
+147 -45
Ver Arquivo
@@ -1,9 +1,9 @@
#
# "$Id$"
#
# Top-level Makefile for CUPS.
# Top-level Makefile for the Common UNIX Printing System (CUPS).
#
# Copyright 2007-2012 by Apple Inc.
# Copyright 2007-2009 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
@@ -16,11 +16,21 @@
include Makedefs
#
# Don't run top-level build targets in parallel...
#
.NOTPARALLEL:
#
# Directories to make...
#
DIRS = cups test $(BUILDDIRS)
DIRS = cups filter backend berkeley cgi-bin driver locale man monitor \
notifier ppdc scheduler systemv test \
$(PHPDIR) \
conf data doc examples $(FONTS) templates
#
@@ -101,6 +111,7 @@ distclean: clean
$(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) init/cups.sh init/cups-lpd init/org.cups.cups-lpd.plist
$(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
@@ -109,8 +120,7 @@ distclean: clean
$(RM) packaging/cups-desc.plist packaging/cups-info.plist
$(RM) templates/header.tmpl
$(RM) desktop/cups.desktop
$(RM) scheduler/cups.sh scheduler/cups-lpd.xinetd
$(RM) scheduler/org.cups.cups-lpd.plist scheduler/cups.xml
$(RM) init/cups.xml
-$(RM) doc/*/index.html
-$(RM) templates/*/header.tmpl
-$(RM) -r autom4te*.cache clang cups/charmaps cups/locale driver/test
@@ -129,15 +139,13 @@ 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)
#
.PHONY: clang clang-changes
.PHONY: clang
clang:
$(RM) -r clang
scan-build -V -k -o `pwd`/clang $(MAKE) $(MFLAGS) clean all
clang-changes:
scan-build -V -k -o `pwd`/clang $(MAKE) $(MFLAGS) all
scan-build -V -k -o `pwd`/clang $(MAKE) $(MFLAGS) \
CC=ccc-analyzer CXX=ccc-analyzer clean all
#
@@ -160,8 +168,6 @@ install: install-data install-headers install-libs install-exec
#
install-data:
echo Making all in cups...
(cd cups; $(MAKE) $(MFLAGS) all)
for dir in $(DIRS); do\
echo Installing data files in $$dir... ;\
(cd $$dir; $(MAKE) $(MFLAGS) install-data) || exit 1;\
@@ -169,7 +175,73 @@ install-data:
echo Installing cups-config script...
$(INSTALL_DIR) -m 755 $(BINDIR)
$(INSTALL_SCRIPT) cups-config $(BINDIR)/cups-config
if test "x$(INITDIR)" != x; then \
echo Installing init scripts...; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/init.d; \
$(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/init.d/cups; \
for level in $(RCLEVELS); do \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc$${level}.d; \
$(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc$${level}.d/S$(RCSTART)cups; \
if test `uname` = HP-UX; then \
level=`expr $$level - 1`; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc$${level}.d; \
fi; \
$(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc$${level}.d/K$(RCSTOP)cups; \
done; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc0.d; \
$(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc0.d/K$(RCSTOP)cups; \
fi
if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
$(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \
if test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
echo Installing LaunchDaemons configuration files...; \
$(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
$(INSTALL_DATA) init/org.cups.cups-lpd.plist $(BUILDROOT)/System/Library/LaunchDaemons; \
case `uname -r` in \
8.*) \
$(INSTALL_DIR) $(BUILDROOT)/System/Library/StartupItems/PrintingServices; \
$(INSTALL_SCRIPT) init/PrintingServices.launchd $(BUILDROOT)/System/Library/StartupItems/PrintingServices/PrintingServices; \
$(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)/System/Library/StartupItems/PrintingServices/StartupParameters.plist; \
$(INSTALL_DIR) $(BUILDROOT)/System/Library/StartupItems/PrintingServices/Resources/English.lproj; \
$(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)/System/Library/StartupItems/PrintingServices/Resources/English.lproj/Localizable.strings; \
;; \
esac \
else \
echo Installing RC script...; \
$(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
fi \
fi
if test "x$(SMFMANIFESTDIR)" != x; then \
echo Installing SMF manifest in $(SMFMANIFESTDIR)...;\
$(INSTALL_DIR) $(BUILDROOT)/$(SMFMANIFESTDIR); \
$(INSTALL_SCRIPT) init/cups.xml $(BUILDROOT)$(SMFMANIFESTDIR)/cups.xml; \
fi
if test "x$(DBUSDIR)" != x; then \
echo Installing cups.conf in $(DBUSDIR)...;\
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(DBUSDIR)/system.d; \
$(INSTALL_DATA) packaging/cups-dbus.conf $(BUILDROOT)$(DBUSDIR)/system.d/cups.conf; \
fi
if test "x$(XINETD)" != x; then \
echo Installing xinetd configuration file for cups-lpd...; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(XINETD); \
$(INSTALL_DATA) init/cups-lpd $(BUILDROOT)$(XINETD)/cups-lpd; \
fi
if test "x$(MENUDIR)" != x; then \
echo Installing desktop menu...; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(MENUDIR); \
$(INSTALL_DATA) desktop/cups.desktop $(BUILDROOT)$(MENUDIR); \
fi
if test "x$(ICONDIR)" != x; then \
echo Installing desktop icons...; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/16x16/apps; \
$(INSTALL_DATA) desktop/cups-16.png $(BUILDROOT)$(ICONDIR)/hicolor/16x16/apps/cups.png; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/32x32/apps; \
$(INSTALL_DATA) desktop/cups-32.png $(BUILDROOT)$(ICONDIR)/hicolor/32x32/apps/cups.png; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/64x64/apps; \
$(INSTALL_DATA) desktop/cups-64.png $(BUILDROOT)$(ICONDIR)/hicolor/64x64/apps/cups.png; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/128x128/apps; \
$(INSTALL_DATA) desktop/cups-128.png $(BUILDROOT)$(ICONDIR)/hicolor/128x128/apps/cups.png; \
fi
#
# Install header files...
@@ -180,11 +252,6 @@ install-headers:
echo Installing header files in $$dir... ;\
(cd $$dir; $(MAKE) $(MFLAGS) install-headers) || exit 1;\
done
if test "x$(privateinclude)" != x; then \
echo Installing config.h into $(PRIVATEINCLUDE)...; \
$(INSTALL_DIR) -m 755 $(PRIVATEINCLUDE); \
$(INSTALL_DATA) config.h $(PRIVATEINCLUDE)/config.h; \
fi
#
@@ -221,6 +288,58 @@ uninstall:
echo Uninstalling cups-config script...
$(RM) $(BINDIR)/cups-config
-$(RMDIR) $(BINDIR)
echo Uninstalling startup script...
if test "x$(INITDIR)" != x; then \
$(RM) $(BUILDROOT)$(INITDIR)/init.d/cups; \
$(RMDIR) $(BUILDROOT)$(INITDIR)/init.d; \
$(RM) $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \
$(RMDIR) $(BUILDROOT)$(INITDIR)/rc0.d; \
$(RM) $(BUILDROOT)$(INITDIR)/rc2.d/S99cups; \
$(RMDIR) $(BUILDROOT)$(INITDIR)/rc2.d; \
$(RM) $(BUILDROOT)$(INITDIR)/rc3.d/S99cups; \
$(RMDIR) $(BUILDROOT)$(INITDIR)/rc3.d; \
$(RM) $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \
$(RMDIR) $(BUILDROOT)$(INITDIR)/rc5.d; \
fi
if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
$(RM) $(BUILDROOT)$(INITDDIR)/PrintingServices; \
$(RM) $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
$(RM) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
$(RMDIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
$(RM) $(BUILDROOT)$(INITDDIR)/org.cups.cupsd.plist; \
$(RM) $(BUILDROOT)$(INITDDIR)/org.cups.cups-lpd.plist; \
$(RMDIR) $(BUILDROOT)/System/Library/StartupItems/PrintingServices; \
else \
$(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
fi \
$(RMDIR) $(BUILDROOT)$(INITDDIR); \
fi
if test "x$(SMFMANIFESTDIR)" != x; then \
echo Uninstalling SMF manifest in $(SMFMANIFESTDIR)...;\
$(RM) $(BUILDROOT)$(SMFMANIFESTDIR)/cups.xml; \
fi
if test "x$(DBUSDIR)" != x; then \
echo Uninstalling cups.conf in $(DBUSDIR)...;\
$(RM) $(BUILDROOT)$(DBUSDIR)/cups.conf; \
$(RMDIR) $(BUILDROOT)$(DBUSDIR); \
fi
if test "x$(XINETD)" != x; then \
echo Uninstalling xinetd configuration file for cups-lpd...; \
$(RM) $(BUILDROOT)$(XINETD)/cups-lpd; \
fi
if test "x$(MENUDIR)" != x; then \
echo Uninstalling desktop menu...; \
$(RM) $(BUILDROOT)$(MENUDIR)/cups.desktop; \
fi
if test "x$(ICONDIR)" != x; then \
echo Uninstalling desktop icons...; \
$(RM) $(BUILDROOT)$(ICONDIR)/hicolor/16x16/apps/cups.png; \
$(RM) $(BUILDROOT)$(ICONDIR)/hicolor/32x32/apps/cups.png; \
$(RM) $(BUILDROOT)$(ICONDIR)/hicolor/64x64/apps/cups.png; \
$(RM) $(BUILDROOT)$(ICONDIR)/hicolor/128x128/apps/cups.png; \
fi
#
@@ -234,11 +353,7 @@ test: all unittests
check: all unittests
echo Running CUPS test suite with defaults...
cd test; ./run-stp-tests.sh 1 0 n n
debugcheck: all unittests
echo Running CUPS test suite with debug printfs...
cd test; ./run-stp-tests.sh 1 0 n y
cd test; ./run-stp-tests.sh 1 0 n
#
@@ -246,13 +361,13 @@ debugcheck: all unittests
#
apihelp:
for dir in cgi-bin cups filter ppdc scheduler; do\
for dir in cgi-bin cups filter driver ppdc scheduler; do\
echo Generating API help in $$dir... ;\
(cd $$dir; $(MAKE) $(MFLAGS) apihelp) || exit 1;\
done
framedhelp:
for dir in cgi-bin cups filter ppdc scheduler; do\
for dir in cgi-bin cups filter driver ppdc scheduler; do\
echo Generating framed API help in $$dir... ;\
(cd $$dir; $(MAKE) $(MFLAGS) framedhelp) || exit 1;\
done
@@ -275,27 +390,17 @@ docset: apihelp
doc/help/api-*.tokens
$(RM) doc/help/api-*.tokens
echo Indexing docset...
/Applications/Xcode.app/Contents/Developer/usr/bin/docsetutil index org.cups.docset
/Developer/usr/bin/docsetutil index org.cups.docset
echo Generating docset archive and feed...
$(RM) org.cups.docset.atom
/Applications/Xcode.app/Contents/Developer/usr/bin/docsetutil package --output org.cups.docset.xar \
/Developer/usr/bin/docsetutil package --output org.cups.docset.xar \
--atom org.cups.docset.atom \
--download-url http://www.cups.org/org.cups.docset.xar \
org.cups.docset
#
# Lines of code computation...
#
sloc:
for dir in cups scheduler; do \
(cd $$dir; $(MAKE) $(MFLAGS) sloc) || exit 1;\
done
#
# Make software distributions using EPM (http://www.epmhome.org/)...
# Make software distributions using EPM (http://www.easysw.com/epm/)...
#
EPMFLAGS = -v --output-dir dist $(EPMARCH)
@@ -306,6 +411,9 @@ aix bsd deb depot inst pkg setld slackware swinstall tardist:
epm:
epm $(EPMFLAGS) -s packaging/installer.gif cups packaging/cups.list
osx:
epm $(EPMFLAGS) -f osx -s packaging/installer.tif cups packaging/cups.list
rpm:
epm $(EPMFLAGS) -f rpm -s packaging/installer.gif cups packaging/cups.list
@@ -316,18 +424,12 @@ dist: all
case `uname` in \
*BSD*) $(MAKE) $(MFLAGS) bsd;; \
Darwin*) $(MAKE) $(MFLAGS) osx;; \
IRIX*) $(MAKE) $(MFLAGS) tardist;; \
Linux*) test ! -x /usr/bin/rpm || $(MAKE) $(MFLAGS) rpm;; \
SunOS*) $(MAKE) $(MFLAGS) pkg;; \
esac
#
# Don't run top-level build targets in parallel...
#
.NOTPARALLEL:
#
# End of "$Id$".
#
+5 -12
Ver Arquivo
@@ -1,21 +1,14 @@
README - CUPS v1.7b1 - 2013-04-18
README - CUPS v1.4.0 - 2009-06-26
---------------------------------
************************************************
************************************************
**** ****
**** BETA SOFTWARE - USE AT YOUR OWN RISK ****
**** ****
************************************************
************************************************
Looking for compile instructions? Read the file "INSTALL.txt" instead...
Looking for compile instructions? Read the file "INSTALL.txt"
instead...
INTRODUCTION
CUPS is a standards-based, open source printing system developed by Apple
Inc. for OS® X and other UNIX®-like operating systems. CUPS uses the
Inc. for Mac OS® X and other UNIX®-like operating systems. CUPS uses the
Internet Printing Protocol ("IPP") and provides System V and Berkeley
command-line interfaces, a web interface, and a C API to manage printers and
print jobs. It supports printing to both local (parallel, serial, USB) and
@@ -157,7 +150,7 @@ PRINTING FILES
LEGAL STUFF
CUPS is Copyright 2007-2013 by Apple Inc. CUPS and the CUPS logo are
CUPS is Copyright 2007-2009 by Apple Inc. CUPS and the CUPS logo are
trademarks of Apple Inc.
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
+76 -70
Ver Arquivo
@@ -1,70 +1,76 @@
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
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
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
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
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/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
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
# DO NOT DELETE THIS LINE -- make depend depends on it.
ipp.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/versioning.h
ipp.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h backend-private.h
ipp.o: ../cups/backend.h ../cups/sidechannel.h ../cups/ppd-private.h
ipp.o: ../cups/cups.h ../cups/ppd.h ../cups/array.h ../cups/file.h
ipp.o: ../cups/language.h ../cups/debug.h ../cups/i18n.h ../cups/transcode.h
ipp.o: ../cups/snmp-private.h ../cups/string.h
lpd.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/versioning.h
lpd.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h backend-private.h
lpd.o: ../cups/backend.h ../cups/sidechannel.h ../cups/ppd-private.h
lpd.o: ../cups/cups.h ../cups/ppd.h ../cups/array.h ../cups/file.h
lpd.o: ../cups/language.h ../cups/debug.h ../cups/i18n.h ../cups/transcode.h
lpd.o: ../cups/snmp-private.h ../cups/string.h
dnssd.o: backend-private.h ../cups/backend.h ../cups/versioning.h
dnssd.o: ../cups/sidechannel.h ../cups/ppd-private.h ../cups/cups.h
dnssd.o: ../cups/ipp.h ../cups/http.h ../cups/ppd.h ../cups/array.h
dnssd.o: ../cups/file.h ../cups/language.h ../cups/debug.h ../cups/i18n.h
dnssd.o: ../cups/transcode.h ../cups/snmp-private.h ../cups/string.h
dnssd.o: ../config.h ../cups/array.h
pap.o: ../config.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
pap.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
pap.o: ../cups/language.h ../cups/backend.h ../cups/sidechannel.h
pap.o: ../cups/i18n.h ../cups/transcode.h
parallel.o: backend-private.h ../cups/backend.h ../cups/versioning.h
parallel.o: ../cups/sidechannel.h ../cups/ppd-private.h ../cups/cups.h
parallel.o: ../cups/ipp.h ../cups/http.h ../cups/ppd.h ../cups/array.h
parallel.o: ../cups/file.h ../cups/language.h ../cups/debug.h ../cups/i18n.h
parallel.o: ../cups/transcode.h ../cups/snmp-private.h ../cups/string.h
parallel.o: ../config.h
scsi.o: ../cups/backend.h ../cups/versioning.h ../cups/cups.h ../cups/ipp.h
scsi.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
scsi.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.h
scsi.o: ../cups/string.h ../config.h
serial.o: backend-private.h ../cups/backend.h ../cups/versioning.h
serial.o: ../cups/sidechannel.h ../cups/ppd-private.h ../cups/cups.h
serial.o: ../cups/ipp.h ../cups/http.h ../cups/ppd.h ../cups/array.h
serial.o: ../cups/file.h ../cups/language.h ../cups/debug.h ../cups/i18n.h
serial.o: ../cups/transcode.h ../cups/snmp-private.h ../cups/string.h
serial.o: ../config.h
snmp.o: backend-private.h ../cups/backend.h ../cups/versioning.h
snmp.o: ../cups/sidechannel.h ../cups/ppd-private.h ../cups/cups.h
snmp.o: ../cups/ipp.h ../cups/http.h ../cups/ppd.h ../cups/array.h
snmp.o: ../cups/file.h ../cups/language.h ../cups/debug.h ../cups/i18n.h
snmp.o: ../cups/transcode.h ../cups/snmp-private.h ../cups/string.h
snmp.o: ../config.h ../cups/array.h ../cups/file.h ../cups/http-private.h
snmp.o: ../cups/md5.h ../cups/ipp-private.h
socket.o: ../cups/http-private.h ../config.h ../cups/http.h
socket.o: ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
socket.o: ../cups/ipp.h backend-private.h ../cups/backend.h
socket.o: ../cups/sidechannel.h ../cups/ppd-private.h ../cups/cups.h
socket.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
socket.o: ../cups/debug.h ../cups/i18n.h ../cups/transcode.h
socket.o: ../cups/snmp-private.h ../cups/string.h
test1284.o: ../cups/string.h ../config.h ieee1284.c backend-private.h
test1284.o: ../cups/backend.h ../cups/versioning.h ../cups/sidechannel.h
test1284.o: ../cups/ppd-private.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
test1284.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
test1284.o: ../cups/debug.h ../cups/i18n.h ../cups/transcode.h
test1284.o: ../cups/snmp-private.h
testbackend.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
testbackend.o: ../cups/http.h ../cups/versioning.h ../cups/ppd.h
testbackend.o: ../cups/array.h ../cups/file.h ../cups/language.h
testbackend.o: ../cups/sidechannel.h
testsupplies.o: backend-private.h ../cups/backend.h ../cups/versioning.h
testsupplies.o: ../cups/sidechannel.h ../cups/ppd-private.h ../cups/cups.h
testsupplies.o: ../cups/ipp.h ../cups/http.h ../cups/ppd.h ../cups/array.h
testsupplies.o: ../cups/file.h ../cups/language.h ../cups/debug.h
testsupplies.o: ../cups/i18n.h ../cups/transcode.h ../cups/snmp-private.h
testsupplies.o: ../cups/string.h ../config.h
usb.o: backend-private.h ../cups/backend.h ../cups/versioning.h
usb.o: ../cups/sidechannel.h ../cups/ppd-private.h ../cups/cups.h
usb.o: ../cups/ipp.h ../cups/http.h ../cups/ppd.h ../cups/array.h
usb.o: ../cups/file.h ../cups/language.h ../cups/debug.h ../cups/i18n.h
usb.o: ../cups/transcode.h ../cups/snmp-private.h ../cups/string.h
usb.o: ../config.h
+64 -82
Ver Arquivo
@@ -1,9 +1,9 @@
#
# "$Id$"
#
# Backend makefile for CUPS.
# Backend makefile for the Common UNIX Printing System (CUPS).
#
# Copyright 2007-2012 by Apple Inc.
# Copyright 2007-2009 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
@@ -17,47 +17,13 @@
include ../Makedefs
#
# Object files...
#
# 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...
#
# See http://www.cups.org/documentation.php/api-filter.html for more info...
RBACKENDS = \
ipp \
lpd \
$(DNSSD_BACKEND)
UBACKENDS = \
snmp \
socket \
usb
UNITTESTS = \
test1284 \
testbackend \
testsupplies
TARGETS = \
libbackend.a \
$(RBACKENDS) \
$(UBACKENDS)
LIBOBJS = \
ieee1284.o \
network.o \
runloop.o \
snmp-supplies.o
OBJS = \
ipp.o \
lpd.o \
dnssd.o \
snmp.o \
socket.o \
test1284.o \
testbackend.o \
testsupplies.o \
usb.o
RBACKENDS = ipp lpd $(DNSSD_BACKEND)
UBACKENDS = $(PAP) $(LEGACY_BACKENDS) serial snmp socket usb
UNITTESTS = test1284 testbackend testsupplies
TARGETS = libbackend.a $(RBACKENDS) $(UBACKENDS)
LIBOBJS = ieee1284.o network.o runloop.o snmp-supplies.o
OBJS = ipp.o lpd.o dnssd.o pap.o parallel.o scsi.o serial.o snmp.o \
socket.o test1284.o testbackend.o testsupplies.o usb.o
#
@@ -86,7 +52,7 @@ unittests: $(UNITTESTS)
#
clean:
$(RM) $(OBJS) $(TARGETS) $(UNITTESTS) $(LIBOBJS) http https ipps mdns
$(RM) $(OBJS) $(TARGETS) $(UNITTESTS) $(LIBOBJS) http mdns
#
@@ -94,7 +60,7 @@ clean:
#
depend:
$(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
#
@@ -115,8 +81,7 @@ install-data:
# Install programs...
#
install-exec: $(INSTALLXPC)
echo Installing backends in $(SERVERBIN)/backend
install-exec:
$(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
for file in $(RBACKENDS); do \
$(LIBTOOL) $(INSTALL_BIN) -m 700 $$file $(SERVERBIN)/backend; \
@@ -124,31 +89,19 @@ install-exec: $(INSTALLXPC)
for file in $(UBACKENDS); do \
$(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
done
for file in $(IPPALIASES); do \
$(RM) $(SERVERBIN)/backend/$$file; \
$(LN) ipp $(SERVERBIN)/backend/$$file; \
done
if test "x$(DNSSD_BACKEND)" != x -a `uname` = Darwin; then \
$(RM) $(SERVERBIN)/backend/http
$(LN) ipp $(SERVERBIN)/backend/http
if test "x$(DNSSD_BACKEND)" != x; then \
$(RM) $(SERVERBIN)/backend/mdns; \
$(LN) $(DNSSD_BACKEND) $(SERVERBIN)/backend/mdns; \
fi
if test "x$(SYMROOT)" != "x"; then \
$(INSTALL_DIR) $(SYMROOT); \
for file in $(RBACKENDS) $(UBACKENDS); do \
for file in $(TARGETS); do \
cp $$file $(SYMROOT); \
dsymutil $(SYMROOT)/$$file; \
done \
fi
install-xpc: ipp
echo Installing XPC backends in $(SERVERBIN)/apple
$(INSTALL_DIR) -m 755 $(SERVERBIN)/apple
$(LIBTOOL) $(INSTALL_BIN) ipp $(SERVERBIN)/apple
for file in $(IPPALIASES); do \
$(RM) $(SERVERBIN)/apple/$$file; \
$(LN) ipp $(SERVERBIN)/apple/$$file; \
done
#
# Install headers...
@@ -169,17 +122,10 @@ install-libs:
#
uninstall:
$(RM) $(SERVERBIN)/apple/ipp
for file in $(IPPALIASES); do \
$(RM) $(SERVERBIN)/apple/$$file; \
done
-$(RMDIR) $(SERVERBIN)/apple
for file in $(RBACKENDS) $(UBACKENDS); do \
$(RM) $(SERVERBIN)/backend/$$file; \
done
for file in $(IPPALIASES); do \
$(RM) $(SERVERBIN)/backend/$$file; \
done
$(RM) $(SERVERBIN)/backend/http
-$(RMDIR) $(SERVERBIN)/backend
-$(RMDIR) $(SERVERBIN)
@@ -188,9 +134,9 @@ uninstall:
# test1284
#
test1284: test1284.o ../cups/$(LIBCUPSSTATIC)
test1284: test1284.o ../cups/libcups.a
echo Linking $@...
$(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/$(LIBCUPSSTATIC) \
$(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/libcups.a \
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
@@ -198,9 +144,9 @@ test1284: test1284.o ../cups/$(LIBCUPSSTATIC)
# testbackend
#
testbackend: testbackend.o ../cups/$(LIBCUPSSTATIC)
testbackend: testbackend.o ../cups/libcups.a
echo Linking $@...
$(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/$(LIBCUPSSTATIC) \
$(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/libcups.a \
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
@@ -208,10 +154,10 @@ testbackend: testbackend.o ../cups/$(LIBCUPSSTATIC)
# testsupplies
#
testsupplies: testsupplies.o libbackend.a ../cups/$(LIBCUPSSTATIC)
testsupplies: testsupplies.o libbackend.a ../cups/libcups.a
echo Linking $@...
$(CC) $(LDFLAGS) -o testsupplies testsupplies.o libbackend.a \
../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
$(COMMONLIBS) $(LIBZ)
@@ -233,10 +179,8 @@ libbackend.a: $(LIBOBJS)
dnssd: dnssd.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
$(CC) $(LDFLAGS) -o dnssd dnssd.o libbackend.a $(LIBS)
if test `uname` = Darwin; then \
$(RM) mdns; \
$(LN) dnssd mdns; \
fi
$(RM) mdns
$(LN) dnssd mdns
#
@@ -259,6 +203,44 @@ lpd: lpd.o ../cups/$(LIBCUPS) libbackend.a
$(CC) $(LDFLAGS) -o lpd lpd.o libbackend.a $(LIBS)
#
# pap
#
pap: pap.o ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o pap pap.o $(BACKLIBS) $(LIBS) -framework AppleTalk
#
# parallel
#
parallel: parallel.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
$(CC) $(LDFLAGS) -o parallel parallel.o libbackend.a $(LIBS)
#
# scsi
#
scsi: scsi.o ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o scsi scsi.o $(LIBS)
scsi.o: scsi.c scsi-irix.c scsi-linux.c
#
# serial
#
serial: serial.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
$(CC) $(LDFLAGS) -o serial serial.o libbackend.a $(BACKLIBS) $(LIBS)
#
# snmp
#
@@ -283,7 +265,7 @@ socket: socket.o ../cups/$(LIBCUPS) libbackend.a
usb: usb.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) \
$(CC) $(LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) \
$(BACKLIBS) $(LIBS)
usb.o: usb.c usb-darwin.c usb-libusb.c usb-unix.c
+14 -51
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* Backend support definitions for CUPS.
* Backend support definitions for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -23,32 +23,17 @@
* Include necessary headers.
*/
# include <cups/cups-private.h>
# include <cups/snmp-private.h>
# include <cups/backend.h>
# include <cups/sidechannel.h>
# include <cups/ppd-private.h>
# include <cups/debug.h>
# include <cups/i18n.h>
# include <cups/snmp-private.h>
# include <stdlib.h>
# include <errno.h>
# include <cups/string.h>
# include <signal.h>
# ifdef __linux
# include <sys/ioctl.h>
# include <linux/lp.h>
# define IOCNR_GET_DEVICE_ID 1
# define LPIOC_GET_DEVICE_ID(len) _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len)
# include <linux/parport.h>
# include <linux/ppdev.h>
# include <unistd.h>
# include <fcntl.h>
# endif /* __linux */
# ifdef __sun
# ifdef __sparc
# include <sys/ecppio.h>
# else
# include <sys/ioccom.h>
# include <sys/ecppsys.h>
# endif /* __sparc */
# endif /* __sun */
/*
* C++ magic...
@@ -259,20 +244,6 @@ extern "C" {
#define CUPS_TC_inserts 33
#define CUPS_TC_covers 34
#define CUPS_TC_tenThousandthsOfInches 3
#define CUPS_TC_micrometers 4
#define CUPS_TC_impressions 7
#define CUPS_TC_sheets 8
#define CUPS_TC_hours 11
#define CUPS_TC_thousandthsOfOunces 12
#define CUPS_TC_tenthsOfGrams 13
#define CUPS_TC_hundrethsOfFluidOunces 14
#define CUPS_TC_tenthsOfMilliliters 15
#define CUPS_TC_feet 16
#define CUPS_TC_meters 17
#define CUPS_TC_items 18
#define CUPS_TC_percent 19
/* These come from RFC 3808 to define character sets we support */
/* Also see http://www.iana.org/assignments/character-sets */
#define CUPS_TC_csASCII 3
@@ -288,15 +259,6 @@ extern "C" {
#define CUPS_TC_csUTF32 1017
#define CUPS_TC_csUTF32BE 1018
#define CUPS_TC_csUTF32LE 1019
#define CUPS_TC_csWindows31J 2024
/*
* Types...
*/
typedef int (*_cups_sccb_t)(int print_fd, int device_fd, int snmp_fd,
http_addr_t *addr, int use_bc);
/*
@@ -319,13 +281,14 @@ extern int backendNetworkSideCB(int print_fd, int device_fd,
int use_bc);
extern ssize_t backendRunLoop(int print_fd, int device_fd, int snmp_fd,
http_addr_t *addr, int use_bc,
int update_state, _cups_sccb_t side_cb);
int (*side_cb)(int print_fd,
int device_fd,
int snmp_fd,
http_addr_t *addr,
int use_bc));
extern int backendSNMPSupplies(int snmp_fd, http_addr_t *addr,
int *page_count,
int *printer_state);
extern int backendWaitLoop(int snmp_fd, http_addr_t *addr,
int use_bc, _cups_sccb_t side_cb);
# ifdef __cplusplus
}
+249 -661
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+71
Ver Arquivo
@@ -0,0 +1,71 @@
Preliminary Design for CUPS Firewire Printer Backend - 03/19/2002
-----------------------------------------------------------------
OVERVIEW
Easy Software Products will develop an IEEE-1394, a.k.a.
Firewire, printing interface for its Common UNIX Printing
System ("CUPS") for initial use under the Linux operating
system. A follow-on implementation for MacOS X is
anticipated as well.
The operating system interfaces for IEEE-1394 ports vary
widely; the CUPS printing interface will abstract the OS
layer to a simpler interface geared towards discovering,
opening, reading from, writing to, and closing IEEE-1394
printers.
The initial development of the CUPS backend will be targeted
at the EPSON Stylus Pro 10000 large format printer, which
requires the bandwidth provided by Firewire in order to
print at full speed. This printer supports printing via
Serial Bus Protocol 2 (SBP-2) using the SCSI and PWG command
sets. The CUPS backend will implement the PWG command set on
LUN 0 only.
OS ABSTRACTION LAYER
The OS abstraction layer will be a thin client library that
implements the following functions:
ieee1394_list
ieee1394_open
ieee1394_close
ieee1394_read
ieee1394_write
ieee1394_error
The "ieee1394_list" function will list all of the available
printer devices on the bus. The device information will
consist of the device URI (ieee1394:/something) used to
access the device and the make and model information, if
available, for the device ("EPSON Stylus Printer").
The "ieee1394_open" and "ieee1394_close" functions will open
and close a connection to the printer, respectively.
The "ieee1394_read" and "ieee1394_write" functions will read
and write data to and from the printer, respectively. The
read function will be non-blocking, returning data only if
there is data coming back from the printer.
The "ieee1394_error" function will return a string
describing the last error or NULL if no error occurred.
The library will be responsible for creating any background
threads that are needed to monitor the connection to the
printer.
CUPS BACKEND
The CUPS backend will use the OS abstraction layer to list
and access the Firewire printers. The "main" function will
read and write printer data, while the "list_devices"
function will be called as necessary to identify the
available devices.
The CUPS 1.1 backend will record any status information in
the error log file, while the 1.2 backend will supply it to
the printer driver process.
+35
Ver Arquivo
@@ -0,0 +1,35 @@
Easy Software Products
44141 Airport View Drive
Suite 204
Hollywood, Maryland 20636
+1.301.373.9600
March 8, 2002
Subject: EPSON Firewire Printer Driver for Linux
Currently, no Firewire printer support exists for Linux. Since
the latest EPSON printer products depend on the Firewire
interface to print at full speed, a solution is needed to
support customers using Linux as their server platform.
The Linux Firewire subsystem provides a user-mode driver
interface that allows driver programs to access Firewire
devices. Easy Software Products will utilize this interface to
develop a "backend" program for the Common UNIX Printing System
that will allow users to print to EPSON printers using the
Firewire interface.
After examining the Linux interface, we estimate that it will
require approximately 30 hours of development time to write,
test, and document the Firewire backend, for a total cost of
$3,000. The new backend will become a standard part of the CUPS
software distribution and will be included with at least the
following Linux distributions:
- Caldera Linux
- Mandrake Linux
- Red Hat Linux
- SuSE Linux
ESP will provide EPSON with binaries for Red Hat Linux 7.2.
+39 -67
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* IEEE-1284 support functions for CUPS.
* IEEE-1284 support functions for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -26,7 +26,26 @@
*/
#include "backend-private.h"
#include <cups/cups-private.h>
#ifdef __linux
# include <sys/ioctl.h>
# include <linux/lp.h>
# define IOCNR_GET_DEVICE_ID 1
# define LPIOC_GET_DEVICE_ID(len) _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len)
# include <linux/parport.h>
# include <linux/ppdev.h>
# include <unistd.h>
# include <fcntl.h>
#endif /* __linux */
#ifdef __sun
# ifdef __sparc
# include <sys/ecppio.h>
# else
# include <sys/ioccom.h>
# include <sys/ecppsys.h>
# endif /* __sparc */
#endif /* __sun */
/*
@@ -46,15 +65,6 @@ backendGetDeviceID(
int uri_size) /* I - Size of buffer */
{
#ifdef __APPLE__ /* This function is a no-op */
(void)fd;
(void)device_id;
(void)device_id_size;
(void)make_model;
(void)make_model_size;
(void)scheme;
(void)uri;
(void)uri_size;
return (-1);
#else /* Get the device ID from the specified file descriptor... */
@@ -65,7 +75,6 @@ backendGetDeviceID(
# if defined(__sun) && defined(ECPPIOC_GETDEVID)
struct ecpp_device_id did; /* Device ID buffer */
# endif /* __sun && ECPPIOC_GETDEVID */
char *ptr; /* Pointer into device ID */
DEBUG_printf(("backendGetDeviceID(fd=%d, device_id=%p, device_id_size=%d, "
@@ -187,7 +196,7 @@ backendGetDeviceID(
* and then limit the length to the size of our buffer...
*/
if (length > device_id_size || length < 14)
if (length > device_id_size)
length = (((unsigned)device_id[1] & 255) << 8) +
((unsigned)device_id[0] & 255);
@@ -196,41 +205,24 @@ backendGetDeviceID(
/*
* The length field counts the number of bytes in the string
* including the length field itself (2 bytes). The minimum
* length for a valid/usable device ID is 14 bytes:
*
* <LENGTH> MFG: <MFG> ;MDL: <MDL> ;
* 2 + 4 + 1 + 5 + 1 + 1
* including the length field itself (2 bytes).
*/
if (length < 14)
{
/*
* Can't use this device ID, so don't try to copy it...
*/
length -= 2;
device_id[0] = '\0';
got_id = 0;
}
else
{
/*
* Copy the device ID text to the beginning of the buffer and
* nul-terminate.
*/
/*
* Copy the device ID text to the beginning of the buffer and
* nul-terminate.
*/
length -= 2;
memmove(device_id, device_id + 2, length);
device_id[length] = '\0';
}
memmove(device_id, device_id + 2, length);
device_id[length] = '\0';
}
# ifdef DEBUG
else
{
DEBUG_printf(("backendGetDeviceID: ioctl failed - %s\n",
strerror(errno)));
*device_id = '\0';
}
# endif /* DEBUG */
# endif /* __linux */
# if defined(__sun) && defined(ECPPIOC_GETDEVID)
@@ -258,22 +250,6 @@ backendGetDeviceID(
# endif /* __sun && ECPPIOC_GETDEVID */
}
/*
* Check whether device ID is valid. Turn line breaks and tabs to spaces and
* reject device IDs with non-printable characters.
*/
for (ptr = device_id; *ptr; ptr ++)
if (_cups_isspace(*ptr))
*ptr = ' ';
else if ((*ptr & 255) < ' ' || *ptr == 127)
{
DEBUG_printf(("backendGetDeviceID: Bad device_id character %d.",
*ptr & 255));
*device_id = '\0';
break;
}
DEBUG_printf(("backendGetDeviceID: device_id=\"%s\"\n", device_id));
if (scheme && uri)
@@ -308,7 +284,7 @@ backendGetDeviceID(
* Get the make, model, and serial numbers...
*/
num_values = _cupsGet1284Values(device_id, &values);
num_values = _ppdGet1284Values(device_id, &values);
if ((sern = cupsGetOption("SERIALNUMBER", num_values, values)) == NULL)
if ((sern = cupsGetOption("SERN", num_values, values)) == NULL)
@@ -322,9 +298,9 @@ backendGetDeviceID(
if (mfg)
{
if (!_cups_strcasecmp(mfg, "Hewlett-Packard"))
if (!strcasecmp(mfg, "Hewlett-Packard"))
mfg = "HP";
else if (!_cups_strcasecmp(mfg, "Lexmark International"))
else if (!strcasecmp(mfg, "Lexmark International"))
mfg = "Lexmark";
}
else
@@ -337,10 +313,7 @@ backendGetDeviceID(
mfg = temp;
}
if (!mdl)
mdl = "";
if (!_cups_strncasecmp(mdl, mfg, strlen(mfg)))
if (!strncasecmp(mdl, mfg, strlen(mfg)))
{
mdl += strlen(mfg);
@@ -401,7 +374,7 @@ backendGetMakeModel(
* Look for the description field...
*/
num_values = _cupsGet1284Values(device_id, &values);
num_values = _ppdGet1284Values(device_id, &values);
if ((mdl = cupsGetOption("MODEL", num_values, values)) == NULL)
mdl = cupsGetOption("MDL", num_values, values);
@@ -415,7 +388,7 @@ backendGetMakeModel(
if ((mfg = cupsGetOption("MANUFACTURER", num_values, values)) == NULL)
mfg = cupsGetOption("MFG", num_values, values);
if (!mfg || !_cups_strncasecmp(mdl, mfg, strlen(mfg)))
if (!mfg || !strncasecmp(mdl, mfg, strlen(mfg)))
{
/*
* Just copy the model string, since it has the manufacturer...
@@ -432,7 +405,6 @@ backendGetMakeModel(
char temp[1024]; /* Temporary make and model */
snprintf(temp, sizeof(temp), "%s %s", mfg, mdl);
_ppdNormalizeMakeAndModel(temp, make_model, make_model_size);
}
}
+877 -2612
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+310 -265
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+7 -43
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* Common backend network APIs for CUPS.
* Common network APIs for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 2006-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -71,7 +71,7 @@ backendNetworkSideCB(
{
cups_sc_command_t command; /* Request command */
cups_sc_status_t status; /* Request/response status */
char data[65536]; /* Request/response data */
char data[2048]; /* Request/response data */
int datalen; /* Request/response data size */
const char *device_id; /* 1284DEVICEID env var */
@@ -92,7 +92,7 @@ backendNetworkSideCB(
status = CUPS_SC_STATUS_NOT_IMPLEMENTED;
else if (backendDrainOutput(print_fd, device_fd))
status = CUPS_SC_STATUS_IO_ERROR;
else
else
status = CUPS_SC_STATUS_OK;
datalen = 0;
@@ -119,35 +119,8 @@ backendNetworkSideCB(
if (snmp_fd >= 0)
{
char *dataptr; /* Pointer into data */
cups_snmp_t packet; /* Packet from printer */
const char *snmp_value; /* CUPS_SNMP_VALUE env var */
if ((snmp_value = getenv("CUPS_SNMP_VALUE")) != NULL)
{
const char *snmp_count; /* CUPS_SNMP_COUNT env var */
int count; /* Repetition count */
if ((snmp_count = getenv("CUPS_SNMP_COUNT")) != NULL)
{
if ((count = atoi(snmp_count)) <= 0)
count = 1;
}
else
count = 1;
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));
fprintf(stderr, "DEBUG: Returning %s %s\n", data,
data + strlen(data) + 1);
status = CUPS_SC_STATUS_OK;
datalen = dataptr - data;
break;
}
if (!_cupsSNMPStringToOID(data, packet.object_name, CUPS_SNMP_MAX_OID))
{
@@ -168,6 +141,7 @@ backendNetworkSideCB(
{
if (_cupsSNMPRead(snmp_fd, &packet, 1.0))
{
char *dataptr; /* Pointer into data */
int i; /* Looping var */
@@ -196,13 +170,9 @@ backendNetworkSideCB(
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)))
i = (int)(sizeof(data) - (dataptr - data));
if (packet.object_value.string.num_bytes < i)
i = packet.object_value.string.num_bytes;
else
i = (int)(sizeof(data) - (dataptr - data));
memcpy(dataptr, packet.object_value.string.bytes, i);
@@ -305,12 +275,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;
+1696
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+686
Ver Arquivo
@@ -0,0 +1,686 @@
/*
* "$Id$"
*
* Parallel port backend for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2008 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/".
*
* This file is subject to the Apple OS-Developed Software exception.
*
* Contents:
*
* main() - Send a file to the specified parallel port.
* list_devices() - List all parallel devices.
* side_cb() - Handle side-channel requests...
*/
/*
* Include necessary headers.
*/
#include "backend-private.h"
#ifdef __hpux
# include <sys/time.h>
#else
# include <sys/select.h>
#endif /* __hpux */
#ifdef WIN32
# include <io.h>
#else
# include <unistd.h>
# include <fcntl.h>
# include <termios.h>
# include <sys/socket.h>
#endif /* WIN32 */
#ifdef __sgi
# include <invent.h>
# ifndef INV_EPP_ECP_PLP
# define INV_EPP_ECP_PLP 6 /* From 6.3/6.4/6.5 sys/invent.h */
# define INV_ASO_SERIAL 14 /* serial portion of SGI ASO board */
# define INV_IOC3_DMA 16 /* DMA mode IOC3 serial */
# define INV_IOC3_PIO 17 /* PIO mode IOC3 serial */
# define INV_ISA_DMA 19 /* DMA mode ISA serial -- O2 */
# endif /* !INV_EPP_ECP_PLP */
#endif /* __sgi */
/*
* Local functions...
*/
static void list_devices(void);
static int side_cb(int print_fd, int device_fd, int snmp_fd,
http_addr_t *addr, int use_bc);
/*
* 'main()' - Send a file to the specified parallel port.
*
* Usage:
*
* printer-uri job-id user title copies options [file]
*/
int /* O - Exit status */
main(int argc, /* I - Number of command-line arguments (6 or 7) */
char *argv[]) /* I - Command-line arguments */
{
char method[255], /* Method in URI */
hostname[1024], /* Hostname */
username[255], /* Username info (not used) */
resource[1024], /* Resource info (device and options) */
*options; /* Pointer to options */
int port; /* Port number (not used) */
int print_fd, /* Print file */
device_fd, /* Parallel device */
use_bc; /* Read back-channel data? */
int copies; /* Number of copies to print */
size_t tbytes; /* Total number of bytes written */
struct termios opts; /* Parallel port options */
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
struct sigaction action; /* Actions for POSIX signals */
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
/*
* Make sure status messages are not buffered...
*/
setbuf(stderr, NULL);
/*
* Ignore SIGPIPE signals...
*/
#ifdef HAVE_SIGSET
sigset(SIGPIPE, SIG_IGN);
#elif defined(HAVE_SIGACTION)
memset(&action, 0, sizeof(action));
action.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &action, NULL);
#else
signal(SIGPIPE, SIG_IGN);
#endif /* HAVE_SIGSET */
/*
* Check command-line...
*/
if (argc == 1)
{
list_devices();
return (CUPS_BACKEND_OK);
}
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
/*
* If we have 7 arguments, print the file named on the command-line.
* Otherwise, send stdin instead...
*/
if (argc == 6)
{
print_fd = 0;
copies = 1;
}
else
{
/*
* Try to open the print file...
*/
if ((print_fd = open(argv[6], O_RDONLY)) < 0)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open print file \"%s\": %s\n"),
argv[6], strerror(errno));
return (CUPS_BACKEND_FAILED);
}
copies = atoi(argv[4]);
}
/*
* Extract the device name and options from the URI...
*/
httpSeparateURI(HTTP_URI_CODING_ALL, cupsBackendDeviceURI(argv),
method, sizeof(method), username, sizeof(username),
hostname, sizeof(hostname), &port,
resource, sizeof(resource));
/*
* See if there are any options...
*/
if ((options = strchr(resource, '?')) != NULL)
{
/*
* Yup, terminate the device name string and move to the first
* character of the options...
*/
*options++ = '\0';
}
/*
* Open the parallel port device...
*/
fputs("STATE: +connecting-to-device\n", stderr);
do
{
#if defined(__linux) || defined(__FreeBSD__)
/*
* The Linux and FreeBSD parallel port drivers currently are broken WRT
* select() and bidirection I/O...
*/
device_fd = open(resource, O_WRONLY | O_EXCL);
use_bc = 0;
#else
if ((device_fd = open(resource, O_RDWR | O_EXCL)) < 0)
{
device_fd = open(resource, O_WRONLY | O_EXCL);
use_bc = 0;
}
else
use_bc = 1;
#endif /* __linux || __FreeBSD__ */
if (device_fd == -1)
{
if (getenv("CLASS") != NULL)
{
/*
* If the CLASS environment variable is set, the job was submitted
* to a class and not to a specific queue. In this case, we want
* to abort immediately so that the job can be requeued on the next
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
/*
* Sleep 5 seconds to keep the job from requeuing too rapidly...
*/
sleep(5);
return (CUPS_BACKEND_FAILED);
}
if (errno == EBUSY)
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 30 seconds...\n"));
sleep(30);
}
else if (errno == ENXIO || errno == EIO || errno == ENOENT)
{
_cupsLangPuts(stderr,
_("INFO: Printer not connected; will retry in 30 "
"seconds...\n"));
sleep(30);
}
else
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
}
}
while (device_fd < 0);
fputs("STATE: -connecting-to-device\n", stderr);
/*
* Set any options provided...
*/
tcgetattr(device_fd, &opts);
opts.c_lflag &= ~(ICANON | ECHO | ISIG); /* Raw mode */
/**** No options supported yet ****/
tcsetattr(device_fd, TCSANOW, &opts);
/*
* Finally, send the print file...
*/
tbytes = 0;
while (copies > 0 && tbytes >= 0)
{
copies --;
if (print_fd != 0)
{
fputs("PAGE: 1 1\n", stderr);
lseek(print_fd, 0, SEEK_SET);
}
tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, side_cb);
if (print_fd != 0 && tbytes >= 0)
_cupsLangPrintf(stderr,
#ifdef HAVE_LONG_LONG
_("INFO: Sent print file, %lld bytes...\n"),
#else
_("INFO: Sent print file, %ld bytes...\n"),
#endif /* HAVE_LONG_LONG */
CUPS_LLCAST tbytes);
}
/*
* Close the socket connection and input file and return...
*/
close(device_fd);
if (print_fd != 0)
close(print_fd);
return (tbytes < 0 ? CUPS_BACKEND_FAILED : CUPS_BACKEND_OK);
}
/*
* 'list_devices()' - List all parallel devices.
*/
static void
list_devices(void)
{
#if defined(__hpux) || defined(__sgi) || defined(__sun)
static char *funky_hex = "0123456789abcdefghijklmnopqrstuvwxyz";
/* Funky hex numbering used for some devices */
#endif /* __hpux || __sgi || __sun */
#ifdef __linux
int i; /* Looping var */
int fd; /* File descriptor */
char device[255], /* Device filename */
basedevice[255], /* Base device filename for ports */
device_id[1024], /* Device ID string */
make_model[1024], /* Make and model */
info[1024], /* Info string */
uri[1024]; /* Device URI */
if (!access("/dev/parallel/", 0))
strcpy(basedevice, "/dev/parallel/");
else if (!access("/dev/printers/", 0))
strcpy(basedevice, "/dev/printers/");
else
strcpy(basedevice, "/dev/lp");
for (i = 0; i < 4; i ++)
{
/*
* Open the port, if available...
*/
sprintf(device, "%s%d", basedevice, i);
if ((fd = open(device, O_RDWR | O_EXCL)) < 0)
fd = open(device, O_WRONLY);
if (fd >= 0)
{
/*
* Now grab the IEEE 1284 device ID string...
*/
snprintf(uri, sizeof(uri), "parallel:%s", device);
if (!backendGetDeviceID(fd, device_id, sizeof(device_id),
make_model, sizeof(make_model),
NULL, uri, sizeof(uri)))
{
snprintf(info, sizeof(info), "%s LPT #%d", make_model, i + 1);
cupsBackendReport("direct", uri, make_model, info, device_id, NULL);
}
else
{
snprintf(info, sizeof(info), "LPT #%d", i + 1);
cupsBackendReport("direct", uri, NULL, info, NULL, NULL);
}
close(fd);
}
}
#elif defined(__sgi)
int i, j, n; /* Looping vars */
char device[255]; /* Device filename */
inventory_t *inv; /* Hardware inventory info */
/*
* IRIX maintains a hardware inventory of most devices...
*/
setinvent();
while ((inv = getinvent()) != NULL)
{
if (inv->inv_class == INV_PARALLEL &&
(inv->inv_type == INV_ONBOARD_PLP ||
inv->inv_type == INV_EPP_ECP_PLP))
{
/*
* Standard parallel port...
*/
puts("direct parallel:/dev/plp \"Unknown\" \"Onboard Parallel Port\"");
}
else if (inv->inv_class == INV_PARALLEL &&
inv->inv_type == INV_EPC_PLP)
{
/*
* EPC parallel port...
*/
printf("direct parallel:/dev/plp%d \"Unknown\" \"Integral EPC parallel port, Ebus slot %d\"\n",
inv->inv_controller, inv->inv_controller);
}
}
endinvent();
/*
* Central Data makes serial and parallel "servers" that can be
* connected in a number of ways. Look for ports...
*/
for (i = 0; i < 10; i ++)
for (j = 0; j < 8; j ++)
for (n = 0; n < 32; n ++)
{
if (i == 8) /* EtherLite */
sprintf(device, "/dev/lpn%d%c", j, funky_hex[n]);
else if (i == 9) /* PCI */
sprintf(device, "/dev/lpp%d%c", j, funky_hex[n]);
else /* SCSI */
sprintf(device, "/dev/lp%d%d%c", i, j, funky_hex[n]);
if (access(device, 0) == 0)
{
if (i == 8)
printf("direct parallel:%s \"Unknown\" \"Central Data EtherLite Parallel Port, ID %d, port %d\"\n",
device, j, n);
else if (i == 9)
printf("direct parallel:%s \"Unknown\" \"Central Data PCI Parallel Port, ID %d, port %d\"\n",
device, j, n);
else
printf("direct parallel:%s \"Unknown\" \"Central Data SCSI Parallel Port, logical bus %d, ID %d, port %d\"\n",
device, i, j, n);
}
}
#elif defined(__sun)
int i, j, n; /* Looping vars */
char device[255]; /* Device filename */
/*
* Standard parallel ports...
*/
for (i = 0; i < 10; i ++)
{
sprintf(device, "/dev/ecpp%d", i);
if (access(device, 0) == 0)
printf("direct parallel:%s \"Unknown\" \"Sun IEEE-1284 Parallel Port #%d\"\n",
device, i + 1);
}
for (i = 0; i < 10; i ++)
{
sprintf(device, "/dev/bpp%d", i);
if (access(device, 0) == 0)
printf("direct parallel:%s \"Unknown\" \"Sun Standard Parallel Port #%d\"\n",
device, i + 1);
}
for (i = 0; i < 3; i ++)
{
sprintf(device, "/dev/lp%d", i);
if (access(device, 0) == 0)
printf("direct parallel:%s \"Unknown\" \"PC Parallel Port #%d\"\n",
device, i + 1);
}
/*
* MAGMA parallel ports...
*/
for (i = 0; i < 40; i ++)
{
sprintf(device, "/dev/pm%02d", i);
if (access(device, 0) == 0)
printf("direct parallel:%s \"Unknown\" \"MAGMA Parallel Board #%d Port #%d\"\n",
device, (i / 10) + 1, (i % 10) + 1);
}
/*
* Central Data parallel ports...
*/
for (i = 0; i < 9; i ++)
for (j = 0; j < 8; j ++)
for (n = 0; n < 32; n ++)
{
if (i == 8) /* EtherLite */
sprintf(device, "/dev/sts/lpN%d%c", j, funky_hex[n]);
else
sprintf(device, "/dev/sts/lp%c%d%c", i + 'C', j,
funky_hex[n]);
if (access(device, 0) == 0)
{
if (i == 8)
printf("direct parallel:%s \"Unknown\" \"Central Data EtherLite Parallel Port, ID %d, port %d\"\n",
device, j, n);
else
printf("direct parallel:%s \"Unknown\" \"Central Data SCSI Parallel Port, logical bus %d, ID %d, port %d\"\n",
device, i, j, n);
}
}
#elif defined(__hpux)
int i, j, n; /* Looping vars */
char device[255]; /* Device filename */
/*
* Standard parallel ports...
*/
if (access("/dev/rlp", 0) == 0)
puts("direct parallel:/dev/rlp \"Unknown\" \"Standard Parallel Port (/dev/rlp)\"");
for (i = 0; i < 7; i ++)
for (j = 0; j < 7; j ++)
{
sprintf(device, "/dev/c%dt%dd0_lp", i, j);
if (access(device, 0) == 0)
printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d,%d\"\n",
device, i, j);
}
/*
* Central Data parallel ports...
*/
for (i = 0; i < 9; i ++)
for (j = 0; j < 8; j ++)
for (n = 0; n < 32; n ++)
{
if (i == 8) /* EtherLite */
sprintf(device, "/dev/lpN%d%c", j, funky_hex[n]);
else
sprintf(device, "/dev/lp%c%d%c", i + 'C', j,
funky_hex[n]);
if (access(device, 0) == 0)
{
if (i == 8)
printf("direct parallel:%s \"Unknown\" \"Central Data EtherLite Parallel Port, ID %d, port %d\"\n",
device, j, n);
else
printf("direct parallel:%s \"Unknown\" \"Central Data SCSI Parallel Port, logical bus %d, ID %d, port %d\"\n",
device, i, j, n);
}
}
#elif defined(__osf__)
int i; /* Looping var */
int fd; /* File descriptor */
char device[255]; /* Device filename */
for (i = 0; i < 3; i ++)
{
sprintf(device, "/dev/lp%d", i);
if ((fd = open(device, O_WRONLY)) >= 0)
{
close(fd);
printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d\"\n", device, i + 1);
}
}
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
int i; /* Looping var */
int fd; /* File descriptor */
char device[255]; /* Device filename */
for (i = 0; i < 3; i ++)
{
sprintf(device, "/dev/lpt%d", i);
if ((fd = open(device, O_WRONLY)) >= 0)
{
close(fd);
printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d (interrupt-driven)\"\n", device, i + 1);
}
sprintf(device, "/dev/lpa%d", i);
if ((fd = open(device, O_WRONLY)) >= 0)
{
close(fd);
printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d (polled)\"\n", device, i + 1);
}
}
#elif defined(_AIX)
int i; /* Looping var */
int fd; /* File descriptor */
char device[255]; /* Device filename */
for (i = 0; i < 8; i ++)
{
sprintf(device, "/dev/lp%d", i);
if ((fd = open(device, O_WRONLY)) >= 0)
{
close(fd);
printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d\"\n", device, i + 1);
}
}
#endif
}
/*
* 'side_cb()' - Handle side-channel requests...
*/
static int /* O - 0 on success, -1 on error */
side_cb(int print_fd, /* I - Print file */
int device_fd, /* I - Device file */
int snmp_fd, /* I - SNMP socket (unused) */
http_addr_t *addr, /* I - Device address (unused) */
int use_bc) /* I - Using back-channel? */
{
cups_sc_command_t command; /* Request command */
cups_sc_status_t status; /* Request/response status */
char data[2048]; /* Request/response data */
int datalen; /* Request/response data size */
(void)snmp_fd;
(void)addr;
datalen = sizeof(data);
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
return (-1);
switch (command)
{
case CUPS_SC_CMD_DRAIN_OUTPUT :
if (backendDrainOutput(print_fd, device_fd))
status = CUPS_SC_STATUS_IO_ERROR;
else if (tcdrain(device_fd))
status = CUPS_SC_STATUS_IO_ERROR;
else
status = CUPS_SC_STATUS_OK;
datalen = 0;
break;
case CUPS_SC_CMD_GET_BIDI :
status = CUPS_SC_STATUS_OK;
data[0] = use_bc;
datalen = 1;
break;
case CUPS_SC_CMD_GET_DEVICE_ID :
memset(data, 0, sizeof(data));
if (backendGetDeviceID(device_fd, data, sizeof(data) - 1,
NULL, 0, NULL, NULL, 0))
{
status = CUPS_SC_STATUS_NOT_IMPLEMENTED;
datalen = 0;
}
else
{
status = CUPS_SC_STATUS_OK;
datalen = strlen(data);
}
break;
default :
status = CUPS_SC_STATUS_NOT_IMPLEMENTED;
datalen = 0;
break;
}
return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
}
/*
* End of "$Id$".
*/
-30
Ver Arquivo
@@ -1,30 +0,0 @@
#!/bin/sh
#
# "$Id$"
#
# Psuedo-backend for CUPS testing purposes.
#
# Copyright 2011 by Apple Inc.
#
# These coded instructions, statements, and computer programs are the
# property of Apple Inc. and are protected by Federal copyright
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
# which should have been included with this file. If this file is
# file is missing or damaged, see the license at "http://www.cups.org/".
#
# This file is subject to the Apple OS-Developed Software exception.
#
if test $# = 0; then
echo 'direct pseudo:///deskjet "HP DeskJet" "HP DeskJet (pseudo)" "MFG:HP;MDL:DeskJet;CMD:PCL;" "Nowhere"'
echo 'direct pseudo:///laserjet "HP LaserJet" "HP LaserJet (pseudo)" "MFG:HP;MDL:LaserJet;CMD:PCL;" "Nowhere"'
exit 0
fi
cat $6 >/dev/null
sleep 5
exit 0
#
# End of "$Id$".
#
+26 -146
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* Common run loop APIs for CUPS backends.
* Common run loop APIs for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 2006-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -18,8 +18,6 @@
*
* 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.
*/
/*
@@ -92,8 +90,7 @@ backendDrainOutput(int print_fd, /* I - Print file descriptor */
if (errno != EAGAIN || errno != EINTR)
{
fprintf(stderr, "DEBUG: Read failed: %s\n", strerror(errno));
_cupsLangPrintFilter(stderr, "ERROR", _("Unable to read print data."));
perror("ERROR: Unable to read print data");
return (-1);
}
@@ -122,7 +119,8 @@ backendDrainOutput(int print_fd, /* I - Print file descriptor */
if (errno != ENOSPC && errno != ENXIO && errno != EAGAIN &&
errno != EINTR && errno != ENOTTY)
{
_cupsLangPrintError("ERROR", _("Unable to write print data"));
_cupsLangPrintf(stderr, _("ERROR: Unable to write print data: %s\n"),
strerror(errno));
return (-1);
}
}
@@ -144,13 +142,13 @@ backendDrainOutput(int print_fd, /* I - Print file descriptor */
ssize_t /* O - Total bytes on success, -1 on error */
backendRunLoop(
int print_fd, /* I - Print file descriptor */
int device_fd, /* I - Device file descriptor */
int snmp_fd, /* I - SNMP socket or -1 if none */
http_addr_t *addr, /* I - Address of device */
int use_bc, /* I - Use back-channel? */
int update_state, /* I - Update printer-state-reasons? */
_cups_sccb_t side_cb) /* I - Side-channel callback */
int print_fd, /* I - Print file descriptor */
int device_fd, /* I - Device file descriptor */
int snmp_fd, /* I - SNMP socket or -1 if none */
http_addr_t *addr, /* I - Address of device */
int use_bc, /* I - Use back-channel? */
int (*side_cb)(int, int, int, http_addr_t *, int))
/* I - Side-channel callback */
{
int nfds; /* Maximum file descriptor value + 1 */
fd_set input, /* Input set for reading */
@@ -247,17 +245,16 @@ backendRunLoop(
* Pause printing to clear any pending errors...
*/
if (errno == ENXIO && offline != 1 && update_state)
if (errno == ENXIO && offline != 1)
{
fputs("STATE: +offline-report\n", stderr);
_cupsLangPrintFilter(stderr, "INFO",
_("The printer is not connected."));
_cupsLangPuts(stderr, _("INFO: Printer is currently offline.\n"));
offline = 1;
}
else if (errno == EINTR && total_bytes == 0)
{
fputs("DEBUG: Received an interrupt before any bytes were "
"written, aborting.\n", stderr);
"written, aborting!\n", stderr);
return (0);
}
@@ -291,7 +288,7 @@ backendRunLoop(
if ((bc_bytes = read(device_fd, bc_buffer, sizeof(bc_buffer))) > 0)
{
fprintf(stderr,
"DEBUG: Received " CUPS_LLFMT " bytes of back-channel data\n",
"DEBUG: Received " CUPS_LLFMT " bytes of back-channel data!\n",
CUPS_LLCAST bc_bytes);
cupsBackChannelWrite(bc_buffer, bc_bytes, 1.0);
}
@@ -301,8 +298,6 @@ backendRunLoop(
strerror(errno));
use_bc = 0;
}
else if (bc_bytes == 0)
use_bc = 0;
}
/*
@@ -320,9 +315,7 @@ backendRunLoop(
if (errno != EAGAIN || errno != EINTR)
{
fprintf(stderr, "DEBUG: Read failed: %s\n", strerror(errno));
_cupsLangPrintFilter(stderr, "ERROR",
_("Unable to read print data."));
perror("ERROR: Unable to read print data");
return (-1);
}
@@ -358,42 +351,41 @@ backendRunLoop(
if (errno == ENOSPC)
{
if (paperout != 1 && update_state)
if (paperout != 1)
{
fputs("STATE: +media-empty-warning\n", stderr);
fputs("DEBUG: Out of paper\n", stderr);
_cupsLangPuts(stderr, _("ERROR: Out of paper!\n"));
paperout = 1;
}
}
else if (errno == ENXIO)
{
if (offline != 1 && update_state)
if (offline != 1)
{
fputs("STATE: +offline-report\n", stderr);
_cupsLangPrintFilter(stderr, "INFO",
_("The printer is not connected."));
_cupsLangPuts(stderr, _("INFO: Printer is currently off-line.\n"));
offline = 1;
}
}
else if (errno != EAGAIN && errno != EINTR && errno != ENOTTY)
{
_cupsLangPrintError("ERROR", _("Unable to write print data"));
fprintf(stderr, _("ERROR: Unable to write print data: %s\n"),
strerror(errno));
return (-1);
}
}
else
{
if (paperout && update_state)
if (paperout)
{
fputs("STATE: -media-empty-warning\n", stderr);
paperout = 0;
}
if (offline && update_state)
if (offline)
{
fputs("STATE: -offline-report\n", stderr);
_cupsLangPrintFilter(stderr, "INFO",
_("The printer is now connected."));
_cupsLangPuts(stderr, _("INFO: Printer is now online.\n"));
offline = 0;
}
@@ -426,118 +418,6 @@ backendRunLoop(
}
/*
* 'backendWaitLoop()' - Wait for input from stdin while handling side-channel
* queries.
*/
int /* O - 1 if data is ready, 0 if not */
backendWaitLoop(
int snmp_fd, /* I - SNMP socket or -1 if none */
http_addr_t *addr, /* I - Address of device */
int use_bc, /* I - Use back-channel? */
_cups_sccb_t side_cb) /* I - Side-channel callback */
{
int nfds; /* Number of file descriptors */
fd_set input; /* Input set for reading */
time_t curtime = 0, /* Current time */
snmp_update = 0;/* Last SNMP status update */
struct timeval timeout; /* Timeout for select() */
fprintf(stderr, "DEBUG: backendWaitLoop(snmp_fd=%d, addr=%p, side_cb=%p)\n",
snmp_fd, addr, side_cb);
/*
* Now loop until we receive data from stdin...
*/
if (snmp_fd >= 0)
snmp_update = time(NULL) + 5;
for (;;)
{
/*
* Use select() to determine whether we have data to copy around...
*/
FD_ZERO(&input);
FD_SET(0, &input);
if (side_cb)
FD_SET(CUPS_SC_FD, &input);
if (snmp_fd >= 0)
{
curtime = time(NULL);
timeout.tv_sec = curtime >= snmp_update ? 0 : snmp_update - curtime;
timeout.tv_usec = 0;
nfds = select(CUPS_SC_FD + 1, &input, NULL, NULL, &timeout);
}
else
nfds = select(CUPS_SC_FD + 1, &input, NULL, NULL, NULL);
if (nfds < 0)
{
/*
* Pause printing to clear any pending errors...
*/
if (errno == EINTR)
{
fputs("DEBUG: Received an interrupt before any bytes were "
"written, aborting.\n", stderr);
return (0);
}
sleep(1);
continue;
}
/*
* Check for input on stdin...
*/
if (FD_ISSET(0, &input))
break;
/*
* Check if we have a side-channel request ready...
*/
if (side_cb && FD_ISSET(CUPS_SC_FD, &input))
{
/*
* Do the side-channel request, then start back over in the select
* loop since it may have read from print_fd...
*/
if ((*side_cb)(0, -1, snmp_fd, addr, use_bc))
side_cb = NULL;
continue;
}
/*
* Do SNMP updates periodically...
*/
if (snmp_fd >= 0 && curtime >= snmp_update)
{
if (backendSNMPSupplies(snmp_fd, addr, NULL, NULL))
snmp_fd = -1;
else
snmp_update = curtime + 5;
}
}
/*
* Return with success...
*/
return (1);
}
/*
* End of "$Id$".
*/
+241
Ver Arquivo
@@ -0,0 +1,241 @@
/*
* "$Id$"
*
* IRIX SCSI printer support for the Common UNIX Printing System (CUPS).
*
* Copyright 2007 by Apple Inc.
* Copyright 2003-2005 by Easy Software Products, all rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the
* following conditions are met:
*
* 1. Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
*
* 2. Redistributions in binary form must reproduce the
* above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use
* of this software must display the following
* acknowledgement:
*
* This product includes software developed by Easy
* Software Products.
*
* 4. The name of Easy Software Products may not be used to
* endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* Contents:
*
* list_devices() - List the available SCSI printer devices.
* print_device() - Print a file to a SCSI device.
*/
/*
* Include necessary headers.
*/
#include <bstring.h> /* memcpy() and friends */
#include <sys/dsreq.h> /* SCSI interface stuff */
/*
* 'list_devices()' - List the available SCSI printer devices.
*/
void
list_devices(void)
{
printf("direct scsi \"Unknown\" \"%s\"\n",
_cupsLangString(cupsLangDefault(), _("SCSI Printer")));
}
/*
* 'print_device()' - Print a file to a SCSI device.
*/
int /* O - Print status */
print_device(const char *resource, /* I - SCSI device */
int fd, /* I - File to print */
int copies) /* I - Number of copies to print */
{
int scsi_fd; /* SCSI file descriptor */
char buffer[8192]; /* Data buffer */
int bytes; /* Number of bytes */
int try; /* Current try */
dsreq_t scsi_req; /* SCSI request */
char scsi_cmd[6]; /* SCSI command data */
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
struct sigaction action; /* Actions for POSIX signals */
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
/*
* Make sure we have a valid resource name...
*/
if (strncmp(resource, "/dev/scsi/", 10) != 0)
{
_cupsLangPrintf(stderr, _("ERROR: Bad SCSI device file \"%s\"!\n"),
resource);
return (CUPS_BACKEND_STOP);
}
/*
* Open the SCSI device file...
*/
fputs("STATE: +connecting-to-device\n", stderr);
do
{
if ((scsi_fd = open(resource, O_RDWR | O_EXCL)) == -1)
{
if (getenv("CLASS") != NULL)
{
/*
* If the CLASS environment variable is set, the job was submitted
* to a class and not to a specific queue. In this case, we want
* to abort immediately so that the job can be requeued on the next
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
/*
* Sleep 5 seconds to keep the job from requeuing too rapidly...
*/
sleep(5);
return (1);
}
if (errno != EAGAIN && errno != EBUSY)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
else
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 30 seconds...\n"));
sleep(30);
}
}
}
while (scsi_fd == -1);
fputs("STATE: -connecting-to-device\n", stderr);
/*
* Now that we are "connected" to the port, ignore SIGTERM so that we
* can finish out any page data the driver sends (e.g. to eject the
* current page... Only ignore SIGTERM if we are printing data from
* stdin (otherwise you can't cancel raw jobs...)
*/
if (fd != 0)
{
#ifdef HAVE_SIGSET /* Use System V signals over POSIX to avoid bugs */
sigset(SIGTERM, SIG_IGN);
#elif defined(HAVE_SIGACTION)
memset(&action, 0, sizeof(action));
sigemptyset(&action.sa_mask);
action.sa_handler = SIG_IGN;
sigaction(SIGTERM, &action, NULL);
#else
signal(SIGTERM, SIG_IGN);
#endif /* HAVE_SIGSET */
}
/*
* Copy the print file to the device...
*/
while (copies > 0)
{
if (fd != 0)
lseek(fd, 0, SEEK_SET);
while ((bytes = read(fd, buffer, sizeof(buffer))) > 0)
{
memset(&scsi_req, 0, sizeof(scsi_req));
scsi_req.ds_flags = DSRQ_WRITE;
scsi_req.ds_time = 60 * 1000;
scsi_req.ds_cmdbuf = scsi_cmd;
scsi_req.ds_cmdlen = 6;
scsi_req.ds_databuf = buffer;
scsi_req.ds_datalen = bytes;
scsi_cmd[0] = 0x0a; /* Group 0 print command */
scsi_cmd[1] = 0x00;
scsi_cmd[2] = bytes / 65536;
scsi_cmd[3] = bytes / 256;
scsi_cmd[4] = bytes;
scsi_cmd[5] = 0x00;
for (try = 0; try < 10; try ++)
if (ioctl(scsi_fd, DS_ENTER, &scsi_req) < 0 ||
scsi_req.ds_status != 0)
{
_cupsLangPrintf(stderr,
_("WARNING: SCSI command timed out (%d); "
"retrying...\n"), scsi_req.ds_status);
sleep(try + 1);
}
else
break;
if (try >= 10)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to send print data (%d)\n"),
scsi_req.ds_status);
close(scsi_fd);
return (CUPS_BACKEND_FAILED);
}
}
copies --;
}
/*
* Close the device and return...
*/
close(fd);
return (CUPS_BACKEND_OK);
}
/*
* End of "$Id$".
*/
+260
Ver Arquivo
@@ -0,0 +1,260 @@
/*
* "$Id$"
*
* Linux SCSI printer support for the Common UNIX Printing System (CUPS).
*
* Copyright 2007 by Apple Inc.
* Copyright 2003-2005 by Easy Software Products, all rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the
* following conditions are met:
*
* 1. Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
*
* 2. Redistributions in binary form must reproduce the
* above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use
* of this software must display the following
* acknowledgement:
*
* This product includes software developed by Easy
* Software Products.
*
* 4. The name of Easy Software Products may not be used to
* endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* Contents:
*
* list_devices() - List the available SCSI printer devices.
* print_device() - Print a file to a SCSI device.
*/
/*
* Include necessary headers.
*/
#include <scsi/sg.h>
#include <cups/i18n.h>
/*
* We currently only support the Linux 2.4 generic SCSI interface.
*/
#ifndef SG_DXFER_TO_DEV
/*
* Dummy functions that do nothing on unsupported platforms...
*/
void list_devices(void) {}
int print_device(const char *resource, int fd, int copies) { return (1); }
#else
/*
* 'list_devices()' - List the available SCSI printer devices.
*/
void
list_devices(void)
{
printf("direct scsi \"Unknown\" \"%s\"\n",
_cupsLangString(cupsLangDefault(), _("SCSI Printer")));
}
/*
* 'print_device()' - Print a file to a SCSI device.
*/
int /* O - Print status */
print_device(const char *resource, /* I - SCSI device */
int fd, /* I - File to print */
int copies) /* I - Number of copies to print */
{
int scsi_fd; /* SCSI file descriptor */
char buffer[8192]; /* Data buffer */
int bytes; /* Number of bytes */
int try; /* Current try */
sg_io_hdr_t scsi_req; /* SCSI request */
unsigned char scsi_cmd[6], /* SCSI command data */
scsi_sense[32]; /* SCSI sense data */
# if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
struct sigaction action; /* Actions for POSIX signals */
# endif /* HAVE_SIGACTION && !HAVE_SIGSET */
/*
* Make sure we have a valid resource name...
*/
if (strncmp(resource, "/dev/sg", 7) != 0)
{
_cupsLangPrintf(stderr, _("ERROR: Bad SCSI device file \"%s\"!\n"),
resource);
return (CUPS_BACKEND_STOP);
}
/*
* Open the SCSI device file...
*/
fputs("STATE: +connecting-to-device\n", stderr);
do
{
if ((scsi_fd = open(resource, O_RDWR | O_EXCL)) == -1)
{
if (getenv("CLASS") != NULL)
{
/*
* If the CLASS environment variable is set, the job was submitted
* to a class and not to a specific queue. In this case, we want
* to abort immediately so that the job can be requeued on the next
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
/*
* Sleep 5 seconds to keep the job from requeuing too rapidly...
*/
sleep(5);
return (CUPS_BACKEND_FAILED);
}
if (errno != EAGAIN && errno != EBUSY)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
else
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 30 seconds...\n"));
sleep(30);
}
}
}
while (scsi_fd == -1);
fputs("STATE: -connecting-to-device\n", stderr);
/*
* Now that we are "connected" to the port, ignore SIGTERM so that we
* can finish out any page data the driver sends (e.g. to eject the
* current page... Only ignore SIGTERM if we are printing data from
* stdin (otherwise you can't cancel raw jobs...)
*/
if (fd != 0)
{
# ifdef HAVE_SIGSET /* Use System V signals over POSIX to avoid bugs */
sigset(SIGTERM, SIG_IGN);
# elif defined(HAVE_SIGACTION)
memset(&action, 0, sizeof(action));
sigemptyset(&action.sa_mask);
action.sa_handler = SIG_IGN;
sigaction(SIGTERM, &action, NULL);
# else
signal(SIGTERM, SIG_IGN);
# endif /* HAVE_SIGSET */
}
/*
* Copy the print file to the device...
*/
while (copies > 0)
{
if (fd != 0)
lseek(fd, 0, SEEK_SET);
while ((bytes = read(fd, buffer, sizeof(buffer))) > 0)
{
memset(&scsi_req, 0, sizeof(scsi_req));
scsi_req.interface_id = 'S';
scsi_req.dxfer_direction = SG_DXFER_TO_DEV;
scsi_req.cmd_len = 6;
scsi_req.mx_sb_len = sizeof(scsi_sense);
scsi_req.iovec_count = 0;
scsi_req.dxfer_len = bytes;
scsi_req.dxferp = buffer;
scsi_req.cmdp = scsi_cmd;
scsi_req.sbp = scsi_sense;
scsi_req.timeout = 60 * 1000;
scsi_cmd[0] = 0x0a; /* Group 0 print command */
scsi_cmd[1] = 0x00;
scsi_cmd[2] = bytes / 65536;
scsi_cmd[3] = bytes / 256;
scsi_cmd[4] = bytes;
scsi_cmd[5] = 0x00;
for (try = 0; try < 10; try ++)
if (ioctl(scsi_fd, SG_IO, &scsi_req) < 0 ||
scsi_req.status != 0)
{
_cupsLangPrintf(stderr,
_("WARNING: SCSI command timed out (%d); "
"retrying...\n"), scsi_req.status);
sleep(try + 1);
}
else
break;
if (try >= 10)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to send print data (%d)\n"),
scsi_req.status);
close(scsi_fd);
return (CUPS_BACKEND_FAILED);
}
}
copies --;
}
/*
* Close the device and return...
*/
close(fd);
return (CUPS_BACKEND_OK);
}
#endif /* !SG_DXFER_TO_DEV */
/*
* End of "$Id$".
*/
+231
Ver Arquivo
@@ -0,0 +1,231 @@
/*
* "$Id$"
*
* SCSI printer backend for the Common UNIX Printing System (CUPS).
*
* Copyright 2007 by Apple Inc.
* Copyright 2003-2006 by Easy Software Products, all rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the
* following conditions are met:
*
* 1. Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
*
* 2. Redistributions in binary form must reproduce the
* above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use
* of this software must display the following
* acknowledgement:
*
* This product includes software developed by Easy
* Software Products.
*
* 4. The name of Easy Software Products may not be used to
* endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* Contents:
*
* main() - Send a file to the specified SCSI printer.
*/
/*
* Include necessary headers.
*/
#include <cups/backend.h>
#include <cups/cups.h>
#include <cups/i18n.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <cups/string.h>
#include <cups/i18n.h>
#include <signal.h>
#ifdef WIN32
# include <io.h>
#else
# include <unistd.h>
# include <fcntl.h>
# ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
# endif /* HAVE_SYS_IOCTL_H */
#endif /* WIN32 */
/*
* Local functions...
*/
void list_devices(void);
int print_device(const char *resource, int fd, int copies);
#if defined(__linux__) && defined(HAVE_SCSI_SG_H)
# include "scsi-linux.c"
#elif defined(__sgi)
# include "scsi-irix.c"
#else
/*
* Dummy functions that do nothing on unsupported platforms...
*/
void list_devices(void) {}
int print_device(const char *resource, int fd, int copies) { return (CUPS_BACKEND_FAILED); }
#endif /* __linux && HAVE_SCSI_SG_H */
/*
* 'main()' - Send a file to the specified SCSI printer.
*
* Usage:
*
* printer-uri job-id user title copies options [file]
*/
int /* O - Exit status */
main(int argc, /* I - Number of command-line arguments (6 or 7) */
char *argv[]) /* I - Command-line arguments */
{
char method[255], /* Method in URI */
hostname[1024], /* Hostname */
username[255], /* Username info (not used) */
resource[1024], /* Resource info (device and options) */
*options; /* Pointer to options */
int port; /* Port number (not used) */
int fp; /* Print file */
int copies; /* Number of copies to print */
int status; /* Exit status */
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
struct sigaction action; /* Actions for POSIX signals */
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
/*
* Make sure status messages are not buffered...
*/
setbuf(stderr, NULL);
/*
* Ignore SIGPIPE signals...
*/
#ifdef HAVE_SIGSET
sigset(SIGPIPE, SIG_IGN);
#elif defined(HAVE_SIGACTION)
memset(&action, 0, sizeof(action));
action.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &action, NULL);
#else
signal(SIGPIPE, SIG_IGN);
#endif /* HAVE_SIGSET */
/*
* Check command-line...
*/
if (argc == 1)
{
list_devices();
return (CUPS_BACKEND_OK);
}
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
/*
* If we have 7 arguments, print the file named on the command-line.
* Otherwise, send stdin instead...
*/
if (argc == 6)
{
fp = 0;
copies = 1;
}
else
{
/*
* Try to open the print file...
*/
if ((fp = open(argv[6], O_RDONLY)) < 0)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open print file \"%s\": %s\n"),
argv[6], strerror(errno));
return (CUPS_BACKEND_FAILED);
}
copies = atoi(argv[4]);
}
/*
* Extract the device name and options from the URI...
*/
httpSeparateURI(HTTP_URI_CODING_ALL, cupsBackendDeviceURI(argv),
method, sizeof(method), username, sizeof(username),
hostname, sizeof(hostname), &port,
resource, sizeof(resource));
/*
* See if there are any options...
*/
if ((options = strchr(resource, '?')) != NULL)
{
/*
* Yup, terminate the device name string and move to the first
* character of the options...
*/
*options++ = '\0';
}
/*
* Finally, send the print file...
*/
status = print_device(resource, fp, copies);
/*
* Close input file and return...
*/
if (fp != 0)
close(fp);
return (status);
}
/*
* End of "$Id$".
*/
+1330
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+59 -249
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* SNMP supplies functions for CUPS.
* SNMP supplies functions for the Common UNIX Printing System (CUPS).
*
* Copyright 2008-2012 by Apple Inc.
* Copyright 2008-2009 by Apple Inc.
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
@@ -36,22 +36,6 @@
#define CUPS_MAX_SUPPLIES 32 /* Maximum number of supplies for a printer */
#define CUPS_SUPPLY_TIMEOUT 2.0 /* Timeout for SNMP lookups */
#define CUPS_DEVELOPER_LOW 0x0001
#define CUPS_DEVELOPER_EMPTY 0x0002
#define CUPS_MARKER_SUPPLY_LOW 0x0004
#define CUPS_MARKER_SUPPLY_EMPTY 0x0008
#define CUPS_OPC_NEAR_EOL 0x0010
#define CUPS_OPC_LIFE_OVER 0x0020
#define CUPS_TONER_LOW 0x0040
#define CUPS_TONER_EMPTY 0x0080
#define CUPS_WASTE_ALMOST_FULL 0x0100
#define CUPS_WASTE_FULL 0x0200
#define CUPS_CLEANER_NEAR_EOL 0x0400 /* Proposed JPS3 */
#define CUPS_CLEANER_LIFE_OVER 0x0800 /* Proposed JPS3 */
#define CUPS_SNMP_NONE 0x0000
#define CUPS_SNMP_CAPACITY 0x0001 /* Supply levels reported as percentages */
/*
* Local structures...
@@ -82,14 +66,10 @@ static http_addr_t current_addr; /* Current address */
static int current_state = -1;
/* Current device state bits */
static int charset = -1; /* Character set for supply names */
static unsigned quirks = CUPS_SNMP_NONE;
/* Quirks we have to work around */
static int num_supplies = 0;
/* Number of supplies found */
static backend_supplies_t supplies[CUPS_MAX_SUPPLIES];
/* Supply information */
static int supply_state = -1;
/* Supply state info */
static const int hrDeviceDescr[] =
{ CUPS_OID_hrDeviceDescr, 1, -1 };
@@ -155,20 +135,13 @@ static const int prtMarkerSuppliesType[] =
(sizeof(prtMarkerSuppliesType) /
sizeof(prtMarkerSuppliesType[0]));
/* Offset to supply index */
static const int prtMarkerSuppliesSupplyUnit[] =
{ CUPS_OID_prtMarkerSuppliesSupplyUnit, -1 },
/* Units OID */
prtMarkerSuppliesSupplyUnitOffset =
(sizeof(prtMarkerSuppliesSupplyUnit) /
sizeof(prtMarkerSuppliesSupplyUnit[0]));
/* Offset to supply index */
static const backend_state_t printer_states[] =
static const backend_state_t const printer_states[] =
{
/* { CUPS_TC_lowPaper, "media-low-report" }, */
{ CUPS_TC_lowPaper, "media-low-report" },
{ CUPS_TC_noPaper | CUPS_TC_inputTrayEmpty, "media-empty-warning" },
/* { CUPS_TC_lowToner, "toner-low-report" }, */ /* now use prtMarkerSupplies */
/* { CUPS_TC_noToner, "toner-empty-warning" }, */ /* now use prtMarkerSupplies */
{ CUPS_TC_lowToner, "toner-low-report" },
{ CUPS_TC_noToner, "toner-empty-warning" },
{ CUPS_TC_doorOpen, "door-open-report" },
{ CUPS_TC_jammed, "media-jam-warning" },
/* { CUPS_TC_offline, "offline-report" }, */ /* unreliable */
@@ -180,22 +153,6 @@ static const backend_state_t printer_states[] =
{ CUPS_TC_outputFull, "output-area-full-warning" }
};
static const backend_state_t supply_states[] =
{
{ CUPS_DEVELOPER_LOW, "developer-low-report" },
{ CUPS_DEVELOPER_EMPTY, "developer-empty-warning" },
{ CUPS_MARKER_SUPPLY_LOW, "marker-supply-low-report" },
{ CUPS_MARKER_SUPPLY_EMPTY, "marker-supply-empty-warning" },
{ CUPS_OPC_NEAR_EOL, "opc-near-eol-report" },
{ CUPS_OPC_LIFE_OVER, "opc-life-over-warning" },
{ CUPS_TONER_LOW, "toner-low-report" },
{ CUPS_TONER_EMPTY, "toner-empty-warning" },
{ CUPS_WASTE_ALMOST_FULL, "waste-receptacle-almost-full-report" },
{ CUPS_WASTE_FULL, "waste-receptacle-full-warning" },
{ CUPS_CLEANER_NEAR_EOL, "cleaner-life-almost-over-report" },
{ CUPS_CLEANER_LIFE_OVER, "cleaner-life-over-warning" },
};
/*
* Local functions...
@@ -234,14 +191,13 @@ backendSNMPSupplies(
if (num_supplies > 0)
{
int i, /* Looping var */
percent, /* Percent full */
new_state, /* New state value */
change_state, /* State change */
new_supply_state = 0; /* Supply state */
change_state; /* State change */
char value[CUPS_MAX_SUPPLIES * 4],
/* marker-levels value string */
*ptr; /* Pointer into value string */
cups_snmp_t packet; /* SNMP response packet */
/*
* Generate the marker-levels value string...
@@ -249,102 +205,17 @@ backendSNMPSupplies(
for (i = 0, ptr = value; i < num_supplies; i ++, ptr += strlen(ptr))
{
if (supplies[i].max_capacity > 0 && supplies[i].level >= 0)
percent = 100 * supplies[i].level / supplies[i].max_capacity;
else if (supplies[i].level >= 0 && supplies[i].level <= 100 &&
(quirks & CUPS_SNMP_CAPACITY))
percent = supplies[i].level;
else
percent = 50;
if (percent <= 5)
{
switch (supplies[i].type)
{
case CUPS_TC_toner :
case CUPS_TC_tonerCartridge :
if (percent <= 1)
new_supply_state |= CUPS_TONER_EMPTY;
else
new_supply_state |= CUPS_TONER_LOW;
break;
case CUPS_TC_ink :
case CUPS_TC_inkCartridge :
case CUPS_TC_inkRibbon :
case CUPS_TC_solidWax :
case CUPS_TC_ribbonWax :
if (percent <= 1)
new_supply_state |= CUPS_MARKER_SUPPLY_EMPTY;
else
new_supply_state |= CUPS_MARKER_SUPPLY_LOW;
break;
case CUPS_TC_developer :
if (percent <= 1)
new_supply_state |= CUPS_DEVELOPER_EMPTY;
else
new_supply_state |= CUPS_DEVELOPER_LOW;
break;
case CUPS_TC_coronaWire :
case CUPS_TC_fuser :
case CUPS_TC_opc :
case CUPS_TC_transferUnit :
if (percent <= 1)
new_supply_state |= CUPS_OPC_LIFE_OVER;
else
new_supply_state |= CUPS_OPC_NEAR_EOL;
break;
case CUPS_TC_wasteInk :
case CUPS_TC_wastePaper :
case CUPS_TC_wasteToner :
case CUPS_TC_wasteWater :
case CUPS_TC_wasteWax :
if (percent <= 1)
new_supply_state |= CUPS_WASTE_FULL;
else
new_supply_state |= CUPS_WASTE_ALMOST_FULL;
break;
case CUPS_TC_cleanerUnit :
case CUPS_TC_fuserCleaningPad :
if (percent <= 1)
new_supply_state |= CUPS_CLEANER_LIFE_OVER;
else
new_supply_state |= CUPS_CLEANER_NEAR_EOL;
break;
}
}
if (i)
*ptr++ = ',';
if ((supplies[i].max_capacity > 0 || (quirks & CUPS_SNMP_CAPACITY)) &&
supplies[i].level >= 0)
snprintf(ptr, sizeof(value) - (ptr - value), "%d", percent);
if (supplies[i].max_capacity > 0)
sprintf(ptr, "%d", 100 * supplies[i].level / supplies[i].max_capacity);
else
strlcpy(ptr, "-1", sizeof(value) - (ptr - value));
strcpy(ptr, "-1");
}
fprintf(stderr, "ATTR: marker-levels=%s\n", value);
if (supply_state < 0)
change_state = 0xffff;
else
change_state = supply_state ^ new_supply_state;
fprintf(stderr, "DEBUG: new_supply_state=%x, change_state=%x\n",
new_supply_state, change_state);
for (i = 0;
i < (int)(sizeof(supply_states) / sizeof(supply_states[0]));
i ++)
if (change_state & supply_states[i].bit)
{
fprintf(stderr, "STATE: %c%s\n",
(new_supply_state & supply_states[i].bit) ? '+' : '-',
supply_states[i].keyword);
}
supply_state = new_supply_state;
/*
* Get the current printer status bits...
*/
@@ -361,8 +232,6 @@ backendSNMPSupplies(
if (packet.object_value.string.num_bytes == 2)
new_state = (packet.object_value.string.bytes[0] << 8) |
packet.object_value.string.bytes[1];
else if (packet.object_value.string.num_bytes == 1)
new_state = (packet.object_value.string.bytes[0] << 8);
else
new_state = 0;
@@ -371,18 +240,13 @@ backendSNMPSupplies(
else
change_state = current_state ^ new_state;
fprintf(stderr, "DEBUG: new_state=%x, change_state=%x\n", new_state,
change_state);
for (i = 0;
i < (int)(sizeof(printer_states) / sizeof(printer_states[0]));
i ++)
if (change_state & printer_states[i].bit)
{
fprintf(stderr, "STATE: %c%s\n",
(new_state & printer_states[i].bit) ? '+' : '-',
(new_state & printer_states[i].bit) ? '+' : '-',
printer_states[i].keyword);
}
current_state = new_state;
@@ -446,7 +310,7 @@ backend_init_supplies(
cachefilename[1024], /* Cache filename */
description[CUPS_SNMP_MAX_STRING],
/* Device description string */
value[CUPS_MAX_SUPPLIES * (CUPS_SNMP_MAX_STRING * 4 + 3)],
value[CUPS_MAX_SUPPLIES * (CUPS_SNMP_MAX_STRING * 2 + 3)],
/* Value string */
*ptr, /* Pointer into value string */
*name_ptr; /* Pointer into name string */
@@ -458,34 +322,34 @@ backend_init_supplies(
"other",
"unknown",
"toner",
"waste-toner",
"wasteToner",
"ink",
"ink-cartridge",
"ink-ribbon",
"waste-ink",
"inkCartridge",
"inkRibbon",
"wasteInk",
"opc",
"developer",
"fuser-oil",
"solid-wax",
"ribbon-wax",
"waste-wax",
"fuserOil",
"solidWax",
"ribbonWax",
"wasteWax",
"fuser",
"corona-wire",
"fuser-oil-wick",
"cleaner-unit",
"fuser-cleaning-pad",
"transfer-unit",
"toner-cartridge",
"fuser-oiler",
"coronaWire",
"fuserOilWick",
"cleanerUnit",
"fuserCleaningPad",
"transferUnit",
"tonerCartridge",
"fuserOiler",
"water",
"waste-water",
"glue-water-additive",
"waste-paper",
"binding-supply",
"banding-supply",
"stitching-wire",
"shrink-wrap",
"paper-wrap",
"wasteWater",
"glueWaterAdditive",
"wastePaper",
"bindingSupply",
"bandingSupply",
"stitchingWire",
"shrinkWrap",
"paperWrap",
"staples",
"inserts",
"covers"
@@ -507,20 +371,14 @@ backend_init_supplies(
* See if we should be getting supply levels via SNMP...
*/
if ((ppd = ppdOpenFile(getenv("PPD"))) == NULL ||
((ppdattr = ppdFindAttr(ppd, "cupsSNMPSupplies", NULL)) != NULL &&
ppdattr->value && _cups_strcasecmp(ppdattr->value, "true")))
if ((ppd = ppdOpenFile(getenv("PPD"))) != NULL &&
(ppdattr = ppdFindAttr(ppd, "cupsSNMPSupplies", NULL)) != NULL &&
ppdattr->value && strcasecmp(ppdattr->value, "true"))
{
ppdClose(ppd);
return;
}
if ((ppdattr = ppdFindAttr(ppd, "cupsSNMPQuirks", NULL)) != NULL)
{
if (!_cups_strcasecmp(ppdattr->value, "capacity"))
quirks |= CUPS_SNMP_CAPACITY;
}
ppdClose(ppd);
/*
@@ -682,7 +540,7 @@ backend_init_supplies(
*/
for (i = 0; i < num_supplies; i ++)
strlcpy(supplies[i].color, "none", sizeof(supplies[i].color));
strcpy(supplies[i].color, "none");
_cupsSNMPWalk(snmp_fd, &current_addr, CUPS_SNMP_VERSION_1,
_cupsSNMPDefaultCommunity(), prtMarkerColorantValue,
@@ -697,14 +555,13 @@ backend_init_supplies(
if (i)
*ptr++ = ',';
strlcpy(ptr, supplies[i].color, sizeof(value) - (ptr - value));
strcpy(ptr, supplies[i].color);
}
fprintf(stderr, "ATTR: marker-colors=%s\n", value);
/*
* Output the marker-names attribute (the double quoting is necessary to deal
* with embedded quotes and commas in the marker names...)
* Output the marker-names attribute...
*/
for (i = 0, ptr = value; i < num_supplies; i ++)
@@ -712,21 +569,15 @@ backend_init_supplies(
if (i)
*ptr++ = ',';
*ptr++ = '\'';
*ptr++ = '\"';
for (name_ptr = supplies[i].name; *name_ptr;)
{
if (*name_ptr == '\\' || *name_ptr == '\"' || *name_ptr == '\'')
{
if (*name_ptr == '\\' || *name_ptr == '\"')
*ptr++ = '\\';
*ptr++ = '\\';
*ptr++ = '\\';
}
*ptr++ = *name_ptr++;
}
*ptr++ = '\"';
*ptr++ = '\'';
}
*ptr = '\0';
@@ -745,9 +596,9 @@ backend_init_supplies(
type = supplies[i].type;
if (type < CUPS_TC_other || type > CUPS_TC_covers)
strlcpy(ptr, "unknown", sizeof(value) - (ptr - value));
strcpy(ptr, "unknown");
else
strlcpy(ptr, types[type - CUPS_TC_other], sizeof(value) - (ptr - value));
strcpy(ptr, types[type - CUPS_TC_other]);
}
fprintf(stderr, "ATTR: marker-types=%s\n", value);
@@ -763,33 +614,16 @@ backend_walk_cb(cups_snmp_t *packet, /* I - SNMP packet */
void *data) /* I - User data (unused) */
{
int i, j, k; /* Looping vars */
static const char * const colors[][2] =
static const char * const colors[8][2] =
{ /* Standard color names */
{ "black", "#000000" },
{ "blue", "#0000FF" },
{ "brown", "#A52A2A" },
{ "cyan", "#00FFFF" },
{ "dark-gray", "#404040" },
{ "dark gray", "#404040" },
{ "dark-yellow", "#FFCC00" },
{ "dark yellow", "#FFCC00" },
{ "gold", "#FFD700" },
{ "gray", "#808080" },
{ "green", "#00FF00" },
{ "light-black", "#606060" },
{ "light black", "#606060" },
{ "light-cyan", "#E0FFFF" },
{ "light cyan", "#E0FFFF" },
{ "light-gray", "#D3D3D3" },
{ "light gray", "#D3D3D3" },
{ "light-magenta", "#FF77FF" },
{ "light magenta", "#FF77FF" },
{ "magenta", "#FF00FF" },
{ "orange", "#FFA500" },
{ "red", "#FF0000" },
{ "silver", "#C0C0C0" },
{ "white", "#FFFFFF" },
{ "yellow", "#FFFF00" }
{ "black", "#000000" },
{ "blue", "#0000FF" },
{ "cyan", "#00FFFF" },
{ "green", "#00FF00" },
{ "magenta", "#FF00FF" },
{ "red", "#FF0000" },
{ "white", "#FFFFFF" },
{ "yellow", "#FFFF00" }
};
@@ -811,10 +645,9 @@ backend_walk_cb(cups_snmp_t *packet, /* I - SNMP packet */
if (supplies[j].colorant == i)
{
for (k = 0; k < (int)(sizeof(colors) / sizeof(colors[0])); k ++)
if (!_cups_strcasecmp(colors[k][0],
(char *)packet->object_value.string.bytes))
if (!strcmp(colors[k][0], (char *)packet->object_value.string.bytes))
{
strlcpy(supplies[j].color, colors[k][1], sizeof(supplies[j].color));
strcpy(supplies[j].color, colors[k][1]);
break;
}
}
@@ -870,7 +703,6 @@ backend_walk_cb(cups_snmp_t *packet, /* I - SNMP packet */
break;
case CUPS_TC_csShiftJIS :
case CUPS_TC_csWindows31J : /* Close enough for our purposes */
cupsCharsetToUTF8((cups_utf8_t *)supplies[i - 1].name,
(char *)packet->object_value.string.bytes,
sizeof(supplies[0].name), CUPS_JIS_X0213);
@@ -903,6 +735,7 @@ backend_walk_cb(cups_snmp_t *packet, /* I - SNMP packet */
{
char *src, *dst; /* Pointers into strings */
/*
* Loop safe because both the object_value and supplies char arrays
* are CUPS_SNMP_MAX_STRING elements long.
@@ -947,8 +780,7 @@ backend_walk_cb(cups_snmp_t *packet, /* I - SNMP packet */
supplies[i - 1].level = packet->object_value.integer;
}
else if (_cupsSNMPIsOIDPrefixed(packet, prtMarkerSuppliesMaxCapacity) &&
!(quirks & CUPS_SNMP_CAPACITY))
else if (_cupsSNMPIsOIDPrefixed(packet, prtMarkerSuppliesMaxCapacity))
{
/*
* Get max capacity...
@@ -965,9 +797,7 @@ backend_walk_cb(cups_snmp_t *packet, /* I - SNMP packet */
if (i > num_supplies)
num_supplies = i;
if (supplies[i - 1].max_capacity == 0 &&
packet->object_value.integer > 0)
supplies[i - 1].max_capacity = packet->object_value.integer;
supplies[i - 1].max_capacity = packet->object_value.integer;
}
else if (_cupsSNMPIsOIDPrefixed(packet, prtMarkerSuppliesType))
{
@@ -988,26 +818,6 @@ backend_walk_cb(cups_snmp_t *packet, /* I - SNMP packet */
supplies[i - 1].type = packet->object_value.integer;
}
else if (_cupsSNMPIsOIDPrefixed(packet, prtMarkerSuppliesSupplyUnit))
{
/*
* Get units for capacity...
*/
i = packet->object_name[prtMarkerSuppliesSupplyUnitOffset];
if (i < 1 || i > CUPS_MAX_SUPPLIES ||
packet->object_type != CUPS_ASN1_INTEGER)
return;
fprintf(stderr, "DEBUG2: prtMarkerSuppliesSupplyUnit.1.%d = %d\n", i,
packet->object_value.integer);
if (i > num_supplies)
num_supplies = i;
if (packet->object_value.integer == CUPS_TC_percent)
supplies[i - 1].max_capacity = 100;
}
}
+49 -105
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* SNMP discovery backend for CUPS.
* SNMP discovery backend for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 2006-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -140,6 +140,13 @@ typedef struct snmp_cache_s /**** SNMP scan cache ****/
} snmp_cache_t;
/*
* Private CUPS API to set the last error...
*/
extern void _cupsSetError(ipp_status_t status, const char *message);
/*
* Local functions...
*/
@@ -164,7 +171,7 @@ static void probe_device(snmp_cache_t *device);
static void read_snmp_conf(const char *address);
static void read_snmp_response(int fd);
static double run_time(void);
static void scan_devices(int ipv4, int ipv6);
static void scan_devices(int fd);
static int try_connect(http_addr_t *addr, const char *addrname,
int port);
static void update_cache(snmp_cache_t *device, const char *uri,
@@ -202,8 +209,7 @@ int /* O - Exit status */
main(int argc, /* I - Number of command-line arguments (6 or 7) */
char *argv[]) /* I - Command-line arguments */
{
int ipv4, /* SNMP IPv4 socket */
ipv6; /* SNMP IPv6 socket */
int fd; /* SNMP socket */
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
struct sigaction action; /* Actions for POSIX signals */
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
@@ -215,7 +221,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if (argc > 2)
{
_cupsLangPuts(stderr, _("Usage: snmp [host-or-ip-address]"));
fputs(_("Usage: snmp [host-or-ip-address]\n"), stderr);
return (1);
}
@@ -246,16 +252,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Open the SNMP socket...
*/
if ((ipv4 = _cupsSNMPOpen(AF_INET)) < 0)
if ((fd = _cupsSNMPOpen(AF_INET)) < 0)
return (1);
#ifdef AF_INET6
if ((ipv6 = _cupsSNMPOpen(AF_INET6)) < 0)
perror("DEBUG: Unable to create IPv6 socket");
#else
ipv6 = -1;
#endif /* AF_INET6 */
/*
* Read the configuration file and any cache data...
*/
@@ -270,15 +269,13 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Scan for devices...
*/
scan_devices(ipv4, ipv6);
scan_devices(fd);
/*
* Close, free, and return with no errors...
*/
_cupsSNMPClose(ipv4);
if (ipv6 >= 0)
_cupsSNMPClose(ipv6);
_cupsSNMPClose(fd);
free_array(Addresses);
free_array(Communities);
@@ -467,7 +464,7 @@ static int /* O - Result of comparison */
compare_cache(snmp_cache_t *a, /* I - First cache entry */
snmp_cache_t *b) /* I - Second cache entry */
{
return (_cups_strcasecmp(a->addrname, b->addrname));
return (strcasecmp(a->addrname, b->addrname));
}
@@ -509,7 +506,7 @@ fix_make_model(
* that printer driver detection works better...
*/
if (!_cups_strncasecmp(old_make_model, "Hewlett-Packard", 15))
if (!strncasecmp(old_make_model, "Hewlett-Packard", 15))
{
/*
* Strip leading Hewlett-Packard and hp prefixes and replace
@@ -521,7 +518,7 @@ fix_make_model(
while (isspace(*mmptr & 255))
mmptr ++;
if (!_cups_strncasecmp(mmptr, "hp", 2))
if (!strncasecmp(mmptr, "hp", 2))
{
mmptr += 2;
@@ -534,11 +531,11 @@ fix_make_model(
make_model[2] = ' ';
strlcpy(make_model + 3, mmptr, make_model_size - 3);
}
else if (!_cups_strncasecmp(old_make_model, "deskjet", 7))
else if (!strncasecmp(old_make_model, "deskjet", 7))
snprintf(make_model, make_model_size, "HP DeskJet%s", old_make_model + 7);
else if (!_cups_strncasecmp(old_make_model, "officejet", 9))
else if (!strncasecmp(old_make_model, "officejet", 9))
snprintf(make_model, make_model_size, "HP OfficeJet%s", old_make_model + 9);
else if (!_cups_strncasecmp(old_make_model, "stylus_pro_", 11))
else if (!strncasecmp(old_make_model, "stylus_pro_", 11))
snprintf(make_model, make_model_size, "EPSON Stylus Pro %s",
old_make_model + 11);
else
@@ -718,7 +715,7 @@ probe_device(snmp_cache_t *device) /* I - Device */
#ifdef __APPLE__
/*
* If the printer supports Bonjour/mDNS, don't report it from the SNMP backend.
* TODO: Try an mDNS query first, and then fallback on direct probes...
*/
if (!try_connect(&(device->address), device->addrname, 5353))
@@ -844,16 +841,16 @@ read_snmp_conf(const char *address) /* I - Single address to probe */
if (!value)
fprintf(stderr, "ERROR: Missing value on line %d of %s!\n", linenum,
filename);
else if (!_cups_strcasecmp(line, "Address"))
else if (!strcasecmp(line, "Address"))
{
if (!address)
add_array(Addresses, value);
}
else if (!_cups_strcasecmp(line, "Community"))
else if (!strcasecmp(line, "Community"))
add_array(Communities, value);
else if (!_cups_strcasecmp(line, "DebugLevel"))
else if (!strcasecmp(line, "DebugLevel"))
DebugLevel = atoi(value);
else if (!_cups_strcasecmp(line, "DeviceURI"))
else if (!strcasecmp(line, "DeviceURI"))
{
if (*value != '\"')
fprintf(stderr,
@@ -862,12 +859,12 @@ read_snmp_conf(const char *address) /* I - Single address to probe */
else
add_device_uri(value);
}
else if (!_cups_strcasecmp(line, "HostNameLookups"))
HostNameLookups = !_cups_strcasecmp(value, "on") ||
!_cups_strcasecmp(value, "yes") ||
!_cups_strcasecmp(value, "true") ||
!_cups_strcasecmp(value, "double");
else if (!_cups_strcasecmp(line, "MaxRunTime"))
else if (!strcasecmp(line, "HostNameLookups"))
HostNameLookups = !strcasecmp(value, "on") ||
!strcasecmp(value, "yes") ||
!strcasecmp(value, "true") ||
!strcasecmp(value, "double");
else if (!strcasecmp(line, "MaxRunTime"))
MaxRunTime = atoi(value);
else
fprintf(stderr, "ERROR: Unknown directive %s on line %d of %s!\n",
@@ -948,7 +945,7 @@ read_snmp_response(int fd) /* I - SNMP socket file descriptor */
debug_printf("DEBUG: request-id=%d\n", packet.request_id);
debug_printf("DEBUG: error-status=%d\n", packet.error_status);
if (packet.error_status && packet.request_id != DEVICE_TYPE)
if (packet.error_status)
return;
/*
@@ -1002,7 +999,7 @@ read_snmp_response(int fd) /* I - SNMP socket file descriptor */
DEVICE_PRODUCT, LexmarkProductOID2);
_cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1,
packet.community, CUPS_ASN1_GET_REQUEST,
DEVICE_ID, LexmarkDeviceIdOID);
DEVICE_URI, LexmarkDeviceIdOID);
_cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1,
packet.community, CUPS_ASN1_GET_REQUEST,
DEVICE_PRODUCT, XeroxProductOID);
@@ -1025,11 +1022,6 @@ read_snmp_response(int fd) /* I - SNMP socket file descriptor */
* Description is the IEEE-1284 device ID...
*/
char *ptr; /* Pointer into device ID */
for (ptr = (char *)packet.object_value.string.bytes; *ptr; ptr ++)
if (*ptr == '\n')
*ptr = ';'; /* A lot of bad printers put a newline */
if (!device->id)
device->id = strdup((char *)packet.object_value.string.bytes);
@@ -1062,20 +1054,15 @@ read_snmp_response(int fd) /* I - SNMP socket file descriptor */
break;
case DEVICE_ID :
if (device && packet.object_type == CUPS_ASN1_OCTET_STRING &&
(!device->id ||
strlen(device->id) < packet.object_value.string.num_bytes))
if (device && packet.object_type == CUPS_ASN1_OCTET_STRING)
{
/*
* Update an existing cache entry...
*/
char make_model[256]; /* Make and model */
char *ptr; /* Pointer into device ID */
for (ptr = (char *)packet.object_value.string.bytes; *ptr; ptr ++)
if (*ptr == '\n')
*ptr = ';'; /* A lot of bad printers put a newline */
if (device->id)
free(device->id);
@@ -1120,18 +1107,12 @@ read_snmp_response(int fd) /* I - SNMP socket file descriptor */
case DEVICE_URI :
if (device && packet.object_type == CUPS_ASN1_OCTET_STRING &&
!device->uri && packet.object_value.string.num_bytes > 3)
!device->uri)
{
/*
* Update an existing cache entry...
*/
char scheme[32], /* URI scheme */
userpass[256], /* Username:password in URI */
hostname[256], /* Hostname in URI */
resource[1024]; /* Resource path in URI */
int port; /* Port number in URI */
if (!strncmp((char *)packet.object_value.string.bytes, "lpr:", 4))
{
/*
@@ -1141,13 +1122,7 @@ read_snmp_response(int fd) /* I - SNMP socket file descriptor */
packet.object_value.string.bytes[2] = 'd';
}
if (httpSeparateURI(HTTP_URI_CODING_ALL,
(char *)packet.object_value.string.bytes,
scheme, sizeof(scheme),
userpass, sizeof(userpass),
hostname, sizeof(hostname), &port,
resource, sizeof(resource)) >= HTTP_URI_OK)
device->uri = strdup((char *)packet.object_value.string.bytes);
device->uri = strdup((char *)packet.object_value.string.bytes);
}
break;
}
@@ -1176,11 +1151,8 @@ run_time(void)
*/
static void
scan_devices(int ipv4, /* I - SNMP IPv4 socket */
int ipv6) /* I - SNMP IPv6 socket */
scan_devices(int fd) /* I - SNMP socket */
{
int fd, /* File descriptor for this address */
busy; /* Are we busy processing something? */
char *address, /* Current address */
*community; /* Current community */
fd_set input; /* Input set for select() */
@@ -1189,7 +1161,6 @@ scan_devices(int ipv4, /* I - SNMP IPv4 socket */
http_addrlist_t *addrs, /* List of addresses */
*addr; /* Current address */
snmp_cache_t *device; /* Current device */
char temp[1024]; /* Temporary address string */
gettimeofday(&StartTime, NULL);
@@ -1208,6 +1179,7 @@ scan_devices(int ipv4, /* I - SNMP IPv4 socket */
{
char ifname[255]; /* Interface name */
strlcpy(ifname, address + 4, sizeof(ifname));
if (ifname[0])
ifname[strlen(ifname) - 1] = '\0';
@@ -1215,7 +1187,7 @@ scan_devices(int ipv4, /* I - SNMP IPv4 socket */
addrs = get_interface_addresses(ifname);
}
else
addrs = httpAddrGetList(address, AF_UNSPEC, NULL);
addrs = httpAddrGetList(address, AF_INET, NULL);
if (!addrs)
{
@@ -1231,20 +1203,8 @@ scan_devices(int ipv4, /* I - SNMP IPv4 socket */
community, address);
for (addr = addrs; addr; addr = addr->next)
{
#ifdef AF_INET6
if (_httpAddrFamily(&(addr->addr)) == AF_INET6)
fd = ipv6;
else
#endif /* AF_INET6 */
fd = ipv4;
debug_printf("DEBUG: Sending get request to %s...\n",
httpAddrString(&(addr->addr), temp, sizeof(temp)));
_cupsSNMPWrite(fd, &(addr->addr), CUPS_SNMP_VERSION_1, community,
CUPS_ASN1_GET_REQUEST, DEVICE_TYPE, DeviceTypeOID);
}
}
httpAddrFreeList(addrs);
@@ -1263,33 +1223,17 @@ scan_devices(int ipv4, /* I - SNMP IPv4 socket */
timeout.tv_sec = 2;
timeout.tv_usec = 0;
FD_SET(ipv4, &input);
if (ipv6 >= 0)
FD_SET(ipv6, &input);
fd = ipv4 > ipv6 ? ipv4 : ipv6;
FD_SET(fd, &input);
if (select(fd + 1, &input, NULL, NULL, &timeout) < 0)
{
fprintf(stderr, "ERROR: %.3f select() for %d/%d failed: %s\n", run_time(),
ipv4, ipv6, strerror(errno));
fprintf(stderr, "ERROR: %.3f select() for %d failed: %s\n", run_time(),
fd, strerror(errno));
break;
}
busy = 0;
if (FD_ISSET(ipv4, &input))
{
read_snmp_response(ipv4);
busy = 1;
}
if (ipv6 >= 0 && FD_ISSET(ipv6, &input))
{
read_snmp_response(ipv6);
busy = 1;
}
if (!busy)
if (FD_ISSET(fd, &input))
read_snmp_response(fd);
else
{
/*
* List devices with complete information...
@@ -1335,14 +1279,14 @@ 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(AF_INET, SOCK_STREAM, 0)) < 0)
{
fprintf(stderr, "ERROR: Unable to create socket: %s\n",
strerror(errno));
return (-1);
}
_httpAddrSetPort(addr, port);
addr->ipv4.sin_port = htons(port);
alarm(1);
+104 -119
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* AppSocket backend for CUPS.
* AppSocket backend for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -72,7 +72,10 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
sep; /* Option separator */
int print_fd; /* Print file */
int copies; /* Number of copies to print */
time_t start_time; /* Time of first connect */
time_t start_time, /* Time of first connect */
current_time, /* Current time */
wait_time; /* Time to wait before shutting down socket */
int recoverable; /* Recoverable error shown? */
int contimeout; /* Connection timeout */
int waiteof; /* Wait for end-of-file? */
int port; /* Port number */
@@ -83,14 +86,11 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
http_addrlist_t *addrlist, /* Address list */
*addr; /* Connected address */
char addrname[256]; /* Address name */
int snmp_enabled = 1; /* Is SNMP enabled? */
int snmp_fd, /* SNMP socket */
start_count, /* Page count via SNMP at start */
page_count, /* Page count via SNMP */
have_supplies; /* Printer supports supply levels? */
ssize_t bytes = 0, /* Initial bytes read */
tbytes; /* Total number of bytes written */
char buffer[1024]; /* Initial print buffer */
ssize_t tbytes; /* Total number of bytes written */
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
struct sigaction action; /* Actions for POSIX signals */
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
@@ -129,7 +129,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]"),
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
@@ -152,7 +152,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if ((print_fd = open(argv[6], O_RDONLY)) < 0)
{
_cupsLangPrintError("ERROR", _("Unable to open print file"));
_cupsLangPrintf(stderr,
_("ERROR: Unable to open print file \"%s\": %s\n"),
argv[6], strerror(errno));
return (CUPS_BACKEND_FAILED);
}
@@ -163,14 +165,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Extract the hostname and port number from the URI...
*/
while ((device_uri = cupsBackendDeviceURI(argv)) == NULL)
{
_cupsLangPrintFilter(stderr, "INFO", _("Unable to locate printer."));
sleep(10);
if (getenv("CLASS") != NULL)
return (CUPS_BACKEND_FAILED);
}
if ((device_uri = cupsBackendDeviceURI(argv)) == NULL)
return (CUPS_BACKEND_FAILED);
httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, scheme, sizeof(scheme),
username, sizeof(username), hostname, sizeof(hostname), &port,
@@ -234,26 +230,16 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Process the option...
*/
if (!_cups_strcasecmp(name, "waiteof"))
if (!strcasecmp(name, "waiteof"))
{
/*
* Set the wait-for-eof value...
*/
waiteof = !value[0] || !_cups_strcasecmp(value, "on") ||
!_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "true");
waiteof = !value[0] || !strcasecmp(value, "on") ||
!strcasecmp(value, "yes") || !strcasecmp(value, "true");
}
else if (!_cups_strcasecmp(name, "snmp"))
{
/*
* Enable/disable SNMP stuff...
*/
snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") ||
_cups_strcasecmp(value, "yes") ||
_cups_strcasecmp(value, "true");
}
else if (!_cups_strcasecmp(name, "contimeout"))
else if (!strcasecmp(name, "contimeout"))
{
/*
* Set the connection timeout...
@@ -266,62 +252,26 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
/*
* Then try finding the remote host...
* Then try to connect to the remote host...
*/
start_time = time(NULL);
recoverable = 0;
start_time = time(NULL);
sprintf(portname, "%d", port);
fputs("STATE: +connecting-to-device\n", stderr);
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
while ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
{
_cupsLangPrintFilter(stderr, "INFO",
_("Unable to locate printer \"%s\"."), hostname);
sleep(10);
if (getenv("CLASS") != NULL)
{
fputs("STATE: -connecting-to-device\n", stderr);
return (CUPS_BACKEND_STOP);
}
_cupsLangPrintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"),
hostname);
return (CUPS_BACKEND_STOP);
}
/*
* See if the printer supports SNMP...
*/
if (snmp_enabled)
snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family);
else
snmp_fd = -1;
if (snmp_fd >= 0)
have_supplies = !backendSNMPSupplies(snmp_fd, &(addrlist->addr),
&start_count, NULL);
else
have_supplies = start_count = 0;
/*
* Wait for data from the filter...
*/
if (print_fd == 0)
{
if (!backendWaitLoop(snmp_fd, &(addrlist->addr), 1, backendNetworkSideCB))
return (CUPS_BACKEND_OK);
else if ((bytes = read(0, buffer, sizeof(buffer))) <= 0)
return (CUPS_BACKEND_OK);
}
/*
* Connect to the printer...
*/
fprintf(stderr, "DEBUG: Connecting to %s:%d\n", hostname, port);
_cupsLangPrintFilter(stderr, "INFO", _("Connecting to printer."));
_cupsLangPuts(stderr, _("INFO: Connecting to printer...\n"));
for (delay = 5;;)
{
@@ -339,9 +289,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* available printer in the class.
*/
_cupsLangPrintFilter(stderr, "INFO",
_("Unable to contact printer, queuing on next "
"printer in class."));
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
/*
* Sleep 5 seconds to keep the job from requeuing too rapidly...
@@ -352,38 +302,21 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
return (CUPS_BACKEND_FAILED);
}
fprintf(stderr, "DEBUG: Connection error: %s\n", strerror(error));
if (error == ECONNREFUSED || error == EHOSTDOWN ||
error == EHOSTUNREACH)
{
if (contimeout && (time(NULL) - start_time) > contimeout)
{
_cupsLangPrintFilter(stderr, "ERROR",
_("The printer is not responding."));
_cupsLangPuts(stderr, _("ERROR: Printer not responding!\n"));
return (CUPS_BACKEND_FAILED);
}
switch (error)
{
case EHOSTDOWN :
_cupsLangPrintFilter(stderr, "WARNING",
_("The printer may not exist or "
"is unavailable at this time."));
break;
recoverable = 1;
case EHOSTUNREACH :
_cupsLangPrintFilter(stderr, "WARNING",
_("The printer is unreachable at this "
"time."));
break;
case ECONNREFUSED :
default :
_cupsLangPrintFilter(stderr, "WARNING",
_("The printer is in use."));
break;
}
_cupsLangPrintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; "
"will retry in %d seconds...\n"),
hostname, delay);
sleep(delay);
@@ -392,8 +325,13 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
else
{
_cupsLangPrintFilter(stderr, "ERROR",
_("The printer is not responding."));
recoverable = 1;
_cupsLangPrintf(stderr, "DEBUG: Connection error: %s\n",
strerror(errno));
_cupsLangPuts(stderr,
_("ERROR: recoverable: Unable to connect to printer; "
"will retry in 30 seconds...\n"));
sleep(30);
}
}
@@ -401,12 +339,43 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
break;
}
fputs("STATE: -connecting-to-device\n", stderr);
_cupsLangPrintFilter(stderr, "INFO", _("Connected to printer."));
if (recoverable)
{
/*
* If we've shown a recoverable error make sure the printer proxies have a
* chance to see the recovered message. Not pretty but necessary for now...
*/
fprintf(stderr, "DEBUG: Connected to %s:%d...\n",
httpAddrString(&(addr->addr), addrname, sizeof(addrname)),
httpAddrPort(&(addr->addr)));
fputs("INFO: recovered: \n", stderr);
sleep(5);
}
fputs("STATE: -connecting-to-device\n", stderr);
_cupsLangPuts(stderr, _("INFO: Connected to printer...\n"));
#ifdef AF_INET6
if (addr->addr.addr.sa_family == AF_INET6)
fprintf(stderr, "DEBUG: Connected to [%s]:%d (IPv6)...\n",
httpAddrString(&addr->addr, addrname, sizeof(addrname)),
ntohs(addr->addr.ipv6.sin6_port));
else
#endif /* AF_INET6 */
if (addr->addr.addr.sa_family == AF_INET)
fprintf(stderr, "DEBUG: Connected to %s:%d (IPv4)...\n",
httpAddrString(&addr->addr, addrname, sizeof(addrname)),
ntohs(addr->addr.ipv4.sin_port));
/*
* See if the printer supports SNMP...
*/
if ((snmp_fd = _cupsSNMPOpen(addr->addr.addr.sa_family)) >= 0)
{
have_supplies = !backendSNMPSupplies(snmp_fd, &(addr->addr), &start_count,
NULL);
}
else
have_supplies = start_count = 0;
/*
* Print everything...
@@ -414,9 +383,6 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
tbytes = 0;
if (bytes > 0)
tbytes += write(device_fd, buffer, bytes);
while (copies > 0 && tbytes >= 0)
{
copies --;
@@ -427,20 +393,36 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
lseek(print_fd, 0, SEEK_SET);
}
tbytes = backendRunLoop(print_fd, device_fd, snmp_fd, &(addrlist->addr), 1,
0, backendNetworkSideCB);
tbytes = backendRunLoop(print_fd, device_fd, snmp_fd, &(addr->addr), 1,
backendNetworkSideCB);
if (print_fd != 0 && tbytes >= 0)
_cupsLangPrintFilter(stderr, "INFO", _("Print file sent."));
_cupsLangPrintf(stderr,
#ifdef HAVE_LONG_LONG
_("INFO: Sent print file, %lld bytes...\n"),
#else
_("INFO: Sent print file, %ld bytes...\n"),
#endif /* HAVE_LONG_LONG */
CUPS_LLCAST tbytes);
}
/*
* Wait up to 5 seconds to get any pending back-channel data...
*/
wait_time = time(NULL) + 5;
while (wait_time >= time(&current_time))
if (wait_bc(device_fd, wait_time - current_time) <= 0)
break;
if (waiteof)
{
/*
* Shutdown the socket and wait for the other end to finish...
*/
_cupsLangPrintFilter(stderr, "INFO", _("Waiting for printer to finish."));
_cupsLangPuts(stderr,
_("INFO: Print file sent, waiting for printer to finish...\n"));
shutdown(device_fd, 1);
@@ -451,8 +433,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Collect the final page count as needed...
*/
if (have_supplies &&
!backendSNMPSupplies(snmp_fd, &(addrlist->addr), &page_count, NULL) &&
if (have_supplies &&
!backendSNMPSupplies(snmp_fd, &(addr->addr), &page_count, NULL) &&
page_count > start_count)
fprintf(stderr, "PAGE: total %d\n", page_count - start_count);
@@ -471,7 +453,10 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if (print_fd != 0)
close(print_fd);
return (CUPS_BACKEND_OK);
if (tbytes >= 0)
_cupsLangPuts(stderr, _("INFO: Ready to print.\n"));
return (tbytes < 0 ? CUPS_BACKEND_FAILED : CUPS_BACKEND_OK);
}
@@ -507,7 +492,7 @@ wait_bc(int device_fd, /* I - Socket */
if ((bytes = read(device_fd, buffer, sizeof(buffer))) > 0)
{
fprintf(stderr, "DEBUG: Received %d bytes of back-channel data\n",
fprintf(stderr, "DEBUG: Received %d bytes of back-channel data!\n",
(int)bytes);
cupsBackChannelWrite(buffer, bytes, 1.0);
}
+6 -3
Ver Arquivo
@@ -1,9 +1,10 @@
/*
* "$Id$"
*
* IEEE-1284 support functions test program for CUPS.
* IEEE-1284 support functions test program for the Common UNIX Printing
* System (CUPS).
*
* Copyright 2007-2010 by Apple Inc.
* Copyright 2007 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -23,7 +24,9 @@
* Include necessary headers.
*/
#include <cups/string-private.h>
#include <cups/string.h>
#include <stdlib.h>
#include <errno.h>
#ifdef WIN32
# include <io.h>
#else
+17 -51
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* Backend test program for CUPS.
* Backend test program for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2005 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -26,11 +26,14 @@
* Include necessary headers.
*/
#include <cups/string-private.h>
#include <stdio.h>
#include <stdlib.h>
#include <cups/string.h>
#include <cups/cups.h>
#include <cups/sidechannel.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>
#include <signal.h>
@@ -47,7 +50,7 @@ static int job_canceled = 0;
*/
static void sigterm_handler(int sig);
static void usage(void) __attribute__((noreturn));
static void usage(void);
static void walk_cb(const char *oid, const char *data, int datalen,
void *context);
@@ -57,7 +60,7 @@ static void walk_cb(const char *oid, const char *data, int datalen,
*
* Usage:
*
* testbackend [-s] [-t] device-uri job-id user title copies options [file]
* betest [-s] [-t] device-uri job-id user title copies options [file]
*/
int /* O - Exit status */
@@ -75,9 +78,7 @@ main(int argc, /* I - Number of command-line args */
const char *oid = ".1.3.6.1.2.1.43.10.2.1.4.1.1";
/* OID to lookup or walk */
char scheme[255], /* Scheme in URI == backend */
backend[1024], /* Backend path */
libpath[1024], /* Path for libcups */
*ptr; /* Pointer into path */
backend[1024]; /* Backend path */
const char *serverbin; /* CUPS_SERVERBIN environment variable */
int fd, /* Temporary file descriptor */
back_fds[2], /* Back-channel pipe */
@@ -89,29 +90,6 @@ main(int argc, /* I - Number of command-line args */
status; /* Exit status */
/*
* Get the current directory and point the run-time linker at the "cups"
* subdirectory...
*/
if (getcwd(libpath, sizeof(libpath)) &&
(ptr = strrchr(libpath, '/')) != NULL && !strcmp(ptr, "/backend"))
{
strlcpy(ptr, "/cups", sizeof(libpath) - (ptr - libpath));
if (!access(libpath, 0))
{
#ifdef __APPLE__
fprintf(stderr, "Setting DYLD_LIBRARY_PATH to \"%s\".\n", libpath);
setenv("DYLD_LIBRARY_PATH", libpath, 1);
#else
fprintf(stderr, "Setting LD_LIBRARY_PATH to \"%s\".\n", libpath);
setenv("LD_LIBRARY_PATH", libpath, 1);
#endif /* __APPLE__ */
}
else
perror(libpath);
}
/*
* See if we have side-channel tests to do...
*/
@@ -573,13 +551,13 @@ main(int argc, /* I - Number of command-line args */
length = sizeof(buffer);
scstatus = cupsSideChannelSNMPGet(oid, buffer, &length, 5.0);
printf("CUPS_SC_CMD_SNMP_GET %s returned %s, %d bytes (%s)\n", oid,
statuses[scstatus], (int)length, buffer);
printf("CUPS_SC_CMD_SNMP_GET %s returned %s, %s\n", oid,
statuses[scstatus], buffer);
length = sizeof(buffer);
scstatus = cupsSideChannelSNMPGet(oid, buffer, &length, 5.0);
printf("CUPS_SC_CMD_SNMP_GET %s returned %s, %d bytes (%s)\n", oid,
statuses[scstatus], (int)length, buffer);
printf("CUPS_SC_CMD_SNMP_GET %s returned %s, %s\n", oid,
statuses[scstatus], buffer);
}
length = 0;
@@ -594,7 +572,7 @@ main(int argc, /* I - Number of command-line args */
kill(data_pid, SIGTERM);
kill(back_pid, SIGTERM);
}
while ((pid = wait(&status)) > 0)
{
if (status)
@@ -638,13 +616,13 @@ sigterm_handler(int sig) /* I - Signal */
static void
usage(void)
{
puts("Usage: testbackend [-cancel] [-d] [-ps | -pcl] [-s [-get OID] "
puts("Usage: testbackend [-cancel] [-d] [-ps | -pcl] [-s [-oid OID] "
"[-walk OID]] [-t] device-uri job-id user title copies options [file]");
puts("");
puts("Options:");
puts(" -cancel Simulate a canceled print job after 2 seconds.");
puts(" -d Show log messages from backend.");
puts(" -get OID Lookup the specified SNMP OID.");
puts(" -oid OID Lookup the specified SNMP OID.");
puts(" (.1.3.6.1.2.1.43.10.2.1.4.1.1 is a good one for printers)");
puts(" -pcl Send PCL+PJL query and test page to backend.");
puts(" -ps Send PostScript query and test page to backend.");
@@ -667,19 +645,7 @@ walk_cb(const char *oid, /* I - OID */
int datalen, /* I - Length of data */
void *context) /* I - Context (unused) */
{
char temp[80];
if (datalen > (sizeof(temp) - 1))
{
memcpy(temp, data, sizeof(temp) - 1);
temp[sizeof(temp) - 1] = '\0';
}
else
{
memcpy(temp, data, datalen);
temp[datalen] = '\0';
}
printf("CUPS_SC_CMD_SNMP_WALK %s, %d bytes (%s)\n", oid, datalen, temp);
printf("CUPS_SC_CMD_SNMP_WALK %s=%s (%d bytes)\n", oid, data, datalen);
}
+2 -2
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* SNMP supplies test program for CUPS.
* SNMP supplies test program for the Common UNIX Printing System (CUPS).
*
* Copyright 2008-2011 by Apple Inc.
* Copyright 2008 by Apple Inc.
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
+198 -311
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+250 -1396
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+34 -19
Ver Arquivo
@@ -1,11 +1,11 @@
/*
* "$Id$"
*
* USB port backend for CUPS.
* USB port backend for the Common UNIX Printing System (CUPS).
*
* This file is included from "usb.c" when compiled on UNIX/Linux.
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -56,7 +56,7 @@ print_device(const char *uri, /* I - Device URI */
{
int use_bc; /* Use backchannel path? */
int device_fd; /* USB device */
ssize_t tbytes; /* Total number of bytes written */
size_t tbytes; /* Total number of bytes written */
struct termios opts; /* Parallel port options */
@@ -96,10 +96,10 @@ print_device(const char *uri, /* I - Device URI */
* a read request...
*/
use_bc = _cups_strcasecmp(hostname, "Brother") &&
_cups_strcasecmp(hostname, "Canon") &&
_cups_strncasecmp(hostname, "Konica", 6) &&
_cups_strncasecmp(hostname, "Minolta", 7);
use_bc = strcasecmp(hostname, "Brother") &&
strcasecmp(hostname, "Canon") &&
strncasecmp(hostname, "Konica", 6) &&
strncasecmp(hostname, "Minolta", 7);
#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */
if ((device_fd = open_device(uri, &use_bc)) == -1)
@@ -113,9 +113,9 @@ print_device(const char *uri, /* I - Device URI */
* available printer in the class.
*/
_cupsLangPrintFilter(stderr, "INFO",
_("Unable to contact printer, queuing on next "
"printer in class."));
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
/*
* Sleep 5 seconds to keep the job from requeuing too rapidly...
@@ -128,17 +128,23 @@ print_device(const char *uri, /* I - Device URI */
if (errno == EBUSY)
{
_cupsLangPrintFilter(stderr, "INFO", _("The printer is in use."));
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 10 seconds...\n"));
sleep(10);
}
else if (errno == ENXIO || errno == EIO || errno == ENOENT ||
errno == ENODEV)
{
_cupsLangPuts(stderr,
_("INFO: Printer not connected; will retry in 30 "
"seconds...\n"));
sleep(30);
}
else
{
_cupsLangPrintError("ERROR", _("Unable to open device file"));
_cupsLangPrintf(stderr,
_("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
}
@@ -181,14 +187,20 @@ print_device(const char *uri, /* I - Device URI */
* select() or poll(), so we can't support the sidechannel either...
*/
tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, 1, NULL);
tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, NULL);
#else
tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, 1, side_cb);
tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, side_cb);
#endif /* __sun */
if (print_fd != 0 && tbytes >= 0)
_cupsLangPrintFilter(stderr, "INFO", _("Print file sent."));
_cupsLangPrintf(stderr,
#ifdef HAVE_LONG_LONG
_("INFO: Sent print file, %lld bytes...\n"),
#else
_("INFO: Sent print file, %ld bytes...\n"),
#endif /* HAVE_LONG_LONG */
CUPS_LLCAST tbytes);
}
/*
@@ -197,7 +209,7 @@ print_device(const char *uri, /* I - Device URI */
close(device_fd);
return (CUPS_BACKEND_OK);
return (tbytes < 0 ? CUPS_BACKEND_FAILED : CUPS_BACKEND_OK);
}
@@ -257,6 +269,7 @@ list_devices(void)
close(fd);
}
#elif defined(__sgi)
#elif defined(__sun) && defined(ECPPIOC_GETDEVID)
int i; /* Looping var */
int fd; /* File descriptor */
@@ -420,7 +433,8 @@ open_device(const char *uri, /* I - Device URI */
*/
if (busy)
_cupsLangPrintFilter(stderr, "INFO", _("The printer is in use."));
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 5 seconds...\n"));
sleep(5);
}
@@ -503,7 +517,8 @@ open_device(const char *uri, /* I - Device URI */
if (busy)
{
_cupsLangPrintFilter(stderr, "INFO", _("The printer is in use."));
_cupsLangPuts(stderr,
_("INFO: Printer is busy; will retry in 5 seconds...\n"));
sleep(5);
}
}
@@ -545,7 +560,7 @@ open_device(const char *uri, /* I - Device URI */
* 'side_cb()' - Handle side-channel requests...
*/
static int /* O - 0 on success, -1 on error */
static void
side_cb(int print_fd, /* I - Print file */
int device_fd, /* I - Device file */
int snmp_fd, /* I - SNMP socket (unused) */
+10 -9
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* USB port backend for CUPS.
* USB port backend for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -55,7 +55,7 @@ int print_device(const char *uri, const char *hostname,
* Include the vendor-specific USB implementation...
*/
#ifdef HAVE_LIBUSB
#ifdef HAVE_USB_H
# include "usb-libusb.c"
#elif defined(__APPLE__)
# include "usb-darwin.c"
@@ -118,7 +118,7 @@ print_device(const char *uri, /* I - Device URI */
return (CUPS_BACKEND_FAILED);
}
#endif /* HAVE_LIBUSB */
#endif /* __APPLE__ */
/*
@@ -180,7 +180,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]"),
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
@@ -196,9 +196,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
hostname, sizeof(hostname), &port,
resource, sizeof(resource)) < HTTP_URI_OK)
{
_cupsLangPrintFilter(stderr, "ERROR",
_("No device URI found in argv[0] or in DEVICE_URI "
"environment variable."));
_cupsLangPuts(stderr,
_("ERROR: No device URI found in argv[0] or in DEVICE_URI "
"environment variable!\n"));
return (1);
}
@@ -234,7 +234,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if ((print_fd = open(argv[6], O_RDONLY)) < 0)
{
_cupsLangPrintError("ERROR", _("Unable to open print file"));
_cupsLangPrintf(stderr, _("ERROR: Unable to open print file %s - %s\n"),
argv[6], strerror(errno));
return (CUPS_BACKEND_FAILED);
}
+16 -25
Ver Arquivo
@@ -1,25 +1,16 @@
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
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
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
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/ppd-private.h ../cups/ppd.h ../cups/thread-private.h
# DO NOT DELETE THIS LINE -- make depend depends on it.
lpc.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h
lpc.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
lpc.o: ../cups/i18n.h ../cups/transcode.h ../cups/debug.h ../cups/string.h
lpc.o: ../config.h
lpq.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
lpq.o: ../cups/http.h ../cups/versioning.h ../cups/ppd.h ../cups/array.h
lpq.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/transcode.h
lpq.o: ../cups/debug.h
lpr.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
lpr.o: ../cups/http.h ../cups/versioning.h ../cups/ppd.h ../cups/array.h
lpr.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/transcode.h
lprm.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h
lprm.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
lprm.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
+3 -4
Ver Arquivo
@@ -1,9 +1,9 @@
#
# "$Id$"
#
# Berkeley commands makefile for CUPS.
# Berkeley commands makefile for the Common UNIX Printing System (CUPS).
#
# Copyright 2007-2012 by Apple Inc.
# Copyright 2007-2009 by Apple Inc.
# Copyright 1997-2006 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
@@ -54,7 +54,7 @@ clean:
#
depend:
$(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
#
@@ -88,7 +88,6 @@ install-exec:
$(INSTALL_DIR) $(SYMROOT); \
for file in $(TARGETS); do \
cp $$file $(SYMROOT); \
dsymutil $(SYMROOT)/$$file; \
done \
fi
+26 -22
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* "lpc" command for CUPS.
* "lpc" command for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -25,7 +25,12 @@
* Include necessary headers...
*/
#include <cups/cups-private.h>
#include <stdio.h>
#include <stdlib.h>
#include <cups/cups.h>
#include <cups/i18n.h>
#include <cups/debug.h>
#include <cups/string.h>
/*
@@ -73,7 +78,7 @@ main(int argc, /* I - Number of command-line arguments */
* Do the command prompt thing...
*/
_cupsLangPuts(stdout, _("lpc> ")); /* TODO: Need no-newline version */
_cupsLangPuts(stdout, _("lpc> "));
while (fgets(line, sizeof(line), stdin) != NULL)
{
/*
@@ -101,7 +106,7 @@ main(int argc, /* I - Number of command-line arguments */
* Nothing left, just show a prompt...
*/
_cupsLangPuts(stdout, _("lpc> ")); /* TODO: Need no newline version */
_cupsLangPuts(stdout, _("lpc> "));
continue;
}
@@ -137,7 +142,7 @@ main(int argc, /* I - Number of command-line arguments */
* Put another prompt out to the user...
*/
_cupsLangPuts(stdout, _("lpc> ")); /* TODO: Need no newline version */
_cupsLangPuts(stdout, _("lpc> "));
}
}
@@ -186,7 +191,7 @@ do_command(http_t *http, /* I - HTTP connection to server */
show_help(params);
else
_cupsLangPrintf(stdout,
_("%s is not implemented by the CUPS version of lpc."),
_("%s is not implemented by the CUPS version of lpc.\n"),
command);
}
@@ -203,14 +208,14 @@ show_help(const char *command) /* I - Command to describe or NULL */
_cupsLangPrintf(stdout,
_("Commands may be abbreviated. Commands are:\n"
"\n"
"exit help quit status ?"));
"exit help quit status ?\n"));
}
else if (!compare_strings(command, "help", 1) || !strcmp(command, "?"))
_cupsLangPrintf(stdout, _("help\t\tGet help on commands."));
_cupsLangPrintf(stdout, _("help\t\tget help on commands\n"));
else if (!compare_strings(command, "status", 4))
_cupsLangPrintf(stdout, _("status\t\tShow status of daemon and queue."));
_cupsLangPrintf(stdout, _("status\t\tshow status of daemon and queue\n"));
else
_cupsLangPrintf(stdout, _("?Invalid help command unknown."));
_cupsLangPrintf(stdout, _("?Invalid help command unknown\n"));
}
@@ -364,8 +369,7 @@ show_status(http_t *http, /* I - HTTP connection to server */
for (ptr = printer;
*ptr != '\0' && *dptr != '\0' && *ptr == *dptr;
ptr ++, dptr ++)
/* do nothing */;
ptr ++, dptr ++);
if (*ptr == '\0' && (*dptr == '\0' || *dptr == ',' ||
isspace(*dptr & 255)))
@@ -401,7 +405,7 @@ show_status(http_t *http, /* I - HTTP connection to server */
printf("%s:\n", printer);
if (!strncmp(device, "file:", 5))
_cupsLangPrintf(stdout,
_("\tprinter is on device \'%s\' speed -1"),
_("\tprinter is on device \'%s\' speed -1\n"),
device + 5);
else
{
@@ -413,27 +417,27 @@ show_status(http_t *http, /* I - HTTP connection to server */
{
*delimiter = '\0';
_cupsLangPrintf(stdout,
_("\tprinter is on device \'%s\' speed -1"),
_("\tprinter is on device \'%s\' speed -1\n"),
device);
}
}
if (accepting)
_cupsLangPuts(stdout, _("\tqueuing is enabled"));
_cupsLangPuts(stdout, _("\tqueuing is enabled\n"));
else
_cupsLangPuts(stdout, _("\tqueuing is disabled"));
_cupsLangPuts(stdout, _("\tqueuing is disabled\n"));
if (pstate != IPP_PRINTER_STOPPED)
_cupsLangPuts(stdout, _("\tprinting is enabled"));
_cupsLangPuts(stdout, _("\tprinting is enabled\n"));
else
_cupsLangPuts(stdout, _("\tprinting is disabled"));
_cupsLangPuts(stdout, _("\tprinting is disabled\n"));
if (jobcount == 0)
_cupsLangPuts(stdout, _("\tno entries"));
_cupsLangPuts(stdout, _("\tno entries\n"));
else
_cupsLangPrintf(stdout, _("\t%d entries"), jobcount);
_cupsLangPrintf(stdout, _("\t%d entries\n"), jobcount);
_cupsLangPuts(stdout, _("\tdaemon present"));
_cupsLangPuts(stdout, _("\tdaemon present\n"));
}
if (attr == NULL)
+44 -56
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* "lpq" command for CUPS.
* "lpq" command for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -28,7 +28,12 @@
* Include necessary headers...
*/
#include <cups/cups-private.h>
#include <stdio.h>
#include <stdlib.h>
#include <cups/string.h>
#include <cups/cups.h>
#include <cups/i18n.h>
#include <cups/debug.h>
/*
@@ -39,7 +44,7 @@ static http_t *connect_server(const char *, http_t *);
static int show_jobs(const char *, http_t *, const char *,
const char *, const int, const int);
static void show_printer(const char *, http_t *, const char *);
static void usage(void) __attribute__((noreturn));
static void usage(void);
/*
@@ -94,7 +99,8 @@ main(int argc, /* I - Number of command-line arguments */
if (http)
httpEncryption(http, HTTP_ENCRYPT_REQUIRED);
#else
_cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."),
_cupsLangPrintf(stderr,
_("%s: Sorry, no encryption support compiled in!\n"),
argv[0]);
#endif /* HAVE_SSL */
break;
@@ -109,14 +115,15 @@ main(int argc, /* I - Number of command-line arguments */
{
_cupsLangPrintf(stderr,
_("%s: Error - expected username after "
"\"-U\" option."), argv[0]);
"\'-U\' option!\n"),
argv[0]);
return (1);
}
cupsSetUser(argv[i]);
}
break;
case 'P' : /* Printer */
if (argv[i][2])
dest = argv[i] + 2;
@@ -128,7 +135,7 @@ main(int argc, /* I - Number of command-line arguments */
{
httpClose(http);
cupsFreeDests(num_dests, dests);
usage();
}
@@ -147,10 +154,11 @@ main(int argc, /* I - Number of command-line arguments */
{
if (instance)
_cupsLangPrintf(stderr,
_("%s: Error - unknown destination \"%s/%s\"."),
_("%s: Error - unknown destination \"%s/%s\"!\n"),
argv[0], dest, instance);
else
_cupsLangPrintf(stderr, _("%s: Unknown destination \"%s\"."),
_cupsLangPrintf(stderr,
_("%s: Unknown destination \"%s\"!\n"),
argv[0], dest);
return (1);
@@ -178,7 +186,8 @@ main(int argc, /* I - Number of command-line arguments */
{
_cupsLangPrintf(stderr,
_("%s: Error - expected hostname after "
"\"-h\" option."), argv[0]);
"\'-h\' option!\n"),
argv[0]);
return (1);
}
else
@@ -233,12 +242,12 @@ main(int argc, /* I - Number of command-line arguments */
if (dest && !cupsGetDest(dest, NULL, num_dests, dests))
_cupsLangPrintf(stderr,
_("%s: Error - %s environment variable names "
"non-existent destination \"%s\"."), argv[0], val,
dest);
_("%s: error - %s environment variable names "
"non-existent destination \"%s\"!\n"),
argv[0], val, dest);
else
_cupsLangPrintf(stderr,
_("%s: Error - no default destination available."),
_("%s: error - no default destination available.\n"),
argv[0]);
httpClose(http);
cupsFreeDests(num_dests, dests);
@@ -292,7 +301,7 @@ connect_server(const char *command, /* I - Command name */
if (http == NULL)
{
_cupsLangPrintf(stderr, _("%s: Unable to connect to server."), command);
_cupsLangPrintf(stderr, _("%s: Unable to connect to server\n"), command);
exit(1);
}
}
@@ -331,18 +340,7 @@ show_jobs(const char *command, /* I - Command name */
char resource[1024]; /* Resource string */
char rankstr[255]; /* Rank string */
char namestr[1024]; /* Job name string */
static const char * const jobattrs[] =/* Job attributes we want to see */
{
"copies",
"job-id",
"job-k-octets",
"job-name",
"job-originating-user-name",
"job-printer-uri",
"job-priority",
"job-state"
};
static const char * const ranks[10] = /* Ranking strings */
static const char *ranks[10] = /* Ranking strings */
{
"th",
"st",
@@ -370,8 +368,6 @@ show_jobs(const char *command, /* I - Command name */
* attributes-charset
* attributes-natural-language
* job-uri or printer-uri
* requested-attributes
* requesting-user-name
*/
request = ippNewRequest(id ? IPP_GET_JOB_ATTRIBUTES : IPP_GET_JOBS);
@@ -400,13 +396,6 @@ show_jobs(const char *command, /* I - Command name */
"requesting-user-name", NULL, user);
ippAddBoolean(request, IPP_TAG_OPERATION, "my-jobs", 1);
}
else
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name", NULL, cupsUser());
ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
"requested-attributes",
(int)(sizeof(jobattrs) / sizeof(jobattrs[0])), NULL, jobattrs);
/*
* Do the request and get back a response...
@@ -418,7 +407,7 @@ show_jobs(const char *command, /* I - Command name */
{
if (response->request.status.status_code > IPP_OK_CONFLICT)
{
_cupsLangPrintf(stderr, "%s: %s", command, cupsLastErrorString());
_cupsLangPrintf(stderr, "%s: %s\n", command, cupsLastErrorString());
ippDelete(response);
return (0);
}
@@ -451,8 +440,8 @@ show_jobs(const char *command, /* I - Command name */
jobpriority = 50;
#endif /* __osf__ */
jobstate = IPP_JOB_PENDING;
jobname = "unknown";
jobuser = "unknown";
jobname = "untitled";
jobuser = NULL;
jobdest = NULL;
jobcopies = 1;
@@ -511,13 +500,12 @@ 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"));
" Total Size\n"));
#else
_cupsLangPuts(stdout,
_("Rank Owner Job File(s)"
" Total Size"));
" Total Size\n"));
#endif /* __osf__ */
jobcount ++;
@@ -527,7 +515,7 @@ show_jobs(const char *command, /* I - Command name */
*/
if (jobstate == IPP_JOB_PROCESSING)
strlcpy(rankstr, "active", sizeof(rankstr));
strcpy(rankstr, "active");
else
{
/*
@@ -553,20 +541,20 @@ show_jobs(const char *command, /* I - Command name */
else
strlcpy(namestr, jobname, sizeof(namestr));
_cupsLangPrintf(stdout, _("%s: %-33.33s [job %d localhost]"),
_cupsLangPrintf(stdout, _("%s: %-33.33s [job %d localhost]\n"),
jobuser, rankstr, jobid);
_cupsLangPrintf(stdout, _(" %-39.39s %.0f bytes"),
_cupsLangPrintf(stdout, _(" %-39.39s %.0f bytes\n"),
namestr, 1024.0 * jobsize);
}
else
#ifdef __osf__
_cupsLangPrintf(stdout,
_("%-6s %-10.10s %-4d %-10d %-27.27s %.0f bytes"),
_("%-6s %-10.10s %-4d %-10d %-27.27s %.0f bytes\n"),
rankstr, jobuser, jobpriority, jobid, jobname,
1024.0 * jobsize);
#else
_cupsLangPrintf(stdout,
_("%-7s %-7.7s %-7d %-31.31s %.0f bytes"),
_("%-7s %-7.7s %-7d %-31.31s %.0f bytes\n"),
rankstr, jobuser, jobid, jobname, 1024.0 * jobsize);
#endif /* __osf */
@@ -578,12 +566,12 @@ show_jobs(const char *command, /* I - Command name */
}
else
{
_cupsLangPrintf(stderr, "%s: %s", command, cupsLastErrorString());
_cupsLangPrintf(stderr, "%s: %s\n", command, cupsLastErrorString());
return (0);
}
if (jobcount == 0)
_cupsLangPuts(stdout, _("no entries"));
_cupsLangPuts(stdout, _("no entries\n"));
return (jobcount);
}
@@ -632,7 +620,7 @@ show_printer(const char *command, /* I - Command name */
{
if (response->request.status.status_code > IPP_OK_CONFLICT)
{
_cupsLangPrintf(stderr, "%s: %s", command, cupsLastErrorString());
_cupsLangPrintf(stderr, "%s: %s\n", command, cupsLastErrorString());
ippDelete(response);
return;
}
@@ -645,21 +633,21 @@ show_printer(const char *command, /* I - Command name */
switch (state)
{
case IPP_PRINTER_IDLE :
_cupsLangPrintf(stdout, _("%s is ready"), dest);
_cupsLangPrintf(stdout, _("%s is ready\n"), dest);
break;
case IPP_PRINTER_PROCESSING :
_cupsLangPrintf(stdout, _("%s is ready and printing"),
_cupsLangPrintf(stdout, _("%s is ready and printing\n"),
dest);
break;
case IPP_PRINTER_STOPPED :
_cupsLangPrintf(stdout, _("%s is not ready"), dest);
_cupsLangPrintf(stdout, _("%s is not ready\n"), dest);
break;
}
ippDelete(response);
}
else
_cupsLangPrintf(stderr, "%s: %s", command, cupsLastErrorString());
_cupsLangPrintf(stderr, "%s: %s\n", command, cupsLastErrorString());
}
@@ -672,7 +660,7 @@ usage(void)
{
_cupsLangPuts(stderr,
_("Usage: lpq [-P dest] [-U username] [-h hostname[:port]] "
"[-l] [+interval]"));
"[-l] [+interval]\n"));
exit(1);
}
+45 -36
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* "lpr" command for CUPS.
* "lpr" command for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -21,7 +21,13 @@
* Include necessary headers...
*/
#include <cups/cups-private.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <cups/string.h>
#include <cups/cups.h>
#include <cups/i18n.h>
/*
@@ -67,7 +73,8 @@ main(int argc, /* I - Number of command-line arguments */
#ifdef HAVE_SSL
cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
#else
_cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."),
_cupsLangPrintf(stderr,
_("%s: Sorry, no encryption support compiled in!\n"),
argv[0]);
#endif /* HAVE_SSL */
break;
@@ -82,14 +89,15 @@ main(int argc, /* I - Number of command-line arguments */
{
_cupsLangPrintf(stderr,
_("%s: Error - expected username after "
"\"-U\" option."), argv[0]);
"\'-U\' option!\n"),
argv[0]);
return (1);
}
cupsSetUser(argv[i]);
}
break;
case 'H' : /* Connect to host */
if (argv[i][2] != '\0')
cupsSetServer(argv[i] + 2);
@@ -101,7 +109,8 @@ main(int argc, /* I - Number of command-line arguments */
{
_cupsLangPrintf(stderr,
_("%s: Error - expected hostname after "
"\"-H\" option."), argv[0]);
"\'-H\' option!\n"),
argv[0]);
return (1);
}
else
@@ -122,8 +131,8 @@ main(int argc, /* I - Number of command-line arguments */
if (i >= argc)
{
_cupsLangPrintf(stderr,
_("%s: Error - expected value after \"-%c\" "
"option."), argv[0], ch);
_("%s: Error - expected value after \'-%c\' "
"option!\n"), argv[0], ch);
return (1);
}
}
@@ -136,8 +145,8 @@ main(int argc, /* I - Number of command-line arguments */
case 't' : /* Troff */
case 'v' : /* Raster image */
_cupsLangPrintf(stderr,
_("%s: Warning - \"%c\" format modifier not "
"supported - output may not be correct."),
_("%s: Warning - \'%c\' format modifier not "
"supported - output may not be correct!\n"),
argv[0], ch);
break;
@@ -150,8 +159,9 @@ main(int argc, /* I - Number of command-line arguments */
if (i >= argc)
{
_cupsLangPrintf(stderr,
_("%s: Error - expected option=value after "
"\"-o\" option."), argv[0]);
_("%s: error - expected option=value after "
"\'-o\' option!\n"),
argv[0]);
return (1);
}
@@ -207,7 +217,8 @@ main(int argc, /* I - Number of command-line arguments */
{
_cupsLangPrintf(stderr,
_("%s: Error - expected destination after "
"\"-P\" option."), argv[0]);
"\'-P\' option!\n"),
argv[0]);
return (1);
}
@@ -237,8 +248,9 @@ main(int argc, /* I - Number of command-line arguments */
if (i >= argc)
{
_cupsLangPrintf(stderr,
_("%s: Error - expected copies after "
"\"-#\" option."), argv[0]);
_("%s: Error - expected copy count after "
"\'-#\' option!\n"),
argv[0]);
return (1);
}
@@ -260,8 +272,8 @@ main(int argc, /* I - Number of command-line arguments */
if (i >= argc)
{
_cupsLangPrintf(stderr,
_("%s: Error - expected name after \"-%c\" "
"option."), argv[0], ch);
_("%s: Error - expected name after \'-%c\' "
"option!\n"), argv[0], ch);
return (1);
}
@@ -271,8 +283,8 @@ main(int argc, /* I - Number of command-line arguments */
default :
_cupsLangPrintf(stderr,
_("%s: Error - unknown option \"%c\"."), argv[0],
argv[i][1]);
_("%s: Error - unknown option \'%c\'!\n"),
argv[0], argv[i][1]);
return (1);
}
else if (num_files < 1000)
@@ -284,7 +296,7 @@ main(int argc, /* I - Number of command-line arguments */
if (access(argv[i], R_OK) != 0)
{
_cupsLangPrintf(stderr,
_("%s: Error - unable to access \"%s\" - %s"),
_("%s: Error - unable to access \"%s\" - %s\n"),
argv[0], argv[i], strerror(errno));
return (1);
}
@@ -302,8 +314,8 @@ main(int argc, /* I - Number of command-line arguments */
}
else
_cupsLangPrintf(stderr,
_("%s: Error - too many files - \"%s\"."), argv[0],
argv[i]);
_("%s: Error - too many files - \"%s\"\n"),
argv[0], argv[i]);
/*
* See if we have any files to print; if not, print from stdin...
*/
@@ -342,14 +354,15 @@ main(int argc, /* I - Number of command-line arguments */
if (printer && !cupsGetNamedDest(NULL, printer, NULL))
_cupsLangPrintf(stderr,
_("%s: Error - %s environment variable names "
"non-existent destination \"%s\"."), argv[0], val,
printer);
"non-existent destination \"%s\"!\n"),
argv[0], val, printer);
else if (cupsLastError() == IPP_NOT_FOUND)
_cupsLangPrintf(stderr,
_("%s: Error - no default destination available."),
_("%s: Error - no default destination available.\n"),
argv[0]);
else
_cupsLangPrintf(stderr, _("%s: Error - scheduler not responding."),
_cupsLangPrintf(stderr,
_("%s: Error - scheduler not responding!\n"),
argv[0]);
return (1);
@@ -377,6 +390,7 @@ main(int argc, /* I - Number of command-line arguments */
const char *format; /* Document format */
ssize_t bytes; /* Bytes read */
if (cupsGetOption("raw", num_options, options))
format = CUPS_FORMAT_RAW;
else if ((format = cupsGetOption("document-format", num_options,
@@ -392,24 +406,19 @@ main(int argc, /* I - Number of command-line arguments */
if (status != HTTP_CONTINUE)
{
_cupsLangPrintf(stderr, _("%s: Error - unable to queue from stdin - %s."),
_cupsLangPrintf(stderr,
_("%s: Error - unable to queue from stdin - %s\n"),
argv[0], httpStatus(status));
cupsFinishDocument(CUPS_HTTP_DEFAULT, printer);
cupsCancelJob2(CUPS_HTTP_DEFAULT, printer, job_id, 0);
return (1);
}
if (cupsFinishDocument(CUPS_HTTP_DEFAULT, printer) != IPP_OK)
{
_cupsLangPrintf(stderr, "%s: %s", argv[0], cupsLastErrorString());
cupsCancelJob2(CUPS_HTTP_DEFAULT, printer, job_id, 0);
return (1);
}
job_id = 0;
}
if (job_id < 1)
{
_cupsLangPrintf(stderr, "%s: %s", argv[0], cupsLastErrorString());
_cupsLangPrintf(stderr, "%s: %s\n", argv[0], cupsLastErrorString());
return (1);
}
+21 -11
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* "lprm" command for CUPS.
* "lprm" command for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2010 by Apple Inc.
* Copyright 2007 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -21,7 +21,12 @@
* Include necessary headers...
*/
#include <cups/cups-private.h>
#include <stdio.h>
#include <stdlib.h>
#include <cups/cups.h>
#include <cups/i18n.h>
#include <cups/string.h>
/*
@@ -64,7 +69,8 @@ main(int argc, /* I - Number of command-line arguments */
cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
#else
_cupsLangPrintf(stderr,
_("%s: Sorry, no encryption support."), argv[0]);
_("%s: Sorry, no encryption support compiled in!\n"),
argv[0]);
#endif /* HAVE_SSL */
break;
@@ -84,7 +90,7 @@ main(int argc, /* I - Number of command-line arguments */
NULL)) == NULL)
{
_cupsLangPrintf(stderr,
_("%s: Error - unknown destination \"%s\"."),
_("%s: Error - unknown destination \"%s\"!\n"),
argv[0], name);
goto error;
}
@@ -102,7 +108,8 @@ main(int argc, /* I - Number of command-line arguments */
{
_cupsLangPrintf(stderr,
_("%s: Error - expected username after "
"\"-U\" option."), argv[0]);
"\'-U\' option!\n"),
argv[0]);
goto error;
}
@@ -121,7 +128,8 @@ main(int argc, /* I - Number of command-line arguments */
{
_cupsLangPrintf(stderr,
_("%s: Error - expected hostname after "
"\"-h\" option."), argv[0]);
"\'-h\' option!\n"),
argv[0]);
goto error;
}
else
@@ -136,7 +144,8 @@ main(int argc, /* I - Number of command-line arguments */
break;
default :
_cupsLangPrintf(stderr, _("%s: Error - unknown option \"%c\"."),
_cupsLangPrintf(stderr,
_("%s: Error - unknown option \'%c\'!\n"),
argv[0], argv[i][1]);
goto error;
}
@@ -169,14 +178,15 @@ main(int argc, /* I - Number of command-line arguments */
}
else
{
_cupsLangPrintf(stderr, _("%s: Error - unknown destination \"%s\"."),
_cupsLangPrintf(stderr,
_("%s: Error - unknown destination \"%s\"!\n"),
argv[0], argv[i]);
goto error;
}
if (cupsCancelJob2(CUPS_HTTP_DEFAULT, name, job_id, 0) != IPP_OK)
{
_cupsLangPrintf(stderr, "%s: %s", argv[0], cupsLastErrorString());
_cupsLangPrintf(stderr, "%s: %s\n", argv[0], cupsLastErrorString());
goto error;
}
@@ -190,7 +200,7 @@ main(int argc, /* I - Number of command-line arguments */
if (!did_cancel && cupsCancelJob2(CUPS_HTTP_DEFAULT, name, 0, 0) != IPP_OK)
{
_cupsLangPrintf(stderr, "%s: %s", argv[0], cupsLastErrorString());
_cupsLangPrintf(stderr, "%s: %s\n", argv[0], cupsLastErrorString());
goto error;
}
+64 -73
Ver Arquivo
@@ -1,73 +1,64 @@
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/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-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-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-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-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-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-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-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-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-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
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-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
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
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
# DO NOT DELETE
help-index.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
help-index.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h
help-index.o: ../cups/file.h ../cups/language.h ../cups/array.h help-index.h
help-index.o: ../cups/debug.h ../cups/i18n.h ../cups/transcode.h
help-index.o: ../cups/string.h ../config.h ../cups/dir.h
html.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
html.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
html.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
html.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
ipp-var.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
ipp-var.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
ipp-var.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
ipp-var.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
search.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
search.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
search.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
search.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
template.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
template.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
template.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
template.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
var.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
var.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
var.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
var.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
admin.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
admin.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
admin.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
admin.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
admin.o: ../cups/adminutil.h ../cups/cups.h ../cups/file.h
classes.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
classes.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
classes.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
classes.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
help.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
help.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
help.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
help.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
jobs.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
jobs.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
jobs.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
jobs.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
makedocset.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
makedocset.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h
makedocset.o: ../cups/file.h ../cups/language.h ../cups/array.h help-index.h
printers.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
printers.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
printers.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
printers.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
testcgi.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
testcgi.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
testcgi.o: ../cups/language.h ../cups/array.h help-index.h
testhi.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
testhi.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
testhi.o: ../cups/language.h ../cups/array.h help-index.h
testtemplate.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
testtemplate.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h
testtemplate.o: ../cups/file.h ../cups/language.h ../cups/array.h
testtemplate.o: help-index.h
websearch.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
websearch.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h
websearch.o: ../cups/file.h ../cups/language.h ../cups/array.h help-index.h
+14 -16
Ver Arquivo
@@ -1,9 +1,9 @@
#
# "$Id$"
#
# CGI makefile for CUPS.
# CGI makefile for the Common UNIX Printing System (CUPS).
#
# Copyright 2007-2012 by Apple Inc.
# Copyright 2007-2009 by Apple Inc.
# Copyright 1997-2006 by Easy Software Products.
#
# These coded instructions, statements, and computer programs are the
@@ -90,7 +90,7 @@ clean:
#
depend:
$(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
#
@@ -118,9 +118,8 @@ install-exec:
done
if test "x$(SYMROOT)" != "x"; then \
$(INSTALL_DIR) $(SYMROOT); \
for file in $(CGIS); do \
for file in $(TARGETS); do \
cp $$file $(SYMROOT); \
dsymutil $(SYMROOT)/$$file; \
done \
fi
@@ -155,7 +154,6 @@ install-libs: $(INSTALLSTATIC)
if test "x$(SYMROOT)" != "x"; then \
$(INSTALL_DIR) $(SYMROOT); \
cp $(LIBCUPSCGI) $(SYMROOT); \
dsymutil $(SYMROOT)/$(LIBCUPSCGI); \
fi
installstatic:
@@ -309,10 +307,10 @@ jobs.cgi: jobs.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
# makedocset
#
makedocset: makedocset.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
makedocset: makedocset.o ../Makedefs libcupscgi.a ../cups/libcups.a
echo Linking $@...
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ makedocset.o libcupscgi.a \
../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
../cups/libcups.a $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
$(LIBZ) $(LIBGSSAPI)
@@ -329,10 +327,10 @@ printers.cgi: printers.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
# testcgi
#
testcgi: testcgi.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
testcgi: testcgi.o ../Makedefs libcupscgi.a ../cups/libcups.a
echo Linking $@...
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testcgi.o libcupscgi.a \
../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
../cups/libcups.a $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
$(LIBZ) $(LIBGSSAPI)
echo Testing CGI API...
./testcgi
@@ -342,10 +340,10 @@ testcgi: testcgi.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
# testhi
#
testhi: testhi.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
testhi: testhi.o ../Makedefs libcupscgi.a ../cups/libcups.a
echo Linking $@...
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhi.o libcupscgi.a \
../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
../cups/libcups.a $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
$(LIBZ) $(LIBGSSAPI)
echo Testing help index API...
./testhi
@@ -355,9 +353,9 @@ testhi: testhi.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
# testtemplate
#
testtemplate: testtemplate.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
testtemplate: testtemplate.o ../Makedefs libcupscgi.a ../cups/libcups.a
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ testtemplate.o libcupscgi.a ../cups/$(LIBCUPSSTATIC) \
$(CC) $(LDFLAGS) -o $@ testtemplate.o libcupscgi.a ../cups/libcups.a \
$(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) $(LIBZ) $(LIBGSSAPI)
@@ -365,10 +363,10 @@ testtemplate: testtemplate.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
# websearch
#
websearch: websearch.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
websearch: websearch.o ../Makedefs libcupscgi.a ../cups/libcups.a
echo Linking $@...
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ websearch.o libcupscgi.a \
../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
../cups/libcups.a $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
$(LIBZ) $(LIBGSSAPI)
+313 -321
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+5 -6
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* Private CGI definitions for CUPS.
* Private CGI definitions for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 2007 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -18,10 +18,9 @@
*/
#include "cgi.h"
#include <cups/debug-private.h>
#include <cups/language-private.h>
#include <cups/string-private.h>
#include <cups/ipp-private.h> /* TODO: Update so we don't need this */
#include <cups/debug.h>
#include <cups/i18n.h>
#include <cups/string.h>
/*
+4 -18
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* CGI support library definitions for CUPS.
* CGI support library definitions.
*
* Copyright 2007-2010 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -33,14 +33,6 @@
# include "help-index.h"
/*
* C++ magic...
*/
# ifdef __cplusplus
extern "C" {
# endif /* __cplusplus */
/*
* Types...
*/
@@ -62,19 +54,17 @@ typedef struct cgi_file_s /**** Uploaded file data ****/
extern void cgiAbort(const char *title, const char *stylesheet,
const char *format, ...);
extern int cgiCheckVariables(const char *names);
extern void cgiClearVariables(void);
extern void *cgiCompileSearch(const char *query);
extern void cgiCopyTemplateFile(FILE *out, const char *tmpl);
extern void cgiCopyTemplateLang(const char *tmpl);
extern int cgiDoSearch(void *search, const char *text);
extern void cgiEndHTML(void);
extern void cgiEndMultipart(void);
extern char *cgiFormEncode(char *dst, const char *src,
size_t dstsize);
extern char *cgiFormEncode(char *dst, const char *src, size_t dstsize);
extern void cgiFreeSearch(void *search);
extern const char *cgiGetArray(const char *name, int element);
extern void cgiGetAttributes(ipp_t *request, const char *tmpl);
extern const char *cgiGetCookie(const char *name);
extern char *cgiGetCookie(const char *name, char *buf, int buflen);
extern const cgi_file_t *cgiGetFile(void);
extern cups_array_t *cgiGetIPPObjects(ipp_t *response, void *search);
extern int cgiGetSize(const char *name);
@@ -108,10 +98,6 @@ extern void cgiStartMultipart(void);
extern int cgiSupportsMultipart(void);
extern const char *cgiText(const char *message);
# ifdef __cplusplus
}
# endif /* __cplusplus */
#endif /* !_CUPS_CGI_H_ */
/*
+10 -25
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* Class status CGI for CUPS.
* Class status CGI for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -72,7 +72,6 @@ main(int argc, /* I - Number of command-line arguments */
*/
cgiSetVariable("SECTION", "classes");
cgiSetVariable("REFRESH_PAGE", "");
/*
* See if we are displaying a printer or all classes...
@@ -147,21 +146,7 @@ main(int argc, /* I - Number of command-line arguments */
}
else if (pclass)
{
if (!*op)
{
const char *server_port = getenv("SERVER_PORT");
/* Port number string */
int port = atoi(server_port ? server_port : "0");
/* Port number */
char uri[1024]; /* URL */
httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri),
getenv("HTTPS") ? "https" : "http", NULL,
getenv("SERVER_NAME"), port, "/classes/%s", pclass);
printf("Location: %s\n\n", uri);
}
else if (!strcmp(op, "start-class"))
if (!strcmp(op, "start-class"))
do_class_op(http, pclass, IPP_RESUME_PRINTER, cgiText(_("Resume Class")));
else if (!strcmp(op, "stop-class"))
do_class_op(http, pclass, IPP_PAUSE_PRINTER, cgiText(_("Pause Class")));
@@ -171,9 +156,9 @@ main(int argc, /* I - Number of command-line arguments */
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 (!_cups_strcasecmp(op, "print-test-page"))
else if (!strcasecmp(op, "print-test-page"))
cgiPrintTestPage(http, pclass);
else if (!_cups_strcasecmp(op, "move-jobs"))
else if (!strcasecmp(op, "move-jobs"))
cgiMoveJobs(http, pclass, 0);
else
{
@@ -257,7 +242,7 @@ do_class_op(http_t *http, /* I - HTTP connection */
else if (cupsLastError() > IPP_OK_CONFLICT)
{
cgiStartHTML(title);
cgiShowIPPError(_("Unable to do maintenance command"));
cgiShowIPPError(_("Unable to do maintenance command:"));
}
else
{
@@ -380,8 +365,8 @@ show_all_classes(http_t *http, /* I - Connection to server */
sprintf(val, "%d", count);
cgiSetVariable("TOTAL", val);
if ((var = cgiGetVariable("ORDER")) != NULL && *var)
ascending = !_cups_strcasecmp(var, "asc");
if ((var = cgiGetVariable("ORDER")) != NULL)
ascending = !strcasecmp(var, "asc");
else
ascending = 1;
@@ -447,7 +432,7 @@ show_all_classes(http_t *http, /* I - Connection to server */
* Show the error...
*/
cgiShowIPPError(_("Unable to get class list"));
cgiShowIPPError(_("Unable to get class list:"));
}
cgiEndHTML();
@@ -546,7 +531,7 @@ show_class(http_t *http, /* I - Connection to server */
*/
cgiStartHTML(pclass);
cgiShowIPPError(_("Unable to get class status"));
cgiShowIPPError(_("Unable to get class status:"));
}
cgiEndHTML();
+42 -39
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* Online help index routines for CUPS.
* Online help index routines for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -161,8 +161,7 @@ static int help_load_file(help_index_t *hi,
static help_node_t *help_new_node(const char *filename, const char *anchor,
const char *section, const char *text,
time_t mtime, off_t offset,
size_t length)
__attribute__((nonnull(1,3,4)));
size_t length);
static int help_sort_by_name(help_node_t *p1, help_node_t *p2);
static int help_sort_by_score(help_node_t *p1, help_node_t *p2);
static int help_sort_words(help_word_t *w1, help_word_t *w2);
@@ -178,7 +177,7 @@ helpDeleteIndex(help_index_t *hi) /* I - Help index */
help_node_t *node; /* Current node */
DEBUG_printf(("helpDeleteIndex(hi=%p)", hi));
DEBUG_printf(("helpDeleteIndex(hi=%p)\n", hi));
if (!hi)
return;
@@ -210,8 +209,8 @@ helpFindNode(help_index_t *hi, /* I - Index */
help_node_t key; /* Search key */
DEBUG_printf(("helpFindNode(hi=%p, filename=\"%s\", anchor=\"%s\")",
hi, filename, anchor));
DEBUG_printf(("helpFindNode(hi=%p, filename=\"%s\", anchor=\"%s\")\n",
hi, filename ? filename : "(nil)", anchor ? anchor : "(nil)"));
/*
* Range check input...
@@ -260,7 +259,7 @@ helpLoadIndex(const char *hifile, /* I - Index filename */
help_word_t *word; /* Current word */
DEBUG_printf(("helpLoadIndex(hifile=\"%s\", directory=\"%s\")",
DEBUG_printf(("helpLoadIndex(hifile=\"%s\", directory=\"%s\")\n",
hifile, directory));
/*
@@ -465,7 +464,7 @@ helpSaveIndex(help_index_t *hi, /* I - Index */
help_word_t *word; /* Current word */
DEBUG_printf(("helpSaveIndex(hi=%p, hifile=\"%s\")", hi, hifile));
DEBUG_printf(("helpSaveIndex(hi=%p, hifile=\"%s\")\n", hi, hifile));
/*
* Try creating a new index file...
@@ -546,8 +545,9 @@ helpSearchIndex(help_index_t *hi, /* I - Index */
int matches; /* Number of matches */
DEBUG_printf(("helpSearchIndex(hi=%p, query=\"%s\", filename=\"%s\")",
hi, query, filename));
DEBUG_printf(("helpSearchIndex(hi=%p, query=\"%s\", filename=\"%s\")\n",
hi, query ? query : "(nil)",
filename ? filename : "(nil)"));
/*
* Range check...
@@ -599,7 +599,7 @@ helpSearchIndex(help_index_t *hi, /* I - Index */
search->nodes = cupsArrayNew((cups_array_func_t)help_sort_by_name, NULL);
search->sorted = cupsArrayNew((cups_array_func_t)help_sort_by_score, NULL);
if (!search->nodes || !search->sorted)
{
cupsArrayDelete(search->nodes);
@@ -639,8 +639,8 @@ helpSearchIndex(help_index_t *hi, /* I - Index */
node->score = matches;
cupsArrayAdd(search->nodes, node);
cupsArrayAdd(search->sorted, node);
cupsArrayAdd(search->nodes, node);
cupsArrayAdd(search->sorted, node);
}
}
@@ -670,7 +670,7 @@ help_add_word(help_node_t *n, /* I - Node */
key; /* Search key */
DEBUG_printf(("2help_add_word(n=%p, text=\"%s\")", n, text));
DEBUG_printf(("help_add_word(n=%p, text=\"%s\")\n", n, text));
/*
* Create the words array as needed...
@@ -723,7 +723,7 @@ help_delete_node(help_node_t *n) /* I - Node */
help_word_t *w; /* Current word */
DEBUG_printf(("2help_delete_node(n=%p)", n));
DEBUG_printf(("help_delete_node(n=%p)\n", n));
if (!n)
return;
@@ -758,7 +758,7 @@ help_delete_node(help_node_t *n) /* I - Node */
static void
help_delete_word(help_word_t *w) /* I - Word */
{
DEBUG_printf(("2help_delete_word(w=%p)", w));
DEBUG_printf(("help_delete_word(w=%p)\n", w));
if (!w)
return;
@@ -789,8 +789,8 @@ help_load_directory(
help_node_t *node; /* Current node */
DEBUG_printf(("2help_load_directory(hi=%p, directory=\"%s\", relative=\"%s\")",
hi, directory, relative));
DEBUG_printf(("help_load_directory(hi=%p, directory=\"%s\", relative=\"%s\")\n",
hi, directory ? directory : "(nil)", relative ? relative : "(nil)"));
/*
* Open the directory and scan it...
@@ -901,8 +901,9 @@ help_load_file(
int wordlen; /* Length of word */
DEBUG_printf(("2help_load_file(hi=%p, filename=\"%s\", relative=\"%s\", "
"mtime=%ld)", hi, filename, relative, mtime));
DEBUG_printf(("help_load_file(hi=%p, filename=\"%s\", relative=\"%s\", mtime=%ld)\n",
hi, filename ? filename : "(nil)",
relative ? relative : "(nil)", mtime));
if ((fp = cupsFileOpen(filename, "r")) == NULL)
return (-1);
@@ -910,7 +911,7 @@ help_load_file(
node = NULL;
offset = 0;
strlcpy(section, "Other", sizeof(section));
strcpy(section, "Other");
while (cupsFileGets(fp, line, sizeof(line)))
{
@@ -918,7 +919,7 @@ help_load_file(
* Look for "<TITLE>", "<A NAME", or "<!-- SECTION:" prefix...
*/
if (!_cups_strncasecmp(line, "<!-- SECTION:", 13))
if (!strncasecmp(line, "<!-- SECTION:", 13))
{
/*
* Got section line, copy it!
@@ -945,7 +946,7 @@ help_load_file(
{
ptr ++;
if (!_cups_strncasecmp(ptr, "TITLE>", 6))
if (!strncasecmp(ptr, "TITLE>", 6))
{
/*
* Found the title...
@@ -954,7 +955,7 @@ help_load_file(
anchor = NULL;
ptr += 6;
}
else if (!_cups_strncasecmp(ptr, "A NAME=", 7))
else if (!strncasecmp(ptr, "A NAME=", 7))
{
/*
* Found an anchor...
@@ -1191,7 +1192,7 @@ help_load_file(
sizeof(help_common_words[0])),
sizeof(help_common_words[0]),
(int (*)(const void *, const void *))
_cups_strcasecmp))
strcasecmp))
help_add_word(node, temp);
}
}
@@ -1228,9 +1229,11 @@ help_new_node(const char *filename, /* I - Filename */
help_node_t *n; /* Node */
DEBUG_printf(("2help_new_node(filename=\"%s\", anchor=\"%s\", text=\"%s\", "
"mtime=%ld, offset=%ld, length=%ld)", filename, anchor, text,
(long)mtime, (long)offset, (long)length));
DEBUG_printf(("help_new_node(filename=\"%s\", anchor=\"%s\", text=\"%s\", "
"mtime=%ld, offset=%ld, length=%ld)\n",
filename ? filename : "(nil)", anchor ? anchor : "(nil)",
text ? text : "(nil)", (long)mtime, (long)offset,
(long)length));
n = (help_node_t *)calloc(1, sizeof(help_node_t));
if (!n)
@@ -1259,9 +1262,9 @@ help_sort_by_name(help_node_t *n1, /* I - First node */
int diff; /* Difference */
DEBUG_printf(("2help_sort_by_name(n1=%p(%s#%s), n2=%p(%s#%s)",
n1, n1->filename, n1->anchor,
n2, n2->filename, n2->anchor));
DEBUG_printf(("help_sort_by_name(n1=%p(%s#%s), n2=%p(%s#%s)\n",
n1, n1->filename, n1->anchor ? n1->anchor : "",
n2, n2->filename, n2->anchor ? n2->anchor : ""));
if ((diff = strcmp(n1->filename, n2->filename)) != 0)
return (diff);
@@ -1288,10 +1291,10 @@ help_sort_by_score(help_node_t *n1, /* I - First node */
int diff; /* Difference */
DEBUG_printf(("2help_sort_by_score(n1=%p(%d \"%s\" \"%s\"), "
"n2=%p(%d \"%s\" \"%s\")",
n1, n1->score, n1->section, n1->text,
n2, n2->score, n2->section, n2->text));
DEBUG_printf(("help_sort_by_score(n1=%p(%d \"%s\" \"%s\"), "
"n2=%p(%d \"%s\" \"%s\")\n",
n1, n1->score, n1->section ? n1->section : "", n1->text,
n2, n2->score, n2->section ? n2->section : "", n2->text));
if (n1->score != n2->score)
return (n2->score - n1->score);
@@ -1304,7 +1307,7 @@ help_sort_by_score(help_node_t *n1, /* I - First node */
(diff = strcmp(n1->section, n2->section)) != 0)
return (diff);
return (_cups_strcasecmp(n1->text, n2->text));
return (strcasecmp(n1->text, n2->text));
}
@@ -1316,10 +1319,10 @@ static int /* O - Difference */
help_sort_words(help_word_t *w1, /* I - Second word */
help_word_t *w2) /* I - Second word */
{
DEBUG_printf(("2help_sort_words(w1=%p(\"%s\"), w2=%p(\"%s\"))",
DEBUG_printf(("help_sort_words(w1=%p(\"%s\"), w2=%p(\"%s\"))\n",
w1, w1->text, w2, w2->text));
return (_cups_strcasecmp(w1->text, w2->text));
return (strcasecmp(w1->text, w2->text));
}
+2 -14
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* Online help index definitions for CUPS.
* Online help index definitions for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 2007 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -23,14 +23,6 @@
# include <cups/array.h>
/*
* C++ magic...
*/
# ifdef __cplusplus
extern "C" {
# endif /* __cplusplus */
/*
* Data structures...
*/
@@ -76,10 +68,6 @@ extern help_index_t *helpSearchIndex(help_index_t *hi, const char *query,
const char *filename);
# ifdef __cplusplus
}
# endif /* __cplusplus */
#endif /* !_CUPS_HELP_INDEX_H_ */
/*
+15 -27
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* Online help CGI for CUPS.
* Online help CGI for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -39,8 +39,7 @@ main(int argc, /* I - Number of command-line arguments */
const char *query; /* Search query */
const char *cache_dir; /* CUPS_CACHEDIR environment variable */
const char *docroot; /* CUPS_DOCROOT environment variable */
const char *helpfile, /* Current help file */
*helptitle = NULL; /* Current help title */
const char *helpfile; /* Current help file */
const char *topic; /* Current topic */
char topic_data[1024]; /* Topic form data */
const char *section; /* Current section */
@@ -64,7 +63,6 @@ main(int argc, /* I - Number of command-line arguments */
*/
cgiSetVariable("SECTION", "help");
cgiSetVariable("REFRESH_PAGE", "");
/*
* Load the help index...
@@ -89,7 +87,7 @@ main(int argc, /* I - Number of command-line arguments */
perror(filename);
cgiStartHTML(cgiText(_("Online Help")));
cgiSetVariable("ERROR", cgiText(_("Unable to load help index.")));
cgiSetVariable("ERROR", "Unable to load help index!");
cgiCopyTemplateLang("error.tmpl");
cgiEndHTML();
@@ -104,7 +102,7 @@ main(int argc, /* I - Number of command-line arguments */
*/
for (i = 0; i < argc; i ++)
fprintf(stderr, "DEBUG: argv[%d]=\"%s\"\n", i, argv[i]);
fprintf(stderr, "argv[%d]=\"%s\"\n", i, argv[i]);
if ((helpfile = getenv("PATH_INFO")) != NULL)
{
@@ -130,7 +128,7 @@ main(int argc, /* I - Number of command-line arguments */
perror(filename);
cgiStartHTML(cgiText(_("Online Help")));
cgiSetVariable("ERROR", cgiText(_("Unable to access help file.")));
cgiSetVariable("ERROR", "Unable to access help file!");
cgiCopyTemplateLang("error.tmpl");
cgiEndHTML();
@@ -140,7 +138,7 @@ main(int argc, /* I - Number of command-line arguments */
if ((n = helpFindNode(hi, helpfile, NULL)) == NULL)
{
cgiStartHTML(cgiText(_("Online Help")));
cgiSetVariable("ERROR", cgiText(_("Help file not in index.")));
cgiSetVariable("ERROR", "Help file not in index!");
cgiCopyTemplateLang("error.tmpl");
cgiEndHTML();
@@ -148,11 +146,12 @@ main(int argc, /* I - Number of command-line arguments */
}
/*
* Save the page title and help file...
* Set the page title and save the help file...
*/
helptitle = n->text;
topic = n->section;
cgiSetVariable("HELPFILE", helpfile);
cgiSetVariable("HELPTITLE", n->text);
cgiSetVariable("TOPIC", n->section);
/*
* Send a standard page header...
@@ -170,8 +169,6 @@ main(int argc, /* I - Number of command-line arguments */
*/
cgiStartHTML(cgiText(_("Online Help")));
topic = cgiGetVariable("TOPIC");
}
/*
@@ -182,18 +179,9 @@ main(int argc, /* I - Number of command-line arguments */
cgiSetVariable("QUERY", "");
query = cgiGetVariable("QUERY");
topic = cgiGetVariable("TOPIC");
si = helpSearchIndex(hi, query, topic, helpfile);
cgiClearVariables();
if (query)
cgiSetVariable("QUERY", query);
if (topic)
cgiSetVariable("TOPIC", topic);
if (helpfile)
cgiSetVariable("HELPFILE", helpfile);
if (helptitle)
cgiSetVariable("HELPTITLE", helptitle);
fprintf(stderr, "DEBUG: query=\"%s\", topic=\"%s\"\n",
query ? query : "(null)", topic ? topic : "(null)");
@@ -347,12 +335,12 @@ main(int argc, /* I - Number of command-line arguments */
{
if (inbody)
{
if (!_cups_strncasecmp(line, "</BODY>", 7))
if (!strncasecmp(line, "</BODY>", 7))
break;
printf("%s\n", line);
}
else if (!_cups_strncasecmp(line, "<BODY", 5))
else if (!strncasecmp(line, "<BODY", 5))
inbody = 1;
}
@@ -361,7 +349,7 @@ main(int argc, /* I - Number of command-line arguments */
else
{
perror(filename);
cgiSetVariable("ERROR", cgiText(_("Unable to open help file.")));
cgiSetVariable("ERROR", "Unable to open help file.");
cgiCopyTemplateLang("error.tmpl");
}
}
+26 -8
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* HTML support functions for CUPS.
* HTML support functions for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -208,13 +208,31 @@ cgiStartMultipart(void)
int /* O - 1 if multi-part supported, 0 otherwise */
cgiSupportsMultipart(void)
{
/*
* Too many bug reports for browsers that don't support it, and too much pain
* to whitelist known-good browsers, so for now we just punt on multi-part
* support... :(
*/
const char *user_agent; /* User-Agent string */
static int supports_multipart = -1;/* Cached value */
return (0);
if (supports_multipart < 0)
{
/*
* CUPS STR #3049: Apparently some browsers don't support multi-part
* documents, which makes them useless for many web sites. Rather than
* abandoning those users, we'll offer a degraded single-part mode...
*
* Currently we know that anything based on Gecko, MSIE, and Safari all
* work. We'll add more as they are reported/tested.
*/
if ((user_agent = getenv("HTTP_USER_AGENT")) != NULL &&
(strstr(user_agent, " Gecko/") != NULL ||
strstr(user_agent, " MSIE ") != NULL ||
strstr(user_agent, " Safari/") != NULL))
supports_multipart = 1;
else
supports_multipart = 0;
}
return (supports_multipart);
}
+33 -58
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* CGI <-> IPP variable routines for CUPS.
* CGI <-> IPP variable routines for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -129,7 +129,7 @@ cgiGetAttributes(ipp_t *request, /* I - IPP request */
*nameptr = '\0';
if (!strncmp(name, "printer_state_history", 21))
strlcpy(name, "printer_state_history", sizeof(name));
strcpy(name, "printer_state_history");
/*
* Possibly add it to the list of attributes...
@@ -285,14 +285,10 @@ cgiMoveJobs(http_t *http, /* I - Connection to server */
/*
* Make sure we have a username...
* See who is logged in...
*/
if ((user = getenv("REMOTE_USER")) == NULL)
{
puts("Status: 401\n");
exit(0);
}
user = getenv("REMOTE_USER");
/*
* See if the user has already selected a new destination...
@@ -337,7 +333,7 @@ cgiMoveJobs(http_t *http, /* I - Connection to server */
NULL, job_uri);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
"requested-attributes", NULL, "job-printer-uri");
if ((response = cupsDoRequest(http, request, "/")) != NULL)
{
if ((attr = ippFindAttribute(response, "job-printer-uri",
@@ -362,7 +358,7 @@ cgiMoveJobs(http_t *http, /* I - Connection to server */
*/
cgiStartHTML(cgiText(_("Move Job")));
cgiShowIPPError(_("Unable to find destination for job"));
cgiShowIPPError(_("Unable to find destination for job!"));
cgiEndHTML();
return;
}
@@ -404,7 +400,7 @@ cgiMoveJobs(http_t *http, /* I - Connection to server */
* If the name is not the same as the current destination, add it!
*/
if (_cups_strcasecmp(name, dest))
if (strcasecmp(name, dest))
{
cgiSetArray("JOB_PRINTER_URI", i, attr->values[0].string.text);
cgiSetArray("JOB_PRINTER_NAME", i, name);
@@ -554,7 +550,7 @@ cgiPrintCommand(http_t *http, /* I - Connection to server */
ipp_t *request, /* Get-Job-Attributes request */
*response; /* Get-Job-Attributes response */
ipp_attribute_t *attr; /* Current job attribute */
static const char * const job_attrs[] =/* Job attributes we want */
static const char const *job_attrs[] =/* Job attributes we want */
{
"job-state",
"job-printer-state-message"
@@ -595,7 +591,7 @@ cgiPrintCommand(http_t *http, /* I - Connection to server */
if ((job_id = cupsCreateJob(http, dest, title,
1, &hold_option)) < 1)
{
cgiSetVariable("MESSAGE", cgiText(_("Unable to send command to printer driver")));
cgiSetVariable("MESSAGE", cgiText(_("Unable to send command to printer driver!")));
cgiSetVariable("ERROR", cupsLastErrorString());
cgiStartHTML(title);
cgiCopyTemplateLang("error.tmpl");
@@ -615,7 +611,7 @@ cgiPrintCommand(http_t *http, /* I - Connection to server */
if (cupsLastError() >= IPP_REDIRECTION_OTHER_SITE)
{
cgiSetVariable("MESSAGE", cgiText(_("Unable to send command to printer driver")));
cgiSetVariable("MESSAGE", cgiText(_("Unable to send command to printer driver!")));
cgiSetVariable("ERROR", cupsLastErrorString());
cgiStartHTML(title);
cgiCopyTemplateLang("error.tmpl");
@@ -792,7 +788,7 @@ cgiPrintTestPage(http_t *http, /* I - Connection to server */
cgiStartHTML(cgiText(_("Print Test Page")));
if (cupsLastError() > IPP_OK_CONFLICT)
cgiShowIPPError(_("Unable to print test page"));
cgiShowIPPError(_("Unable to print test page:"));
else
{
cgiSetVariable("PRINTER_NAME", dest);
@@ -906,12 +902,12 @@ cgiRewriteURL(const char *uri, /* I - Current URI */
* Map local access to a local URI...
*/
if (!_cups_strcasecmp(hostname, "127.0.0.1") ||
!_cups_strcasecmp(hostname, "[::1]") ||
!_cups_strcasecmp(hostname, "localhost") ||
!_cups_strncasecmp(hostname, "localhost.", 10) ||
!_cups_strcasecmp(hostname, server) ||
!_cups_strcasecmp(hostname, servername))
if (!strcasecmp(hostname, "127.0.0.1") ||
!strcasecmp(hostname, "[::1]") ||
!strcasecmp(hostname, "localhost") ||
!strncasecmp(hostname, "localhost.", 10) ||
!strcasecmp(hostname, server) ||
!strcasecmp(hostname, servername))
{
/*
* Make URI relative to the current server...
@@ -930,7 +926,7 @@ cgiRewriteURL(const char *uri, /* I - Current URI */
ishttps ? "https" : "http",
userpass, hostname, port, resource);
else
snprintf(url, urlsize, "%s://%s:%d%s",
snprintf(url, urlsize, "%s://%s:%d%s",
ishttps ? "https" : "http",
hostname, port, resource);
}
@@ -1219,7 +1215,7 @@ cgiSetIPPObjectVars(
"%dx%d%s", attr->values[i].resolution.xres,
attr->values[i].resolution.yres,
attr->values[i].resolution.units == IPP_RES_PER_INCH ?
"dpi" : "dpcm");
"dpi" : "dpc");
break;
case IPP_TAG_URI :
@@ -1347,7 +1343,7 @@ cgiSetIPPVars(ipp_t *response, /* I - Response data to be copied... */
(filter->value_tag >= IPP_TAG_TEXTLANG &&
filter->value_tag <= IPP_TAG_MIMETYPE)) &&
filter->values[0].string.text != NULL &&
!_cups_strcasecmp(filter->values[0].string.text, filter_value))
!strcasecmp(filter->values[0].string.text, filter_value))
break;
if (!filter)
@@ -1402,9 +1398,7 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
int ascending, /* Order of jobs (0 = descending) */
first, /* First job to show */
count; /* Number of jobs */
const char *var, /* Form variable */
*query, /* Query string */
*section; /* Section in web interface */
const char *var; /* Form variable */
void *search; /* Search data */
char url[1024], /* Printer URI */
val[1024]; /* Form variable */
@@ -1432,7 +1426,7 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL,
"ipp://localhost/");
if ((which_jobs = cgiGetVariable("which_jobs")) != NULL && *which_jobs)
if ((which_jobs = cgiGetVariable("which_jobs")) != NULL)
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "which-jobs",
NULL, which_jobs);
@@ -1448,14 +1442,11 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
* Get a list of matching job objects.
*/
if ((query = cgiGetVariable("QUERY")) != NULL &&
if ((var = cgiGetVariable("QUERY")) != NULL &&
!cgiGetVariable("CLEAR"))
search = cgiCompileSearch(query);
search = cgiCompileSearch(var);
else
{
query = NULL;
search = NULL;
}
jobs = cgiGetIPPObjects(response, search);
count = cupsArrayCount(jobs);
@@ -1480,28 +1471,16 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
if (first < 0)
first = 0;
if ((var = cgiGetVariable("ORDER")) != NULL && *var)
ascending = !_cups_strcasecmp(var, "asc");
else
ascending = !which_jobs || !*which_jobs ||
!_cups_strcasecmp(which_jobs, "not-completed");
section = cgiGetVariable("SECTION");
cgiClearVariables();
if (query)
cgiSetVariable("QUERY", query);
cgiSetVariable("ORDER", ascending ? "asc" : "dec");
cgiSetVariable("SECTION", section);
sprintf(val, "%d", count);
cgiSetVariable("TOTAL", val);
if (which_jobs)
cgiSetVariable("WHICH_JOBS", which_jobs);
if ((var = cgiGetVariable("ORDER")) != NULL)
ascending = !strcasecmp(var, "asc");
else
{
ascending = !which_jobs || !strcasecmp(which_jobs, "not-completed");
cgiSetVariable("ORDER", ascending ? "asc" : "dec");
}
if (ascending)
{
@@ -1523,11 +1502,7 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
*/
if (dest)
{
snprintf(val, sizeof(val), "/%s/%s", section, dest);
cgiSetVariable("PRINTER_NAME", dest);
cgiSetVariable("PRINTER_URI_SUPPORTED", val);
}
snprintf(val, sizeof(val), "/%s/%s", cgiGetVariable("SECTION"), dest);
else
strlcpy(val, "/jobs/", sizeof(val));
+4 -5
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* Job status CGI for CUPS.
* Job status CGI for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -57,7 +57,6 @@ main(int argc, /* I - Number of command-line arguments */
*/
cgiSetVariable("SECTION", "jobs");
cgiSetVariable("REFRESH_PAGE", "");
/*
* Connect to the HTTP server...
@@ -182,7 +181,7 @@ do_job_op(http_t *http, /* I - HTTP connection */
char url[1024]; /* Encoded URL */
strlcpy(url, "5;URL=", sizeof(url));
strcpy(url, "5;URL=");
cgiFormEncode(url + 6, getenv("HTTP_REFERER"), sizeof(url) - 6);
cgiSetVariable("refresh_page", url);
}
@@ -195,7 +194,7 @@ do_job_op(http_t *http, /* I - HTTP connection */
cgiStartHTML(cgiText(_("Jobs")));
if (cupsLastError() > IPP_OK_CONFLICT)
cgiShowIPPError(_("Job operation failed"));
cgiShowIPPError(_("Job operation failed:"));
else if (op == IPP_CANCEL_JOB)
cgiCopyTemplateLang("job-cancel.tmpl");
else if (op == IPP_HOLD_JOB)
-3
Ver Arquivo
@@ -1,5 +1,4 @@
_cgiCheckVariables
_cgiClearVariables
_cgiCompileSearch
_cgiCopyTemplateFile
_cgiCopyTemplateLang
@@ -10,7 +9,6 @@ _cgiFormEncode
_cgiFreeSearch
_cgiGetArray
_cgiGetAttributes
_cgiGetCookie
_cgiGetFile
_cgiGetIPPObjects
_cgiGetSize
@@ -25,7 +23,6 @@ _cgiRewriteURL
_cgiSetArray
_cgiSetIPPObjectVars
_cgiSetIPPVars
_cgiSetCookie
_cgiSetServerVersion
_cgiSetSize
_cgiSetVariable
+6 -6
Ver Arquivo
@@ -3,7 +3,7 @@
*
* Xcode documentation set generator.
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -31,7 +31,7 @@
* Include necessary headers...
*/
#include "cgi-private.h"
#include "cgi.h"
#include <errno.h>
@@ -171,7 +171,7 @@ static int /* O - Result of comparison */
compare_html(_cups_html_t *a, /* I - First file */
_cups_html_t *b) /* I - Second file */
{
return (_cups_strcasecmp(a->title, b->title));
return (strcasecmp(a->title, b->title));
}
@@ -183,7 +183,7 @@ static int /* O - Result of comparison */
compare_sections(_cups_section_t *a, /* I - First section */
_cups_section_t *b) /* I - Second section */
{
return (_cups_strcasecmp(a->name, b->name));
return (strcasecmp(a->name, b->name));
}
@@ -201,7 +201,7 @@ compare_sections_files(
if (ret)
return (ret);
else
return (_cups_strcasecmp(a->name, b->name));
return (strcasecmp(a->name, b->name));
}
@@ -442,7 +442,7 @@ write_nodes(const char *path, /* I - File to write */
cupsFilePuts(fp, "<Subnodes>\n");
subnodes = 1;
}
cupsFilePrintf(fp, "<Node id=\"%d\">\n"
"<Path>Documentation/%s</Path>\n"
"<Anchor>%s</Anchor>\n"
+12 -27
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* Printer status CGI for CUPS.
* Printer status CGI for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -73,7 +73,6 @@ main(int argc, /* I - Number of command-line arguments */
*/
cgiSetVariable("SECTION", "printers");
cgiSetVariable("REFRESH_PAGE", "");
/*
* See if we are displaying a printer or all printers...
@@ -148,21 +147,7 @@ main(int argc, /* I - Number of command-line arguments */
}
else if (printer)
{
if (!*op)
{
const char *server_port = getenv("SERVER_PORT");
/* Port number string */
int port = atoi(server_port ? server_port : "0");
/* Port number */
char uri[1024]; /* URL */
httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri),
getenv("HTTPS") ? "https" : "http", NULL,
getenv("SERVER_NAME"), port, "/printers/%s", printer);
printf("Location: %s\n\n", uri);
}
else if (!strcmp(op, "start-printer"))
if (!strcmp(op, "start-printer"))
do_printer_op(http, printer, IPP_RESUME_PRINTER,
cgiText(_("Resume Printer")));
else if (!strcmp(op, "stop-printer"))
@@ -174,15 +159,15 @@ main(int argc, /* I - Number of command-line arguments */
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 (!_cups_strcasecmp(op, "print-self-test-page"))
else if (!strcasecmp(op, "print-self-test-page"))
cgiPrintCommand(http, printer, "PrintSelfTestPage",
cgiText(_("Print Self-Test Page")));
else if (!_cups_strcasecmp(op, "clean-print-heads"))
else if (!strcasecmp(op, "clean-print-heads"))
cgiPrintCommand(http, printer, "Clean all",
cgiText(_("Clean Print Heads")));
else if (!_cups_strcasecmp(op, "print-test-page"))
else if (!strcasecmp(op, "print-test-page"))
cgiPrintTestPage(http, printer);
else if (!_cups_strcasecmp(op, "move-jobs"))
else if (!strcasecmp(op, "move-jobs"))
cgiMoveJobs(http, printer, 0);
else
{
@@ -266,7 +251,7 @@ do_printer_op(http_t *http, /* I - HTTP connection */
else if (cupsLastError() > IPP_OK_CONFLICT)
{
cgiStartHTML(title);
cgiShowIPPError(_("Unable to do maintenance command"));
cgiShowIPPError(_("Unable to do maintenance command:"));
}
else
{
@@ -397,8 +382,8 @@ show_all_printers(http_t *http, /* I - Connection to server */
sprintf(val, "%d", count);
cgiSetVariable("TOTAL", val);
if ((var = cgiGetVariable("ORDER")) != NULL && *var)
ascending = !_cups_strcasecmp(var, "asc");
if ((var = cgiGetVariable("ORDER")) != NULL)
ascending = !strcasecmp(var, "asc");
else
ascending = 1;
@@ -464,7 +449,7 @@ show_all_printers(http_t *http, /* I - Connection to server */
* Show the error...
*/
cgiShowIPPError(_("Unable to get printer list"));
cgiShowIPPError(_("Unable to get printer list:"));
}
cgiEndHTML();
@@ -566,7 +551,7 @@ show_printer(http_t *http, /* I - Connection to server */
*/
cgiStartHTML(printer);
cgiShowIPPError(_("Unable to get printer status"));
cgiShowIPPError(_("Unable to get printer status:"));
}
cgiEndHTML();
+10 -10
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* Search routines for CUPS.
* Search routines for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -145,7 +145,7 @@ cgiCompileSearch(const char *query) /* I - Query string */
* Look for logic words: AND, OR
*/
if (wlen == 3 && !_cups_strncasecmp(qptr, "AND", 3))
if (wlen == 3 && !strncasecmp(qptr, "AND", 3))
{
/*
* Logical AND with the following text...
@@ -156,7 +156,7 @@ cgiCompileSearch(const char *query) /* I - Query string */
qptr = qend;
}
else if (wlen == 2 && !_cups_strncasecmp(qptr, "OR", 2))
else if (wlen == 2 && !strncasecmp(qptr, "OR", 2))
{
/*
* Logical OR with the following text...
@@ -208,7 +208,7 @@ cgiCompileSearch(const char *query) /* I - Query string */
* Add the prefix string...
*/
memcpy(sptr, prefix, strlen(prefix) + 1);
strcpy(sptr, prefix);
sptr += strlen(sptr);
/*
@@ -249,16 +249,16 @@ cgiCompileSearch(const char *query) /* I - Query string */
return (NULL);
}
memcpy(sptr, ".*|.*", 6);
strcpy(sptr, ".*|.*");
sptr += 5;
memcpy(sptr, lword2, strlen(lword2) + 1);
strcpy(sptr, lword2);
sptr += strlen(sptr);
memcpy(sptr, ".*", 3);
strcpy(sptr, ".*");
sptr += 2;
memcpy(sptr, lword, strlen(lword) + 1);
strcpy(sptr, lword);
sptr += strlen(sptr);
free(lword);
@@ -287,7 +287,7 @@ cgiCompileSearch(const char *query) /* I - Query string */
free(lword);
if (sptr > s)
memcpy(sptr, ".*", 3);
strcpy(sptr, ".*");
else
{
/*
+11 -34
Ver Arquivo
@@ -3,7 +3,7 @@
*
* CGI template function.
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -119,7 +119,7 @@ cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */
*locptr = '\0'; /* Strip charset */
}
fprintf(stderr, "DEBUG2: lang=\"%s\", locale=\"%s\"...\n",
fprintf(stderr, "DEBUG: lang=\"%s\", locale=\"%s\"...\n",
lang ? lang : "(null)", locale);
/*
@@ -369,20 +369,6 @@ cgi_copy(FILE *out, /* I - Output file */
continue;
}
else if (name[0] == '$')
{
/*
* Insert cookie value or nothing if not defined.
*/
if ((value = cgiGetCookie(name + 1)) != NULL)
outptr = value;
else
{
outval[0] = '\0';
outptr = outval;
}
}
else
{
/*
@@ -423,7 +409,7 @@ cgi_copy(FILE *out, /* I - Output file */
{
if (uriencode)
cgi_puturi(outptr, out);
else if (!_cups_strcasecmp(name, "?cupsdconf_default"))
else if (!strcasecmp(name, "?cupsdconf_default"))
fputs(outptr, stdout);
else
cgi_puts(outptr, out);
@@ -451,14 +437,7 @@ cgi_copy(FILE *out, /* I - Output file */
* Test for existance...
*/
if (name[0] == '?')
result = cgiGetArray(name + 1, element) != NULL;
else if (name[0] == '#')
result = cgiGetVariable(name + 1) != NULL;
else
result = cgiGetArray(name, element) != NULL;
result = result && outptr[0];
result = cgiGetArray(name, element) != NULL && outptr[0];
compare[0] = '\0';
}
else
@@ -536,16 +515,16 @@ cgi_copy(FILE *out, /* I - Output file */
switch (op)
{
case '<' :
result = _cups_strcasecmp(outptr, compare) < 0;
result = strcasecmp(outptr, compare) < 0;
break;
case '>' :
result = _cups_strcasecmp(outptr, compare) > 0;
result = strcasecmp(outptr, compare) > 0;
break;
case '=' :
result = _cups_strcasecmp(outptr, compare) == 0;
result = strcasecmp(outptr, compare) == 0;
break;
case '!' :
result = _cups_strcasecmp(outptr, compare) != 0;
result = strcasecmp(outptr, compare) != 0;
break;
case '~' :
fprintf(stderr, "DEBUG: Regular expression \"%s\"\n", compare);
@@ -664,7 +643,7 @@ cgi_puts(const char *s, /* I - String to output */
* Pass <A HREF="url"> and </A>, otherwise quote it...
*/
if (!_cups_strncasecmp(s, "<A HREF=\"", 9))
if (!strncasecmp(s, "<A HREF=\"", 9))
{
fputs("<A HREF=\"", out);
s += 9;
@@ -684,7 +663,7 @@ cgi_puts(const char *s, /* I - String to output */
fputs("\">", out);
}
else if (!_cups_strncasecmp(s, "</A>", 4))
else if (!strncasecmp(s, "</A>", 4))
{
fputs("</A>", out);
s += 3;
@@ -696,8 +675,6 @@ cgi_puts(const char *s, /* I - String to output */
fputs("&gt;", out);
else if (*s == '\"')
fputs("&quot;", out);
else if (*s == '\'')
fputs("&#39;", out);
else if (*s == '&')
fputs("&amp;", out);
else
@@ -718,7 +695,7 @@ cgi_puturi(const char *s, /* I - String to output */
{
while (*s)
{
if (strchr("%@&+ <>#=", *s) || *s < ' ' || *s & 128)
if (strchr("%&+ <>#=", *s) || *s & 128)
fprintf(out, "%%%02X", *s & 255);
else
putc(*s, out);
+3 -3
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* CGI test program for CUPS.
* CGI test program for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 2007 by Apple Inc.
* Copyright 1997-2005 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -61,7 +61,7 @@ main(int argc, /* I - Number of command-line arguments */
}
else
puts("FAIL (init)");
/*
* Return with no errors...
*/
+2 -2
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* Help index test program for CUPS.
* Help index test program for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 2007 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
+2 -2
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* CGI template test program for CUPS.
* CGI template test program for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 2007 by Apple Inc.
* Copyright 2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
+40 -299
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* CGI form variable and array functions for CUPS.
* CGI form variable and array functions.
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2005 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -14,49 +14,31 @@
*
* 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.
* cgiCheckVariables() - Check for the presence of "required" variables.
* cgiGetArray() - Get an element from a form array...
* 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".
* 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.
* 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_find_variable() - Find a variable...
* 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_passwd() - Catch authentication requests and notify the server.
* cgi_sort_variables() - Sort all form variables for faster lookup.
* cgi_unlink_file() - Remove the uploaded form.
*/
/*#define DEBUG*/
#include "cgi-private.h"
#include <cups/http.h>
#include <cups/md5-private.h>
/*
* Session ID name
*/
#define CUPS_SID "org.cups.sid"
#include <errno.h>
/*
@@ -76,8 +58,6 @@ typedef struct /**** Form variable structure ****/
* Local globals...
*/
static int num_cookies = 0;/* Number of cookies */
static cups_option_t *cookies = NULL;/* Cookies */
static int form_count = 0, /* Form variable count */
form_alloc = 0; /* Number of variables allocated */
static _cgi_var_t *form_vars = NULL;
@@ -95,13 +75,11 @@ static void cgi_add_variable(const char *name, int element,
static int cgi_compare_variables(const _cgi_var_t *v1,
const _cgi_var_t *v2);
static _cgi_var_t *cgi_find_variable(const char *name);
static void cgi_initialize_cookies(void);
static int cgi_initialize_get(void);
static int cgi_initialize_multipart(const char *boundary);
static int cgi_initialize_post(void);
static int cgi_initialize_string(const char *data);
static const char *cgi_passwd(const char *prompt);
static const char *cgi_set_sid(void);
static void cgi_sort_variables(void);
static void cgi_unlink_file(void);
@@ -157,34 +135,7 @@ cgiCheckVariables(const char *names) /* I - Variables to look for */
/*
* 'cgiClearVariables()' - Clear all form variables.
*/
void
cgiClearVariables(void)
{
int i, j; /* Looping vars */
_cgi_var_t *v; /* Current variable */
fputs("DEBUG: cgiClearVariables called.\n", stderr);
for (v = form_vars, i = form_count; i > 0; v ++, i --)
{
_cupsStrFree(v->name);
for (j = 0; j < v->nvalues; j ++)
if (v->values[j])
_cupsStrFree(v->values[j]);
}
form_count = 0;
cgi_unlink_file();
}
/*
* 'cgiGetArray()' - Get an element from a form array.
* 'cgiGetArray()' - Get an element from a form array...
*/
const char * /* O - Element value or NULL */
@@ -200,18 +151,7 @@ cgiGetArray(const char *name, /* I - Name of array variable */
if (element < 0 || element >= var->nvalues)
return (NULL);
return (_cupsStrRetain(var->values[element]));
}
/*
* 'cgiGetCookie()' - Get a cookie value.
*/
const char * /* O - Value or NULL */
cgiGetCookie(const char *name) /* I - Name of cookie */
{
return (cupsGetOption(name, num_cookies, cookies));
return (var->values[element]);
}
@@ -244,10 +184,10 @@ cgiGetSize(const char *name) /* I - Name of variable */
/*
* 'cgiGetVariable()' - Get a CGI variable from the database.
* 'cgiGetVariable()' - Get a CGI variable from the database...
*
* Returns NULL if the variable doesn't exist. If the variable is an
* array of values, returns the last element.
* array of values, returns the last element...
*/
const char * /* O - Value of variable */
@@ -266,21 +206,19 @@ cgiGetVariable(const char *name) /* I - Name of variable */
var->values[var->nvalues - 1]));
#endif /* DEBUG */
return ((var == NULL) ? NULL : _cupsStrRetain(var->values[var->nvalues - 1]));
return ((var == NULL) ? NULL : var->values[var->nvalues - 1]);
}
/*
* 'cgiInitialize()' - Initialize the CGI variable "database".
* 'cgiInitialize()' - Initialize the CGI variable "database"...
*/
int /* O - Non-zero if there was form data */
cgiInitialize(void)
{
const char *method, /* Form posting method */
*content_type, /* Content-Type of post data */
*cups_sid_cookie, /* SID cookie */
*cups_sid_form; /* SID form variable */
const char *method; /* Form posting method */
const char *content_type; /* Content-Type of post data */
/*
@@ -303,20 +241,6 @@ cgiInitialize(void)
setbuf(stdout, NULL);
#endif /* DEBUG */
/*
* Get cookies...
*/
cgi_initialize_cookies();
if ((cups_sid_cookie = cgiGetCookie(CUPS_SID)) == NULL)
{
fputs("DEBUG: " CUPS_SID " cookie not found, initializing!\n", stderr);
cups_sid_cookie = cgi_set_sid();
}
fprintf(stderr, "DEBUG: " CUPS_SID " cookie is \"%s\"\n", cups_sid_cookie);
/*
* Get the request method (GET or POST)...
*/
@@ -330,9 +254,9 @@ cgiInitialize(void)
* Grab form data from the corresponding location...
*/
if (!_cups_strcasecmp(method, "GET"))
if (!strcasecmp(method, "GET"))
return (cgi_initialize_get());
else if (!_cups_strcasecmp(method, "POST") && content_type)
else if (!strcasecmp(method, "POST") && content_type)
{
const char *boundary = strstr(content_type, "boundary=");
@@ -340,27 +264,9 @@ cgiInitialize(void)
boundary += 9;
if (content_type && !strncmp(content_type, "multipart/form-data; ", 21))
{
if (!cgi_initialize_multipart(boundary))
return (0);
}
else if (!cgi_initialize_post())
return (0);
if ((cups_sid_form = cgiGetVariable(CUPS_SID)) == NULL ||
strcmp(cups_sid_cookie, cups_sid_form))
{
if (cups_sid_form)
fprintf(stderr, "DEBUG: " CUPS_SID " form variable is \"%s\"\n",
cups_sid_form);
else
fputs("DEBUG: " CUPS_SID " form variable is not present.\n", stderr);
cgiClearVariables();
return (0);
}
return (cgi_initialize_multipart(boundary));
else
return (1);
return (cgi_initialize_post());
}
else
return (0);
@@ -403,8 +309,6 @@ cgiSetArray(const char *name, /* I - Name of variable */
if (name == NULL || value == NULL || element < 0 || element > 100000)
return;
fprintf(stderr, "DEBUG: cgiSetArray: %s[%d]=\"%s\"\n", name, element, value);
if ((var = cgi_find_variable(name)) == NULL)
{
cgi_add_variable(name, element, value);
@@ -433,45 +337,13 @@ cgiSetArray(const char *name, /* I - Name of variable */
var->nvalues = element + 1;
}
else if (var->values[element])
_cupsStrFree((char *)var->values[element]);
free((char *)var->values[element]);
var->values[element] = _cupsStrAlloc(value);
var->values[element] = strdup(value);
}
}
/*
* 'cgiSetCookie()' - Set a cookie value.
*/
void
cgiSetCookie(const char *name, /* I - Name */
const char *value, /* I - Value */
const char *path, /* I - Path (typically "/") */
const char *domain, /* I - Domain name */
time_t expires, /* I - Expiration date (0 for session) */
int secure) /* I - Require SSL */
{
num_cookies = cupsAddOption(name, value, num_cookies, &cookies);
printf("Set-Cookie: %s=%s;", name, value);
if (path)
printf(" path=%s;", path);
if (domain)
printf(" domain=%s;", domain);
if (expires)
{
char date[256]; /* Date string */
printf(" expires=%s;", httpGetDateString2(expires, date, sizeof(date)));
}
if (secure)
puts(" secure;");
else
putchar('\n');
}
/*
* 'cgiSetSize()' - Set the array size.
*/
@@ -512,7 +384,7 @@ cgiSetSize(const char *name, /* I - Name of variable */
{
for (i = size; i < var->nvalues; i ++)
if (var->values[i])
_cupsStrFree((void *)(var->values[i]));
free((void *)(var->values[i]));
}
var->nvalues = size;
@@ -520,7 +392,7 @@ cgiSetSize(const char *name, /* I - Name of variable */
/*
* 'cgiSetVariable()' - Set a CGI variable in the database.
* 'cgiSetVariable()' - Set a CGI variable in the database...
*
* If the variable is an array, this truncates the array to a single element.
*/
@@ -536,8 +408,6 @@ cgiSetVariable(const char *name, /* I - Name of variable */
if (name == NULL || value == NULL)
return;
fprintf(stderr, "cgiSetVariable: %s=\"%s\"\n", name, value);
if ((var = cgi_find_variable(name)) == NULL)
{
cgi_add_variable(name, 0, value);
@@ -547,9 +417,9 @@ cgiSetVariable(const char *name, /* I - Name of variable */
{
for (i = 0; i < var->nvalues; i ++)
if (var->values[i])
_cupsStrFree((char *)var->values[i]);
free((char *)var->values[i]);
var->values[0] = _cupsStrAlloc(value);
var->values[0] = strdup(value);
var->nvalues = 1;
}
}
@@ -595,10 +465,10 @@ cgi_add_variable(const char *name, /* I - Variable name */
if ((var->values = calloc(element + 1, sizeof(char *))) == NULL)
return;
var->name = _cupsStrAlloc(name);
var->name = strdup(name);
var->nvalues = element + 1;
var->avalues = element + 1;
var->values[element] = _cupsStrAlloc(value);
var->values[element] = strdup(value);
form_count ++;
}
@@ -613,12 +483,12 @@ cgi_compare_variables(
const _cgi_var_t *v1, /* I - First variable */
const _cgi_var_t *v2) /* I - Second variable */
{
return (_cups_strcasecmp(v1->name, v2->name));
return (strcasecmp(v1->name, v2->name));
}
/*
* 'cgi_find_variable()' - Find a variable.
* 'cgi_find_variable()' - Find a variable...
*/
static _cgi_var_t * /* O - Variable pointer or NULL */
@@ -637,91 +507,6 @@ cgi_find_variable(const char *name) /* I - Name of variable */
}
/*
* 'cgi_initialize_cookies()' - Initialize cookies.
*/
static void
cgi_initialize_cookies(void)
{
const char *cookie; /* HTTP_COOKIE environment variable */
char name[128], /* Name string */
value[512], /* Value string */
*ptr; /* Pointer into name/value */
if ((cookie = getenv("HTTP_COOKIE")) == NULL)
return;
while (*cookie)
{
/*
* Skip leading whitespace...
*/
while (isspace(*cookie & 255))
cookie ++;
if (!*cookie)
break;
/*
* Copy the name...
*/
for (ptr = name; *cookie && *cookie != '=';)
if (ptr < (name + sizeof(name) - 1))
*ptr++ = *cookie++;
else
break;
if (*cookie != '=')
break;
*ptr = '\0';
cookie ++;
/*
* Then the value...
*/
if (*cookie == '\"')
{
for (cookie ++, ptr = value; *cookie && *cookie != '\"';)
if (ptr < (value + sizeof(value) - 1))
*ptr++ = *cookie++;
else
break;
if (*cookie == '\"')
cookie ++;
}
else
{
for (ptr = value; *cookie && *cookie != ';';)
if (ptr < (value + sizeof(value) - 1))
*ptr++ = *cookie++;
else
break;
}
if (*cookie == ';')
cookie ++;
else if (*cookie)
break;
*ptr = '\0';
/*
* Then add the cookie to an array as long as the name doesn't start with
* "$"...
*/
if (name[0] != '$')
num_cookies = cupsAddOption(name, value, num_cookies, &cookies);
}
}
/*
* 'cgi_initialize_get()' - Initialize form variables using the GET method.
*/
@@ -751,8 +536,7 @@ cgi_initialize_get(void)
/*
* 'cgi_initialize_multipart()' - Initialize variables and file using the POST
* method.
* 'cgi_initialize_multipart()' - Initialize variables and file using the POST method.
*
* TODO: Update to support files > 2GB.
*/
@@ -830,7 +614,7 @@ cgi_initialize_multipart(
/*
* Copy file data to the temp file...
*/
ptr = line;
while ((ch = getchar()) != EOF)
@@ -934,7 +718,7 @@ cgi_initialize_multipart(
filename[0] = '\0';
mimetype[0] = '\0';
}
else if (!_cups_strncasecmp(line, "Content-Disposition:", 20))
else if (!strncasecmp(line, "Content-Disposition:", 20))
{
if ((ptr = strstr(line + 20, " name=\"")) != NULL)
{
@@ -952,7 +736,7 @@ cgi_initialize_multipart(
*ptr = '\0';
}
}
else if (!_cups_strncasecmp(line, "Content-Type:", 13))
else if (!strncasecmp(line, "Content-Type:", 13))
{
for (ptr = line + 13; isspace(*ptr & 255); ptr ++);
@@ -1064,7 +848,7 @@ cgi_initialize_string(const char *data) /* I - Form data string */
char *s, /* Pointer to current form string */
ch, /* Temporary character */
name[255], /* Name of form variable */
value[65536]; /* Variable value */
value[65536]; /* Variable value... */
/*
@@ -1117,9 +901,6 @@ cgi_initialize_string(const char *data) /* I - Form data string */
* Read the hex code...
*/
if (!isxdigit(data[1] & 255) || !isxdigit(data[2] & 255))
return (0);
if (s < (value + sizeof(value) - 1))
{
data ++;
@@ -1207,46 +988,6 @@ cgi_passwd(const char *prompt) /* I - Prompt (not used) */
}
/*
* 'cgi_set_sid()' - Set the CUPS session ID.
*/
static const char * /* O - New session ID */
cgi_set_sid(void)
{
char buffer[512], /* SID data */
sid[33]; /* SID string */
_cups_md5_state_t md5; /* MD5 state */
unsigned char sum[16]; /* MD5 sum */
const char *remote_addr, /* REMOTE_ADDR */
*server_name, /* SERVER_NAME */
*server_port; /* SERVER_PORT */
if ((remote_addr = getenv("REMOTE_ADDR")) == NULL)
remote_addr = "REMOTE_ADDR";
if ((server_name = getenv("SERVER_NAME")) == NULL)
server_name = "SERVER_NAME";
if ((server_port = getenv("SERVER_PORT")) == NULL)
server_port = "SERVER_PORT";
CUPS_SRAND(time(NULL));
snprintf(buffer, sizeof(buffer), "%s:%s:%s:%02X%02X%02X%02X%02X%02X%02X%02X",
remote_addr, server_name, server_port,
(unsigned)CUPS_RAND() & 255, (unsigned)CUPS_RAND() & 255,
(unsigned)CUPS_RAND() & 255, (unsigned)CUPS_RAND() & 255,
(unsigned)CUPS_RAND() & 255, (unsigned)CUPS_RAND() & 255,
(unsigned)CUPS_RAND() & 255, (unsigned)CUPS_RAND() & 255);
_cupsMD5Init(&md5);
_cupsMD5Append(&md5, (unsigned char *)buffer, (int)strlen(buffer));
_cupsMD5Finish(&md5, sum);
cgiSetCookie(CUPS_SID, httpMD5String(sum, sid), "/", NULL, 0, 0);
return (cupsGetOption(CUPS_SID, num_cookies, cookies));
}
/*
* 'cgi_sort_variables()' - Sort all form variables for faster lookup.
*/
+4 -4
Ver Arquivo
@@ -1,9 +1,9 @@
#
# "$Id$"
#
# Configuration file makefile for CUPS.
# Configuration file makefile for the Common UNIX Printing System (CUPS).
#
# Copyright 2007-2012 by Apple Inc.
# Copyright 2007-2008 by Apple Inc.
# Copyright 1993-2006 by Easy Software Products.
#
# These coded instructions, statements, and computer programs are the
@@ -19,7 +19,7 @@ include ../Makedefs
# Config files...
#
KEEP = cups-files.conf cupsd.conf snmp.conf
KEEP = cupsd.conf snmp.conf
REPLACE = mime.convs mime.types
@@ -90,7 +90,7 @@ install-data:
done
-if test x$(PAMDIR) != x; then \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(PAMDIR); \
if test -r $(BUILDROOT)$(PAMDIR)/cups ; then \
if test -r $(BUILDROOT)$(PAMDIR)/cups/$(PAMFILE) ; then \
$(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.N ; \
else \
$(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups ; \
-98
Ver Arquivo
@@ -1,98 +0,0 @@
#
# "$Id$"
#
# Sample file/directory/user/group configuration file for the CUPS scheduler.
# See "man cups-files.conf" for a complete description of this file.
#
# List of events that are considered fatal errors for the scheduler...
#FatalErrors @CUPS_FATAL_ERRORS@
# Default user and group for filters/backends/helper programs; this cannot be
# any user or group that resolves to ID 0 for security reasons...
#User @CUPS_USER@
#Group @CUPS_GROUP@
# Administrator user group, used to match @SYSTEM in cupsd.conf policy rules...
SystemGroup @CUPS_SYSTEM_GROUPS@
@CUPS_SYSTEM_AUTHKEY@
# User that is substituted for unauthenticated (remote) root accesses...
#RemoteRoot remroot
# Do we allow file: device URIs other than to /dev/null?
#FileDevice No
# Permissions for configuration and log files...
#ConfigFilePerm 0@CUPS_CONFIG_FILE_PERM@
#LogFilePerm 0@CUPS_LOG_FILE_PERM@
# Location of the file logging all access to the scheduler; may be the name
# "syslog". If not an absolute path, the value of ServerRoot is used as the
# root directory. Also see the "AccessLogLevel" directive in cupsd.conf.
AccessLog @CUPS_LOGDIR@/access_log
# Location of cache files used by the scheduler...
#CacheDir @CUPS_CACHEDIR@
# Location of data files used by the scheduler...
#DataDir @CUPS_DATADIR@
# Location of the static web content served by the scheduler...
#DocumentRoot @CUPS_DOCROOT@
# Location of the file logging all messages produced by the scheduler and any
# helper programs; may be the name "syslog". If not an absolute path, the value
# of ServerRoot is used as the root directory. Also see the "LogLevel"
# directive in cupsd.conf.
ErrorLog @CUPS_LOGDIR@/error_log
# Location of fonts used by older print filters...
#FontPath @CUPS_FONTPATH@
# Location of LPD configuration
#LPDConfigFile @CUPS_DEFAULT_LPD_CONFIG_FILE@
# Location of the file logging all pages printed by the scheduler and any
# helper programs; may be the name "syslog". If not an absolute path, the value
# of ServerRoot is used as the root directory. Also see the "PageLogFormat"
# directive in cupsd.conf.
PageLog @CUPS_LOGDIR@/page_log
# Location of the file listing all of the local printers...
#Printcap @CUPS_DEFAULT_PRINTCAP@
# Format of the Printcap file...
#PrintcapFormat bsd
#PrintcapFormat plist
#PrintcapFormat solaris
# Location of all spool files...
#RequestRoot @CUPS_REQUESTS@
# Location of helper programs...
#ServerBin @CUPS_SERVERBIN@
# SSL/TLS certificate for the scheduler...
#ServerCertificate @CUPS_SERVERCERT@
# SSL/TLS private key for the scheduler...
#ServerKey @CUPS_SERVERKEY@
# Location of other configuration files...
#ServerRoot @CUPS_SERVERROOT@
# Location of Samba configuration file...
#SMBConfigFile @CUPS_DEFAULT_SMB_CONFIG_FILE@
# Location of scheduler state files...
#StateDir @CUPS_STATEDIR@
# Location of scheduler/helper temporary files. This directory is emptied on
# scheduler startup and cannot be one of the standard (public) temporary
# directory locations for security reasons...
#TempDir @CUPS_REQUESTS@/tmp
#
# End of "$Id$".
#
+11 -24
Ver Arquivo
@@ -9,20 +9,23 @@
# for troubleshooting...
LogLevel @CUPS_LOG_LEVEL@
# Administrator user group...
SystemGroup @CUPS_SYSTEM_GROUPS@
@CUPS_SYSTEM_AUTHKEY@
# Only listen for connections from the local machine.
Listen localhost:@DEFAULT_IPP_PORT@
@CUPS_LISTEN_DOMAINSOCKET@
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols @CUPS_BROWSE_LOCAL_PROTOCOLS@
# Default authentication type, when authentication is required...
DefaultAuthType Basic
# Web interface setting...
WebInterface @CUPS_WEBIF@
# Restrict access to the server...
<Location />
Order allow,deny
@@ -42,18 +45,8 @@ WebInterface @CUPS_WEBIF@
# Set the default printer/job policies...
<Policy default>
# Job/subscription privacy...
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI Validate-Job>
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
@@ -66,7 +59,7 @@ WebInterface @CUPS_WEBIF@
</Limit>
# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @CUPS_DEFAULT_PRINTOPERATOR_AUTH@
Order deny,allow
@@ -85,19 +78,13 @@ WebInterface @CUPS_WEBIF@
# Set the authenticated printer/job policies...
<Policy authenticated>
# Job/subscription privacy...
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI Validate-Job>
<Limit Create-Job Print-Job Print-URI>
AuthType Default
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
@@ -111,7 +98,7 @@ WebInterface @CUPS_WEBIF@
</Limit>
# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @CUPS_DEFAULT_PRINTOPERATOR_AUTH@
Order deny,allow
+44 -4
Ver Arquivo
@@ -5,9 +5,9 @@
# VERSIONS OF CUPS. Instead, create a "local.convs" file that
# reflects your local configuration changes.
#
# Base MIME conversions file for CUPS.
# MIME converts file for the Common UNIX Printing System (CUPS).
#
# Copyright 2007-2011 by Apple Inc.
# Copyright 2007-2009 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products.
#
# These coded instructions, statements, and computer programs are the
@@ -38,15 +38,55 @@
# PostScript filters
#
application/pdf application/vnd.cups-postscript 66 pdftops
application/postscript application/vnd.cups-postscript 66 pstops
application/vnd.hp-HPGL application/postscript 66 hpgltops
application/x-cshell application/postscript 33 texttops
application/x-csource application/postscript 33 texttops
application/x-perl application/postscript 33 texttops
application/x-shell application/postscript 33 texttops
text/plain application/postscript 33 texttops
text/html application/postscript 33 texttops
image/gif application/vnd.cups-postscript 66 imagetops
image/png application/vnd.cups-postscript 66 imagetops
image/jpeg application/vnd.cups-postscript 66 imagetops
image/tiff application/vnd.cups-postscript 66 imagetops
image/x-bitmap application/vnd.cups-postscript 66 imagetops
image/x-photocd application/vnd.cups-postscript 66 imagetops
image/x-portable-anymap application/vnd.cups-postscript 66 imagetops
image/x-portable-bitmap application/vnd.cups-postscript 66 imagetops
image/x-portable-graymap application/vnd.cups-postscript 66 imagetops
image/x-portable-pixmap application/vnd.cups-postscript 66 imagetops
image/x-sgi-rgb application/vnd.cups-postscript 66 imagetops
image/x-xbitmap application/vnd.cups-postscript 66 imagetops
image/x-xpixmap application/vnd.cups-postscript 66 imagetops
#image/x-xwindowdump application/vnd.cups-postscript 66 imagetops
image/x-sun-raster application/vnd.cups-postscript 66 imagetops
application/vnd.cups-banner application/postscript 33 bannertops
########################################################################
#
# Raster filters...
#
# PWG Raster filter for IPP Everywhere...
application/vnd.cups-raster image/pwg-raster 100 rastertopwg
image/gif application/vnd.cups-raster 100 imagetoraster
image/png application/vnd.cups-raster 100 imagetoraster
image/jpeg application/vnd.cups-raster 100 imagetoraster
image/tiff application/vnd.cups-raster 100 imagetoraster
image/x-bitmap application/vnd.cups-raster 100 imagetoraster
image/x-photocd application/vnd.cups-raster 100 imagetoraster
image/x-portable-anymap application/vnd.cups-raster 100 imagetoraster
image/x-portable-bitmap application/vnd.cups-raster 100 imagetoraster
image/x-portable-graymap application/vnd.cups-raster 100 imagetoraster
image/x-portable-pixmap application/vnd.cups-raster 100 imagetoraster
image/x-sgi-rgb application/vnd.cups-raster 100 imagetoraster
image/x-xbitmap application/vnd.cups-raster 100 imagetoraster
image/x-xpixmap application/vnd.cups-raster 100 imagetoraster
#image/x-xwindowdump application/vnd.cups-raster 100 imagetoraster
image/x-sun-raster application/vnd.cups-raster 100 imagetoraster
# pstoraster is part of GPL Ghostscript...
application/vnd.cups-postscript application/vnd.cups-raster 100 pstoraster
########################################################################
#
+12 -5
Ver Arquivo
@@ -1,13 +1,13 @@
#
# "$Id$"
# "$Id: mime.types 8783 2009-08-28 17:51:05Z mike $"
#
# Base MIME types file for CUPS.
# MIME types file for the Common UNIX Printing System (CUPS).
#
# DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
# VERSIONS OF CUPS. Instead, create a "local.types" file that
# reflects your local configuration changes.
#
# Copyright 2007-2011 by Apple Inc.
# Copyright 2007-2009 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products.
#
# These coded instructions, statements, and computer programs are the
@@ -79,6 +79,14 @@ application/postscript ai eps ps string(0,%!) string(0,<04>%!) \
contains(0,4096,"LANGUAGE = POSTSCRIPT") \
(contains(0,4096,<0a>%!) + \
!contains(0,4096,"ENTER LANGUAGE")))
application/vnd.hp-HPGL hpgl \
string(0,<1B>E<1B>%0B) \
string(0,<1B>%-1B) string(0,<201B>)\
string(0,BP;) string(0,IN;) string(0,DF;) \
string(0,BPINPS;) \
(contains(0,128,<1B>%-12345X) + \
(contains(0,4096,"LANGUAGE=HPGL") \
contains(0,4096,"LANGUAGE = HPGL")))
########################################################################
#
@@ -92,7 +100,6 @@ 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/tiff tiff tif string(0,MM<002A>) string(0,II<2A00>)
image/x-photocd pcd string(2048,PCD_IPI)
image/x-portable-anymap pnm
@@ -170,5 +177,5 @@ application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
application/octet-stream
#
# End of "$Id$".
# End of "$Id: mime.types 8783 2009-08-28 17:51:05Z mike $".
#
+3
Ver Arquivo
@@ -0,0 +1,3 @@
#%PAM-1.0
auth required pam_unix.so shadow nodelay nullok
account required pam_unix.so
+1 -1
Ver Arquivo
@@ -1,2 +1,2 @@
auth required @PAMMODAUTH@
auth required @PAMMOD@ nullok shadow
account required @PAMMOD@
+1 -1
Ver Arquivo
@@ -1,7 +1,7 @@
#
# "$Id$"
#
# Sample SNMP configuration file for CUPS. See "man cups-snmp.conf" for a
# Sample SNMP configuration file for CUPS. See "man cups-smnp.conf" for a
# complete description of this file.
#
+140
Ver Arquivo
@@ -0,0 +1,140 @@
dnl
dnl "$Id: cups-3264.m4 8524 2009-04-19 21:18:45Z mike $"
dnl
dnl 32/64-bit library support stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2009 by Apple Inc.
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
dnl Setup support for separate 32/64-bit library generation...
AC_ARG_ENABLE(32bit, [ --enable-32bit generate 32-bit libraries on 32/64-bit systems])
INSTALL32=""
LIB32CUPS=""
LIB32CUPSIMAGE=""
LIB32DIR=""
UNINSTALL32=""
AC_SUBST(INSTALL32)
AC_SUBST(LIB32CUPS)
AC_SUBST(LIB32CUPSIMAGE)
AC_SUBST(LIB32DIR)
AC_SUBST(UNINSTALL32)
AC_ARG_ENABLE(64bit, [ --enable-64bit generate 64-bit libraries on 32/64-bit systems])
INSTALL64=""
LIB64CUPS=""
LIB64CUPSIMAGE=""
LIB64DIR=""
UNINSTALL64=""
AC_SUBST(INSTALL64)
AC_SUBST(LIB64CUPS)
AC_SUBST(LIB64CUPSIMAGE)
AC_SUBST(LIB64DIR)
AC_SUBST(UNINSTALL64)
case "$uname" in
HP-UX*)
if test "x$enable_32bit" = xyes; then
# Build 32-bit libraries, 64-bit base...
INSTALL32="install32bit"
LIB32CUPS="32bit/libcups.so.2"
LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
LIB32DIR="$exec_prefix/lib"
if test -d /usr/lib/hpux32; then
LIB32DIR="${LIB32DIR}/hpux32"
fi
UNINSTALL32="uninstall32bit"
fi
if test "x$enable_64bit" = xyes; then
# Build 64-bit libraries, 32-bit base...
INSTALL64="install64bit"
LIB64CUPS="64bit/libcups.so.2"
LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
LIB64DIR="$exec_prefix/lib"
if test -d /usr/lib/hpux64; then
LIB64DIR="${LIB64DIR}/hpux64"
fi
UNINSTALL64="uninstall64bit"
fi
;;
IRIX)
if test "x$enable_32bit" = xyes; then
INSTALL32="install32bit"
LIB32CUPS="32bit/libcups.so.2"
LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
LIB32DIR="$prefix/lib32"
UNINSTALL32="uninstall32bit"
fi
if test "x$enable_64bit" = xyes; then
# Build 64-bit libraries, 32-bit base...
INSTALL64="install64bit"
LIB64CUPS="64bit/libcups.so.2"
LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
LIB64DIR="$prefix/lib64"
UNINSTALL64="uninstall64bit"
fi
;;
Linux*)
if test "x$enable_32bit" = xyes; then
# Build 32-bit libraries, 64-bit base...
INSTALL32="install32bit"
LIB32CUPS="32bit/libcups.so.2"
LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
LIB32DIR="$exec_prefix/lib"
if test -d /usr/lib32; then
LIB32DIR="${LIB32DIR}32"
fi
UNINSTALL32="uninstall32bit"
fi
if test "x$enable_64bit" = xyes; then
# Build 64-bit libraries, 32-bit base...
INSTALL64="install64bit"
LIB64CUPS="64bit/libcups.so.2"
LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
LIB64DIR="$exec_prefix/lib"
if test -d /usr/lib64; then
LIB64DIR="${LIB64DIR}64"
fi
UNINSTALL64="uninstall64bit"
fi
;;
SunOS*)
if test "x$enable_32bit" = xyes; then
# Build 32-bit libraries, 64-bit base...
INSTALL32="install32bit"
LIB32CUPS="32bit/libcups.so.2"
LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
LIB32DIR="$exec_prefix/lib/32"
UNINSTALL32="uninstall32bit"
fi
if test "x$enable_64bit" = xyes; then
# Build 64-bit libraries, 32-bit base...
INSTALL64="install64bit"
LIB64CUPS="64bit/libcups.so.2"
LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
LIB64DIR="$exec_prefix/lib/64"
UNINSTALL64="uninstall64bit"
fi
;;
esac
dnl
dnl End of "$Id: cups-3264.m4 8524 2009-04-19 21:18:45Z mike $".
dnl
+58 -162
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-common.m4 8783 2009-08-28 17:51:05Z mike $"
dnl
dnl Common configuration stuff for CUPS.
dnl Common configuration stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2013 by Apple Inc.
dnl Copyright 2007-2009 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
@@ -20,7 +20,7 @@ dnl Set the name of the config header file...
AC_CONFIG_HEADER(config.h)
dnl Version number information...
CUPS_VERSION="1.7b1"
CUPS_VERSION="1.4.1"
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'`"
@@ -44,13 +44,13 @@ LDFLAGS="${LDFLAGS:=}"
dnl Checks for programs...
AC_PROG_AWK
AC_PROG_CC(clang cc gcc)
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX(clang++ c++ g++)
AC_PROG_CXX
AC_PROG_RANLIB
AC_PATH_PROG(AR,ar)
AC_PATH_PROG(CHMOD,chmod)
AC_PATH_PROG(GZIP,gzip)
AC_PATH_PROG(HTMLDOC,htmldoc)
AC_PATH_PROG(LD,ld)
AC_PATH_PROG(LN,ln)
AC_PATH_PROG(MV,mv)
@@ -88,13 +88,8 @@ fi
AC_SUBST(INSTALLSTATIC)
dnl Check for pkg-config, which is used for some other tests later on...
AC_PATH_PROG(PKGCONFIG, pkg-config)
dnl Check for libraries...
AC_SEARCH_LIBS(abs, m, AC_DEFINE(HAVE_ABS))
AC_SEARCH_LIBS(crypt, crypt)
AC_SEARCH_LIBS(fmod, m)
AC_SEARCH_LIBS(getspent, sec gen)
LIBMALLOC=""
@@ -125,12 +120,10 @@ AC_SUBST(LIBPAPER)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADER(stdlib.h,AC_DEFINE(HAVE_STDLIB_H))
AC_CHECK_HEADER(crypt.h,AC_DEFINE(HAVE_CRYPT_H))
AC_CHECK_HEADER(langinfo.h,AC_DEFINE(HAVE_LANGINFO_H))
AC_CHECK_HEADER(malloc.h,AC_DEFINE(HAVE_MALLOC_H))
AC_CHECK_HEADER(shadow.h,AC_DEFINE(HAVE_SHADOW_H))
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))
@@ -140,34 +133,8 @@ 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,
SAVELIBS="$LIBS"
LIBS=""
AC_SEARCH_LIBS(iconv_open,iconv,
AC_DEFINE(HAVE_ICONV_H)
SAVELIBS="$SAVELIBS $LIBS")
LIBS="$SAVELIBS")
dnl Checks for Mini-XML (www.minixml.org)...
LIBMXML=""
AC_CHECK_HEADER(mxml.h,
SAVELIBS="$LIBS"
AC_SEARCH_LIBS(mmxlNewElement,mxml,
AC_DEFINE(HAVE_MXML_H)
LIBMXML="-lmxml")
LIBS="$SAVELIBS")
AC_SUBST(LIBMXML)
dnl Checks for statfs and its many headers...
AC_CHECK_HEADER(sys/mount.h,AC_DEFINE(HAVE_SYS_MOUNT_H))
AC_CHECK_HEADER(sys/statfs.h,AC_DEFINE(HAVE_SYS_STATFS_H))
AC_CHECK_HEADER(sys/statvfs.h,AC_DEFINE(HAVE_SYS_STATVFS_H))
AC_CHECK_HEADER(sys/vfs.h,AC_DEFINE(HAVE_SYS_VFS_H))
AC_CHECK_FUNCS(statfs statvfs)
dnl Checks for string functions.
AC_CHECK_FUNCS(strdup strlcat strlcpy)
AC_CHECK_FUNCS(strdup strcasecmp strncasecmp strlcat strlcpy)
if test "$uname" = "HP-UX" -a "$uversion" = "1020"; then
echo Forcing snprintf emulation for HP-UX.
else
@@ -175,14 +142,11 @@ else
fi
dnl Check for random number functions...
AC_CHECK_FUNCS(random lrand48 arc4random)
AC_CHECK_FUNCS(random mrand48 lrand48)
dnl Check for geteuid function.
AC_CHECK_FUNCS(geteuid)
dnl Check for setpgid function.
AC_CHECK_FUNCS(setpgid)
dnl Check for vsyslog function.
AC_CHECK_FUNCS(vsyslog)
@@ -210,14 +174,6 @@ AC_TRY_COMPILE([#include <time.h>],[struct tm t;
AC_DEFINE(HAVE_TM_GMTOFF),
AC_MSG_RESULT(no))
dnl See if the stat structure has the st_gen member...
AC_MSG_CHECKING(for st_gen member in stat structure)
AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat t;
int o = t.st_gen;],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_ST_GEN),
AC_MSG_RESULT(no))
dnl See if we have the removefile(3) function for securely removing files
AC_CHECK_FUNCS(removefile)
@@ -227,20 +183,19 @@ AC_ARG_ENABLE(libusb, [ --enable-libusb use libusb for USB printing])
LIBUSB=""
AC_SUBST(LIBUSB)
if test "x$PKGCONFIG" != x; then
if test x$enable_libusb = xyes -o $uname != Darwin; then
AC_MSG_CHECKING(for libusb-1.0)
if $PKGCONFIG --exists libusb-1.0; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_LIBUSB)
CFLAGS="$CFLAGS `$PKGCONFIG --cflags libusb-1.0`"
LIBUSB="`$PKGCONFIG --libs libusb-1.0`"
else
AC_MSG_RESULT(no)
fi
fi
elif test x$enable_libusb = xyes; then
AC_MSG_ERROR(Need pkg-config to enable libusb support.)
if test x$enable_libusb = xyes; then
check_libusb=yes
elif test x$enable_libusb != xno -a $uname != Darwin; then
check_libusb=yes
else
check_libusb=no
fi
if test $check_libusb = yes; then
AC_CHECK_LIB(usb, usb_init,[
AC_CHECK_HEADER(usb.h,
AC_DEFINE(HAVE_USB_H)
LIBUSB="-lusb")])
fi
dnl See if we have libwrap for TCP wrappers support...
@@ -256,21 +211,6 @@ if test x$enable_tcp_wrappers = xyes; then
LIBWRAP="-lwrap")])
fi
dnl ZLIB
INSTALL_GZIP=""
LIBZ=""
AC_CHECK_HEADER(zlib.h,
AC_CHECK_LIB(z, gzgets,
AC_DEFINE(HAVE_LIBZ)
LIBZ="-lz"
LIBS="$LIBS -lz"
AC_CHECK_LIB(z, inflateCopy, AC_DEFINE(HAVE_INFLATECOPY))
if test "x$GZIP" != z; then
INSTALL_GZIP="-z"
fi))
AC_SUBST(INSTALL_GZIP)
AC_SUBST(LIBZ)
dnl Flags for "ar" command...
case $uname in
Darwin* | *BSD*)
@@ -285,9 +225,9 @@ AC_SUBST(ARFLAGS)
dnl Prep libraries specifically for cupsd and backends...
BACKLIBS=""
SERVERLIBS=""
CUPSDLIBS=""
AC_SUBST(BACKLIBS)
AC_SUBST(SERVERLIBS)
AC_SUBST(CUPSDLIBS)
dnl See if we have POSIX ACL support...
SAVELIBS="$LIBS"
@@ -295,7 +235,7 @@ LIBS=""
AC_ARG_ENABLE(acl, [ --enable-acl build with POSIX ACL support])
if test "x$enable_acl" != xno; then
AC_SEARCH_LIBS(acl_init, acl, AC_DEFINE(HAVE_ACL_INIT))
SERVERLIBS="$SERVERLIBS $LIBS"
CUPSDLIBS="$CUPSDLIBS $LIBS"
fi
LIBS="$SAVELIBS"
@@ -306,29 +246,34 @@ else
DBUSDIR=""
fi
AC_ARG_ENABLE(dbus, [ --disable-dbus build without DBUS support])
AC_ARG_ENABLE(dbus, [ --enable-dbus build with DBUS support])
AC_ARG_WITH(dbusdir, [ --with-dbusdir set DBUS configuration directory ],
DBUSDIR="$withval")
DBUS_NOTIFIER=""
DBUS_NOTIFIERLIBS=""
if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x; then
AC_MSG_CHECKING(for DBUS)
if $PKGCONFIG --exists dbus-1; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_DBUS)
CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
SERVERLIBS="$SERVERLIBS `$PKGCONFIG --libs dbus-1`"
DBUS_NOTIFIER="dbus"
DBUS_NOTIFIERLIBS="`$PKGCONFIG --libs dbus-1`"
SAVELIBS="$LIBS"
LIBS="$LIBS $DBUS_NOTIFIERLIBS"
AC_CHECK_FUNC(dbus_message_iter_init_append,
AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND))
LIBS="$SAVELIBS"
else
AC_MSG_RESULT(no)
if test "x$enable_dbus" != xno; then
AC_PATH_PROG(PKGCONFIG, pkg-config)
if test "x$PKGCONFIG" != x; then
AC_MSG_CHECKING(for DBUS)
if $PKGCONFIG --exists dbus-1; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_DBUS)
CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
CUPSDLIBS="$CUPSDLIBS `$PKGCONFIG --libs dbus-1`"
AC_CHECK_LIB(dbus-1,
dbus_message_iter_init_append,
AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND),,
`$PKGCONFIG --libs dbus-1`)
if $PKGCONFIG --exists glib-2.0 && $PKGCONFIG --exists dbus-glib-1; then
DBUS_NOTIFIER="dbus"
DBUS_NOTIFIERLIBS="`$PKGCONFIG --libs glib-2.0` `$PKGCONFIG --libs dbus-glib-1` `$PKGCONFIG --libs dbus-1`"
CFLAGS="$CFLAGS `$PKGCONFIG --cflags glib-2.0`"
fi
else
AC_MSG_RESULT(no)
fi
fi
fi
@@ -338,25 +283,22 @@ AC_SUBST(DBUS_NOTIFIERLIBS)
dnl Extra platform-specific libraries...
CUPS_DEFAULT_PRINTOPERATOR_AUTH="@SYSTEM"
CUPS_DEFAULT_SYSTEM_AUTHKEY=""
CUPS_SYSTEM_AUTHKEY=""
INSTALLXPC=""
FONTS="fonts"
LEGACY_BACKENDS="parallel scsi"
case $uname in
Darwin*)
# FONTS=""
LEGACY_BACKENDS=""
BACKLIBS="$BACKLIBS -framework IOKit"
SERVERLIBS="$SERVERLIBS -framework IOKit -weak_framework ApplicationServices"
LIBS="-framework SystemConfiguration -framework CoreFoundation -framework Security $LIBS"
CUPSDLIBS="$CUPSDLIBS -sectorder __TEXT __text cupsd.order -e start -framework IOKit -framework SystemConfiguration -weak_framework ApplicationServices"
LIBS="-framework SystemConfiguration -framework CoreFoundation $LIBS"
dnl Check for framework headers...
AC_CHECK_HEADER(ApplicationServices/ApplicationServices.h,AC_DEFINE(HAVE_APPLICATIONSERVICES_H))
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)
dnl Check for the new membership functions in MacOSX 10.4...
AC_CHECK_HEADER(membership.h,AC_DEFINE(HAVE_MEMBERSHIP_H))
@@ -380,19 +322,16 @@ case $uname in
AC_ARG_WITH(operkey, [ --with-operkey set the default operator @AUTHKEY value],
default_operkey="$withval",
default_operkey="default")
AC_CHECK_HEADER(Security/Authorization.h, [
AC_DEFINE(HAVE_AUTHORIZATION_H)
if test "x$default_adminkey" != xdefault; then
CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey $default_adminkey"
CUPS_DEFAULT_SYSTEM_AUTHKEY="$default_adminkey"
elif grep -q system.print.operator /etc/authorization; then
CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.print.admin"
CUPS_DEFAULT_SYSTEM_AUTHKEY="system.print.admin"
else
CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.preferences"
CUPS_DEFAULT_SYSTEM_AUTHKEY="system.preferences"
fi
if test "x$default_operkey" != xdefault; then
@@ -405,59 +344,16 @@ case $uname in
AC_CHECK_HEADER(Security/SecBasePriv.h,AC_DEFINE(HAVE_SECBASEPRIV_H))
dnl Check for sandbox/Seatbelt support
if test $uversion -ge 100; then
AC_CHECK_HEADER(sandbox.h,AC_DEFINE(HAVE_SANDBOX_H))
fi
if test $uversion -ge 110 -a $uversion -lt 120; then
# Broken public headers in 10.7.x...
AC_MSG_CHECKING(for sandbox/private.h presence)
if test -f /usr/local/include/sandbox/private.h; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR(Run 'sudo mkdir -p /usr/local/include/sandbox' and 'sudo touch /usr/local/include/sandbox/private.h' to build CUPS.)
fi
fi
dnl Check for XPC support
AC_CHECK_HEADER(xpc/xpc.h,
AC_DEFINE(HAVE_XPC)
INSTALLXPC="install-xpc")
AC_CHECK_HEADER(xpc/private.h,
AC_DEFINE(HAVE_XPC_PRIVATE_H))
AC_CHECK_HEADER(sandbox.h,AC_DEFINE(HAVE_SANDBOX_H))
;;
esac
AC_SUBST(CUPS_DEFAULT_PRINTOPERATOR_AUTH)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTOPERATOR_AUTH, "$CUPS_DEFAULT_PRINTOPERATOR_AUTH")
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SYSTEM_AUTHKEY, "$CUPS_DEFAULT_SYSTEM_AUTHKEY")
AC_SUBST(CUPS_SYSTEM_AUTHKEY)
AC_SUBST(INSTALLXPC)
dnl Check for build components
COMPONENTS="all"
AC_ARG_WITH(components, [ --with-components set components to build:
- "all" (default) builds everything
- "core" builds libcups and ipptool],
COMPONENTS="$withval")
case "$COMPONENTS" in
all)
BUILDDIRS="filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates"
;;
core)
BUILDDIRS="data locale"
;;
*)
AC_MSG_ERROR([Bad build component "$COMPONENT" specified!])
;;
esac
AC_SUBST(BUILDDIRS)
AC_SUBST(FONTS)
AC_SUBST(LEGACY_BACKENDS)
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-common.m4 8783 2009-08-28 17:51:05Z mike $".
dnl
+319 -47
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-compiler.m4 8655 2009-05-17 00:13:47Z mike $"
dnl
dnl Compiler stuff for CUPS.
dnl Compiler stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2013 by Apple Inc.
dnl Copyright 2007-2009 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
@@ -66,8 +66,8 @@ fi
if test -z "$with_ldarchflags"; then
if test "$uname" = Darwin; then
# Only create Intel programs by default
LDARCHFLAGS="`echo $ARCHFLAGS | sed -e '1,$s/-arch ppc64//'`"
# Only create 32-bit programs by default
LDARCHFLAGS="`echo $ARCHFLAGS | sed -e '1,$s/-arch x86_64//' -e '1,$s/-arch ppc64//'`"
else
LDARCHFLAGS="$ARCHFLAGS"
fi
@@ -78,6 +78,15 @@ fi
AC_SUBST(ARCHFLAGS)
AC_SUBST(LDARCHFLAGS)
dnl Setup support for separate 32/64-bit library generation...
AC_ARG_WITH(arch32flags, [ --with-arch32flags set 32-bit architecture flags])
ARCH32FLAGS=""
AC_SUBST(ARCH32FLAGS)
AC_ARG_WITH(arch64flags, [ --with-arch64flags set 64-bit architecture flags])
ARCH64FLAGS=""
AC_SUBST(ARCH64FLAGS)
dnl Read-only data/program support on Linux...
AC_ARG_ENABLE(relro, [ --enable-relro build with the GCC relro option])
@@ -91,6 +100,24 @@ AC_SUBST(PIEFLAGS)
RELROFLAGS=""
AC_SUBST(RELROFLAGS)
LIBCUPSORDER="libcups.order"
AC_ARG_WITH(libcupsorder, [ --with-libcupsorder set libcups secorder file, default=libcups.order],
if test -f "$withval"; then
LIBCUPSORDER="$withval"
fi)
AC_SUBST(LIBCUPSORDER)
LIBCUPSIMAGEORDER="libcupsimage.order"
AC_ARG_WITH(libcupsimageorder, [ --with-libcupsimagesorder
set libcupsimage secorder file, default=libcupsimage.order],
if test -f "$withval"; then
LIBCUPSIMAGEORDER="$withval"
fi)
AC_SUBST(LIBCUPSIMAGEORDER)
PHPOPTIONS=""
AC_SUBST(PHPOPTIONS)
if test -n "$GCC"; then
# Add GCC-specific compiler options...
if test -z "$OPTIM"; then
@@ -114,55 +141,31 @@ if test -n "$GCC"; then
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fstack-protector"
AC_TRY_LINK(,,
if test "x$LSB_BUILD" = xy; then
# Can't use stack-protector with LSB binaries...
OPTIM="$OPTIM -fno-stack-protector"
else
OPTIM="$OPTIM -fstack-protector"
fi
OPTIM="$OPTIM -fstack-protector"
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
if test "x$LSB_BUILD" != xy; then
# The -fPIE option is available with some versions of GCC and
# adds randomization of addresses, which avoids another class of
# exploits that depend on a fixed address for common functions.
#
# Not available to LSB binaries...
AC_MSG_CHECKING(if GCC supports -fPIE)
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fPIE"
AC_TRY_COMPILE(,,
[case "$CC" in
*clang)
PIEFLAGS="-fPIE -Wl,-pie"
;;
*)
PIEFLAGS="-fPIE -pie"
;;
esac
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
fi
# The -pie option is available with some versions of GCC and adds
# randomization of addresses, which avoids another class of exploits
# that depend on a fixed address for common functions.
AC_MSG_CHECKING(if GCC supports -pie)
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -pie -fPIE"
AC_TRY_COMPILE(,,
PIEFLAGS="-pie -fPIE"
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
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 $OPTIM"
# 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="-Wshadow -Wunused $OPTIM"
CFLAGS="-Werror-implicit-function-declaration $CFLAGS"
PHPOPTIONS="-Wno-shadow"
fi
fi
@@ -172,8 +175,85 @@ if test -n "$GCC"; then
# checking, basically wrapping all string functions
# with buffer-limited ones. Not strictly needed for
# CUPS since we already use buffer-limited calls, but
# this will catch any additions that are broken.
# this will catch any additions that are broken.
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
if test x$enable_pie = xyes; then
# GCC 4 on Mac OS X needs -Wl,-pie as well
LDFLAGS="$LDFLAGS -Wl,-pie"
fi
;;
HP-UX*)
if test "x$enable_32bit" = xyes; then
# Build 32-bit libraries, 64-bit base...
if test -z "$with_arch32flags"; then
ARCH32FLAGS="-milp32"
else
ARCH32FLAGS="$with_arch32flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch64flags"; then
ARCHFLAGS="-mlp64"
else
ARCHFLAGS="$with_arch64flags"
fi
fi
fi
if test "x$enable_64bit" = xyes; then
# Build 64-bit libraries, 32-bit base...
if test -z "$with_arch64flags"; then
ARCH64FLAGS="-mlp64"
else
ARCH64FLAGS="$with_arch64flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch32flags"; then
ARCHFLAGS="-milp32"
else
ARCHFLAGS="$with_arch32flags"
fi
fi
fi
;;
IRIX)
if test "x$enable_32bit" = xyes; then
# Build 32-bit libraries, 64-bit base...
if test -z "$with_arch32flags"; then
ARCH32FLAGS="-n32 -mips3"
else
ARCH32FLAGS="$with_arch32flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch64flags"; then
ARCHFLAGS="-64 -mips4"
else
ARCHFLAGS="$with_arch64flags"
fi
fi
fi
if test "x$enable_64bit" = xyes; then
# Build 64-bit libraries, 32-bit base...
if test -z "$with_arch64flags"; then
ARCH64FLAGS="-64 -mips4"
else
ARCH64FLAGS="$with_arch64flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch32flags"; then
ARCHFLAGS="-n32 -mips3"
else
ARCHFLAGS="$with_arch32flags"
fi
fi
fi
;;
Linux*)
@@ -182,6 +262,76 @@ if test -n "$GCC"; then
if test x$enable_relro = xyes; then
RELROFLAGS="-Wl,-z,relro"
fi
if test "x$enable_32bit" = xyes; then
# Build 32-bit libraries, 64-bit base...
if test -z "$with_arch32flags"; then
ARCH32FLAGS="-m32"
else
ARCH32FLAGS="$with_arch32flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch64flags"; then
ARCHFLAGS="-m64"
else
ARCHFLAGS="$with_arch64flags"
fi
fi
fi
if test "x$enable_64bit" = xyes; then
# Build 64-bit libraries, 32-bit base...
if test -z "$with_arch64flags"; then
ARCH64FLAGS="-m64"
else
ARCH64FLAGS="$with_arch64flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch32flags"; then
ARCHFLAGS="-m32"
else
ARCHFLAGS="$with_arch32flags"
fi
fi
fi
;;
SunOS*)
if test "x$enable_32bit" = xyes; then
# Build 32-bit libraries, 64-bit base...
if test -z "$with_arch32flags"; then
ARCH32FLAGS="-m32"
else
ARCH32FLAGS="$with_arch32flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch64flags"; then
ARCHFLAGS="-m64"
else
ARCHFLAGS="$with_arch64flags"
fi
fi
fi
if test "x$enable_64bit" = xyes; then
# Build 64-bit libraries, 32-bit base...
if test -z "$with_arch64flags"; then
ARCH64FLAGS="-m64"
else
ARCH64FLAGS="$with_arch64flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch32flags"; then
ARCHFLAGS="-m32"
else
ARCHFLAGS="$with_arch32flags"
fi
fi
fi
;;
esac
else
@@ -210,6 +360,87 @@ else
if test $PICFLAG = 1; then
OPTIM="+z $OPTIM"
fi
if test "x$enable_32bit" = xyes; then
# Build 32-bit libraries, 64-bit base...
if test -z "$with_arch32flags"; then
ARCH32FLAGS="+DD32"
else
ARCH32FLAGS="$with_arch32flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch64flags"; then
ARCHFLAGS="+DD64"
else
ARCHFLAGS="$with_arch64flags"
fi
fi
fi
if test "x$enable_64bit" = xyes; then
# Build 64-bit libraries, 32-bit base...
if test -z "$with_arch64flags"; then
ARCH64FLAGS="+DD64"
else
ARCH64FLAGS="$with_arch64flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch32flags"; then
ARCHFLAGS="+DD32"
else
ARCHFLAGS="$with_arch32flags"
fi
fi
fi
;;
IRIX)
if test -z "$OPTIM"; then
if test "x$with_optim" = x; then
OPTIM="-O2"
else
OPTIM="$with_optim $OPTIM"
fi
fi
if test "x$with_optim" = x; then
OPTIM="-fullwarn -woff 1183,1209,1349,1506,3201 $OPTIM"
fi
if test "x$enable_32bit" = xyes; then
# Build 32-bit libraries, 64-bit base...
if test -z "$with_arch32flags"; then
ARCH32FLAGS="-n32 -mips3"
else
ARCH32FLAGS="$with_arch32flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch64flags"; then
ARCHFLAGS="-64 -mips4"
else
ARCHFLAGS="$with_arch64flags"
fi
fi
fi
if test "x$enable_64bit" = xyes; then
# Build 64-bit libraries, 32-bit base...
if test -z "$with_arch64flags"; then
ARCH64FLAGS="-64 -mips4"
else
ARCH64FLAGS="$with_arch64flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch32flags"; then
ARCHFLAGS="-n32 -mips3"
else
ARCHFLAGS="$with_arch32flags"
fi
fi
fi
;;
OSF*)
# Tru64 UNIX aka Digital UNIX aka OSF/1
@@ -234,6 +465,47 @@ else
if test $PICFLAG = 1; then
OPTIM="-KPIC $OPTIM"
fi
if test "x$enable_32bit" = xyes; then
# Compiling on a Solaris system, build 64-bit
# binaries with separate 32-bit libraries...
ARCH32FLAGS="-xarch=generic"
if test "x$with_optim" = x; then
# Suppress all of Sun's questionable
# warning messages, and default to
# 64-bit compiles of everything else...
OPTIM="-w $OPTIM"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch64flags"; then
ARCHFLAGS="-xarch=generic64"
else
ARCHFLAGS="$with_arch64flags"
fi
fi
else
if test "x$enable_64bit" = xyes; then
# Build 64-bit libraries...
ARCH64FLAGS="-xarch=generic64"
fi
if test "x$with_optim" = x; then
# Suppress all of Sun's questionable
# warning messages, and default to
# 32-bit compiles of everything else...
OPTIM="-w $OPTIM"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch32flags"; then
ARCHFLAGS="-xarch=generic"
else
ARCHFLAGS="$with_arch32flags"
fi
fi
fi
;;
UNIX_SVR*)
# UnixWare
@@ -291,5 +563,5 @@ case $uname in
esac
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-compiler.m4 8655 2009-05-17 00:13:47Z mike $".
dnl
+107 -72
Ver Arquivo
@@ -1,9 +1,10 @@
dnl
dnl "$Id$"
dnl "$Id: cups-defaults.m4 8344 2009-02-10 17:05:35Z mike $"
dnl
dnl Default cupsd configuration settings for CUPS.
dnl Default cupsd configuration settings for the Common UNIX Printing System
dnl (CUPS).
dnl
dnl Copyright 2007-2012 by Apple Inc.
dnl Copyright 2007-2009 by Apple Inc.
dnl Copyright 2006-2007 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
@@ -14,7 +15,7 @@ dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
dnl Default languages...
LANGUAGES="`ls -1 locale/cups_*.po 2>/dev/null | sed -e '1,$s/locale\/cups_//' -e '1,$s/\.po//' | tr '\n' ' '`"
LANGUAGES="`ls -1 locale/cups_*.po | sed -e '1,$s/locale\/cups_//' -e '1,$s/\.po//' | tr '\n' ' '`"
AC_ARG_WITH(languages, [ --with-languages set installed languages, default=all ],[
case "$withval" in
@@ -24,21 +25,6 @@ AC_ARG_WITH(languages, [ --with-languages set installed languages, defau
esac])
AC_SUBST(LANGUAGES)
dnl OS X bundle-based localization support
AC_ARG_WITH(bundledir, [ --with-bundledir set OS X localization bundle directory ],
CUPS_BUNDLEDIR="$withval",
if test "x$uname" = xDarwin -a $uversion -ge 100; then
CUPS_BUNDLEDIR="/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A"
LANGUAGES=""
else
CUPS_BUNDLEDIR=""
fi)
AC_SUBST(CUPS_BUNDLEDIR)
if test "x$CUPS_BUNDLEDIR" != x; then
AC_DEFINE_UNQUOTED(CUPS_BUNDLEDIR, "$CUPS_BUNDLEDIR")
fi
dnl Default ConfigFilePerm
AC_ARG_WITH(config_file_perm, [ --with-config-file-perm set default ConfigFilePerm value, default=0640],
CUPS_CONFIG_FILE_PERM="$withval",
@@ -50,12 +36,6 @@ AC_ARG_WITH(config_file_perm, [ --with-config-file-perm set default ConfigFileP
AC_SUBST(CUPS_CONFIG_FILE_PERM)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_CONFIG_FILE_PERM, 0$CUPS_CONFIG_FILE_PERM)
dnl Default permissions for cupsd
AC_ARG_WITH(cupsd_file_perm, [ --with-cupsd-file-perm set default cupsd permissions, default=0500],
CUPS_CUPSD_FILE_PERM="$withval",
CUPS_CUPSD_FILE_PERM="500")
AC_SUBST(CUPS_CUPSD_FILE_PERM)
dnl Default LogFilePerm
AC_ARG_WITH(log_file_perm, [ --with-log-file-perm set default LogFilePerm value, default=0644],
CUPS_LOG_FILE_PERM="$withval",
@@ -70,6 +50,7 @@ AC_ARG_WITH(fatal_errors, [ --with-fatal-errors set default FatalErrors val
AC_SUBST(CUPS_FATAL_ERRORS)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_FATAL_ERRORS, "$CUPS_FATAL_ERRORS")
dnl Default LogLevel
AC_ARG_WITH(log_level, [ --with-log-level set default LogLevel value, default=warn],
CUPS_LOG_LEVEL="$withval",
@@ -96,16 +77,16 @@ fi
AC_SUBST(CUPS_BROWSING)
dnl Default BrowseLocalProtocols
AC_ARG_WITH(local_protocols, [ --with-local-protocols set default BrowseLocalProtocols, default=""],
AC_ARG_WITH(local_protocols, [ --with-local-protocols set default BrowseLocalProtocols, default="CUPS"],
default_local_protocols="$withval",
default_local_protocols="default")
if test x$with_local_protocols != xno; then
if test "x$default_local_protocols" = "xdefault"; then
if test "x$DNSSD_BACKEND" != "x"; then
CUPS_BROWSE_LOCAL_PROTOCOLS="dnssd"
else
CUPS_BROWSE_LOCAL_PROTOCOLS=""
if test "x$DNSSDLIBS" != "x"; then
CUPS_BROWSE_LOCAL_PROTOCOLS="CUPS dnssd"
else
CUPS_BROWSE_LOCAL_PROTOCOLS="CUPS"
fi
else
CUPS_BROWSE_LOCAL_PROTOCOLS="$default_local_protocols"
@@ -118,6 +99,41 @@ AC_SUBST(CUPS_BROWSE_LOCAL_PROTOCOLS)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS,
"$CUPS_BROWSE_LOCAL_PROTOCOLS")
dnl Default BrowseRemoteProtocols
AC_ARG_WITH(remote_protocols, [ --with-remote-protocols set default BrowseRemoteProtocols, default="CUPS"],
default_remote_protocols="$withval",
default_remote_protocols="default")
if test x$with_remote_protocols != xno; then
if test "x$default_remote_protocols" = "xdefault"; then
if test "$uname" = "Darwin" -a $uversion -ge 90; then
CUPS_BROWSE_REMOTE_PROTOCOLS=""
else
CUPS_BROWSE_REMOTE_PROTOCOLS="CUPS"
fi
else
CUPS_BROWSE_REMOTE_PROTOCOLS="$default_remote_protocols"
fi
else
CUPS_BROWSE_REMOTE_PROTOCOLS=""
fi
AC_SUBST(CUPS_BROWSE_REMOTE_PROTOCOLS)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_REMOTE_PROTOCOLS,
"$CUPS_BROWSE_REMOTE_PROTOCOLS")
dnl Default BrowseShortNames
AC_ARG_ENABLE(browse_short, [ --disable-browse-short-names
disable BrowseShortNames by default])
if test "x$enable_browse_short" = xno; then
CUPS_BROWSE_SHORT_NAMES="No"
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_SHORT_NAMES, 0)
else
CUPS_BROWSE_SHORT_NAMES="Yes"
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_SHORT_NAMES, 1)
fi
AC_SUBST(CUPS_BROWSE_SHORT_NAMES)
dnl Default DefaultShared
AC_ARG_ENABLE(default_shared, [ --disable-default-shared
disable DefaultShared by default])
@@ -130,6 +146,38 @@ else
fi
AC_SUBST(CUPS_DEFAULT_SHARED)
dnl Default ImplicitClasses
AC_ARG_ENABLE(implicit, [ --disable-implicit-classes
disable ImplicitClasses by default])
if test "x$enable_implicit" = xno; then
CUPS_IMPLICIT_CLASSES="No"
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IMPLICIT_CLASSES, 0)
else
CUPS_IMPLICIT_CLASSES="Yes"
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IMPLICIT_CLASSES, 1)
fi
AC_SUBST(CUPS_IMPLICIT_CLASSES)
dnl Default UseNetworkDefault
AC_ARG_ENABLE(use_network_default, [ --enable-use-network-default
set UseNetworkDefault to Yes by default])
if test "x$enable_use_network_default" != xno; then
AC_MSG_CHECKING(whether to use network default printers)
if test "x$enable_use_network_default" = xyes -o $uname != Darwin; then
CUPS_USE_NETWORK_DEFAULT="Yes"
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USE_NETWORK_DEFAULT, 1)
AC_MSG_RESULT(yes)
else
CUPS_USE_NETWORK_DEFAULT="No"
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USE_NETWORK_DEFAULT, 0)
AC_MSG_RESULT(no)
fi
else
CUPS_USE_NETWORK_DEFAULT="No"
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USE_NETWORK_DEFAULT, 0)
fi
AC_SUBST(CUPS_USE_NETWORK_DEFAULT)
dnl Determine the correct username and group for this OS...
AC_ARG_WITH(cups_user, [ --with-cups-user set default user for CUPS],
CUPS_USER="$withval",
@@ -160,10 +208,6 @@ AC_ARG_WITH(cups_user, [ --with-cups-user set default user for CUPS],
AC_MSG_RESULT(no password file, using "$CUPS_USER")
fi)
if test "x$CUPS_USER" = "xroot" -o "x$CUPS_USER" = "x0"; then
AC_MSG_ERROR([The default user for CUPS cannot be root!])
fi
AC_ARG_WITH(cups_group, [ --with-cups-group set default group for CUPS],
CUPS_GROUP="$withval",
AC_MSG_CHECKING(for default print group)
@@ -194,10 +238,6 @@ AC_ARG_WITH(cups_group, [ --with-cups-group set default group for CUPS],
AC_MSG_RESULT(no group file, using "$CUPS_GROUP")
fi)
if test "x$CUPS_GROUP" = "xroot" -o "x$CUPS_GROUP" = "xwheel" -o "x$CUPS_GROUP" = "x0"; then
AC_MSG_ERROR([The default group for CUPS cannot be root!])
fi
AC_ARG_WITH(system_groups, [ --with-system-groups set default system groups for CUPS],
CUPS_SYSTEM_GROUPS="$withval",
if test x$uname = xDarwin; then
@@ -229,13 +269,8 @@ AC_ARG_WITH(system_groups, [ --with-system-groups set default system groups
fi
fi)
CUPS_PRIMARY_SYSTEM_GROUP="`echo $CUPS_SYSTEM_GROUPS | awk '{print $1}'`"
for group in $CUPS_SYSTEM_GROUPS; do
if test "x$CUPS_GROUP" = "x$group"; then
AC_MSG_ERROR([The default system groups cannot contain the default CUPS group!])
fi
done
CUPS_PRIMARY_SYSTEM_GROUP="`echo $CUPS_SYSTEM_GROUPS | awk '{print $1}'`"
AC_SUBST(CUPS_USER)
AC_SUBST(CUPS_GROUP)
@@ -290,8 +325,8 @@ if test x$default_lpdconfigfile != xno; then
CUPS_DEFAULT_LPD_CONFIG_FILE="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
;;
*)
if test "x$XINETD" != x; then
CUPS_DEFAULT_LPD_CONFIG_FILE="xinetd://$XINETD/cups-lpd"
if test -d /etc/xinetd.d; then
CUPS_DEFAULT_LPD_CONFIG_FILE="xinetd:///etc/xinetd.d/cups-lpd"
else
CUPS_DEFAULT_LPD_CONFIG_FILE=""
fi
@@ -305,7 +340,6 @@ else
fi
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG_FILE, "$CUPS_DEFAULT_LPD_CONFIG_FILE")
AC_SUBST(CUPS_DEFAULT_LPD_CONFIG_FILE)
dnl Default SMB config file...
AC_ARG_WITH(smbconfigfile, [ --with-smbconfigfile set default SMBConfigFile URI],
@@ -327,7 +361,6 @@ else
fi
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG_FILE, "$CUPS_DEFAULT_SMB_CONFIG_FILE")
AC_SUBST(CUPS_DEFAULT_SMB_CONFIG_FILE)
dnl Default MaxCopies value...
AC_ARG_WITH(max-copies, [ --with-max-copies set default max copies value, default=9999 ],
@@ -374,31 +407,33 @@ AC_ARG_WITH(ipp-port, [ --with-ipp-port set port number for IPP, defaul
AC_SUBST(DEFAULT_IPP_PORT)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
dnl Web interface...
AC_ARG_ENABLE(webif, [ --enable-webif enable the web interface by default, default=no for OS X])
case "x$enable_webif" in
xno)
CUPS_WEBIF=No
CUPS_DEFAULT_WEBIF=0
;;
xyes)
CUPS_WEBIF=Yes
CUPS_DEFAULT_WEBIF=1
;;
*)
if test $uname = Darwin; then
CUPS_WEBIF=No
CUPS_DEFAULT_WEBIF=0
else
CUPS_WEBIF=Yes
CUPS_DEFAULT_WEBIF=1
fi
;;
esac
dnl Filters
AC_ARG_ENABLE(bannertops, [ --enable-bannertops always build the banner filter ])
AC_ARG_ENABLE(texttops, [ --enable-texttops always build the text filter ])
AC_SUBST(CUPS_WEBIF)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_WEBIF, $CUPS_DEFAULT_WEBIF)
if test "x$enable_bannertops" = xno; then
BANNERTOPS=""
elif test "x$enable_bannertops" = xyes; then
BANNERTOPS="bannertops"
elif test $uname = Darwin; then
BANNERTOPS=""
else
BANNERTOPS="bannertops"
fi
if test "x$enable_texttops" = xno; then
TEXTTOPS=""
elif test "x$enable_texttops" = xyes; then
TEXTTOPS="texttops"
elif test $uname = Darwin; then
TEXTTOPS=""
else
TEXTTOPS="texttops"
fi
AC_SUBST(BANNERTOPS)
AC_SUBST(TEXTTOPS)
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-defaults.m4 8344 2009-02-10 17:05:35Z mike $".
dnl
+26 -28
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-directories.m4 8497 2009-04-12 23:04:51Z mike $"
dnl
dnl Directory stuff for CUPS.
dnl Directory stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2013 by Apple Inc.
dnl Copyright 2007 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
@@ -102,8 +102,11 @@ fi
dnl Fix "libdir" variable...
if test "$libdir" = "\${exec_prefix}/lib"; then
case "$uname" in
IRIX*)
libdir="$exec_prefix/lib32"
;;
Linux*)
if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then
if test -d /usr/lib64; then
libdir="$exec_prefix/lib64"
fi
;;
@@ -115,17 +118,6 @@ if test "$libdir" = "\${exec_prefix}/lib"; then
esac
fi
dnl Setup private include directory...
AC_ARG_WITH(privateinclude, [ --with-privateinclude set path for private include files, default=none],privateinclude="$withval",privateinclude="")
if test "x$privateinclude" != x -a "x$privateinclude" != xnone; then
PRIVATEINCLUDE="$privateinclude/cups"
else
privateinclude=""
PRIVATEINCLUDE=""
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")
@@ -150,7 +142,7 @@ if test x$rcdir = x; then
# Darwin and MacOS X...
if test -x /sbin/launchd; then
INITDDIR="/System/Library/LaunchDaemons"
else
else
INITDDIR="/System/Library/StartupItems/PrintingServices"
fi
;;
@@ -166,6 +158,13 @@ if test x$rcdir = x; then
RCSTOP="620"
;;
IRIX*)
# IRIX
INITDIR="/etc"
RCSTART="60"
RCSTOP="25"
;;
Linux | GNU | GNU/k*BSD*)
# Linux/HURD seems to choose an init.d directory at random...
if test -d /sbin/init.d; then
@@ -412,20 +411,19 @@ AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$sysconfdir/cups")
AC_SUBST(CUPS_SERVERROOT)
# Transient run-time state
AC_ARG_WITH(rundir, [ --with-rundir set transient run-time state directory],CUPS_STATEDIR="$withval",[
case "$uname" in
Darwin*)
# Darwin (OS X)
CUPS_STATEDIR="$CUPS_SERVERROOT"
;;
*)
# All others
CUPS_STATEDIR="$localstatedir/run/cups"
;;
esac])
case "$uname" in
Darwin*)
# Darwin (Mac OS X)
CUPS_STATEDIR="$CUPS_SERVERROOT"
;;
*)
# All others
CUPS_STATEDIR="$localstatedir/run/cups"
;;
esac
AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR")
AC_SUBST(CUPS_STATEDIR)
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-directories.m4 8497 2009-04-12 23:04:51Z mike $".
dnl
+12 -20
Ver Arquivo
@@ -1,9 +1,13 @@
dnl
dnl "$Id$"
dnl "$Id: cups-dnssd.m4 8789 2009-08-28 22:54:34Z mike $"
dnl
dnl DNS Service Discovery (aka Bonjour) stuff for CUPS.
dnl DNS Service Discovery (aka Bonjour) stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2012 by Apple Inc.
dnl http://www.dns-sd.org
dnl http://www.multicastdns.org/
dnl http://developer.apple.com/networking/bonjour/
dnl
dnl Copyright 2007-2009 by Apple Inc.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
@@ -12,8 +16,7 @@ dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
AC_ARG_ENABLE(avahi, [ --disable-avahi disable DNS Service Discovery support using Avahi])
AC_ARG_ENABLE(dnssd, [ --disable-dnssd disable DNS Service Discovery support using mDNSResponder])
AC_ARG_ENABLE(dnssd, [ --disable-dnssd disable DNS Service Discovery support])
AC_ARG_WITH(dnssd-libs, [ --with-dnssd-libs set directory for DNS Service Discovery library],
LDFLAGS="-L$withval $LDFLAGS"
DSOFLAGS="-L$withval $DSOFLAGS",)
@@ -24,25 +27,14 @@ AC_ARG_WITH(dnssd-includes, [ --with-dnssd-includes set directory for DNS Ser
DNSSDLIBS=""
DNSSD_BACKEND=""
if test "x$PKGCONFIG" != x -a x$enable_avahi != xno; then
AC_MSG_CHECKING(for Avahi)
if $PKGCONFIG --exists avahi-client; then
AC_MSG_RESULT(yes)
CFLAGS="$CFLAGS `$PKGCONFIG --cflags avahi-client`"
DNSSDLIBS="`$PKGCONFIG --libs avahi-client`"
DNSSD_BACKEND="dnssd"
AC_DEFINE(HAVE_AVAHI)
else
AC_MSG_RESULT(no)
fi
fi
if test "x$DNSSD_BACKEND" = x -a x$enable_dnssd != xno; then
if test x$enable_dnssd != xno; then
AC_CHECK_HEADER(dns_sd.h, [
case "$uname" in
Darwin*)
# Darwin and MacOS X...
AC_DEFINE(HAVE_DNSSD)
AC_DEFINE(HAVE_COREFOUNDATION)
AC_DEFINE(HAVE_SYSTEMCONFIGURATION)
DNSSDLIBS="-framework CoreFoundation -framework SystemConfiguration"
DNSSD_BACKEND="dnssd"
;;
@@ -72,5 +64,5 @@ AC_SUBST(DNSSDLIBS)
AC_SUBST(DNSSD_BACKEND)
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-dnssd.m4 8789 2009-08-28 22:54:34Z mike $".
dnl
+25 -63
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-gssapi.m4 8659 2009-05-18 22:03:04Z mike $"
dnl
dnl GSSAPI/Kerberos library detection for CUPS.
dnl GSSAPI/Kerberos library detection.
dnl
dnl Copyright 2007-2012 by Apple Inc.
dnl Copyright 2007-2009 by Apple Inc.
dnl Copyright 2006-2007 by Easy Software Products.
dnl
dnl This file contains Kerberos support code, copyright 2006 by
@@ -26,28 +26,21 @@ if test x$enable_gssapi != xno; then
if test "x$KRB5CONFIG" != x; then
case "$uname" in
Darwin)
# OS X weak-links to the Kerberos framework...
# Mac OS X weak-links to the Kerberos framework...
LIBGSSAPI="-weak_framework Kerberos"
AC_MSG_CHECKING(for GSS framework)
if test -d /System/Library/Frameworks/GSS.framework; then
AC_MSG_RESULT(yes)
LIBGSSAPI="$LIBGSSAPI -weak_framework GSS"
else
AC_MSG_RESULT(no)
fi
;;
SunOS*)
# Solaris has a non-standard krb5-config, don't use it!
AC_CHECK_LIB(gss, gss_display_status,
AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available])
CFLAGS="`$KRB5CONFIG --cflags` $CFLAGS"
CPPFLAGS="`$KRB5CONFIG --cflags` $CPPFLAGS"
CFLAGS="`$KRB5CONFIG --cflags` $CFLAGS"
CPPFLAGS="`$KRB5CONFIG --cflags` $CPPFLAGS"
LIBGSSAPI="-lgss `$KRB5CONFIG --libs`")
;;
*)
# Other platforms just ask for GSSAPI
CFLAGS="`$KRB5CONFIG --cflags gssapi` $CFLAGS"
CPPFLAGS="`$KRB5CONFIG --cflags gssapi` $CPPFLAGS"
CFLAGS="`$KRB5CONFIG --cflags gssapi` $CFLAGS"
CPPFLAGS="`$KRB5CONFIG --cflags gssapi` $CPPFLAGS"
LIBGSSAPI="`$KRB5CONFIG --libs gssapi`"
;;
esac
@@ -70,63 +63,26 @@ 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
else
AC_CHECK_HEADER(gssapi.h, AC_DEFINE(HAVE_GSSAPI_H))
AC_CHECK_HEADER(gssapi/gssapi.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_H))
fi
AC_CHECK_HEADER(gssapi.h, AC_DEFINE(HAVE_GSSAPI_H))
AC_CHECK_HEADER(gssapi/gssapi.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_H))
AC_CHECK_HEADER(gssapi/gssapi_generic.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_GENERIC_H))
AC_CHECK_HEADER(gssapi/gssapi_krb5.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_KRB5_H))
SAVELIBS="$LIBS"
LIBS="$LIBS $LIBGSSAPI"
AC_CHECK_FUNC(__ApplePrivate_gss_acquire_cred_ex_f,
AC_DEFINE(HAVE_GSS_ACQUIRE_CRED_EX_F))
AC_CHECK_FUNC(gsskrb5_register_acceptor_identity,
AC_DEFINE(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY))
AC_CHECK_FUNC(krb5_cc_new_unique, AC_DEFINE(HAVE_KRB5_CC_NEW_UNIQUE))
AC_CHECK_FUNC(krb5_ipc_client_set_target_uid, AC_DEFINE(HAVE_KRB5_IPC_CLIENT_SET_TARGET_UID))
AC_MSG_CHECKING(for GSS_C_NT_HOSTBASED_SERVICE)
if test x$ac_cv_header_gssapi_gssapi_h = xyes; then
if test $ac_cv_header_gssapi_gssapi_h = yes; then
AC_TRY_COMPILE([ #include <gssapi/gssapi.h> ],
[ gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE; ],
AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE)
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
elif test x$ac_cv_header_gss_gssapi_h = xyes; then
AC_TRY_COMPILE([ #include <GSS/gssapi.h> ],
[ gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE; ],
AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE)
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
else
AC_TRY_COMPILE([ #include <gssapi.h> ],
[ gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE; ],
@@ -136,6 +92,13 @@ if test x$enable_gssapi != xno; then
fi
LIBS="$SAVELIBS"
AC_MSG_CHECKING(for Heimdal Kerberos)
AC_TRY_COMPILE([ #include <krb5.h> ],
[ char *tmp = heimdal_version; ],
AC_DEFINE(HAVE_HEIMDAL)
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
fi
fi
@@ -154,9 +117,8 @@ else
CUPS_DEFAULT_GSSSERVICENAME=""
fi
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 8659 2009-05-18 22:03:04Z mike $".
dnl
+109
Ver Arquivo
@@ -0,0 +1,109 @@
dnl
dnl "$Id: cups-image.m4 8344 2009-02-10 17:05:35Z mike $"
dnl
dnl Image library/filter stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2009 by Apple Inc.
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
dnl See if we want the image filters included at all...
AC_ARG_ENABLE(image, [ --enable-image always build the image filters])
IMGFILTERS=""
if test "x$enable_image" != xno; then
AC_MSG_CHECKING(whether to build image filters)
if test "x$enable_image" = xyes -o $uname != Darwin; then
IMGFILTERS="imagetops imagetoraster"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
fi
AC_SUBST(IMGFILTERS)
dnl Check for image libraries...
AC_ARG_ENABLE(jpeg, [ --disable-jpeg disable JPEG support])
AC_ARG_ENABLE(png, [ --disable-png disable PNG support])
AC_ARG_ENABLE(tiff, [ --disable-tiff disable TIFF support])
LIBJPEG=""
LIBPNG=""
LIBTIFF=""
LIBZ=""
AC_SUBST(LIBJPEG)
AC_SUBST(LIBPNG)
AC_SUBST(LIBTIFF)
AC_SUBST(LIBZ)
dnl Image libraries use math library functions...
AC_SEARCH_LIBS(pow, m)
dnl Save the current libraries since we don't want the image libraries
dnl included with every program...
SAVELIBS="$LIBS"
dnl JPEG library...
if test x$enable_jpeg != xno; then
AC_CHECK_HEADER(jpeglib.h,
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
AC_DEFINE(HAVE_LIBJPEG)
LIBJPEG="-ljpeg"
LIBS="$LIBS -ljpeg"))
else
AC_MSG_NOTICE([JPEG support disabled with --disable-jpeg.])
fi
dnl ZLIB library...
AC_CHECK_HEADER(zlib.h,
AC_CHECK_LIB(z, gzgets,
AC_DEFINE(HAVE_LIBZ)
LIBZ="-lz"
LIBS="$LIBS -lz"))
dnl PNG library...
if test x$enable_png != xno; then
AC_CHECK_HEADER(png.h,
AC_CHECK_LIB(png, png_create_read_struct,
AC_DEFINE(HAVE_LIBPNG)
LIBPNG="-lpng"))
else
AC_MSG_NOTICE([PNG support disabled with --disable-png.])
fi
dnl TIFF library...
if test x$enable_tiff != xno; then
AC_CHECK_HEADER(tiff.h,
AC_CHECK_LIB(tiff, TIFFReadScanline,
AC_DEFINE(HAVE_LIBTIFF)
LIBTIFF="-ltiff"))
else
AC_MSG_NOTICE([TIFF support disabled with --disable-tiff.])
fi
dnl Restore original LIBS settings...
LIBS="$SAVELIBS"
EXPORT_LIBJPEG="$LIBJPEG"
EXPORT_LIBPNG="$LIBPNG"
EXPORT_LIBTIFF="$LIBTIFF"
EXPORT_LIBZ="$LIBZ"
AC_SUBST(EXPORT_LIBJPEG)
AC_SUBST(EXPORT_LIBPNG)
AC_SUBST(EXPORT_LIBTIFF)
AC_SUBST(EXPORT_LIBZ)
AC_CHECK_HEADER(stdlib.h,AC_DEFINE(HAVE_STDLIB_H))
dnl
dnl End of "$Id: cups-image.m4 8344 2009-02-10 17:05:35Z mike $".
dnl
+4 -4
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-largefile.m4 6649 2007-07-11 21:46:42Z mike $"
dnl
dnl Large file support stuff for CUPS.
dnl Large file support stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 2007 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
@@ -48,5 +48,5 @@ fi
AC_CHECK_FUNC(strtoll, AC_DEFINE(HAVE_STRTOLL))
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-largefile.m4 6649 2007-07-11 21:46:42Z mike $".
dnl
+5 -4
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-launchd.m4 8344 2009-02-10 17:05:35Z mike $"
dnl
dnl launchd stuff for CUPS.
dnl launchd stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2010 by Apple Inc.
dnl Copyright 2007-2009 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
@@ -35,9 +35,10 @@ if test x$enable_launchd != xno; then
esac
fi
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LAUNCHD_CONF, "$DEFAULT_LAUNCHD_CONF")
AC_SUBST(DEFAULT_LAUNCHD_CONF)
AC_SUBST(LAUNCHDLIBS)
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-launchd.m4 8344 2009-02-10 17:05:35Z mike $".
dnl
+52
Ver Arquivo
@@ -0,0 +1,52 @@
dnl
dnl "$Id: cups-ldap.m4 8344 2009-02-10 17:05:35Z mike $"
dnl
dnl LDAP configuration stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2009 by Apple Inc.
dnl Copyright 2003-2006 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
AC_ARG_ENABLE(ldap, [ --disable-ldap disable LDAP support])
AC_ARG_WITH(ldap-libs, [ --with-ldap-libs set directory for LDAP library],
LDFLAGS="-L$withval $LDFLAGS"
DSOFLAGS="-L$withval $DSOFLAGS",)
AC_ARG_WITH(ldap-includes, [ --with-ldap-includes set directory for LDAP includes],
CFLAGS="-I$withval $CFLAGS"
CPPFLAGS="-I$withval $CPPFLAGS",)
LIBLDAP=""
if test x$enable_ldap != xno; then
AC_CHECK_HEADER(ldap.h, [
AC_CHECK_LIB(ldap, ldap_initialize,
AC_DEFINE(HAVE_LDAP)
AC_DEFINE(HAVE_OPENLDAP)
LIBLDAP="-lldap"
AC_CHECK_LIB(ldap, ldap_start_tls,
AC_DEFINE(HAVE_LDAP_SSL)),
AC_CHECK_LIB(ldap, ldap_init,
AC_DEFINE(HAVE_LDAP)
AC_DEFINE(HAVE_MOZILLA_LDAP)
LIBLDAP="-lldap"
AC_CHECK_HEADER(ldap_ssl.h, AC_DEFINE(HAVE_LDAP_SSL_H),,[#include <ldap.h>])
AC_CHECK_LIB(ldap, ldapssl_init,
AC_DEFINE(HAVE_LDAP_SSL)))
)
AC_CHECK_LIB(ldap, ldap_set_rebind_proc, AC_DEFINE(HAVE_LDAP_REBIND_PROC))
])
fi
AC_SUBST(LIBLDAP)
dnl
dnl End of "$Id: cups-ldap.m4 8344 2009-02-10 17:05:35Z mike $".
dnl
+4 -4
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-libtool.m4 8344 2009-02-10 17:05:35Z mike $"
dnl
dnl Libtool stuff for CUPS.
dnl Libtool stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 2007-2009 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
@@ -35,5 +35,5 @@ if test x$LIBTOOL != x; then
fi
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-libtool.m4 8344 2009-02-10 17:05:35Z mike $".
dnl
+19 -5
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-manpages.m4 8230 2009-01-12 19:17:09Z mike $"
dnl
dnl Manpage stuff for CUPS.
dnl Manpage stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2012 by Apple Inc.
dnl Copyright 2007 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
@@ -28,6 +28,12 @@ if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then
AMANDIR="/usr/share/man"
PMANDIR="/usr/share/man"
;;
IRIX)
# SGI IRIX
mandir="/usr/share/catman/u_man"
AMANDIR="/usr/share/catman/a_man"
PMANDIR="/usr/share/catman/p_man"
;;
*)
# All others
mandir="/usr/man"
@@ -45,6 +51,14 @@ AC_SUBST(PMANDIR)
dnl Setup manpage extensions...
case "$uname" in
IRIX*)
# SGI IRIX
MAN1EXT=1
MAN5EXT=5
MAN7EXT=7
MAN8EXT=1m
MAN8DIR=1
;;
SunOS* | HP-UX*)
# Solaris and HP-UX
MAN1EXT=1
@@ -54,7 +68,7 @@ case "$uname" in
MAN8DIR=1m
;;
Linux* | GNU* | Darwin*)
# Linux, GNU Hurd, and OS X
# Linux, GNU Hurd, and Mac OS X
MAN1EXT=1.gz
MAN5EXT=5.gz
MAN7EXT=7.gz
@@ -78,5 +92,5 @@ AC_SUBST(MAN8EXT)
AC_SUBST(MAN8DIR)
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-manpages.m4 8230 2009-01-12 19:17:09Z mike $".
dnl
+4 -4
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-network.m4 7918 2008-09-08 22:03:01Z mike $"
dnl
dnl Networking stuff for CUPS.
dnl Networking stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 2007-2008 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
@@ -70,5 +70,5 @@ AC_CHECK_HEADERS(AppleTalk/at_proto.h,AC_DEFINE(HAVE_APPLETALK_AT_PROTO_H),,
[#include <netat/appletalk.h>])
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-network.m4 7918 2008-09-08 22:03:01Z mike $".
dnl
+7 -11
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-opsys.m4 6649 2007-07-11 21:46:42Z mike $"
dnl
dnl Operating system stuff for CUPS.
dnl Operating system stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2012 by Apple Inc.
dnl Copyright 2007 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
@@ -19,21 +19,17 @@ uversion=`uname -r | sed -e '1,$s/^[[^0-9]]*\([[0-9]]*\)\.\([[0-9]]*\).*/\1\2/'`
uarch=`uname -m`
case "$uname" in
Darwin*)
uname="Darwin"
if test $uversion -lt 120; then
AC_MSG_ERROR([Sorry, this version of CUPS requires OS X 10.8 or higher.])
fi
;;
GNU* | GNU/*)
uname="GNU"
;;
IRIX*)
uname="IRIX"
;;
Linux*)
uname="Linux"
;;
esac
dnl
dnl "$Id$"
dnl "$Id: cups-opsys.m4 6649 2007-07-11 21:46:42Z mike $"
dnl
+19 -17
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-pam.m4 8344 2009-02-10 17:05:35Z mike $"
dnl
dnl PAM stuff for CUPS.
dnl PAM stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2012 by Apple Inc.
dnl Copyright 2007-2009 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
@@ -22,10 +22,9 @@ if test $uname = AIX; then
fi
PAMDIR=""
PAMFILE="pam.std"
PAMFILE=""
PAMLIBS=""
PAMMOD="pam_unknown.so"
PAMMODAUTH="pam_unknown.so"
if test x$enable_pam != xno; then
SAVELIBS="$LIBS"
@@ -61,7 +60,7 @@ if test x$enable_pam != xno; then
case "$uname" in
Darwin*)
# Darwin/OS X
# Darwin, MacOS X
if test "x$with_pam_module" != x; then
PAMFILE="pam.$with_pam_module"
elif test -f /usr/lib/pam/pam_opendirectory.so.2; then
@@ -71,22 +70,26 @@ if test x$enable_pam != xno; then
fi
;;
IRIX)
# SGI IRIX
PAMFILE="pam.irix"
;;
*)
# All others; this test might need to be updated
# as Linux distributors move things around...
if test "x$with_pam_module" != x; then
PAMMOD="pam_${with_pam_module}.so"
elif test -f /lib/security/pam_unix2.so; then
PAMMOD="pam_unix2.so"
elif test -f /lib/security/pam_unix.so; then
PAMMOD="pam_unix.so"
else
for mod in pam_unix2.so pam_unix.so pam_pwdb.so; do
if test -f /lib/security/$mod; then
PAMMOD="$mod"
break;
fi
done
fi
if test "x$PAMMOD" = xpam_unix.so; then
PAMMODAUTH="$PAMMOD shadow nodelay"
else
PAMMODAUTH="$PAMMOD nodelay"
fi
PAMFILE="pam.std"
;;
esac
fi
@@ -95,8 +98,7 @@ AC_SUBST(PAMDIR)
AC_SUBST(PAMFILE)
AC_SUBST(PAMLIBS)
AC_SUBST(PAMMOD)
AC_SUBST(PAMMODAUTH)
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-pam.m4 8344 2009-02-10 17:05:35Z mike $".
dnl
+31
Ver Arquivo
@@ -0,0 +1,31 @@
dnl
dnl "$Id: cups-pap.m4 8524 2009-04-19 21:18:45Z mike $"
dnl
dnl PAP (AppleTalk) stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2009 by Apple Inc.
dnl Copyright 2006 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
# Currently the PAP backend is only supported on MacOS X with the AppleTalk
# SDK installed...
AC_ARG_ENABLE(pap, [ --enable-pap build with AppleTalk support])
PAP=""
AC_SUBST(PAP)
if test x$enable_pap = xyes -a $uname = Darwin; then
AC_CHECK_HEADER(netat/appletalk.h,[
PAP="pap"
AC_CHECK_HEADER(AppleTalk/at_proto.h)])
fi
dnl
dnl End of "$Id: cups-pap.m4 8524 2009-04-19 21:18:45Z mike $".
dnl
+88
Ver Arquivo
@@ -0,0 +1,88 @@
dnl
dnl "$Id: cups-pdf.m4 8760 2009-08-07 22:30:30Z mike $"
dnl
dnl PDF filter configuration stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2009 by Apple Inc.
dnl Copyright 2006 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,/path/to/gs,pdftops,/path/to/pdftops,none), default=pdftops ])
PDFTOPS=""
CUPS_PDFTOPS=""
CUPS_GHOSTSCRIPT=""
case "x$with_pdftops" in
x) # Default/auto
if test $uname != Darwin; then
AC_PATH_PROG(CUPS_PDFTOPS, pdftops)
if test "x$CUPS_PDFTOPS" != x; then
AC_DEFINE(HAVE_PDFTOPS)
PDFTOPS="pdftops"
else
AC_PATH_PROG(CUPS_GHOSTSCRIPT, gs)
if test "x$CUPS_GHOSTSCRIPT" != x; then
AC_DEFINE(HAVE_GHOSTSCRIPT)
PDFTOPS="pdftops"
fi
fi
fi
;;
xgs)
AC_PATH_PROG(CUPS_GHOSTSCRIPT, gs)
if test "x$CUPS_GHOSTSCRIPT" != x; then
AC_DEFINE(HAVE_GHOSTSCRIPT)
PDFTOPS="pdftops"
else
AC_MSG_ERROR(Unable to find gs program!)
exit 1
fi
;;
x/*/gs) # Use /path/to/gs without any check:
CUPS_GHOSTSCRIPT="$with_pdftops"
AC_DEFINE(HAVE_GHOSTSCRIPT)
PDFTOPS="pdftops"
;;
xpdftops)
AC_PATH_PROG(CUPS_PDFTOPS, pdftops)
if test "x$CUPS_PDFTOPS" != x; then
AC_DEFINE(HAVE_PDFTOPS)
PDFTOPS="pdftops"
else
AC_MSG_ERROR(Unable to find pdftops program!)
exit 1
fi
;;
x/*/pdftops) # Use /path/to/pdftops without any check:
CUPS_PDFTOPS="$with_pdftops"
AC_DEFINE(HAVE_PDFTOPS)
PDFTOPS="pdftops"
;;
xnone) # Make no pdftops filter if with_pdftops=none:
;;
*) # Invalid with_pdftops value:
AC_MSG_ERROR(Invalid with_pdftops value!)
exit 1
;;
esac
AC_DEFINE_UNQUOTED(CUPS_PDFTOPS, "$CUPS_PDFTOPS")
AC_DEFINE_UNQUOTED(CUPS_GHOSTSCRIPT, "$CUPS_GHOSTSCRIPT")
AC_SUBST(PDFTOPS)
dnl
dnl End of "$Id: cups-pdf.m4 8760 2009-08-07 22:30:30Z mike $".
dnl
+4 -4
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-poll.m4 8524 2009-04-19 21:18:45Z mike $"
dnl
dnl Select/poll stuff for CUPS.
dnl Select/poll stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 2007 by Apple Inc.
dnl Copyright 2006 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
@@ -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 8524 2009-04-19 21:18:45Z mike $".
dnl
+15 -4
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-scripting.m4 7915 2008-09-07 22:18:29Z mike $"
dnl
dnl Scripting configuration stuff for CUPS.
dnl Scripting configuration stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2010 by Apple Inc.
dnl Copyright 2007-2008 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
@@ -68,6 +68,17 @@ else
AC_DEFINE(HAVE_PHP)
fi
PHPDIR=""
if test "x$CUPS_PHP" != xno; then
AC_PATH_PROG(PHPCONFIG, php-config)
if test "x$PHPCONFIG" != x; then
PHPDIR="scripting/php"
fi
fi
AC_SUBST(PHPDIR)
dnl Do we have Python?
AC_ARG_WITH(python, [ --with-python set Python interpreter for web interfaces ],
CUPS_PYTHON="$withval",
@@ -85,5 +96,5 @@ if test "x$CUPS_PYTHON" != x; then
fi
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-scripting.m4 7915 2008-09-07 22:18:29Z mike $".
dnl
+49 -39
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-sharedlibs.m4 8344 2009-02-10 17:05:35Z mike $"
dnl
dnl Shared library support for CUPS.
dnl Shared library support for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2012 by Apple Inc.
dnl Copyright 2007-2009 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
@@ -18,15 +18,12 @@ DSOFLAGS="${DSOFLAGS:=}"
AC_ARG_ENABLE(shared, [ --disable-shared do not create shared libraries])
cupsbase="cups"
LIBCUPSBASE="lib$cupsbase"
LIBCUPSSTATIC="lib$cupsbase.a"
if test x$enable_shared != xno; then
case "$uname" in
SunOS*)
LIBCUPS="lib$cupsbase.so.2"
LIBCUPS="libcups.so.2"
LIBCUPSCGI="libcupscgi.so.1"
LIBCUPSDRIVER="libcupsdriver.so.1"
LIBCUPSIMAGE="libcupsimage.so.2"
LIBCUPSMIME="libcupsmime.so.1"
LIBCUPSPPDC="libcupsppdc.so.1"
@@ -35,8 +32,9 @@ if test x$enable_shared != xno; then
DSOFLAGS="$DSOFLAGS -Wl,-h\`basename \$@\` -G \$(OPTIM)"
;;
UNIX_S*)
LIBCUPS="lib$cupsbase.so.2"
LIBCUPS="libcups.so.2"
LIBCUPSCGI="libcupscgi.so.1"
LIBCUPSDRIVER="libcupsdriver.so.1"
LIBCUPSIMAGE="libcupsimage.so.2"
LIBCUPSMIME="libcupsmime.so.1"
LIBCUPSPPDC="libcupsppdc.so.1"
@@ -47,8 +45,9 @@ if test x$enable_shared != xno; then
HP-UX*)
case "$uarch" in
ia64)
LIBCUPS="lib$cupsbase.so.2"
LIBCUPS="libcups.so.2"
LIBCUPSCGI="libcupscgi.so.1"
LIBCUPSDRIVER="libcupsdriver.so.1"
LIBCUPSIMAGE="libcupsimage.so.2"
LIBCUPSMIME="libcupsmime.so.1"
LIBCUPSPPDC="libcupsppdc.so.1"
@@ -57,8 +56,9 @@ if test x$enable_shared != xno; then
DSOFLAGS="$DSOFLAGS -Wl,-b,-z,+h,\`basename \$@\`"
;;
*)
LIBCUPS="lib$cupsbase.sl.2"
LIBCUPS="libcups.sl.2"
LIBCUPSCGI="libcupscgi.sl.1"
LIBCUPSDRIVER="libcupsdriver.sl.1"
LIBCUPSIMAGE="libcupsimage.sl.2"
LIBCUPSMIME="libcupsmime.sl.1"
LIBCUPSPPDC="libcupsppdc.sl.1"
@@ -69,8 +69,9 @@ if test x$enable_shared != xno; then
esac
;;
IRIX)
LIBCUPS="lib$cupsbase.so.2"
LIBCUPS="libcups.so.2"
LIBCUPSCGI="libcupscgi.so.1"
LIBCUPSDRIVER="libcupsdriver.so.1"
LIBCUPSIMAGE="libcupsimage.so.2"
LIBCUPSMIME="libcupsmime.so.1"
LIBCUPSPPDC="libcupsppdc.so.1"
@@ -79,8 +80,9 @@ if test x$enable_shared != xno; then
DSOFLAGS="$DSOFLAGS -set_version,sgi2.6,-soname,\`basename \$@\` -shared \$(OPTIM)"
;;
OSF1* | Linux | GNU | *BSD*)
LIBCUPS="lib$cupsbase.so.2"
LIBCUPS="libcups.so.2"
LIBCUPSCGI="libcupscgi.so.1"
LIBCUPSDRIVER="libcupsdriver.so.1"
LIBCUPSIMAGE="libcupsimage.so.2"
LIBCUPSMIME="libcupsmime.so.1"
LIBCUPSPPDC="libcupsppdc.so.1"
@@ -89,8 +91,9 @@ if test x$enable_shared != xno; then
DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared \$(OPTIM)"
;;
Darwin*)
LIBCUPS="lib$cupsbase.2.dylib"
LIBCUPS="libcups.2.dylib"
LIBCUPSCGI="libcupscgi.1.dylib"
LIBCUPSDRIVER="libcupsdriver.1.dylib"
LIBCUPSIMAGE="libcupsimage.2.dylib"
LIBCUPSMIME="libcupsmime.1.dylib"
LIBCUPSPPDC="libcupsppdc.1.dylib"
@@ -99,9 +102,9 @@ if test x$enable_shared != xno; then
DSOFLAGS="$DSOFLAGS -dynamiclib -single_module -lc"
;;
AIX*)
LIBCUPS="lib${cupsbase}_s.a"
LIBCUPSBASE="${cupsbase}_s"
LIBCUPS="libcups_s.a"
LIBCUPSCGI="libcupscgi_s.a"
LIBCUPSDRIVER="libcupsdriver_s.a"
LIBCUPSIMAGE="libcupsimage_s.a"
LIBCUPSMIME="libcupsmime_s.a"
LIBCUPSPPDC="libcupsppdc_s.a"
@@ -112,8 +115,9 @@ if test x$enable_shared != xno; then
*)
echo "Warning: shared libraries may not be supported. Trying -shared"
echo " option with compiler."
LIBCUPS="lib$cupsbase.so.2"
LIBCUPS="libcups.so.2"
LIBCUPSCGI="libcupscgi.so.1"
LIBCUPSDRIVER="libcupsdriver.so.1"
LIBCUPSIMAGE="libcupsimage.so.2"
LIBCUPSMIME="libcupsmime.so.1"
LIBCUPSPPDC="libcupsppdc.so.1"
@@ -124,8 +128,9 @@ if test x$enable_shared != xno; then
esac
else
PICFLAG=0
LIBCUPS="lib$cupsbase.a"
LIBCUPS="libcups.a"
LIBCUPSCGI="libcupscgi.a"
LIBCUPSDRIVER="libcupsdriver.a"
LIBCUPSIMAGE="libcupsimage.a"
LIBCUPSMIME="libcupsmime.a"
LIBCUPSPPDC="libcupsppdc.a"
@@ -133,41 +138,36 @@ else
DSOXX=":"
fi
# 32-bit and 64-bit libraries need variations of the standard
# DSOFLAGS...
DSO32FLAGS="$DSOFLAGS"
DSO64FLAGS="$DSOFLAGS"
AC_SUBST(DSO)
AC_SUBST(DSOXX)
AC_SUBST(DSOFLAGS)
AC_SUBST(DSO32FLAGS)
AC_SUBST(DSO64FLAGS)
AC_SUBST(LIBCUPS)
AC_SUBST(LIBCUPSBASE)
AC_SUBST(LIBCUPSCGI)
AC_SUBST(LIBCUPSDRIVER)
AC_SUBST(LIBCUPSIMAGE)
AC_SUBST(LIBCUPSMIME)
AC_SUBST(LIBCUPSPPDC)
AC_SUBST(LIBCUPSSTATIC)
if test x$enable_shared = xno; then
LINKCUPS="../cups/lib$cupsbase.a"
LINKCUPS="../cups/libcups.a"
LINKCUPSIMAGE="../filter/libcupsimage.a"
EXTLINKCUPS="-lcups"
EXTLINKCUPSIMAGE="-lcupsimage"
else
if test $uname = AIX; then
LINKCUPS="-l${cupsbase}_s"
LINKCUPS="-lcups_s"
LINKCUPSIMAGE="-lcupsimage_s"
EXTLINKCUPS="-lcups_s"
EXTLINKCUPSIMAGE="-lcupsimage_s"
else
LINKCUPS="-l${cupsbase}"
LINKCUPS="-lcups"
LINKCUPSIMAGE="-lcupsimage"
EXTLINKCUPS="-lcups"
EXTLINKCUPSIMAGE="-lcupsimage"
fi
fi
AC_SUBST(EXTLINKCUPS)
AC_SUBST(EXTLINKCUPSIMAGE)
AC_SUBST(LINKCUPS)
AC_SUBST(LINKCUPSIMAGE)
@@ -179,7 +179,7 @@ if test "$DSO" != ":"; then
# rather than to the executables. This makes things smaller if you
# are using any static libraries, and it also allows us to distribute
# a single DSO rather than a bunch...
DSOLIBS="\$(LIBZ)"
DSOLIBS="\$(LIBTIFF) \$(LIBPNG) \$(LIBJPEG) \$(LIBZ)"
IMGLIBS=""
# Tell the run-time linkers where to find a DSO. Some platforms
@@ -191,9 +191,13 @@ if test "$DSO" != ":"; then
case "$uarch" in
ia64)
DSOFLAGS="-Wl,+s,+b,$libdir $DSOFLAGS"
DSO32FLAGS="-Wl,+s,+b,$LIB32DIR $DSO32FLAGS"
DSO64FLAGS="-Wl,+s,+b,$LIB64DIR $DSO64FLAGS"
;;
*)
DSOFLAGS="+s +b $libdir $DSOFLAGS"
DSO32FLAGS="+s +b $LIB32DIR $DSO32FLAGS"
DSO64FLAGS="+s +b $LIB64DIR $DSO64FLAGS"
;;
esac
LDFLAGS="$LDFLAGS -Wl,+s,+b,$libdir"
@@ -203,6 +207,8 @@ if test "$DSO" != ":"; then
# Solaris...
if test $exec_prefix != /usr; then
DSOFLAGS="-R$libdir $DSOFLAGS"
DSO32FLAGS="-R$LIB32DIR $DSO32FLAGS"
DSO64FLAGS="-R$LIB64DIR $DSO64FLAGS"
LDFLAGS="$LDFLAGS -R$libdir"
EXPORT_LDFLAGS="-R$libdir"
fi
@@ -211,14 +217,18 @@ if test "$DSO" != ":"; then
# *BSD...
if test $exec_prefix != /usr; then
DSOFLAGS="-Wl,-R$libdir $DSOFLAGS"
DSO32FLAGS="-Wl,-R$LIB32DIR $DSO32FLAGS"
DSO64FLAGS="-Wl,-R$LIB64DIR $DSO64FLAGS"
LDFLAGS="$LDFLAGS -Wl,-R$libdir"
EXPORT_LDFLAGS="-Wl,-R$libdir"
fi
;;
Linux | GNU)
# Linux, and HURD...
IRIX | Linux | GNU)
# IRIX, Linux, and HURD...
if test $exec_prefix != /usr; then
DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS"
DSO32FLAGS="-Wl,-rpath,$LIB32DIR $DSO32FLAGS"
DSO64FLAGS="-Wl,-rpath,$LIB64DIR $DSO64FLAGS"
LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir"
EXPORT_LDFLAGS="-Wl,-rpath,$libdir"
fi
@@ -226,7 +236,7 @@ if test "$DSO" != ":"; then
esac
else
DSOLIBS=""
IMGLIBS="\$(LIBZ)"
IMGLIBS="\$(LIBTIFF) \$(LIBPNG) \$(LIBJPEG) \$(LIBZ)"
fi
AC_SUBST(DSOLIBS)
@@ -234,5 +244,5 @@ AC_SUBST(IMGLIBS)
AC_SUBST(EXPORT_LDFLAGS)
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-sharedlibs.m4 8344 2009-02-10 17:05:35Z mike $".
dnl
+38
Ver Arquivo
@@ -0,0 +1,38 @@
dnl
dnl "$Id: cups-slp.m4 8344 2009-02-10 17:05:35Z mike $"
dnl
dnl OpenSLP configuration stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2009 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(slp, [ --disable-slp disable SLP support])
AC_ARG_WITH(openslp-libs, [ --with-openslp-libs set directory for OpenSLP library],
LDFLAGS="-L$withval $LDFLAGS"
DSOFLAGS="-L$withval $DSOFLAGS",)
AC_ARG_WITH(openslp-includes, [ --with-openslp-includes set directory for OpenSLP includes],
CFLAGS="-I$withval $CFLAGS"
CPPFLAGS="-I$withval $CPPFLAGS",)
LIBSLP=""
if test x$enable_slp != xno; then
AC_CHECK_HEADER(slp.h,
AC_CHECK_LIB(slp, SLPOpen,
AC_DEFINE(HAVE_LIBSLP)
LIBSLP="-lslp"))
fi
AC_SUBST(LIBSLP)
dnl
dnl End of "$Id: cups-slp.m4 8344 2009-02-10 17:05:35Z mike $".
dnl
+24 -66
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-ssl.m4 8591 2009-05-04 23:40:10Z mike $"
dnl
dnl OpenSSL/GNUTLS stuff for CUPS.
dnl OpenSSL/GNUTLS stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2012 by Apple Inc.
dnl Copyright 2007-2009 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
@@ -26,30 +26,17 @@ AC_ARG_WITH(openssl-includes, [ --with-openssl-includes set directory for OpenS
SSLFLAGS=""
SSLLIBS=""
have_ssl=0
CUPS_SERVERCERT=""
CUPS_SERVERKEY=""
if test x$enable_ssl != xno; then
dnl Look for CDSA...
if test $have_ssl = 0 -a "x$enable_cdsassl" != "xno"; then
if test "x${SSLLIBS}" = "x" -a "x${enable_cdsassl}" != "xno"; then
if test $uname = Darwin; then
AC_CHECK_HEADER(Security/SecureTransport.h, [
have_ssl=1
SSLLIBS="-framework CoreFoundation -framework Security"
AC_DEFINE(HAVE_SSL)
AC_DEFINE(HAVE_CDSASSL)
CUPS_SERVERCERT="/Library/Keychains/System.keychain"
dnl Check for the various security headers...
AC_CHECK_HEADER(Security/SecureTransportPriv.h,
AC_DEFINE(HAVE_SECURETRANSPORTPRIV_H))
AC_CHECK_HEADER(Security/SecCertificate.h,
AC_DEFINE(HAVE_SECCERTIFICATE_H))
AC_CHECK_HEADER(Security/SecItem.h,
AC_DEFINE(HAVE_SECITEM_H))
AC_CHECK_HEADER(Security/SecItemPriv.h,
AC_DEFINE(HAVE_SECITEMPRIV_H),,
[#include <Security/SecItem.h>])
AC_CHECK_HEADER(Security/SecPolicy.h,
AC_DEFINE(HAVE_SECPOLICY_H))
AC_CHECK_HEADER(Security/SecPolicyPriv.h,
@@ -59,45 +46,31 @@ if test x$enable_ssl != xno; then
AC_CHECK_HEADER(Security/SecIdentitySearchPriv.h,
AC_DEFINE(HAVE_SECIDENTITYSEARCHPRIV_H))
AC_DEFINE(HAVE_CSSMERRORSTRING)])
dnl Check for SecIdentitySearchCreateWithPolicy...
AC_MSG_CHECKING(for SecIdentitySearchCreateWithPolicy)
if test $uversion -ge 80; then
AC_DEFINE(HAVE_SECIDENTITYSEARCHCREATEWITHPOLICY)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi])
fi
fi
dnl Then look for GNU TLS...
if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then
if test "x${SSLLIBS}" = "x" -a "x${enable_gnutls}" != "xno" -a "x$PKGCONFIG" != x; then
AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config)
AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config)
if $PKGCONFIG --exists gnutls; then
have_ssl=1
SSLLIBS=`$PKGCONFIG --libs gnutls`
SSLFLAGS=`$PKGCONFIG --cflags gnutls`
AC_DEFINE(HAVE_SSL)
AC_DEFINE(HAVE_GNUTLS)
elif test "x$LIBGNUTLSCONFIG" != x; then
have_ssl=1
SSLLIBS=`$LIBGNUTLSCONFIG --libs`
SSLFLAGS=`$LIBGNUTLSCONFIG --cflags`
AC_DEFINE(HAVE_SSL)
AC_DEFINE(HAVE_GNUTLS)
fi
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,[
if test "x${SSLLIBS}" = "x" -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"
@@ -109,13 +82,12 @@ if test x$enable_ssl != xno; then
dnl case the RSAREF libraries are needed.
for libcrypto in \
"-lcrypto" \
"-lcrypto -lrsaref" \
"-lcrypto -lRSAglue -lrsaref"
"-lcrypto" \
"-lcrypto -lrsaref" \
"-lcrypto -lRSAglue -lrsaref"
do
AC_CHECK_LIB(ssl,SSL_new,
[have_ssl=1
SSLFLAGS="-DOPENSSL_DISABLE_OLD_DES_SUPPORT"
[SSLFLAGS="-DOPENSSL_DISABLE_OLD_DES_SUPPORT"
SSLLIBS="-lssl $libcrypto"
AC_DEFINE(HAVE_SSL)
AC_DEFINE(HAVE_LIBSSL)],,
@@ -126,36 +98,22 @@ if test x$enable_ssl != xno; then
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"])
LIBS="$SAVELIBS")
fi
fi
IPPALIASES="http"
if test $have_ssl = 1; then
if test "x$SSLLIBS" != x; 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
AC_MSG_ERROR([Unable to enable SSL support.])
fi
AC_SUBST(CUPS_SERVERCERT)
AC_SUBST(CUPS_SERVERKEY)
AC_SUBST(IPPALIASES)
AC_SUBST(SSLFLAGS)
AC_SUBST(SSLLIBS)
EXPORT_SSLLIBS="$SSLLIBS"
AC_SUBST(EXPORT_SSLLIBS)
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-ssl.m4 8591 2009-05-04 23:40:10Z mike $".
dnl
+4 -4
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-threads.m4 8344 2009-02-10 17:05:35Z mike $"
dnl
dnl Threading stuff for CUPS.
dnl Threading stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 2007-2009 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
@@ -50,5 +50,5 @@ fi
AC_SUBST(PTHREAD_FLAGS)
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-threads.m4 8344 2009-02-10 17:05:35Z mike $".
dnl
+69 -160
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
* Configuration file for CUPS.
* Configuration file for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2013 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -32,7 +32,6 @@
#define CUPS_DEFAULT_GROUP "sys"
#define CUPS_DEFAULT_SYSTEM_GROUPS "sys root system"
#define CUPS_DEFAULT_PRINTOPERATOR_AUTH "@SYSTEM"
#define CUPS_DEFAULT_SYSTEM_AUTHKEY "system.print.admin"
/*
@@ -63,8 +62,12 @@
*/
#define CUPS_DEFAULT_BROWSING 1
#define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS ""
#define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS "CUPS"
#define CUPS_DEFAULT_BROWSE_REMOTE_PROTOCOLS "CUPS"
#define CUPS_DEFAULT_BROWSE_SHORT_NAMES 1
#define CUPS_DEFAULT_DEFAULT_SHARED 1
#define CUPS_DEFAULT_IMPLICIT_CLASSES 1
#define CUPS_DEFAULT_USE_NETWORK_DEFAULT 1
/*
@@ -97,19 +100,12 @@
/*
* Do we have domain socket support, and if so what is the default one?
* Do we have domain socket support?
*/
#undef CUPS_DEFAULT_DOMAINSOCKET
/*
* Default WebInterface value...
*/
#undef CUPS_DEFAULT_WEBIF
/*
* Where are files stored?
*
@@ -132,11 +128,13 @@
/*
* Do we have ZLIB?
* Do we have various image libraries?
*/
#undef HAVE_LIBPNG
#undef HAVE_LIBZ
#undef HAVE_INFLATECOPY
#undef HAVE_LIBJPEG
#undef HAVE_LIBTIFF
/*
@@ -167,10 +165,10 @@
/*
* Use <stdint.h>?
* Do we have <scsi/sg.h>?
*/
#undef HAVE_STDINT_H
#undef HAVE_SCSI_SG_H
/*
@@ -181,7 +179,6 @@
#undef HAVE_STRINGS_H
#undef HAVE_BSTRING_H
/*
* Do we have the long long type?
*/
@@ -196,7 +193,6 @@
# define CUPS_LLCAST (long)
#endif /* HAVE_LONG_LONG */
/*
* Do we have the strtoll() function?
*/
@@ -207,12 +203,13 @@
# define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
#endif /* !HAVE_STRTOLL */
/*
* Do we have the strXXX() functions?
*/
#undef HAVE_STRDUP
#undef HAVE_STRCASECMP
#undef HAVE_STRNCASECMP
#undef HAVE_STRLCAT
#undef HAVE_STRLCPY
@@ -224,13 +221,6 @@
#undef HAVE_GETEUID
/*
* Do we have the setpgid() function?
*/
#undef HAVE_SETPGID
/*
* Do we have the vsyslog() function?
*/
@@ -294,33 +284,41 @@
#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?
*/
#undef HAVE_AUTHORIZATION_H
#undef HAVE_SECBASEPRIV_H
#undef HAVE_SECCERTIFICATE_H
#undef HAVE_SECIDENTITYSEARCHPRIV_H
#undef HAVE_SECITEM_H
#undef HAVE_SECITEMPRIV_H
#undef HAVE_SECPOLICY_H
#undef HAVE_SECPOLICYPRIV_H
#undef HAVE_SECURETRANSPORTPRIV_H
#undef HAVE_SECBASEPRIV_H
#undef HAVE_SECIDENTITYSEARCHPRIV_H
/*
* Do we have the cssmErrorString function?
* Do we have the SecIdentitySearchCreateWithPolicy function?
*/
#undef HAVE_CSSMERRORSTRING
#undef HAVE_SECIDENTITYSEARCHCREATEWITHPOLICY
/*
* Do we have the SLP library?
*/
#undef HAVE_LIBSLP
/*
* Do we have an LDAP library?
*/
#undef HAVE_LDAP
#undef HAVE_OPENLDAP
#undef HAVE_MOZILLA_LDAP
#undef HAVE_LDAP_SSL_H
#undef HAVE_LDAP_SSL
#undef HAVE_LDAP_REBIND_PROC
/*
@@ -331,19 +329,12 @@
/*
* Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
* Do we have DNS Service Discovery (aka Bonjour)?
*/
#undef HAVE_DNSSD
/*
* Do we have Avahi for DNS Service Discovery (aka Bonjour)?
*/
#undef HAVE_AVAHI
/*
* Do we have <sys/ioctl.h>?
*/
@@ -351,13 +342,6 @@
#undef HAVE_SYS_IOCTL_H
/*
* Does the "stat" structure contain the "st_gen" member?
*/
#undef HAVE_ST_GEN
/*
* Does the "tm" structure contain the "tm_gmtoff" member?
*/
@@ -448,6 +432,7 @@
#undef HAVE_LAUNCH_H
#undef HAVE_LAUNCHD
#define CUPS_DEFAULT_LAUNCHD_CONF ""
/*
@@ -469,7 +454,6 @@
*/
#undef HAVE_PDFTOPS
#undef HAVE_PDFTOPS_WITH_ORIGPAGESIZES
#define CUPS_PDFTOPS "/usr/bin/pdftops"
@@ -478,10 +462,17 @@
*/
#undef HAVE_GHOSTSCRIPT
#undef HAVE_GHOSTSCRIPT_PS2WRITE
#define CUPS_GHOSTSCRIPT "/usr/bin/gs"
/*
* Do we have Darwin's CoreFoundation and SystemConfiguration frameworks?
*/
#undef HAVE_COREFOUNDATION
#undef HAVE_SYSTEMCONFIGURATION
/*
* Do we have CoreFoundation public and private headers?
*/
@@ -492,21 +483,7 @@
/*
* Do we have ApplicationServices public headers?
*/
#undef HAVE_APPLICATIONSERVICES_H
/*
* Do we have the SCDynamicStoreCopyComputerName function?
*/
#undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME
/*
* Do we have OS X 10.4's mbr_XXX functions?
* Do we have MacOSX 10.4's mbr_XXX functions()?
*/
#undef HAVE_MEMBERSHIP_H
@@ -515,20 +492,13 @@
/*
* Do we have Darwin's notify_post header and function?
* Do we have Darwin's notify_post() header and function?
*/
#undef HAVE_NOTIFY_H
#undef HAVE_NOTIFY_POST
/*
* Do we have Darwin's IOKit private headers?
*/
#undef HAVE_IOKIT_PWR_MGT_IOPMLIBPRIVATE_H
/*
* Do we have DBUS?
*/
@@ -537,17 +507,28 @@
#undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND
/*
* Do we have the AppleTalk/at_proto.h header?
*/
#undef HAVE_APPLETALK_AT_PROTO_H
/*
* Do we have the GSSAPI support library (for Kerberos support)?
*/
#undef HAVE_GSS_ACQUIRE_CRED_EX_F
#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
#undef HAVE_GSS_GSSAPI_H
#undef HAVE_GSS_GSSAPI_SPI_H
#undef HAVE_GSSAPI
#undef HAVE_GSSAPI_GSSAPI_H
#undef HAVE_GSSAPI_H
#undef HAVE_GSSAPI_GSSAPI_H
#undef HAVE_GSSAPI_GSSAPI_GENERIC_H
#undef HAVE_GSSAPI_GSSAPI_KRB5_H
#undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
#undef HAVE_KRB5_CC_NEW_UNIQUE
#undef HAVE_KRB5_IPC_CLIENT_SET_TARGET_UID
#undef HAVE_KRB5_H
#undef HAVE_HEIMDAL
/*
@@ -605,24 +586,10 @@
* Which random number generator function to use...
*/
#undef HAVE_ARC4RANDOM
#undef HAVE_RANDOM
#undef HAVE_MRAND48
#undef HAVE_LRAND48
#ifdef HAVE_ARC4RANDOM
# define CUPS_RAND() arc4random()
# define CUPS_SRAND(v) arc4random_stir()
#elif defined(HAVE_RANDOM)
# define CUPS_RAND() random()
# define CUPS_SRAND(v) srandom(v)
#elif defined(HAVE_LRAND48)
# define CUPS_RAND() lrand48()
# define CUPS_SRAND(v) srand48(v)
#else
# define CUPS_RAND() rand()
# define CUPS_SRAND(v) srand(v)
#endif /* HAVE_ARC4RANDOM */
/*
* Do we have vproc_transaction_begin/end?
@@ -635,7 +602,7 @@
* Do we have libusb?
*/
#undef HAVE_LIBUSB
#undef HAVE_USB_H
/*
@@ -645,64 +612,6 @@
#undef HAVE_TCPD_H
/*
* Do we have <iconv.h>?
*/
#undef HAVE_ICONV_H
/*
* Do we have statfs or statvfs and one of the corresponding headers?
*/
#undef HAVE_STATFS
#undef HAVE_STATVFS
#undef HAVE_SYS_MOUNT_H
#undef HAVE_SYS_STATFS_H
#undef HAVE_SYS_STATVFS_H
#undef HAVE_SYS_VFS_H
/*
* Location of OS X localization bundle, if any.
*/
#undef CUPS_BUNDLEDIR
/*
* Do we have XPC?
*/
#undef HAVE_XPC
#undef HAVE_XPC_PRIVATE_H
/*
* Do we have Mini-XML?
*/
#undef HAVE_MXML_H
/*
* Do we have the C99 abs() function?
*/
#undef HAVE_ABS
#if !defined(HAVE_ABS) && !defined(abs)
# if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
# define abs(x) _cups_abs(x)
static inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
# elif defined(_MSC_VER)
# define abs(x) _cups_abs(x)
static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
# else
# define abs(x) ((x) < 0 ? -(x) : (x))
# endif /* __GNUC__ || __STDC_VERSION__ */
#endif /* !HAVE_ABS && !abs */
#endif /* !_CUPS_CONFIG_H_ */
/*

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