Comparar commits

..

1 Commits

Autor SHA1 Mensagem Data
msweet 2571614019 Import cups.org releases
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/tags/release-1.2b1@4306 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-05-10 18:56:23 +00:00
653 arquivos alterados com 50362 adições e 54846 exclusões
+2 -316
Ver Arquivo
@@ -1,321 +1,7 @@
CHANGES.txt - 2006-05-22
CHANGES.txt - 02/25/2006
------------------------
CHANGES IN CUPS V1.2.1
- The web interface did not handle reloads properly for
MSIE (STR #1716)
- The configure script no longer adds linker rpath
options when they are unnecessary.
- The scheduler could crash printing a debug message on
Solaris (STR #1714)
- The --enable-32bit and --enable-64bit configure options
did not always work.
- The password prompt showed the domain socket address
instead of "localhost" for local authentication (STR
#1706)
- The web interface filtered the list of printers even if
the user wasn't logged in (STR #1700)
- The IPP backend did not work reliably with some Xerox
printers (STR #1704)
- Trailing banners were not added when printing a single
file (STR #1698)
- The web interface support programs crashed on Solaris
(STR #1699)
- cupstestppd incorrectly reported problems with
*1284DeviceID attributes (STR #1710)
- Browsing could get disabled after a restart (STR #1670)
- Custom page sizes were not parsed properly (STR #1709)
- The -U option wasn't supported by lpadmin (STR #1702)
- The -u option didn't work with lpadmin (STR #1703)
- The scheduler did not create non-blocking back-channel
pipes, which caused problems when the printer driver
did not read the back-channel data (STR #1705)
- The scheduler no longer uses chunking in responses to
clients - this caused problems with older versions of
CUPS like 1.1.17 (PR #6143)
- Automatic raw printing was broken (STR #1667)
- 6-up printing was broken (STR #1697)
- The pstops filter did not disable CTRL-D processing on
the printer/RIP.
- ppdOpen*() did not load custom options properly (STR
#1680)
- "Set Printer Options" in the web interface did not
update the DefaultImageableArea or
DefaultPaperDimension attributes in the PPD file (STR
#1689)
- Fixed compile errors (STR #1682, STR #1684, STR #1685,
STR #1690)
- The lpstat command displayed the wrong error message
for a missing destination (STR #1683)
- Revised and completed the Polish translation (STR
#1669)
- Stopped jobs did not show up in the list of active jobs
(STR #1676)
- The configure script did not use the GNU TLS
"libgnutls-config" script to find the proper compiler
and linker options.
- The imagetoraster filter did not correctly generate
several 1, 2, and 4-bit color modes.
- cupsRasterWritePixels() could lose track of the current
output row.
- cupsRasterReadPixels() did not automatically swap
12/16-bit chunked pixel data.
- Moved the private _cups_raster_s structure out of the
public header.
- Updated the CUPS raster format specification to include
encoding rules and colorspace definitions.
- The Zebra PPD files had the wrong PostScript code for
the "default" option choices.
- The imagetoraster filter did not generate correct CIE
XYZ or Lab color data.
- The cups-config script did not work when invoked from a
source directory (STR #1673)
- The SNMP backend did not compile on systems that used
the getifaddrs emulation functions (STR #1668)
CHANGES IN CUPS V1.2.0
- Documentation updates (STR #1618, STR #1620, STR #1622,
STR #1637)
- Static file copy buffers reduced from 64k to 32k to
work around bogus MallocDebug library assumptions (STR
#1660)
- The scheduler did not decode the backend exit code
properly (STR #1648)
- The MacOS X USB backend did not report the 1284 device ID,
nor did it fix device IDs returned by HP printers.
- The scheduler started more slowly than 1.1.x with large
numbers of printers (STR #1653)
- cupsRasterInterpretPPD() didn't support the
cupsPreferredBitsPerColor attribute, and imagetoraster
didn't use the new API.
- The "make test" script did not create all of the necessary
subdirectories for testing (STR #1638)
- The scheduler did not prevent rotation of logs
redirected to /dev/null (STR #1651)
- "make test" did not include the SNMP backend in the
test environment (STR #1625)
- The EPM packaging files did not work (STR #1621)
- "Use Default Configuration" inserted a broken
configuration file (STR #1624)
- Redirects in the web interface did not always preserve
the encrypted status of a connection (STR #1603)
- Added the Apple "pap" backend.
- Added CUPS library to CUPS Image shared library
linkage to support Linux --as-needed linker option
(STR #1606)
- Fixed support for --enable-pie (STR #1609)
- The pdftops filter did not validate the length of the
encryption key (STR #1608)
- Updated the Polish localization.
- "Encryption Required" in the cupsd.conf file now only
requires encryption when the connection is not over the
loopback interface or domain socket.
- Printer names containing "+" were not quoted properly in
the web interface (STR #1600)
- The SNMP backend now reports the make and model in the
information string so that the auto-generated printer
name is more useful than just an IP address.
CHANGES IN CUPS V1.2rc3
- The cups-lpd program always did reverse lookups on the
client address, which could be a performance problem.
Added a "-n" option to disable lookups.
- When configured with SSL support, require encryption by
default when displaying the /admin location (STR #1592)
- The next job ID was not computed correctly if the job
cache file got out of sync with the spool directory
(STR #1582)
- The PNG image handling code used deprecated functions
from libpng (STR #1587)
- Added a Polish translation (STR #1584, STR #1586)
- More changes to the scheduler to improve battery life
on portable devices (STR #1583)
- Changed the default log level for status messages back
to "DEBUG" to be consistent with CUPS 1.1.x (STR #1579)
- The error string was not set properly when
cupsDoFileRequest() was given the name of a directory
(STR #1578)
- Fixed handling of job-hold-until (STR #1581)
- Added explicit notes to the cupsaddsmb man page
explaining that the driver filenames are case-sensitive
under UNIX and that they must be all lowercase (Windows
2000) or all UPPERCASE (Windows 95/98/Me) to work (STR
#1568)
- The USB backend incorrectly split the manufacturer name
if it contained spaces (STR #1566)
- The scheduler would hang when listing PPD files for a
manufacturer whose name contained spaces (STR #1567)
- Added the SNMP backend for network printer discovery
(STR #1555)
- cupstestppd now fails PPD files with 1284DeviceId
instead of 1284DeviceID, and cups-driverd uses a
case-insensitive comparison when looking for it (STR
#1573)
- cupsDoFileRequest() and cupsDoRequest() now work
properly with non-blocking HTTP connections.
- Added Swedish translation (STR #1569)
- "make install" now installs the MIME files with world
read permissions (STR #1565)
- More CDSA encryption support fixes (STR #1563)
- Updated the default mime.types file to support printing
of files that do not have a locally-recognized MIME
media type to raw or System V queues.
- Updated the serial port detection code on Linux (STR
#1562)
- Added some more error checking to httpGetHostname()
(STR #1561)
- The title of some administration pages was not
localized (STR #1548)
- The edit-config.tmpl file was not generated or
installed for the Spanish or Japanese localizations
(STR #1547)
- The mimeDelete() function freed the types before the
filters, but the filters needed the type data (STR #1558)
- The scheduler didn't keep track of the status pipes
properly, leading to a bad select() for multi-file jobs
(STR #1559)
- The cupstestdsc program didn't validate the ordinal
page number value for %%Page: comments.
CHANGES IN CUPS V1.2rc2
- The scheduler was not always using the string pool,
causing random crashes.
- The lpmove and the web interface's Move Job button did
not work with stopped jobs (STR #1534)
- The PostScript filter did not handle the page-set
option properly with number-up printing (STR #1543)
- The scheduler now only warns about unsupported ACLs
once (STR #1532)
- The "fitplot" option did not work with output from
Mozilla (STR #1542)
- The imagetops filter did not work with Level 2 or 3
printers (STR #1533)
- The scheduler now recognizes PostScript files with PJL
commands that do not include an ENTER LANGUAGE command.
- Added --with-printcap configure option.
- 64-bit SSL fixes for MacOS X.
- The scheduler didn't send some printer state change
events.
- The scheduler didn't send jobs to busy remote printers.
- Fixed some problems with the launchd support.
- Added new USB printer backend for MacOS X.
- The PostScript filter now handles files that start with
an incomplete PJL header (PR #6076)
- The web interface language selection code did not try
the generic language localization (STR #1531)
- The language cache, string pool, and transcoding caches
are now process global instead of per-thread to avoid
problems with GNOME and to allow for data sharing
between threads (STR #1530)
- Fixed a CUPS 1.1.x compatibility bug (STR #1528)
- The web interface redirection after certain printer
administration tasks was broken (STR #1516)
- Web interface authorization could get stuck (STR #1512)
- Localization updates (STR #1513, STR #1518, STR #1520)
- The pstops filter didn't work with some files (STR
#1523)
- "./configure --enable-static" didn't work (STR #1522)
- The scheduler was not using the configured default
Group (STR #1521)
- The web interface still did not show the localized time
and date for some locales and systems (STR #1509)
- httpAddrGetList() would crash on systems without
getaddrinfo().
- Socket URIs without a trailing slash would cause the
port number to not be accepted (STR #1519)
- Local raw and System V printers were not advertised as
such for printer browsing (STR #1502)
- The RPM spec file incorrectly put duplicate copies of
the Japanese and Spanish web interface templates in the
main cups package (STR #1517)
- cupsSetDests() did not explicitly set the permissions
of the /etc/cups/lpoptions file (STR #1508)
- The lpq command crashed with the -h option (STR #1515)
CHANGES IN CUPS V1.2rc1
- Documentation updates (STR #1497, STR #1498)
- The scheduler now redirects browsers to https: URLs
when encryption is required.
- The scheduler would crash when printing with a banner
(STR #1500)
- cups-driverd did not use the LanguageEncoding attribute
in PPD files to convert the NickName to UTF-8 (STR
#1503)
- The lpadmin command could not set the
printer-error-policy attribute (STR #1504)
- The web interface did not show the time and date in the
correct format for the locale (STR #1505)
- CUPS no longer accepts print jobs if a printer does not
support the file format (STR #1501)
- Cleaned up the PostScript filter (pstops) so that it
properly supports %%IncludeFeature and page scaling
(STR #1453)
- Fixed the cupsFileRewind() and cupsFileSeek() functions
to work properly with uncompressed files.
- Added cupsFileGetLine(), cupsFileStderr(),
cupsFileStdin(), and cupsFileStdout() functions to the
CUPS library.
- Added a new cupstestdsc program to test the DSC
conformance of PostScript files.
- Added KDE/GNOME icons and a Manage Printers menu item.
- Added --enable-image and --enable-pdftops configure
options to control whether the image and PDF filters
are built and installed (default = yes for all
platforms but MacOS X)
- Fixed a minor memory leak in the PPD API.
- Fixed transcoding issues (STR #1493)
- The scheduler now enforces a minimum job cost of 100
when doing FilterLimit checks.
- The scheduler would leak file descriptors when printing
to raw queues (STR #1491)
- The IPv6 support did not compile on Tru64 UNIX (STR
#1488)
- ppdOpen2() now converts the NickName and all UI text to
UTF-8 (STR #1475)
- The Set Allowed Users web page did not work (STR #1486)
- When the default policy was not set or set to a non-
existing policy, the scheduler did not set the default
policy name to "default" (STR #1484)
- The Zebra CPCL driver did not use the correct righthand
margin for the 4" wide label sizes.
- Fixed a problem with the parsing of fractional real
numbers in PPD files.
- Added Spanish localization files (STR #1480)
- Fixed localization of a few scheduler messages (STR
#1478)
- Fixed support for HEAD requests in the scheduler (STR
#1481)
CHANGES IN CUPS V1.2b2
- Updated the CUPS design description.
- Added --enable-32bit and --enable-64bit configure
options to allow building of separate 32/64-bit
libraries on systems that support both environments
(STR #1472)
- Various compiler warning fixes.
- Fixes for Solaris 10 builds against old GNU TLS and
LDAP libraries.
- Added a cupsArrayUserData() function to retrieve the
user data pointer for an array (useful for typing
arrays)
- The ppdEmitString() function did not compute the
required buffer size properly, leading to dropped
characters on the end of the printer commands in pstops
and imagetops (STR #1470)
CHANGES IN CUPS V1.2b1
CHANGES IN CUPS V1.2.0b1
- The serial backend now supports Equinox 8-port serial
hubs (STR #526)
+29 -33
Ver Arquivo
@@ -1,41 +1,37 @@
CREDITS.txt - 2006-04-17
CREDITS.txt - 02/23/2006
------------------------
Few projects are completed by one person, and CUPS is no exception. We'd
like to thank the following individuals for their contributions:
Nathaniel Barbour - Lots of testing and feedback.
N. Becker - setsid().
Jean-Eric Cuendet - GhostScript filters for CUPS.
Van Dang - HTTP and IPP policeman.
L. Peter Deutsch - MD5 code.
Dr. ZP Han - setgid()/setuid().
Guy Harris - *BSD shared libraries and lots of other
fixes.
Bjoern Jacke - I18N stuff.
Wang Jian - CUPS RPM corrections.
Roderick Johnstone - Beta tester of the millenium.
Till Kamppeter - Bug fixes, beta testing, evangelism.
Kenshi Muto - Japanese localization, patches, and
testing.
Kiko - Bug fixes.
Sergey V. Kovalyov - ESP Print Pro and CUPS beta tester.
Mark Lawrence - Microsoft interoperability testing.
Jeff Licquia - Bug fixes, beta testing, evangelism.
Jason McMullan - Original CUPS RPM distributions.
Wes Morgan - *BSD fixes.
Daniel Nylander - Swedish localization.
Giulio Orsero - Bug fixes and testing.
Michal Osowiecki - Polish localization.
Kurt Pfeifle - Bug fixes, beta testing, evangelism.
Petter Reinholdtsen - HP-UX compiler stuff.
Juan Pablo González Riopedre - Spanish localization
Stuart Stevens - HP JetDirect IPP information.
Andrea Suatoni - IRIX desktop integration and testing.
Tomohiro Kato - Japanese localization.
Tim Waugh - Lots of patches, testing, and Linux
integration.
Yugami - LDAP browsing support.
Nathaniel Barbour - Lots of testing and feedback.
N. Becker - setsid().
Jean-Eric Cuendet - GhostScript filters for CUPS.
Van Dang - HTTP and IPP policeman.
L. Peter Deutsch - MD5 code.
Dr. ZP Han - setgid()/setuid().
Guy Harris - *BSD shared libraries and lots of other fixes.
Bjoern Jacke - I18N stuff.
Wang Jian - CUPS RPM corrections.
Roderick Johnstone - Beta tester of the millenium.
Till Kamppeter - Bug fixes, beta testing, evangelism.
Kenshi Muto - Japanese localization, patches, and testing.
Kiko - Bug fixes.
Sergey V. Kovalyov - ESP Print Pro and CUPS beta tester.
Mark Lawrence - Microsoft interoperability testing.
Jeff Licquia - Bug fixes, beta testing, evangelism.
Jason McMullan - Original CUPS RPM distributions.
Wes Morgan - *BSD fixes.
Ulrich Oldendorf - German locale.
Giulio Orsero - Bug fixes and testing.
Kurt Pfeifle - Bug fixes, beta testing, evangelism.
Gilles QUERRET - French man pages.
Petter Reinholdtsen - HP-UX compiler stuff.
Stuart Stevens - HP JetDirect IPP information.
Andrea Suatoni - IRIX desktop integration and testing.
Tomohiro Kato - Japanese localization.
Tim Waugh - Lots of patches, testing, and Linux integration.
Yugami - LDAP browsing support.
If I've missed someone, please let me know by sending an email to
"mike@easysw.com".
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
INSTALL - CUPS v1.2.0 - 2006-05-08
INSTALL - CUPS v1.2b1 - 2006-03-03
----------------------------------
This file describes how to compile and install CUPS from source
+9 -56
Ver Arquivo
@@ -73,12 +73,6 @@ CUPS_PRIMARY_SYSTEM_GROUP = @CUPS_PRIMARY_SYSTEM_GROUP@
CUPS_CONFIG_FILE_PERM = @CUPS_CONFIG_FILE_PERM@
CUPS_LOG_FILE_PERM = @CUPS_LOG_FILE_PERM@
#
# Languages to install...
#
LANGUAGES = @LANGUAGES@
#
# Libraries...
#
@@ -103,67 +97,35 @@ INSTALLSTATIC = @INSTALLSTATIC@
#
# Program options...
#
# ARCHFLAGS Defines the default architecture build options, used
# when compiling separate 32/64-bit libraries.
# 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
# for extra debug info)
# OPTIM defines the common compiler optimization/debugging options.
# OPTIONS defines other compile-time options (currently only -dDEBUG for
# extra debug info)
#
ARCHFLAGS = @ARCHFLAGS@
ARFLAGS = @ARFLAGS@
BACKLIBS = @BACKLIBS@
CFLAGS = -I.. $(SSLFLAGS) @CPPFLAGS@ @CFLAGS@ \
CFLAGS = -I.. $(RC_CFLAGS) $(SSLFLAGS) @CPPFLAGS@ @CFLAGS@ \
@LARGEFILE@ @PTHREAD_FLAGS@ $(OPTIONS)
COMMONLIBS = @LIBS@
CUPSDLIBS = @CUPSDLIBS@
CXXFLAGS = -I.. $(SSLFLAGS) @CPPFLAGS@ @CXXFLAGS@ \
CXXFLAGS = -I.. $(RC_CFLAGS) $(SSLFLAGS) @CPPFLAGS@ @CXXFLAGS@ \
@LARGEFILE@ @PTHREAD_FLAGS@ $(OPTIONS)
CXXLIBS = @CXXLIBS@
DSOFLAGS = @DSOFLAGS@
DSOLIBS = @DSOLIBS@ $(COMMONLIBS)
IMGLIBS = @IMGLIBS@ -lm
IMGFILTERS = @IMGFILTERS@
LDFLAGS = -L../cups -L../filter $(RC_CFLAGS) $(ARCHFLAGS) \
@LDFLAGS@ @PIEFLAGS@ $(OPTIM)
LDFLAGS = -L../cups -L../filter $(RC_CFLAGS) @LDFLAGS@ $(OPTIM)
LINKCUPS = @LINKCUPS@ $(SSLLIBS)
LINKCUPSIMAGE = @LINKCUPSIMAGE@
LIBS = $(LINKCUPS) $(COMMONLIBS)
OPTIM = @OPTIM@
OPTIONS =
PAMLIBS = @PAMLIBS@
PAP = @PAP@
PDFTOPS = @PDFTOPS@
PHPDIR = @PHPDIR@
SSLFLAGS = @SSLFLAGS@
SSLLIBS = @SSLLIBS@
LAUNCHDLIBS = @LAUNCHDLIBS@
#
# 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...
#
@@ -213,7 +175,6 @@ SBINDIR = $(BUILDROOT)@sbindir@
SERVERBIN = $(BUILDROOT)@CUPS_SERVERBIN@
SERVERROOT = $(BUILDROOT)@CUPS_SERVERROOT@
STATEDIR = $(BUILDROOT)@CUPS_STATEDIR@
XINETD = @XINETD@
MAN1EXT = @MAN1EXT@
MAN5EXT = @MAN5EXT@
@@ -233,23 +194,15 @@ DBUSDIR = @DBUSDIR@
#
.SILENT:
.SUFFIXES: .1 .1.gz .1m .1m.gz .5 .5.gz .7 .7.gz .8 .8.gz .a .c .cxx .h .man .o .32.o .64.o .gz
.SUFFIXES: .1 .1.gz .1m .1m.gz .5 .5.gz .7 .7.gz .8 .8.gz .a .c .cxx .h .man .o .gz
.c.o:
echo Compiling $<...
$(CC) $(ARCHFLAGS) $(OPTIM) $(CFLAGS) -c $<
.c.32.o:
echo Compiling 32-bit $<...
$(CC) $(ARCH32FLAGS) $(OPTIM) $(CFLAGS) -c -o $@ $<
.c.64.o:
echo Compiling 64-bit $<...
$(CC) $(ARCH64FLAGS) $(OPTIM) $(CFLAGS) -c -o $@ $<
$(CC) $(OPTIM) $(CFLAGS) -c $<
.cxx.o:
echo Compiling $<...
$(CXX) $(ARCHFLAGS) $(OPTIM) $(CXXFLAGS) -c $<
$(CXX) $(OPTIM) $(CXXFLAGS) -c $<
.man.1 .man.1m .man.5 .man.7 .man.8:
echo Linking $<...
+8 -54
Ver Arquivo
@@ -29,7 +29,7 @@ include Makedefs
#
DIRS = cups backend berkeley cgi-bin filter locale man monitor \
notifier $(PDFTOPS) scheduler systemv test \
notifier pdftops scheduler systemv test \
$(PHPDIR) \
conf data doc fonts ppd templates
@@ -57,25 +57,6 @@ clean:
done
#
# Remove all non-distribution files...
#
distclean: clean
$(RM) Makedefs config.h config.log config.status
$(RM) cups-config conf/cupsd.conf conf/pam.std
$(RM) doc/help/standard.html doc/index.html
$(RM) init/cups.sh init/cups-lpd
$(RM) man/cups-deviced.man man/cups-driverd.man
$(RM) man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man
$(RM) man/cupsd.conf.man man/lpoptions.man
$(RM) packaging/cups templates/edit-config.tmpl templates/header.tmpl
-$(RM) doc/*/index.html
-$(RM) templates/*/edit-config.tmpl
-$(RM) templates/*/header.tmpl
-$(RM) -r autom4te*.cache
#
# Make dependencies
#
@@ -99,8 +80,8 @@ install: installhdrs
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...; \
echo Installing startup script...
if test "x$(INITDIR)" != "x"; then \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/init.d; \
$(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/init.d/cups; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc0.d; \
@@ -112,45 +93,24 @@ install: installhdrs
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc5.d; \
$(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \
fi
if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
if test "x$(INITDIR)" = "x" -a "x$(INITDDIR)" != "x"; then \
$(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \
if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
echo Installing StartupItems files...; \
$(INSTALL_SCRIPT) init/PrintingServices $(BUILDROOT)$(INITDDIR)/PrintingServices; \
$(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
$(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
echo Installing LaunchDaemons configuration file...; \
$(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
else \
echo Installing RC script...; \
$(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
fi \
fi
if test "x$(DBUSDIR)" != x; then \
if test "x$(DBUSDIR)" != "x"; then \
echo Installing cups.conf in $(DBUSDIR)...;\
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(DBUSDIR); \
$(INSTALL_DATA) packaging/cups-dbus.conf $(BUILDROOT)$(DBUSDIR)/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 -d /usr/share/applications; then \
echo Installing desktop icons...; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/applications; \
$(INSTALL_DATA) desktop/cups.desktop $(BUILDROOT)/usr/share/applications; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps; \
$(INSTALL_DATA) desktop/cups-16.png $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps/cups.png; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps; \
$(INSTALL_DATA) desktop/cups-32.png $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps/cups.png; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps; \
$(INSTALL_DATA) desktop/cups-64.png $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps/cups.png; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps; \
$(INSTALL_DATA) desktop/cups-128.png $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps/cups.png; \
fi
#
@@ -178,7 +138,7 @@ uninstall:
$(RM) $(BINDIR)/cups-config
-$(RMDIR) $(BINDIR)
echo Uninstalling startup script...
if test "x$(INITDIR)" != x; then \
if test "x$(INITDIR)" != "x"; then \
$(RM) $(BUILDROOT)$(INITDIR)/init.d/cups; \
$(RMDIR) $(BUILDROOT)$(INITDIR)/init.d; \
$(RM) $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \
@@ -190,7 +150,7 @@ uninstall:
$(RM) $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \
$(RMDIR) $(BUILDROOT)$(INITDIR)/rc5.d; \
fi
if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
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; \
@@ -203,17 +163,11 @@ uninstall:
fi \
$(RMDIR) $(BUILDROOT)$(INITDDIR); \
fi
if test "x$(DBUSDIR)" != x; then \
if test "x$(DBUSDIR)" != "x"; then \
echo Uninstalling cups.conf in $(DBUSDIR)...;\
$(RM) $(BUILDROOT)$(DBUSDIR)/cups.conf; \
$(RMDIR) $(BUILDROOT)$(DBUSDIR); \
fi
$(RM) $(BUILDROOT)/etc/xinetd.d/cups-lpd
$(RM) $(BUILDROOT)/usr/share/applications/cups.desktop
$(RM) $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps/cups.png
$(RM) $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps/cups.png
$(RM) $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps/cups.png
$(RM) $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps/cups.png
#
+3 -5
Ver Arquivo
@@ -1,4 +1,4 @@
README - CUPS v1.2.0 - 2006-05-08
README - CUPS v1.2b1 - 2006-03-03
---------------------------------
Looking for compile instructions? Read the file "INSTALL.txt"
@@ -26,8 +26,8 @@ INTRODUCTION
of GPL Ghostscript for CUPS called ESP Ghostscript is
available separately to support printing of PostScript files
within the CUPS driver framework. Sample drivers for Dymo,
EPSON, HP, OKIDATA, and Zebra printers are included that use
these filters.
EPSON, HP, and OKIDATA printers are included that use these
filters.
Drivers for thousands of printers are provided with our ESP
Print Pro software, available at:
@@ -108,11 +108,9 @@ SETTING UP PRINTER QUEUES FROM THE COMMAND-LINE
EPSON 9-pin Series epson9.ppd
EPSON 24-pin Series epson24.ppd
HP DeskJet Series deskjet.ppd
HP New DeskJet Series deskjet2.ppd
HP LaserJet Series laserjet.ppd
OKIDATA 9-Pin Series okidata9.ppd
OKIDATA 24-Pin Series okidat24.ppd
Zebra CPCL Label Printer zebracpl.ppd
Zebra EPL1 Label Printer zebraep1.ppd
Zebra EPL2 Label Printer zebraep2.ppd
Zebra ZPL Label Printer zebra.ppd
-5
Ver Arquivo
@@ -19,11 +19,6 @@ scsi.o: ../cups/language.h ../cups/string.h ../config.h
serial.o: ../cups/backend.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
serial.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
serial.o: ../cups/language.h ../cups/string.h ../config.h
snmp.o: ../cups/backend.h ../cups/http-private.h ../config.h ../cups/http.h
snmp.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/cups.h
snmp.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
snmp.o: ../cups/string.h ../cups/array.h ../cups/file.h ieee1284.c
snmp.o: ../cups/debug.h
socket.o: ../cups/backend.h ../cups/http-private.h ../config.h ../cups/http.h
socket.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/cups.h
socket.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+3 -21
Ver Arquivo
@@ -27,10 +27,10 @@
include ../Makedefs
RBACKENDS = ipp lpd
UBACKENDS = $(PAP) parallel scsi serial snmp socket usb
UBACKENDS = parallel scsi serial socket usb
TARGETS = betest test1284 $(RBACKENDS) $(UBACKENDS)
OBJS = betest.o ipp.o lpd.o pap.o parallel.o scsi.o \
serial.o snmp.o socket.o test1284.o usb.o
OBJS = betest.o ipp.o lpd.o parallel.o scsi.o \
serial.o socket.o test1284.o usb.o
#
@@ -136,15 +136,6 @@ lpd: lpd.o ../cups/$(LIBCUPS)
$(CC) $(LDFLAGS) -o lpd lpd.o $(LIBS)
#
# pap
#
pap: pap.o ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o pap pap.o $(BACKLIBS) $(LIBS) -framework AppleTalk
#
# parallel
#
@@ -174,15 +165,6 @@ serial: serial.o ../cups/$(LIBCUPS)
$(CC) $(LDFLAGS) -o serial serial.o $(BACKLIBS) $(LIBS)
#
# snmp
#
snmp: snmp.o ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o snmp snmp.o $(LIBS)
#
# socket
#
+111 -248
Ver Arquivo
@@ -25,9 +25,8 @@
*
* Contents:
*
* get_device_id() - Get the IEEE-1284 device ID string and corresponding
* URI.
* get_make_model() - Get the make and model string from the device ID.
* get_device_id() - Get the IEEE-1284 device ID string and corresponding
* URI.
*/
/*
@@ -35,14 +34,21 @@
*/
#include <cups/debug.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)
#endif /* __linux */
/*
* Prototypes...
*/
static int get_make_model(const char *device_id, char *make_model,
int make_model_size);
#ifdef __sun
# ifdef __sparc
# include <sys/ecppio.h>
# else
# include <sys/ioccom.h>
# include <sys/ecppsys.h>
# endif /* __sparc */
#endif /* __sun */
/*
@@ -50,24 +56,6 @@ static int get_make_model(const char *device_id, char *make_model,
* corresponding URI.
*/
#ifndef SNMP_BACKEND
# 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)
# endif /* __linux */
# ifdef __sun
# ifdef __sparc
# include <sys/ecppio.h>
# else
# include <sys/ioccom.h>
# include <sys/ecppsys.h>
# endif /* __sparc */
# endif /* __sun */
int /* O - 0 on success, -1 on failure */
get_device_id(
int fd, /* I - File descriptor */
@@ -82,9 +70,9 @@ get_device_id(
char *attr, /* 1284 attribute */
*delim, /* 1284 delimiter */
*uriptr, /* Pointer into URI */
manufacturer[256], /* Manufacturer string */
*mfg, /* Manufacturer string */
*mdl, /* Model string */
serial_number[1024]; /* Serial number string */
int manulen; /* Length of manufacturer string */
#ifdef __linux
int length; /* Length of device ID info */
#endif /* __linux */
@@ -92,7 +80,6 @@ get_device_id(
struct ecpp_device_id did; /* Device ID buffer */
#endif /* __sun && ECPPIOC_GETDEVID */
DEBUG_printf(("get_device_id(fd=%d, device_id=%p, device_id_size=%d, "
"make_model=%p, make_model_size=%d, scheme=\"%s\", "
"uri=%p, uri_size=%d)\n", fd, device_id, device_id_size,
@@ -187,157 +174,6 @@ get_device_id(
if (!*device_id)
return (-1);
/*
* Get the make and model...
*/
get_make_model(device_id, make_model, make_model_size);
/*
* Then generate a device URI...
*/
if (scheme && uri && uri_size > 32)
{
/*
* Look for the serial number field...
*/
if ((attr = strstr(device_id, "SERN:")) != NULL)
attr += 5;
else if ((attr = strstr(device_id, "SERIALNUMBER:")) != NULL)
attr += 13;
else if ((attr = strstr(device_id, ";SN:")) != NULL)
attr += 4;
if (attr)
{
strlcpy(serial_number, attr, sizeof(serial_number));
if ((delim = strchr(serial_number, ';')) != NULL)
*delim = '\0';
}
else
serial_number[0] = '\0';
/*
* Generate the device URI from the manufacturer, make_model, and
* serial number strings.
*/
snprintf(uri, uri_size, "%s://", scheme);
if ((attr = strstr(device_id, "MANUFACTURER:")) != NULL)
attr += 13;
else if ((attr = strstr(device_id, "Manufacturer:")) != NULL)
attr += 13;
else if ((attr = strstr(device_id, "MFG:")) != NULL)
attr += 4;
if (attr)
{
strlcpy(manufacturer, attr, sizeof(manufacturer));
if ((delim = strchr(manufacturer, ';')) != NULL)
*delim = '\0';
if (!strcasecmp(manufacturer, "Hewlett-Packard"))
strcpy(manufacturer, "HP");
}
else
{
strlcpy(manufacturer, make_model, sizeof(manufacturer));
if ((delim = strchr(manufacturer, ' ')) != NULL)
*delim = '\0';
}
manulen = strlen(manufacturer);
for (uriptr = uri + strlen(uri), delim = manufacturer;
*delim && uriptr < (uri + uri_size - 3);
delim ++)
if (*delim == ' ')
{
*uriptr++ = '%';
*uriptr++ = '2';
*uriptr++ = '0';
}
else
*uriptr++ = *delim;
*uriptr++ = '/';
if (!strncasecmp(make_model, manufacturer, manulen))
{
delim = make_model + manulen;
while (isspace(*delim & 255))
delim ++;
}
else
delim = make_model;
for (; *delim && uriptr < (uri + uri_size - 3); delim ++)
if (*delim == ' ')
{
*uriptr++ = '%';
*uriptr++ = '2';
*uriptr++ = '0';
}
else
*uriptr++ = *delim;
if (serial_number[0])
{
/*
* Add the serial number to the URI...
*/
strlcpy(uriptr, "?serial=", uri_size - (uriptr - uri));
strlcat(uriptr, serial_number, uri_size - (uriptr - uri));
}
else
*uriptr = '\0';
}
return (0);
}
#endif /* !SNMP_BACKEND */
/*
* 'get_make_model()' - Get the make and model string from the device ID.
*/
int /* O - 0 on success, -1 on failure */
get_make_model(
const char *device_id, /* O - 1284 device ID */
char *make_model, /* O - Make/model */
int make_model_size) /* I - Size of buffer */
{
char *attr, /* 1284 attribute */
*delim, /* 1284 delimiter */
*mfg, /* Manufacturer string */
*mdl; /* Model string */
DEBUG_printf(("get_make_model(device_id=\"%s\", "
"make_model=%p, make_model_size=%d)\n", device_id,
make_model, make_model_size));
/*
* Range check input...
*/
if (!device_id || !*device_id || !make_model || make_model_size < 32)
{
DEBUG_puts("get_make_model: Bad args!");
return (-1);
}
*make_model = '\0';
/*
* Look for the description field...
*/
@@ -388,62 +224,15 @@ get_make_model(
if ((mfg = strstr(device_id, "MANUFACTURER:")) != NULL)
mfg += 13;
else if ((mfg = strstr(device_id, "Manufacturer:")) != NULL)
mfg += 13;
else if ((mfg = strstr(device_id, "MFG:")) != NULL)
mfg += 4;
if ((mdl = strstr(device_id, "MODEL:")) != NULL)
mdl += 6;
else if ((mdl = strstr(device_id, "Model:")) != NULL)
mdl += 6;
else if ((mdl = strstr(device_id, "MDL:")) != NULL)
mdl += 4;
if (mdl)
{
/*
* Build a make-model string from the manufacturer and model attributes...
*/
if (mfg)
{
if (!strncasecmp(mfg, "Hewlett-Packard", 15))
strlcpy(make_model, "HP", make_model_size);
else
strlcpy(make_model, mfg, make_model_size);
if ((delim = strchr(make_model, ';')) != NULL)
*delim = '\0';
if (!strncasecmp(make_model, mdl, strlen(make_model)))
{
/*
* Just copy model string, since it has the manufacturer...
*/
strlcpy(make_model, mdl, make_model_size);
}
else
{
/*
* Concatenate the make and model...
*/
strlcat(make_model, " ", make_model_size);
strlcat(make_model, mdl, make_model_size);
}
}
else
{
/*
* Just copy model string, since it has the manufacturer...
*/
strlcpy(make_model, mdl, make_model_size);
}
}
else if (attr)
if (attr)
{
/*
* Use description...
@@ -468,6 +257,38 @@ get_make_model(
strlcpy(make_model, attr, make_model_size);
}
}
else if (mfg && mdl)
{
/*
* Build a make-model string from the manufacturer and model attributes...
*/
if (!strncasecmp(mfg, "Hewlett-Packard", 15))
strlcpy(make_model, "HP", make_model_size);
else
strlcpy(make_model, mfg, make_model_size);
if ((delim = strchr(make_model, ';')) != NULL)
*delim = '\0';
if (!strncasecmp(make_model, mdl, strlen(make_model)))
{
/*
* Just copy model string, since it has the manufacturer...
*/
strlcpy(make_model, mdl, make_model_size);
}
else
{
/*
* Concatenate the make and model...
*/
strlcat(make_model, " ", make_model_size);
strlcat(make_model, mdl, make_model_size);
}
}
else
{
/*
@@ -477,31 +298,73 @@ get_make_model(
strlcpy(make_model, "Unknown", make_model_size);
}
/*
* Strip trailing data...
*/
if ((delim = strchr(make_model, ';')) != NULL)
*delim = '\0';
/*
* Strip trailing whitespace...
*/
if (scheme && uri && uri_size > 32)
{
/*
* Look for the serial number field...
*/
for (delim = make_model + strlen(make_model) - 1; delim >= make_model; delim --)
if (isspace(*delim & 255))
*delim = '\0';
if ((attr = strstr(device_id, "SERN:")) != NULL)
attr += 5;
else if ((attr = strstr(device_id, "SERIALNUMBER:")) != NULL)
attr += 13;
else if ((attr = strstr(device_id, ";SN:")) != NULL)
attr += 4;
if (attr)
{
strlcpy(serial_number, attr, sizeof(serial_number));
if ((delim = strchr(serial_number, ';')) != NULL)
*delim = '\0';
}
else
break;
serial_number[0] = '\0';
/*
* Return...
*/
/*
* Generate the device URI from the make_model and serial number strings.
*/
if (make_model[0])
return (0);
else
return (-1);
snprintf(uri, uri_size, "%s://", scheme);
for (uriptr = uri + strlen(uri), delim = make_model;
*delim && uriptr < (uri + uri_size - 1);
delim ++)
if (*delim == ' ')
{
delim ++;
*uriptr++ = '/';
break;
}
else
*uriptr++ = *delim;
for (; *delim && uriptr < (uri + uri_size - 3); delim ++)
if (*delim == ' ')
{
*uriptr++ = '%';
*uriptr++ = '2';
*uriptr++ = '0';
}
else
*uriptr++ = *delim;
*uriptr = '\0';
if (serial_number[0])
{
/*
* Add the serial number to the URI...
*/
strlcat(uri, "?serial=", uri_size);
strlcat(uri, serial_number, uri_size);
}
}
return (0);
}
+3 -4
Ver Arquivo
@@ -276,7 +276,7 @@ main(int argc, /* I - Number of command-line args */
*ptr++ = *optptr++;
*ptr = '\0';
if (*optptr == '+' || *optptr == '&')
if (*optptr == '+')
optptr ++;
}
else
@@ -1215,7 +1215,7 @@ compress_files(int num_files, /* I - Number of files */
*out; /* Output file */
struct stat outinfo; /* Output file information */
char filename[1024], /* Temporary filename */
buffer[32768]; /* Copy buffer */
buffer[65536]; /* Copy buffer */
fprintf(stderr, "DEBUG: Compressing %d job files...\n", num_files);
@@ -1263,8 +1263,7 @@ compress_files(int num_files, /* I - Number of files */
fprintf(stderr,
"DEBUG: File %d compressed to %.1f%% of original size, "
CUPS_LLFMT " bytes...\n",
i + 1, 100.0 * outinfo.st_size / total,
CUPS_LLCAST outinfo.st_size);
i + 1, 100.0 * outinfo.st_size / total, outinfo.st_size);
}
}
#endif /* HAVE_LIBZ */
+1 -1
Ver Arquivo
@@ -590,7 +590,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
#endif /* __APPLE__ */
size_t nbytes; /* Number of bytes written */
off_t tbytes; /* Total bytes written */
char buffer[32768]; /* Output buffer */
char buffer[65536]; /* Output buffer */
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
struct sigaction action; /* Actions for POSIX signals */
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
-1568
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+2
Ver Arquivo
@@ -466,6 +466,8 @@ list_devices(void)
strcpy(basedevice, "/dev/parallel/");
else if (!access("/dev/printers/", 0))
strcpy(basedevice, "/dev/printers/");
else if (!access("/dev/par0", 0))
strcpy(basedevice, "/dev/par");
else
strcpy(basedevice, "/dev/lp");
+13 -48
Ver Arquivo
@@ -87,11 +87,6 @@
# include <IOKit/IOBSD.h>
#endif /* __APPLE__ */
#if defined(__linux) && defined(TIOCGSERIAL)
# include <linux/serial.h>
# include <linux/ioctl.h>
#endif /* __linux && TIOCGSERIAL */
/*
* Local functions...
@@ -310,7 +305,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
*ptr++ = *options++;
*ptr = '\0';
if (*options == '+' || *options == '&')
if (*options == '+')
options ++;
}
else
@@ -668,48 +663,21 @@ list_devices(void)
{
#if defined(__hpux) || defined(__sgi) || defined(__sun) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
static char *funky_hex = "0123456789abcdefghijklmnopqrstuvwxyz";
/* Funky hex numbering used for some *
* devices */
/* Funky hex numbering used for some devices */
#endif /* __hpux || __sgi || __sun || __FreeBSD__ || __OpenBSD__ */
#ifdef __linux
int i, j; /* Looping vars */
int fd; /* File descriptor */
char device[255]; /* Device filename */
# ifdef TIOCGSERIAL
struct serial_struct serinfo; /* serial port info */
# endif /* TIOCGSERIAL */
#if defined(__linux) || defined(linux) || defined(__linux__)
int i, j; /* Looping vars */
int fd; /* File descriptor */
char device[255]; /* Device filename */
for (i = 0; i < 100; i ++)
{
sprintf(device, "/dev/ttyS%d", i);
if ((fd = open(device, O_WRONLY | O_NOCTTY | O_NDELAY)) >= 0)
{
# ifdef TIOCGSERIAL
/*
* See if this port exists...
*/
serinfo.reserved_char[0] = 0;
if (!ioctl(fd, TIOCGSERIAL, &serinfo))
{
if (serinfo.type == PORT_UNKNOWN)
{
/*
* Nope...
*/
close(fd);
continue;
}
}
# endif /* TIOCGSERIAL */
close(fd);
# if defined(_ARCH_PPC) || defined(powerpc) || defined(__powerpc)
printf("serial serial:%s?baud=230400 \"Unknown\" \"Serial Port #%d\"\n",
device, i + 1);
@@ -856,13 +824,13 @@ list_devices(void)
{
sprintf(device, "/dev/cua/%c", 'a' + i);
if (access(device, 0) == 0)
# ifdef B115200
#ifdef B115200
printf("serial serial:%s?baud=115200 \"Unknown\" \"Serial Port #%d\"\n",
device, i + 1);
# else
#else
printf("serial serial:%s?baud=38400 \"Unknown\" \"Serial Port #%d\"\n",
device, i + 1);
# endif /* B115200 */
#endif /* B115200 */
}
/*
@@ -1095,6 +1063,7 @@ list_devices(void)
CFMutableDictionaryRef classesToMatch;
io_object_t serialService;
printf("serial serial \"Unknown\" \"Serial Printer (serial)\"\n");
kernResult = IOMasterPort(MACH_PORT_NULL, &masterPort);
if (KERN_SUCCESS != kernResult)
@@ -1148,8 +1117,8 @@ list_devices(void)
CFRelease(bsdPathAsCFString);
if (result)
printf("serial serial:%s?baud=115200 \"Unknown\" \"%s\"\n",
bsdPath, serialName);
printf("serial serial:%s?baud=115200 \"Unknown\" \"%s\"\n", bsdPath,
serialName);
}
}
}
@@ -1157,11 +1126,7 @@ list_devices(void)
IOObjectRelease(serialService);
}
/*
* Release the iterator.
*/
IOObjectRelease(serialPortIterator);
IOObjectRelease(serialPortIterator); /* Release the iterator. */
}
}
#endif
-2216
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
-172
Ver Arquivo
@@ -1,172 +0,0 @@
snmp.txt - 2006-04-19
---------------------
This file lists the "interesting" bits from the command:
snmpwalk -v 1 -c public HOST .1
for many network print servers and internal cards. It is mainly here
for SNMP documentation and development purposes.
AXIS 5600
SNMPv2-MIB::sysDescr.0 = STRING: HP ETHERNET MULTI-ENVIRONMENT,ROM J.sp.00,JETDIRECT EX,JD28,EEPROM 6.16.5
SNMPv2-MIB::sysName.0 = STRING:
HOST-RESOURCES-MIB::hrDeviceType.1 = OID: HOST-RESOURCES-TYPES::hrDevicePrinter
HOST-RESOURCES-MIB::hrDeviceType.2 = OID: HOST-RESOURCES-TYPES::hrDevicePrinter
HOST-RESOURCES-MIB::hrDeviceType.3 = OID: HOST-RESOURCES-TYPES::hrDevicePrinter
HOST-RESOURCES-MIB::hrDeviceDescr.1 = STRING: Hewlett-Packard hp LaserJet 3380
HOST-RESOURCES-MIB::hrDeviceDescr.2 = STRING: Axis AXIS 5600
HOST-RESOURCES-MIB::hrDeviceDescr.3 = STRING: Axis AXIS 5600
HOST-RESOURCES-MIB::hrDeviceID.1 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrDeviceID.2 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrDeviceID.3 = OID: SNMPv2-SMI::zeroDotZero
SNMPv2-SMI::enterprises.11.2.4.3.10.8.0 = STRING: "AXIS433AE8"
SNMPv2-SMI::enterprises.368.2.3.2.601.0 = INTEGER: 9100
SNMPv2-SMI::enterprises.368.2.3.2.602.0 = INTEGER: 9101
SNMPv2-SMI::enterprises.368.2.3.2.603.0 = INTEGER: 9102
SNMPv2-SMI::enterprises.368.2.3.10.901.0 = STRING: "AXIS433AE8"
AXIS OfficeBasic
SNMPv2-MIB::sysDescr.0 = STRING: AXIS OfficeBasic Parallel Network Print Server V6.43 Sep 4 2003
HOST-RESOURCES-MIB::hrDeviceType.1 = OID: HOST-RESOURCES-TYPES::hrDevicePrinter
HOST-RESOURCES-MIB::hrDeviceDescr.1 = STRING: EPSON Stylus Photo 870
HOST-RESOURCES-MIB::hrDeviceID.1 = OID: SNMPv2-SMI::zeroDotZero
DLink DP-301P+
SNMPv2-MIB::sysDescr.0 = STRING: D-Link DP-301P+ Print Server
Genicom ML280
SNMPv2-MIB::sysDescr.0 = STRING: GENICOM microLaser 280
SNMPv2-MIB::sysName.0 = STRING: PRQ_004F75
HOST-RESOURCES-MIB::hrDeviceType.1 = OID: HOST-RESOURCES-TYPES::hrDevicePrinter
HOST-RESOURCES-MIB::hrDeviceDescr.1 = STRING: MANUFACTURER:GENICOM;MODEL:microLaser 280;
HOST-RESOURCES-MIB::hrDeviceID.1 = OID: SNMPv2-SMI::enterprises.3369.1.1.2.4
EPSON Type-B Network Card
SNMPv2-MIB::sysDescr.0 = STRING: EPSON Type-B 10Base-T/100Base-TX Print Server
SNMPv2-MIB::sysName.0 = STRING: StylusPro7600-BB87A8
HOST-RESOURCES-MIB::hrDeviceType.1 = OID: HOST-RESOURCES-TYPES::hrDevicePrinter
HOST-RESOURCES-MIB::hrDeviceDescr.1 = STRING: EPSON Stylus Pro 7600
HOST-RESOURCES-MIB::hrDeviceID.1 = OID: SNMPv2-SMI::enterprises.1248.1.2.1.22.69.109.117.108.97.116.101.83.116.121.108.117.115.32.80.114.111.32.55.54.48.48
SNMPv2-SMI::enterprises.11.2.3.9.1.1.7.0 = STRING: "MFG:EPSON;CMD:ESCPL2,BDC;MDL:Stylus Pro 7600;CLS:PRINTER;DES:EPSON Stylus Pro 7600;"
SNMPv2-SMI::enterprises.1248.1.2.2.1.1.1.1.1 = STRING: "MFG:EPSON;CMD:ESCPL2,BDC;MDL:Stylus Pro 7600;CLS:PRINTER;DES:EPSON Stylus Pro 7600;"
EPSON Wireless 802.11b Print Server
SNMPv2-MIB::sysDescr.0 = STRING: EPSON Wireless LAN Print Interface compatible with an HP JETDIRECT EX
SNMPv2-MIB::sysName.0 = STRING: EAI_0F550B
HOST-RESOURCES-MIB::hrDeviceType.1 = OID: HOST-RESOURCES-TYPES::hrDevicePrinter
HOST-RESOURCES-MIB::hrDeviceDescr.1 = STRING:
HOST-RESOURCES-MIB::hrDeviceID.1 = OID: SNMPv2-SMI::zeroDotZero
HP JetDirect EX3plus
SNMPv2-MIB::sysDescr.0 = STRING: HP ETHERNET MULTI-ENVIRONMENT,ROM D.04.03,JETDIRECT EX,JD26,EEPROM D.05.22
SNMPv2-MIB::sysName.0 = STRING: NPID1EC0F
HP LJ4000
SNMPv2-MIB::sysDescr.0 = STRING: HP ETHERNET MULTI-ENVIRONMENT,ROM G.05.34,JETDIRECT,JD30,EEPROM G.08.32
SNMPv2-MIB::sysName.0 = STRING:
HOST-RESOURCES-MIB::hrDeviceType.1 = OID: HOST-RESOURCES-TYPES::hrDevicePrinter
HOST-RESOURCES-MIB::hrDeviceDescr.1 = STRING: HP LaserJet 4000 Series
HOST-RESOURCES-MIB::hrDeviceID.1 = OID: SNMPv2-SMI::enterprises.11.2.3.9.1.2.5
HP CLJ4550
SNMPv2-MIB::sysDescr.0 = STRING: HP ETHERNET MULTI-ENVIRONMENT,ROM L.20.07,JETDIRECT,JD84,EEPROM L.21.22,CIDATE 07/06/2001
SNMPv2-MIB::sysName.0 = STRING: NPI02FDE7
HOST-RESOURCES-MIB::hrDeviceDescr.1 = STRING: HP Color LaserJet 4550
HOST-RESOURCES-MIB::hrDeviceDescr.2 = STRING: Hewlett-Packard Dynamic RAM Disk
HOST-RESOURCES-MIB::hrDeviceID.1 = OID: SNMPv2-SMI::enterprises.11.2.3.9.1.2.14
Lexmark C522
SNMPv2-MIB::sysDescr.0 = STRING: Lexmark C522 version NS.NP.N212 kernel 2.6.6 All-N-1
SNMPv2-MIB::sysName.0 = STRING: ET0004000D0CCA
HOST-RESOURCES-MIB::hrDeviceType.1 = OID: HOST-RESOURCES-TYPES::hrDevicePrinter
HOST-RESOURCES-MIB::hrDeviceType.2 = OID: HOST-RESOURCES-TYPES::hrDeviceNonVolatileMemory
HOST-RESOURCES-MIB::hrDeviceType.3 = OID: HOST-RESOURCES-TYPES::hrDeviceProcessor
HOST-RESOURCES-MIB::hrDeviceType.4 = OID: HOST-RESOURCES-TYPES::hrDeviceSerialPort
HOST-RESOURCES-MIB::hrDeviceType.5 = OID: HOST-RESOURCES-TYPES::hrDeviceNetwork
HOST-RESOURCES-MIB::hrDeviceDescr.1 = STRING: Lexmark C522 9421TTV LS.FA.P129
HOST-RESOURCES-MIB::hrDeviceDescr.2 = STRING: Nonvolatile RAM
HOST-RESOURCES-MIB::hrDeviceDescr.3 = STRING: IBM 750 Rev CXr
HOST-RESOURCES-MIB::hrDeviceDescr.4 = STRING: USB Interface
HOST-RESOURCES-MIB::hrDeviceDescr.5 = STRING: Network Interface
HOST-RESOURCES-MIB::hrDeviceID.1 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrDeviceID.2 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrDeviceID.3 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrDeviceID.4 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrDeviceID.5 = OID: SNMPv2-SMI::enterprises.641.1
SNMPv2-SMI::enterprises.641.2.1.2.1.2.1 = STRING: "Lexmark C522"
SNMPv2-SMI::enterprises.641.2.1.2.1.3.1 = STRING: "MANUFACTURER:Lexmark International;COMMAND SET:;MODEL:Lexmark C522"
Linksys EPSX3
SNMPv2-MIB::sysDescr.0 = STRING: ETHERNET MULTI-ENVIRONMENT.ROM, JETDIRECT EX, EEPROM 6016
NetGear PS113
SNMPv2-MIB::sysDescr.0 = STRING: A SNMP proxy agent.
Okidata C7200
SNMPv2-MIB::sysDescr.0 = STRING: OkiLAN 6200e
SNMPv2-MIB::sysName.0 = STRING: OKI7009715
HOST-RESOURCES-MIB::hrDeviceType.1 = OID: HOST-RESOURCES-TYPES::hrDevicePrinter
HOST-RESOURCES-MIB::hrDeviceType.2 = OID: HOST-RESOURCES-TYPES::hrDeviceNonVolat
ileMemory
HOST-RESOURCES-MIB::hrDeviceDescr.1 = STRING: C7200
HOST-RESOURCES-MIB::hrDeviceDescr.2 = STRING: FLASH0
HOST-RESOURCES-MIB::hrDeviceID.1 = OID: SNMPv2-SMI::enterprises.2001.1.1.1.1
HOST-RESOURCES-MIB::hrDeviceID.2 = OID: SNMPv2-SMI::zeroDotZero
SNMPv2-SMI::mib-2.43.14.1.1.3.1.1 = STRING: "IEEE 1284"
SNMPv2-SMI::mib-2.43.14.1.1.3.1.2 = STRING: "EtherTalk Phase 2"
SNMPv2-SMI::mib-2.43.14.1.1.3.1.3 = STRING: "LPD"
SNMPv2-SMI::mib-2.43.14.1.1.3.1.4 = STRING: "Netware Rprinter"
SNMPv2-SMI::mib-2.43.14.1.1.3.1.5 = STRING: "Netware Bindery or NDS Pserver"
SNMPv2-SMI::mib-2.43.14.1.1.3.1.6 = STRING: "Raw TCP Port 9100"
SNMPv2-SMI::mib-2.43.14.1.1.3.1.7 = STRING: "FTP"
SNMPv2-SMI::mib-2.43.14.1.1.3.1.8 = STRING: "DLC/LLC"
SNMPv2-SMI::enterprises.2001.1.1.1.1.1.3530.0 = STRING: "C7200"
Xerox N2025
SNMPv2-MIB::sysDescr.0 = STRING: Xerox DocuPrint N2025 Network Laser Printer - 2.12-02
SNMPv2-MIB::sysName.0 = STRING:
HOST-RESOURCES-MIB::hrDeviceType.1 = OID: HOST-RESOURCES-TYPES::hrDevicePrinter
HOST-RESOURCES-MIB::hrDeviceType.2 = OID: HOST-RESOURCES-TYPES::hrDeviceParallelPort
HOST-RESOURCES-MIB::hrDeviceType.3 = OID: HOST-RESOURCES-TYPES::hrDeviceNetwork
HOST-RESOURCES-MIB::hrDeviceType.6 = OID: HOST-RESOURCES-TYPES::hrDeviceProcessor
HOST-RESOURCES-MIB::hrDeviceType.7 = OID: HOST-RESOURCES-TYPES::hrDeviceOther
HOST-RESOURCES-MIB::hrDeviceType.9 = OID: HOST-RESOURCES-TYPES::hrDeviceVolatileMemory
HOST-RESOURCES-MIB::hrDeviceType.10 = OID: HOST-RESOURCES-TYPES::hrDeviceNonVolatileMemory
HOST-RESOURCES-MIB::hrDeviceDescr.1 = STRING: Xerox DocuPrint N2025 Network Laser Printer - 2.12-02
HOST-RESOURCES-MIB::hrDeviceDescr.2 = STRING: IEEE 1284 port
HOST-RESOURCES-MIB::hrDeviceDescr.3 = STRING: Ethernet port
HOST-RESOURCES-MIB::hrDeviceDescr.6 = STRING: Motorola Power PC
HOST-RESOURCES-MIB::hrDeviceDescr.7 = STRING: USB Port
HOST-RESOURCES-MIB::hrDeviceDescr.9 = STRING: RAM Memory
HOST-RESOURCES-MIB::hrDeviceDescr.10 = STRING: ROM Memory
HOST-RESOURCES-MIB::hrDeviceID.1 = OID: SNMPv2-SMI::enterprises.253.8.62.1.3.2.17.1
+1855 -1301
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+4 -17
Ver Arquivo
@@ -56,11 +56,8 @@ print_device(const char *uri, /* I - Device URI */
const char *resource, /* I - Resource/modelname */
const char *options, /* I - Device options/serial number */
int fp, /* I - File descriptor to print */
int copies, /* I - Copies to print */
int argc, /* I - Number of command-line arguments (6 or 7) */
char *argv[]) /* I - Command-line arguments */
int copies) /* I - Copies to print */
{
int usebc; /* Use backchannel path? */
int fd; /* USB device */
int rbytes; /* Number of bytes read */
int wbytes; /* Number of bytes written */
@@ -80,16 +77,6 @@ print_device(const char *uri, /* I - Device URI */
unsigned int status; /* Port status (off-line, out-of-paper, etc.) */
#endif /* __linux */
(void)argc;
(void)argv;
/*
* Disable backchannel data when printing to Canon USB printers - apparently
* Canon printers will return the IEEE-1284 device ID over and over and over
* when they get a read request...
*/
usebc = strcasecmp(hostname, "Canon") != 0;
/*
* Open the USB port device...
@@ -247,9 +234,7 @@ print_device(const char *uri, /* I - Device URI */
do
{
FD_ZERO(&input);
if (usebc)
FD_SET(fd, &input);
FD_SET(fd, &input);
FD_ZERO(&output);
FD_SET(fd, &output);
}
@@ -389,6 +374,7 @@ list_devices(void)
device_id[1024], /* Device ID string */
device_uri[1024], /* Device URI string */
make_model[1024]; /* Make and model */
struct ecpp_device_id did; /* Device ID buffer */
/*
@@ -559,6 +545,7 @@ open_device(const char *uri) /* I - Device URI */
device_id[1024], /* Device ID string */
make_model[1024], /* Make and model */
device_uri[1024]; /* Device URI string */
struct ecpp_device_id did; /* Device ID buffer */
/*
+3 -7
Ver Arquivo
@@ -63,7 +63,7 @@
void list_devices(void);
int print_device(const char *uri, const char *hostname,
const char *resource, const char *options,
int fp, int copies, int argc, char *argv[]);
int fp, int copies);
/*
@@ -109,9 +109,7 @@ print_device(const char *uri, /* I - Device URI */
const char *resource, /* I - Resource/modelname */
const char *options, /* I - Device options/serial number */
int fp, /* I - File descriptor to print */
int copies, /* I - Copies to print */
int argc, /* I - Number of command-line arguments (6 or 7) */
char *argv[]) /* I - Command-line arguments */
int copies) /* I - Copies to print */
{
/*
* Can't print, so just reference the arguments to eliminate compiler
@@ -126,8 +124,6 @@ print_device(const char *uri, /* I - Device URI */
(void)options;
(void)fp;
(void)copies;
(void)argc;
(void)argv;
return (CUPS_BACKEND_FAILED);
}
@@ -255,7 +251,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Finally, send the print file...
*/
status = print_device(uri, hostname, resource, options, fp, copies, argc, argv);
status = print_device(uri, hostname, resource, options, fp, copies);
/*
* Close the input file and return...
+18 -44
Ver Arquivo
@@ -49,7 +49,6 @@
* Local functions...
*/
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 *);
@@ -77,23 +76,35 @@ main(int argc, /* I - Number of command-line arguments */
int num_dests; /* Number of destinations */
cups_dest_t *dests; /* Destinations */
cups_lang_t *language; /* Language */
#ifdef HAVE_SSL
http_encryption_t encryption; /* Encryption? */
#endif /* HAVE_SSL */
language = cupsLangDefault();
/*
* Connect to the scheduler...
*/
if ((http = httpConnectEncrypt(cupsServer(), ippPort(),
cupsEncryption())) == NULL)
{
_cupsLangPrintf(stderr, _("%s: Unable to contact server!\n"), argv[0]);
return (1);
}
/*
* Check for command-line options...
*/
http = NULL;
dest = NULL;
user = NULL;
id = 0;
interval = 0;
longstatus = 0;
all = 0;
language = cupsLangDefault();
num_dests = 0;
num_dests = cupsGetDests(&dests);
for (i = 1; i < argc; i ++)
if (argv[i][0] == '+')
@@ -104,10 +115,10 @@ main(int argc, /* I - Number of command-line arguments */
{
case 'E' : /* Encrypt */
#ifdef HAVE_SSL
cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
encryption = HTTP_ENCRYPT_REQUIRED;
if (http)
httpEncryption(http, HTTP_ENCRYPT_REQUIRED);
httpEncryption(http, encryption);
#else
_cupsLangPrintf(stderr,
_("%s: Sorry, no encryption support compiled in!\n"),
@@ -155,11 +166,6 @@ main(int argc, /* I - Number of command-line arguments */
if ((instance = strchr(dest, '/')) != NULL)
*instance++ = '\0';
http = connect_server(argv[0], http);
if (num_dests == 0)
num_dests = cupsGetDests2(http, &dests);
if (cupsGetDest(dest, instance, num_dests, dests) == NULL)
{
if (instance)
@@ -180,11 +186,8 @@ main(int argc, /* I - Number of command-line arguments */
break;
case 'h' : /* Connect to host */
if (http)
{
if (http != NULL)
httpClose(http);
http = NULL;
}
if (argv[i][2] != '\0')
cupsSetServer(argv[i] + 2);
@@ -222,13 +225,8 @@ main(int argc, /* I - Number of command-line arguments */
else
user = argv[i];
http = connect_server(argv[0], http);
if (dest == NULL && !all)
{
if (num_dests == 0)
num_dests = cupsGetDests2(http, &dests);
for (i = 0; i < num_dests; i ++)
if (dests[i].is_default)
dest = dests[i].name;
@@ -296,30 +294,6 @@ main(int argc, /* I - Number of command-line arguments */
}
/*
* 'connect_server()' - Connect to the server as necessary...
*/
static http_t * /* O - New HTTP connection */
connect_server(const char *command, /* I - Command name */
http_t *http) /* I - Current HTTP connection */
{
if (!http)
{
http = httpConnectEncrypt(cupsServer(), ippPort(),
cupsEncryption());
if (http == NULL)
{
_cupsLangPrintf(stderr, _("%s: Unable to connect to server\n"), command);
exit(1);
}
}
return (http);
}
/*
* 'show_jobs()' - Show jobs.
*/
+40 -74
Ver Arquivo
@@ -93,8 +93,7 @@ main(int argc, /* I - Number of command-line arguments */
if (!http)
{
perror("ERROR: Unable to connect to cupsd");
fprintf(stderr, "DEBUG: cupsServer()=\"%s\"\n",
cupsServer() ? cupsServer() : "(null)");
fprintf(stderr, "DEBUG: cupsServer()=\"%s\"\n", cupsServer());
fprintf(stderr, "DEBUG: ippPort()=%d\n", ippPort());
fprintf(stderr, "DEBUG: cupsEncryption()=%d\n", cupsEncryption());
exit(1);
@@ -133,20 +132,12 @@ main(int argc, /* I - Number of command-line arguments */
if (!strcmp(op, "redirect"))
{
const char *url; /* Redirection URL... */
char prefix[1024]; /* URL prefix */
if (getenv("HTTPS"))
snprintf(prefix, sizeof(prefix), "https://%s:%s",
getenv("SERVER_NAME"), getenv("SERVER_PORT"));
else
snprintf(prefix, sizeof(prefix), "http://%s:%s",
getenv("SERVER_NAME"), getenv("SERVER_PORT"));
if ((url = cgiGetVariable("URL")) != NULL)
printf("Location: %s%s\n\n", prefix, url);
printf("Location: %s\n\n", url);
else
printf("Location: %s/admin\n\n", prefix);
puts("Location: /admin\n");
}
else if (!strcmp(op, "start-printer"))
do_printer_op(http, IPP_RESUME_PRINTER, cgiText(_("Start Printer")));
@@ -482,7 +473,7 @@ do_am_class(http_t *http, /* I - HTTP connection */
char refresh[1024]; /* Refresh URL */
cgiFormEncode(uri, name, sizeof(uri));
snprintf(refresh, sizeof(refresh), "5;URL=/admin/?OP=redirect&URL=/classes/%s",
snprintf(refresh, sizeof(refresh), "5;/admin/?OP=redirect&URL=/classes/%s",
uri);
cgiSetVariable("refresh_page", refresh);
@@ -507,7 +498,9 @@ do_am_printer(http_t *http, /* I - HTTP connection */
int modify) /* I - Modify the printer? */
{
int i; /* Looping var */
ipp_attribute_t *attr; /* Current attribute */
int element; /* Element number */
ipp_attribute_t *attr, /* Current attribute */
*last; /* Last attribute */
ipp_t *request, /* IPP request */
*response, /* IPP response */
*oldinfo; /* Old printer information */
@@ -535,9 +528,8 @@ do_am_printer(http_t *http, /* I - HTTP connection */
};
ptr = cgiGetVariable("DEVICE_URI");
fprintf(stderr, "DEBUG: do_am_printer: DEVICE_URI=\"%s\"\n",
ptr ? ptr : "(null)");
cgiGetVariable("DEVICE_URI"));
title = cgiText(modify ? _("Modify Printer") : _("Add Printer"));
@@ -855,31 +847,27 @@ do_am_printer(http_t *http, /* I - HTTP connection */
* Got the list of PPDs, see if the user has selected a make...
*/
if (cgiSetIPPVars(response, NULL, NULL, NULL, 0) == 0)
cgiSetIPPVars(response, NULL, NULL, NULL, 0);
if (var == NULL)
{
/*
* No PPD files with this make, try again with all makes...
* Let the user choose a make...
*/
ippDelete(response);
for (element = 0, attr = response->attrs, last = NULL;
attr != NULL;
attr = attr->next)
if (attr->name && strcmp(attr->name, "ppd-make") == 0)
if (last == NULL ||
strcasecmp(last->values[0].string.text,
attr->values[0].string.text) != 0)
{
cgiSetArray("PPD_MAKE", element, attr->values[0].string.text);
element ++;
last = attr;
}
request = ippNewRequest(CUPS_GET_PPDS);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
NULL, "ipp://localhost/printers/");
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
"requested-attributes", NULL, "ppd-make");
if ((response = cupsDoRequest(http, request, "/")) != NULL)
cgiSetIPPVars(response, NULL, NULL, NULL, 0);
cgiStartHTML(title);
cgiCopyTemplateLang("choose-make.tmpl");
cgiEndHTML();
}
else if (!var)
{
cgiStartHTML(title);
cgiCopyTemplateLang("choose-make.tmpl");
cgiEndHTML();
@@ -935,6 +923,7 @@ do_am_printer(http_t *http, /* I - HTTP connection */
cgiEndHTML();
}
ippDelete(response);
}
else
@@ -1043,7 +1032,7 @@ do_am_printer(http_t *http, /* I - HTTP connection */
"5;/admin/?OP=redirect&URL=/printers/%s", uri);
else
snprintf(refresh, sizeof(refresh),
"5;URL=/admin/?OP=set-printer-options&PRINTER_NAME=%s", uri);
"5;/admin/?OP=set-printer-options&PRINTER_NAME=%s", uri);
cgiSetVariable("refresh_page", refresh);
@@ -1185,7 +1174,7 @@ do_config_printer(http_t *http) /* I - HTTP connection */
ppdLocalize(ppd);
cgiStartHTML(cgiText(_("Set Printer Options")));
cgiStartHTML("Set Printer Options");
cgiCopyTemplateLang("set-printer-options-header.tmpl");
if (ppdConflicts(ppd))
@@ -1454,7 +1443,7 @@ do_config_printer(http_t *http) /* I - HTTP connection */
if (!in || !out)
{
cgiSetVariable("ERROR", strerror(errno));
cgiStartHTML(cgiText(_("Set Printer Options")));
cgiStartHTML("Set Printer Options");
cgiCopyTemplateLang("error.tmpl");
cgiEndHTML();
@@ -1491,9 +1480,7 @@ do_config_printer(http_t *http) /* I - HTTP connection */
*keyptr = '\0';
if (!strcmp(keyword, "PageRegion") ||
!strcmp(keyword, "PaperDimension") ||
!strcmp(keyword, "ImageableArea"))
if (!strcmp(keyword, "PageRegion"))
var = cgiGetVariable("PageSize");
else
var = cgiGetVariable(keyword);
@@ -1565,7 +1552,7 @@ do_config_printer(http_t *http) /* I - HTTP connection */
cgiFormEncode(uri, printer, sizeof(uri));
snprintf(refresh, sizeof(refresh),
"5;URL=/admin/?OP=redirect&URL=/printers/%s", uri);
"5;/admin/?OP=redirect&URL=/printers/%s", uri);
cgiSetVariable("refresh_page", refresh);
cgiStartHTML(title);
@@ -1627,7 +1614,7 @@ do_config_server(http_t *http) /* I - HTTP connection */
}
else
{
cgiSetVariable("refresh_page", "5;URL=/admin/?OP=redirect");
cgiSetVariable("refresh_page", "5;/admin/?OP=redirect");
cgiStartHTML(cgiText(_("Change Settings")));
cgiCopyTemplateLang("restart.tmpl");
}
@@ -1721,7 +1708,7 @@ do_config_server(http_t *http) /* I - HTTP connection */
}
else
{
cgiSetVariable("refresh_page", "5;URL=/admin/?OP=redirect");
cgiSetVariable("refresh_page", "5;/admin/?OP=redirect");
cgiStartHTML(cgiText(_("Edit Configuration File")));
cgiCopyTemplateLang("restart.tmpl");
@@ -1819,7 +1806,7 @@ do_config_server(http_t *http) /* I - HTTP connection */
* Show the current config file...
*/
cgiStartHTML(cgiText(_("Edit Configuration File")));
cgiStartHTML("Edit Configuration File");
printf("<!-- \"%s\" -->\n", filename);
@@ -1842,13 +1829,10 @@ do_delete_class(http_t *http) /* I - HTTP connection */
const char *pclass; /* Printer class name */
/*
* Get form variables...
*/
cgiStartHTML(cgiText(_("Delete Class")));
if (cgiGetVariable("CONFIRM") == NULL)
{
cgiStartHTML(cgiText(_("Delete Class")));
cgiCopyTemplateLang("class-confirm.tmpl");
cgiEndHTML();
return;
@@ -1859,7 +1843,6 @@ do_delete_class(http_t *http) /* I - HTTP connection */
"localhost", 0, "/classes/%s", pclass);
else
{
cgiStartHTML(cgiText(_("Delete Class")));
cgiSetVariable("ERROR", cgiText(_("Missing form variable!")));
cgiCopyTemplateLang("error.tmpl");
cgiEndHTML();
@@ -1886,12 +1869,6 @@ do_delete_class(http_t *http) /* I - HTTP connection */
ippDelete(cupsDoRequest(http, request, "/admin/"));
/*
* Show the results...
*/
cgiStartHTML(cgiText(_("Delete Class")));
if (cupsLastError() > IPP_OK_CONFLICT)
cgiShowIPPError(_("Unable to delete class:"));
else
@@ -1913,13 +1890,10 @@ do_delete_printer(http_t *http) /* I - HTTP connection */
const char *printer; /* Printer printer name */
/*
* Get form variables...
*/
cgiStartHTML(cgiText(_("Delete Printer")));
if (cgiGetVariable("CONFIRM") == NULL)
{
cgiStartHTML(cgiText(_("Delete Printer")));
cgiCopyTemplateLang("printer-confirm.tmpl");
cgiEndHTML();
return;
@@ -1930,7 +1904,6 @@ do_delete_printer(http_t *http) /* I - HTTP connection */
"localhost", 0, "/printers/%s", printer);
else
{
cgiStartHTML(cgiText(_("Delete Printer")));
cgiSetVariable("ERROR", cgiText(_("Missing form variable!")));
cgiCopyTemplateLang("error.tmpl");
cgiEndHTML();
@@ -1957,12 +1930,6 @@ do_delete_printer(http_t *http) /* I - HTTP connection */
ippDelete(cupsDoRequest(http, request, "/admin/"));
/*
* Show the results...
*/
cgiStartHTML(cgiText(_("Delete Printer")));
if (cupsLastError() > IPP_OK_CONFLICT)
cgiShowIPPError(_("Unable to delete printer:"));
else
@@ -2482,7 +2449,7 @@ do_printer_op(http_t *http, /* I - HTTP connection */
cgiRewriteURL(uri, url, sizeof(url), NULL);
cgiFormEncode(uri, url, sizeof(uri));
snprintf(refresh, sizeof(refresh), "5;URL=/admin/?OP=redirect&URL=%s", uri);
snprintf(refresh, sizeof(refresh), "5;/admin/?OP=redirect&URL=%s", uri);
cgiSetVariable("refresh_page", refresh);
cgiStartHTML(title);
@@ -2657,11 +2624,11 @@ do_set_allowed_users(http_t *http) /* I - HTTP connection */
NULL, uri);
if (num_users == 0)
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME,
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name-allowed", NULL, "all");
else
{
attr = ippAddStrings(request, IPP_TAG_PRINTER, IPP_TAG_NAME,
attr = ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
type, num_users, NULL, NULL);
for (i = 0, ptr = (char *)users; *ptr; i ++)
@@ -2740,8 +2707,7 @@ do_set_allowed_users(http_t *http) /* I - HTTP connection */
cgiRewriteURL(uri, url, sizeof(url), NULL);
cgiFormEncode(uri, url, sizeof(uri));
snprintf(refresh, sizeof(refresh), "5;URL=/admin/?OP=redirect&URL=%s",
uri);
snprintf(refresh, sizeof(refresh), "5;/admin/?OP=redirect&URL=%s", uri);
cgiSetVariable("refresh_page", refresh);
cgiStartHTML(cgiText(_("Set Allowed Users")));
@@ -2831,7 +2797,7 @@ do_set_sharing(http_t *http) /* I - HTTP connection */
cgiRewriteURL(uri, url, sizeof(url), NULL);
cgiFormEncode(uri, url, sizeof(uri));
snprintf(refresh, sizeof(refresh), "5;URL=/admin/?OP=redirect&URL=%s", uri);
snprintf(refresh, sizeof(refresh), "5;/admin/?OP=redirect&URL=%s", uri);
cgiSetVariable("refresh_page", refresh);
cgiStartHTML(cgiText(_("Set Publishing")));
+6 -6
Ver Arquivo
@@ -95,7 +95,8 @@ main(int argc, /* I - Number of command-line arguments */
* See who is logged in...
*/
user = getenv("REMOTE_USER");
if ((user = getenv("REMOTE_USER")) == NULL)
user = "guest";
/*
* Connect to the HTTP server...
@@ -186,7 +187,7 @@ main(int argc, /* I - Number of command-line arguments */
void
show_all_classes(http_t *http, /* I - Connection to server */
const char *user) /* I - Username */
const char *user) /* I - Username */
{
int i; /* Looping var */
ipp_t *request, /* IPP request */
@@ -220,9 +221,8 @@ show_all_classes(http_t *http, /* I - Connection to server */
request = ippNewRequest(CUPS_GET_CLASSES);
if (user)
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name", NULL, user);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name", NULL, user);
cgiGetAttributes(request, "classes.tmpl");
@@ -419,7 +419,7 @@ show_class(http_t *http, /* I - Connection to server */
*/
cgiFormEncode(uri, pclass, sizeof(uri));
snprintf(refresh, sizeof(refresh), "10;URL=/classes/%s", uri);
snprintf(refresh, sizeof(refresh), "10;/classes/%s", uri);
cgiSetVariable("refresh_page", refresh);
}
+1 -2
Ver Arquivo
@@ -187,8 +187,7 @@ main(int argc, /* I - Number of command-line arguments */
topic = cgiGetVariable("TOPIC");
si = helpSearchIndex(hi, query, topic, helpfile);
fprintf(stderr, "DEBUG: query=\"%s\", topic=\"%s\"\n",
query ? query : "(null)", topic ? topic : "(null)");
fprintf(stderr, "DEBUG: query=\"%s\", topic=\"%s\"\n", query, topic);
if (si)
{
+1 -2
Ver Arquivo
@@ -175,8 +175,7 @@ cgi_null_passwd(const char *prompt) /* I - Prompt string (unused) */
{
(void)prompt;
fprintf(stderr, "DEBUG: cgi_null_passwd(prompt=\"%s\") called!\n",
prompt ? prompt : "(null)");
fprintf(stderr, "DEBUG: cgi_null_passwd(prompt=\"%s\") called!\n", prompt);
return (NULL);
}
+6 -8
Ver Arquivo
@@ -482,7 +482,7 @@ cgiMoveJobs(http_t *http, /* I - Connection to server */
{
cgiRewriteURL(job_printer_uri, resource, sizeof(resource), NULL);
cgiFormEncode(uri, resource, sizeof(uri));
snprintf(refresh, sizeof(refresh), "2;URL=%s", uri);
snprintf(refresh, sizeof(refresh), "2;%s", uri);
cgiSetVariable("refresh_page", refresh);
}
@@ -598,7 +598,7 @@ cgiPrintTestPage(http_t *http, /* I - Connection to server */
*/
cgiFormEncode(uri, resource, sizeof(uri));
snprintf(refresh, sizeof(refresh), "2;URL=%s", uri);
snprintf(refresh, sizeof(refresh), "2;%s", uri);
cgiSetVariable("refresh_page", refresh);
}
@@ -774,7 +774,7 @@ cgiSetIPPObjectVars(
fprintf(stderr, "DEBUG2: cgiSetIPPObjectVars(obj=%p, prefix=\"%s\", "
"element=%d)\n",
obj, prefix ? prefix : "(null)", element);
obj, prefix, element);
/*
* Set common CGI template variables...
@@ -977,9 +977,7 @@ cgiSetIPPVars(ipp_t *response, /* I - Response data to be copied... */
fprintf(stderr, "DEBUG2: cgiSetIPPVars(response=%p, filter_name=\"%s\", "
"filter_value=\"%s\", prefix=\"%s\", parent_el=%d)\n",
response, filter_name ? filter_name : "(null)",
filter_value ? filter_value : "(null)",
prefix ? prefix : "(null)", parent_el);
response, filter_name, filter_value, prefix, parent_el);
/*
* Set common CGI template variables...
@@ -1037,9 +1035,9 @@ cgiSetIPPVars(ipp_t *response, /* I - Response data to be copied... */
attr = cgiSetIPPObjectVars(attr, prefix, element);
}
fprintf(stderr, "DEBUG2: Returing %d from cgiSetIPPVars()...\n", element);
fprintf(stderr, "DEBUG2: Returing %d from cgiSetIPPVars()...\n", element + 1);
return (element);
return (element + 1);
}
+8 -8
Ver Arquivo
@@ -98,7 +98,8 @@ main(int argc, /* I - Number of command-line arguments */
* See who is logged in...
*/
user = getenv("REMOTE_USER");
if ((user = getenv("REMOTE_USER")) == NULL)
user = "guest";
/*
* Connect to the HTTP server...
@@ -286,7 +287,7 @@ print_command(http_t *http, /* I - Connection to server */
*/
cgiFormEncode(uri, resource, sizeof(uri));
snprintf(refresh, sizeof(refresh), "2;URL=%s", uri);
snprintf(refresh, sizeof(refresh), "2;%s", uri);
cgiSetVariable("refresh_page", refresh);
}
@@ -330,7 +331,7 @@ show_all_printers(http_t *http, /* I - Connection to server */
fprintf(stderr, "DEBUG: show_all_printers(http=%p, user=\"%s\")\n",
http, user ? user : "(null)");
http, user);
/*
* Show the standard header...
@@ -356,9 +357,8 @@ show_all_printers(http_t *http, /* I - Connection to server */
ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_ENUM,
"printer-type-mask", CUPS_PRINTER_CLASS);
if (user)
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name", NULL, user);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name", NULL, user);
cgiGetAttributes(request, "printers.tmpl");
@@ -543,7 +543,7 @@ show_printer(http_t *http, /* I - Connection to server */
fprintf(stderr, "DEBUG: show_printer(http=%p, printer=\"%s\")\n",
http, printer ? printer : "(null)");
http, printer);
/*
* Build an IPP_GET_PRINTER_ATTRIBUTES request, which requires the following
@@ -594,7 +594,7 @@ show_printer(http_t *http, /* I - Connection to server */
*/
cgiFormEncode(uri, printer, sizeof(uri));
snprintf(refresh, sizeof(refresh), "10;URL=/printers/%s", uri);
snprintf(refresh, sizeof(refresh), "10;/printers/%s", uri);
cgiSetVariable("refresh_page", refresh);
}
+5 -37
Ver Arquivo
@@ -44,7 +44,6 @@
static void cgi_copy(FILE *out, FILE *in, int element, char term,
int indent);
static void cgi_puts(const char *s, FILE *out);
static void cgi_puturi(const char *s, FILE *out);
/*
@@ -60,7 +59,7 @@ cgiCopyTemplateFile(FILE *out, /* I - Output file */
fprintf(stderr, "DEBUG: cgiCopyTemplateFile(out=%p, tmpl=\"%s\")\n", out,
tmpl ? tmpl : "(null)");
tmpl);
/*
* Open the template file...
@@ -69,7 +68,7 @@ cgiCopyTemplateFile(FILE *out, /* I - Output file */
if ((in = fopen(tmpl, "r")) == NULL)
{
fprintf(stderr, "ERROR: Unable to open template file \"%s\" - %s\n",
tmpl ? tmpl : "(null)", strerror(errno));
tmpl, strerror(errno));
return;
}
@@ -102,8 +101,7 @@ cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */
FILE *in; /* Input file */
fprintf(stderr, "DEBUG: cgiCopyTemplateLang(tmpl=\"%s\")\n",
tmpl ? tmpl : "(null)");
fprintf(stderr, "DEBUG: cgiCopyTemplateLang(tmpl=\"%s\")\n", tmpl);
/*
* Convert the language to a locale name...
@@ -112,7 +110,7 @@ cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */
if ((lang = getenv("LANG")) != NULL)
{
for (i = 0; lang[i] && i < 15; i ++)
if (isalnum(lang[i] & 255) || lang[i] == '_')
if (isalnum(lang[i] & 255))
locale[i] = tolower(lang[i]);
else if (lang[i] == '-')
locale[i] = '_';
@@ -237,7 +235,6 @@ cgi_copy(FILE *out, /* I - Output file */
char outval[1024], /* Formatted output string */
compare[1024]; /* Comparison string */
int result; /* Result of comparison */
int uriencode; /* Encode as URI */
fprintf(stderr, "DEBUG: %*sStarting at file position %ld...\n", indent, "",
@@ -256,13 +253,9 @@ cgi_copy(FILE *out, /* I - Output file */
* Get a variable name...
*/
uriencode = 0;
for (s = name; (ch = getc(in)) != EOF;)
if (strchr("}]<>=! \t\n", ch))
break;
else if (s == name && ch == '%')
uriencode = 1;
else if (s > name && ch == '?')
break;
else if (s < (name + sizeof(name) - 1))
@@ -406,12 +399,7 @@ cgi_copy(FILE *out, /* I - Output file */
*/
if (out)
{
if (uriencode)
cgi_puturi(outptr, out);
else
cgi_puts(outptr, out);
}
cgi_puts(outptr, out);
continue;
}
@@ -649,26 +637,6 @@ cgi_puts(const char *s, /* I - String to output */
}
/*
* 'cgi_puturi()' - Put a URI string to the output file, quoting as needed...
*/
static void
cgi_puturi(const char *s, /* I - String to output */
FILE *out) /* I - Output file */
{
while (*s)
{
if (strchr("%&+ <>#=", *s) || *s & 128)
fprintf(out, "%%%02X", *s & 255);
else
putc(*s, out);
s ++;
}
}
/*
* End of "$Id$".
*/
+1 -8
Ver Arquivo
@@ -239,12 +239,6 @@ cgiInitialize(void)
cupsSetPasswordCB(cgi_passwd);
/*
* Set the locale so that times, etc. are formatted properly...
*/
setlocale(LC_ALL, "");
#ifdef DEBUG
/*
* Disable output buffering to find bugs...
@@ -949,8 +943,7 @@ cgi_passwd(const char *prompt) /* I - Prompt (not used) */
{
(void)prompt;
fprintf(stderr, "DEBUG: cgi_passwd(prompt=\"%s\") called!\n",
prompt ? prompt : "(null)");
fprintf(stderr, "DEBUG: cgi_passwd(prompt=\"%s\") called!\n", prompt);
/*
* Send a 401 (unauthorized) status to the server, so it can notify
+2 -1
Ver Arquivo
@@ -74,7 +74,8 @@ install: all
if test -r $(SERVERROOT)/$$file ; then \
$(MV) $(SERVERROOT)/$$file $(SERVERROOT)/$$file.O ; \
fi ; \
$(INSTALL_DATA) $$file $(SERVERROOT) ; \
$(INSTALL_CONFIG) $$file $(SERVERROOT) ; \
chgrp $(CUPS_GROUP) $(SERVERROOT)/$$file || true; \
done
-if test x$(PAMDIR) != x; then \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(PAMDIR); \
-1
Ver Arquivo
@@ -33,7 +33,6 @@ DefaultAuthType Basic
# Restrict access to the admin pages...
<Location /admin>
@ENCRYPTION_REQUIRED@
Order allow,deny
Allow localhost
</Location>
+5 -4
Ver Arquivo
@@ -1,5 +1,5 @@
#
# "$Id: mime.convs 5402 2006-04-14 19:21:03Z mike $"
# "$Id: mime.convs 4559 2005-08-04 18:40:13Z mike $"
#
# MIME converts file for the Common UNIX Printing System (CUPS).
#
@@ -107,12 +107,13 @@ image/x-sun-raster application/vnd.cups-raster 100 imagetoraster
#
# Raw filter...
#
# Uncomment the following filter to allow printing of arbitrary files
# without the -oraw option.
# Uncomment the following filter and the application/octet-stream type
# in mime.types to allow printing of arbitrary files without the -oraw
# option.
#
#application/octet-stream application/vnd.cups-raw 0 -
#
# End of "$Id: mime.convs 5402 2006-04-14 19:21:03Z mike $".
# End of "$Id: mime.convs 4559 2005-08-04 18:40:13Z mike $".
#
+7 -9
Ver Arquivo
@@ -1,5 +1,5 @@
#
# "$Id: mime.types 5402 2006-04-14 19:21:03Z mike $"
# "$Id: mime.types 4590 2005-08-24 19:25:49Z mike $"
#
# MIME types file for the Common UNIX Printing System (CUPS).
#
@@ -77,9 +77,7 @@ application/postscript ai eps ps string(0,%!) string(0,<04>%!) \
(contains(0,1024,"LANGUAGE=POSTSCRIPT") \
contains(0,1024,"LANGUAGE = Postscript") \
contains(0,1024,"LANGUAGE = PostScript") \
contains(0,1024,"LANGUAGE = POSTSCRIPT") \
(contains(0,1024,<0a>%!) + \
!contains(0,1024,"ENTER LANGUAGE")))
contains(0,1024,"LANGUAGE = POSTSCRIPT"))
application/vnd.hp-HPGL hpgl string(0,<1B>&)\
string(0,<1B>E<1B>%0B) \
string(0,<1B>%-1B) string(0,<201B>)\
@@ -147,9 +145,7 @@ text/css css
application/vnd.cups-command string(0,'#CUPS-COMMAND')
application/vnd.cups-form string(0,"<CUPSFORM>")
application/vnd.cups-pdf
application/vnd.cups-postscript
application/vnd.cups-ppd ppd string(0,"*PPD-Adobe:")
application/vnd.cups-raster string(0,"RaSt") string(0,"tSaR")
application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
string(0,<1B>@) \
@@ -161,11 +157,13 @@ application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
#
# Raw print file support...
#
# Comment the following type to prevent raw file printing.
# Uncomment the following type and the application/octet-stream
# filter line in mime.convs to allow raw file printing without the
# -oraw option.
#
application/octet-stream
#application/octet-stream
#
# End of "$Id: mime.types 5402 2006-04-14 19:21:03Z mike $".
# End of "$Id: mime.types 4590 2005-08-24 19:25:49Z mike $".
#
+5 -6
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-common.m4 5466 2006-04-26 19:52:27Z mike $"
dnl "$Id: cups-common.m4 5229 2006-03-05 16:48:12Z mike $"
dnl
dnl Common configuration stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -63,7 +63,7 @@ AC_PATH_PROG(LD,ld)
AC_PATH_PROG(LN,ln)
AC_PATH_PROG(MV,mv)
AC_PATH_PROG(RM,rm)
AC_PATH_PROG(RMDIR,rmdir)
AC_PATH_PROG(RM,rmdir)
AC_PATH_PROG(SED,sed)
AC_PATH_PROG(STRIP,strip)
@@ -79,10 +79,9 @@ fi
dnl Static library option...
INSTALLSTATIC=""
AC_ARG_ENABLE(static, [ --enable-static install static libraries, default=no])
AC_ARG_ENABLE(install_static, [ --enable-static install static libraries, default=no])
if test x$enable_static = xyes; then
echo Installing static libraries...
if test x$enable_install_static = xyes; then
INSTALLSTATIC="installstatic"
fi
@@ -265,5 +264,5 @@ AC_SUBST(DEFAULT_IPP_PORT)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
dnl
dnl End of "$Id: cups-common.m4 5466 2006-04-26 19:52:27Z mike $".
dnl End of "$Id: cups-common.m4 5229 2006-03-05 16:48:12Z mike $".
dnl
+34 -330
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-compiler.m4 5566 2006-05-22 01:10:11Z mike $"
dnl "$Id: cups-compiler.m4 4953 2006-01-19 20:30:48Z mike $"
dnl
dnl Compiler stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -24,64 +24,22 @@ dnl
dnl Clear the debugging and non-shared library options unless the user asks
dnl for them...
ARCHFLAGS=""
OPTIM=""
AC_SUBST(ARCHFLAGS)
AC_SUBST(OPTIM)
AC_ARG_WITH(optim, [ --with-optim="flags" set optimization flags ])
AC_ARG_WITH(archflags, [ --with-arch="flags" set default architecture flags ])
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging, default=no],
[if test x$enable_debug = xyes; then
OPTIM="-g"
fi])
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, default=no])
AC_ARG_WITH(arch32flags, [ --with-arch32="flags" specifies 32-bit architecture flags])
ARCH32FLAGS=""
INSTALL32=""
LIB32CUPS=""
LIB32CUPSIMAGE=""
LIB32DIR=""
UNINSTALL32=""
AC_SUBST(ARCH32FLAGS)
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, default=no])
AC_ARG_WITH(arch64flags, [ --with-arch64="flags" specifies 64-bit architecture flags])
ARCH64FLAGS=""
INSTALL64=""
LIB64CUPS=""
LIB64CUPSIMAGE=""
LIB64DIR=""
UNINSTALL64=""
AC_SUBST(ARCH64FLAGS)
AC_SUBST(INSTALL64)
AC_SUBST(LIB64CUPS)
AC_SUBST(LIB64CUPSIMAGE)
AC_SUBST(LIB64DIR)
AC_SUBST(UNINSTALL64)
dnl Position-Independent Executable support on Linux and *BSD...
AC_ARG_ENABLE(pie, [ --enable-pie use GCC -fPIE option, default=no])
AC_ARG_ENABLE(pie, [ --enable-pie use GCC -fpie option, default=no])
dnl Update compiler options...
CXXLIBS=""
AC_SUBST(CXXLIBS)
PIEFLAGS=""
AC_SUBST(PIEFLAGS)
if test -n "$GCC"; then
if test -z "$OPTIM"; then
if test "x$with_optim" = x; then
@@ -97,15 +55,20 @@ if test -n "$GCC"; then
fi
case $uname in
Linux*)
if test x$enable_pie = xyes; then
PIEFLAGS="-pie -fPIE"
Darwin*)
if test "x$with_optim" = x; then
if test "x`uname -m`" = xi386; then
# Build universal binaries for OSX on Intel...
OPTIM="-arch i386 -arch ppc $OPTIM"
DSOFLAGS="-arch i386 -arch ppc $DSOFLAGS"
fi
fi
;;
*)
Linux*)
if test x$enable_pie = xyes; then
echo "Sorry, --enable-pie is not supported on this OS!"
OPTIM="$OPTIM -fpie"
LDFLAGS="$LDFLAGS -pie"
fi
;;
esac
@@ -116,175 +79,6 @@ if test -n "$GCC"; then
# Additional warning options for alpha testing...
OPTIM="-Wshadow -Wunused $OPTIM"
fi
case "$uname" in
Darwin*)
if test -z "$with_archflags"; then
if test "x`uname -m`" = xi386; then
# Build universal binaries for OSX on Intel...
ARCHFLAGS="-arch i386 -arch ppc"
fi
else
ARCHFLAGS="$with_archflags"
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
INSTALL32="install32bit"
LIB32CUPS="32bit/libcups.so.2"
LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
LIB32DIR="$prefix/lib32"
UNINSTALL32="uninstall32bit"
if test -z "$with_archflags"; then
if test -z "$with_arch64flags"; then
ARCHFLAGS="-64 -mips4"
else
ARCHFLAGS="$with_arch64flags"
fi
else
ARCHFLAGS="$with_archflags"
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
INSTALL64="install64bit"
LIB64CUPS="64bit/libcups.so.2"
LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
LIB64DIR="$prefix/lib64"
UNINSTALL64="uninstall64bit"
if test -z "$with_archflags"; then
if test -z "$with_arch32flags"; then
ARCHFLAGS="-n32 -mips3"
else
ARCHFLAGS="$with_arch32flags"
fi
else
ARCHFLAGS="$with_archflags"
fi
fi
;;
Linux*)
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
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"
if test -z "$with_archflags"; then
if test -z "$with_arch64flags"; then
ARCHFLAGS="-m64"
else
ARCHFLAGS="$with_arch64flags"
fi
else
ARCHFLAGS="$with_archflags"
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
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"
if test -z "$with_archflags"; then
if test -z "$with_arch32flags"; then
ARCHFLAGS="-m32"
else
ARCHFLAGS="$with_arch32flags"
fi
else
ARCHFLAGS="$with_archflags"
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
INSTALL32="install32bit"
LIB32CUPS="32bit/libcups.so.2"
LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
LIB32DIR="$exec_prefix/lib/32"
UNINSTALL32="uninstall32bit"
if test -z "$with_archflags"; then
if test -z "$with_arch64flags"; then
ARCHFLAGS="-m64"
else
ARCHFLAGS="$with_arch64flags"
fi
else
ARCHFLAGS="$with_archflags"
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
INSTALL64="install64bit"
LIB64CUPS="64bit/libcups.so.2"
LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
LIB64DIR="$exec_prefix/lib/64"
UNINSTALL64="uninstall64bit"
if test -z "$with_archflags"; then
if test -z "$with_arch32flags"; then
ARCHFLAGS="-m32"
else
ARCHFLAGS="$with_arch32flags"
fi
else
ARCHFLAGS="$with_archflags"
fi
fi
;;
esac
else
case $uname in
AIX*)
@@ -306,15 +100,9 @@ else
fi
CFLAGS="-Ae $CFLAGS"
# Warning 336 is "empty translation unit"
# Warning 829 is passing constant string as char *
CXXFLAGS="+W336,829 $CXXFLAGS"
if test -z "$with_archflags"; then
# Build portable binaries for all HP systems...
ARCHFLAGS="+DAportable"
else
ARCHFLAGS="$with_archflags"
if test "x$with_optim" = x; then
OPTIM="+DAportable $OPTIM"
fi
if test $PICFLAG = 1; then
@@ -330,55 +118,20 @@ else
fi
fi
if test $uversion -ge 62 -a "x$with_optim" = x; then
OPTIM="$OPTIM -n32 -mips3"
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
INSTALL32="install32bit"
LIB32CUPS="32bit/libcups.so.2"
LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
LIB32DIR="$prefix/lib32"
UNINSTALL32="uninstall32bit"
if test -z "$with_archflags"; then
if test -z "$with_arch64flags"; then
ARCHFLAGS="-64 -mips4"
else
ARCHFLAGS="$with_arch64flags"
fi
else
ARCHFLAGS="$with_archflags"
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
INSTALL64="install64bit"
LIB64CUPS="64bit/libcups.so.2"
LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
LIB64DIR="$prefix/lib64"
UNINSTALL64="uninstall64bit"
if test -z "$with_archflags"; then
if test -z "$with_arch32flags"; then
ARCHFLAGS="-n32 -mips3"
else
ARCHFLAGS="$with_arch32flags"
fi
else
ARCHFLAGS="$with_archflags"
# Show most warnings, but suppress the
# ones about arguments not being used,
# string constants assigned to const
# char *'s, etc. We only set the warning
# options on IRIX 6.2 and higher because
# of limitations in the older SGI compiler
# tools.
if test $uversion -ge 62; then
OPTIM="-fullwarn -woff 1183,1209,1349,3201 $OPTIM"
fi
fi
;;
@@ -392,63 +145,14 @@ else
fi
fi
if test $PICFLAG = 1; then
OPTIM="-KPIC $OPTIM"
if test "x$with_optim" = x; then
# Specify "generic" SPARC output and suppress
# all of Sun's questionable warning messages...
OPTIM="-w $OPTIM -xarch=generic"
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"
INSTALL32="install32bit"
LIB32CUPS="32bit/libcups.so.2"
LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
LIB32DIR="$exec_prefix/lib/32"
UNINSTALL32="uninstall32bit"
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
else
ARCHFLAGS="$with_archflags"
fi
else
if test "x$enable_64bit" = xyes; then
# Build 64-bit libraries...
ARCH64FLAGS="-xarch=generic64"
INSTALL64="install64bit"
LIB64CUPS="64bit/libcups.so.2"
LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
LIB64DIR="$exec_prefix/lib/64"
UNINSTALL64="uninstall64bit"
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
else
ARCHFLAGS="$with_archflags"
fi
if test $PICFLAG = 1; then
OPTIM="-KPIC $OPTIM"
fi
;;
UNIX_SVR*)
@@ -488,5 +192,5 @@ if test $uname = HP-UX; then
fi
dnl
dnl End of "$Id: cups-compiler.m4 5566 2006-05-22 01:10:11Z mike $".
dnl End of "$Id: cups-compiler.m4 4953 2006-01-19 20:30:48Z mike $".
dnl
+13 -38
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-defaults.m4 5466 2006-04-26 19:52:27Z mike $"
dnl "$Id$"
dnl
dnl Default cupsd configuration settings for the Common UNIX Printing System
dnl (CUPS).
@@ -23,12 +23,6 @@ dnl EMail: cups-info@cups.org
dnl WWW: http://www.cups.org
dnl
dnl Default langugages...
AC_ARG_WITH(languages, [ --with-languages set installed languages, default="es ja" ],
LANGUAGES="$withval",
LANGUAGES="es ja pl sv")
AC_SUBST(LANGUAGES)
dnl Default ConfigFilePerm
AC_ARG_WITH(config_perm, [ --with-config-file-perm set default ConfigFilePerm value, default=0640],
CUPS_CONFIG_FILE_PERM="$withval",
@@ -111,21 +105,13 @@ AC_SUBST(CUPS_IMPLICIT_CLASSES)
dnl Default UseNetworkDefault
AC_ARG_ENABLE(network_default, [ --enable-use-network-default
enable UseNetworkDefault by default, default=auto])
if test "x$enable_network_default" != xno; then
AC_MSG_CHECKING(whether to use network default printers)
if test "x$enable_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
enable UseNetworkDefault by default, default=yes])
if test "x$enable_network_default" = xno; then
CUPS_USE_NETWORK_DEFAULT="No"
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USE_NETWORK_DEFAULT, 0)
else
CUPS_USE_NETWORK_DEFAULT="Yes"
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USE_NETWORK_DEFAULT, 1)
fi
AC_SUBST(CUPS_USE_NETWORK_DEFAULT)
@@ -156,7 +142,12 @@ AC_ARG_WITH(cups-group, [ --with-cups-group set default group for CUPS],
CUPS_GROUP="$withval",
AC_MSG_CHECKING(for default print group)
if test -f /etc/group; then
GROUP_LIST="lp nobody"
if test x$uname = xDarwin; then
GROUP_LIST="nobody"
else
GROUP_LIST="lp nobody"
fi
CUPS_GROUP=""
for group in $GROUP_LIST; do
if test "`grep \^${group}: /etc/group`" != ""; then
@@ -218,23 +209,7 @@ AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USER, "$CUPS_USER")
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GROUP, "$CUPS_GROUP")
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SYSTEM_GROUPS, "$CUPS_SYSTEM_GROUPS")
dnl Default printcap file...
AC_ARG_WITH(printcap, [ --with-printcap set default printcap file],
default_printcap="$withval",
default_printcap="/etc/printcap")
if test x$enable_printcap != xno -a x$default_printcap != xno; then
if test "x$default_printcap" = "x/etc/printcap" -a "$uname" = "Darwin" -a $uversion -ge 90; then
CUPS_DEFAULT_PRINTCAP=""
else
CUPS_DEFAULT_PRINTCAP="$default_printcap"
fi
else
CUPS_DEFAULT_PRINTCAP=""
fi
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTCAP, "$CUPS_DEFAULT_PRINTCAP")
dnl
dnl End of "$Id: cups-defaults.m4 5466 2006-04-26 19:52:27Z mike $".
dnl End of "$Id$".
dnl
+9 -26
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id: cups-directories.m4 5547 2006-05-19 12:44:29Z mike $"
dnl "$Id: cups-directories.m4 5023 2006-01-29 14:39:44Z mike $"
dnl
dnl Directory stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
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 Easy Software Products and are protected by Federal
@@ -99,14 +99,10 @@ fi
dnl Fix "libdir" variable for IRIX 6.x...
if test "$libdir" = "\${exec_prefix}/lib"; then
if test "$uname" = "IRIX"; then
if test "$uname" = "IRIX" -a $uversion -ge 62; then
libdir="$exec_prefix/lib32"
else
if test "$uname" = Linux -a -d /usr/lib64; then
libdir="$exec_prefix/lib64"
else
libdir="$exec_prefix/lib"
fi
libdir="$exec_prefix/lib"
fi
fi
@@ -130,11 +126,9 @@ if test x$rcdir = x; then
Darwin*)
# Darwin and MacOS X...
INITDIR=""
if test -x /sbin/launchd; then
INITDDIR="/System/Library/LaunchDaemons"
else
INITDDIR="/System/Library/StartupItems/PrintingServices"
fi
AC_CHECK_PROG(INITDDIR, launchd,
"/System/Library/LaunchDaemons",
"/System/Library/StartupItems/PrintingServices")
;;
Linux | GNU)
@@ -180,17 +174,6 @@ fi
AC_SUBST(INITDIR)
AC_SUBST(INITDDIR)
dnl Xinetd support...
XINETD=""
for dir in /private/etc/xinetd.d /etc/xinetd.d /usr/local/etc/xinetd.d; do
if test -d $dir; then
XINETD="$dir"
break
fi
done
AC_SUBST(XINETD)
dnl Setup default locations...
# Cache data...
AC_ARG_WITH(cachedir, [ --with-cachedir set path for cache files],cachedir="$withval",cachedir="")
@@ -283,7 +266,7 @@ case "$uname" in
*)
# All others
INSTALL_SYSV="install-sysv"
CUPS_SERVERBIN="$exec_prefix/lib/cups"
CUPS_SERVERBIN="$libdir/cups"
;;
esac
@@ -302,5 +285,5 @@ AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$localstatedir/run/cups")
AC_SUBST(CUPS_STATEDIR)
dnl
dnl End of "$Id: cups-directories.m4 5547 2006-05-19 12:44:29Z mike $".
dnl End of "$Id: cups-directories.m4 5023 2006-01-29 14:39:44Z mike $".
dnl
+5 -21
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id: cups-image.m4 5466 2006-04-26 19:52:27Z mike $"
dnl "$Id: cups-image.m4 4644 2005-09-15 18:43:06Z mike $"
dnl
dnl Image library/filter stuff for the Common UNIX Printing System (CUPS).
dnl Image library stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
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 Easy Software Products and are protected by Federal
@@ -22,22 +22,6 @@ dnl EMail: cups-info@cups.org
dnl WWW: http://www.cups.org
dnl
dnl See if we want the image filters included at all...
AC_ARG_ENABLE(image, [ --enable-image turn on image filters, default=auto])
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 Save the current libraries since we don't want the image libraries
dnl included with every program...
SAVELIBS="$LIBS"
@@ -78,7 +62,7 @@ AC_CHECK_LIB(m, pow)
if test x$enable_png != xno; then
AC_CHECK_HEADER(png.h,
AC_CHECK_LIB(png, png_create_read_struct,
AC_CHECK_LIB(png, png_set_tRNS_to_alpha,
AC_DEFINE(HAVE_LIBPNG)
LIBPNG="-lpng -lm"))
else
@@ -110,5 +94,5 @@ AC_SUBST(EXPORT_LIBZ)
AC_CHECK_HEADER(stdlib.h,AC_DEFINE(HAVE_STDLIB_H))
dnl
dnl End of "$Id: cups-image.m4 5466 2006-04-26 19:52:27Z mike $".
dnl End of "$Id: cups-image.m4 4644 2005-09-15 18:43:06Z mike $".
dnl
+2 -2
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-launchd.m4 5466 2006-04-26 19:52:27Z mike $"
dnl "$Id$"
dnl
dnl launchd stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -49,5 +49,5 @@ AC_SUBST(DEFAULT_LAUNCHD_CONF)
AC_SUBST(LAUNCHDLIBS)
dnl
dnl End of "$Id: cups-launchd.m4 5466 2006-04-26 19:52:27Z mike $".
dnl End of "$Id$".
dnl
+3 -3
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-ldap.m4 5564 2006-05-22 00:59:11Z mike $"
dnl "$Id$"
dnl
dnl LDAP configuration stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -36,7 +36,7 @@ LIBLDAP=""
if test x$enable_ldap != xno; then
AC_CHECK_HEADER(ldap.h,
AC_CHECK_LIB(ldap, ldap_initialize,
AC_CHECK_LIB(ldap, ldap_value_free,
AC_DEFINE(HAVE_LDAP)
AC_DEFINE(HAVE_OPENLDAP)
LIBLDAP="-lldap"))
@@ -46,5 +46,5 @@ AC_SUBST(LIBLDAP)
dnl
dnl End of "$Id: cups-ldap.m4 5564 2006-05-22 00:59:11Z mike $".
dnl End of "$Id$".
dnl
+2 -2
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-libtool.m4 5466 2006-04-26 19:52:27Z mike $"
dnl "$Id: cups-libtool.m4 4494 2005-02-18 02:18:11Z mike $"
dnl
dnl Libtool stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -45,5 +45,5 @@ if test x$LIBTOOL != x; then
fi
dnl
dnl End of "$Id: cups-libtool.m4 5466 2006-04-26 19:52:27Z mike $".
dnl End of "$Id: cups-libtool.m4 4494 2005-02-18 02:18:11Z mike $".
dnl
+2 -2
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-manpages.m4 5466 2006-04-26 19:52:27Z mike $"
dnl "$Id: cups-manpages.m4 5099 2006-02-13 02:46:10Z mike $"
dnl
dnl Manpage stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -103,5 +103,5 @@ AC_SUBST(MAN8EXT)
AC_SUBST(MAN8DIR)
dnl
dnl End of "$Id: cups-manpages.m4 5466 2006-04-26 19:52:27Z mike $".
dnl End of "$Id: cups-manpages.m4 5099 2006-02-13 02:46:10Z mike $".
dnl
+2 -2
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-network.m4 5466 2006-04-26 19:52:27Z mike $"
dnl "$Id: cups-network.m4 4873 2005-12-07 01:46:54Z mike $"
dnl
dnl Networking stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -85,5 +85,5 @@ AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)
dnl
dnl End of "$Id: cups-network.m4 5466 2006-04-26 19:52:27Z mike $".
dnl End of "$Id: cups-network.m4 4873 2005-12-07 01:46:54Z mike $".
dnl
+2 -2
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-opsys.m4 5466 2006-04-26 19:52:27Z mike $"
dnl "$Id: cups-opsys.m4 5075 2006-02-05 01:00:29Z mike $"
dnl
dnl Operating system stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -39,5 +39,5 @@ case "$uname" in
esac
dnl
dnl "$Id: cups-opsys.m4 5466 2006-04-26 19:52:27Z mike $"
dnl "$Id: cups-opsys.m4 5075 2006-02-05 01:00:29Z mike $"
dnl
+2 -2
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-pam.m4 5466 2006-04-26 19:52:27Z mike $"
dnl "$Id: cups-pam.m4 4913 2006-01-11 01:42:04Z mike $"
dnl
dnl PAM stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -94,5 +94,5 @@ AC_SUBST(PAMLIBS)
AC_SUBST(PAMMOD)
dnl
dnl End of "$Id: cups-pam.m4 5466 2006-04-26 19:52:27Z mike $".
dnl End of "$Id: cups-pam.m4 4913 2006-01-11 01:42:04Z mike $".
dnl
-37
Ver Arquivo
@@ -1,37 +0,0 @@
dnl
dnl "$Id: cups-pam.m4 5466 2006-04-26 19:52:27Z mike $"
dnl
dnl PAP (AppleTalk) stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2006 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Easy Software Products and are protected by Federal
dnl copyright law. Distribution and use rights are outlined in the file
dnl "LICENSE.txt" which should have been included with this file. If this
dnl file is missing or damaged please contact Easy Software Products
dnl at:
dnl
dnl Attn: CUPS Licensing Information
dnl Easy Software Products
dnl 44141 Airport View Drive, Suite 204
dnl Hollywood, Maryland 20636 USA
dnl
dnl Voice: (301) 373-9600
dnl EMail: cups-info@cups.org
dnl WWW: http://www.cups.org
dnl
# Currently the PAP backend is only supported on MacOS X with the AppleTalk
# SDK installed...
PAP=""
if test $uname = Darwin; then
PAP="pap"
AC_CHECK_HEADER(AppleTalk/at_proto.h)
fi
AC_SUBST(PAP)
dnl
dnl End of "$Id: cups-pam.m4 5466 2006-04-26 19:52:27Z mike $".
dnl
-43
Ver Arquivo
@@ -1,43 +0,0 @@
dnl
dnl "$Id: cups-pdf.m4 5466 2006-04-26 19:52:27Z mike $"
dnl
dnl PDF filter configuration stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2006 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Easy Software Products and are protected by Federal
dnl copyright law. Distribution and use rights are outlined in the file
dnl "LICENSE.txt" which should have been included with this file. If this
dnl file is missing or damaged please contact Easy Software Products
dnl at:
dnl
dnl Attn: CUPS Licensing Information
dnl Easy Software Products
dnl 44141 Airport View Drive, Suite 204
dnl Hollywood, Maryland 20636 USA
dnl
dnl Voice: (301) 373-9600
dnl EMail: cups-info@cups.org
dnl WWW: http://www.cups.org
dnl
AC_ARG_ENABLE(pdftops, [ --enable-pdftops build pdftops filter, default=auto ])
PDFTOPS=""
if test "x$enable_pdftops" != xno; then
AC_MSG_CHECKING(whether to build pdftops filter)
if test "x$enable_pdftops" = xyes -o $uname != Darwin; then
PDFTOPS="pdftops"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
fi
AC_SUBST(PDFTOPS)
dnl
dnl End of "$Id: cups-pdf.m4 5466 2006-04-26 19:52:27Z mike $".
dnl
+2 -2
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-scripting.m4 5466 2006-04-26 19:52:27Z mike $"
dnl "$Id: cups-scripting.m4 5176 2006-02-25 18:14:10Z mike $"
dnl
dnl Scripting configuration stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -100,5 +100,5 @@ if test "x$CUPS_PYTHON" != x; then
fi
dnl
dnl End of "$Id: cups-scripting.m4 5466 2006-04-26 19:52:27Z mike $".
dnl End of "$Id: cups-scripting.m4 5176 2006-02-25 18:14:10Z mike $".
dnl
+32 -53
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-sharedlibs.m4 5568 2006-05-22 15:34:01Z mike $"
dnl "$Id: cups-sharedlibs.m4 5112 2006-02-16 04:41:59Z mike $"
dnl
dnl Shared library support for the Common UNIX Printing System (CUPS).
dnl
@@ -33,31 +33,31 @@ if test x$enable_shared != xno; then
LIBCUPS="libcups.so.2"
LIBCUPSIMAGE="libcupsimage.so.2"
DSO="\$(CC)"
DSOFLAGS="$DSOFLAGS -Wl,-h,\`basename \$@\` -G \$(OPTIM)"
DSOFLAGS="$DSOFLAGS -Wl,-h,\$@ -G \$(OPTIM)"
;;
HP-UX*)
LIBCUPS="libcups.sl.2"
LIBCUPSIMAGE="libcupsimage.sl.2"
DSO="\$(LD)"
DSOFLAGS="$DSOFLAGS -b -z +h \`basename \$@\`"
DSOFLAGS="$DSOFLAGS -b -z +h \$@"
;;
IRIX)
LIBCUPS="libcups.so.2"
LIBCUPSIMAGE="libcupsimage.so.2"
DSO="\$(CC)"
DSOFLAGS="$DSOFLAGS -set_version,sgi2.6,-soname,\`basename \$@\` -shared \$(OPTIM)"
DSOFLAGS="$DSOFLAGS -Wl,-rpath,\$(libdir),-set_version,sgi2.6,-soname,\$@ -shared \$(OPTIM)"
;;
OSF1* | Linux | GNU | *BSD*)
LIBCUPS="libcups.so.2"
LIBCUPSIMAGE="libcupsimage.so.2"
DSO="\$(CC)"
DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared \$(OPTIM)"
DSOFLAGS="$DSOFLAGS -Wl,-soname,\$@ -shared \$(OPTIM)"
;;
Darwin*)
LIBCUPS="libcups.2.dylib"
LIBCUPSIMAGE="libcupsimage.2.dylib"
DSO="\$(CC)"
DSOFLAGS="$DSOFLAGS -dynamiclib -single_module -lc"
DSOFLAGS="$DSOFLAGS \$(RC_CFLAGS) -dynamiclib -single_module -lc"
;;
AIX*)
LIBCUPS="libcups_s.a"
@@ -71,7 +71,7 @@ if test x$enable_shared != xno; then
LIBCUPS="libcups.so.2"
LIBCUPSIMAGE="libcupsimage.so.2"
DSO="\$(CC)"
DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared \$(OPTIM)"
DSOFLAGS="$DSOFLAGS -Wl,-soname,\$@ -shared \$(OPTIM)"
;;
esac
else
@@ -81,15 +81,8 @@ else
DSO=":"
fi
# 32-bit and 64-bit libraries need variations of the standard
# DSOFLAGS...
DSO32FLAGS="$DSOFLAGS"
DSO64FLAGS="$DSOFLAGS"
AC_SUBST(DSO)
AC_SUBST(DSOFLAGS)
AC_SUBST(DSO32FLAGS)
AC_SUBST(DSO64FLAGS)
AC_SUBST(LIBCUPS)
AC_SUBST(LIBCUPSIMAGE)
@@ -120,48 +113,34 @@ if test "$DSO" != ":"; then
DSOLIBS="\$(LIBPNG) \$(LIBTIFF) \$(LIBJPEG) \$(LIBZ)"
IMGLIBS=""
# Tell the run-time linkers where to find a DSO. Some platforms
# need this option, even when the library is installed in a
# standard location...
# The *BSD, HP-UX, and Solaris run-time linkers need help when
# deciding where to find a DSO. Add linker options to tell them
# where to find the DSO (usually in /usr/lib... duh!)
case $uname in
HP-UX*)
# HP-UX needs the path, even for /usr/lib...
DSOFLAGS="+s +b \$(libdir) $DSOFLAGS"
DSO32FLAGS="+s +b \$(LIB32DIR) $DSO32FLAGS"
DSO64FLAGS="+s +b \$(LIB64DIR) $DSO64FLAGS"
LDFLAGS="$LDFLAGS -Wl,+s,+b,\$(libdir)"
EXPORT_LDFLAGS="-Wl,+s,+b,\$(libdir)"
;;
# HP-UX
DSOFLAGS="+s +b $libdir $DSOFLAGS"
LDFLAGS="$LDFLAGS -Wl,+s,+b,$libdir"
EXPORT_LDFLAGS="-Wl,+s,+b,$libdir"
;;
SunOS*)
# 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
;;
# Solaris
DSOFLAGS="-R$libdir $DSOFLAGS"
LDFLAGS="$LDFLAGS -R$libdir"
EXPORT_LDFLAGS="-R$libdir"
;;
*BSD*)
# *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
;;
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
;;
# *BSD
DSOFLAGS="-Wl,-R$libdir $DSOFLAGS"
LDFLAGS="$LDFLAGS -Wl,-R$libdir"
EXPORT_LDFLAGS="-Wl,-R$libdir"
;;
Linux | GNU)
# Linux and HURD
DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS"
LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir"
EXPORT_LDFLAGS="-Wl,-rpath,$libdir"
;;
esac
else
DSOLIBS=""
@@ -173,5 +152,5 @@ AC_SUBST(IMGLIBS)
AC_SUBST(EXPORT_LDFLAGS)
dnl
dnl End of "$Id: cups-sharedlibs.m4 5568 2006-05-22 15:34:01Z mike $".
dnl End of "$Id: cups-sharedlibs.m4 5112 2006-02-16 04:41:59Z mike $".
dnl
+2 -2
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-slp.m4 5466 2006-04-26 19:52:27Z mike $"
dnl "$Id: cups-openslp.m4 4494 2005-02-18 02:18:11Z mike $"
dnl
dnl OpenSLP configuration stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -44,5 +44,5 @@ AC_SUBST(LIBSLP)
dnl
dnl End of "$Id: cups-slp.m4 5466 2006-04-26 19:52:27Z mike $".
dnl End of "$Id: cups-openslp.m4 4494 2005-02-18 02:18:11Z mike $".
dnl
+14 -23
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id: cups-ssl.m4 5525 2006-05-15 13:52:16Z mike $"
dnl "$Id: cups-ssl.m4 4800 2005-10-18 18:06:20Z mike $"
dnl
dnl OpenSSL/GNUTLS stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
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 Easy Software Products and are protected by Federal
@@ -36,7 +36,6 @@ AC_ARG_WITH(openssl-includes, [ --with-openssl-includes set directory for OpenS
SSLFLAGS=""
SSLLIBS=""
ENCRYPTION_REQUIRED=""
if test x$enable_ssl != xno; then
dnl Look for CDSA...
@@ -44,10 +43,6 @@ if test x$enable_ssl != xno; then
if test $uname = Darwin; then
AC_CHECK_HEADER(Security/SecureTransport.h,
[SSLLIBS="-framework CoreFoundation -framework Security"
# MacOS X doesn't (yet) come with pre-installed encryption
# certificates for CUPS, so don't enable encryption on
# /admin just yet...
#ENCRYPTION_REQUIRED=" Encryption Required"
AC_DEFINE(HAVE_SSL)
AC_DEFINE(HAVE_CDSASSL)])
fi
@@ -55,14 +50,17 @@ if test x$enable_ssl != xno; then
dnl Then look for GNU TLS...
if test "x${SSLLIBS}" = "x" -a "x${enable_gnutls}" != "xno"; then
AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config)
if test "x$LIBGNUTLSCONFIG" != x; then
SSLLIBS=`$LIBGNUTLSCONFIG --libs`
SSLFLAGS=`$LIBGNUTLSCONFIG --cflags`
ENCRYPTION_REQUIRED=" Encryption Required"
AC_DEFINE(HAVE_SSL)
AC_DEFINE(HAVE_GNUTLS)
fi
AC_CHECK_HEADER(gnutls/gnutls.h,
dnl Save the current libraries so the crypto stuff isn't always
dnl included...
SAVELIBS="$LIBS"
AC_CHECK_LIB(gnutls, gnutls_init,
[SSLLIBS="-lgnutls"
AC_DEFINE(HAVE_SSL)
AC_DEFINE(HAVE_GNUTLS)])
LIBS="$SAVELIBS")
fi
dnl Check for the OpenSSL library last...
@@ -86,7 +84,6 @@ if test x$enable_ssl != xno; then
AC_CHECK_LIB(ssl,SSL_new,
[SSLFLAGS="-DOPENSSL_DISABLE_OLD_DES_SUPPORT"
SSLLIBS="-lssl $libcrypto"
ENCRYPTION_REQUIRED=" Encryption Required"
AC_DEFINE(HAVE_SSL)
AC_DEFINE(HAVE_LIBSSL)],,
$libcrypto)
@@ -100,19 +97,13 @@ if test x$enable_ssl != xno; then
fi
fi
if test "x$SSLLIBS" != x; then
AC_MSG_RESULT([ Using SSLLIBS="$SSLLIBS"])
AC_MSG_RESULT([ Using SSLFLAGS="$SSLFLAGS"])
fi
AC_SUBST(SSLFLAGS)
AC_SUBST(SSLLIBS)
AC_SUBST(ENCRYPTION_REQUIRED)
EXPORT_SSLLIBS="$SSLLIBS"
AC_SUBST(EXPORT_SSLLIBS)
dnl
dnl End of "$Id: cups-ssl.m4 5525 2006-05-15 13:52:16Z mike $".
dnl End of "$Id: cups-ssl.m4 4800 2005-10-18 18:06:20Z mike $".
dnl
+2 -2
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-threads.m4 5466 2006-04-26 19:52:27Z mike $"
dnl "$Id$"
dnl
dnl Threading stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -53,5 +53,5 @@ fi
AC_SUBST(PTHREAD_FLAGS)
dnl
dnl End of "$Id: cups-threads.m4 5466 2006-04-26 19:52:27Z mike $".
dnl End of "$Id$".
dnl
-14
Ver Arquivo
@@ -70,13 +70,6 @@
#define CUPS_DEFAULT_IPP_PORT 631
/*
* Default printcap file...
*/
#define CUPS_DEFAULT_PRINTCAP "/etc/printcap"
/*
* Maximum number of file descriptors to support.
*/
@@ -429,13 +422,6 @@
#undef HAVE_DBUS
/*
* Do we have the AppleTalk/at_proto.h header?
*/
#undef HAVE_APPLETALK_AT_PROTO_H
#endif /* !_CUPS_CONFIG_H_ */
/*
+11 -19
Ver Arquivo
@@ -26,6 +26,7 @@ AC_INIT(cups/cups.h)
sinclude(config-scripts/cups-opsys.m4)
sinclude(config-scripts/cups-common.m4)
sinclude(config-scripts/cups-defaults.m4)
sinclude(config-scripts/cups-directories.m4)
sinclude(config-scripts/cups-manpages.m4)
@@ -42,28 +43,19 @@ sinclude(config-scripts/cups-pam.m4)
sinclude(config-scripts/cups-threads.m4)
sinclude(config-scripts/cups-largefile.m4)
sinclude(config-scripts/cups-launchd.m4)
sinclude(config-scripts/cups-defaults.m4)
sinclude(config-scripts/cups-pap.m4)
sinclude(config-scripts/cups-pdf.m4)
MAKEDEFS="../Makedefs"
AC_SUBST(MAKEDEFS)
sinclude(config-scripts/cups-scripting.m4)
LANGFILES=""
if test "x$LANGUAGES" != x; then
for lang in $LANGUAGES; do
LANGFILES="$LANGFILES doc/$lang/index.html"
LANGFILES="$LANGFILES templates/$lang/edit-config.tmpl"
LANGFILES="$LANGFILES templates/$lang/header.tmpl"
done
fi
AC_OUTPUT(Makedefs packaging/cups.list init/cups.sh init/cups-lpd cups-config
conf/cupsd.conf conf/pam.std doc/index.html
doc/help/standard.html man/client.conf.man
man/cups-deviced.man man/cups-driverd.man
man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man
man/cupsd.conf.man man/lpoptions.man
AC_OUTPUT(Makedefs packaging/cups.list init/cups.sh cups-config
conf/cupsd.conf conf/pam.std doc/index.html doc/ja/index.html
doc/help/standard.html man/client.conf.man man/cups-deviced.man
man/cups-driverd.man man/cups-lpd.man man/cupsaddsmb.man
man/cupsd.man man/cupsd.conf.man man/lpoptions.man
templates/edit-config.tmpl templates/header.tmpl
$LANGFILES)
templates/ja/header.tmpl)
chmod +x cups-config
+6 -21
Ver Arquivo
@@ -31,7 +31,6 @@ exec_prefix=@exec_prefix@
bindir=@bindir@
includedir=@includedir@
libdir=@libdir@
imagelibdir=@libdir@
datadir=@datadir@
sysconfdir=@sysconfdir@
cups_datadir=@CUPS_DATADIR@
@@ -45,27 +44,13 @@ LDFLAGS="@EXPORT_LDFLAGS@"
LIBS="@EXPORT_SSLLIBS@ @LIBS@"
IMGLIBS="@EXPORT_LIBTIFF@ @EXPORT_LIBJPEG@ @EXPORT_LIBPNG@ @EXPORT_LIBZ@"
# Check for local invocation...
selfdir=`dirname $0`
if test -f "$selfdir/cups/cups.h"; then
CFLAGS="-I$selfdir"
LDFLAGS="-L$selfdir/cups -L$selfdir/filter $LDFLAGS"
libdir="$selfdir/cups"
imagelibdir="$selfdir/filter"
if test ! -e "$selfdir/cups/raster.h"; then
ln -s ../filter/raster.h "$selfdir/cups"
fi
else
if test $includedir != /usr/include; then
CFLAGS="$CFLAGS -I$includedir"
fi
if test $libdir != /usr/lib -a $libdir != /usr/lib32 -a $libdir != /usr/lib64; then
LDFLAGS="$LDFLAGS -L$libdir"
fi
if test $includedir != /usr/include; then
CFLAGS="$CFLAGS -I$includedir"
fi
if test $libdir != /usr/lib -a $libdir != /usr/lib32; then
LDFLAGS="$LDFLAGS -L$libdir"
fi
usage ()
{
@@ -121,7 +106,7 @@ while test $# -gt 0; do
if test $image = no; then
echo $libdir/libcups.a $LIBS
else
echo $imagelibdir/libcupsimage.a $IMGLIBS $libdir/libcups.a $LIBS
echo $libdir/libcupsimage.a $IMGLIBS $libdir/libcups.a $LIBS
fi
fi
;;
+34 -195
Ver Arquivo
@@ -1,246 +1,85 @@
# DO NOT DELETE
adminutil.o: adminutil.h cups.h ipp.h http.h md5.h ppd.h array.h file.h
adminutil.o: language.h globals.h string.h ../config.h i18n.h transcode.h
adminutil.o: debug.h
adminutil.o: language.h globals.h string.h ../config.h i18n.h normalize.h
adminutil.o: transcode.h debug.h
array.o: array.h string.h ../config.h debug.h
attr.o: ppd.h array.h file.h debug.h string.h ../config.h
auth.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
auth.o: array.h file.h language.h i18n.h transcode.h debug.h
auth.o: array.h file.h language.h i18n.h normalize.h transcode.h debug.h
backchannel.o: cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
backend.o: backend.h string.h ../config.h
custom.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
custom.o: array.h file.h language.h i18n.h transcode.h debug.h
custom.o: array.h file.h language.h i18n.h normalize.h transcode.h debug.h
dest.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
dest.o: array.h file.h language.h i18n.h transcode.h
dest.o: array.h file.h language.h i18n.h normalize.h transcode.h
dir.o: dir.h string.h ../config.h debug.h
emit.o: ppd.h array.h file.h string.h ../config.h
encode.o: cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
encode.o: ipp-private.h string.h ../config.h debug.h
file.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
file.o: string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
file.o: debug.h
getifaddrs.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
file.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h string.h
file.o: ../cups/debug.h file.h
getputfile.o: cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
getputfile.o: string.h ../config.h debug.h
globals.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
globals.o: globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
globals.o: transcode.h debug.h
globals.o: normalize.h transcode.h
http.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
http.o: string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
http.o: debug.h
http.o: string.h cups.h ppd.h array.h file.h language.h i18n.h normalize.h
http.o: transcode.h debug.h
http-addr.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
http-addr.o: array.h file.h language.h i18n.h transcode.h debug.h
http-addr.o: array.h file.h language.h i18n.h normalize.h transcode.h debug.h
http-addrlist.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
http-addrlist.o: globals.h string.h cups.h ppd.h array.h file.h language.h
http-addrlist.o: i18n.h transcode.h debug.h
http-addrlist.o: i18n.h normalize.h transcode.h debug.h
http-support.o: debug.h globals.h string.h ../config.h cups.h ipp.h http.h
http-support.o: md5.h ppd.h array.h file.h language.h i18n.h transcode.h
http-support.o: md5.h ppd.h array.h file.h language.h i18n.h normalize.h
http-support.o: transcode.h
ipp.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
ipp.o: string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
ipp.o: debug.h
ipp.o: string.h cups.h ppd.h array.h file.h language.h i18n.h normalize.h
ipp.o: transcode.h debug.h
ipp-support.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
ipp-support.o: array.h file.h language.h i18n.h transcode.h debug.h
ipp-support.o: array.h file.h language.h i18n.h normalize.h transcode.h
ipp-support.o: debug.h
langprintf.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
langprintf.o: array.h file.h language.h i18n.h transcode.h
langprintf.o: array.h file.h language.h i18n.h normalize.h transcode.h
language.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
language.o: array.h file.h language.h i18n.h transcode.h debug.h
language.o: array.h file.h language.h i18n.h normalize.h transcode.h debug.h
localize.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
localize.o: array.h file.h language.h i18n.h transcode.h debug.h
localize.o: array.h file.h language.h i18n.h normalize.h transcode.h debug.h
mark.o: cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h string.h
mark.o: ../config.h debug.h
md5.o: md5.h string.h ../config.h
md5passwd.o: http.h md5.h string.h ../config.h
normalize.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
normalize.o: array.h file.h language.h i18n.h normalize.h transcode.h debug.h
notify.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
notify.o: array.h file.h language.h i18n.h transcode.h
notify.o: array.h file.h language.h i18n.h normalize.h transcode.h
options.o: cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h string.h
options.o: ../config.h debug.h
page.o: ppd.h array.h file.h string.h ../config.h
ppd.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h array.h
ppd.o: file.h language.h i18n.h transcode.h debug.h
ppd.o: file.h language.h i18n.h normalize.h transcode.h debug.h
request.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
request.o: array.h file.h language.h i18n.h transcode.h debug.h
request.o: array.h file.h language.h i18n.h normalize.h transcode.h debug.h
snprintf.o: string.h ../config.h
string.o: array.h debug.h string.h ../config.h
string.o: debug.h string.h ../config.h globals.h cups.h ipp.h http.h md5.h
string.o: ppd.h array.h file.h language.h i18n.h normalize.h transcode.h
tempfile.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
tempfile.o: array.h file.h language.h i18n.h transcode.h debug.h
tempfile.o: array.h file.h language.h i18n.h normalize.h transcode.h debug.h
transcode.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
transcode.o: array.h file.h language.h i18n.h transcode.h debug.h
transcode.o: array.h file.h language.h i18n.h normalize.h transcode.h
usersys.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
usersys.o: globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
usersys.o: transcode.h
usersys.o: normalize.h transcode.h
util.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
util.o: array.h file.h language.h i18n.h transcode.h debug.h
util.o: array.h file.h language.h i18n.h normalize.h transcode.h debug.h
testadmin.o: adminutil.h cups.h ipp.h http.h md5.h ppd.h array.h file.h
testadmin.o: language.h string.h ../config.h
testarray.o: ../cups/string.h ../config.h string.h array.h dir.h debug.h
testfile.o: string.h ../config.h file.h debug.h
testhttp.o: http.h md5.h string.h ../config.h
testi18n.o: i18n.h transcode.h language.h array.h string.h ../config.h
testi18n.o: language.h array.h string.h ../config.h transcode.h normalize.h
testipp.o: ../cups/string.h ../config.h string.h ipp.h http.h md5.h
testlang.o: i18n.h transcode.h language.h array.h
testlang.o: i18n.h language.h array.h
testppd.o: ../cups/string.h ../config.h string.h ppd.h array.h file.h
# DO NOT DELETE
adminutil.32.o: adminutil.c adminutil.h cups.h ipp.h http.h md5.h ppd.h array.h file.h
adminutil.32.o: adminutil.c language.h globals.h string.h ../config.h i18n.h transcode.h
adminutil.32.o: adminutil.c debug.h
array.32.o: array.c array.h string.h ../config.h debug.h
attr.32.o: attr.c ppd.h array.h file.h debug.h string.h ../config.h
auth.32.o: auth.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
auth.32.o: auth.c array.h file.h language.h i18n.h transcode.h debug.h
backchannel.32.o: backchannel.c cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
backend.32.o: backend.c backend.h string.h ../config.h
custom.32.o: custom.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
custom.32.o: custom.c array.h file.h language.h i18n.h transcode.h debug.h
dest.32.o: dest.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
dest.32.o: dest.c array.h file.h language.h i18n.h transcode.h
dir.32.o: dir.c dir.h string.h ../config.h debug.h
emit.32.o: emit.c ppd.h array.h file.h string.h ../config.h
encode.32.o: encode.c cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
encode.32.o: encode.c ipp-private.h string.h ../config.h debug.h
file.32.o: file.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
file.32.o: file.c string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
file.32.o: file.c debug.h
getifaddrs.32.o: getifaddrs.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
getputfile.32.o: getputfile.c cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
getputfile.32.o: getputfile.c string.h ../config.h debug.h
globals.32.o: globals.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
globals.32.o: globals.c globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
globals.32.o: globals.c transcode.h debug.h
http.32.o: http.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
http.32.o: http.c string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
http.32.o: http.c debug.h
http-addr.32.o: http-addr.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
http-addr.32.o: http-addr.c array.h file.h language.h i18n.h transcode.h debug.h
http-addrlist.32.o: http-addrlist.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
http-addrlist.32.o: http-addrlist.c globals.h string.h cups.h ppd.h array.h file.h language.h
http-addrlist.32.o: http-addrlist.c i18n.h transcode.h debug.h
http-support.32.o: http-support.c debug.h globals.h string.h ../config.h cups.h ipp.h http.h
http-support.32.o: http-support.c md5.h ppd.h array.h file.h language.h i18n.h transcode.h
ipp.32.o: ipp.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
ipp.32.o: ipp.c string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
ipp.32.o: ipp.c debug.h
ipp-support.32.o: ipp-support.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
ipp-support.32.o: ipp-support.c array.h file.h language.h i18n.h transcode.h debug.h
langprintf.32.o: langprintf.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
langprintf.32.o: langprintf.c array.h file.h language.h i18n.h transcode.h
language.32.o: language.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
language.32.o: language.c array.h file.h language.h i18n.h transcode.h debug.h
localize.32.o: localize.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
localize.32.o: localize.c array.h file.h language.h i18n.h transcode.h debug.h
mark.32.o: mark.c cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h string.h
mark.32.o: mark.c ../config.h debug.h
md5.32.o: md5.c md5.h string.h ../config.h
md5passwd.32.o: md5passwd.c http.h md5.h string.h ../config.h
notify.32.o: notify.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
notify.32.o: notify.c array.h file.h language.h i18n.h transcode.h
options.32.o: options.c cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h string.h
options.32.o: options.c ../config.h debug.h
page.32.o: page.c ppd.h array.h file.h string.h ../config.h
ppd.32.o: ppd.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h array.h
ppd.32.o: ppd.c file.h language.h i18n.h transcode.h debug.h
request.32.o: request.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
request.32.o: request.c array.h file.h language.h i18n.h transcode.h debug.h
snprintf.32.o: snprintf.c string.h ../config.h
string.32.o: string.c array.h debug.h string.h ../config.h
tempfile.32.o: tempfile.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
tempfile.32.o: tempfile.c array.h file.h language.h i18n.h transcode.h debug.h
transcode.32.o: transcode.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
transcode.32.o: transcode.c array.h file.h language.h i18n.h transcode.h debug.h
usersys.32.o: usersys.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
usersys.32.o: usersys.c globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
usersys.32.o: usersys.c transcode.h
util.32.o: util.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
util.32.o: util.c array.h file.h language.h i18n.h transcode.h debug.h
testadmin.32.o: testadmin.c adminutil.h cups.h ipp.h http.h md5.h ppd.h array.h file.h
testadmin.32.o: testadmin.c language.h string.h ../config.h
testarray.32.o: testarray.c ../cups/string.h ../config.h string.h array.h dir.h debug.h
testfile.32.o: testfile.c string.h ../config.h file.h debug.h
testhttp.32.o: testhttp.c http.h md5.h string.h ../config.h
testi18n.32.o: testi18n.c i18n.h transcode.h language.h array.h string.h ../config.h
testipp.32.o: testipp.c ../cups/string.h ../config.h string.h ipp.h http.h md5.h
testlang.32.o: testlang.c i18n.h transcode.h language.h array.h
testppd.32.o: testppd.c ../cups/string.h ../config.h string.h ppd.h array.h file.h
# DO NOT DELETE
adminutil.64.o: adminutil.c adminutil.h cups.h ipp.h http.h md5.h ppd.h array.h file.h
adminutil.64.o: adminutil.c language.h globals.h string.h ../config.h i18n.h transcode.h
adminutil.64.o: adminutil.c debug.h
array.64.o: array.c array.h string.h ../config.h debug.h
attr.64.o: attr.c ppd.h array.h file.h debug.h string.h ../config.h
auth.64.o: auth.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
auth.64.o: auth.c array.h file.h language.h i18n.h transcode.h debug.h
backchannel.64.o: backchannel.c cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
backend.64.o: backend.c backend.h string.h ../config.h
custom.64.o: custom.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
custom.64.o: custom.c array.h file.h language.h i18n.h transcode.h debug.h
dest.64.o: dest.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
dest.64.o: dest.c array.h file.h language.h i18n.h transcode.h
dir.64.o: dir.c dir.h string.h ../config.h debug.h
emit.64.o: emit.c ppd.h array.h file.h string.h ../config.h
encode.64.o: encode.c cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
encode.64.o: encode.c ipp-private.h string.h ../config.h debug.h
file.64.o: file.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
file.64.o: file.c string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
file.64.o: file.c debug.h
getifaddrs.64.o: getifaddrs.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
getputfile.64.o: getputfile.c cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
getputfile.64.o: getputfile.c string.h ../config.h debug.h
globals.64.o: globals.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
globals.64.o: globals.c globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
globals.64.o: globals.c transcode.h debug.h
http.64.o: http.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
http.64.o: http.c string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
http.64.o: http.c debug.h
http-addr.64.o: http-addr.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
http-addr.64.o: http-addr.c array.h file.h language.h i18n.h transcode.h debug.h
http-addrlist.64.o: http-addrlist.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
http-addrlist.64.o: http-addrlist.c globals.h string.h cups.h ppd.h array.h file.h language.h
http-addrlist.64.o: http-addrlist.c i18n.h transcode.h debug.h
http-support.64.o: http-support.c debug.h globals.h string.h ../config.h cups.h ipp.h http.h
http-support.64.o: http-support.c md5.h ppd.h array.h file.h language.h i18n.h transcode.h
ipp.64.o: ipp.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
ipp.64.o: ipp.c string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
ipp.64.o: ipp.c debug.h
ipp-support.64.o: ipp-support.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
ipp-support.64.o: ipp-support.c array.h file.h language.h i18n.h transcode.h debug.h
langprintf.64.o: langprintf.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
langprintf.64.o: langprintf.c array.h file.h language.h i18n.h transcode.h
language.64.o: language.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
language.64.o: language.c array.h file.h language.h i18n.h transcode.h debug.h
localize.64.o: localize.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
localize.64.o: localize.c array.h file.h language.h i18n.h transcode.h debug.h
mark.64.o: mark.c cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h string.h
mark.64.o: mark.c ../config.h debug.h
md5.64.o: md5.c md5.h string.h ../config.h
md5passwd.64.o: md5passwd.c http.h md5.h string.h ../config.h
notify.64.o: notify.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
notify.64.o: notify.c array.h file.h language.h i18n.h transcode.h
options.64.o: options.c cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h string.h
options.64.o: options.c ../config.h debug.h
page.64.o: page.c ppd.h array.h file.h string.h ../config.h
ppd.64.o: ppd.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h array.h
ppd.64.o: ppd.c file.h language.h i18n.h transcode.h debug.h
request.64.o: request.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
request.64.o: request.c array.h file.h language.h i18n.h transcode.h debug.h
snprintf.64.o: snprintf.c string.h ../config.h
string.64.o: string.c array.h debug.h string.h ../config.h
tempfile.64.o: tempfile.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
tempfile.64.o: tempfile.c array.h file.h language.h i18n.h transcode.h debug.h
transcode.64.o: transcode.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
transcode.64.o: transcode.c array.h file.h language.h i18n.h transcode.h debug.h
usersys.64.o: usersys.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
usersys.64.o: usersys.c globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
usersys.64.o: usersys.c transcode.h
util.64.o: util.c globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
util.64.o: util.c array.h file.h language.h i18n.h transcode.h debug.h
testadmin.64.o: testadmin.c adminutil.h cups.h ipp.h http.h md5.h ppd.h array.h file.h
testadmin.64.o: testadmin.c language.h string.h ../config.h
testarray.64.o: testarray.c ../cups/string.h ../config.h string.h array.h dir.h debug.h
testfile.64.o: testfile.c string.h ../config.h file.h debug.h
testhttp.64.o: testhttp.c http.h md5.h string.h ../config.h
testi18n.64.o: testi18n.c i18n.h transcode.h language.h array.h string.h ../config.h
testipp.64.o: testipp.c ../cups/string.h ../config.h string.h ipp.h http.h md5.h
testlang.64.o: testlang.c i18n.h transcode.h language.h array.h
testppd.64.o: testppd.c ../cups/string.h ../config.h string.h ppd.h array.h file.h
+15 -70
Ver Arquivo
@@ -43,7 +43,6 @@ LIBOBJS = \
emit.o \
encode.o \
file.o \
getifaddrs.o \
getputfile.o \
globals.o \
http.o \
@@ -58,6 +57,7 @@ LIBOBJS = \
mark.o \
md5.o \
md5passwd.o \
normalize.o \
notify.o \
options.o \
page.o \
@@ -69,12 +69,8 @@ LIBOBJS = \
transcode.o \
usersys.o \
util.o
LIB32OBJS = $(LIBOBJS:.o=.32.o)
LIB64OBJS = $(LIBOBJS:.o=.64.o)
OBJS = \
$(LIBOBJS) \
$(LIB32OBJS) \
$(LIB64OBJS) \
testadmin.o \
testarray.o \
testfile.o \
@@ -101,6 +97,7 @@ HEADERS = \
ipp.h \
language.h \
md5.h \
normalize.h \
ppd.h \
transcode.h
@@ -111,8 +108,6 @@ HEADERS = \
TARGETS = \
$(LIBCUPS) \
$(LIB32CUPS) \
$(LIB64CUPS) \
libcups.a \
testadmin \
testarray \
@@ -136,9 +131,7 @@ all: $(TARGETS)
#
clean:
$(RM) $(OBJS) $(TARGETS)
$(RM) libcups.so libcups.sl libcups.dylib
$(RM) -r 32bit 64it
$(RM) $(OBJS) $(TARGETS) `basename $(LIBCUPS) .2` libcups.dylib
#
@@ -146,20 +139,14 @@ clean:
#
depend:
touch Dependencies.tmp
makedepend -Y -I.. -fDependencies.tmp $(OBJS:.o=.c) >/dev/null 2>&1
$(RM) Dependencies
cp Dependencies.tmp Dependencies
sed -r -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp >>Dependencies
sed -r -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp >>Dependencies
$(RM) Dependencies.tmp
makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
#
# Install object and target files...
#
install: all installhdrs $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
install: all installhdrs $(INSTALLSTATIC)
$(INSTALL_DIR) -m 755 $(LIBDIR)
$(INSTALL_LIB) $(LIBCUPS) $(LIBDIR)
if test $(LIBCUPS) = "libcups.so.2" -o $(LIBCUPS) = "libcups.sl.2"; then \
@@ -174,8 +161,10 @@ install: all installhdrs $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
installstatic:
$(INSTALL_DIR) -m 755 $(LIBDIR)
$(INSTALL_LIB) libcups.a $(LIBDIR)
$(RANLIB) $(LIBDIR)/libcups.a
if test $(LIBCUPS) != "libcups.a"; then \
$(INSTALL_LIB) libcups.a $(LIBDIR); \
$(RANLIB) $(LIBDIR)/libcups.a; \
fi
installhdrs:
$(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
@@ -183,22 +172,12 @@ installhdrs:
$(INSTALL_DATA) $$file $(INCLUDEDIR)/cups; \
done
install32bit:
$(INSTALL_DIR) -m 755 $(LIB32DIR)
$(INSTALL_LIB) 32bit/libcups.so.2 $(LIB32DIR)/libcups.so.2
$(LN) libcups.so $(LIB32DIR)/libcups.so.2
install64bit:
$(INSTALL_DIR) -m 755 $(LIB64DIR)
$(INSTALL_LIB) 64bit/libcups.so.2 $(LIB64DIR)/libcups.so.2
$(LN) libcups.so $(LIB64DIR)/libcups.so.2
#
# Uninstall object and target files...
#
uninstall: $(UNINSTALL32) $(UNINSTALL64)
uninstall:
$(RM) $(LIBDIR)/libcups.2.dylib
$(RM) $(LIBDIR)/libcups.a
$(RM) $(LIBDIR)/libcups.dylib
@@ -213,16 +192,6 @@ uninstall: $(UNINSTALL32) $(UNINSTALL64)
done
-$(RMDIR) $(INCLUDEDIR)/cups
uninstall32bit:
$(RM) $(LIB32DIR)/libcups.so
$(RM) $(LIB32DIR)/libcups.so.2
-$(RMDIR) $(LIB32DIR)
uninstall64bit:
$(RM) $(LIB64DIR)/libcups.so
$(RM) $(LIB64DIR)/libcups.so.2
-$(RMDIR) $(LIB64DIR)
#
# libcups.so.2, libcups.sl.2
@@ -230,42 +199,18 @@ uninstall64bit:
libcups.so.2 libcups.sl.2: $(LIBOBJS)
echo Linking $@...
$(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
$(DSO) $(DSOFLAGS) -o $@ $(LIBOBJS) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
$(RM) `basename $@ .2`
$(LN) $@ `basename $@ .2`
#
# 32bit/libcups.so.2
#
32bit/libcups.so.2: $(LIB32OBJS)
echo Linking 32-bit $@...
-mkdir 32bit
$(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(LIB32OBJS) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
$(RM) 32bit/libcups.so
$(LN) libcups.so.2 32bit/libcups.so
#
# 64bit/libcups.so.2
#
64bit/libcups.so.2: $(LIB64OBJS)
echo Linking 64-bit $@...
-mkdir 64bit
$(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(LIB64OBJS) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
$(RM) 64bit/libcups.so
$(LN) libcups.so.2 64bit/libcups.so
#
# libcups.2.dylib
#
libcups.2.dylib: $(LIBOBJS)
echo Linking $@...
$(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
$(DSO) $(DSOFLAGS) -o $@ \
-install_name $(libdir)/$@ \
-current_version 2.7.0 \
-compatibility_version 2.0.0 \
@@ -278,7 +223,7 @@ libcups.2.dylib: $(LIBOBJS)
# libcups_s.a
#
libcups_s.a: $(LIBOBJS) libcups_s.exp
libcups_s.a: $(LIBOBJS)
echo Creating $@...
$(DSO) $(DSOFLAGS) -Wl,-bexport:libcups_s.exp -o libcups_s.o $(LIBOBJS) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) -lm
$(RM) $@
@@ -291,7 +236,7 @@ libcups_s.a: $(LIBOBJS) libcups_s.exp
libcups.la: $(LIBOBJS)
echo Linking $@...
$(CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) -rpath $(LIBDIR) \
$(CC) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) -rpath $(LIBDIR) \
-version-info 2:7 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
@@ -429,7 +374,7 @@ apihelp:
file.h file.c dir.h dir.c >../doc/help/api-filedir.html
mxmldoc --section "Programming" --title "PPD API" \
--intro api-ppd.shtml \
ppd.h attr.c custom.c emit.c localize.c mark.c page.c \
ppd.h attr.c emit.c mark.c page.c \
ppd.c >../doc/help/api-ppd.html
mxmldoc --section "Programming" --title "HTTP and IPP APIs" \
--intro api-httpipp.shtml \
+1 -1
Ver Arquivo
@@ -168,7 +168,7 @@ cupsAdminCreateWindowsPPD(
* Create a temporary output file using the destination buffer...
*/
if ((dstfp = cupsTempFile2(buffer, bufsize)) == NULL)
if ((dstfp = cupsTempFile2(buffer, bufsize)) < 0)
{
cupsFileClose(srcfp);
+19 -39
Ver Arquivo
@@ -25,27 +25,24 @@
*
* Contents:
*
* cupsArrayAdd() - Add an element to the array.
* cupsArrayClear() - Clear the array.
* cupsArrayCount() - Get the number of elements in the array.
* cupsArrayCurrent() - Return the current element in the array.
* cupsArrayDelete() - Free all memory used by the array.
* cupsArrayDup() - Duplicate the array.
* cupsArrayFind() - Find an element in the array.
* cupsArrayFirst() - Get the first element in the array.
* cupsArrayIndex() - Get the N-th element in the array.
* cupsArrayInsert() - Insert an element in the array.
* cupsArrayLast() - Get the last element in the array.
* cupsArrayNew() - Create a new array.
* cupsArrayNext() - Get the next element in the array.
* cupsArrayPrev() - Get the previous element in the array.
* cupsArrayRemove() - Remove an element from the array.
* cupsArrayRestore() - Reset the current element to the last cupsArraySave.
* cupsArraySave() - Mark the current element for a later
* cupsArrayRestore.
* cupsArrayUserData() - Return the user data for an array.
* cups_array_add() - Insert or append an element to the array...
* cups_array_find() - Find an element in the array...
* cupsArrayAdd() - Add an element to the array.
* cupsArrayClear() - Clear the array.
* cupsArrayCount() - Get the number of elements in the array.
* cupsArrayCurrent() - Return the current element in the array.
* cupsArrayDelete() - Free all memory used by the array.
* cupsArrayDup() - Duplicate the array.
* cupsArrayFind() - Find an element in the array.
* cupsArrayFirst() - Get the first element in the array.
* cupsArrayIndex() - Get the N-th element in the array.
* cupsArrayInsert() - Insert an element in the array.
* cupsArrayLast() - Get the last element in the array.
* cupsArrayNew() - Create a new array.
* cupsArrayNext() - Get the next element in the array.
* cupsArrayPrev() - Get the previous element in the array.
* cupsArrayRemove() - Remove an element from the array.
* cupsArrayRestore() - Reset the current element to the last cupsArraySave.
* cupsArraySave() - Mark the current element for a later cupsArrayRestore.
* cups_array_find() - Find an element in the array...
*/
/*
@@ -641,20 +638,6 @@ cupsArraySave(cups_array_t *a) /* I - Array */
}
/*
* 'cupsArrayUserData()' - Return the user data for an array.
*/
void * /* O - User data */
cupsArrayUserData(cups_array_t *a) /* I - Array */
{
if (a)
return (a->data);
else
return (NULL);
}
/*
* 'cups_array_add()' - Insert or append an element to the array...
*/
@@ -939,14 +922,11 @@ cups_array_find(cups_array_t *a, /* I - Array */
DEBUG_puts("cups_array_find: linear search");
diff = 1;
diff = 0;
for (current = 0; current < a->num_elements; current ++)
if (a->elements[current] == e)
{
diff = 0;
break;
}
}
/*
-1
Ver Arquivo
@@ -73,7 +73,6 @@ extern void *cupsArrayPrev(cups_array_t *a);
extern int cupsArrayRemove(cups_array_t *a, void *e);
extern void *cupsArrayRestore(cups_array_t *a);
extern int cupsArraySave(cups_array_t *a);
extern void *cupsArrayUserData(cups_array_t *a);
# ifdef __cplusplus
}
+3 -7
Ver Arquivo
@@ -92,13 +92,9 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
* See if we can do local authentication...
*/
if (http->digest_tries < 3 && !cups_local_auth(http))
if (!cups_local_auth(http))
{
DEBUG_printf(("cupsDoAuthentication: authstring=\"%s\"\n", http->authstring));
if (http->status == HTTP_UNAUTHORIZED)
http->digest_tries ++;
return (0);
}
@@ -112,8 +108,8 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
* Nope - get a new password from the user...
*/
snprintf(prompt, sizeof(prompt), _("Password for %s on %s? "), cupsUser(),
http->hostname[0] == '/' ? "localhost" : http->hostname);
snprintf(prompt, sizeof(prompt), "Password for %s on %s? ", cupsUser(),
http->hostname);
http->digest_tries = strncasecmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE],
"Digest", 5) != 0;
+1 -1
Ver Arquivo
@@ -161,7 +161,7 @@ cupsBackChannelWrite(
* Write error - abort on fatal errors...
*/
if (errno != EINTR)
if (errno != EINTR && errno != EAGAIN)
return (-1);
}
else
-12
Ver Arquivo
@@ -34,10 +34,6 @@
*
* Contents:
*
* ppdFindCustomOption() - Find a custom option.
* ppdFindCustomParam() - Find a parameter for a custom option.
* ppdFirstCustomParam() - Return the first parameter for a custom option.
* ppdNextCustomParam() - Return the next parameter for a custom option.
*/
/*
@@ -50,8 +46,6 @@
/*
* 'ppdFindCustomOption()' - Find a custom option.
*
* @since CUPS 1.2@
*/
ppd_coption_t * /* O - Custom option or NULL */
@@ -71,8 +65,6 @@ ppdFindCustomOption(ppd_file_t *ppd, /* I - PPD file */
/*
* 'ppdFindCustomParam()' - Find a parameter for a custom option.
*
* @since CUPS 1.2@
*/
ppd_cparam_t * /* O - Custom parameter or NULL */
@@ -92,8 +84,6 @@ ppdFindCustomParam(ppd_coption_t *opt, /* I - Custom option */
/*
* 'ppdFirstCustomParam()' - Return the first parameter for a custom option.
*
* @since CUPS 1.2@
*/
ppd_cparam_t * /* O - Custom parameter or NULL */
@@ -108,8 +98,6 @@ ppdFirstCustomParam(ppd_coption_t *opt) /* I - Custom option */
/*
* 'ppdNextCustomParam()' - Return the next parameter for a custom option.
*
* @since CUPS 1.2@
*/
ppd_cparam_t * /* O - Custom parameter or NULL */
-10
Ver Arquivo
@@ -531,16 +531,6 @@ cupsSetDests2(http_t *http, /* I - HTTP connection */
return (-1);
}
#ifndef WIN32
/*
* Set the permissions to 0644 when saving to the /etc/cups/lpoptions
* file...
*/
if (!getuid())
fchmod(fileno(fp), 0644);
#endif /* !WIN32 */
/*
* Write each printer; each line looks like:
*
+7 -7
Ver Arquivo
@@ -527,7 +527,7 @@ ppdEmitString(ppd_file_t *ppd, /* I - PPD file record */
!strcasecmp(choices[i]->option->keyword, "PageRegion")) &&
!strcasecmp(choices[i]->choice, "Custom"))
{
bufsize += 37; /* %%BeginFeature: *CustomPageSize True\n */
bufsize += 37; /* %%BeginFeature: *CustomPageSize True */
bufsize += 50; /* Five 9-digit numbers + newline */
}
else if (!strcasecmp(choices[i]->choice, "Custom") &&
@@ -535,8 +535,8 @@ ppdEmitString(ppd_file_t *ppd, /* I - PPD file record */
choices[i]->option->keyword))
!= NULL)
{
bufsize += 17 + strlen(choices[i]->option->keyword) + 6;
/* %%BeginFeature: *keyword True\n */
bufsize += 23 + strlen(choices[i]->option->keyword);
/* %%BeginFeature: *keyword True */
for (cparam = (ppd_cparam_t *)cupsArrayFirst(coption->params);
@@ -562,16 +562,16 @@ ppdEmitString(ppd_file_t *ppd, /* I - PPD file record */
}
}
else
bufsize += 17 + strlen(choices[i]->option->keyword) + 1 +
strlen(choices[i]->choice) + 1;
/* %%BeginFeature: *keyword choice\n */
bufsize += 19 + strlen(choices[i]->option->keyword) +
strlen(choices[i]->choice);
/* %%BeginFeature: *keyword choice */
bufsize += 13; /* %%EndFeature\n */
bufsize += 22; /* } stopped cleartomark\n */
}
if (choices[i]->code)
bufsize += strlen(choices[i]->code) + 1;
bufsize += strlen(choices[i]->code);
else
bufsize += strlen(ppd_custom_code);
}
+3 -10
Ver Arquivo
@@ -114,13 +114,11 @@ static const _ipp_option_t ipp_options[] =
{ "ppi-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ "prettyprint", IPP_TAG_BOOLEAN, IPP_TAG_JOB },
{ "prettyprint-default", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
{ "printer-error-policy", IPP_TAG_NAME, IPP_TAG_PRINTER },
{ "printer-info", IPP_TAG_TEXT, IPP_TAG_PRINTER },
{ "printer-is-accepting-jobs",IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
{ "printer-is-shared", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
{ "printer-make-and-model", IPP_TAG_TEXT, IPP_TAG_PRINTER },
{ "printer-more-info", IPP_TAG_URI, IPP_TAG_PRINTER },
{ "printer-op-policy", IPP_TAG_NAME, IPP_TAG_PRINTER },
{ "printer-resolution", IPP_TAG_RESOLUTION, IPP_TAG_JOB },
{ "printer-state", IPP_TAG_ENUM, IPP_TAG_PRINTER },
{ "printer-state-change-time",IPP_TAG_INTEGER, IPP_TAG_PRINTER },
@@ -133,8 +131,6 @@ static const _ipp_option_t ipp_options[] =
{ "raw", IPP_TAG_MIMETYPE, IPP_TAG_OPERATION },
{ "resolution", IPP_TAG_RESOLUTION, IPP_TAG_JOB },
{ "resolution-default", IPP_TAG_RESOLUTION, IPP_TAG_PRINTER },
{ "requesting-user-name-allowed", IPP_TAG_NAME, IPP_TAG_PRINTER },
{ "requesting-user-name-denied", IPP_TAG_NAME, IPP_TAG_PRINTER },
{ "saturation", IPP_TAG_INTEGER, IPP_TAG_JOB },
{ "saturation-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ "scaling", IPP_TAG_INTEGER, IPP_TAG_JOB },
@@ -366,7 +362,7 @@ cupsEncodeOptions2(
* Copy the name over...
*/
if ((attr->name = _cupsStrAlloc(option->name)) == NULL)
if ((attr->name = strdup(option->name)) == NULL)
{
/*
* Ran out of memory!
@@ -517,14 +513,14 @@ cupsEncodeOptions2(
*/
attr->values[j].unknown.length = strlen(val);
attr->values[j].unknown.data = _cupsStrAlloc(val);
attr->values[j].unknown.data = strdup(val);
DEBUG_printf(("cupsEncodeOptions2: Added octet-string value \"%s\"...\n",
attr->values[j].unknown.data));
break;
default :
if ((attr->values[j].string.text = _cupsStrAlloc(val)) == NULL)
if ((attr->values[j].string.text = strdup(val)) == NULL)
{
/*
* Ran out of memory!
@@ -539,9 +535,6 @@ cupsEncodeOptions2(
break;
}
}
if (copy)
free(copy);
}
}
+17 -273
Ver Arquivo
@@ -35,12 +35,9 @@
* cupsFileFlush() - Flush pending output.
* cupsFileGetChar() - Get a single character from a file.
* cupsFileGetConf() - Get a line from a configuration file...
* cupsFileGetLine() - Get a CR and/or LF-terminated line that may
* contain binary data.
* cupsFileGets() - Get a CR and/or LF-terminated line.
* cupsFileLock() - Temporarily lock access to a file.
* cupsFileNumber() - Return the file descriptor associated with a CUPS
* file.
* cupsFileNumber() - Return the file descriptor associated with a CUPS file.
* cupsFileOpen() - Open a CUPS file.
* cupsFileOpenFd() - Open a CUPS file using a file descriptor.
* cupsFilePeekChar() - Peek at the next character from a file.
@@ -50,9 +47,6 @@
* cupsFileRead() - Read from a file.
* cupsFileRewind() - Rewind a file.
* cupsFileSeek() - Seek in a file.
* cupsFileStderr() - Return a CUPS file associated with stderr.
* cupsFileStdin() - Return a CUPS file associated with stdin.
* cupsFileStdout() - Return a CUPS file associated with stdout.
* cupsFileTell() - Return the current file position.
* cupsFileUnlock() - Unlock access to a file.
* cupsFileWrite() - Write to a file.
@@ -69,13 +63,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "http-private.h"
#include "string.h"
#include <errno.h>
#include <cups/debug.h>
#include <sys/types.h>
#include <fcntl.h>
#include "http-private.h"
#include "globals.h"
#include "debug.h"
#include "file.h"
#ifdef HAVE_LIBZ
# include <zlib.h>
#endif /* HAVE_LIBZ */
@@ -104,7 +99,6 @@ struct _cups_file_s /**** CUPS file structure... ****/
int fd; /* File descriptor */
char mode, /* Mode ('r' or 'w') */
compressed, /* Compression used? */
is_stdio, /* stdin/out/err? */
eof, /* End of file? */
buf[4096], /* Buffer */
*ptr, /* Pointer into buffer */
@@ -141,7 +135,6 @@ cupsFileClose(cups_file_t *fp) /* I - CUPS file */
int fd; /* File descriptor */
char mode; /* Open mode */
int status; /* Return status */
int is_stdio; /* Is a stdio file? */
DEBUG_printf(("cupsFileClose(fp=%p)\n", fp));
@@ -233,9 +226,8 @@ cupsFileClose(cups_file_t *fp) /* I - CUPS file */
* Save the file descriptor we used and free memory...
*/
fd = fp->fd;
mode = fp->mode;
is_stdio = fp->is_stdio;
fd = fp->fd;
mode = fp->mode;
free(fp);
@@ -248,7 +240,7 @@ cupsFileClose(cups_file_t *fp) /* I - CUPS file */
if (closesocket(fd) < 0)
status = -1;
}
else if (!is_stdio)
else
{
if (close(fd) < 0)
status = -1;
@@ -265,7 +257,7 @@ cupsFileClose(cups_file_t *fp) /* I - CUPS file */
int /* O - CUPS_FILE_NONE or CUPS_FILE_GZIP */
cupsFileCompression(cups_file_t *fp) /* I - CUPS file */
{
return (fp ? fp->compressed : CUPS_FILE_NONE);
return (fp->compressed);
}
@@ -276,7 +268,7 @@ cupsFileCompression(cups_file_t *fp) /* I - CUPS file */
int /* O - 1 on EOF, 0 otherwise */
cupsFileEOF(cups_file_t *fp) /* I - CUPS file */
{
return (fp ? fp->eof : 1);
return (fp->eof);
}
@@ -568,76 +560,6 @@ cupsFileGetConf(cups_file_t *fp, /* I - CUPS file */
}
/*
* 'cupsFileGetLine()' - Get a CR and/or LF-terminated line that may
* contain binary data.
*
* This function differs from cupsFileGets() in that the trailing CR and LF
* are preserved, as is any binary data on the line. The buffer is nul-
* terminated, however you should use the returned length to determine
* the number of bytes on the line.
*/
size_t /* O - Number of bytes on line or 0 on EOF */
cupsFileGetLine(cups_file_t *fp, /* I - File to read from */
char *buf, /* I - Buffer */
size_t buflen) /* I - Size of buffer */
{
int ch; /* Character from file */
char *ptr, /* Current position in line buffer */
*end; /* End of line buffer */
/*
* Range check input...
*/
if (!fp || (fp->mode != 'r' && fp->mode != 's') || !buf || buflen < 3)
return (0);
/*
* Now loop until we have a valid line...
*/
for (ptr = buf, end = buf + buflen - 2; ptr < end ;)
{
if (fp->ptr >= fp->end)
if (cups_fill(fp) <= 0)
break;
*ptr++ = ch = *(fp->ptr)++;
if (ch == '\r')
{
/*
* Check for CR LF...
*/
if (fp->ptr >= fp->end)
if (cups_fill(fp) <= 0)
break;
if (*(fp->ptr) == '\n')
*ptr++ = *(fp->ptr)++;
break;
}
else if (ch == '\n')
{
/*
* Line feed ends a line...
*/
break;
}
}
*ptr = '\0';
return (ptr - buf);
}
/*
* 'cupsFileGets()' - Get a CR and/or LF-terminated line.
*/
@@ -1217,51 +1139,7 @@ cupsFileRead(cups_file_t *fp, /* I - CUPS file */
off_t /* O - New file position or -1 */
cupsFileRewind(cups_file_t *fp) /* I - CUPS file */
{
/*
* Range check input...
*/
if (!fp || fp->mode != 'r')
return (-1);
/*
* Handle special cases...
*/
if (fp->pos == 0)
{
/*
* No seeking necessary...
*/
if (fp->ptr)
{
fp->ptr = fp->buf;
fp->eof = 0;
}
return (0);
}
/*
* Otherwise, seek in the file and cleanup any compression buffers...
*/
#ifdef HAVE_LIBZ
if (fp->compressed)
{
inflateEnd(&fp->stream);
fp->compressed = 0;
}
#endif /* HAVE_LIBZ */
lseek(fp->fd, 0, SEEK_SET);
fp->pos = 0;
fp->ptr = NULL;
fp->end = NULL;
return (0);
return (cupsFileSeek(fp, 0L));
}
@@ -1287,13 +1165,6 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */
if (!fp || pos < 0 || fp->mode != 'r')
return (-1);
/*
* Handle special cases...
*/
if (pos == 0)
return (cupsFileRewind(fp));
if (fp->pos == pos)
{
/*
@@ -1309,40 +1180,20 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */
return (pos);
}
#ifdef HAVE_LIBZ
if (!fp->compressed && !fp->ptr)
{
/*
* Preload a buffer to determine whether the file is compressed...
*/
if (cups_fill(fp) < 0)
return (-1);
}
#endif /* HAVE_LIBZ */
/*
* Figure out the number of bytes in the current buffer, and then
* see if we are outside of it...
*/
if (fp->ptr)
bytes = fp->end - fp->buf;
else
bytes = 0;
bytes = fp->end - fp->buf;
fp->eof = 0;
DEBUG_printf((" bytes=" CUPS_LLFMT "\n", CUPS_LLCAST bytes));
if (pos < fp->pos)
{
/*
* Need to seek backwards...
*/
DEBUG_puts(" SEEK BACKWARDS");
#ifdef HAVE_LIBZ
if (fp->compressed)
{
@@ -1359,17 +1210,14 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */
if (bytes <= 0)
return (-1);
fp->ptr = fp->buf + pos - fp->pos;
}
else
#endif /* HAVE_LIBZ */
{
fp->pos = lseek(fp->fd, pos, SEEK_SET);
DEBUG_printf((" lseek() returned %ld...\n", (long)fp->pos));
fp->ptr = NULL;
fp->end = NULL;
DEBUG_printf((" lseek() returned %ld...\n", (long)fp->pos));
}
}
else if (pos >= (fp->pos + bytes))
@@ -1378,30 +1226,23 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */
* Need to seek forwards...
*/
DEBUG_puts(" SEEK FORWARDS");
#ifdef HAVE_LIBZ
if (fp->compressed)
if (fp->compressed || !fp->ptr)
{
while ((bytes = cups_fill(fp)) > 0)
{
if (pos >= fp->pos && pos < (fp->pos + bytes))
break;
}
if (bytes <= 0)
return (-1);
fp->ptr = fp->buf + pos - fp->pos;
}
else
#endif /* HAVE_LIBZ */
{
fp->pos = lseek(fp->fd, pos, SEEK_SET);
DEBUG_printf((" lseek() returned " CUPS_LLFMT "...\n", fp->pos));
fp->ptr = NULL;
fp->end = NULL;
DEBUG_printf((" lseek() returned " CUPS_LLFMT "...\n", fp->pos));
}
}
else
@@ -1411,111 +1252,14 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */
* range...
*/
DEBUG_puts(" SEEK INSIDE BUFFER");
fp->ptr = fp->buf + pos - fp->pos;
DEBUG_puts((" seek inside buffer..."));
}
return (fp->pos);
}
/*
* 'cupsFileStderr()' - Return a CUPS file associated with stderr.
*/
cups_file_t *
cupsFileStderr(void)
{
_cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals... */
/*
* Open file descriptor 2 as needed...
*/
if (!cg->stdio_files[2])
{
/*
* Flush any pending output on the stdio file...
*/
fflush(stderr);
/*
* Open file descriptor 2...
*/
if ((cg->stdio_files[2] = cupsFileOpenFd(2, "w")) != NULL)
cg->stdio_files[2]->is_stdio = 1;
}
return (cg->stdio_files[2]);
}
/*
* 'cupsFileStdin()' - Return a CUPS file associated with stdin.
*/
cups_file_t *
cupsFileStdin(void)
{
_cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals... */
/*
* Open file descriptor 0 as needed...
*/
if (!cg->stdio_files[0])
{
/*
* Open file descriptor 0...
*/
if ((cg->stdio_files[0] = cupsFileOpenFd(0, "r")) != NULL)
cg->stdio_files[0]->is_stdio = 1;
}
return (cg->stdio_files[0]);
}
/*
* 'cupsFileStdout()' - Return a CUPS file associated with stdout.
*/
cups_file_t *
cupsFileStdout(void)
{
_cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals... */
/*
* Open file descriptor 1 as needed...
*/
if (!cg->stdio_files[1])
{
/*
* Flush any pending output on the stdio file...
*/
fflush(stdout);
/*
* Open file descriptor 1...
*/
if ((cg->stdio_files[1] = cupsFileOpenFd(1, "w")) != NULL)
cg->stdio_files[1]->is_stdio = 1;
}
return (cg->stdio_files[1]);
}
/*
* 'cupsFileTell()' - Return the current file position.
*/
@@ -1523,7 +1267,7 @@ cupsFileStdout(void)
off_t /* O - File position */
cupsFileTell(cups_file_t *fp) /* I - CUPS file */
{
return (fp ? fp->pos : 0);
return (fp->pos);
}
-5
Ver Arquivo
@@ -81,8 +81,6 @@ extern int cupsFileFlush(cups_file_t *fp);
extern int cupsFileGetChar(cups_file_t *fp);
extern char *cupsFileGetConf(cups_file_t *fp, char *buf, size_t buflen,
char **value, int *linenum);
extern size_t cupsFileGetLine(cups_file_t *fp, char *buf,
size_t buflen);
extern char *cupsFileGets(cups_file_t *fp, char *buf, size_t buflen);
extern int cupsFileLock(cups_file_t *fp, int block);
extern int cupsFileNumber(cups_file_t *fp);
@@ -95,9 +93,6 @@ extern int cupsFilePuts(cups_file_t *fp, const char *s);
extern ssize_t cupsFileRead(cups_file_t *fp, char *buf, size_t bytes);
extern off_t cupsFileRewind(cups_file_t *fp);
extern off_t cupsFileSeek(cups_file_t *fp, off_t pos);
extern cups_file_t *cupsFileStderr(void);
extern cups_file_t *cupsFileStdin(void);
extern cups_file_t *cupsFileStdout(void);
extern off_t cupsFileTell(cups_file_t *fp);
extern int cupsFileUnlock(cups_file_t *fp);
extern ssize_t cupsFileWrite(cups_file_t *fp, const char *buf, size_t bytes);
-276
Ver Arquivo
@@ -1,276 +0,0 @@
/*
* "$Id$"
*
* Network interface functions for the Common UNIX Printing System
* (CUPS) scheduler.
*
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
* copyright law. Distribution and use rights are outlined in the file
* "LICENSE" which should have been included with this file. If this
* file is missing or damaged please contact Easy Software Products
* at:
*
* Attn: CUPS Licensing Information
* Easy Software Products
* 44141 Airport View Drive, Suite 204
* Hollywood, Maryland 20636 USA
*
* Voice: (301) 373-9600
* EMail: cups-info@cups.org
* WWW: http://www.cups.org
*
* Contents:
*
* _cups_getifaddrs() - Get a list of network interfaces on the system.
* _cups_freeifaddrs() - Free an interface list...
*/
/*
* Include necessary headers.
*/
#include "http-private.h"
#ifndef HAVE_GETIFADDRS
/*
* '_cups_getifaddrs()' - Get a list of network interfaces on the system.
*/
int /* O - 0 on success, -1 on error */
_cups_getifaddrs(struct ifaddrs **addrs)/* O - List of interfaces */
{
int sock; /* Socket */
char buffer[65536], /* Buffer for address info */
*bufptr, /* Pointer into buffer */
*bufend; /* End of buffer */
struct ifconf conf; /* Interface configurations */
struct sockaddr addr; /* Address data */
struct ifreq *ifp; /* Interface data */
int ifpsize; /* Size of interface data */
struct ifaddrs *temp; /* Pointer to current interface */
struct ifreq request; /* Interface request */
/*
* Start with an empty list...
*/
if (addrs == NULL)
return (-1);
*addrs = NULL;
/*
* Create a UDP socket to get the interface data...
*/
memset (&addr, 0, sizeof(addr));
if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
return (-1);
/*
* Try to get the list of interfaces...
*/
conf.ifc_len = sizeof(buffer);
conf.ifc_buf = buffer;
if (ioctl(sock, SIOCGIFCONF, &conf) < 0)
{
/*
* Couldn't get the list of interfaces...
*/
close(sock);
return (-1);
}
/*
* OK, got the list of interfaces, now lets step through the
* buffer to pull them out...
*/
# ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
# define sockaddr_len(a) ((a)->sa_len)
# else
# define sockaddr_len(a) (sizeof(struct sockaddr))
# endif /* HAVE_STRUCT_SOCKADDR_SA_LEN */
for (bufptr = buffer, bufend = buffer + conf.ifc_len;
bufptr < bufend;
bufptr += ifpsize)
{
/*
* Get the current interface information...
*/
ifp = (struct ifreq *)bufptr;
ifpsize = sizeof(ifp->ifr_name) + sockaddr_len(&(ifp->ifr_addr));
if (ifpsize < sizeof(struct ifreq))
ifpsize = sizeof(struct ifreq);
memset(&request, 0, sizeof(request));
memcpy(request.ifr_name, ifp->ifr_name, sizeof(ifp->ifr_name));
/*
* Check the status of the interface...
*/
if (ioctl(sock, SIOCGIFFLAGS, &request) < 0)
continue;
/*
* Allocate memory for a single interface record...
*/
if ((temp = calloc(1, sizeof(struct ifaddrs))) == NULL)
{
/*
* Unable to allocate memory...
*/
close(sock);
return (-1);
}
/*
* Add this record to the front of the list and copy the name, flags,
* and network address...
*/
temp->ifa_next = *addrs;
*addrs = temp;
temp->ifa_name = strdup(ifp->ifr_name);
temp->ifa_flags = request.ifr_flags;
if ((temp->ifa_addr = calloc(1, sockaddr_len(&(ifp->ifr_addr)))) != NULL)
memcpy(temp->ifa_addr, &(ifp->ifr_addr), sockaddr_len(&(ifp->ifr_addr)));
/*
* Try to get the netmask for the interface...
*/
if (!ioctl(sock, SIOCGIFNETMASK, &request))
{
/*
* Got it, make a copy...
*/
if ((temp->ifa_netmask = calloc(1, sizeof(request.ifr_netmask))) != NULL)
memcpy(temp->ifa_netmask, &(request.ifr_netmask),
sizeof(request.ifr_netmask));
}
/*
* Then get the broadcast or point-to-point (destination) address,
* if applicable...
*/
if (temp->ifa_flags & IFF_BROADCAST)
{
/*
* Have a broadcast address, so get it!
*/
if (!ioctl(sock, SIOCGIFBRDADDR, &request))
{
/*
* Got it, make a copy...
*/
if ((temp->ifa_broadaddr =
calloc(1, sizeof(request.ifr_broadaddr))) != NULL)
memcpy(temp->ifa_broadaddr, &(request.ifr_broadaddr),
sizeof(request.ifr_broadaddr));
}
}
else if (temp->ifa_flags & IFF_POINTOPOINT)
{
/*
* Point-to-point interface; grab the remote address...
*/
if (!ioctl(sock, SIOCGIFDSTADDR, &request))
{
temp->ifa_dstaddr = malloc(sizeof(request.ifr_dstaddr));
memcpy(temp->ifa_dstaddr, &(request.ifr_dstaddr),
sizeof(request.ifr_dstaddr));
}
}
}
/*
* OK, we're done with the socket, close it and return 0...
*/
close(sock);
return (0);
}
/*
* '_cups_freeifaddrs()' - Free an interface list...
*/
void
_cups_freeifaddrs(struct ifaddrs *addrs)/* I - Interface list to free */
{
struct ifaddrs *next; /* Next interface in list */
while (addrs != NULL)
{
/*
* Make a copy of the next interface pointer...
*/
next = addrs->ifa_next;
/*
* Free data values as needed...
*/
if (addrs->ifa_name)
{
free(addrs->ifa_name);
addrs->ifa_name = NULL;
}
if (addrs->ifa_addr)
{
free(addrs->ifa_addr);
addrs->ifa_addr = NULL;
}
if (addrs->ifa_netmask)
{
free(addrs->ifa_netmask);
addrs->ifa_netmask = NULL;
}
if (addrs->ifa_dstaddr)
{
free(addrs->ifa_dstaddr);
addrs->ifa_dstaddr = NULL;
}
/*
* Free this node and continue to the next...
*/
free(addrs);
addrs = next;
}
}
#endif /* !HAVE_GETIFADDRS */
/*
* End of "$Id$".
*/
+6 -19
Ver Arquivo
@@ -37,7 +37,6 @@
#include "http-private.h"
#include "globals.h"
#include "debug.h"
#include <stdlib.h>
@@ -102,8 +101,6 @@ _cupsGlobals(void)
* Initialize the global data exactly once...
*/
DEBUG_printf(("_cupsGlobals(): globals_key_once=%d\n", globals_key_once));
pthread_once(&globals_key_once, globals_init);
/*
@@ -112,8 +109,6 @@ _cupsGlobals(void)
if ((globals = (_cups_globals_t *)pthread_getspecific(globals_key)) == NULL)
{
DEBUG_puts("_cupsGlobals: allocating memory for thread...");
/*
* No, allocate memory as set the pointer for the key...
*/
@@ -121,8 +116,6 @@ _cupsGlobals(void)
globals = calloc(1, sizeof(_cups_globals_t));
pthread_setspecific(globals_key, globals);
DEBUG_printf((" globals=%p\n", globals));
/*
* Initialize variables that have non-zero values
*/
@@ -149,9 +142,6 @@ static void
globals_init()
{
pthread_key_create(&globals_key, globals_destructor);
DEBUG_printf(("globals_init(): globals_key=%x(%u)\n", globals_key,
globals_key));
}
@@ -162,21 +152,18 @@ globals_init()
static void
globals_destructor(void *value) /* I - Data to free */
{
int i; /* Looping var */
_cups_globals_t *cg; /* Global data */
DEBUG_printf(("globals_destructor(value=%p)\n", value));
cg = (_cups_globals_t *)value;
httpClose(cg->http);
if (cg->http)
httpClose(cg->http);
for (i = 0; i < 3; i ++)
cupsFileClose(cg->stdio_files[i]);
if (cg->last_status_message)
free(cg->last_status_message);
_cupsStrFlush(cg);
_cupsLangFlush(cg);
_cupsCharmapFlush(cg);
_cupsNormalizeMapsFlush(cg);
cupsFreeOptions(cg->cupsd_num_settings, cg->cupsd_settings);
+21 -3
Ver Arquivo
@@ -34,6 +34,8 @@
# include "string.h"
# include "cups.h"
# include "i18n.h"
# include "normalize.h"
# include "transcode.h"
# ifdef HAVE_PTHREAD_H
# include <pthread.h>
@@ -72,9 +74,6 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
/* Number of server settings */
cups_option_t *cupsd_settings;/* Server settings */
/* file.c */
cups_file_t *stdio_files[3];/* stdin, stdout, stderr */
/* http.c */
char http_date[256]; /* Date+time buffer */
@@ -94,7 +93,15 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
char ipp_unknown[255];
/* Unknown error statuses */
/* normalize.c */
_cups_norm_map_t *normmap_cache; /* Normalize Map cache */
_cups_fold_map_t *foldmap_cache; /* Case Fold cache */
_cups_prop_map_t *propmap_cache; /* Char Prop Map Cache */
_cups_comb_map_t *combmap_cache; /* Comb Class Map Cache */
_cups_break_map_t *breakmap_cache;/* Line Break Map Cache */
/* language.c */
cups_lang_t *lang_cache; /* Language string cache */
cups_lang_t *lang_default; /* Default language */
# ifdef __APPLE__
# ifdef HAVE_CF_LOCALE_ID
@@ -112,6 +119,10 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
/* tempfile.c */
char tempfile[1024]; /* cupsTempFd/File buffer */
/* transcode.c */
_cups_cmap_t *cmap_cache; /* SBCS Charmap Cache */
_cups_vmap_t *vmap_cache; /* VBCS Charmap Cache */
/* usersys.c */
http_encryption_t encryption; /* Encryption setting */
char user[65], /* User name */
@@ -129,6 +140,9 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
/* Default printer */
char ppd_filename[HTTP_MAX_URI];
/* PPD filename */
/* string.c */
cups_array_t *stringpool; /* String pool */
} _cups_globals_t;
@@ -138,7 +152,11 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
extern const char *_cupsGetPassword(const char *prompt);
extern _cups_globals_t *_cupsGlobals(void);
extern void _cupsLangFlush(_cups_globals_t *cg);
extern void _cupsCharmapFlush(_cups_globals_t *cg);
extern void _cupsNormalizeMapsFlush(_cups_globals_t *cg);
extern void _cupsSetError(ipp_status_t status, const char *message);
extern void _cupsStrFlush(_cups_globals_t *cg);
/*
+2 -21
Ver Arquivo
@@ -52,9 +52,6 @@
int /* O - 1 if "any", 0 otherwise */
httpAddrAny(const http_addr_t *addr) /* I - Address to check */
{
if (!addr)
return (0);
#ifdef AF_INET6
if (addr->addr.sa_family == AF_INET6 &&
IN6_IS_ADDR_UNSPECIFIED(&(addr->ipv6.sin6_addr)))
@@ -79,12 +76,6 @@ int /* O - 1 if equal, 0 if not */
httpAddrEqual(const http_addr_t *addr1, /* I - First address */
const http_addr_t *addr2) /* I - Second address */
{
if (!addr1 && !addr2)
return (1);
if (!addr1 || !addr2)
return (0);
if (addr1->addr.sa_family != addr2->addr.sa_family)
return (0);
@@ -111,9 +102,6 @@ httpAddrEqual(const http_addr_t *addr1, /* I - First address */
int /* O - Length in bytes */
httpAddrLength(const http_addr_t *addr) /* I - Address */
{
if (!addr)
return (0);
#ifdef AF_INET6
if (addr->addr.sa_family == AF_INET6)
return (sizeof(addr->ipv6));
@@ -143,9 +131,6 @@ int /* O - 1 if local host, 0 otherwise */
httpAddrLocalhost(
const http_addr_t *addr) /* I - Address to check */
{
if (!addr)
return (1);
#ifdef AF_INET6
if (addr->addr.sa_family == AF_INET6 &&
IN6_IS_ADDR_LOOPBACK(&(addr->ipv6.sin6_addr)))
@@ -523,9 +508,6 @@ httpGetHostname(http_t *http, /* I - HTTP connection or NULL */
struct hostent *host; /* Host entry to get FQDN */
if (!s || slen <= 1)
return (NULL);
if (http)
{
if (http->hostname[0] == '/')
@@ -539,8 +521,7 @@ httpGetHostname(http_t *http, /* I - HTTP connection or NULL */
* Get the hostname...
*/
if (gethostname(s, slen) < 0)
strlcpy(s, "localhost", slen);
gethostname(s, slen);
if (!strchr(s, '.'))
{
@@ -548,7 +529,7 @@ httpGetHostname(http_t *http, /* I - HTTP connection or NULL */
* The hostname is not a FQDN, so look it up...
*/
if ((host = gethostbyname(s)) != NULL && host->h_name)
if ((host = gethostbyname(s)) != NULL)
strlcpy(s, host->h_name, slen);
}
}
+2 -2
Ver Arquivo
@@ -411,7 +411,7 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
# ifdef AF_INET6
if (host->h_addrtype == AF_INET6)
{
temp->addr.ipv6.sin6_family = AF_INET6;
first->addr.ipv6.sin6_family = AF_INET6;
memcpy(&(temp->addr.ipv6), host->h_addr_list[i],
sizeof(temp->addr.ipv6));
temp->addr.ipv6.sin6_port = htons(portnum);
@@ -419,7 +419,7 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
else
# endif /* AF_INET6 */
{
temp->addr.ipv4.sin_family = AF_INET;
first->addr.ipv4.sin_family = AF_INET;
memcpy(&(temp->addr.ipv4), host->h_addr_list[i],
sizeof(temp->addr.ipv4));
temp->addr.ipv4.sin_port = htons(portnum);
+2 -66
Ver Arquivo
@@ -31,8 +31,7 @@
* Include necessary headers...
*/
# include <stdlib.h>
# include <config.h>
# include "config.h"
# ifdef __sun
/*
@@ -99,20 +98,7 @@ typedef struct
# include <Security/SecureTransport.h>
typedef struct /**** CDSA connection information ****/
{
SSLContextRef session; /* CDSA session object */
CFArrayRef certsArray; /* Certificates array */
} http_tls_t;
typedef union _cdsa_conn_ref_u /**** CDSA Connection reference union
**** used to resolve 64-bit casting
**** warnings.
****/
{
SSLConnectionRef connection; /* SSL connection pointer */
int sock; /* Socket */
} cdsa_conn_ref_t;
typedef SSLConnectionRef http_tls_t;
extern OSStatus _httpReadCDSA(SSLConnectionRef connection, void *data,
size_t *dataLength);
@@ -134,56 +120,6 @@ extern const char *_cups_hstrerror(int error);
extern const char *hstrerror(int error);
# endif /* !HAVE_HSTRERROR */
/*
* Some OS's don't have getifaddrs() and freeifaddrs()...
*/
# include <net/if.h>
# ifdef HAVE_GETIFADDRS
# include <ifaddrs.h>
# else
# include <sys/ioctl.h>
# ifdef HAVE_SYS_SOCKIO_H
# include <sys/sockio.h>
# endif /* HAVE_SYS_SOCKIO_H */
# ifdef ifa_dstaddr
# undef ifa_dstaddr
# endif /* ifa_dstaddr */
# ifndef ifr_netmask
# define ifr_netmask ifr_addr
# endif /* !ifr_netmask */
struct ifaddrs /**** Interface Structure ****/
{
struct ifaddrs *ifa_next; /* Next interface in list */
char *ifa_name; /* Name of interface */
unsigned int ifa_flags; /* Flags (up, point-to-point, etc.) */
struct sockaddr *ifa_addr, /* Network address */
*ifa_netmask; /* Address mask */
union
{
struct sockaddr *ifu_broadaddr; /* Broadcast address of this interface. */
struct sockaddr *ifu_dstaddr; /* Point-to-point destination address. */
} ifa_ifu;
void *ifa_data; /* Interface statistics */
};
# ifndef ifa_broadaddr
# define ifa_broadaddr ifa_ifu.ifu_broadaddr
# endif /* !ifa_broadaddr */
# ifndef ifa_dstaddr
# define ifa_dstaddr ifa_ifu.ifu_dstaddr
# endif /* !ifa_dstaddr */
extern int _cups_getifaddrs(struct ifaddrs **addrs);
# define getifaddrs _cups_getifaddrs
extern void _cups_freeifaddrs(struct ifaddrs *addrs);
# define freeifaddrs _cups_freeifaddrs
# endif /* HAVE_GETIFADDRS */
#endif /* !_CUPS_HTTP_PRIVATE_H_ */
/*
+1 -5
Ver Arquivo
@@ -1057,7 +1057,7 @@ httpSeparateURI(
*port = strtol(uri + 1, (char **)&uri, 10);
if (*uri != '/' && *uri)
if (*uri != '/')
{
*port = 0;
return (HTTP_URI_BAD_PORT);
@@ -1141,10 +1141,6 @@ httpStatus(http_status_t status) /* I - HTTP status code */
return ("Accepted");
case HTTP_NO_CONTENT :
return ("No Content");
case HTTP_MOVED_PERMANENTLY :
return ("Moved Permanently");
case HTTP_SEE_OTHER :
return ("See Other");
case HTTP_NOT_MODIFIED :
return ("Not Modified");
case HTTP_BAD_REQUEST :
+41 -87
Ver Arquivo
@@ -867,11 +867,7 @@ httpGets(char *line, /* I - Line to read into */
*/
if (!http->blocking && !http_wait(http, 1000))
{
DEBUG_puts("httpGets: Timed out!");
http->error = ETIMEDOUT;
return (NULL);
}
#ifdef HAVE_SSL
if (http->tls)
@@ -1392,15 +1388,11 @@ _httpReadCDSA(
void *data, /* I - Data buffer */
size_t *dataLength) /* IO - Number of bytes */
{
OSStatus result; /* Return value */
ssize_t bytes; /* Number of bytes read */
cdsa_conn_ref_t u; /* Connection reference union */
u.connection = connection;
OSStatus result; /* Return value */
ssize_t bytes; /* Number of bytes read */
do
bytes = recv(u.sock, data, *dataLength, 0);
bytes = recv((int)connection, data, *dataLength, 0);
while (bytes == -1 && errno == EINTR);
if (bytes == *dataLength)
@@ -1700,7 +1692,6 @@ httpUpdate(http_t *http) /* I - HTTP connection */
case HTTP_PUT :
http->state ++;
case HTTP_POST_SEND :
case HTTP_HEAD :
break;
default :
@@ -1970,15 +1961,11 @@ _httpWriteCDSA(
const void *data, /* I - Data buffer */
size_t *dataLength) /* IO - Number of bytes */
{
OSStatus result; /* Return value */
ssize_t bytes; /* Number of bytes read */
cdsa_conn_ref_t u; /* Connection reference union */
u.connection = connection;
OSStatus result; /* Return value */
ssize_t bytes; /* Number of bytes read */
do
bytes = write(u.sock, data, *dataLength);
bytes = write((int)connection, data, *dataLength);
while (bytes == -1 && errno == EINTR);
if (bytes == *dataLength)
@@ -2045,7 +2032,7 @@ http_read_ssl(http_t *http, /* I - HTTP connection */
size_t processed; /* Number of bytes processed */
error = SSLRead(((http_tls_t *)http->tls)->session, buf, len, &processed);
error = SSLRead((SSLContextRef)http->tls, buf, len, &processed);
switch (error)
{
@@ -2221,16 +2208,15 @@ static int /* O - Status of connection */
http_setup_ssl(http_t *http) /* I - HTTP connection */
{
# ifdef HAVE_LIBSSL
SSL_CTX *context; /* Context for encryption */
SSL *conn; /* Connection for encryption */
SSL_CTX *context; /* Context for encryption */
SSL *conn; /* Connection for encryption */
# elif defined(HAVE_GNUTLS)
http_tls_t *conn; /* TLS session object */
http_tls_t *conn; /* TLS session object */
gnutls_certificate_client_credentials *credentials;
/* TLS credentials */
/* TLS credentials */
# elif defined(HAVE_CDSASSL)
OSStatus error; /* Error code */
http_tls_t *conn; /* CDSA connection information */
cdsa_conn_ref_t u; /* Connection reference union */
SSLContextRef conn; /* Context for encryption */
OSStatus error; /* Error info */
# endif /* HAVE_LIBSSL */
@@ -2267,7 +2253,9 @@ http_setup_ssl(http_t *http) /* I - HTTP connection */
}
# elif defined(HAVE_GNUTLS)
if ((conn = (http_tls_t *)malloc(sizeof(http_tls_t))) == NULL)
conn = (http_tls_t *)malloc(sizeof(http_tls_t));
if (conn == NULL)
{
http->error = errno;
http->status = HTTP_ERROR;
@@ -2292,8 +2280,7 @@ http_setup_ssl(http_t *http) /* I - HTTP connection */
gnutls_init(&(conn->session), GNUTLS_CLIENT);
gnutls_set_default_priority(conn->session);
gnutls_credentials_set(conn->session, GNUTLS_CRD_CERTIFICATE, *credentials);
gnutls_transport_set_ptr(conn->session,
(gnutls_transport_ptr)((long)http->fd));
gnutls_transport_set_ptr(conn->session, (gnutls_transport_ptr)http->fd);
if ((gnutls_handshake(conn->session)) != GNUTLS_E_SUCCESS)
{
@@ -2306,51 +2293,34 @@ http_setup_ssl(http_t *http) /* I - HTTP connection */
conn->credentials = credentials;
# elif defined(HAVE_CDSASSL)
conn = (http_tls_t *)calloc(1, sizeof(http_tls_t));
if (conn == NULL)
return (-1);
if ((error = SSLNewContext(false, &conn->session)))
{
http->error = error;
http->status = HTTP_ERROR;
free(conn);
return (-1);
}
/*
* Use a union to resolve warnings about int/pointer size mismatches...
*/
u.connection = NULL;
u.sock = http->fd;
error = SSLSetConnection(conn->session, u.connection);
error = SSLNewContext(false, &conn);
if (!error)
error = SSLSetIOFuncs(conn->session, _httpReadCDSA, _httpWriteCDSA);
error = SSLSetIOFuncs(conn, _httpReadCDSA, _httpWriteCDSA);
if (!error)
error = SSLSetAllowsExpiredCerts(conn->session, true);
error = SSLSetConnection(conn, (SSLConnectionRef)http->fd);
if (!error)
error = SSLSetAllowsAnyRoot(conn->session, true);
error = SSLSetAllowsExpiredCerts(conn, true);
if (!error)
error = SSLSetAllowsAnyRoot(conn, true);
if (!error)
{
while ((error = SSLHandshake(conn->session)) == errSSLWouldBlock)
while ((error = SSLHandshake(conn)) == errSSLWouldBlock)
usleep(1000);
}
if (error)
if (error != 0)
{
http->error = error;
http->status = HTTP_ERROR;
SSLDisposeContext(conn->session);
SSLDisposeContext(conn);
free(conn);
close(http->fd);
return (-1);
}
@@ -2368,11 +2338,11 @@ http_setup_ssl(http_t *http) /* I - HTTP connection */
*/
static void
http_shutdown_ssl(http_t *http) /* I - HTTP connection */
http_shutdown_ssl(http_t *http) /* I - HTTP connection */
{
# ifdef HAVE_LIBSSL
SSL_CTX *context; /* Context for encryption */
SSL *conn; /* Connection for encryption */
SSL_CTX *context; /* Context for encryption */
SSL *conn; /* Connection for encryption */
conn = (SSL *)(http->tls);
@@ -2383,9 +2353,9 @@ http_shutdown_ssl(http_t *http) /* I - HTTP connection */
SSL_free(conn);
# elif defined(HAVE_GNUTLS)
http_tls_t *conn; /* Encryption session */
http_tls_t *conn; /* Encryption session */
gnutls_certificate_client_credentials *credentials;
/* TLS credentials */
/* TLS credentials */
conn = (http_tls_t *)(http->tls);
@@ -2398,20 +2368,10 @@ http_shutdown_ssl(http_t *http) /* I - HTTP connection */
free(conn);
# elif defined(HAVE_CDSASSL)
http_tls_t *conn; /* CDSA connection information */
conn = (http_tls_t *)(http->tls);
while (SSLClose(conn->session) == errSSLWouldBlock)
while (SSLClose((SSLContextRef)http->tls) == errSSLWouldBlock)
usleep(1000);
SSLDisposeContext(conn->session);
if (conn->certsArray)
CFRelease(conn->certsArray);
free(conn);
SSLDisposeContext((SSLContextRef)http->tls);
# endif /* HAVE_LIBSSL */
http->tls = NULL;
@@ -2424,11 +2384,11 @@ http_shutdown_ssl(http_t *http) /* I - HTTP connection */
* 'http_upgrade()' - Force upgrade to TLS encryption.
*/
static int /* O - Status of connection */
http_upgrade(http_t *http) /* I - HTTP connection */
static int /* O - Status of connection */
http_upgrade(http_t *http) /* I - HTTP connection */
{
int ret; /* Return value */
http_t myhttp; /* Local copy of HTTP data */
int ret; /* Return value */
http_t myhttp; /* Local copy of HTTP data */
DEBUG_printf(("http_upgrade(%p)\n", http));
@@ -2548,7 +2508,7 @@ http_wait(http_t *http, /* I - HTTP connection */
# elif defined(HAVE_CDSASSL)
size_t bytes; /* Bytes that are available */
if (!SSLGetBufferedReadSize(((http_tls_t *)http->tls)->session, &bytes) && bytes > 0)
if (!SSLGetBufferedReadSize((SSLContextRef)http->tls, &bytes) && bytes > 0)
return (1);
# endif /* HAVE_LIBSSL */
}
@@ -2591,8 +2551,6 @@ http_wait(http_t *http, /* I - HTTP connection */
{
FD_SET(http->fd, http->input_set);
DEBUG_printf(("http_wait: msec=%d, http->fd=%d\n", msec, http->fd));
if (msec >= 0)
{
timeout.tv_sec = msec / 1000;
@@ -2602,8 +2560,6 @@ http_wait(http_t *http, /* I - HTTP connection */
}
else
nfds = select(http->fd + 1, http->input_set, NULL, NULL, NULL);
DEBUG_printf(("http_wait: select() returned %d...\n", nfds));
}
#ifdef WIN32
while (nfds < 0 && WSAGetLastError() == WSAEINTR);
@@ -2613,8 +2569,6 @@ http_wait(http_t *http, /* I - HTTP connection */
FD_CLR(http->fd, http->input_set);
DEBUG_printf(("http_wait: returning with nfds=%d...\n", nfds));
return (nfds > 0);
}
@@ -2770,7 +2724,7 @@ http_write_ssl(http_t *http, /* I - HTTP connection */
size_t processed; /* Number of bytes processed */
error = SSLWrite(((http_tls_t *)http->tls)->session, buf, len, &processed);
error = SSLWrite((SSLContextRef)http->tls, buf, len, &processed);
switch (error)
{
-5
Ver Arquivo
@@ -39,9 +39,6 @@
# include <winsock2.h>
# include <ws2tcpip.h>
# else
# ifdef __sgi /* IRIX needs this for IPv6 support!?! */
# define INET6
# endif /* __sgi */
# include <unistd.h>
# include <sys/time.h>
# include <sys/socket.h>
@@ -100,8 +97,6 @@ extern "C" {
# define s6_addr32 _S6_un._S6_u32
# elif defined(__FreeBSD__) || defined(__APPLE__)
# define s6_addr32 __u6_addr.__u6_addr32
# elif defined(__osf__)
# define s6_addr32 s6_un.sa6_laddr
# elif defined(WIN32)
/*
* Windows only defines byte and 16-bit word members of the union and
+2 -35
Ver Arquivo
@@ -31,8 +31,7 @@
* Include necessary headers...
*/
# include <stdio.h>
# include "transcode.h"
# include "language.h"
# ifdef __cplusplus
extern "C" {
@@ -56,44 +55,12 @@ typedef struct _cups_message_s /**** Message catalog entry ****/
*str; /* Localized string */
} _cups_message_t;
typedef struct _cups_cmap_s /**** SBCS Charmap Struct ****/
{
struct _cups_cmap_s *next; /* Next charmap in cache */
int used; /* Number of times entry used */
cups_encoding_t encoding; /* Legacy charset encoding */
cups_ucs2_t char2uni[256]; /* Map Legacy SBCS -> UCS-2 */
cups_sbcs_t *uni2char[256]; /* Map UCS-2 -> Legacy SBCS */
} _cups_cmap_t;
typedef struct _cups_wide2uni_s /**** Wide to Unicode ****/
{
cups_vbcs_t widechar; /* VBCS 32-bit Char (EUC) */
cups_ucs2_t unichar; /* UCS-2 Char */
} _cups_wide2uni_t;
typedef struct _cups_vmap_s /**** VBCS Charmap Struct ****/
{
struct _cups_vmap_s *next; /* Next charmap in cache */
int used; /* Number of times entry used */
cups_encoding_t encoding; /* Legacy charset encoding */
cups_ucs2_t *char2uni[256]; /* Map 16-bit Char -> UCS-2 */
int charcount; /* Count of 16-bit VBCS Chars */
_cups_wide2uni_t *wide2uni; /* Map 32-bit Char -> UCS-2 */
int widecount; /* Count of 32-bit VBCS Chars */
cups_vbcs_t *uni2char[256]; /* Map UCS-2 -> 32-bit VBCS */
cups_sbcs_t lead2char[256]; /* Legacy Lead Char - 2-byte */
cups_sbcs_t lead3char[256]; /* Legacy Lead Char - 3-byte */
cups_sbcs_t lead4char[256]; /* Legacy Lead Char - 4-byte */
} _cups_vmap_t;
/*
* Prototypes...
*/
extern void _cupsCharmapFlush(void);
extern void _cupsCharmapFree(const cups_encoding_t encoding);
extern void *_cupsCharmapGet(const cups_encoding_t encoding);
/**** New in CUPS 1.2 ****/
extern const char *_cupsEncodingName(cups_encoding_t encoding);
extern int _cupsLangPrintf(FILE *fp, const char *message, ...)
# ifdef __GNUC__
+32 -58
Ver Arquivo
@@ -1034,7 +1034,6 @@ ippReadIO(void *src, /* I - Data source */
DEBUG_printf(("ippReadIO(%p, %p, %d, %p, %p)\n", src, cb, blocking,
parent, ipp));
DEBUG_printf(("ippReadIO: ipp->state=%d\n", ipp->state));
if (src == NULL || ipp == NULL)
return (IPP_ERROR);
@@ -1528,8 +1527,6 @@ ippReadIO(void *src, /* I - Data source */
break; /* anti-compiler-warning-code */
}
DEBUG_printf(("ippReadIO: returning ipp->state=%d!\n", ipp->state));
return (ipp->state);
}
@@ -1675,7 +1672,7 @@ ippWriteIO(void *dst, /* I - Destination */
if ((*cb)(dst, buffer, (int)(bufptr - buffer)) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP header...");
DEBUG_puts("ippWrite: Could not write IPP header...");
return (IPP_ERROR);
}
}
@@ -1689,9 +1686,9 @@ ippWriteIO(void *dst, /* I - Destination */
ipp->current = ipp->attrs;
ipp->curtag = IPP_TAG_ZERO;
DEBUG_printf(("ippWriteIO: version=%d.%d\n", buffer[0], buffer[1]));
DEBUG_printf(("ippWriteIO: op_status=%04x\n", ipp->request.any.op_status));
DEBUG_printf(("ippWriteIO: request_id=%d\n", ipp->request.any.request_id));
DEBUG_printf(("ippWrite: version=%d.%d\n", buffer[0], buffer[1]));
DEBUG_printf(("ippWrite: op_status=%04x\n", ipp->request.any.op_status));
DEBUG_printf(("ippWrite: request_id=%d\n", ipp->request.any.request_id));
/*
* If blocking is disabled, stop here...
@@ -1723,7 +1720,7 @@ ippWriteIO(void *dst, /* I - Destination */
if (attr->group_tag == IPP_TAG_ZERO)
continue;
DEBUG_printf(("ippWriteIO: wrote group tag = %x\n", attr->group_tag));
DEBUG_printf(("ippWrite: wrote group tag = %x\n", attr->group_tag));
*bufptr++ = attr->group_tag;
}
else if (attr->group_tag == IPP_TAG_ZERO)
@@ -1754,8 +1751,8 @@ ippWriteIO(void *dst, /* I - Destination */
* Write the value tag, name length, and name string...
*/
DEBUG_printf(("ippWriteIO: writing value tag = %x\n", attr->value_tag));
DEBUG_printf(("ippWriteIO: writing name = %d, \'%s\'\n", n, attr->name));
DEBUG_printf(("ippWrite: writing value tag = %x\n", attr->value_tag));
DEBUG_printf(("ippWrite: writing name = %d, \'%s\'\n", n, attr->name));
*bufptr++ = attr->value_tag;
*bufptr++ = n >> 8;
@@ -1778,11 +1775,11 @@ ippWriteIO(void *dst, /* I - Destination */
* and empty name for the collection member attribute...
*/
DEBUG_printf(("ippWriteIO: writing value tag = %x\n",
DEBUG_printf(("ippWrite: writing value tag = %x\n",
IPP_TAG_MEMBERNAME));
DEBUG_printf(("ippWriteIO: writing name = %d, \'%s\'\n", n, attr->name));
DEBUG_printf(("ippWriteIO: writing value tag = %x\n", attr->value_tag));
DEBUG_puts("ippWriteIO: writing name = 0, \'\'\n");
DEBUG_printf(("ippWrite: writing name = %d, \'%s\'\n", n, attr->name));
DEBUG_printf(("ippWrite: writing value tag = %x\n", attr->value_tag));
DEBUG_puts("ippWrite: writing name = 0, \'\'\n");
*bufptr++ = IPP_TAG_MEMBERNAME;
*bufptr++ = 0;
@@ -1813,7 +1810,7 @@ ippWriteIO(void *dst, /* I - Destination */
{
if ((*cb)(dst, buffer, (int)(bufptr - buffer)) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP attribute...");
DEBUG_puts("ippWrite: Could not write IPP attribute...");
return (IPP_ERROR);
}
@@ -1857,7 +1854,7 @@ ippWriteIO(void *dst, /* I - Destination */
{
if ((*cb)(dst, buffer, (int)(bufptr - buffer)) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP attribute...");
DEBUG_puts("ippWrite: Could not write IPP attribute...");
return (IPP_ERROR);
}
@@ -1908,15 +1905,15 @@ ippWriteIO(void *dst, /* I - Destination */
* values with a zero-length name...
*/
DEBUG_printf(("ippWriteIO: writing value tag = %x\n",
DEBUG_printf(("ippWrite: writing value tag = %x\n",
attr->value_tag));
DEBUG_printf(("ippWriteIO: writing name = 0, \'\'\n"));
DEBUG_printf(("ippWrite: writing name = 0, \'\'\n"));
if ((sizeof(buffer) - (bufptr - buffer)) < 3)
{
if ((*cb)(dst, buffer, (int)(bufptr - buffer)) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP attribute...");
DEBUG_puts("ippWrite: Could not write IPP attribute...");
return (IPP_ERROR);
}
@@ -1936,14 +1933,14 @@ ippWriteIO(void *dst, /* I - Destination */
if (n > (sizeof(buffer) - 2))
return (IPP_ERROR);
DEBUG_printf(("ippWriteIO: writing string = %d, \'%s\'\n", n,
DEBUG_printf(("ippWrite: writing string = %d, \'%s\'\n", n,
value->string.text));
if ((int)(sizeof(buffer) - (bufptr - buffer)) < (n + 2))
{
if ((*cb)(dst, buffer, (int)(bufptr - buffer)) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP attribute...");
DEBUG_puts("ippWrite: Could not write IPP attribute...");
return (IPP_ERROR);
}
@@ -1980,7 +1977,7 @@ ippWriteIO(void *dst, /* I - Destination */
{
if ((*cb)(dst, buffer, (int)(bufptr - buffer)) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP attribute...");
DEBUG_puts("ippWrite: Could not write IPP attribute...");
return (IPP_ERROR);
}
@@ -2023,7 +2020,7 @@ ippWriteIO(void *dst, /* I - Destination */
{
if ((*cb)(dst, buffer, (int)(bufptr - buffer)) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP attribute...");
DEBUG_puts("ippWrite: Could not write IPP attribute...");
return (IPP_ERROR);
}
@@ -2074,7 +2071,7 @@ ippWriteIO(void *dst, /* I - Destination */
{
if ((*cb)(dst, buffer, (int)(bufptr - buffer)) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP attribute...");
DEBUG_puts("ippWrite: Could not write IPP attribute...");
return (IPP_ERROR);
}
@@ -2131,7 +2128,7 @@ ippWriteIO(void *dst, /* I - Destination */
{
if ((*cb)(dst, buffer, (int)(bufptr - buffer)) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP attribute...");
DEBUG_puts("ippWrite: Could not write IPP attribute...");
return (IPP_ERROR);
}
@@ -2168,7 +2165,7 @@ ippWriteIO(void *dst, /* I - Destination */
{
if ((*cb)(dst, buffer, (int)(bufptr - buffer)) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP attribute...");
DEBUG_puts("ippWrite: Could not write IPP attribute...");
return (IPP_ERROR);
}
@@ -2229,7 +2226,7 @@ ippWriteIO(void *dst, /* I - Destination */
{
if ((*cb)(dst, buffer, (int)(bufptr - buffer)) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP attribute...");
DEBUG_puts("ippWrite: Could not write IPP attribute...");
return (IPP_ERROR);
}
@@ -2257,7 +2254,7 @@ ippWriteIO(void *dst, /* I - Destination */
if ((*cb)(dst, buffer, (int)(bufptr - buffer)) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP attribute...");
DEBUG_puts("ippWrite: Could not write IPP attribute...");
return (IPP_ERROR);
}
@@ -2290,7 +2287,7 @@ ippWriteIO(void *dst, /* I - Destination */
{
if ((*cb)(dst, buffer, (int)(bufptr - buffer)) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP attribute...");
DEBUG_puts("ippWrite: Could not write IPP attribute...");
return (IPP_ERROR);
}
@@ -2318,7 +2315,7 @@ ippWriteIO(void *dst, /* I - Destination */
{
if ((*cb)(dst, buffer, (int)(bufptr - buffer)) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP attribute...");
DEBUG_puts("ippWrite: Could not write IPP attribute...");
return (IPP_ERROR);
}
@@ -2345,11 +2342,11 @@ ippWriteIO(void *dst, /* I - Destination */
if ((*cb)(dst, buffer, (int)(bufptr - buffer)) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP attribute...");
DEBUG_puts("ippWrite: Could not write IPP attribute...");
return (IPP_ERROR);
}
DEBUG_printf(("ippWriteIO: wrote %d bytes\n", bufptr - buffer));
DEBUG_printf(("ippWrite: wrote %d bytes\n", bufptr - buffer));
/*
* If blocking is disabled, stop here...
@@ -2383,7 +2380,7 @@ ippWriteIO(void *dst, /* I - Destination */
if ((*cb)(dst, buffer, n) < 0)
{
DEBUG_puts("ippWriteIO: Could not write IPP end-tag...");
DEBUG_puts("ippWrite: Could not write IPP end-tag...");
return (IPP_ERROR);
}
@@ -2407,8 +2404,8 @@ ippWriteIO(void *dst, /* I - Destination */
*/
ipp_attribute_t * /* O - New attribute */
_ippAddAttr(ipp_t *ipp, /* I - IPP message */
int num_values) /* I - Number of values */
_ippAddAttr(ipp_t *ipp, /* I - IPP message */
int num_values) /* I - Number of values */
{
ipp_attribute_t *attr; /* New attribute */
@@ -2800,29 +2797,6 @@ ipp_write_file(int *fd, /* I - File descriptor */
}
#ifdef __linux
/*
* The following symbol definitions are provided only for KDE
* compatibility during the CUPS 1.2 testing period and will be
* removed in a future release of CUPS. These are PRIVATE APIs
* from CUPS 1.1.x that the KDE developers chose to use...
*/
ipp_attribute_t * /* O - New attribute */
_ipp_add_attr(ipp_t *ipp, /* I - IPP message */
int num_values) /* I - Number of values */
{
return (_ippAddAttr(ipp, num_values));
}
void
_ipp_free_attr(ipp_attribute_t *attr) /* I - Attribute to free */
{
_ippFreeAttr(attr);
}
#endif /* __linux */
/*
* End of "$Id$".
*/
+27 -74
Ver Arquivo
@@ -31,6 +31,7 @@
* cupsLangEncoding() - Return the character encoding (us-ascii, etc.)
* for the given language.
* cupsLangFlush() - Flush all language data out of the cache.
* _cupsLangFlush() - Flush all language data out of the cache.
* cupsLangFree() - Free language data.
* cupsLangGet() - Get a language.
* _cupsLangString() - Get a message string.
@@ -64,18 +65,6 @@
#endif /* HAVE_COREFOUNDATION_H */
/*
* Local globals...
*/
#ifdef HAVE_PTHREAD_H
static pthread_mutex_t lang_mutex = PTHREAD_MUTEX_INITIALIZER;
/* Mutex to control access to cache */
#endif /* HAVE_PTHREAD_H */
static cups_lang_t *lang_cache = NULL;
/* Language string cache */
/*
* Local functions...
*/
@@ -214,6 +203,17 @@ cupsLangEncoding(cups_lang_t *lang) /* I - Language data */
void
cupsLangFlush(void)
{
_cupsLangFlush(_cupsGlobals());
}
/*
* '_cupsLangFlush()' - Flush all language data out of the cache.
*/
void
_cupsLangFlush(_cups_globals_t *cg) /* I - Global data */
{
cups_lang_t *lang, /* Current language */
*next; /* Next language */
@@ -223,11 +223,7 @@ cupsLangFlush(void)
* Free all languages in the cache...
*/
#ifdef HAVE_PTHREAD_H
pthread_mutex_lock(&lang_mutex);
#endif /* HAVE_PTHREAD_H */
for (lang = lang_cache; lang != NULL; lang = next)
for (lang = cg->lang_cache; lang != NULL; lang = next)
{
/*
* Free all messages...
@@ -243,11 +239,7 @@ cupsLangFlush(void)
free(lang);
}
lang_cache = NULL;
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&lang_mutex);
#endif /* HAVE_PTHREAD_H */
cg->lang_cache = NULL;
}
@@ -260,16 +252,8 @@ cupsLangFlush(void)
void
cupsLangFree(cups_lang_t *lang) /* I - Language to free */
{
#ifdef HAVE_PTHREAD_H
pthread_mutex_lock(&lang_mutex);
#endif /* HAVE_PTHREAD_H */
if (lang != NULL && lang->used > 0)
lang->used --;
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&lang_mutex);
#endif /* HAVE_PTHREAD_H */
}
@@ -574,27 +558,14 @@ cupsLangGet(const char *language) /* I - Language or locale */
{
snprintf(real, sizeof(real), "%s_%s", langname, country);
if ((lang = cups_cache_lookup(real, encoding)) != NULL)
return (lang);
snprintf(filename, sizeof(filename), "%s/%s/cups_%s.po", cg->localedir,
real, real);
}
else
{
strcpy(real, langname);
filename[0] = '\0'; /* anti-compiler-warning-code */
}
#ifdef HAVE_PTHREAD_H
pthread_mutex_lock(&lang_mutex);
#endif /* HAVE_PTHREAD_H */
if ((lang = cups_cache_lookup(langname, encoding)) != NULL)
{
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&lang_mutex);
#endif /* HAVE_PTHREAD_H */
return (lang);
}
if (!country[0] || access(filename, 0))
{
@@ -602,6 +573,9 @@ cupsLangGet(const char *language) /* I - Language or locale */
* Country localization not available, look for generic localization...
*/
if ((lang = cups_cache_lookup(langname, encoding)) != NULL)
return (lang);
snprintf(filename, sizeof(filename), "%s/%s/cups_%s.po", cg->localedir,
langname, langname);
@@ -613,8 +587,11 @@ cupsLangGet(const char *language) /* I - Language or locale */
DEBUG_printf(("access(\"%s\", 0): %s\n", filename, strerror(errno)));
strcpy(real, "C");
snprintf(filename, sizeof(filename), "%s/C/cups_C.po", cg->localedir);
}
else
strcpy(real, langname);
}
/*
@@ -622,7 +599,7 @@ cupsLangGet(const char *language) /* I - Language or locale */
* record...
*/
for (lang = lang_cache; lang != NULL; lang = lang->next)
for (lang = cg->lang_cache; lang != NULL; lang = lang->next)
if (lang->used == 0)
break;
@@ -633,16 +610,10 @@ cupsLangGet(const char *language) /* I - Language or locale */
*/
if ((lang = calloc(sizeof(cups_lang_t), 1)) == NULL)
{
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&lang_mutex);
#endif /* HAVE_PTHREAD_H */
return (NULL);
}
lang->next = lang_cache;
lang_cache = lang;
lang->next = cg->lang_cache;
cg->lang_cache = lang;
}
else
{
@@ -675,10 +646,6 @@ cupsLangGet(const char *language) /* I - Language or locale */
* Return...
*/
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&lang_mutex);
#endif /* HAVE_PTHREAD_H */
return (lang);
}
@@ -701,21 +668,7 @@ _cupsLangString(cups_lang_t *lang, /* I - Language */
if (!lang || !message)
return (message);
#ifdef HAVE_PTHREAD_H
{
const char *s; /* Localized message */
pthread_mutex_lock(&lang_mutex);
s = _cupsMessageLookup(lang->strings, message);
pthread_mutex_unlock(&lang_mutex);
return (s);
}
#else
return (_cupsMessageLookup(lang->strings, message));
#endif /* HAVE_PTHREAD_H */
}
@@ -1213,7 +1166,7 @@ cups_cache_lookup(const char *name,/* I - Name of locale */
* Loop through the cache and return a match if found...
*/
for (lang = lang_cache; lang != NULL; lang = lang->next)
for (lang = _cupsGlobals()->lang_cache; lang != NULL; lang = lang->next)
{
DEBUG_printf(("cups_cache_lookup: lang=%p, language=\"%s\", encoding=%d(%s)\n",
lang, lang->language, lang->encoding,
+5 -10
Ver Arquivo
@@ -1,11 +1,10 @@
_cupsAdminGetServerSettings
_cupsAdminSetServerSettings
_cupsCharmapFlush
_cupsCharmapFree
_cupsCharmapGet
_cupsEncodingName
_cupsGetPassword
_cupsGlobals
_cupsLangFlush
_cupsLangPrintf
_cupsLangPuts
_cupsLangString
@@ -15,18 +14,14 @@ _cupsMD5Init
_cupsMessageFree
_cupsMessageLoad
_cupsMessageLookup
_cupsNormalizeMapsFlush
_cupsSetError
_cupsStrAlloc
_cupsStrFlush
_cupsStrFormatd
_cupsStrFree
_cupsStrScand
_cupsStrStatistics
_cups_getifaddrs
_cups_freeifaddrs
_cups_strcpy
_cupsStrFlush
_cupsStrFree
_cups_strlcat
_cups_strlcpy
_cupsStrStatistics
_ippAddAttr
_ippFreeAttr
_ppdGetEncoding
-2
Ver Arquivo
@@ -56,8 +56,6 @@ static const char *ppd_text(ppd_file_t *ppd, const char *keyword,
/*
* 'ppdLocalize()' - Localize the PPD file to the current locale.
*
* @since CUPS 1.2@
*/
int /* O - 0 on success, -1 on error */
+8 -31
Ver Arquivo
@@ -241,6 +241,9 @@ ppd_option_t * /* O - Pointer to option or NULL */
ppdFindOption(ppd_file_t *ppd, /* I - PPD file data */
const char *option) /* I - Option/Keyword name */
{
ppd_option_t key; /* Option search key */
/*
* Range check input...
*/
@@ -248,39 +251,13 @@ ppdFindOption(ppd_file_t *ppd, /* I - PPD file data */
if (!ppd || !option)
return (NULL);
if (ppd->options)
{
/*
* Search in the array...
*/
/*
* Search...
*/
ppd_option_t key; /* Option search key */
strlcpy(key.keyword, option, sizeof(key.keyword));
strlcpy(key.keyword, option, sizeof(key.keyword));
return ((ppd_option_t *)cupsArrayFind(ppd->options, &key));
}
else
{
/*
* Search in each group...
*/
int i, j; /* Looping vars */
ppd_group_t *group; /* Current group */
ppd_option_t *optptr; /* Current option */
for (i = ppd->num_groups, group = ppd->groups; i > 0; i --, group ++)
for (j = group->num_options, optptr = group->options;
j > 0;
j --, optptr ++)
if (!strcasecmp(optptr->keyword, option))
return (optptr);
return (NULL);
}
return ((ppd_option_t *)cupsArrayFind(ppd->options, &key));
}
+2188
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+334
Ver Arquivo
@@ -0,0 +1,334 @@
/*
* "$Id$"
*
* Unicode normalization for the Common UNIX Printing System (CUPS).
*
* Copyright 1997-2005 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are
* the property of Easy Software Products and are protected by Federal
* copyright law. Distribution and use rights are outlined in the
* file "LICENSE.txt" which should have been included with this file.
* If this file is missing or damaged please contact Easy Software
* Products at:
*
* Attn: CUPS Licensing Information
* Easy Software Products
* 44141 Airport View Drive, Suite 204
* Hollywood, Maryland 20636 USA
*
* Voice: (301) 373-9600
* EMail: cups-info@cups.org
* WWW: http://www.cups.org
*/
#ifndef _CUPS_NORMALIZE_H_
# define _CUPS_NORMALIZE_H_
/*
* Include necessary headers...
*/
#include "transcode.h"
# ifdef __cplusplus
extern "C" {
# endif /* __cplusplus */
/*
* Types...
*/
typedef enum /**** Normalizataion Types ****/
{
CUPS_NORM_NFD, /* Canonical Decomposition */
CUPS_NORM_NFKD, /* Compatibility Decomposition */
CUPS_NORM_NFC, /* NFD, them Canonical Composition */
CUPS_NORM_NFKC /* NFKD, them Canonical Composition */
} cups_normalize_t;
typedef enum /**** Case Folding Types ****/
{
CUPS_FOLD_SIMPLE, /* Simple - no expansion in size */
CUPS_FOLD_FULL /* Full - possible expansion in size */
} cups_folding_t;
typedef enum /**** Unicode Char Property Types ****/
{
CUPS_PROP_GENERAL_CATEGORY, /* See 'cups_gencat_t' enum */
CUPS_PROP_BIDI_CATEGORY, /* See 'cups_bidi_t' enum */
CUPS_PROP_COMBINING_CLASS, /* See '_cups_comb_class_t' type */
CUPS_PROP_BREAK_CLASS /* See 'cups_break_class_t' enum */
} cups_property_t;
/*
* Note - Use major classes for logic optimizations (by mask).
*/
typedef enum /**** Unicode General Category ****/
{
CUPS_GENCAT_L = 0x10, /* Letter major class */
CUPS_GENCAT_LU = 0x11, /* Lu Letter, Uppercase */
CUPS_GENCAT_LL = 0x12, /* Ll Letter, Lowercase */
CUPS_GENCAT_LT = 0x13, /* Lt Letter, Titlecase */
CUPS_GENCAT_LM = 0x14, /* Lm Letter, Modifier */
CUPS_GENCAT_LO = 0x15, /* Lo Letter, Other */
CUPS_GENCAT_M = 0x20, /* Mark major class */
CUPS_GENCAT_MN = 0x21, /* Mn Mark, Non-Spacing */
CUPS_GENCAT_MC = 0x22, /* Mc Mark, Spacing Combining */
CUPS_GENCAT_ME = 0x23, /* Me Mark, Enclosing */
CUPS_GENCAT_N = 0x30, /* Number major class */
CUPS_GENCAT_ND = 0x31, /* Nd Number, Decimal Digit */
CUPS_GENCAT_NL = 0x32, /* Nl Number, Letter */
CUPS_GENCAT_NO = 0x33, /* No Number, Other */
CUPS_GENCAT_P = 0x40, /* Punctuation major class */
CUPS_GENCAT_PC = 0x41, /* Pc Punctuation, Connector */
CUPS_GENCAT_PD = 0x42, /* Pd Punctuation, Dash */
CUPS_GENCAT_PS = 0x43, /* Ps Punctuation, Open (start) */
CUPS_GENCAT_PE = 0x44, /* Pe Punctuation, Close (end) */
CUPS_GENCAT_PI = 0x45, /* Pi Punctuation, Initial Quote */
CUPS_GENCAT_PF = 0x46, /* Pf Punctuation, Final Quote */
CUPS_GENCAT_PO = 0x47, /* Po Punctuation, Other */
CUPS_GENCAT_S = 0x50, /* Symbol major class */
CUPS_GENCAT_SM = 0x51, /* Sm Symbol, Math */
CUPS_GENCAT_SC = 0x52, /* Sc Symbol, Currency */
CUPS_GENCAT_SK = 0x53, /* Sk Symbol, Modifier */
CUPS_GENCAT_SO = 0x54, /* So Symbol, Other */
CUPS_GENCAT_Z = 0x60, /* Separator major class */
CUPS_GENCAT_ZS = 0x61, /* Zs Separator, Space */
CUPS_GENCAT_ZL = 0x62, /* Zl Separator, Line */
CUPS_GENCAT_ZP = 0x63, /* Zp Separator, Paragraph */
CUPS_GENCAT_C = 0x70, /* Other (miscellaneous) major class */
CUPS_GENCAT_CC = 0x71, /* Cc Other, Control */
CUPS_GENCAT_CF = 0x72, /* Cf Other, Format */
CUPS_GENCAT_CS = 0x73, /* Cs Other, Surrogate */
CUPS_GENCAT_CO = 0x74, /* Co Other, Private Use */
CUPS_GENCAT_CN = 0x75 /* Cn Other, Not Assigned */
} cups_gencat_t;
typedef enum /**** Unicode Bidi Category ****/
{
CUPS_BIDI_L, /* Left-to-Right (Alpha, Ideographic) */
CUPS_BIDI_LRE, /* Left-to-Right Embedding (explicit) */
CUPS_BIDI_LRO, /* Left-to-Right Override (explicit) */
CUPS_BIDI_R, /* Right-to-Left (Hebrew alpha/punct) */
CUPS_BIDI_AL, /* Right-to-Left Arabic (Arabic, etc) */
CUPS_BIDI_RLE, /* Right-to-Left Embedding (explicit) */
CUPS_BIDI_RLO, /* Right-to-Left Override (explicit) */
CUPS_BIDI_PDF, /* Pop Directional Format */
CUPS_BIDI_EN, /* Euro Number (Euro & Indic digits) */
CUPS_BIDI_ES, /* Euro Number Separator (Slash) */
CUPS_BIDI_ET, /* Euro Number Terminator */
CUPS_BIDI_AN, /* Arabic Number (digits, separators) */
CUPS_BIDI_CS, /* Common Number Separator */
CUPS_BIDI_NSM, /* Non-Spacing Mark (Mn/Me in UCD) */
CUPS_BIDI_BN, /* Boundary Neutral (formatting, etc) */
CUPS_BIDI_B, /* Paragraph Separator */
CUPS_BIDI_S, /* Segment Separator (Tab) */
CUPS_BIDI_WS, /* Whitespace Space (Space, etc) */
CUPS_BIDI_ON /* Other Neutrals */
} cups_bidi_t;
/*
* Note - add state table from UAX-14, section 7.3.
* Remember to do BK and SP in outer loop (not in state table).
* Consider optimization for CM (combining mark).
* See 'LineBreak.txt' (12,875) and 'DerivedLineBreak.txt' (1,350).
*/
typedef enum /**** Unicode Line Break Class ****/
{
/*
* (A) - Allow Break AFTER
* (XA) - Prevent Break AFTER
* (B) - Allow Break BEFORE
* (XB) - Prevent Break BEFORE
* (P) - Allow Break For Pair
* (XP) - Prevent Break For Pair
*/
CUPS_BREAK_AI, /* Ambiguous Alphabetic or Ideograph */
CUPS_BREAK_AL, /* Ordinary Alpha/Symbol Chars (XP) */
CUPS_BREAK_BA, /* Break Opportunity After Chars (A) */
CUPS_BREAK_BB, /* Break Opportunity Before Chars (B) */
CUPS_BREAK_B2, /* Break Opportunity Either (B/A/XP) */
CUPS_BREAK_BK, /* Mandatory Break (A) (norm) */
CUPS_BREAK_CB, /* Contingent Break (B/A) (norm) */
CUPS_BREAK_CL, /* Closing Punctuation (XB) */
CUPS_BREAK_CM, /* Attached/Combining (XB) (norm) */
CUPS_BREAK_CR, /* Carriage Return (A) (norm) */
CUPS_BREAK_EX, /* Exclamation/Interrogation (XB) */
CUPS_BREAK_GL, /* Non-breaking "Glue" (XB/XA) (norm) */
CUPS_BREAK_HY, /* Hyphen (XA) */
CUPS_BREAK_ID, /* Ideographic (B/A) */
CUPS_BREAK_IN, /* Inseparable chars (XP) */
CUPS_BREAK_IS, /* Numeric Separator (Infix) (XB) */
CUPS_BREAK_LF, /* Line Feed (A) (norm) */
CUPS_BREAK_NS, /* Non-starters (XB) */
CUPS_BREAK_NU, /* Numeric (XP) */
CUPS_BREAK_OP, /* Opening Punctuation (XA) */
CUPS_BREAK_PO, /* Postfix (Numeric) (XB) */
CUPS_BREAK_PR, /* Prefix (Numeric) (XA) */
CUPS_BREAK_QU, /* Ambiguous Quotation (XB/XA) */
CUPS_BREAK_SA, /* Context Dependent (SE Asian) (P) */
CUPS_BREAK_SG, /* Surrogates (XP) (norm) */
CUPS_BREAK_SP, /* Space (A) (norm) */
CUPS_BREAK_SY, /* Symbols Allowing Break After (A) */
CUPS_BREAK_XX, /* Unknown (XP) */
CUPS_BREAK_ZW /* Zero Width Space (A) (norm) */
} cups_break_class_t;
typedef int _cups_comb_class_t; /**** Unicode Combining Class ****/
/* 0=base, 1..254=combining char */
/*
* Structures...
*/
typedef struct _cups_normmap_s /**** Normalize Map Cache Struct ****/
{
struct _cups_normmap_s *next; /* Next normalize in cache */
int used; /* Number of times entry used */
cups_normalize_t normalize; /* Normalization type */
int normcount; /* Count of Source Chars */
cups_ucs2_t *uni2norm; /* Char -> Normalization */
/* ...only supports UCS-2 */
} _cups_norm_map_t;
typedef struct _cups_foldmap_s /**** Case Fold Map Cache Struct ****/
{
struct _cups_foldmap_s *next; /* Next case fold in cache */
int used; /* Number of times entry used */
cups_folding_t fold; /* Case folding type */
int foldcount; /* Count of Source Chars */
cups_ucs2_t *uni2fold; /* Char -> Folded Char(s) */
/* ...only supports UCS-2 */
} _cups_fold_map_t;
typedef struct _cups_prop_s /**** Char Property Struct ****/
{
cups_ucs2_t ch; /* Unicode Char as UCS-2 */
unsigned char gencat; /* General Category */
unsigned char bidicat; /* Bidirectional Category */
} _cups_prop_t;
typedef struct _cups_prop_map_s /**** Char Property Map Struct ****/
{
int used; /* Number of times entry used */
int propcount; /* Count of Source Chars */
_cups_prop_t *uni2prop; /* Char -> Properties */
} _cups_prop_map_t;
typedef struct _cups_break_map_s /**** Line Break Class Map Struct ****/
{
int used; /* Number of times entry used */
int breakcount; /* Count of Source Chars */
cups_ucs2_t *uni2break; /* Char -> Line Break Class */
} _cups_break_map_t;
typedef struct _cups_comb_s /**** Char Combining Class Struct ****/
{
cups_ucs2_t ch; /* Unicode Char as UCS-2 */
unsigned char combclass; /* Combining Class */
unsigned char reserved; /* Reserved for alignment */
} _cups_comb_t;
typedef struct _cups_comb_map_s /**** Combining Class Map Struct ****/
{
int used; /* Number of times entry used */
int combcount; /* Count of Source Chars */
_cups_comb_t *uni2comb; /* Char -> Combining Class */
} _cups_comb_map_t;
/*
* Prototypes...
*/
/*
* Utility functions for normalization module
*/
extern int cupsNormalizeMapsGet(void);
extern int cupsNormalizeMapsFree(void);
extern void cupsNormalizeMapsFlush(void);
/*
* Normalize UTF-8 string to Unicode UAX-15 Normalization Form
* Note - Compatibility Normalization Forms (NFKD/NFKC) are
* unsafe for subsequent transcoding to legacy charsets
*/
extern int cupsUTF8Normalize(cups_utf8_t *dest,
const cups_utf8_t *src,
const int maxout,
const cups_normalize_t normalize);
/*
* Normalize UTF-32 string to Unicode UAX-15 Normalization Form
* Note - Compatibility Normalization Forms (NFKD/NFKC) are
* unsafe for subsequent transcoding to legacy charsets
*/
extern int cupsUTF32Normalize(cups_utf32_t *dest,
const cups_utf32_t *src,
const int maxout,
const cups_normalize_t normalize);
/*
* Case Fold UTF-8 string per Unicode UAX-21 Section 2.3
* Note - Case folding output is
* unsafe for subsequent transcoding to legacy charsets
*/
extern int cupsUTF8CaseFold(cups_utf8_t *dest,
const cups_utf8_t *src,
const int maxout,
const cups_folding_t fold);
/*
* Case Fold UTF-32 string per Unicode UAX-21 Section 2.3
* Note - Case folding output is
* unsafe for subsequent transcoding to legacy charsets
*/
extern int cupsUTF32CaseFold(cups_utf32_t *dest,
const cups_utf32_t *src,
const int maxout,
const cups_folding_t fold);
/*
* Compare UTF-8 strings after case folding
*/
extern int cupsUTF8CompareCaseless(const cups_utf8_t *s1,
const cups_utf8_t *s2);
/*
* Compare UTF-32 strings after case folding
*/
extern int cupsUTF32CompareCaseless(const cups_utf32_t *s1,
const cups_utf32_t *s2);
/*
* Compare UTF-8 strings after case folding and NFKC normalization
*/
extern int cupsUTF8CompareIdentifier(const cups_utf8_t *s1,
const cups_utf8_t *s2);
/*
* Compare UTF-32 strings after case folding and NFKC normalization
*/
extern int cupsUTF32CompareIdentifier(const cups_utf32_t *s1,
const cups_utf32_t *s2);
/*
* Get UTF-32 character property
*/
extern int cupsUTF32CharacterProperty(const cups_utf32_t ch,
const cups_property_t prop);
# ifdef __cplusplus
}
# endif /* __cplusplus */
#endif /* !_CUPS_NORMALIZE_H_ */
/*
* End of "$Id$"
*/
+1 -1
Ver Arquivo
@@ -87,7 +87,7 @@ ppdPageSize(ppd_file_t *ppd, /* I - PPD file record */
if (!nameptr || *nameptr != 'x')
return (NULL);
l = _cupsStrScand(nameptr + 1, &nameptr, loc);
l = _cupsStrScand(nameptr, &nameptr, loc);
if (!nameptr)
return (NULL);
+21 -80
Ver Arquivo
@@ -36,8 +36,6 @@
*
* ppdClose() - Free all memory used by the PPD file.
* ppdErrorString() - Returns the text assocated with a status.
* _ppdGetEncoding() - Get the CUPS encoding value for the given
* LanguageEncoding.
* ppdLastError() - Return the status from the last ppdOpen*().
* ppdOpen() - Read a PPD file into memory.
* ppdOpen2() - Read a PPD file into memory.
@@ -113,8 +111,7 @@ static ppd_cparam_t *ppd_get_cparam(ppd_coption_t *opt,
const char *param,
const char *text);
static ppd_group_t *ppd_get_group(ppd_file_t *ppd, const char *name,
const char *text, _cups_globals_t *cg,
cups_encoding_t encoding);
const char *text, _cups_globals_t *cg);
static ppd_option_t *ppd_get_option(ppd_group_t *group, const char *name);
static int ppd_read(cups_file_t *fp, char *keyword, char *option,
char *text, char **string, int ignoreblank,
@@ -149,8 +146,6 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
* Free all strings at the top level...
*/
ppd_free(ppd->lang_encoding);
ppd_free(ppd->nickname);
ppd_free(ppd->patches);
ppd_free(ppd->jcl_begin);
ppd_free(ppd->jcl_end);
@@ -335,31 +330,6 @@ ppdErrorString(ppd_status_t status) /* I - PPD status */
}
/*
* '_ppdGetEncoding()' - Get the CUPS encoding value for the given
* LanguageEncoding.
*/
cups_encoding_t /* O - CUPS encoding value */
_ppdGetEncoding(const char *name) /* I - LanguageEncoding string */
{
if (!strcasecmp(name, "ISOLatin1"))
return (CUPS_ISO8859_1);
else if (!strcasecmp(name, "ISOLatin2"))
return (CUPS_ISO8859_2);
else if (!strcasecmp(name, "ISOLatin5"))
return (CUPS_ISO8859_5);
else if (!strcasecmp(name, "JIS83-RKSJ"))
return (CUPS_WINDOWS_932);
else if (!strcasecmp(name, "MacStandard"))
return (CUPS_MAC_ROMAN);
else if (!strcasecmp(name, "WindowsANSI"))
return (CUPS_WINDOWS_1252);
else
return (CUPS_UTF8);
}
/*
* 'ppdLastError()' - Return the status from the last ppdOpen*().
*
@@ -451,7 +421,6 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
cups_lang_t *language; /* Default language */
struct lconv *loc; /* Locale data */
int ui_keyword; /* Is this line a UI keyword? */
cups_encoding_t encoding; /* Encoding of PPD file */
_cups_globals_t *cg = _cupsGlobals();
/* Global data */
static const char * const ui_keywords[] =
@@ -596,7 +565,6 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
option = NULL;
choice = NULL;
ui_keyword = 0;
encoding = CUPS_ISO8859_1;
while ((mask = ppd_read(fp, keyword, name, text, &string, 1, cg)) != 0)
{
@@ -675,8 +643,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
if (!group)
{
if ((group = ppd_get_group(ppd, "General", _("General"), cg,
encoding)) == NULL)
if ((group = ppd_get_group(ppd, "General", _("General"), cg)) == NULL)
goto error;
DEBUG_printf(("Adding to group %s...\n", group->text));
@@ -739,14 +706,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
if (!strcmp(keyword, "LanguageLevel"))
ppd->language_level = atoi(string);
else if (!strcmp(keyword, "LanguageEncoding"))
{
/*
* Say all PPD files are UTF-8, since we convert to UTF-8...
*/
ppd->lang_encoding = strdup("UTF-8");
encoding = _ppdGetEncoding(string);
}
ppd->lang_encoding = string;
else if (!strcmp(keyword, "LanguageVersion"))
ppd->lang_version = string;
else if (!strcmp(keyword, "Manufacturer"))
@@ -758,18 +718,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
else if (!strcmp(keyword, "PCFileName"))
ppd->pcfilename = string;
else if (!strcmp(keyword, "NickName"))
{
if (encoding != CUPS_UTF8)
{
cups_utf8_t utf8[256]; /* UTF-8 version of NickName */
cupsCharsetToUTF8(utf8, string, sizeof(utf8), encoding);
ppd->nickname = strdup((char *)utf8);
}
else
ppd->nickname = strdup(string);
}
ppd->nickname = string;
else if (!strcmp(keyword, "Product"))
ppd->product = string;
else if (!strcmp(keyword, "ShortNickName"))
@@ -1005,6 +954,9 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
}
else if (!strncmp(keyword, "Custom", 6) && !strcmp(name, "True"))
{
ppd_coption_t *coption; /* Custom option */
DEBUG_puts("Processing Custom option...");
/*
@@ -1018,8 +970,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
DEBUG_printf(("%s option not found for %s...\n", keyword + 6, keyword));
if ((gtemp = ppd_get_group(ppd, "General", _("General"), cg,
encoding)) == NULL)
if ((gtemp = ppd_get_group(ppd, "General", _("General"), cg)) == NULL)
{
DEBUG_puts("Unable to get general group!");
@@ -1036,7 +987,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
}
}
if (!ppd_get_coption(ppd, keyword + 6))
if ((coption = ppd_get_coption(ppd, keyword + 6)) == NULL)
{
cg->ppd_status = PPD_ALLOC_ERROR;
@@ -1184,8 +1135,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
option = ppd_get_option(subgroup, name);
else if (group == NULL)
{
if ((group = ppd_get_group(ppd, "General", _("General"), cg,
encoding)) == NULL)
if ((group = ppd_get_group(ppd, "General", _("General"), cg)) == NULL)
goto error;
DEBUG_printf(("Adding to group %s...\n", group->text));
@@ -1234,8 +1184,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
}
if (text[0])
cupsCharsetToUTF8((cups_utf8_t *)option->text, text,
sizeof(option->text), encoding);
strlcpy(option->text, text, sizeof(option->text));
else
{
if (!strcmp(name, "PageSize"))
@@ -1274,7 +1223,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
* Find the JCL group, and add if needed...
*/
group = ppd_get_group(ppd, "JCL", _("JCL"), cg, encoding);
group = ppd_get_group(ppd, "JCL", _("JCL"), cg);
if (group == NULL)
goto error;
@@ -1324,11 +1273,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
break;
}
if (text[0])
cupsCharsetToUTF8((cups_utf8_t *)option->text, text,
sizeof(option->text), encoding);
else
strlcpy(option->text, name, sizeof(option->text));
strlcpy(option->text, text, sizeof(option->text));
option->section = PPD_ORDER_JCL;
group = NULL;
@@ -1382,7 +1327,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
* Find/add the group...
*/
group = ppd_get_group(ppd, string, sptr, cg, encoding);
group = ppd_get_group(ppd, string, sptr, cg);
if (group == NULL)
goto error;
@@ -1671,9 +1616,8 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
choice = ppd_add_choice(option, name);
if (text[0])
cupsCharsetToUTF8((cups_utf8_t *)choice->text, text,
sizeof(choice->text), encoding);
if (mask & PPD_TEXT)
strlcpy(choice->text, text, sizeof(choice->text));
else if (!strcmp(name, "True"))
strcpy(choice->text, _("Yes"));
else if (!strcmp(name, "False"))
@@ -2283,11 +2227,10 @@ ppd_get_cparam(ppd_coption_t *opt, /* I - PPD file */
*/
static ppd_group_t * /* O - Named group */
ppd_get_group(ppd_file_t *ppd, /* I - PPD file */
const char *name, /* I - Name of group */
const char *text, /* I - Text for group */
_cups_globals_t *cg, /* I - Global data */
cups_encoding_t encoding) /* I - Encoding of text */
ppd_get_group(ppd_file_t *ppd, /* I - PPD file */
const char *name, /* I - Name of group */
const char *text, /* I - Text for group */
_cups_globals_t *cg) /* I - Global data */
{
int i; /* Looping var */
ppd_group_t *group; /* Group */
@@ -2330,9 +2273,7 @@ ppd_get_group(ppd_file_t *ppd, /* I - PPD file */
memset(group, 0, sizeof(ppd_group_t));
strlcpy(group->name, name, sizeof(group->name));
cupsCharsetToUTF8((cups_utf8_t *)group->text, text,
sizeof(group->text), encoding);
strlcpy(group->text, text, sizeof(group->text));
}
return (group);
+50 -71
Ver Arquivo
@@ -64,13 +64,11 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
ipp_t *response; /* IPP response data */
size_t length; /* Content-Length value */
http_status_t status; /* Status of HTTP request */
int got_status; /* Did we get the status? */
ipp_state_t state; /* State of IPP processing */
FILE *file; /* File to send */
struct stat fileinfo; /* File information */
int bytes; /* Number of bytes read/written */
char buffer[32768]; /* Output buffer */
http_status_t expect; /* Expect: header to use */
char buffer[65536]; /* Output buffer */
DEBUG_printf(("cupsDoFileRequest(%p, %p, \'%s\', \'%s\')\n",
@@ -119,7 +117,7 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
ippDelete(request);
_cupsSetError(IPP_NOT_POSSIBLE, strerror(EISDIR));
_cupsSetError(IPP_NOT_POSSIBLE, NULL);
return (NULL);
}
@@ -147,7 +145,6 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
response = NULL;
status = HTTP_ERROR;
expect = HTTP_CONTINUE;
while (response == NULL)
{
@@ -165,7 +162,7 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
httpSetLength(http, length);
httpSetField(http, HTTP_FIELD_CONTENT_TYPE, "application/ipp");
httpSetField(http, HTTP_FIELD_AUTHORIZATION, http->authstring);
httpSetExpect(http, expect);
httpSetExpect(http, HTTP_CONTINUE);
DEBUG_printf(("cupsDoFileRequest: authstring=\"%s\"\n", http->authstring));
@@ -187,58 +184,54 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
}
/*
* Send the IPP data...
* Wait up to 1 second for a 100-continue response...
*/
DEBUG_puts("cupsDoFileRequest: ipp write...");
request->state = IPP_IDLE;
status = HTTP_CONTINUE;
got_status = 0;
while ((state = ippWrite(http, request)) != IPP_DATA)
if (state == IPP_ERROR)
break;
else if (httpCheck(http))
{
got_status = 1;
if ((status = httpUpdate(http)) != HTTP_CONTINUE)
break;
}
if (!got_status)
{
/*
* Wait up to 1 second to get the 100-continue response...
*/
if (httpWait(http, 1000))
status = httpUpdate(http);
}
else if (httpCheck(http))
if (httpWait(http, 1000))
status = httpUpdate(http);
else
status = HTTP_CONTINUE;
if (status == HTTP_CONTINUE && state == IPP_DATA && filename)
if (status == HTTP_CONTINUE)
{
DEBUG_puts("cupsDoFileRequest: file write...");
/*
* Send the file...
* Send the IPP data...
*/
rewind(file);
DEBUG_puts("cupsDoFileRequest: ipp write...");
while ((bytes = (int)fread(buffer, 1, sizeof(buffer), file)) > 0)
{
if (httpCheck(http))
request->state = IPP_IDLE;
while ((state = ippWrite(http, request)) != IPP_DATA)
if (state == IPP_ERROR)
break;
else if (httpCheck(http))
{
if ((status = httpUpdate(http)) != HTTP_CONTINUE)
break;
}
if (httpWrite2(http, buffer, bytes) < bytes)
break;
if (state == IPP_DATA && filename)
{
DEBUG_puts("cupsDoFileRequest: file write...");
/*
* Send the file...
*/
rewind(file);
while ((bytes = (int)fread(buffer, 1, sizeof(buffer), file)) > 0)
{
if (httpCheck(http))
{
if ((status = httpUpdate(http)) != HTTP_CONTINUE)
break;
}
if (httpWrite2(http, buffer, bytes) < bytes)
break;
}
}
}
@@ -280,15 +273,10 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
}
else if (status == HTTP_ERROR)
{
DEBUG_printf(("cupsDoFileRequest: http->error=%d (%s)\n", http->error,
strerror(http->error)));
#ifdef WIN32
if (http->error != WSAENETDOWN && http->error != WSAENETUNREACH &&
http->error != ETIMEDOUT)
if (http->error != WSAENETDOWN && http->error != WSAENETUNREACH)
#else
if (http->error != ENETDOWN && http->error != ENETUNREACH &&
http->error != ETIMEDOUT)
if (http->error != ENETDOWN && http->error != ENETUNREACH)
#endif /* WIN32 */
continue;
else
@@ -314,14 +302,6 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
continue;
}
#endif /* HAVE_SSL */
else if (status == HTTP_EXPECTATION_FAILED)
{
/*
* Don't try using the Expect: header the next time around...
*/
expect = (http_status_t)0;
}
else if (status != HTTP_OK)
{
DEBUG_printf(("cupsDoFileRequest: error %d...\n", status));
@@ -343,21 +323,20 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
response = ippNew();
while ((state = ippRead(http, response)) != IPP_DATA)
if (state == IPP_ERROR)
{
/*
* Delete the response...
*/
if (ippRead(http, response) == IPP_ERROR)
{
/*
* Delete the response...
*/
DEBUG_puts("IPP read error!");
ippDelete(response);
response = NULL;
DEBUG_puts("IPP read error!");
ippDelete(response);
response = NULL;
_cupsSetError(IPP_SERVICE_UNAVAILABLE, strerror(errno));
_cupsSetError(IPP_SERVICE_UNAVAILABLE, strerror(errno));
break;
}
break;
}
}
}
+2 -8
Ver Arquivo
@@ -96,10 +96,7 @@ _cups_vsnprintf(char *buffer, /* O - Output buffer */
if (*format == '*')
{
/*
* Get width from argument...
*/
// Get width from argument...
format ++;
width = va_arg(ap, int);
@@ -128,10 +125,7 @@ _cups_vsnprintf(char *buffer, /* O - Output buffer */
if (*format == '*')
{
/*
* Get precision from argument...
*/
// Get precision from argument...
format ++;
prec = va_arg(ap, int);
+23 -97
Ver Arquivo
@@ -46,24 +46,9 @@
#include <stdlib.h>
#include <limits.h>
#include "array.h"
#include "debug.h"
#include "string.h"
#ifdef HAVE_PTHREAD_H
# include <pthread.h>
#endif /* HAVE_PTHREAD_H */
/*
* Local globals...
*/
#ifdef HAVE_PTHREAD_H
static pthread_mutex_t sp_mutex = PTHREAD_MUTEX_INITIALIZER;
/* Mutex to control access to pool */
#endif /* HAVE_PTHREAD_H */
static cups_array_t *stringpool = NULL;
/* Global string pool */
#include "globals.h"
/*
@@ -80,6 +65,7 @@ static int compare_sp_items(_cups_sp_item_t *a, _cups_sp_item_t *b);
char * /* O - String pointer */
_cupsStrAlloc(const char *s) /* I - String */
{
_cups_globals_t *cg; /* Global data */
_cups_sp_item_t *item, /* String pool item */
key; /* Search key */
@@ -95,21 +81,13 @@ _cupsStrAlloc(const char *s) /* I - String */
* Get the string pool...
*/
#ifdef HAVE_PTHREAD_H
pthread_mutex_lock(&sp_mutex);
#endif /* HAVE_PTHREAD_H */
cg = _cupsGlobals();
if (!stringpool)
stringpool = cupsArrayNew((cups_array_func_t)compare_sp_items, NULL);
if (!stringpool)
{
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&sp_mutex);
#endif /* HAVE_PTHREAD_H */
if (!cg->stringpool)
cg->stringpool = cupsArrayNew((cups_array_func_t)compare_sp_items, NULL);
if (!cg->stringpool)
return (NULL);
}
/*
* See if the string is already in the pool...
@@ -117,7 +95,7 @@ _cupsStrAlloc(const char *s) /* I - String */
key.str = (char *)s;
if ((item = (_cups_sp_item_t *)cupsArrayFind(stringpool, &key)) != NULL)
if ((item = (_cups_sp_item_t *)cupsArrayFind(cg->stringpool, &key)) != NULL)
{
/*
* Found it, return the cached string...
@@ -125,10 +103,6 @@ _cupsStrAlloc(const char *s) /* I - String */
item->ref_count ++;
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&sp_mutex);
#endif /* HAVE_PTHREAD_H */
return (item->str);
}
@@ -138,13 +112,7 @@ _cupsStrAlloc(const char *s) /* I - String */
item = (_cups_sp_item_t *)calloc(1, sizeof(_cups_sp_item_t));
if (!item)
{
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&sp_mutex);
#endif /* HAVE_PTHREAD_H */
return (NULL);
}
item->ref_count = 1;
item->str = strdup(s);
@@ -152,11 +120,6 @@ _cupsStrAlloc(const char *s) /* I - String */
if (!item->str)
{
free(item);
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&sp_mutex);
#endif /* HAVE_PTHREAD_H */
return (NULL);
}
@@ -164,11 +127,7 @@ _cupsStrAlloc(const char *s) /* I - String */
* Add the string to the pool and return it...
*/
cupsArrayAdd(stringpool, item);
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&sp_mutex);
#endif /* HAVE_PTHREAD_H */
cupsArrayAdd(cg->stringpool, item);
return (item->str);
}
@@ -179,32 +138,20 @@ _cupsStrAlloc(const char *s) /* I - String */
*/
void
_cupsStrFlush(void)
_cupsStrFlush(_cups_globals_t *cg) /* I - Global data */
{
_cups_sp_item_t *item; /* Current item */
DEBUG_printf(("_cupsStrFlush(cg=%p)\n", cg));
DEBUG_printf((" %d strings in array\n", cupsArrayCount(stringpool)));
#ifdef HAVE_PTHREAD_H
pthread_mutex_lock(&sp_mutex);
#endif /* HAVE_PTHREAD_H */
for (item = (_cups_sp_item_t *)cupsArrayFirst(stringpool);
for (item = (_cups_sp_item_t *)cupsArrayFirst(cg->stringpool);
item;
item = (_cups_sp_item_t *)cupsArrayNext(stringpool))
item = (_cups_sp_item_t *)cupsArrayNext(cg->stringpool))
{
free(item->str);
free(item);
}
cupsArrayDelete(stringpool);
stringpool = NULL;
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&sp_mutex);
#endif /* HAVE_PTHREAD_H */
cupsArrayDelete(cg->stringpool);
}
@@ -295,6 +242,7 @@ _cupsStrFormatd(char *buf, /* I - String */
void
_cupsStrFree(const char *s) /* I - String to free */
{
_cups_globals_t *cg; /* Global data */
_cups_sp_item_t *item, /* String pool item */
key; /* Search key */
@@ -307,28 +255,21 @@ _cupsStrFree(const char *s) /* I - String to free */
return;
/*
* Check the string pool...
*
* We don't need to lock the mutex yet, as we only want to know if
* the stringpool is initialized. The rest of the code will still
* work if it is initialized before we lock...
* Get the string pool...
*/
if (!stringpool)
cg = _cupsGlobals();
if (!cg->stringpool)
return;
/*
* See if the string is already in the pool...
*/
#ifdef HAVE_PTHREAD_H
pthread_mutex_lock(&sp_mutex);
#endif /* HAVE_PTHREAD_H */
key.str = (char *)s;
if ((item = (_cups_sp_item_t *)cupsArrayFind(stringpool, &key)) != NULL &&
item->str == s)
if ((item = (_cups_sp_item_t *)cupsArrayFind(cg->stringpool, &key)) != NULL)
{
/*
* Found it, dereference...
@@ -342,16 +283,12 @@ _cupsStrFree(const char *s) /* I - String to free */
* Remove and free...
*/
cupsArrayRemove(stringpool, item);
cupsArrayRemove(cg->stringpool, item);
free(item->str);
free(item);
}
}
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&sp_mutex);
#endif /* HAVE_PTHREAD_H */
}
@@ -406,12 +343,6 @@ _cupsStrScand(const char *buf, /* I - Pointer to number */
if (*buf == '.')
{
/*
* Read fractional portion of number...
*/
buf ++;
if (loc && loc->decimal_point)
{
strlcpy(tempptr, loc->decimal_point, sizeof(temp) - (tempptr - temp));
@@ -465,20 +396,19 @@ _cupsStrStatistics(size_t *alloc_bytes, /* O - Allocated bytes */
tbytes, /* Total string bytes */
len; /* Length of string */
_cups_sp_item_t *item; /* Current item */
_cups_globals_t *cg; /* Global data */
/*
* Loop through strings in pool, counting everything up...
*/
#ifdef HAVE_PTHREAD_H
pthread_mutex_lock(&sp_mutex);
#endif /* HAVE_PTHREAD_H */
cg = _cupsGlobals();
for (count = 0, abytes = 0, tbytes = 0,
item = (_cups_sp_item_t *)cupsArrayFirst(stringpool);
item = (_cups_sp_item_t *)cupsArrayFirst(cg->stringpool);
item;
item = (_cups_sp_item_t *)cupsArrayNext(stringpool))
item = (_cups_sp_item_t *)cupsArrayNext(cg->stringpool))
{
/*
* Count allocated memory, using a 64-bit aligned buffer as a basis.
@@ -490,10 +420,6 @@ _cupsStrStatistics(size_t *alloc_bytes, /* O - Allocated bytes */
tbytes += item->ref_count * len;
}
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&sp_mutex);
#endif /* HAVE_PTHREAD_H */
/*
* Return values...
*/
+2 -4
Ver Arquivo
@@ -31,14 +31,13 @@
* Include necessary headers...
*/
# include <config.h>
# include <stdio.h>
# include <stdlib.h>
# include <stdarg.h>
# include <ctype.h>
# include <locale.h>
# include <config.h>
# ifdef HAVE_STRING_H
# include <string.h>
# endif /* HAVE_STRING_H */
@@ -132,7 +131,6 @@ extern int _cups_vsnprintf(char *, size_t, const char *, va_list);
*/
extern char *_cupsStrAlloc(const char *s);
extern void _cupsStrFlush(void);
extern void _cupsStrFree(const char *s);
extern size_t _cupsStrStatistics(size_t *alloc_bytes, size_t *total_bytes);
+2 -4
Ver Arquivo
@@ -126,7 +126,6 @@
*OpenUI IntOption/Integer: PickOne
*OrderDependency: 10 AnySetup *IntOption
*DefaultIntOption: None
*IntOption None: ""
*IntOption 1: "IntOption=1"
*IntOption 2: "IntOption=2"
*IntOption 3: "IntOption=3"
@@ -138,13 +137,12 @@
*OpenUI StringOption/String: PickOne
*OrderDependency: 10 AnySetup *StringOption
*DefaultStringOption: None
*StringOption None: ""
*StringOption foo: "StringOption=foo"
*StringOption bar: "StringOption=bar"
*CloseUI: *StringOption
*CustomStringOption True/Custom String: "StringOption=Custom"
*ParamCustomStringOption String: 1 string 1 10
*CustomStringOption True/Custom Stringeger: "StringOption=Custom"
*ParamCustomStringOption String: 1 string * **********
*CloseGroup: Extended
+1 -17
Ver Arquivo
@@ -70,7 +70,6 @@ main(int argc, /* I - Number of command-line arguments */
cups_dir_t *dir; /* Current directory */
cups_dentry_t *dent; /* Directory entry */
char *saved[32]; /* Saved entries */
void *data; /* User data for arrays */
/*
@@ -85,8 +84,7 @@ main(int argc, /* I - Number of command-line arguments */
fputs("cupsArrayNew: ", stdout);
data = (void *)"testarray";
array = cupsArrayNew((cups_array_func_t)strcmp, data);
array = cupsArrayNew((cups_array_func_t)strcmp, NULL);
if (array)
puts("PASS");
@@ -96,20 +94,6 @@ main(int argc, /* I - Number of command-line arguments */
status ++;
}
/*
* cupsArrayUserData()
*/
fputs("cupsArrayUserData: ", stdout);
if (cupsArrayUserData(array) == data)
puts("PASS");
else
{
printf("FAIL (returned %p instead of %p!)\n", cupsArrayUserData(array),
data);
status ++;
}
/*
* cupsArrayAdd()
*/
+2 -6
Ver Arquivo
@@ -94,8 +94,6 @@ static uri_test_t uri_tests[] = /* URI test data */
"mailto", "", "", "user@domain.com", 0, 0 },
{ HTTP_URI_OK, "socket://server/",
"socket", "", "server", "/", 9100, 0 },
{ HTTP_URI_OK, "socket://192.168.1.1:9101/",
"socket", "", "192.168.1.1", "/", 9101, 9101 },
{ HTTP_URI_OK, "ipp://username:password@[v1.fe80::200:1234:5678:9abc+eth0]:999/ipp",
"ipp", "username:password", "fe80::200:1234:5678:9abc%eth0", "/ipp", 999, 999 },
{ HTTP_URI_OK, "http://server/admin?DEVICE_URI=usb://HP/Photosmart%25202600%2520series?serial=MY53OK70V10400",
@@ -114,8 +112,6 @@ static uri_test_t uri_tests[] = /* URI test data */
/* Missing resource */
{ HTTP_URI_MISSING_RESOURCE, "socket://[::192.168.2.1]",
"socket", "", "::192.168.2.1", "/", 9100, 0 },
{ HTTP_URI_MISSING_RESOURCE, "socket://192.168.1.1:9101",
"socket", "", "192.168.1.1", "/", 9101 },
/* Bad URI */
{ HTTP_URI_BAD_URI, "",
@@ -501,8 +497,8 @@ main(int argc, /* I - Number of command-line arguments */
current = time(NULL);
if (current == start) current ++;
printf("\r" CUPS_LLFMT "/" CUPS_LLFMT " bytes ("
CUPS_LLFMT " bytes/sec) ", CUPS_LLCAST total,
CUPS_LLCAST length, CUPS_LLCAST (total / (current - start)));
CUPS_LLFMT " bytes/sec) ", total, length,
total / (current - start));
fflush(stdout);
}
}
+573 -342
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+10 -100
Ver Arquivo
@@ -45,23 +45,6 @@
#endif /* WIN32 */
/*
* Test data...
*/
static const char *default_code =
"[{\n"
"%%BeginFeature: *PageRegion Letter\n"
"PageRegion=Letter\n"
"%%EndFeature\n"
"} stopped cleartomark\n"
"[{\n"
"%%BeginFeature: *InputSlot Tray\n"
"InputSlot=Tray\n"
"%%EndFeature\n"
"} stopped cleartomark\n";
/*
* 'main()' - Main entry.
*/
@@ -72,101 +55,28 @@ main(int argc, /* I - Number of command-line arguments */
{
ppd_file_t *ppd; /* PPD file loaded from disk */
int status; /* Status of tests (0 = success, 1 = fail) */
int conflicts; /* Number of conflicts */
char *s; /* String */
status = 0;
if (argc == 1)
{
fputs("ppdOpenFile: ", stdout);
fputs("ppdOpenFile: ", stdout);
if ((ppd = ppdOpenFile("test.ppd")) != NULL)
puts("PASS");
else
{
ppd_status_t err; /* Last error in file */
int line; /* Line number in file */
status ++;
err = ppdLastError(&line);
printf("FAIL (%s on line %d)\n", ppdErrorString(err), line);
}
fputs("ppdMarkDefaults: ", stdout);
ppdMarkDefaults(ppd);
if ((conflicts = ppdConflicts(ppd)) == 0)
puts("PASS");
else
{
status ++;
printf("FAIL (%d conflicts)\n", conflicts);
}
fputs("ppdEmitString: ", stdout);
if ((s = ppdEmitString(ppd, PPD_ORDER_ANY, 0.0)) != NULL &&
!strcmp(s, default_code))
puts("PASS");
else
{
printf("FAIL (%d bytes instead of %d)\n", s ? (int)strlen(s) : 0,
(int)strlen(default_code));
if (s)
puts(s);
}
if (s)
free(s);
ppdClose(ppd);
}
if ((ppd = ppdOpenFile("test.ppd")) != NULL)
puts("PASS");
else
{
if ((ppd = ppdOpenFile(argv[1])) == NULL)
{
ppd_status_t err; /* Last error in file */
int line; /* Line number in file */
ppd_status_t err; /* Last error in file */
int line; /* Line number in file */
status ++;
err = ppdLastError(&line);
status ++;
err = ppdLastError(&line);
printf("%s: %s on line %d\n", argv[1], ppdErrorString(err), line);
}
else
{
int i, j, k; /* Looping vars */
ppd_group_t *group; /* Option group */
ppd_option_t *option; /* Option */
ppdLocalize(ppd);
for (i = ppd->num_groups, group = ppd->groups;
i > 0;
i --, group ++)
{
printf("%s (%s):\n", group->name, group->text);
for (j = group->num_options, option = group->options;
j > 0;
j --, option ++)
{
printf(" %s (%s):\n", option->keyword, option->text);
for (k = 0; k < option->num_choices; k ++)
printf(" - %s (%s)\n", option->choices[k].choice,
option->choices[k].text);
}
}
}
printf("FAIL (%s on line %d)\n", ppdErrorString(err), line);
}
ppdClose(ppd);
return (status);
}
+1219 -1128
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+101 -30
Ver Arquivo
@@ -1,7 +1,7 @@
/*
* "$Id$"
*
* Transcoding definitions for the Common UNIX Printing System (CUPS).
* Transcoding support for the Common UNIX Printing System (CUPS).
*
* Copyright 1997-2006 by Easy Software Products.
*
@@ -36,45 +36,116 @@ extern "C" {
# endif /* __cplusplus */
/*
* Constants...
*/
# define CUPS_MAX_USTRING 8192 /* Max size of Unicode string */
/*
* Types...
*/
typedef unsigned char cups_utf8_t; /* UTF-8 Unicode/ISO-10646 unit */
typedef unsigned long cups_utf32_t; /* UTF-32 Unicode/ISO-10646 unit */
typedef unsigned short cups_ucs2_t; /* UCS-2 Unicode/ISO-10646 unit */
typedef unsigned long cups_ucs4_t; /* UCS-4 Unicode/ISO-10646 unit */
typedef unsigned char cups_sbcs_t; /* SBCS Legacy 8-bit unit */
typedef unsigned short cups_dbcs_t; /* DBCS Legacy 16-bit unit */
typedef unsigned long cups_vbcs_t; /* VBCS Legacy 32-bit unit */
/* EUC uses 8, 16, 24, 32-bit */
typedef unsigned char cups_utf8_t; /* UTF-8 Unicode/ISO-10646 unit */
typedef unsigned short cups_utf16_t; /* UTF-16 Unicode/ISO-10646 unit */
typedef unsigned long cups_utf32_t; /* UTF-32 Unicode/ISO-10646 unit */
typedef unsigned short cups_ucs2_t; /* UCS-2 Unicode/ISO-10646 unit */
typedef unsigned long cups_ucs4_t; /* UCS-4 Unicode/ISO-10646 unit */
typedef unsigned char cups_sbcs_t; /* SBCS Legacy 8-bit unit */
typedef unsigned short cups_dbcs_t; /* DBCS Legacy 16-bit unit */
typedef unsigned long cups_vbcs_t; /* VBCS Legacy 32-bit unit */
/* EUC uses 8, 16, 24, 32-bit */
/*
* Structures...
*/
typedef struct _cups_cmap_s /**** SBCS Charmap Struct ****/
{
struct _cups_cmap_s *next; /* Next charmap in cache */
int used; /* Number of times entry used */
cups_encoding_t encoding; /* Legacy charset encoding */
cups_ucs2_t char2uni[256]; /* Map Legacy SBCS -> UCS-2 */
cups_sbcs_t *uni2char[256]; /* Map UCS-2 -> Legacy SBCS */
} _cups_cmap_t;
typedef struct _cups_wide2uni_s /**** Wide to Unicode ****/
{
cups_vbcs_t widechar; /* VBCS 32-bit Char (EUC) */
cups_ucs2_t unichar; /* UCS-2 Char */
} _cups_wide2uni_t;
typedef struct _cups_vmap_s /**** VBCS Charmap Struct ****/
{
struct _cups_vmap_s *next; /* Next charmap in cache */
int used; /* Number of times entry used */
cups_encoding_t encoding; /* Legacy charset encoding */
cups_ucs2_t *char2uni[256]; /* Map 16-bit Char -> UCS-2 */
int charcount; /* Count of 16-bit VBCS Chars */
_cups_wide2uni_t *wide2uni; /* Map 32-bit Char -> UCS-2 */
int widecount; /* Count of 32-bit VBCS Chars */
cups_vbcs_t *uni2char[256]; /* Map UCS-2 -> 32-bit VBCS */
cups_sbcs_t lead2char[256]; /* Legacy Lead Char - 2-byte */
cups_sbcs_t lead3char[256]; /* Legacy Lead Char - 3-byte */
cups_sbcs_t lead4char[256]; /* Legacy Lead Char - 4-byte */
} _cups_vmap_t;
/*
* Constants...
*/
# define CUPS_MAX_USTRING 8192 /* Max size of Unicode string */
# define CUPS_MAX_CHARMAP_LINES 100000 /* Max lines in charmap file */
/*
* Prototypes...
*/
extern int cupsCharsetToUTF8(cups_utf8_t *dest,
const char *src,
const int maxout,
const cups_encoding_t encoding);
extern int cupsUTF8ToCharset(char *dest,
const cups_utf8_t *src,
const int maxout,
const cups_encoding_t encoding);
extern int cupsUTF8ToUTF32(cups_utf32_t *dest,
const cups_utf8_t *src,
const int maxout);
extern int cupsUTF32ToUTF8(cups_utf8_t *dest,
const cups_utf32_t *src,
const int maxout);
/*
* Utility functions for character set maps
*/
extern void *cupsCharmapGet(const cups_encoding_t encoding);
extern void cupsCharmapFree(const cups_encoding_t encoding);
extern void cupsCharmapFlush(void);
/*
* Convert UTF-8 to and from legacy character set
*/
extern int cupsUTF8ToCharset(char *dest,
const cups_utf8_t *src,
const int maxout,
const cups_encoding_t encoding);
extern int cupsCharsetToUTF8(cups_utf8_t *dest,
const char *src,
const int maxout,
const cups_encoding_t encoding);
/*
* Convert UTF-8 to and from UTF-16
*/
extern int cupsUTF8ToUTF16(cups_utf16_t *dest,
const cups_utf8_t *src,
const int maxout);
extern int cupsUTF16ToUTF8(cups_utf8_t *dest,
const cups_utf16_t *src,
const int maxout);
/*
* Convert UTF-8 to and from UTF-32
*/
extern int cupsUTF8ToUTF32(cups_utf32_t *dest,
const cups_utf8_t *src,
const int maxout);
extern int cupsUTF32ToUTF8(cups_utf8_t *dest,
const cups_utf32_t *src,
const int maxout);
/*
* Convert UTF-16 to and from UTF-32
*/
extern int cupsUTF16ToUTF32(cups_utf32_t *dest,
const cups_utf16_t *src,
const int maxout);
extern int cupsUTF32ToUTF16(cups_utf16_t *dest,
const cups_utf32_t *src,
const int maxout);
# ifdef __cplusplus
}
+10
Ver Arquivo
@@ -41,6 +41,7 @@ CHARMAPS = \
euc-jp.txt \
euc-kr.txt \
euc-tw.txt \
i18n_sdd.txt \
iso-8859-10.txt \
iso-8859-11.txt \
iso-8859-13.txt \
@@ -59,6 +60,15 @@ CHARMAPS = \
koi8-r.txt \
koi8-u.txt \
mac-roman.txt \
unibreak.txt \
uni-comb.txt \
uni-fold.txt \
uni-full.txt \
uni-line.txt \
uni-nfc.txt \
uni-nfd.txt \
uni-nfkd.txt \
uni-prop.txt \
windows-1250.txt \
windows-1251.txt \
windows-1252.txt \
+2337
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
-28
Ver Arquivo
@@ -1,28 +0,0 @@
%!PS-Adobe-3.0
%%BoundingBox: 36 36 576 756
%%Pages: 1
%%LanguageLevel: 2
%%EndComments
%%Page: (1) 1
% Draw a black box around the page
0 setgray
1 setlinewidth
36 36 540 720 rectstroke
% Draw a two inch blue circle in the middle of the page
0 0 1 setrgbcolor
306 396 144 0 360 arc closepath fill
% Draw two half inch yellow circles for eyes
1 1 0 setrgbcolor
252 432 36 0 360 arc closepath fill
360 432 36 0 360 arc closepath fill
% Draw the smile
1 setlinecap
18 setlinewidth
306 396 99 200 340 arc stroke
% Print it!
showpage
%%EOF

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