Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 53b898e28b |
@@ -1,25 +0,0 @@
|
||||
CREDITS.txt - 10/01/1999
|
||||
------------------------
|
||||
|
||||
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.
|
||||
Dr. ZP Han - setgid()/setuid().
|
||||
Guy Harris - *BSD shared libraries and lots of other fixes.
|
||||
Wang Jian - CUPS RPM corrections.
|
||||
Roderick Johnstone - Beta tester of the millenium.
|
||||
Sergey V. Kovalyov - ESP Print Pro and CUPS beta tester.
|
||||
Mark Lawrence - Microsoft interoperability testing.
|
||||
Jason McMullan - Original CUPS RPM distributions.
|
||||
Wes Morgan - *BSD fixes.
|
||||
Ulrich Oldendorf - German locale.
|
||||
Petter Reinholdtsen - HP-UX compiler stuff.
|
||||
Stuart Stevens - HP JetDirect IPP information.
|
||||
Kiko - Bug fixes.
|
||||
|
||||
If I've missed someone, please let me know by sending an email to
|
||||
"mike@easysw.com".
|
||||
+332
@@ -0,0 +1,332 @@
|
||||
Common UNIX Printing System License Agreement
|
||||
|
||||
Copyright 1997-1999 by Easy Software Products
|
||||
44141 AIRPORT VIEW DR STE 204
|
||||
HOLLYWOOD, MARYLAND 20636-3111 USA
|
||||
|
||||
Voice: +1.301.373.9603
|
||||
Email: cups-info@cups.org
|
||||
WWW: http://www.cups.org
|
||||
|
||||
Introduction
|
||||
|
||||
The Common UNIX Printing SystemTM, or CUPSTM, is provided under the GNU
|
||||
General Public License, Version 2. A copy of this license follows this
|
||||
introduction.
|
||||
|
||||
For those not familiar with the GNU General Public License, the license
|
||||
basically allows you to:
|
||||
|
||||
* Use the CUPS software at no charge.
|
||||
* Distribute verbatim copies of the software in source or binary form.
|
||||
* Sell verbatim copies of the software for a media fee, or sell support
|
||||
for the software.
|
||||
* Distribute or sell printer drivers and filters that use the CUPS API so
|
||||
long as source code is made available under the GPL.
|
||||
|
||||
What this license does not allow you to do is make changes or add features
|
||||
to CUPS and then sell a binary distribution without source code. You have to
|
||||
provide source for any new drivers, changes, or additions to the software,
|
||||
and all code must be provided under the GPL.
|
||||
|
||||
Also, since we have trademarked the Common UNIX Printing System, CUPS, and
|
||||
CUPS logo, you may not release a derivative product using those names
|
||||
without permission from Easy Software Products.
|
||||
|
||||
Binary Distribution Rights
|
||||
|
||||
Easy Software Products also sells rights to the CUPS source code under a
|
||||
binary distribution license for vendors that are unable to release source
|
||||
code for their drivers or additions and modifications to CUPS under the GPL.
|
||||
For pricing information please contact us at the address shown above.
|
||||
|
||||
The Common UNIX Printing System utilizes GNU GhostScript 4.03 to convert
|
||||
PostScript files into a stream of raster images. For binary distribution
|
||||
licensing of this software, please contact:
|
||||
|
||||
Miles Jones
|
||||
Director of Marketing
|
||||
Artifex Software Inc.
|
||||
454 Las Gallinas Ave., Suite 108
|
||||
San Rafael, CA 94903 USA
|
||||
Voice: +1.415.492.9861
|
||||
Fax: +1.415.492.9862
|
||||
EMail: info@arsoft.com
|
||||
|
||||
Support
|
||||
|
||||
Easy Software Products sells software support for distributors and resellers
|
||||
of CUPS. Support for users of CUPS is available from Easy Software Products
|
||||
through our ESP Print software.
|
||||
|
||||
Trademarks
|
||||
|
||||
The Common UNIX Printing System, CUPS, and the CUPS logo are the trademark
|
||||
property of Easy Software Products. Any derivative of this software may not
|
||||
use any of these trademarks without the expressed written consent of Easy
|
||||
Software Products.
|
||||
|
||||
GNU General Public License
|
||||
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom to
|
||||
share and change it. By contrast, the GNU General Public License is intended
|
||||
to guarantee your freedom to share and change free software--to make sure
|
||||
the software is free for all its users. This General Public License applies
|
||||
to most of the Free Software Foundation's software and to any other program
|
||||
whose authors commit to using it. (Some other Free Software Foundation
|
||||
software is covered by the GNU Library General Public License instead.) You
|
||||
can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our
|
||||
General Public Licenses are designed to make sure that you have the freedom
|
||||
to distribute copies of free software (and charge for this service if you
|
||||
wish), that you receive source code or can get it if you want it, that you
|
||||
can change the software or use pieces of it in new free programs; and that
|
||||
you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid anyone to
|
||||
deny you these rights or to ask you to surrender the rights. These
|
||||
restrictions translate to certain responsibilities for you if you distribute
|
||||
copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or
|
||||
for a fee, you must give the recipients all the rights that you have. You
|
||||
must make sure that they, too, receive or can get the source code. And you
|
||||
must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and (2)
|
||||
offer you this license which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain that
|
||||
everyone understands that there is no warranty for this free software. If
|
||||
the software is modified by someone else and passed on, we want its
|
||||
recipients to know that what they have is not the original, so that any
|
||||
problems introduced by others will not reflect on the original authors'
|
||||
reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software patents. We
|
||||
wish to avoid the danger that redistributors of a free program will
|
||||
individually obtain patent licenses, in effect making the program
|
||||
proprietary. To prevent this, we have made it clear that any patent must be
|
||||
licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification
|
||||
follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
1. This License applies to any program or other work which contains a
|
||||
notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of running
|
||||
the Program is not restricted, and the output from the Program is
|
||||
covered only if its contents constitute a work based on the Program
|
||||
(independent of having been made by running the Program). Whether that
|
||||
is true depends on what the Program does.
|
||||
2. You may copy and distribute verbatim copies of the Program's source
|
||||
code as you receive it, in any medium, provided that you conspicuously
|
||||
and appropriately publish on each copy an appropriate copyright notice
|
||||
and disclaimer of warranty; keep intact all the notices that refer to
|
||||
this License and to the absence of any warranty; and give any other
|
||||
recipients of the Program a copy of this License along with the
|
||||
Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
3. You may modify your copy or copies of the Program or any portion of it,
|
||||
thus forming a work based on the Program, and copy and distribute such
|
||||
modifications or work under the terms of Section 1 above, provided that
|
||||
you also meet all of these conditions:
|
||||
a. You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
b. You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
c. if the modified program normally reads commands interactively when
|
||||
run, you must cause it, when started running for such interactive
|
||||
use in the most ordinary way, to print or display an announcement
|
||||
including an appropriate copyright notice and a notice that there
|
||||
is no warranty (or else, saying that you provide a warranty) and
|
||||
that users may redistribute the program under these conditions,
|
||||
and telling the user how to view a copy of this License.
|
||||
(Exception: if the Program itself is interactive but does not
|
||||
normally print such an announcement, your work based on the
|
||||
Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of a
|
||||
storage or distribution medium does not bring the other work under the
|
||||
scope of this License.
|
||||
4. You may copy and distribute the Program (or a work based on it, under
|
||||
Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
a. Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software
|
||||
interchange; or,
|
||||
b. Accompany it with a written offer, valid for at least three years,
|
||||
to give any third party, for a charge no more than your cost of
|
||||
physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
c. Accompany it with the information you received as to the offer to
|
||||
distribute corresponding source code. (This alternative is allowed
|
||||
only for noncommercial distribution and only if you received the
|
||||
program in object code or executable form with such an offer, in
|
||||
accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to control
|
||||
compilation and installation of the executable. However, as a special
|
||||
exception, the source code distributed need not include anything that
|
||||
is normally distributed (in either source or binary form) with the
|
||||
major components (compiler, kernel, and so on) of the operating system
|
||||
on which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering access
|
||||
to copy from a designated place, then offering equivalent access to
|
||||
copy the source code from the same place counts as distribution of the
|
||||
source code, even though third parties are not compelled to copy the
|
||||
source along with the object code.
|
||||
5. You may not copy, modify, sublicense, or distribute the Program except
|
||||
as expressly provided under this License. Any attempt otherwise to
|
||||
copy, modify, sublicense or distribute the Program is void, and will
|
||||
automatically terminate your rights under this License. However,
|
||||
parties who have received copies, or rights, from you under this
|
||||
License will not have their licenses terminated so long as such parties
|
||||
remain in full compliance.
|
||||
6. You are not required to accept this License, since you have not signed
|
||||
it. However, nothing else grants you permission to modify or distribute
|
||||
the Program or its derivative works. These actions are prohibited by
|
||||
law if you do not accept this License. Therefore, by modifying or
|
||||
distributing the Program (or any work based on the Program), you
|
||||
indicate your acceptance of this License to do so, and all its terms
|
||||
and conditions for copying, distributing or modifying the Program or
|
||||
works based on it.
|
||||
7. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further restrictions
|
||||
on the recipients' exercise of the rights granted herein. You are not
|
||||
responsible for enforcing compliance by third parties to this License.
|
||||
8. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent license
|
||||
would not permit royalty-free redistribution of the Program by all
|
||||
those who receive copies directly or indirectly through you, then the
|
||||
only way you could satisfy both it and this License would be to refrain
|
||||
entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made generous
|
||||
contributions to the wide range of software distributed through that
|
||||
system in reliance on consistent application of that system; it is up
|
||||
to the author/donor to decide if he or she is willing to distribute
|
||||
software through any other system and a licensee cannot impose that
|
||||
choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
9. If the distribution and/or use of the Program is restricted in certain
|
||||
countries either by patents or by copyrighted interfaces, the original
|
||||
copyright holder who places the Program under this License may add an
|
||||
explicit geographical distribution limitation excluding those
|
||||
countries, so that distribution is permitted only in or among countries
|
||||
not thus excluded. In such case, this License incorporates the
|
||||
limitation as if written in the body of this License.
|
||||
10. The Free Software Foundation may publish revised and/or new versions of
|
||||
the General Public License from time to time. Such new versions will be
|
||||
similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Program does not specify a version
|
||||
number of this License, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
11. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the
|
||||
author to ask for permission. For software which is copyrighted by the
|
||||
Free Software Foundation, write to the Free Software Foundation; we
|
||||
sometimes make exceptions for this. Our decision will be guided by the
|
||||
two goals of preserving the free status of all derivatives of our free
|
||||
software and of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
|
||||
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
|
||||
YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
|
||||
NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
|
||||
DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
|
||||
DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
|
||||
(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
|
||||
INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
|
||||
THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
|
||||
OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
+1
-3
@@ -37,7 +37,6 @@ DSO = @DSO@
|
||||
HTMLDOC = @HTMLDOC@
|
||||
LN = /bin/ln -sf
|
||||
MKDIR = @MKDIR@ -p
|
||||
MV = @MV@
|
||||
NROFF = @NROFF@
|
||||
PACK = @PACK@
|
||||
RANLIB = @RANLIB@
|
||||
@@ -70,8 +69,7 @@ CFLAGS = @CFLAGS@ $(OPTIM) -I.. $(OPTIONS)
|
||||
DSOLIBS = @DSOLIBS@
|
||||
IMGLIBS = @IMGLIBS@ -lm
|
||||
LDFLAGS = @LDFLAGS@ $(OPTIM)
|
||||
LIBS = -L../cups -lcups $(NETLIBS) @LIBS@
|
||||
NETLIBS = @NETLIBS@
|
||||
LIBS = -L../cups -lcups @LIBS@
|
||||
OPTIM = @OPTIM@
|
||||
OPTIONS =
|
||||
|
||||
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>README - Common UNIX Printing System</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
|
||||
<H1>README - CUPS v1.0b4</H1>
|
||||
|
||||
<H2>Contents</H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="#intro">Introduction</A>
|
||||
<LI><A HREF="#require">Requirements</A>
|
||||
<LI><A HREF="#use">Using CUPS</A>
|
||||
<LI><A HREF="#known">Known Problems</A>
|
||||
<LI><A HREF="#report">Reporting Problems</A>
|
||||
<LI><A HREF="#resources">Other Resources</A>
|
||||
<LI><A HREF="#legal">Legal Stuff</A>
|
||||
</UL>
|
||||
|
||||
<H2><A NAME="intro">Introduction</A></H2>
|
||||
|
||||
The Common UNIX Printing System provides a portable printing layer for
|
||||
UNIX® operating systems. It has been developed by Easy Software
|
||||
Products to promote a standard printing solution for all UNIX vendors
|
||||
and users. CUPS provides the System V and Berkeley command-line
|
||||
interfaces.
|
||||
|
||||
<P>CUPS uses the Internet Printing Protocol (IETF-IPP) as the basis
|
||||
for managing print jobs and queues. The Line Printer Daemon (LPD,
|
||||
RFC1179), Server Message Block (SMB), and AppSocket protocols are also
|
||||
supported with reduced functionality.
|
||||
|
||||
<P>CUPS adds network printer browsing and PostScript Printer
|
||||
Description ("PPD")-based printing options to support real
|
||||
world applications under UNIX.
|
||||
|
||||
<P>CUPS also includes a customized version of GNU GhostScript (currently
|
||||
based off GNU GhostScript 4.03) and an image file RIP that can be used to
|
||||
support non-PostScript printers.
|
||||
|
||||
<H2><A NAME="require">Requirements</A></H2>
|
||||
|
||||
You'll need an ANSI C compiler to build CUPS on your system. As its name
|
||||
implies, CUPS is designed to run on the UNIX operating system, however
|
||||
the CUPS interface library and most of the filters and backends supplied
|
||||
with CUPS should also run under Microsoft® Windows®.
|
||||
|
||||
<P>For the image file filters you'll need the JPEG, PNG, TIFF, and ZLIB
|
||||
libraries. CUPS will build without these, but with reduced functionality.
|
||||
|
||||
<P>If you make changes to the man pages you'll need GNU groff or another
|
||||
nroff-like package.
|
||||
|
||||
<P>The documentation is formatted using the HTMLDOC software (again, not
|
||||
needed unless you make changes.)
|
||||
|
||||
<H2><A NAME="use">Using CUPS</A></H2>
|
||||
|
||||
<P>Pre-compiled binary distributions are available for CUPS from our
|
||||
web site at
|
||||
<A HREF="http://www.cups.org/software.html">http://www.cups.org/software.html</A>.
|
||||
If you'd like to build CUPS from the source, please read the Software
|
||||
Administrator's Manual.
|
||||
|
||||
<P>Once you have installed CUPS, the Software Administrator's Manual and
|
||||
Software User's Manual are excellent places to start setting things up.
|
||||
|
||||
<H2><A NAME="known">Known Problems</A></H2>
|
||||
|
||||
The following known problems are being worked on and should be resolved for
|
||||
the fourth beta release of CUPS:
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>Documentation is not completed.
|
||||
|
||||
<LI>The lpc command currently only supports the help and status
|
||||
commands.
|
||||
|
||||
</UL>
|
||||
|
||||
CUPS has been built and tested on the following operating systems:
|
||||
|
||||
<UL>
|
||||
<LI>Digital UNIX 4.0d
|
||||
<LI>HP-UX 10.20 and 11.0
|
||||
<LI>IRIX 5.3, 6.2, 6.5.3
|
||||
<LI>Linux (RedHat 5.2)
|
||||
<LI>Solaris 2.5.1, 2.6, 2.7 (aka 7)
|
||||
</UL>
|
||||
|
||||
The client libraries and filters have been successfully compiled under
|
||||
Microsoft Windows using Visual C++ 6.0.
|
||||
|
||||
<H2><A NAME="report">Reporting Problems</A></H2>
|
||||
|
||||
If you have problems, please send an email to
|
||||
<A HREF="mailto:cups-support@cups.org">cups-support@cups.org</A>. Include
|
||||
your operating system and version, compiler and version, and any errors
|
||||
or problems you've run into.
|
||||
|
||||
<H2><A NAME="resources">Other Resources</A></H2>
|
||||
|
||||
See the CUPS web site at "http://www.cups.org" for other site links.
|
||||
|
||||
<P>You can subscribe to the CUPS mailing list by sending a message containing
|
||||
"subscribe cups" to <A HREF="mailto:majordomo@cups.org">majordomo@cups.org</A>.
|
||||
This list is provided to discuss problems, questions, and improvements to
|
||||
the CUPS software. New releases of CUPS are announced to this list as well.
|
||||
|
||||
<H2><A NAME="legal">Legal Stuff</A></H2>
|
||||
|
||||
CUPS is Copyright 1993-1999 by Easy Software Products. CUPS, the CUPS logo,
|
||||
and the Common UNIX Printing System are the trademark property of Easy Software
|
||||
Products.
|
||||
|
||||
<P>CUPS is provided under the terms of the
|
||||
<A HREF="LICENSE.html">GNU General Public License</A>
|
||||
which is located in the files "LICENSE.html" and "LICENSE.txt". For commercial
|
||||
support and "binary-only" licensing information, please contact:
|
||||
|
||||
<UL>
|
||||
Attn: CUPS Licensing Information
|
||||
<BR>Easy Software Products
|
||||
<BR>44141 Airport View Drive, Suite 204
|
||||
<BR>Hollywood, Maryland 20636-3111 USA
|
||||
|
||||
<P>Voice: +1.301.373.9603
|
||||
<BR>Email: <A HREF="mailto:cups-info@cups.org">cups-info@cups.org</A>
|
||||
<BR>WWW: <A HREF="http://www.cups.org">http://www.cups.org</A>
|
||||
</UL>
|
||||
|
||||
<P>If you're interested in a complete, commercial printing solution for UNIX,
|
||||
check out our ESP Print software at <A HREF="http://www.easysw.com/print.html">
|
||||
http://www.easysw.com/print.html</A>.
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
+78
-142
@@ -1,184 +1,120 @@
|
||||
README - CUPS v1.0 - 10/01/1999
|
||||
-------------------------------
|
||||
README - CUPS v1.0b4
|
||||
--------------------
|
||||
|
||||
CONTENTS
|
||||
|
||||
* Introduction
|
||||
* Requirements
|
||||
* Using CUPS
|
||||
* Known Problems
|
||||
* Reporting Problems
|
||||
* Other Resources
|
||||
* Legal Stuff
|
||||
|
||||
|
||||
INTRODUCTION
|
||||
|
||||
The Common UNIX Printing System provides a portable printing layer for
|
||||
UNIX® operating systems. It has been developed by Easy Software
|
||||
Products to promote a standard printing solution for all UNIX vendors
|
||||
and users. CUPS provides the System V and Berkeley command-line
|
||||
interfaces.
|
||||
The Common UNIX Printing System provides a portable printing layer for UNIX®
|
||||
operating systems. It has been developed by Easy Software Products to
|
||||
promote a standard printing solution for all UNIX vendors and users. CUPS
|
||||
provides the System V and Berkeley command-line interfaces.
|
||||
|
||||
CUPS uses the Internet Printing Protocol (IETF-IPP) as the basis for
|
||||
managing print jobs and queues. The Line Printer Daemon (LPD, RFC1179)
|
||||
and AppSocket protocols are also supported with reduced functionality.
|
||||
managing print jobs and queues. The Line Printer Daemon (LPD, RFC1179),
|
||||
Server Message Block (SMB), and AppSocket protocols are also supported with
|
||||
reduced functionality.
|
||||
|
||||
CUPS adds network printer browsing and PostScript Printer Description
|
||||
("PPD")-based printing options to support real world applications under
|
||||
UNIX.
|
||||
|
||||
CUPS also includes a customized version of GNU GhostScript (currently
|
||||
based off GNU GhostScript 4.03) and an image file RIP that can be used
|
||||
to support non-PostScript printers.
|
||||
|
||||
CUPS is Copyright 1993-1999 by Easy Software Products, All Rights
|
||||
Reserved. CUPS is currently licensed under the terms of the GNU
|
||||
General Public License. Please see the license file for details.
|
||||
CUPS also includes a customized version of GNU GhostScript (currently based
|
||||
off GNU GhostScript 4.03) and an image file RIP that can be used to support
|
||||
non-PostScript printers.
|
||||
|
||||
|
||||
SYSTEM REQUIREMENTS
|
||||
REQUIREMENTS
|
||||
|
||||
Binary distributions require a minimum of 10MB of free disk space. We
|
||||
do not recommend using CUPS on a workstation with less than 32MB of RAM
|
||||
or a PC with less than 16MB of RAM.
|
||||
You'll need an ANSI C compiler to build CUPS on your system. As its name
|
||||
implies, CUPS is designed to run on the UNIX operating system, however the
|
||||
CUPS interface library and most of the filters and backends supplied with
|
||||
CUPS should also run under Microsoft® Windows®.
|
||||
|
||||
If you are installing from source you'll need an ANSI C compiler and
|
||||
optionally one or more image file support libraries. Complete source
|
||||
installation instructions can be found in the CUPS System
|
||||
Administrator's Manual in the files "doc/sam.html" or "doc/sam.pdf".
|
||||
For the image file filters you'll need the JPEG, PNG, TIFF, and ZLIB
|
||||
libraries. CUPS will build without these, but with reduced functionality.
|
||||
|
||||
If you make changes to the man pages you'll need GNU groff or another
|
||||
nroff-like package.
|
||||
|
||||
The documentation is formatted using the HTMLDOC software (again, not needed
|
||||
unless you make changes.)
|
||||
|
||||
|
||||
SOFTWARE REQUIREMENTS
|
||||
USING CUPS
|
||||
|
||||
The following operating system software is required to install one of
|
||||
the binary distributions from Easy Software Products:
|
||||
Pre-compiled binary distributions are available for CUPS from our web site
|
||||
at http://www.cups.org/software.html. If you'd like to build CUPS from the
|
||||
source, please read the Software Administrator's Manual.
|
||||
|
||||
- Digital UNIX (aka OSF1 aka Compaq Tru64 UNIX) 4.0 or higher
|
||||
- HP-UX 10.20 or higher
|
||||
- IRIX 5.3 or higher
|
||||
- Linux 2.0 with glibc2 or higher (tested with RedHat 5.2)
|
||||
- Solaris 2.5 or higher (SPARC or Intel)
|
||||
Once you have installed CUPS, the Software Administrator's Manual and
|
||||
Software User's Manual are excellent places to start setting things up.
|
||||
|
||||
|
||||
INSTALLING CUPS
|
||||
KNOWN PROBLEMS
|
||||
|
||||
We are currently distributing CUPS binary distributions in TAR format
|
||||
with installation and removal scripts generated by our ESP Package
|
||||
Manager (EPM) software, which is also included with the source
|
||||
distribution.
|
||||
The following known problems are being worked on and should be resolved for
|
||||
the fourth beta release of CUPS:
|
||||
|
||||
WARNING: Installing CUPS will overwrite your existing printing system.
|
||||
Backup files are made by the installation script and restored by the
|
||||
removal script, so if you experience problems you should be able to
|
||||
remove the CUPS software to restore your previous configuration.
|
||||
However, Easy Software Products makes no warranty for this and will not
|
||||
be liable for any lost revenues, etc.
|
||||
* Documentation is not completed.
|
||||
* The lpc command currently only supports the help and status commands.
|
||||
|
||||
To install the CUPS software you will need to be logged in as root
|
||||
(doing an "su" is good enough). Once you are the root user, run the
|
||||
installation script with:
|
||||
CUPS has been built and tested on the following operating systems:
|
||||
|
||||
./cups.install ENTER
|
||||
* Digital UNIX 4.0d
|
||||
* HP-UX 10.20 and 11.0
|
||||
* IRIX 5.3, 6.2, 6.5.3
|
||||
* Linux (RedHat 5.2)
|
||||
* Solaris 2.5.1, 2.6, 2.7 (aka 7)
|
||||
|
||||
After asking you a few yes/no questions the CUPS software will be
|
||||
installed and the scheduler will be started automatically.
|
||||
|
||||
|
||||
SETTING UP PRINTER QUEUES
|
||||
|
||||
CUPS works best with PPD (PostScript Printer Description) files. In a
|
||||
pinch you can also use System V style printer interface scripts.
|
||||
|
||||
Two sample PPD files are provided with this distribution that utilize
|
||||
the PostScript and image file RIPs and the sample HP printer driver.
|
||||
To add the sample DeskJet driver to the system for a printer connected
|
||||
to the parallel port, use one of the following commands:
|
||||
|
||||
Digital UNIX:
|
||||
|
||||
/usr/lib/lpadmin -p DeskJet -m deskjet.ppd -v parallel:/dev/lp0 -E
|
||||
|
||||
HP-UX:
|
||||
|
||||
/usr/lib/lpadmin -p DeskJet -m deskjet.ppd -v parallel:/dev/c2t0d0_lp -E
|
||||
|
||||
IRIX:
|
||||
|
||||
/usr/lib/lpadmin -p DeskJet -m deskjet.ppd -v parallel:/dev/plp -E
|
||||
|
||||
Linux:
|
||||
|
||||
/usr/lib/lpadmin -p DeskJet -m deskjet.ppd -v parallel:/dev/par0 -E
|
||||
/usr/lib/lpadmin -p DeskJet -m deskjet.ppd -v parallel:/dev/par1 -E
|
||||
/usr/lib/lpadmin -p DeskJet -m deskjet.ppd -v parallel:/dev/par2 -E
|
||||
|
||||
Solaris:
|
||||
|
||||
/usr/lib/lpadmin -p DeskJet -m deskjet.ppd -v parallel:/dev/bpp0 -E
|
||||
/usr/lib/lpadmin -p DeskJet -m deskjet.ppd -v parallel:/dev/ecpp0 -E
|
||||
|
||||
Similarly, for the sample LaserJet driver you can use "LaserJet" and
|
||||
"laserjet.ppd".
|
||||
|
||||
For other printers and interfaces see the CUPS System Administator's
|
||||
Manual included with this software.
|
||||
|
||||
If you're interested in a complete, commercial printing solution for
|
||||
UNIX, check out our ESP Print Pro software at:
|
||||
|
||||
http://www.easysw.com/printpro
|
||||
|
||||
|
||||
PRINTING FILES
|
||||
|
||||
CUPS provides both the System V "lp" and Berkeley "lpr" commands for
|
||||
printing:
|
||||
|
||||
lp filename
|
||||
lpr filename
|
||||
|
||||
Both the "lp" and "lpr" commands support printing options for the
|
||||
driver:
|
||||
|
||||
lp -omedia=A4 -oresolution=600dpi filename
|
||||
lpr -omedia=A4 -oresolution=600dpi filename
|
||||
|
||||
CUPS recognizes many types of images files as well as PostScript, HP-GL/2,
|
||||
and text files, so you can print those files directly rather than through
|
||||
an application.
|
||||
|
||||
If you have an application that generates output specifically for your
|
||||
printer then you need to use the "-oraw" or "-l" options:
|
||||
|
||||
lp -oraw filename
|
||||
lpr -l filename
|
||||
|
||||
This will prevent the filters from misinterpreting your print file.
|
||||
The client libraries and filters have been successfully compiled under
|
||||
Microsoft Windows using Visual C++ 6.0.
|
||||
|
||||
|
||||
REPORTING PROBLEMS
|
||||
|
||||
If you have problems, please send an email to cups-support@cups.org.
|
||||
Include your operating system and version, compiler and version, and
|
||||
any errors or problems you've run into.
|
||||
If you have problems, please send an email to cups-support@cups.org. Include
|
||||
your operating system and version, compiler and version, and any errors or
|
||||
problems you've run into.
|
||||
|
||||
|
||||
OTHER RESOURCES
|
||||
|
||||
See the CUPS web site at "http://www.cups.org" for other site links.
|
||||
|
||||
You can subscribe to the CUPS mailing list by sending a message
|
||||
containing "subscribe cups" to majordomo@cups.org. This list is
|
||||
provided to discuss problems, questions, and improvements to the CUPS
|
||||
software. New releases of CUPS are announced to this list as well.
|
||||
You can subscribe to the CUPS mailing list by sending a message containing
|
||||
"subscribe cups" to majordomo@cups.org. This list is provided to discuss
|
||||
problems, questions, and improvements to the CUPS software. New releases of
|
||||
CUPS are announced to this list as well.
|
||||
|
||||
|
||||
LEGAL STUFF
|
||||
|
||||
CUPS is Copyright 1993-1999 by Easy Software Products. CUPS, the CUPS
|
||||
logo, and the Common UNIX Printing System are the trademark property of
|
||||
Easy Software Products.
|
||||
CUPS is Copyright 1993-1999 by Easy Software Products. CUPS, the CUPS logo,
|
||||
and the Common UNIX Printing System are the trademark property of Easy
|
||||
Software Products.
|
||||
|
||||
CUPS is provided under the terms of the GNU General Public License
|
||||
which is located in the files "LICENSE.html" and "LICENSE.txt" (or the
|
||||
file "cups.license" for a binary distribution.) For commercial
|
||||
licensing information, please contact:
|
||||
CUPS is provided under the terms of the GNU General Public License which is
|
||||
located in the files "LICENSE.html" and "LICENSE.txt". For commercial
|
||||
support and "binary-only" licensing information, please contact:
|
||||
|
||||
Attn: CUPS Licensing Information
|
||||
Easy Software Products
|
||||
44141 Airport View Drive, Suite 204
|
||||
Hollywood, Maryland 20636-3111 USA
|
||||
Attn: CUPS Licensing Information
|
||||
Easy Software Products
|
||||
44141 Airport View Drive, Suite 204
|
||||
Hollywood, Maryland 20636-3111 USA
|
||||
|
||||
Voice: +1.301.373.9603
|
||||
Email: cups-info@cups.org
|
||||
WWW: http://www.cups.org
|
||||
Voice: +1.301.373.9603
|
||||
Email: cups-info@cups.org
|
||||
WWW: http://www.cups.org
|
||||
|
||||
If you're interested in a complete, commercial printing solution for UNIX,
|
||||
check out our ESP Print software at http://www.easysw.com/print.html.
|
||||
|
||||
+14
-1
@@ -24,7 +24,7 @@
|
||||
|
||||
include ../Makedefs
|
||||
|
||||
TARGETS = ipp lpd parallel serial socket
|
||||
TARGETS = ipp lpd parallel serial smb socket
|
||||
OBJS = ipp.o lpd.o parallel.o serial.o socket.o
|
||||
|
||||
#
|
||||
@@ -91,6 +91,19 @@ serial: serial.o ../cups/$(LIBCUPS)
|
||||
|
||||
serial.o: ../cups/cups.h ../Makedefs
|
||||
|
||||
#
|
||||
# smb
|
||||
#
|
||||
# Note: reading through these commands is a good way to get a headache... :)
|
||||
#
|
||||
|
||||
smb: smb.sh ../Makedefs
|
||||
echo Generating $@...
|
||||
$(RM) smb
|
||||
sedcmd="1,\$$s/^SMBCLIENT=.\*/SMBCLIENT=`echo $(SMBCLIENT) | sed -e '1,$$s/\\//\\\\\\//g'`/" ;\
|
||||
$(SED) -e "$$sedcmd" <smb.sh >smb
|
||||
$(CHMOD) +x smb
|
||||
|
||||
#
|
||||
# socket
|
||||
#
|
||||
|
||||
+14
-23
@@ -23,7 +23,6 @@
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* main() - Send a file to the printer or server.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -147,10 +146,12 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, uri);
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_NAME, "requesting-user-name",
|
||||
NULL, argv[2]);
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL, argv[3]);
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL, argv[3]);
|
||||
|
||||
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "copies", atoi(argv[4]));
|
||||
|
||||
/*
|
||||
* Handle options on the command-line...
|
||||
@@ -160,14 +161,12 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
num_options = cupsParseOptions(argv[5], 0, &options);
|
||||
|
||||
if (cupsGetOption("raw", num_options, options))
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format",
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_MIMETYPE, "document-format",
|
||||
NULL, "application/vnd.cups-raw");
|
||||
else
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format",
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_MIMETYPE, "document-format",
|
||||
NULL, "application/octet-stream");
|
||||
|
||||
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "copies", atoi(argv[4]));
|
||||
|
||||
for (i = 0; i < num_options; i ++)
|
||||
{
|
||||
/*
|
||||
@@ -280,9 +279,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
sprintf(buffer, "%u", ippLength(request) + (size_t)fileinfo.st_size);
|
||||
httpSetField(http, HTTP_FIELD_CONTENT_LENGTH, buffer);
|
||||
}
|
||||
else
|
||||
httpSetField(http, HTTP_FIELD_TRANSFER_ENCODING, "chunked");
|
||||
|
||||
|
||||
/*
|
||||
* Do the request...
|
||||
*/
|
||||
@@ -294,12 +291,12 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
*/
|
||||
|
||||
if (httpPost(http, resource))
|
||||
{
|
||||
fputs("INFO: Unable to POST print request; retrying...\n", stderr);
|
||||
sleep(10);
|
||||
httpReconnect(http);
|
||||
continue;
|
||||
}
|
||||
if (httpPost(http, resource))
|
||||
{
|
||||
fputs("INFO: Unable to POST print request; retrying...\n", stderr);
|
||||
sleep(10);
|
||||
continue;
|
||||
}
|
||||
|
||||
fputs("INFO: POST successful, sending IPP request...\n", stderr);
|
||||
|
||||
@@ -336,13 +333,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If we are chunking the output from stdin, make sure we end up with
|
||||
* a 0-length chunk at the end...
|
||||
*/
|
||||
|
||||
if (fp == stdin)
|
||||
httpWrite(http, buffer, 0);
|
||||
httpWrite(http, buffer, 0);
|
||||
|
||||
fputs("INFO: Print file sent; checking status...\n", stderr);
|
||||
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
int bytes; /* Number of bytes read */
|
||||
|
||||
|
||||
if ((fp = fopen(cupsTempFile(filename, sizeof(filename)), "w")) == NULL)
|
||||
if ((fp = fopen(tmpnam(filename), "w")) == NULL)
|
||||
{
|
||||
perror("ERROR: unable to create temporary file");
|
||||
return (1);
|
||||
|
||||
Arquivo executável
+88
@@ -0,0 +1,88 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# SMB printing script for the Common UNIX Printing System (CUPS).
|
||||
#
|
||||
# Copyright 1993-1999 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.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
|
||||
# 44145 Airport View Drive, Suite 204
|
||||
# Hollywood, Maryland 20636-3111 USA
|
||||
#
|
||||
# Voice: (301) 373-9603
|
||||
# EMail: cups-info@cups.org
|
||||
# WWW: http://www.cups.org
|
||||
#
|
||||
|
||||
SMBCLIENT=/usr/local/samba/bin/smbclient
|
||||
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# printer job user title copies options [filename]
|
||||
#
|
||||
|
||||
if [ $# -lt 5 -o $# -gt 6 ]; then
|
||||
# Too few or too many arguments
|
||||
echo 'Usage: smb job-id user title copies options [file]' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# If "filename" is not on the command-line, then we read the print
|
||||
# data from stdin and write it to a temporary file.
|
||||
#
|
||||
|
||||
if [ $# = 5 ]; then
|
||||
# Collect all print data and put it in a temporary file...
|
||||
if [ "$TMPDIR" = "" ]; then
|
||||
TMPDIR=/var/tmp
|
||||
fi
|
||||
|
||||
filename="$TMPDIR/$$.smb"
|
||||
cat >$filename
|
||||
else
|
||||
# Use the file on the command-line...
|
||||
filename="$6"
|
||||
fi
|
||||
|
||||
#
|
||||
# Take apart the URI in $0...
|
||||
#
|
||||
|
||||
uri="$0"
|
||||
host=`echo $uri | awk -F/ '{print substr($3, index($3, "@") + 1)}'`
|
||||
user=`echo $uri | awk -F/ '{print substr($3, 0, index($3, "@") - 1)}'`
|
||||
if [ "$user" != "" ]; then
|
||||
user="-U $user"
|
||||
fi
|
||||
printer=`echo $uri | awk -F/ '{print $4}'`
|
||||
|
||||
#
|
||||
# Send the file to the remote system...
|
||||
#
|
||||
|
||||
$SMBCLIENT //$host/$printer $user -P -N <<EOF
|
||||
print $filename
|
||||
EOF
|
||||
|
||||
#
|
||||
# Lastly, remove the temporary file as needed...
|
||||
#
|
||||
|
||||
if [ $# = 5 ]; then
|
||||
rm -f $filename
|
||||
fi
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
#
|
||||
@@ -433,15 +433,7 @@ show_status(http_t *http, /* I - HTTP connection to server */
|
||||
if (strncmp(device, "file:", 5) == 0)
|
||||
printf("\tprinter is on device \'%s\' speed -1\n", device + 5);
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Just show the method...
|
||||
*/
|
||||
|
||||
*strchr(device, ':') = '\0';
|
||||
printf("\tprinter is on device \'%s\' speed -1\n", device);
|
||||
}
|
||||
|
||||
printf("\tqueuing is %sabled\n", accepting ? "en" : "dis");
|
||||
printf("\tprinting is %sabled\n",
|
||||
pstate == IPP_PRINTER_STOPPED ? "dis" : "en");
|
||||
|
||||
+11
-14
@@ -23,8 +23,6 @@
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* main() - Parse options and commands.
|
||||
* show_jobs() - Show jobs.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -47,8 +45,7 @@
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static int show_jobs(http_t *, const char *, const char *, const int,
|
||||
const int);
|
||||
static int show_jobs(http_t *, char *, char *, int, int);
|
||||
|
||||
|
||||
/*
|
||||
@@ -61,7 +58,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
http_t *http; /* Connection to server */
|
||||
const char *dest, /* Desired printer */
|
||||
char *dest, /* Desired printer */
|
||||
*user; /* Desired user */
|
||||
int id, /* Desired job ID */
|
||||
interval, /* Reporting interval */
|
||||
@@ -77,7 +74,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
* Check for command-line options...
|
||||
*/
|
||||
|
||||
dest = cupsGetDefault();
|
||||
dest = NULL;
|
||||
user = NULL;
|
||||
id = 0;
|
||||
interval = 0;
|
||||
@@ -139,21 +136,21 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* 'show_jobs()' - Show jobs.
|
||||
* 'show_jobs()' - Show printers.
|
||||
*/
|
||||
|
||||
static int /* O - Number of jobs in queue */
|
||||
show_jobs(http_t *http, /* I - HTTP connection to server */
|
||||
const char *dest, /* I - Destination */
|
||||
const char *user, /* I - User */
|
||||
const int id, /* I - Job ID */
|
||||
const int longstatus)/* I - 1 if long report desired */
|
||||
show_jobs(http_t *http, /* I - HTTP connection to server */
|
||||
char *dest, /* I - Destination */
|
||||
char *user, /* I - User */
|
||||
int id, /* I - Job ID */
|
||||
int longstatus) /* I - 1 if long report desired */
|
||||
{
|
||||
ipp_t *request, /* IPP Request */
|
||||
*response; /* IPP Response */
|
||||
ipp_attribute_t *attr; /* Current attribute */
|
||||
cups_lang_t *language; /* Default language */
|
||||
const char *jobdest, /* Pointer into job-printer-uri */
|
||||
char *jobdest, /* Pointer into job-printer-uri */
|
||||
*jobuser, /* Pointer to job-originating-user-name */
|
||||
*jobname; /* Pointer to job-name */
|
||||
ipp_jstate_t jobstate; /* job-state */
|
||||
@@ -163,7 +160,7 @@ show_jobs(http_t *http, /* I - HTTP connection to server */
|
||||
jobcount, /* Number of jobs */
|
||||
rank; /* Rank of job */
|
||||
char resource[1024]; /* Resource string */
|
||||
static const char *ranks[10] =/* Ranking strings */
|
||||
static char *ranks[10] = /* Ranking strings */
|
||||
{
|
||||
"th",
|
||||
"st",
|
||||
|
||||
+4
-6
@@ -46,7 +46,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
int i; /* Looping var */
|
||||
int job_id; /* Job ID */
|
||||
const char *dest; /* Destination printer */
|
||||
const char *title; /* Job title */
|
||||
char *title; /* Job title */
|
||||
int priority; /* Job priority (1-100) */
|
||||
int num_copies; /* Number of copies per file */
|
||||
int num_files; /* Number of files printed */
|
||||
@@ -209,7 +209,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
return (1);
|
||||
}
|
||||
|
||||
temp = fopen(cupsTempFile(tempfile, sizeof(tempfile)), "w");
|
||||
temp = fopen(tmpnam(tempfile), "w");
|
||||
|
||||
if (temp == NULL)
|
||||
{
|
||||
@@ -225,7 +225,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
fputs("lpr: standard input is empty, so no job has been sent.\n", stderr);
|
||||
fputs("lpr: stdin is empty, so no job has been sent.\n", stderr);
|
||||
return (1);
|
||||
}
|
||||
|
||||
@@ -234,11 +234,9 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
else
|
||||
job_id = cupsPrintFile(dest, tempfile, "(stdin)", num_options, options);
|
||||
|
||||
unlink(tempfile);
|
||||
|
||||
if (job_id < 1)
|
||||
{
|
||||
fputs("lpr: unable to print standard input.\n", stderr);
|
||||
fprintf(stderr, "lpr: unable to print file \'%s\'.\n", argv[i]);
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,14 +169,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
response = cupsDoRequest(http, request, "/jobs/");
|
||||
|
||||
if (response != NULL)
|
||||
{
|
||||
if (response->request.status.status_code == IPP_NOT_FOUND)
|
||||
fputs("lprm: Job or printer not found!\n", stderr);
|
||||
else if (response->request.status.status_code > IPP_OK_CONFLICT)
|
||||
fputs("lprm: Unable to cancel job(s)!\n", stderr);
|
||||
|
||||
ippDelete(response);
|
||||
}
|
||||
else
|
||||
{
|
||||
fputs("lprm: Unable to cancel job(s)!\n", stderr);
|
||||
|
||||
+1
-11
@@ -38,7 +38,6 @@
|
||||
#include <cups/cups.h>
|
||||
#include <cups/language.h>
|
||||
#include <cups/debug.h>
|
||||
#include <config.h>
|
||||
|
||||
|
||||
/*
|
||||
@@ -100,24 +99,15 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
puts("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"10\">");
|
||||
else
|
||||
puts("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"30\">");
|
||||
printf("<TITLE>%s on %s - " CUPS_SVERSION "</TITLE>\n",
|
||||
printf("<TITLE>%s on %s - Common UNIX Printing System</TITLE>\n",
|
||||
name == NULL ? "Classes" : name, getenv("SERVER_NAME"));
|
||||
puts("<LINK REL=STYLESHEET TYPE=\"text/css\" HREF=\"/cups.css\">");
|
||||
puts("<MAP NAME=\"navbar\">");
|
||||
#ifdef ESPPRINTPRO
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"10,10,76,30\" HREF=\"printers\" ALT=\"Current Printer Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"88,10,158,30\" HREF=\"classes\" ALT=\"Current Printer Classes Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"170,10,210,30\" HREF=\"jobs\" ALT=\"Current Jobs Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"222,10,354,30\" HREF=\"documentation.html\" ALT=\"Read CUPS Documentation On-Line\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"366,10,442,30\" HREF=\"http://www.easysw.com/printpro/software.html\" ALT=\"Download the Current ESP Print Pro Software\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"454,10,530,30\" HREF=\"http://www.easysw.com/printpro/support.html\" ALT=\"Get Tech Support for Current ESP Print Pro\">");
|
||||
#else
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"10,10,85,30\" HREF=\"/printers\" ALT=\"Current Printer Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"95,10,175,30\" HREF=\"/classes\" ALT=\"Current Printer Classes Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"185,10,235,30\" HREF=\"/jobs\" ALT=\"Current Jobs Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"245,10,395,30\" HREF=\"/documentation.html\" ALT=\"Read CUPS Documentation On-Line\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"405,10,490,30\" HREF=\"http://www.cups.org\" ALT=\"Download the Current CUPS Software\">");
|
||||
#endif /* ESPPRINTPRO */
|
||||
puts("</MAP>");
|
||||
puts("</HEAD>");
|
||||
puts("<BODY>");
|
||||
|
||||
+3
-11
@@ -38,7 +38,6 @@
|
||||
#include <cups/cups.h>
|
||||
#include <cups/language.h>
|
||||
#include <cups/debug.h>
|
||||
#include <config.h>
|
||||
|
||||
|
||||
/*
|
||||
@@ -63,6 +62,8 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
http_t *http; /* Connection to the server */
|
||||
|
||||
|
||||
setbuf(stdout, NULL);
|
||||
|
||||
/*
|
||||
* Get the request language...
|
||||
*/
|
||||
@@ -100,24 +101,15 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
puts("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"10\">");
|
||||
else
|
||||
puts("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"30\">");
|
||||
printf("<TITLE>%s on %s - " CUPS_SVERSION "</TITLE>\n",
|
||||
printf("<TITLE>%s on %s - Common UNIX Printing System</TITLE>\n",
|
||||
job == NULL ? "Jobs" : job, getenv("SERVER_NAME"));
|
||||
puts("<LINK REL=STYLESHEET TYPE=\"text/css\" HREF=\"/cups.css\">");
|
||||
puts("<MAP NAME=\"navbar\">");
|
||||
#ifdef ESPPRINTPRO
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"10,10,76,30\" HREF=\"printers\" ALT=\"Current Printer Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"88,10,158,30\" HREF=\"classes\" ALT=\"Current Printer Classes Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"170,10,210,30\" HREF=\"jobs\" ALT=\"Current Jobs Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"222,10,354,30\" HREF=\"documentation.html\" ALT=\"Read CUPS Documentation On-Line\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"366,10,442,30\" HREF=\"http://www.easysw.com/printpro/software.html\" ALT=\"Download the Current ESP Print Pro Software\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"454,10,530,30\" HREF=\"http://www.easysw.com/printpro/support.html\" ALT=\"Get Tech Support for Current ESP Print Pro\">");
|
||||
#else
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"10,10,85,30\" HREF=\"/printers\" ALT=\"Current Printer Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"95,10,175,30\" HREF=\"/classes\" ALT=\"Current Printer Classes Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"185,10,235,30\" HREF=\"/jobs\" ALT=\"Current Jobs Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"245,10,395,30\" HREF=\"/documentation.html\" ALT=\"Read CUPS Documentation On-Line\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"405,10,490,30\" HREF=\"http://www.cups.org\" ALT=\"Download the Current CUPS Software\">");
|
||||
#endif /* ESPPRINTPRO */
|
||||
puts("</MAP>");
|
||||
puts("</HEAD>");
|
||||
puts("<BODY>");
|
||||
|
||||
+1
-11
@@ -38,7 +38,6 @@
|
||||
#include <cups/cups.h>
|
||||
#include <cups/language.h>
|
||||
#include <cups/debug.h>
|
||||
#include <config.h>
|
||||
|
||||
|
||||
/*
|
||||
@@ -100,24 +99,15 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
puts("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"10\">");
|
||||
else
|
||||
puts("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"30\">");
|
||||
printf("<TITLE>%s on %s - " CUPS_SVERSION "</TITLE>\n",
|
||||
printf("<TITLE>%s on %s - Common UNIX Printing System</TITLE>\n",
|
||||
printer == NULL ? "Printers" : printer, getenv("SERVER_NAME"));
|
||||
puts("<LINK REL=STYLESHEET TYPE=\"text/css\" HREF=\"/cups.css\">");
|
||||
puts("<MAP NAME=\"navbar\">");
|
||||
#ifdef ESPPRINTPRO
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"10,10,76,30\" HREF=\"printers\" ALT=\"Current Printer Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"88,10,158,30\" HREF=\"classes\" ALT=\"Current Printer Classes Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"170,10,210,30\" HREF=\"jobs\" ALT=\"Current Jobs Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"222,10,354,30\" HREF=\"documentation.html\" ALT=\"Read CUPS Documentation On-Line\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"366,10,442,30\" HREF=\"http://www.easysw.com/printpro/software.html\" ALT=\"Download the Current ESP Print Pro Software\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"454,10,530,30\" HREF=\"http://www.easysw.com/printpro/support.html\" ALT=\"Get Tech Support for Current ESP Print Pro\">");
|
||||
#else
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"10,10,85,30\" HREF=\"/printers\" ALT=\"Current Printer Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"95,10,175,30\" HREF=\"/classes\" ALT=\"Current Printer Classes Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"185,10,235,30\" HREF=\"/jobs\" ALT=\"Current Jobs Status\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"245,10,395,30\" HREF=\"/documentation.html\" ALT=\"Read CUPS Documentation On-Line\">");
|
||||
puts("<AREA SHAPE=\"RECT\" COORDS=\"405,10,490,30\" HREF=\"http://www.cups.org\" ALT=\"Download the Current CUPS Software\">");
|
||||
#endif /* ESPPRINTPRO */
|
||||
puts("</MAP>");
|
||||
puts("</HEAD>");
|
||||
puts("<BODY>");
|
||||
|
||||
+2
-9
@@ -28,8 +28,7 @@ include ../Makedefs
|
||||
# Config files...
|
||||
#
|
||||
|
||||
KEEP = classes.conf cupsd.conf printers.conf
|
||||
REPLACE = mime.convs mime.types
|
||||
FILES = classes.conf cupsd.conf mime.convs mime.types printers.conf
|
||||
|
||||
#
|
||||
# Make everything...
|
||||
@@ -49,19 +48,13 @@ clean:
|
||||
|
||||
install:
|
||||
-$(MKDIR) $(SERVERROOT)/conf
|
||||
for file in $(KEEP); do \
|
||||
for file in $(FILES); do \
|
||||
if test -e $(SERVERROOT)/conf/$$file ; then \
|
||||
$(CP) $$file $(SERVERROOT)/conf/$$file.N ; \
|
||||
else \
|
||||
$(CP) $$file $(SERVERROOT)/conf ; \
|
||||
fi ; \
|
||||
done
|
||||
for file in $(REPLACE); do \
|
||||
if test -e $(SERVERROOT)/conf/$$file ; then \
|
||||
$(MV) $(SERVERROOT)/conf/$$file $(SERVERROOT)/conf/$$file.O ; \
|
||||
fi ; \
|
||||
$(CP) $$file $(SERVERROOT)/conf ; \
|
||||
done
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
|
||||
+2
-9
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: classes.conf 678 1999-09-22 18:10:55Z mike $"
|
||||
# "$Id: classes.conf 333 1999-05-17 18:03:40Z mike $"
|
||||
#
|
||||
# Sample class configuration file for the Common UNIX Printing System
|
||||
# (CUPS) scheduler.
|
||||
@@ -59,13 +59,6 @@
|
||||
|
||||
#Location Room 101 in the activities building
|
||||
|
||||
#
|
||||
# Accepting: is the class accepting jobs?
|
||||
#
|
||||
#Accepting Yes
|
||||
#Accepting No
|
||||
#
|
||||
|
||||
#
|
||||
# Printer: adds a printer to the class.
|
||||
#
|
||||
@@ -75,5 +68,5 @@
|
||||
#</Class>
|
||||
|
||||
#
|
||||
# End of "$Id: classes.conf 678 1999-09-22 18:10:55Z mike $".
|
||||
# End of "$Id: classes.conf 333 1999-05-17 18:03:40Z mike $".
|
||||
#
|
||||
|
||||
+8
-30
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: cupsd.conf 628 1999-08-23 15:24:48Z mike $"
|
||||
# "$Id: cupsd.conf 510 1999-07-09 14:20:15Z mike $"
|
||||
#
|
||||
# Sample configuration file for the Common UNIX Printing System (CUPS)
|
||||
# scheduler.
|
||||
@@ -70,25 +70,20 @@ Port 631
|
||||
# program is run...
|
||||
#
|
||||
|
||||
#User lp
|
||||
#Group sys
|
||||
User lp
|
||||
Group sys
|
||||
|
||||
#
|
||||
# SystemGroup: the group name for "System" (printer administration)
|
||||
# access. The default varies depending on the operating system, but
|
||||
# will be "sys", "system", or "root" (checked for in that order.)
|
||||
# access.
|
||||
#
|
||||
|
||||
#SystemGroup sys
|
||||
SystemGroup sys
|
||||
|
||||
#
|
||||
# ServerName: the hostname of your server, as advertised to the world.
|
||||
# By default CUPS will use the hostname of the system.
|
||||
#
|
||||
# This is also the name used by clients when connecting to the local
|
||||
# server, so you can use this to configure a client machine without
|
||||
# a local server running.
|
||||
#
|
||||
|
||||
#ServerName myhost.domain.com
|
||||
|
||||
@@ -310,23 +305,6 @@ LogLevel info
|
||||
# Deny: denies access from the specified hostname, domain, IP address, or
|
||||
# network.
|
||||
#
|
||||
# Both "Allow" and "Deny" accept the following notations for addresses:
|
||||
#
|
||||
# All
|
||||
# None
|
||||
# *.domain.com
|
||||
# .domain.com
|
||||
# host.domain.com
|
||||
# nnn.*
|
||||
# nnn.nnn.*
|
||||
# nnn.nnn.nnn.*
|
||||
# nnn.nnn.nnn.nnn
|
||||
# nnn.nnn.nnn.nnn/mm
|
||||
# nnn.nnn.nnn.nnn/mmm.mmm.mmm.mmm
|
||||
#
|
||||
# The host and domain address require that you enable hostname lookups
|
||||
# with "HostNameLookups On" above.
|
||||
#
|
||||
|
||||
<Location />
|
||||
</Location>
|
||||
@@ -351,8 +329,8 @@ LogLevel info
|
||||
#
|
||||
# You definitely will want to limit access to the administration tools.
|
||||
# The default configuration requires a local connection from a user who
|
||||
# is a member of the system group to do any admin tasks. You can change
|
||||
# the group name using the SystemGroup directive.
|
||||
# is a member of group "sys" to do any admin tasks. You can change the
|
||||
# group name using the SystemGroup directive.
|
||||
#
|
||||
|
||||
AuthType Basic
|
||||
@@ -365,5 +343,5 @@ Allow From 127.0.0.1
|
||||
</Location>
|
||||
|
||||
#
|
||||
# End of "$Id: cupsd.conf 628 1999-08-23 15:24:48Z mike $".
|
||||
# End of "$Id: cupsd.conf 510 1999-07-09 14:20:15Z mike $".
|
||||
#
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: mime.convs 575 1999-07-30 13:57:16Z mike $"
|
||||
# "$Id: mime.convs 530 1999-07-13 14:11:17Z mike $"
|
||||
#
|
||||
# MIME converts file for the Common UNIX Printing System (CUPS).
|
||||
#
|
||||
@@ -42,7 +42,7 @@
|
||||
#
|
||||
|
||||
#application/msword application/postscript 50 mswordtops
|
||||
application/pdf application/postscript 50 pdftops
|
||||
#application/pdf application/postscript 50 pdftops
|
||||
application/postscript application/vnd.cups-postscript 50 pstops
|
||||
application/vnd.hp-HPGL application/postscript 50 hpgltops
|
||||
image/* application/vnd.cups-postscript 50 imagetops
|
||||
@@ -58,5 +58,5 @@ image/* application/vnd.cups-raster 50 imagetoraster
|
||||
application/vnd.cups-postscript application/vnd.cups-raster 50 pstoraster
|
||||
|
||||
#
|
||||
# End of "$Id: mime.convs 575 1999-07-30 13:57:16Z mike $".
|
||||
# End of "$Id: mime.convs 530 1999-07-13 14:11:17Z mike $".
|
||||
#
|
||||
|
||||
+5
-4
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: mime.types 575 1999-07-30 13:57:16Z mike $"
|
||||
# "$Id: mime.types 487 1999-06-30 21:07:52Z mike $"
|
||||
#
|
||||
# MIME types file for the Common UNIX Printing System (CUPS).
|
||||
#
|
||||
@@ -92,9 +92,10 @@ image/x-sgi-rgb rgb sgi bw icon short(0,474)
|
||||
image/x-xbitmap xbm
|
||||
image/x-xpixmap xpm ascii(0,1024) + string(3,"XPM")
|
||||
image/x-xwindowdump xwd
|
||||
image/x-sun-raster ras
|
||||
|
||||
# TODO: Add Alias, SoftImage, GIMP??? files
|
||||
# TODO: Add Sun Raster, Alias, SoftImage, GIMP??? files
|
||||
|
||||
image/x-sun-raster ras
|
||||
#image/x-alias pix
|
||||
#image/x-softimage
|
||||
#image/x-gimp-xcf xcf xcf.gz
|
||||
@@ -118,5 +119,5 @@ application/vnd.cups-raster string(0,"RaSt") string(0,"tSaR")
|
||||
application/vnd.cups-raw
|
||||
|
||||
#
|
||||
# End of "$Id: mime.types 575 1999-07-30 13:57:16Z mike $".
|
||||
# End of "$Id: mime.types 487 1999-06-30 21:07:52Z mike $".
|
||||
#
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
# This is a dummy printcap file that is automatically generated by the
|
||||
# CUPS software for old applications that rely on it.
|
||||
+3
-10
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: printers.conf 678 1999-09-22 18:10:55Z mike $"
|
||||
# "$Id: printers.conf 334 1999-05-17 18:11:26Z mike $"
|
||||
#
|
||||
# Sample printer configuration file for the Common UNIX Printing System
|
||||
# (CUPS) scheduler.
|
||||
@@ -77,20 +77,13 @@
|
||||
# State: sets the initial state of the printer. Can be one of the
|
||||
# following:
|
||||
#
|
||||
# Idle - Printer is available to print new jobs.
|
||||
# Idle - Printer is available to accept new jobs.
|
||||
# Stopped - Printer is disabled but accepting new jobs.
|
||||
#
|
||||
|
||||
#State Idle
|
||||
|
||||
#
|
||||
# Accepting: is the printer accepting jobs?
|
||||
#
|
||||
#Accepting Yes
|
||||
#Accepting No
|
||||
|
||||
#</Printer>
|
||||
|
||||
#
|
||||
# End of "$Id: printers.conf 678 1999-09-22 18:10:55Z mike $".
|
||||
# End of "$Id: printers.conf 334 1999-05-17 18:11:26Z mike $".
|
||||
#
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
* Version of software...
|
||||
*/
|
||||
|
||||
#define CUPS_SVERSION "CUPS v1.0b9"
|
||||
#define CUPS_SVERSION "CUPS v1.0"
|
||||
|
||||
/*
|
||||
* Where are files stored?
|
||||
|
||||
+13
-31
@@ -46,7 +46,12 @@ AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],
|
||||
OPTIM="-g "
|
||||
fi])
|
||||
AC_ARG_ENABLE(shared, [ --disable-shared turn off shared libraries [default=no]])
|
||||
if test "$disable_shared" != "yes"; then
|
||||
if eval "test x$disable_shared = xyes"; then
|
||||
PICFLAG=0
|
||||
LIBCUPS="libcups.a"
|
||||
LIBCUPSIMAGE="libcupsimage.a"
|
||||
DSO=":"
|
||||
else
|
||||
case "$uname" in
|
||||
SunOS* | UNIX_S*)
|
||||
LIBCUPS="libcups.so.1"
|
||||
@@ -58,7 +63,7 @@ if test "$disable_shared" != "yes"; then
|
||||
LIBCUPSIMAGE="libcupsimage.sl.1"
|
||||
DSO="ld -b -z +h \$@ -o"
|
||||
;;
|
||||
OSF1* | Linux* | FreeBSD*)
|
||||
OSF1* | Linux*)
|
||||
LIBCUPS="libcups.so.1"
|
||||
LIBCUPSIMAGE="libcupsimage.so.1"
|
||||
DSO="\$(CC) -Wl,-soname,\$@ -shared \$(OPTIM) -o"
|
||||
@@ -76,11 +81,6 @@ if test "$disable_shared" != "yes"; then
|
||||
DSO="\$(CC) -Wl,-soname,\$@ -shared \$(OPTIM) -o"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
PICFLAG=0
|
||||
LIBCUPS="libcups.a"
|
||||
LIBCUPSIMAGE="libcupsimage.a"
|
||||
DSO=":"
|
||||
fi
|
||||
|
||||
dnl Checks for programs...
|
||||
@@ -91,14 +91,13 @@ AC_PROG_RANLIB
|
||||
AC_PATH_PROG(AR,ar)
|
||||
AC_PATH_PROG(CHMOD,chmod)
|
||||
AC_PATH_PROG(CP,cp)
|
||||
AC_PATH_PROG(MV,mv)
|
||||
AC_PATH_PROG(NROFF,nroff)
|
||||
if test "$NROFF" = ""; then
|
||||
AC_PATH_PROG(GROFF,groff)
|
||||
if test "$GROFF" = ""; then
|
||||
AC_PATH_PROG(NROFF,groff)
|
||||
if test "$NROFF" = ""; then
|
||||
NROFF="echo"
|
||||
else
|
||||
NROFF="$GROFF -T ascii"
|
||||
NROFF="$NROFF -T ascii"
|
||||
fi
|
||||
fi
|
||||
AC_PATH_PROG(HTMLDOC,htmldoc)
|
||||
@@ -134,18 +133,15 @@ dnl Check for libraries...
|
||||
AC_CHECK_LIB(c,crypt,LIBS="$LIBS",AC_CHECK_LIB(crypt,crypt))
|
||||
AC_CHECK_HEADER(crypt.h, AC_DEFINE(HAVE_CRYPT_H))
|
||||
AC_CHECK_LIB(sec,getspent)
|
||||
|
||||
NETLIBS=""
|
||||
AC_SUBST(NETLIBS)
|
||||
AC_CHECK_LIB(socket,socket,
|
||||
if test "$uname" != "IRIX"; then
|
||||
NETLIBS="-lsocket"
|
||||
LIBS="$LIBS -lsocket"
|
||||
else
|
||||
echo "Not using -lsocket since you are running IRIX."
|
||||
fi)
|
||||
AC_CHECK_LIB(nsl,gethostbyaddr,
|
||||
if test "$uname" != "IRIX"; then
|
||||
NETLIBS="$NETLIBS -lnsl"
|
||||
LIBS="$LIBS -lnsl"
|
||||
else
|
||||
echo "Not using -lnsl since you are running IRIX."
|
||||
fi)
|
||||
@@ -213,7 +209,6 @@ else
|
||||
if test -z "$OPTIM"; then
|
||||
OPTIM="+O2"
|
||||
fi
|
||||
OPTIM="-Ae $OPTIM"
|
||||
;;
|
||||
SunOS*)
|
||||
# Solaris
|
||||
@@ -243,19 +238,6 @@ if test "$DSO" != ":"; then
|
||||
# a single DSO rather than a bunch...
|
||||
DSOLIBS="\$(LIBJPEG) \$(LIBPNG) \$(LIBTIFF) \$(LIBZ)"
|
||||
IMGLIBS=""
|
||||
|
||||
# The HP-UX and Solaris run-time linkers are EXTREMELY stupid when
|
||||
# it comes to 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*)
|
||||
LDFLAGS="$LDFLAGS -Wl,+b,$libdir,+fb"
|
||||
;;
|
||||
SunOS*)
|
||||
# Solaris
|
||||
LDFLAGS="-R$libdir"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
DSOLIBS=""
|
||||
IMGLIBS="\$(LIBJPEG) \$(LIBPNG) \$(LIBTIFF) \$(LIBZ)"
|
||||
@@ -273,7 +255,7 @@ if test "$prefix" = "NONE"; then
|
||||
fi
|
||||
|
||||
dnl Fix "libdir" variable for IRIX 6.x...
|
||||
if test "$uname" = "IRIX" -a $uversion -ge 65; then
|
||||
if test "$uname" = "IRIX" -a $uversion -ge 62; then
|
||||
libdir="/usr/lib32"
|
||||
fi
|
||||
|
||||
|
||||
+345
@@ -0,0 +1,345 @@
|
||||
#
|
||||
# "$Id: cups.list 529 1999-07-13 14:11:00Z mike $"
|
||||
#
|
||||
# ESP Package Manager (EPM) file list for the Common UNIX Printing
|
||||
# System (CUPS).
|
||||
#
|
||||
# EPM can be found in the "epm" subdirectory of this distribution.
|
||||
# Please report problems and fixes to Michael Sweet (mike@easysw.com).
|
||||
#
|
||||
# Copyright 1997-1999 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.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-3111 USA
|
||||
#
|
||||
# Voice: (301) 373-9603
|
||||
# EMail: cups-info@cups.org
|
||||
# WWW: http://www.cups.org
|
||||
#
|
||||
|
||||
%product Common UNIX Printing System
|
||||
%copyright 1993-1999 by Easy Software Products, All Rights Reserved.
|
||||
%vendor Easy Software Products
|
||||
%license LICENSE.cups
|
||||
%readme README.cups
|
||||
%version 1.0b5
|
||||
%incompat printpro
|
||||
|
||||
%system all
|
||||
# Server files
|
||||
f 0555 root sys /var/cups/backend/ipp backend/ipp
|
||||
f 4555 root sys /var/cups/backend/lpd backend/lpd
|
||||
f 0555 root sys /var/cups/backend/parallel backend/parallel
|
||||
f 0555 root sys /var/cups/backend/serial backend/serial
|
||||
f 0555 root sys /var/cups/backend/smb backend/smb
|
||||
f 0555 root sys /var/cups/backend/socket backend/socket
|
||||
f 0500 root sys /usr/sbin/cupsd scheduler/cupsd
|
||||
f 0555 root sys /var/cups/cgi-bin/classes.cgi cgi-bin/classes.cgi
|
||||
f 0555 root sys /var/cups/cgi-bin/jobs.cgi cgi-bin/jobs.cgi
|
||||
f 0555 root sys /var/cups/cgi-bin/printers.cgi cgi-bin/printers.cgi
|
||||
f 0555 root sys /var/cups/filter/pstoraster pstoraster/pstoraster
|
||||
f 0555 root sys /var/cups/filter/imagetops filter/imagetops
|
||||
f 0555 root sys /var/cups/filter/pstops filter/pstops
|
||||
f 0555 root sys /var/cups/filter/texttops filter/texttops
|
||||
f 0555 root sys /var/cups/filter/rastertohp filter/rastertohp
|
||||
f 0555 root sys /var/cups/filter/hpgltops filter/hpgltops
|
||||
f 0555 root sys /var/cups/filter/imagetoraster filter/imagetoraster
|
||||
|
||||
# User commands
|
||||
f 0555 root sys /usr/bin/lp systemv/lp
|
||||
f 0555 root sys /usr/bin/lpstat systemv/lpstat
|
||||
f 0555 root sys /usr/lib/lpadmin systemv/lpadmin
|
||||
f 0555 root sys /usr/bin/cancel systemv/cancel
|
||||
f 0555 root sys /usr/lib/accept systemv/accept
|
||||
l 0555 root sys /usr/lib/reject accept
|
||||
l 0555 root sys /usr/bin/disable /usr/lib/accept
|
||||
l 0555 root sys /usr/bin/enable /usr/lib/accept
|
||||
f 0555 root sys /usr/sbin/lpc berkeley/lpc
|
||||
f 0555 root sys /usr/bin/lpq berkeley/lpq
|
||||
f 0555 root sys /usr/bin/lpr berkeley/lpr
|
||||
f 0555 root sys /usr/bin/lprm berkeley/lprm
|
||||
|
||||
# DSOs
|
||||
%system hpux
|
||||
f 0555 root sys /usr/lib/libcups.sl.1 cups/libcups.sl.1
|
||||
l 0555 root sys /usr/lib/libcups.sl libcups.sl.1
|
||||
f 0555 root sys /usr/lib/libcupsimage.sl.1 filter/libcupsimage.sl.1
|
||||
l 0555 root sys /usr/lib/libcupsimage.sl libcupsimage.sl.1
|
||||
%system irix irix64
|
||||
f 0555 root sys /usr/lib32/libcups.so.1 cups/libcups.so.1
|
||||
l 0555 root sys /usr/lib32/libcups.so libcups.so.1
|
||||
f 0555 root sys /usr/lib32/libcupsimage.so.1 filter/libcupsimage.so.1
|
||||
l 0555 root sys /usr/lib32/libcupsimage.so libcupsimage.so.1
|
||||
%system dunix linux solaris sunos
|
||||
f 0555 root sys /usr/lib/libcups.so.1 cups/libcups.so.1
|
||||
l 0555 root sys /usr/lib/libcups.so libcups.so.1
|
||||
f 0555 root sys /usr/lib/libcupsimage.so.1 filter/libcupsimage.so.1
|
||||
l 0555 root sys /usr/lib/libcupsimage.so libcupsimage.so.1
|
||||
%system all
|
||||
|
||||
# Directories
|
||||
d 0755 root sys /var/cups/interfaces
|
||||
d 0755 root sys /var/cups/logs
|
||||
d 0755 root sys /var/cups/ppd
|
||||
d 0755 root sys /var/cups/requests
|
||||
|
||||
# Data files
|
||||
f 0444 root sys /usr/lib/locale/C/cups_C locale/C/cups_C
|
||||
f 0444 root sys /usr/lib/locale/de/cups_de locale/de/cups_de
|
||||
f 0444 root sys /usr/lib/locale/en/cups_en locale/en/cups_en
|
||||
f 0444 root sys /usr/lib/locale/es/cups_es locale/es/cups_es
|
||||
f 0444 root sys /usr/lib/locale/fr/cups_fr locale/fr/cups_fr
|
||||
f 0444 root sys /usr/lib/locale/it/cups_it locale/it/cups_it
|
||||
f 0444 root sys /usr/share/cups/data/8859-1 data/8859-1
|
||||
f 0444 root sys /usr/share/cups/data/8859-14 data/8859-14
|
||||
f 0444 root sys /usr/share/cups/data/8859-15 data/8859-15
|
||||
f 0444 root sys /usr/share/cups/data/8859-2 data/8859-2
|
||||
f 0444 root sys /usr/share/cups/data/8859-3 data/8859-3
|
||||
f 0444 root sys /usr/share/cups/data/8859-4 data/8859-4
|
||||
f 0444 root sys /usr/share/cups/data/8859-5 data/8859-5
|
||||
f 0444 root sys /usr/share/cups/data/8859-6 data/8859-6
|
||||
f 0444 root sys /usr/share/cups/data/8859-7 data/8859-7
|
||||
f 0444 root sys /usr/share/cups/data/8859-8 data/8859-8
|
||||
f 0444 root sys /usr/share/cups/data/8859-9 data/8859-9
|
||||
f 0444 root sys /usr/share/cups/data/HPGLprolog data/HPGLprolog
|
||||
f 0444 root sys /usr/share/cups/data/psglyphs data/psglyphs
|
||||
f 0444 root sys /usr/share/cups/fonts/AvantGarde-Book fonts/AvantGarde-Book
|
||||
f 0444 root sys /usr/share/cups/fonts/AvantGarde-BookOblique fonts/AvantGarde-BookOblique
|
||||
f 0444 root sys /usr/share/cups/fonts/AvantGarde-Demi fonts/AvantGarde-Demi
|
||||
f 0444 root sys /usr/share/cups/fonts/AvantGarde-DemiOblique fonts/AvantGarde-DemiOblique
|
||||
f 0444 root sys /usr/share/cups/fonts/Bookman-Demi fonts/Bookman-Demi
|
||||
f 0444 root sys /usr/share/cups/fonts/Bookman-DemiItalic fonts/Bookman-DemiItalic
|
||||
f 0444 root sys /usr/share/cups/fonts/Bookman-Light fonts/Bookman-Light
|
||||
f 0444 root sys /usr/share/cups/fonts/Bookman-LightItalic fonts/Bookman-LightItalic
|
||||
f 0444 root sys /usr/share/cups/fonts/Courier fonts/Courier
|
||||
f 0444 root sys /usr/share/cups/fonts/Courier-Bold fonts/Courier-Bold
|
||||
f 0444 root sys /usr/share/cups/fonts/Courier-BoldOblique fonts/Courier-BoldOblique
|
||||
f 0444 root sys /usr/share/cups/fonts/Courier-Oblique fonts/Courier-Oblique
|
||||
f 0444 root sys /usr/share/cups/fonts/Helvetica fonts/Helvetica
|
||||
f 0444 root sys /usr/share/cups/fonts/Helvetica-Bold fonts/Helvetica-Bold
|
||||
f 0444 root sys /usr/share/cups/fonts/Helvetica-BoldOblique fonts/Helvetica-BoldOblique
|
||||
f 0444 root sys /usr/share/cups/fonts/Helvetica-Narrow fonts/Helvetica-Narrow
|
||||
f 0444 root sys /usr/share/cups/fonts/Helvetica-Narrow-Bold fonts/Helvetica-Narrow-Bold
|
||||
f 0444 root sys /usr/share/cups/fonts/Helvetica-Narrow-BoldOblique fonts/Helvetica-Narrow-BoldOblique
|
||||
f 0444 root sys /usr/share/cups/fonts/Helvetica-Narrow-Oblique fonts/Helvetica-Narrow-Oblique
|
||||
f 0444 root sys /usr/share/cups/fonts/Helvetica-Oblique fonts/Helvetica-Oblique
|
||||
f 0444 root sys /usr/share/cups/fonts/NewCenturySchlbk-Bold fonts/NewCenturySchlbk-Bold
|
||||
f 0444 root sys /usr/share/cups/fonts/NewCenturySchlbk-BoldItalic fonts/NewCenturySchlbk-BoldItalic
|
||||
f 0444 root sys /usr/share/cups/fonts/NewCenturySchlbk-Italic fonts/NewCenturySchlbk-Italic
|
||||
f 0444 root sys /usr/share/cups/fonts/NewCenturySchlbk-Roman fonts/NewCenturySchlbk-Roman
|
||||
f 0444 root sys /usr/share/cups/fonts/Palatino-Bold fonts/Palatino-Bold
|
||||
f 0444 root sys /usr/share/cups/fonts/Palatino-BoldItalic fonts/Palatino-BoldItalic
|
||||
f 0444 root sys /usr/share/cups/fonts/Palatino-Italic fonts/Palatino-Italic
|
||||
f 0444 root sys /usr/share/cups/fonts/Palatino-Roman fonts/Palatino-Roman
|
||||
f 0444 root sys /usr/share/cups/fonts/Symbol fonts/Symbol
|
||||
f 0444 root sys /usr/share/cups/fonts/Times-Bold fonts/Times-Bold
|
||||
f 0444 root sys /usr/share/cups/fonts/Times-BoldItalic fonts/Times-BoldItalic
|
||||
f 0444 root sys /usr/share/cups/fonts/Times-Italic fonts/Times-Italic
|
||||
f 0444 root sys /usr/share/cups/fonts/Times-Roman fonts/Times-Roman
|
||||
f 0444 root sys /usr/share/cups/fonts/Utopia-Bold fonts/Utopia-Bold
|
||||
f 0444 root sys /usr/share/cups/fonts/Utopia-BoldItalic fonts/Utopia-BoldItalic
|
||||
f 0444 root sys /usr/share/cups/fonts/Utopia-Italic fonts/Utopia-Italic
|
||||
f 0444 root sys /usr/share/cups/fonts/Utopia-Regular fonts/Utopia-Regular
|
||||
f 0444 root sys /usr/share/cups/fonts/ZapfChancery-MediumItalic fonts/ZapfChancery-MediumItalic
|
||||
f 0444 root sys /usr/share/cups/fonts/ZapfDingbats fonts/ZapfDingbats
|
||||
f 0444 root sys /usr/share/cups/pstoraster/Fontmap pstoraster/Fontmap
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_l2img.ps pstoraster/gs_l2img.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_pfile.ps pstoraster/gs_pfile.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/pfbtogs.ps pstoraster/pfbtogs.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_wl1_e.ps pstoraster/gs_wl1_e.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_wl2_e.ps pstoraster/gs_wl2_e.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_wl5_e.ps pstoraster/gs_wl5_e.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_wan_e.ps pstoraster/gs_wan_e.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_pdf_e.ps pstoraster/gs_pdf_e.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_sym_e.ps pstoraster/gs_sym_e.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_std_e.ps pstoraster/gs_std_e.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_dbt_e.ps pstoraster/gs_dbt_e.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_mex_e.ps pstoraster/gs_mex_e.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_mro_e.ps pstoraster/gs_mro_e.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_iso_e.ps pstoraster/gs_iso_e.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_ksb_e.ps pstoraster/gs_ksb_e.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_ttf.ps pstoraster/gs_ttf.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_pdf.ps pstoraster/gs_pdf.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_ccfnt.ps pstoraster/gs_ccfnt.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/pdf_sec.ps pstoraster/pdf_sec.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_res.ps pstoraster/gs_res.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/pdf_base.ps pstoraster/pdf_base.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_btokn.ps pstoraster/gs_btokn.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_diskf.ps pstoraster/gs_diskf.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/pdf_2ps.ps pstoraster/pdf_2ps.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_init.ps pstoraster/gs_init.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_kanji.ps pstoraster/gs_kanji.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/pdf_draw.ps pstoraster/pdf_draw.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/pdf_font.ps pstoraster/pdf_font.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_type1.ps pstoraster/gs_type1.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_fonts.ps pstoraster/gs_fonts.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_statd.ps pstoraster/gs_statd.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_lev2.ps pstoraster/gs_lev2.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_typ42.ps pstoraster/gs_typ42.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_pdfwr.ps pstoraster/gs_pdfwr.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_cidfn.ps pstoraster/gs_cidfn.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_cmdl.ps pstoraster/gs_cmdl.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_dps1.ps pstoraster/gs_dps1.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_setpd.ps pstoraster/gs_setpd.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_cmap.ps pstoraster/gs_cmap.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/gs_fform.ps pstoraster/gs_fform.ps
|
||||
f 0444 root sys /usr/share/cups/pstoraster/pdf_main.ps pstoraster/pdf_main.ps
|
||||
f 0444 root sys /usr/share/cups/model/deskjet.ppd ppd/deskjet.ppd
|
||||
f 0444 root sys /usr/share/cups/model/laserjet.ppd ppd/laserjet.ppd
|
||||
|
||||
# Config files
|
||||
c 0600 root sys /var/cups/conf/classes.conf conf/classes.conf
|
||||
c 0600 root sys /var/cups/conf/cupsd.conf conf/cupsd.conf
|
||||
c 0600 root sys /var/cups/conf/mime.convs conf/mime.convs
|
||||
c 0600 root sys /var/cups/conf/mime.types conf/mime.types
|
||||
c 0600 root sys /var/cups/conf/printers.conf conf/printers.conf
|
||||
|
||||
# Developer files
|
||||
f 0444 root sys /usr/include/cups/cups.h cups/cups.h
|
||||
f 0444 root sys /usr/include/cups/http.h cups/http.h
|
||||
f 0444 root sys /usr/include/cups/ipp.h cups/ipp.h
|
||||
f 0444 root sys /usr/include/cups/language.h cups/language.h
|
||||
f 0444 root sys /usr/include/cups/mime.h cups/mime.h
|
||||
f 0444 root sys /usr/include/cups/ppd.h cups/ppd.h
|
||||
f 0444 root sys /usr/include/cups/raster.h cups/raster.h
|
||||
|
||||
# This should only be done for IRIX 6.x (-n32)
|
||||
%system irix irix64
|
||||
f 0444 root sys /usr/lib32/libcups.a cups/libcups.a
|
||||
%system hpux solaris sunos dunix linux
|
||||
f 0444 root sys /usr/lib/libcups.a cups/libcups.a
|
||||
%system all
|
||||
|
||||
# Documentation files
|
||||
f 0444 root sys /usr/share/cups/doc/cmp.html doc/cmp.html
|
||||
f 0444 root sys /usr/share/cups/doc/cmp.pdf doc/cmp.pdf
|
||||
f 0444 root sys /usr/share/cups/doc/cupsdoc.css doc/cupsdoc.css
|
||||
f 0444 root sys /usr/share/cups/doc/cups.css doc/cups.css
|
||||
f 0444 root sys /usr/share/cups/doc/documentation.html doc/documentation.html
|
||||
f 0444 root sys /usr/share/cups/doc/idd.html doc/idd.html
|
||||
f 0444 root sys /usr/share/cups/doc/idd.pdf doc/idd.pdf
|
||||
f 0444 root sys /usr/share/cups/doc/images/classes.gif doc/images/classes.gif
|
||||
f 0444 root sys /usr/share/cups/doc/images/cups-bar.gif doc/images/cups-bar.gif
|
||||
f 0444 root sys /usr/share/cups/doc/images/cups-block-diagram.gif doc/images/cups-block-diagram.gif
|
||||
f 0444 root sys /usr/share/cups/doc/images/cups-large.gif doc/images/cups-large.gif
|
||||
f 0444 root sys /usr/share/cups/doc/images/cups-medium.gif doc/images/cups-medium.gif
|
||||
f 0444 root sys /usr/share/cups/doc/images/cups-small.gif doc/images/cups-small.gif
|
||||
f 0444 root sys /usr/share/cups/doc/images/logo.gif doc/images/logo.gif
|
||||
f 0444 root sys /usr/share/cups/doc/images/navbar.gif doc/images/navbar.gif
|
||||
f 0444 root sys /usr/share/cups/doc/images/printer-idle.gif doc/images/printer-idle.gif
|
||||
f 0444 root sys /usr/share/cups/doc/images/printer-processing.gif doc/images/printer-processing.gif
|
||||
f 0444 root sys /usr/share/cups/doc/images/printer-stopped.gif doc/images/printer-stopped.gif
|
||||
f 0444 root sys /usr/share/cups/doc/index.html doc/index.html
|
||||
f 0444 root sys /usr/share/cups/doc/overview.html doc/overview.html
|
||||
f 0444 root sys /usr/share/cups/doc/overview.pdf doc/overview.pdf
|
||||
f 0444 root sys /usr/share/cups/doc/sam.html doc/sam.html
|
||||
f 0444 root sys /usr/share/cups/doc/sam.pdf doc/sam.pdf
|
||||
f 0444 root sys /usr/share/cups/doc/sdd.html doc/sdd.html
|
||||
f 0444 root sys /usr/share/cups/doc/sdd.pdf doc/sdd.pdf
|
||||
f 0444 root sys /usr/share/cups/doc/ssr.html doc/ssr.html
|
||||
f 0444 root sys /usr/share/cups/doc/ssr.pdf doc/ssr.pdf
|
||||
f 0444 root sys /usr/share/cups/doc/stp.html doc/stp.html
|
||||
f 0444 root sys /usr/share/cups/doc/stp.pdf doc/stp.pdf
|
||||
f 0444 root sys /usr/share/cups/doc/sum.html doc/sum.html
|
||||
f 0444 root sys /usr/share/cups/doc/sum.pdf doc/sum.pdf
|
||||
f 0444 root sys /usr/share/cups/doc/svd.html doc/svd.html
|
||||
f 0444 root sys /usr/share/cups/doc/svd.pdf doc/svd.pdf
|
||||
|
||||
# Man pages
|
||||
%system irix irix64
|
||||
f 0444 root sys /usr/share/catman/a_man/cat1/accept.z man/accept.z
|
||||
l 0444 root sys /usr/share/catman/a_man/cat1/reject.z accept.z
|
||||
f 0444 root sys /usr/share/catman/u_man/cat1/backend.z man/backend.z
|
||||
f 0444 root sys /usr/share/catman/u_man/cat5/classes.conf.z man/classes.conf.z
|
||||
f 0444 root sys /usr/share/catman/u_man/cat5/cupsd.conf.z man/cupsd.conf.z
|
||||
f 0444 root sys /usr/share/catman/a_man/cat1/cupsd.z man/cupsd.z
|
||||
f 0444 root sys /usr/share/catman/a_man/cat1/enable.z man/enable.z
|
||||
l 0444 root sys /usr/share/catman/a_man/cat1/disable.z enable.z
|
||||
f 0444 root sys /usr/share/catman/u_man/cat1/filter.z man/filter.z
|
||||
f 0444 root sys /usr/share/catman/a_man/cat1/lpadmin.z man/lpadmin.z
|
||||
f 0444 root sys /usr/share/catman/a_man/cat1/lpc.z man/lpc.z
|
||||
f 0444 root sys /usr/share/catman/u_man/cat1/lprm.z man/lprm.z
|
||||
f 0444 root sys /usr/share/catman/u_man/cat1/lpr.z man/lpr.z
|
||||
f 0444 root sys /usr/share/catman/u_man/cat1/lpstat.z man/lpstat.z
|
||||
f 0444 root sys /usr/share/catman/u_man/cat1/lp.z man/lp.z
|
||||
l 0444 root sys /usr/share/catman/u_man/cat1/cancel.z lp.z
|
||||
f 0444 root sys /usr/share/catman/u_man/cat5/mime.convs.z man/mime.convs.z
|
||||
f 0444 root sys /usr/share/catman/u_man/cat5/mime.types.z man/mime.types.z
|
||||
f 0444 root sys /usr/share/catman/u_man/cat5/printers.conf.z man/printers.conf.z
|
||||
%system hpux linux dunix solaris sunos
|
||||
f 0444 root sys /usr/man/man8/accept.8 man/accept.8
|
||||
l 0444 root sys /usr/man/man8/reject.8 accept.8
|
||||
f 0444 root sys /usr/man/man1/backend.1 man/backend.1
|
||||
f 0444 root sys /usr/man/man1/classes.conf.5 man/classes.conf.5
|
||||
f 0444 root sys /usr/man/man8/cupsd.8 man/cupsd.8
|
||||
f 0444 root sys /usr/man/man5/cupsd.conf.5 man/cupsd.conf.5
|
||||
f 0444 root sys /usr/man/man8/enable.8 man/enable.8
|
||||
l 0444 root sys /usr/man/man8/disable.8 enable.8
|
||||
f 0444 root sys /usr/man/man1/filter.1 man/filter.1
|
||||
f 0444 root sys /usr/man/man8/lpadmin.8 man/lpadmin.8
|
||||
f 0444 root sys /usr/man/man8/lpc.8 man/lpc.8
|
||||
f 0444 root sys /usr/man/man1/lprm.1 man/lprm.1
|
||||
f 0444 root sys /usr/man/man1/lpr.1 man/lpr.1
|
||||
f 0444 root sys /usr/man/man1/lpstat.1 man/lpstat.1
|
||||
f 0444 root sys /usr/man/man1/lp.1 man/lp.1
|
||||
l 0444 root sys /usr/man/man1/cancel.1 lp.1
|
||||
f 0444 root sys /usr/man/man5/mime.convs.5 man/mime.convs.5
|
||||
f 0444 root sys /usr/man/man5/mime.types.5 man/mime.types.5
|
||||
f 0444 root sys /usr/man/man5/printers.conf.5 man/printers.conf.5
|
||||
|
||||
# Startup scripts
|
||||
%system hpux
|
||||
%install /sbin/init.d/cups start
|
||||
%remove /sbin/init.d/cups stop
|
||||
%patch /sbin/init.d/cups stop
|
||||
f 0555 root sys /sbin/init.d/cups cups.sh
|
||||
l 0555 root sys /sbin/rc1.d/K280cups ../init.d/cups
|
||||
l 0555 root sys /sbin/rc2.d/S720cups ../init.d/cups
|
||||
%system irix irix64
|
||||
%install /sbin/chkconfig -f cups on
|
||||
%install /etc/init.d/cups start
|
||||
%remove /etc/init.d/cups stop
|
||||
%patch /etc/init.d/cups stop
|
||||
f 0555 root sys /etc/init.d/cups cups.sh
|
||||
l 0555 root sys /etc/rc0.d/K25cups ../init.d/cups
|
||||
l 0555 root sys /etc/rc2.d/S60cups ../init.d/cups
|
||||
%system linux
|
||||
%install /etc/rc.d/init.d/cups start
|
||||
%remove /etc/rc.d/init.d/cups stop
|
||||
%patch /etc/rc.d/init.d/cups stop
|
||||
f 0555 root sys /etc/rc.d/init.d/cups cups.sh
|
||||
l 0555 root sys /etc/rc.d/rc2.d/S60cups ../init.d/cups
|
||||
l 0555 root sys /etc/rc.d/rc3.d/S60cups ../init.d/cups
|
||||
l 0555 root sys /etc/rc.d/rc4.d/S60cups ../init.d/cups
|
||||
l 0555 root sys /etc/rc.d/rc5.d/S60cups ../init.d/cups
|
||||
l 0555 root sys /etc/rc.d/rc0.d/K60cups ../init.d/cups
|
||||
l 0555 root sys /etc/rc.d/rc1.d/K60cups ../init.d/cups
|
||||
l 0555 root sys /etc/rc.d/rc6.d/K60cups ../init.d/cups
|
||||
%system dunix
|
||||
%install /sbin/init.d/cups start
|
||||
%remove /sbin/init.d/cups stop
|
||||
%patch /sbin/init.d/cups stop
|
||||
f 0555 root sys /sbin/init.d/cups cups.sh
|
||||
l 0555 root sys /sbin/rc0.d/K05cups ../init.d/cups
|
||||
l 0555 root sys /sbin/rc2.d/K00cups ../init.d/cups
|
||||
l 0555 root sys /sbin/rc3.d/S65cups ../init.d/cups
|
||||
%system sunos solaris
|
||||
%install /etc/init.d/cups start
|
||||
%remove /etc/init.d/cups stop
|
||||
%patch /etc/init.d/cups stop
|
||||
f 0555 root sys /etc/init.d/cups cups.sh
|
||||
l 0555 root sys /etc/rc0.d/K20cups ../init.d/cups
|
||||
l 0555 root sys /etc/rc2.d/S80cups ../init.d/cups
|
||||
|
||||
#
|
||||
# End of "$Id: cups.list 529 1999-07-13 14:11:00Z mike $".
|
||||
#
|
||||
+16
-64
@@ -4,12 +4,6 @@
|
||||
#
|
||||
# Startup/shutdown script for the Common UNIX Printing System (CUPS).
|
||||
#
|
||||
# Linux chkconfig stuff:
|
||||
#
|
||||
# chkconfig: 2345 60 60
|
||||
# description: Startup/shutdown script for the Common UNIX \
|
||||
# Printing System (CUPS).
|
||||
#
|
||||
# Copyright 1997-1999 by Easy Software Products, all rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
@@ -29,26 +23,7 @@
|
||||
# WWW: http://www.cups.org
|
||||
#
|
||||
|
||||
# See what program to use for configuration stuff...
|
||||
case "`uname`" in
|
||||
IRIX*)
|
||||
IS_ON=/sbin/chkconfig
|
||||
;;
|
||||
|
||||
*)
|
||||
IS_ON=/bin/true
|
||||
;;
|
||||
esac
|
||||
|
||||
# The verbose flag controls the printing of the names of
|
||||
# daemons as they are started.
|
||||
if $IS_ON verbose; then
|
||||
ECHO=echo
|
||||
else
|
||||
ECHO=:
|
||||
fi
|
||||
|
||||
# See if the CUPS server is running...
|
||||
# See if the CUPS daemon is running, and if so stop it...
|
||||
case "`uname`" in
|
||||
IRIX* | HP-UX | SunOS)
|
||||
pid=`ps -e | awk '{print $1,$4}' | grep cupsd | awk '{print $1}'`
|
||||
@@ -64,49 +39,26 @@ case "`uname`" in
|
||||
;;
|
||||
esac
|
||||
|
||||
# Start or stop the CUPS server based upon the first argument to the script.
|
||||
case $1 in
|
||||
start | restart | reload)
|
||||
if test "$pid" != ""; then
|
||||
if $IS_ON cups; then
|
||||
kill -HUP $pid
|
||||
$ECHO "cups: scheduler restarted."
|
||||
else
|
||||
kill $pid
|
||||
$ECHO "cups: scheduler stopped."
|
||||
fi
|
||||
else
|
||||
if $IS_ON cups; then
|
||||
/usr/sbin/cupsd 2>&1 >/dev/null &
|
||||
$ECHO "cups: scheduler started."
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
start | restart)
|
||||
if test "$pid" != ""; then
|
||||
echo "Restarting CUPS scheduler..."
|
||||
kill -HUP $pid
|
||||
else
|
||||
echo "Starting CUPS scheduler..."
|
||||
/usr/sbin/cupsd 2>&1 >/dev/null &
|
||||
fi
|
||||
;;
|
||||
|
||||
stop)
|
||||
if test "$pid" != ""; then
|
||||
kill $pid
|
||||
$ECHO "cups: scheduler stopped."
|
||||
fi
|
||||
;;
|
||||
|
||||
status)
|
||||
if test "$pid" != ""; then
|
||||
echo "cups: Scheduler is running."
|
||||
else
|
||||
echo "cups: Scheduler is not running."
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: cups {reload|restart|start|status|stop}"
|
||||
exit 1
|
||||
;;
|
||||
if test "$pid" != ""; then
|
||||
echo "Stopping CUPS scheduler..."
|
||||
kill $pid
|
||||
sleep 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
#
|
||||
|
||||
+41
-43
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: cups.spec 714 1999-10-01 14:40:53Z mike $"
|
||||
# "$Id: cups.spec 505 1999-07-08 15:00:20Z mike $"
|
||||
#
|
||||
# RPM "spec" file for the Common UNIX Printing System (CUPS).
|
||||
#
|
||||
@@ -26,11 +26,11 @@
|
||||
|
||||
Summary: Common Unix Printing System
|
||||
Name: cups
|
||||
Version: 1.0
|
||||
Version: 1.0b5
|
||||
Release: 0
|
||||
Copyright: GPL
|
||||
Group: System Environment/Daemons
|
||||
Source: ftp://ftp.easysw.com/pub/cups/beta/cups-1.0-source.tar.gz
|
||||
Source: ftp://ftp.easysw.com/pub/cups/beta/cups-1.0b5-source.tar.gz
|
||||
Url: http://www.cups.org
|
||||
Packager: Michael Sweet <mike@easysw.com>
|
||||
Vendor: Easy Software Products
|
||||
@@ -66,29 +66,28 @@ make
|
||||
# these lines just make sure the directory structure in the
|
||||
# RPM_BUILD_ROOT exists
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT/etc
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/rc.d
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
|
||||
mkdir -p $RPM_BUILD_ROOT/usr
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/lib
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/man
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/man/man1
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/man/man5
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/man/man8
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/locale
|
||||
mkdir -p $RPM_BUILD_ROOT/var/cups
|
||||
mkdir -p $RPM_BUILD_ROOT/var/cups/conf
|
||||
mkdir -p $RPM_BUILD_ROOT/var/cups/logs
|
||||
mkdir -p $RPM_BUILD_ROOT/var/logs
|
||||
mkdir $RPM_BUILD_ROOT/etc
|
||||
mkdir $RPM_BUILD_ROOT/etc/rc.d
|
||||
mkdir $RPM_BUILD_ROOT/etc/rc.d/init.d
|
||||
mkdir $RPM_BUILD_ROOT/usr
|
||||
mkdir $RPM_BUILD_ROOT/usr/bin
|
||||
mkdir $RPM_BUILD_ROOT/usr/lib
|
||||
mkdir $RPM_BUILD_ROOT/usr/man
|
||||
mkdir $RPM_BUILD_ROOT/usr/man/man1
|
||||
mkdir $RPM_BUILD_ROOT/usr/man/man5
|
||||
mkdir $RPM_BUILD_ROOT/usr/man/man8
|
||||
mkdir $RPM_BUILD_ROOT/usr/share/locale
|
||||
mkdir $RPM_BUILD_ROOT/var/cups
|
||||
mkdir $RPM_BUILD_ROOT/var/cups/conf
|
||||
mkdir $RPM_BUILD_ROOT/var/cups/logs
|
||||
mkdir $RPM_BUILD_ROOT/var/logs
|
||||
|
||||
ln -sf /var/cups/logs $RPM_BUILD_ROOT/var/logs/cups
|
||||
ln -sf /var/cups/conf $RPM_BUILD_ROOT/etc/cups
|
||||
|
||||
make prefix=$RPM_BUILD_ROOT/usr DATADIR=$RPM_BUILD_ROOT/usr/share/cups LOCALEDIR=$RPM_BUILD_ROOT/usr/share/locale SERVERROOT=$RPM_BUILD_ROOT/var/cups install
|
||||
|
||||
$RPM_BUILD_ROOT/etc/rc.d/init.d/cups
|
||||
install -m 755 -o root -g root cups.sh $RPM_BUILD_ROOT/etc/rc.d/init.d/cups
|
||||
install -m 755 -o root -g root $RPM_SOURCE_DIR/cups.sh $RPM_BUILD_ROOT/etc/rc.d/init.d/cups
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add cups
|
||||
@@ -106,6 +105,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%config /var/cups/conf/mime.convs
|
||||
%config /var/cups/conf/mime.types
|
||||
%config /var/cups/conf/printers.conf
|
||||
/usr/lib/accept
|
||||
/usr/lib/lpadmin
|
||||
/usr/lib/reject
|
||||
/usr/bin/lpr
|
||||
/usr/bin/lprm
|
||||
/usr/bin/disable
|
||||
@@ -113,11 +115,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/usr/bin/cancel
|
||||
/usr/bin/lp
|
||||
/usr/bin/lpstat
|
||||
/usr/lib/accept
|
||||
/usr/lib/libcups.so.1
|
||||
/usr/lib/libcupsimage.so.1
|
||||
/usr/lib/lpadmin
|
||||
/usr/lib/reject
|
||||
/usr/man/man1/backend.1
|
||||
/usr/man/man1/filter.1
|
||||
/usr/man/man1/lprm.1
|
||||
@@ -137,25 +134,23 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/usr/man/man8/lpc.8
|
||||
/usr/man/man8/reject.8
|
||||
/usr/man/man8/disable.8
|
||||
/usr/sbin/accept
|
||||
/usr/sbin/cupsd
|
||||
/usr/sbin/lpadmin
|
||||
/usr/sbin/lpc
|
||||
/usr/sbin/reject
|
||||
/usr/sbin/cupsd
|
||||
/usr/lib/libcups.so.1
|
||||
/usr/lib/libcupsimage.so.1
|
||||
%dir /usr/share/cups
|
||||
/usr/share/cups/data/8859-1
|
||||
/usr/share/cups/data/8859-14
|
||||
/usr/share/cups/data/8859-15
|
||||
/usr/share/cups/data/8859-2
|
||||
/usr/share/cups/data/8859-3
|
||||
/usr/share/cups/data/8859-4
|
||||
/usr/share/cups/data/8859-5
|
||||
/usr/share/cups/data/8859-6
|
||||
/usr/share/cups/data/8859-7
|
||||
/usr/share/cups/data/8859-8
|
||||
/usr/share/cups/data/8859-9
|
||||
/usr/share/cups/data/HPGLprolog
|
||||
/usr/share/cups/data/psglyphs
|
||||
/usr/share/cups/8859-1
|
||||
/usr/share/cups/8859-14
|
||||
/usr/share/cups/8859-15
|
||||
/usr/share/cups/8859-2
|
||||
/usr/share/cups/8859-3
|
||||
/usr/share/cups/8859-4
|
||||
/usr/share/cups/8859-5
|
||||
/usr/share/cups/8859-6
|
||||
/usr/share/cups/8859-7
|
||||
/usr/share/cups/8859-8
|
||||
/usr/share/cups/8859-9
|
||||
/usr/share/cups/HPGLprolog
|
||||
/usr/share/cups/doc/cmp.html
|
||||
/usr/share/cups/doc/cmp.pdf
|
||||
/usr/share/cups/doc/cups.css
|
||||
@@ -277,6 +272,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/var/cups/backend/lpd
|
||||
/var/cups/backend/parallel
|
||||
/var/cups/backend/serial
|
||||
/var/cups/backend/smb
|
||||
/var/cups/backend/socket
|
||||
/var/cups/cgi-bin/classes.cgi
|
||||
/var/cups/cgi-bin/jobs.cgi
|
||||
@@ -303,7 +299,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/usr/include/cups/mime.h
|
||||
/usr/include/cups/ppd.h
|
||||
/usr/include/cups/raster.h
|
||||
/usr/lib/libcups.so
|
||||
/usr/lib/libcupsimage.so
|
||||
|
||||
#
|
||||
# End of "$Id: cups.spec 714 1999-10-01 14:40:53Z mike $".
|
||||
# End of "$Id: cups.spec 505 1999-07-08 15:00:20Z mike $".
|
||||
#
|
||||
|
||||
+11
-12
@@ -28,10 +28,9 @@ include ../Makedefs
|
||||
# Object files...
|
||||
#
|
||||
|
||||
LIBOBJS = emit.o filter.o http.o ipp.o language.o mark.o mime.o \
|
||||
OBJS = emit.o filter.o http.o ipp.o language.o mark.o mime.o \
|
||||
options.o page.o ppd.o raster.o string.o type.o usersys.o \
|
||||
util.o
|
||||
OBJS = $(LIBOBJS) testhttp.o testmime.o testppd.o
|
||||
|
||||
#
|
||||
# Header files to install...
|
||||
@@ -43,7 +42,7 @@ HEADERS = cups.h http.h ipp.h language.h mime.h ppd.h raster.h
|
||||
# Targets in this directory...
|
||||
#
|
||||
|
||||
TARGETS = $(LIBCUPS) testhttp testmime testppd
|
||||
TARGETS = $(LIBCUPS) testmime testppd testhttp
|
||||
|
||||
#
|
||||
# Make all targets...
|
||||
@@ -68,26 +67,26 @@ install: all
|
||||
-$(MKDIR) $(LIBDIR)
|
||||
$(CP) $(LIBCUPS) $(LIBDIR)
|
||||
if test $(LIBCUPS) != "libcups.a"; then \
|
||||
$(LN) $(LIBCUPS) `basename $(LIBCUPS) .1`; \
|
||||
$(LN) $(LIBCUPS) `basename $(LIBCUPS) .1` \
|
||||
fi
|
||||
|
||||
#
|
||||
# libcups.so.1, libcups.sl.1
|
||||
#
|
||||
|
||||
libcups.so.1 libcups.sl.1: $(LIBOBJS) ../Makedefs
|
||||
libcups.so.1 libcups.sl.1: $(OBJS) ../Makedefs
|
||||
echo Linking $@...
|
||||
$(DSO) $@ $(LIBOBJS)
|
||||
-$(LN) $@ `basename $@ .1`
|
||||
$(DSO) $@ $(OBJS)
|
||||
$(LN) $@ `basename $@ .1`
|
||||
|
||||
#
|
||||
# libcups.a
|
||||
#
|
||||
|
||||
libcups.a: $(LIBOBJS)
|
||||
libcups.a: $(OBJS)
|
||||
echo Archiving $@...
|
||||
$(RM) $@
|
||||
$(AR) $(ARFLAGS) $@ $(LIBOBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
#
|
||||
@@ -121,7 +120,7 @@ util.o: cups.h http.h ipp.h ../config.h ../Makedefs
|
||||
|
||||
testhttp: testhttp.o libcups.a
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ testhttp.o libcups.a $(NETLIBS)
|
||||
$(CC) $(LDFLAGS) -o $@ testhttp.o libcups.a $(LIBS)
|
||||
|
||||
testhttp.o: http.h ../Makedefs
|
||||
|
||||
@@ -131,7 +130,7 @@ testhttp.o: http.h ../Makedefs
|
||||
|
||||
testmime: testmime.o libcups.a
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ testmime.o libcups.a
|
||||
$(CC) $(LDFLAGS) -o $@ testmime.o libcups.a $(LIBS)
|
||||
|
||||
testmime.o: mime.h ../Makedefs
|
||||
|
||||
@@ -141,7 +140,7 @@ testmime.o: mime.h ../Makedefs
|
||||
|
||||
testppd: testppd.o libcups.a
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ testppd.o libcups.a $(NETLIBS)
|
||||
$(CC) $(LDFLAGS) -o $@ testppd.o libcups.a $(LIBS)
|
||||
|
||||
testppd.o: ppd.h ../Makedefs
|
||||
|
||||
|
||||
-176
@@ -1,176 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="cups" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=cups - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "cups.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "cups.mak" CFG="cups - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "cups - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "cups - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "cups - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\visualc" /I ".." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"cups.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "cups - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\visualc" /I ".." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"cupsd.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "cups - Win32 Release"
|
||||
# Name "cups - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\emit.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\filter.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\http.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ipp.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\language.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mark.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mime.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\options.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\page.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ppd.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\raster.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\string.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\type.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\util.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cups.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\http.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ipp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\language.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mime.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ppd.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\raster.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
+1
-1
@@ -117,7 +117,7 @@ extern int cupsGetPrinters(char ***printers);
|
||||
extern int cupsPrintFile(const char *printer, const char *filename,
|
||||
const char *title, int num_options,
|
||||
cups_option_t *options);
|
||||
extern char *cupsTempFile(char *filename, int len);
|
||||
|
||||
extern int cupsAddOption(const char *name, const char *value,
|
||||
int num_options, cups_option_t **options);
|
||||
extern void cupsFreeOptions(int num_options, cups_option_t *options);
|
||||
|
||||
-123
@@ -1,123 +0,0 @@
|
||||
"us-ascii",
|
||||
"OK",
|
||||
"Cancel",
|
||||
"Help",
|
||||
"Quit",
|
||||
"Close",
|
||||
"Yes",
|
||||
"No",
|
||||
"On",
|
||||
"Off",
|
||||
"Save",
|
||||
"Discard",
|
||||
"Default",
|
||||
"Options",
|
||||
"More Info",
|
||||
"Black",
|
||||
"Color",
|
||||
"Cyan",
|
||||
"Magenta",
|
||||
"Yellow",
|
||||
"Copyright 1993-1999 by Easy Software Products, All Rights Reserved.",
|
||||
"General",
|
||||
"Printer",
|
||||
"Image Options",
|
||||
"HP-GL/2 Options",
|
||||
"Extra",
|
||||
"Document",
|
||||
"Other",
|
||||
"Print Pages: ",
|
||||
"Entire Document",
|
||||
"Page Range:",
|
||||
"Reverse Order: ",
|
||||
"Page Format: ",
|
||||
" 1-Up",
|
||||
" 2-Up",
|
||||
" 4-Up",
|
||||
"Image Scaling: ",
|
||||
"Use Natural Image Size",
|
||||
"Zoom by Percent",
|
||||
"Zoom by PPI",
|
||||
"Mirror Image: ",
|
||||
"Color Saturation: ",
|
||||
"Color Hue: ",
|
||||
"Fit to Page: ",
|
||||
"Shading: ",
|
||||
"Pen Width: ",
|
||||
"Gamma Correction: ",
|
||||
"Brightness: ",
|
||||
"Add",
|
||||
"Delete",
|
||||
"Modify",
|
||||
"Printer URI",
|
||||
"Printer Name",
|
||||
"Printer Location",
|
||||
"Printer Info",
|
||||
"Printer Make and Model",
|
||||
"Device URI",
|
||||
"Formatting Page",
|
||||
"Printing Page",
|
||||
"Initializing Printer",
|
||||
"Printer State",
|
||||
"Accepting Jobs",
|
||||
"Not Accepting Jobs",
|
||||
"Print Jobs",
|
||||
"Class",
|
||||
"Local",
|
||||
"Remote",
|
||||
"Duplexing",
|
||||
"Stapling",
|
||||
"Fast Copies",
|
||||
"Collated Copies",
|
||||
"Hole Punching",
|
||||
"Covering",
|
||||
"Binding",
|
||||
"Sorting",
|
||||
"Small (up to 9.5x14in)",
|
||||
"Medium (9.5x14in to 13x19in)",
|
||||
"Large (13x19in and larger)",
|
||||
"Custom Size",
|
||||
"Idle",
|
||||
"Processing",
|
||||
"Stopped",
|
||||
"All",
|
||||
"Odd",
|
||||
"Even Pages",
|
||||
"Darker Lighter",
|
||||
"Media Size",
|
||||
"Media Type",
|
||||
"Media Source",
|
||||
"Orientation: ",
|
||||
"Portrait",
|
||||
"Landscape",
|
||||
"Job State",
|
||||
"Job Name",
|
||||
"User Name",
|
||||
"Priority",
|
||||
"Copies",
|
||||
"File Size",
|
||||
"Pending",
|
||||
"Output Mode",
|
||||
"Resolution",
|
||||
"400 Your browser sent a request that this server could not understand.",
|
||||
"This server could not verify that you are authorized to access the resource.",
|
||||
"You must pay to access this server.",
|
||||
"You don't have permission to access the resource on this server.",
|
||||
"The requested resource was not found on this server.",
|
||||
"The requested method is not allowed with the resource.",
|
||||
"An appropriate representation for the resource was not found on this server.",
|
||||
"You don't have permission to use this server as a proxy host.",
|
||||
"The request has taken too long to complete and has been aborted.",
|
||||
"The requested resource has more than one value.",
|
||||
"The requested resource is gone and has not been replaced.",
|
||||
"The requested method requires a valid Content-Length.",
|
||||
"The precondition on the request evaluated to false.",
|
||||
"The request is too large for this server to process.",
|
||||
"The request URI is too large for this server to process.",
|
||||
"The request format is not understood by this server.",
|
||||
"500 The server has detected an unrecoverable error and cannot process your request.",
|
||||
"The requested method is not implemented by this server.",
|
||||
"The proxy server received an invalid response from an upstream server.",
|
||||
"The requested resource is currently unavailable on this server.",
|
||||
"The proxy server has taken too long to respond to this server.",
|
||||
"This server does not support the HTTP version required by your browser.",
|
||||
+1
-1
@@ -107,7 +107,7 @@ ppdEmit(ppd_file_t *ppd, /* I - PPD file record */
|
||||
*/
|
||||
|
||||
fputs("pop pop pop\n", fp);
|
||||
fputs("<</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice\n", fp);
|
||||
fputs("<</PageSize[7 -2 roll]/ImagingBBox null>>setpagedevice\n", fp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+37
-145
@@ -25,8 +25,6 @@
|
||||
*
|
||||
* httpInitialize() - Initialize the HTTP interface library and set the
|
||||
* default HTTP proxy (if any).
|
||||
* httpCheck() - Check to see if there is a pending response from
|
||||
* the server.
|
||||
* httpClose() - Close an HTTP connection...
|
||||
* httpConnect() - Connect to a HTTP server.
|
||||
* httpReconnect() - Reconnect to a HTTP server...
|
||||
@@ -68,7 +66,6 @@
|
||||
#include <ctype.h>
|
||||
#include "string.h"
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "http.h"
|
||||
#include "ipp.h"
|
||||
@@ -192,41 +189,6 @@ httpInitialize(void)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'httpCheck()' - Check to see if there is a pending response from the server.
|
||||
*/
|
||||
|
||||
int /* O - 0 = no data, 1 = data available */
|
||||
httpCheck(http_t *http) /* I - HTTP connection */
|
||||
{
|
||||
fd_set input; /* Input set for select() */
|
||||
struct timeval timeout; /* Timeout */
|
||||
|
||||
|
||||
/*
|
||||
* First see if there is data in the buffer...
|
||||
*/
|
||||
|
||||
if (http == NULL)
|
||||
return (0);
|
||||
|
||||
if (http->used)
|
||||
return (1);
|
||||
|
||||
/*
|
||||
* Then try doing a select() to poll the socket...
|
||||
*/
|
||||
|
||||
FD_ZERO(&input);
|
||||
FD_SET(http->fd, &input);
|
||||
|
||||
timeout.tv_sec = 0;
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
return (select(http->fd + 1, &input, NULL, NULL, &timeout) > 0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'httpClose()' - Close an HTTP connection...
|
||||
*/
|
||||
@@ -329,11 +291,7 @@ httpReconnect(http_t *http) /* I - HTTP data */
|
||||
*/
|
||||
|
||||
if ((http->fd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
|
||||
{
|
||||
http->error = errno;
|
||||
http->status = HTTP_ERROR;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
#ifdef FD_CLOEXEC
|
||||
fcntl(http->fd, F_SETFD, FD_CLOEXEC); /* Close this socket when starting *
|
||||
@@ -355,9 +313,6 @@ httpReconnect(http_t *http) /* I - HTTP data */
|
||||
if (connect(http->fd, (struct sockaddr *)&(http->hostaddr),
|
||||
sizeof(http->hostaddr)) < 0)
|
||||
{
|
||||
http->error = errno;
|
||||
http->status = HTTP_ERROR;
|
||||
|
||||
#ifdef WIN32
|
||||
closesocket(http->fd);
|
||||
#else
|
||||
@@ -367,9 +322,6 @@ httpReconnect(http_t *http) /* I - HTTP data */
|
||||
return (-1);
|
||||
}
|
||||
|
||||
http->error = 0;
|
||||
http->status = HTTP_CONTINUE;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -695,11 +647,6 @@ httpRead(http_t *http, /* I - HTTP data */
|
||||
* data, go idle...
|
||||
*/
|
||||
|
||||
if (http->data_encoding == HTTP_ENCODE_CHUNKED &&
|
||||
(http->state == HTTP_GET_SEND || http->state == HTTP_POST_RECV ||
|
||||
http->state == HTTP_POST_SEND || http->state == HTTP_PUT_RECV))
|
||||
httpGets(len, sizeof(len), http);
|
||||
|
||||
if (http->state == HTTP_POST_RECV)
|
||||
http->state ++;
|
||||
else
|
||||
@@ -734,23 +681,13 @@ httpRead(http_t *http, /* I - HTTP data */
|
||||
|
||||
if (bytes > 0)
|
||||
http->data_remaining -= bytes;
|
||||
else if (bytes < 0)
|
||||
http->error = errno;
|
||||
|
||||
if (http->data_remaining == 0)
|
||||
if (http->data_remaining == 0 && http->data_encoding != HTTP_ENCODE_CHUNKED)
|
||||
{
|
||||
if (http->data_encoding == HTTP_ENCODE_CHUNKED &&
|
||||
(http->state == HTTP_GET_SEND || http->state == HTTP_POST_RECV ||
|
||||
http->state == HTTP_POST_SEND || http->state == HTTP_PUT_RECV))
|
||||
httpGets(len, sizeof(len), http);
|
||||
|
||||
if (http->data_encoding != HTTP_ENCODE_CHUNKED)
|
||||
{
|
||||
if (http->state == HTTP_POST_RECV)
|
||||
http->state ++;
|
||||
else
|
||||
http->state = HTTP_WAITING;
|
||||
}
|
||||
if (http->state == HTTP_POST_RECV)
|
||||
http->state ++;
|
||||
else
|
||||
http->state = HTTP_WAITING;
|
||||
}
|
||||
|
||||
return (bytes);
|
||||
@@ -779,8 +716,11 @@ httpWrite(http_t *http, /* I - HTTP data */
|
||||
if (http->data_encoding == HTTP_ENCODE_CHUNKED &&
|
||||
(http->state == HTTP_GET_SEND || http->state == HTTP_POST_RECV ||
|
||||
http->state == HTTP_POST_SEND || http->state == HTTP_PUT_RECV))
|
||||
if (httpPrintf(http, "%x\r\n", length) < 0)
|
||||
{
|
||||
sprintf(len, "%x\r\n", length);
|
||||
if (send(http->fd, len, strlen(len), 0) < 3)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (length == 0)
|
||||
{
|
||||
@@ -805,7 +745,6 @@ httpWrite(http_t *http, /* I - HTTP data */
|
||||
if (bytes < 0)
|
||||
{
|
||||
DEBUG_puts("httpWrite: error writing data...\n");
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@@ -816,12 +755,6 @@ httpWrite(http_t *http, /* I - HTTP data */
|
||||
http->data_remaining -= bytes;
|
||||
}
|
||||
|
||||
if (http->data_encoding == HTTP_ENCODE_CHUNKED &&
|
||||
(http->state == HTTP_GET_SEND || http->state == HTTP_POST_RECV ||
|
||||
http->state == HTTP_POST_SEND || http->state == HTTP_PUT_RECV))
|
||||
if (httpPrintf(http, "\r\n") < 0)
|
||||
return (-1);
|
||||
|
||||
if (http->data_remaining == 0 && http->data_encoding == HTTP_ENCODE_LENGTH)
|
||||
{
|
||||
/*
|
||||
@@ -864,8 +797,6 @@ httpGets(char *line, /* I - Line to read into */
|
||||
* Pre-scan the buffer and see if there is a newline in there...
|
||||
*/
|
||||
|
||||
errno = 0;
|
||||
|
||||
do
|
||||
{
|
||||
bufptr = http->buffer;
|
||||
@@ -883,36 +814,23 @@ httpGets(char *line, /* I - Line to read into */
|
||||
* No newline; see if there is more data to be read...
|
||||
*/
|
||||
|
||||
if ((bytes = recv(http->fd, bufend, HTTP_MAX_BUFFER - http->used, 0)) < 0)
|
||||
if ((bytes = recv(http->fd, bufend, HTTP_MAX_BUFFER - http->used, 0)) < 1)
|
||||
{
|
||||
/*
|
||||
* Nope, can't get a line this time...
|
||||
*/
|
||||
|
||||
if (errno != http->error)
|
||||
{
|
||||
http->error = errno;
|
||||
continue;
|
||||
}
|
||||
|
||||
DEBUG_printf(("httpGets(): recv() error %d!\n", errno));
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
else if (bytes == 0)
|
||||
else
|
||||
{
|
||||
if (http->blocking)
|
||||
http->error = EPIPE;
|
||||
/*
|
||||
* Yup, update the amount used and the end pointer...
|
||||
*/
|
||||
|
||||
return (NULL);
|
||||
http->used += bytes;
|
||||
bufend += bytes;
|
||||
}
|
||||
|
||||
/*
|
||||
* Yup, update the amount used and the end pointer...
|
||||
*/
|
||||
|
||||
http->used += bytes;
|
||||
bufend += bytes;
|
||||
}
|
||||
}
|
||||
while (bufptr >= bufend);
|
||||
@@ -940,7 +858,6 @@ httpGets(char *line, /* I - Line to read into */
|
||||
if (http->used > 0)
|
||||
memcpy(http->buffer, bufptr, http->used);
|
||||
|
||||
DEBUG_printf(("httpGets(): Returning \"%s\"\n", line));
|
||||
return (line);
|
||||
}
|
||||
else if (*bufptr == 0x0d)
|
||||
@@ -949,8 +866,6 @@ httpGets(char *line, /* I - Line to read into */
|
||||
*lineptr++ = *bufptr++;
|
||||
}
|
||||
|
||||
DEBUG_puts("httpGets(): No new line available!");
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -964,11 +879,8 @@ httpPrintf(http_t *http, /* I - HTTP data */
|
||||
const char *format, /* I - printf-style format string */
|
||||
...) /* I - Additional args as needed */
|
||||
{
|
||||
int bytes, /* Number of bytes to write */
|
||||
nbytes, /* Number of bytes written */
|
||||
tbytes; /* Number of bytes all together */
|
||||
char buf[HTTP_MAX_BUFFER], /* Buffer for formatted string */
|
||||
*bufptr; /* Pointer into buffer */
|
||||
int bytes; /* Number of bytes to write */
|
||||
char buf[HTTP_MAX_BUFFER]; /* Buffer for formatted string */
|
||||
va_list ap; /* Variable argument pointer */
|
||||
|
||||
|
||||
@@ -978,11 +890,7 @@ httpPrintf(http_t *http, /* I - HTTP data */
|
||||
|
||||
DEBUG_printf(("httpPrintf: %s", buf));
|
||||
|
||||
for (tbytes = 0, bufptr = buf; tbytes < bytes; tbytes += nbytes, bufptr += nbytes)
|
||||
if ((nbytes = send(http->fd, bufptr, bytes - tbytes, 0)) < 0)
|
||||
return (-1);
|
||||
|
||||
return (bytes);
|
||||
return (send(http->fd, buf, bytes, 0));
|
||||
}
|
||||
|
||||
|
||||
@@ -1181,20 +1089,7 @@ httpUpdate(http_t *http) /* I - HTTP data */
|
||||
httpSetField(http, field, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
http->status = HTTP_ERROR;
|
||||
return (HTTP_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* See if there was an error...
|
||||
*/
|
||||
|
||||
if (http->error)
|
||||
{
|
||||
http->status = HTTP_ERROR;
|
||||
return (HTTP_ERROR);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1431,13 +1326,6 @@ http_send(http_t *http, /* I - HTTP data */
|
||||
|
||||
*ptr = '\0';
|
||||
|
||||
/*
|
||||
* See if we had an error the last time around; if so, reconnect...
|
||||
*/
|
||||
|
||||
if (http->status == HTTP_ERROR || http->status >= HTTP_BAD_REQUEST)
|
||||
httpReconnect(http);
|
||||
|
||||
/*
|
||||
* Send the request header...
|
||||
*/
|
||||
@@ -1446,12 +1334,22 @@ http_send(http_t *http, /* I - HTTP data */
|
||||
if (request == HTTP_POST || request == HTTP_PUT)
|
||||
http->state ++;
|
||||
|
||||
http->status = HTTP_CONTINUE;
|
||||
|
||||
if (httpPrintf(http, "%s %s HTTP/1.1\r\n", codes[request], buf) < 1)
|
||||
if (httpPrintf(http, "%s %s HTTP/1.1\n", codes[request], buf) < 1)
|
||||
{
|
||||
http->status = HTTP_ERROR;
|
||||
return (-1);
|
||||
/*
|
||||
* Might have lost connection; try to reconnect...
|
||||
*/
|
||||
|
||||
if (httpReconnect(http))
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
* OK, we've reconnected, send the request again...
|
||||
*/
|
||||
|
||||
if (httpPrintf(http, "%s %s HTTP/%d.%d\n", codes[request], buf,
|
||||
http->version / 100, http->version % 100) < 1)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
for (i = 0; i < HTTP_FIELD_MAX; i ++)
|
||||
@@ -1459,18 +1357,12 @@ http_send(http_t *http, /* I - HTTP data */
|
||||
{
|
||||
DEBUG_printf(("%s: %s\n", http_fields[i], http->fields[i]));
|
||||
|
||||
if (httpPrintf(http, "%s: %s\r\n", http_fields[i], http->fields[i]) < 1)
|
||||
{
|
||||
http->status = HTTP_ERROR;
|
||||
return (-1);
|
||||
}
|
||||
if (httpPrintf(http, "%s: %s\n", http_fields[i], http->fields[i]) < 1)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (httpPrintf(http, "\r\n") < 1)
|
||||
{
|
||||
http->status = HTTP_ERROR;
|
||||
if (httpPrintf(http, "\n") < 1)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
httpClearFields(http);
|
||||
|
||||
|
||||
@@ -221,7 +221,6 @@ typedef struct
|
||||
{
|
||||
int fd; /* File descriptor for this socket */
|
||||
int blocking; /* To block or not to block */
|
||||
int error; /* Last error on read */
|
||||
time_t activity; /* Time since last read/write */
|
||||
http_state_t state; /* State of client */
|
||||
http_status_t status; /* Status of last request */
|
||||
@@ -246,13 +245,11 @@ typedef struct
|
||||
*/
|
||||
|
||||
# define httpBlocking(http,b) (http)->blocking = (b)
|
||||
extern int httpCheck(http_t *http);
|
||||
# define httpClearFields(http) memset((http)->fields, 0, sizeof((http)->fields)),\
|
||||
httpSetField((http), HTTP_FIELD_HOST, (http)->hostname)
|
||||
extern void httpClose(http_t *http);
|
||||
extern http_t *httpConnect(const char *host, int port);
|
||||
extern int httpDelete(http_t *http, const char *uri);
|
||||
# define httpError(http) ((http)->error)
|
||||
extern void httpFlush(http_t *http);
|
||||
extern int httpGet(http_t *http, const char *uri);
|
||||
extern char *httpGets(char *line, int length, http_t *http);
|
||||
|
||||
+19
-17
@@ -65,7 +65,7 @@
|
||||
*/
|
||||
|
||||
static ipp_attribute_t *add_attr(ipp_t *ipp, int num_values);
|
||||
static int ipp_read(http_t *http, unsigned char *buffer, int length);
|
||||
static int ipp_read(http_t *http, char *buffer, int length);
|
||||
|
||||
|
||||
/*
|
||||
@@ -512,6 +512,8 @@ ippDateToTime(const ipp_uchar_t *date) /* I - RFC 1903 date info */
|
||||
else
|
||||
t -= date[9] * 3600 + date[10] * 60;
|
||||
|
||||
t -= timezone;
|
||||
|
||||
return (t);
|
||||
}
|
||||
|
||||
@@ -723,7 +725,7 @@ ippRead(http_t *http, /* I - HTTP data */
|
||||
ipp_t *ipp) /* I - IPP data */
|
||||
{
|
||||
int n; /* Length of data */
|
||||
unsigned char buffer[8192]; /* Data buffer */
|
||||
char buffer[8192]; /* Data buffer */
|
||||
ipp_attribute_t *attr; /* Current attribute */
|
||||
ipp_tag_t tag; /* Current tag */
|
||||
|
||||
@@ -865,7 +867,7 @@ ippRead(http_t *http, /* I - HTTP data */
|
||||
|
||||
attr->group_tag = ipp->curtag;
|
||||
attr->value_tag = tag;
|
||||
attr->name = strdup((char *)buffer);
|
||||
attr->name = strdup(buffer);
|
||||
attr->num_values = 0;
|
||||
}
|
||||
|
||||
@@ -911,7 +913,7 @@ ippRead(http_t *http, /* I - HTTP data */
|
||||
buffer[n] = '\0';
|
||||
DEBUG_printf(("ippRead: value = \'%s\'\n", buffer));
|
||||
|
||||
attr->values[attr->num_values].string.text = strdup((char *)buffer);
|
||||
attr->values[attr->num_values].string.text = strdup(buffer);
|
||||
break;
|
||||
case IPP_TAG_DATE :
|
||||
if (ipp_read(http, buffer, 11) < 11)
|
||||
@@ -950,7 +952,7 @@ ippRead(http_t *http, /* I - HTTP data */
|
||||
|
||||
buffer[n] = '\0';
|
||||
|
||||
attr->values[attr->num_values].string.charset = strdup((char *)buffer);
|
||||
attr->values[attr->num_values].string.charset = strdup(buffer);
|
||||
|
||||
if (ipp_read(http, buffer, 2) < 2)
|
||||
return (IPP_ERROR);
|
||||
@@ -962,7 +964,7 @@ ippRead(http_t *http, /* I - HTTP data */
|
||||
|
||||
buffer[n] = '\0';
|
||||
|
||||
attr->values[attr->num_values].string.text = strdup((char *)buffer);
|
||||
attr->values[attr->num_values].string.text = strdup(buffer);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1042,7 +1044,7 @@ ippWrite(http_t *http, /* I - HTTP data */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
int n; /* Length of data */
|
||||
unsigned char buffer[8192], /* Data buffer */
|
||||
char buffer[8192], /* Data buffer */
|
||||
*bufptr; /* Pointer into buffer */
|
||||
ipp_attribute_t *attr; /* Current attribute */
|
||||
|
||||
@@ -1071,7 +1073,7 @@ ippWrite(http_t *http, /* I - HTTP data */
|
||||
*bufptr++ = ipp->request.any.request_id >> 8;
|
||||
*bufptr++ = ipp->request.any.request_id;
|
||||
|
||||
if (httpWrite(http, (char *)buffer, bufptr - buffer) < 0)
|
||||
if (httpWrite(http, buffer, bufptr - buffer) < 0)
|
||||
{
|
||||
DEBUG_puts("ippWrite: Could not write IPP header...");
|
||||
return (IPP_ERROR);
|
||||
@@ -1327,7 +1329,7 @@ ippWrite(http_t *http, /* I - HTTP data */
|
||||
* Write the data out...
|
||||
*/
|
||||
|
||||
if (httpWrite(http, (char *)buffer, bufptr - buffer) < 0)
|
||||
if (httpWrite(http, buffer, bufptr - buffer) < 0)
|
||||
{
|
||||
DEBUG_puts("ippWrite: Could not write IPP attribute...");
|
||||
return (IPP_ERROR);
|
||||
@@ -1350,7 +1352,7 @@ ippWrite(http_t *http, /* I - HTTP data */
|
||||
*/
|
||||
|
||||
buffer[0] = IPP_TAG_END;
|
||||
if (httpWrite(http, (char *)buffer, 1) < 0)
|
||||
if (httpWrite(http, buffer, 1) < 0)
|
||||
{
|
||||
DEBUG_puts("ippWrite: Could not write IPP end-tag...");
|
||||
return (IPP_ERROR);
|
||||
@@ -1427,13 +1429,13 @@ add_attr(ipp_t *ipp, /* I - IPP request */
|
||||
* 'ipp_read()' - Semi-blocking read on a HTTP connection...
|
||||
*/
|
||||
|
||||
static int /* O - Number of bytes read */
|
||||
ipp_read(http_t *http, /* I - Client connection */
|
||||
unsigned char *buffer, /* O - Buffer for data */
|
||||
int length) /* I - Total length */
|
||||
static int /* O - Number of bytes read */
|
||||
ipp_read(http_t *http, /* I - Client connection */
|
||||
char *buffer,/* O - Buffer for data */
|
||||
int length) /* I - Total length */
|
||||
{
|
||||
int tbytes, /* Total bytes read */
|
||||
bytes; /* Bytes read this pass */
|
||||
int tbytes, /* Total bytes read */
|
||||
bytes; /* Bytes read this pass */
|
||||
|
||||
|
||||
/*
|
||||
@@ -1441,7 +1443,7 @@ ipp_read(http_t *http, /* I - Client connection */
|
||||
*/
|
||||
|
||||
for (tbytes = 0; tbytes < length; tbytes += bytes, buffer += bytes)
|
||||
if ((bytes = httpRead(http, (char *)buffer, length - tbytes)) <= 0)
|
||||
if ((bytes = httpRead(http, buffer, length - tbytes)) <= 0)
|
||||
break;
|
||||
|
||||
/*
|
||||
|
||||
+1
-2
@@ -87,12 +87,11 @@ typedef enum /**** Format tags for attribute formats... ****/
|
||||
IPP_TAG_DATE,
|
||||
IPP_TAG_RESOLUTION,
|
||||
IPP_TAG_RANGE,
|
||||
IPP_TAG_COLLECTION,
|
||||
IPP_TAG_TEXTLANG,
|
||||
IPP_TAG_NAMELANG,
|
||||
IPP_TAG_TEXT = 0x41,
|
||||
IPP_TAG_NAME,
|
||||
IPP_TAG_KEYWORD = 0x44,
|
||||
IPP_TAG_KEYWORD,
|
||||
IPP_TAG_URI,
|
||||
IPP_TAG_URISCHEME,
|
||||
IPP_TAG_CHARSET,
|
||||
|
||||
+1
-2
@@ -149,8 +149,7 @@ cupsLangGet(const char *language) /* I - Language or locale */
|
||||
* operating systems.
|
||||
*/
|
||||
|
||||
if (language == NULL || language[0] == '\0' ||
|
||||
strcmp(language, "POSIX") == 0)
|
||||
if (language == NULL || language[0] == '\0')
|
||||
strcpy(langname, "C");
|
||||
else
|
||||
strcpy(langname, language);
|
||||
|
||||
+1
-6
@@ -177,12 +177,7 @@ typedef struct cups_lang_str /**** Language Cache Structure ****/
|
||||
* Prototypes...
|
||||
*/
|
||||
|
||||
# ifdef WIN32
|
||||
# define cupsLangDefault() cupsLangGet(setlocale(LC_ALL, ""))
|
||||
# else /* This fix works around bugs in the Linux and HP-UX setlocale() */
|
||||
# define cupsLangDefault() cupsLangGet(getenv("LANG"))
|
||||
# endif /* WIN32 */
|
||||
|
||||
# define cupsLangDefault() cupsLangGet(setlocale(LC_ALL, ""))
|
||||
extern char *cupsLangEncoding(cups_lang_t *lang);
|
||||
extern void cupsLangFlush(void);
|
||||
extern void cupsLangFree(cups_lang_t *lang);
|
||||
|
||||
+40
-12
@@ -33,6 +33,7 @@
|
||||
* ppdMarkDefaults() - Mark all default options in the PPD file.
|
||||
* ppdMarkOption() - Mark an option in a PPD file.
|
||||
* ppd_defaults() - Set the defaults for this group and all sub-groups.
|
||||
* ppd_default() - Set the default choice for an option.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -47,7 +48,8 @@
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static void ppd_defaults(ppd_file_t *ppd, ppd_group_t *g);
|
||||
static void ppd_defaults(ppd_group_t *g);
|
||||
static void ppd_default(ppd_option_t *o);
|
||||
|
||||
|
||||
/*
|
||||
@@ -294,7 +296,12 @@ ppdMarkDefaults(ppd_file_t *ppd)/* I - PPD file record */
|
||||
return;
|
||||
|
||||
for (i = ppd->num_groups, g = ppd->groups; i > 0; i --, g ++)
|
||||
ppd_defaults(ppd, g);
|
||||
ppd_defaults(g);
|
||||
|
||||
o = ppdFindOption(ppd, "PageSize");
|
||||
|
||||
for (i = 0; i < ppd->num_sizes; i ++)
|
||||
ppd->sizes[i].marked = strcmp(ppd->sizes[i].name, o->defchoice) == 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -365,15 +372,15 @@ ppdMarkOption(ppd_file_t *ppd, /* I - PPD file record */
|
||||
|
||||
if (strcmp(option, "PageSize") == 0)
|
||||
{
|
||||
if ((o = ppdFindOption(ppd, "PageRegion")) != NULL)
|
||||
for (i = 0; i < o->num_choices; i ++)
|
||||
o->choices[i].marked = 0;
|
||||
o = ppdFindOption(ppd, "PageRegion");
|
||||
for (i = 0; i < o->num_choices; i ++)
|
||||
o->choices[i].marked = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((o = ppdFindOption(ppd, "PageSize")) != NULL)
|
||||
for (i = 0; i < o->num_choices; i ++)
|
||||
o->choices[i].marked = 0;
|
||||
o = ppdFindOption(ppd, "PageSize");
|
||||
for (i = 0; i < o->num_choices; i ++)
|
||||
o->choices[i].marked = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -387,8 +394,7 @@ ppdMarkOption(ppd_file_t *ppd, /* I - PPD file record */
|
||||
*/
|
||||
|
||||
static void
|
||||
ppd_defaults(ppd_file_t *ppd, /* I - PPD file */
|
||||
ppd_group_t *g) /* I - Group to default */
|
||||
ppd_defaults(ppd_group_t *g) /* I - Group to default */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
ppd_option_t *o; /* Current option */
|
||||
@@ -400,10 +406,32 @@ ppd_defaults(ppd_file_t *ppd, /* I - PPD file */
|
||||
|
||||
for (i = g->num_options, o = g->options; i > 0; i --, o ++)
|
||||
if (strcmp(o->keyword, "PageRegion") != 0)
|
||||
ppdMarkOption(ppd, o->keyword, o->defchoice);
|
||||
ppd_default(o);
|
||||
|
||||
for (i = g->num_subgroups, sg = g->subgroups; i > 0; i --, sg ++)
|
||||
ppd_defaults(ppd, sg);
|
||||
ppd_defaults(sg);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'ppd_default()' - Set the default choice for an option.
|
||||
*/
|
||||
|
||||
static void
|
||||
ppd_default(ppd_option_t *o) /* I - Option to default */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
ppd_choice_t *c; /* Current choice */
|
||||
|
||||
|
||||
if (o == NULL)
|
||||
return;
|
||||
|
||||
for (i = o->num_choices, c = o->choices; i > 0; i --, c ++)
|
||||
if (strcmp(c->choice, o->defchoice) == 0)
|
||||
c->marked = 1;
|
||||
else
|
||||
c->marked = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+70
-126
@@ -70,8 +70,6 @@
|
||||
# define WRITE_BINARY "w" /* Open a binary file for writing */
|
||||
#endif /* WIN32 || __EMX__ */
|
||||
|
||||
#define safe_free(p) if (p) free(p) /* Safe free macro */
|
||||
|
||||
#define PPD_KEYWORD 1 /* Line contained a keyword */
|
||||
#define PPD_OPTION 2 /* Line contained an option name */
|
||||
#define PPD_TEXT 4 /* Line contained human-readable text */
|
||||
@@ -121,14 +119,14 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
* Free all strings at the top level...
|
||||
*/
|
||||
|
||||
safe_free(ppd->lang_encoding);
|
||||
safe_free(ppd->lang_version);
|
||||
safe_free(ppd->modelname);
|
||||
safe_free(ppd->ttrasterizer);
|
||||
safe_free(ppd->manufacturer);
|
||||
safe_free(ppd->product);
|
||||
safe_free(ppd->nickname);
|
||||
safe_free(ppd->shortnickname);
|
||||
free(ppd->lang_encoding);
|
||||
free(ppd->lang_version);
|
||||
free(ppd->modelname);
|
||||
free(ppd->ttrasterizer);
|
||||
free(ppd->manufacturer);
|
||||
free(ppd->product);
|
||||
free(ppd->nickname);
|
||||
free(ppd->shortnickname);
|
||||
|
||||
/*
|
||||
* Free any emulations...
|
||||
@@ -138,11 +136,11 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
{
|
||||
for (i = ppd->num_emulations, emul = ppd->emulations; i > 0; i --, emul ++)
|
||||
{
|
||||
safe_free(emul->start);
|
||||
safe_free(emul->stop);
|
||||
free(emul->start);
|
||||
free(emul->stop);
|
||||
}
|
||||
|
||||
safe_free(ppd->emulations);
|
||||
free(ppd->emulations);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -154,7 +152,7 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
for (i = ppd->num_groups, group = ppd->groups; i > 0; i --, group ++)
|
||||
ppd_free_group(group);
|
||||
|
||||
safe_free(ppd->groups);
|
||||
free(ppd->groups);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -162,14 +160,14 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
*/
|
||||
|
||||
if (ppd->num_sizes > 0)
|
||||
safe_free(ppd->sizes);
|
||||
free(ppd->sizes);
|
||||
|
||||
/*
|
||||
* Free any constraints...
|
||||
*/
|
||||
|
||||
if (ppd->num_consts > 0)
|
||||
safe_free(ppd->consts);
|
||||
free(ppd->consts);
|
||||
|
||||
/*
|
||||
* Free any fonts...
|
||||
@@ -178,9 +176,9 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
if (ppd->num_fonts > 0)
|
||||
{
|
||||
for (i = ppd->num_fonts, font = ppd->fonts; i > 0; i --, font ++)
|
||||
safe_free(*font);
|
||||
free(*font);
|
||||
|
||||
safe_free(ppd->fonts);
|
||||
free(ppd->fonts);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -188,13 +186,13 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
*/
|
||||
|
||||
if (ppd->num_profiles > 0)
|
||||
safe_free(ppd->profiles);
|
||||
free(ppd->profiles);
|
||||
|
||||
/*
|
||||
* Free the whole record...
|
||||
*/
|
||||
|
||||
safe_free(ppd);
|
||||
free(ppd);
|
||||
}
|
||||
|
||||
|
||||
@@ -217,7 +215,7 @@ ppd_free_group(ppd_group_t *group) /* I - Group to free */
|
||||
i --, option ++)
|
||||
ppd_free_option(option);
|
||||
|
||||
safe_free(group->options);
|
||||
free(group->options);
|
||||
}
|
||||
|
||||
if (group->num_subgroups > 0)
|
||||
@@ -227,7 +225,7 @@ ppd_free_group(ppd_group_t *group) /* I - Group to free */
|
||||
i --, subgroup ++)
|
||||
ppd_free_group(subgroup);
|
||||
|
||||
safe_free(group->subgroups);
|
||||
free(group->subgroups);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,9 +246,9 @@ ppd_free_option(ppd_option_t *option) /* I - Option to free */
|
||||
for (i = option->num_choices, choice = option->choices;
|
||||
i > 0;
|
||||
i --, choice ++)
|
||||
safe_free(choice->code);
|
||||
free(choice->code);
|
||||
|
||||
safe_free(option->choices);
|
||||
free(option->choices);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,7 +285,7 @@ ppd_get_group(ppd_file_t *ppd, /* I - PPD file */
|
||||
ppd->num_groups ++;
|
||||
|
||||
memset(group, 0, sizeof(ppd_group_t));
|
||||
strncpy(group->text, name, sizeof(group->text) - 1);
|
||||
strcpy(group->text, name);
|
||||
}
|
||||
|
||||
return (group);
|
||||
@@ -326,7 +324,7 @@ ppd_get_option(ppd_group_t *group, /* I - Group */
|
||||
group->num_options ++;
|
||||
|
||||
memset(option, 0, sizeof(ppd_option_t));
|
||||
strncpy(option->keyword, name, sizeof(option->keyword) - 1);
|
||||
strcpy(option->keyword, name);
|
||||
}
|
||||
|
||||
return (option);
|
||||
@@ -358,7 +356,7 @@ ppd_add_choice(ppd_option_t *option, /* I - Option */
|
||||
option->num_choices ++;
|
||||
|
||||
memset(choice, 0, sizeof(ppd_choice_t));
|
||||
strncpy(choice->choice, name, sizeof(choice->choice) - 1);
|
||||
strcpy(choice->choice, name);
|
||||
|
||||
return (choice);
|
||||
}
|
||||
@@ -388,7 +386,7 @@ ppd_add_size(ppd_file_t *ppd, /* I - PPD file */
|
||||
ppd->num_sizes ++;
|
||||
|
||||
memset(size, 0, sizeof(ppd_size_t));
|
||||
strncpy(size->name, name, sizeof(size->name) - 1);
|
||||
strcpy(size->name, name);
|
||||
|
||||
return (size);
|
||||
}
|
||||
@@ -451,14 +449,14 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
* Either this is not a PPD file, or it is not a 4.x PPD file.
|
||||
*/
|
||||
|
||||
safe_free(string);
|
||||
if (string != NULL)
|
||||
free(string);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
DEBUG_printf(("ppdOpen: keyword = %s, string = %08x\n", keyword, string));
|
||||
|
||||
safe_free(string);
|
||||
if (string != NULL)
|
||||
free(string);
|
||||
|
||||
/*
|
||||
* Allocate memory for the PPD file record...
|
||||
@@ -601,10 +599,9 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
ppd->num_profiles ++;
|
||||
|
||||
memset(profile, 0, sizeof(ppd_profile_t));
|
||||
strncpy(profile->resolution, name, sizeof(profile->resolution) - 1);
|
||||
strncpy(profile->media_type, text, sizeof(profile->media_type) - 1);
|
||||
sscanf(string, "%f%f%f%f%f%f%f%f%f%f%f", &(profile->density),
|
||||
&(profile->gamma),
|
||||
strcpy(profile->resolution, name);
|
||||
strcpy(profile->media_type, text);
|
||||
sscanf(string, "%f%f%f%f%f%f%f%f%f%f", &(profile->density),
|
||||
profile->matrix[0] + 0, profile->matrix[0] + 1,
|
||||
profile->matrix[0] + 2, profile->matrix[1] + 0,
|
||||
profile->matrix[1] + 1, profile->matrix[1] + 2,
|
||||
@@ -630,8 +627,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
string = NULL;
|
||||
}
|
||||
else if (strcmp(keyword, "VariablePaperSize") == 0 &&
|
||||
strcmp(string, "True") == 0 &&
|
||||
!ppd->variable_sizes)
|
||||
strcmp(string, "True") == 0)
|
||||
{
|
||||
ppd->variable_sizes = 1;
|
||||
|
||||
@@ -650,26 +646,25 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
CUPS_MSG_GENERAL))) == NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if ((option = ppd_get_option(group, "PageSize")) == NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if ((choice = ppd_add_choice(option, "Custom")) == NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
strncpy(choice->text, cupsLangString(language, CUPS_MSG_VARIABLE),
|
||||
sizeof(choice->text) - 1);
|
||||
strcpy(choice->text, cupsLangString(language, CUPS_MSG_VARIABLE));
|
||||
group = NULL;
|
||||
option = NULL;
|
||||
}
|
||||
@@ -691,62 +686,20 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
ppd->custom_margins + 1, ppd->custom_margins + 2,
|
||||
ppd->custom_margins + 3);
|
||||
else if (strcmp(keyword, "CustomPageSize") == 0 &&
|
||||
strcmp(name, "True") == 0)
|
||||
strcmp(name, "True") == 0 &&
|
||||
ppd->variable_sizes)
|
||||
{
|
||||
if (!ppd->variable_sizes)
|
||||
{
|
||||
ppd->variable_sizes = 1;
|
||||
|
||||
/*
|
||||
* Add a "Custom" page size entry...
|
||||
*/
|
||||
|
||||
ppd_add_size(ppd, "Custom");
|
||||
|
||||
/*
|
||||
* Add a "Custom" page size option...
|
||||
*/
|
||||
|
||||
if ((group = ppd_get_group(ppd,
|
||||
cupsLangString(language,
|
||||
CUPS_MSG_GENERAL))) == NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if ((option = ppd_get_option(group, "PageSize")) == NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if ((choice = ppd_add_choice(option, "Custom")) == NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
strncpy(choice->text, cupsLangString(language, CUPS_MSG_VARIABLE),
|
||||
sizeof(choice->text) - 1);
|
||||
group = NULL;
|
||||
option = NULL;
|
||||
}
|
||||
|
||||
if ((option = ppdFindOption(ppd, "PageSize")) == NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if ((choice = ppdFindChoice(option, "Custom")) == NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -860,7 +813,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
if (group == NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -873,7 +826,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
if (option == NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -890,28 +843,23 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
|
||||
if (text[0])
|
||||
{
|
||||
strncpy(option->text, text, sizeof(option->text) - 1);
|
||||
strcpy(option->text, text);
|
||||
ppd_fix(option->text);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strcmp(name, "PageSize") == 0)
|
||||
strncpy(option->text, cupsLangString(language, CUPS_MSG_MEDIA_SIZE),
|
||||
sizeof(option->text) - 1);
|
||||
strcpy(option->text, cupsLangString(language, CUPS_MSG_MEDIA_SIZE));
|
||||
else if (strcmp(name, "MediaType") == 0)
|
||||
strncpy(option->text, cupsLangString(language, CUPS_MSG_MEDIA_TYPE),
|
||||
sizeof(option->text) - 1);
|
||||
strcpy(option->text, cupsLangString(language, CUPS_MSG_MEDIA_TYPE));
|
||||
else if (strcmp(name, "InputSlot") == 0)
|
||||
strncpy(option->text, cupsLangString(language, CUPS_MSG_MEDIA_SOURCE),
|
||||
sizeof(option->text) - 1);
|
||||
strcpy(option->text, cupsLangString(language, CUPS_MSG_MEDIA_SOURCE));
|
||||
else if (strcmp(name, "ColorModel") == 0)
|
||||
strncpy(option->text, cupsLangString(language, CUPS_MSG_OUTPUT_MODE),
|
||||
sizeof(option->text) - 1);
|
||||
strcpy(option->text, cupsLangString(language, CUPS_MSG_OUTPUT_MODE));
|
||||
else if (strcmp(name, "Resolution") == 0)
|
||||
strncpy(option->text, cupsLangString(language, CUPS_MSG_RESOLUTION),
|
||||
sizeof(option->text) - 1);
|
||||
strcpy(option->text, cupsLangString(language, CUPS_MSG_RESOLUTION));
|
||||
else
|
||||
strncpy(option->text, name, sizeof(option->text) - 1);
|
||||
strcpy(option->text, name);
|
||||
}
|
||||
|
||||
option->section = PPD_ORDER_ANY;
|
||||
@@ -927,7 +875,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
if (group == NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -943,7 +891,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
if (option == NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -958,7 +906,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
else
|
||||
option->ui = PPD_UI_PICKONE;
|
||||
|
||||
strncpy(option->text, text, sizeof(option->text) - 1);
|
||||
strcpy(option->text, text);
|
||||
|
||||
option->section = PPD_ORDER_JCL;
|
||||
group = NULL;
|
||||
@@ -975,7 +923,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
if (group != NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -997,7 +945,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
if (group == NULL || subgroup != NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -1010,7 +958,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
if (subgroup == NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -1021,7 +969,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
memset(subgroup, 0, sizeof(ppd_group_t));
|
||||
ppd_decode(string);
|
||||
ppd_fix(string);
|
||||
strncpy(subgroup->text, string, sizeof(subgroup->text) - 1);
|
||||
strcpy(subgroup->text, string);
|
||||
}
|
||||
else if (strcmp(keyword, "CloseSubGroup") == 0)
|
||||
subgroup = NULL;
|
||||
@@ -1031,7 +979,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
if (sscanf(string, "%f%s%s", &order, name, keyword) != 3)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -1100,15 +1048,14 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
for (i = 0; i < group->num_options; i ++)
|
||||
if (strcmp(keyword, group->options[i].keyword) == 0)
|
||||
{
|
||||
strncpy(group->options[i].defchoice, string,
|
||||
sizeof(group->options[i].defchoice) - 1);
|
||||
strcpy(group->options[i].defchoice, string);
|
||||
break;
|
||||
}
|
||||
|
||||
group = NULL;
|
||||
}
|
||||
else
|
||||
strncpy(option->defchoice, string, sizeof(option->defchoice) - 1);
|
||||
strcpy(option->defchoice, string);
|
||||
}
|
||||
else if (strcmp(keyword, "UIConstraints") == 0 ||
|
||||
strcmp(keyword, "NonUIConstraints") == 0)
|
||||
@@ -1122,7 +1069,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
if (constraint == NULL)
|
||||
{
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
free(string);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -1130,14 +1077,14 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
constraint += ppd->num_consts;
|
||||
ppd->num_consts ++;
|
||||
|
||||
switch (sscanf(string, "%40s%40s%40s%40s", constraint->option1,
|
||||
switch (sscanf(string, "%s%s%s%s", constraint->option1,
|
||||
constraint->choice1, constraint->option2,
|
||||
constraint->choice2))
|
||||
{
|
||||
case 0 : /* Error */
|
||||
case 1 : /* Error */
|
||||
ppdClose(ppd);
|
||||
safe_free(string);
|
||||
free(string);
|
||||
break;
|
||||
|
||||
case 2 : /* Two options... */
|
||||
@@ -1213,7 +1160,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
|
||||
if (mask & PPD_TEXT)
|
||||
{
|
||||
strncpy(choice->text, text, sizeof(choice->text) - 1);
|
||||
strcpy(choice->text, text);
|
||||
ppd_fix(choice->text);
|
||||
}
|
||||
else if (strcmp(name, "True") == 0)
|
||||
@@ -1221,7 +1168,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
else if (strcmp(name, "False") == 0)
|
||||
strcpy(choice->text, "No");
|
||||
else
|
||||
strncpy(choice->text, name, sizeof(choice->text) - 1);
|
||||
strcpy(choice->text, name);
|
||||
|
||||
if (strncmp(keyword, "JCL", 3) == 0)
|
||||
ppd_decode(string); /* Decode quoted string */
|
||||
@@ -1230,7 +1177,8 @@ ppdOpen(FILE *fp) /* I - File to read from */
|
||||
string = NULL; /* Don't free this string below */
|
||||
}
|
||||
|
||||
safe_free(string);
|
||||
if (string != NULL)
|
||||
free(string);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
@@ -1318,7 +1266,7 @@ ppdOpenFd(int fd) /* I - File to read from */
|
||||
|
||||
ppd = ppdOpen(fp);
|
||||
|
||||
safe_free(fp);
|
||||
free(fp);
|
||||
}
|
||||
else
|
||||
ppd = NULL;
|
||||
@@ -1406,11 +1354,7 @@ compare_strings(char *s, /* I - First string */
|
||||
* Bounce out if *s and *t aren't both digits...
|
||||
*/
|
||||
|
||||
if (isdigit(*s) && !isdigit(*t))
|
||||
return (1);
|
||||
else if (!isdigit(*s) && isdigit(*t))
|
||||
return (-1);
|
||||
else if (!isdigit(*s) || !isdigit(*t))
|
||||
if (!isdigit(*s) || !isdigit(*t))
|
||||
continue;
|
||||
|
||||
if (*s < *t)
|
||||
|
||||
@@ -153,7 +153,6 @@ typedef struct /**** sRGB Color Profiles ****/
|
||||
char resolution[41], /* Resolution or "-" */
|
||||
media_type[41]; /* Media type of "-" */
|
||||
float density, /* Ink density to use */
|
||||
gamma, /* Gamma correction to use */
|
||||
matrix[3][3]; /* Transform matrix */
|
||||
} ppd_profile_t;
|
||||
|
||||
|
||||
+4
-4
@@ -686,8 +686,8 @@ checkrules(const char *filename, /* I - Filename */
|
||||
bufptr = buffer + rules->offset - bufoffset;
|
||||
while (n > 0)
|
||||
if ((*bufptr >= 32 && *bufptr <= 126) ||
|
||||
(*bufptr >= 8 && *bufptr <= 13) ||
|
||||
*bufptr == 26 || *bufptr == 27)
|
||||
(*bufptr >= 8 && *bufptr <= 10) ||
|
||||
*bufptr == 13 || *bufptr == 26)
|
||||
{
|
||||
n --;
|
||||
bufptr ++;
|
||||
@@ -729,8 +729,8 @@ checkrules(const char *filename, /* I - Filename */
|
||||
while (n > 0)
|
||||
if ((*bufptr >= 160 && *bufptr <= 254) ||
|
||||
(*bufptr >= 32 && *bufptr <= 126) ||
|
||||
(*bufptr >= 8 && *bufptr <= 13) ||
|
||||
*bufptr == 26 || *bufptr == 27)
|
||||
(*bufptr >= 8 && *bufptr <= 10) ||
|
||||
*bufptr == 13 || *bufptr == 26)
|
||||
{
|
||||
n --;
|
||||
bufptr ++;
|
||||
|
||||
+20
-69
@@ -118,7 +118,7 @@ cupsCancelJob(const char *name, /* I - Name of printer or class */
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, uri);
|
||||
|
||||
ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "job-id", job);
|
||||
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-id", job);
|
||||
|
||||
/*
|
||||
* Do the request...
|
||||
@@ -152,6 +152,7 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
|
||||
const char *password; /* Password string */
|
||||
char plain[255], /* Plaintext username:password */
|
||||
encode[255]; /* Encoded username:password */
|
||||
char junk[8192]; /* Junk buffer for error data */
|
||||
static char authstring[255] = "";
|
||||
/* Authorization string */
|
||||
|
||||
@@ -217,7 +218,8 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
|
||||
DEBUG_puts("cupsDoFileRequest: post...");
|
||||
|
||||
if (httpPost(http, resource))
|
||||
continue;
|
||||
if (httpPost(http, resource))
|
||||
break;
|
||||
|
||||
/*
|
||||
* Send the IPP data and wait for the response...
|
||||
@@ -277,14 +279,8 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
|
||||
else
|
||||
break;
|
||||
}
|
||||
else if (status == HTTP_ERROR)
|
||||
{
|
||||
if (http->error != ENETDOWN && http->error != ENETUNREACH)
|
||||
continue;
|
||||
else
|
||||
break;
|
||||
}
|
||||
else if (status != HTTP_OK)
|
||||
|
||||
if (status != HTTP_OK)
|
||||
{
|
||||
DEBUG_printf(("cupsDoFileRequest: error %d...\n", status));
|
||||
|
||||
@@ -505,6 +501,7 @@ cupsGetPPD(const char *name) /* I - Printer name */
|
||||
resource[HTTP_MAX_URI]; /* Resource name */
|
||||
static char filename[HTTP_MAX_URI]; /* Local filename */
|
||||
char *tempdir; /* Temporary file directory */
|
||||
struct stat fileinfo; /* File information */
|
||||
|
||||
|
||||
/*
|
||||
@@ -520,29 +517,33 @@ cupsGetPPD(const char *name) /* I - Printer name */
|
||||
|
||||
#if defined(WIN32) || defined(__EMX__)
|
||||
tempdir = "C:/WINDOWS/TEMP";
|
||||
|
||||
sprintf(filename, "%s/%s.ppd", tempdir, printer);
|
||||
#else
|
||||
if ((tempdir = getenv("TMPDIR")) == NULL)
|
||||
tempdir = "/tmp";
|
||||
|
||||
sprintf(filename, "%s/%d.%s.ppd", tempdir, getuid(), printer);
|
||||
#endif /* WIN32 || __EMX__ */
|
||||
|
||||
sprintf(filename, "%s/%s.ppd", tempdir, printer);
|
||||
if (stat(filename, &fileinfo))
|
||||
memset(&fileinfo, 0, sizeof(fileinfo));
|
||||
|
||||
/*
|
||||
* And send a request to the HTTP server...
|
||||
* And send a request to the HTTP server using "if-modified-since"...
|
||||
*/
|
||||
|
||||
sprintf(resource, "/printers/%s.ppd", printer);
|
||||
|
||||
httpClearFields(cups_server);
|
||||
httpSetField(cups_server, HTTP_FIELD_HOST, hostname);
|
||||
httpSetField(cups_server, HTTP_FIELD_IF_MODIFIED_SINCE,
|
||||
httpGetDateString(fileinfo.st_mtime));
|
||||
httpGet(cups_server, resource);
|
||||
|
||||
switch (httpUpdate(cups_server))
|
||||
{
|
||||
case HTTP_OK : /* New file - get it! */
|
||||
break;
|
||||
case HTTP_NOT_MODIFIED : /* File hasn't been modified; use the current copy */
|
||||
return (filename);
|
||||
default :
|
||||
return (NULL);
|
||||
}
|
||||
@@ -723,17 +724,17 @@ cupsPrintFile(const char *name, /* I - Printer or class name */
|
||||
*/
|
||||
|
||||
if (cupsGetOption("raw", num_options, options))
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format",
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_MIMETYPE, "document-format",
|
||||
NULL, "application/vnd.cups-raw");
|
||||
else
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format",
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_MIMETYPE, "document-format",
|
||||
NULL, "application/octet-stream");
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_NAME, "requesting-user-name",
|
||||
NULL, cupsUser());
|
||||
|
||||
if (title)
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL, title);
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL, title);
|
||||
|
||||
/*
|
||||
* Then add all options on the command-line...
|
||||
@@ -888,56 +889,6 @@ cupsPrintFile(const char *name, /* I - Printer or class name */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cupsTempFile()' - Generate a temporary filename.
|
||||
*/
|
||||
|
||||
char * /* O - Filename */
|
||||
cupsTempFile(char *filename, /* I - Pointer to buffer */
|
||||
int len) /* I - Size of buffer */
|
||||
{
|
||||
char *tmpdir; /* TMPDIR environment var */
|
||||
static char buf[1024] = ""; /* Buffer if you pass in NULL and 0 */
|
||||
|
||||
|
||||
/*
|
||||
* See if a filename was specified...
|
||||
*/
|
||||
|
||||
if (filename == NULL)
|
||||
{
|
||||
filename = buf;
|
||||
len = sizeof(buf);
|
||||
}
|
||||
|
||||
/*
|
||||
* See if TMPDIR is defined...
|
||||
*/
|
||||
|
||||
if ((tmpdir = getenv("TMPDIR")) == NULL)
|
||||
tmpdir = "/var/tmp";
|
||||
|
||||
if ((strlen(tmpdir) + 8) > len)
|
||||
{
|
||||
/*
|
||||
* The specified directory exceeds the size of the buffer; default it...
|
||||
*/
|
||||
|
||||
strcpy(buf, "/var/tmp/XXXXXX");
|
||||
return (mktemp(buf));
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Make the temporary name using the specified directory...
|
||||
*/
|
||||
|
||||
sprintf(filename, "%s/XXXXXX", tmpdir);
|
||||
return (mktemp(filename));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_connect()' - Connect to the specified host...
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
%%BeginResource: procset hpgltops 1.0 0
|
||||
%
|
||||
% "$Id: HPGLprolog 312 1999-05-11 19:45:40Z mike $"
|
||||
%
|
||||
% HP-GL/2 filter procset for the Common UNIX Printing System (CUPS).
|
||||
%
|
||||
% This procset contains the basic drawing commands that are used to
|
||||
% reduce output size. Note the 'MP' (make newpath) definition - this
|
||||
% should be called 'NP' (newpath), but GhostScript uses the 'NP' name
|
||||
% for 'noaccess put' in some of its font files...
|
||||
%
|
||||
% Copyright 1993-1999 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-3111 USA
|
||||
%
|
||||
% Voice: (301) 373-9603
|
||||
% EMail: cups-info@cups.org
|
||||
% WWW: http://www.cups.org
|
||||
%
|
||||
/MO { moveto } bind def
|
||||
/LI { lineto } bind def
|
||||
/FI { fill } bind def
|
||||
/ST { stroke } bind def
|
||||
/CP { closepath } bind def
|
||||
/MP { newpath } bind def
|
||||
%
|
||||
% If you have more than 8 pens defined for your HP-GL/2 output you'll
|
||||
% need to add P# definitions (# = pen number) to set the appropriate color.
|
||||
% If you don't you'll get errors. The default 8 pens cover the primary
|
||||
% colors (white, black, red, green, yellow, blue, magenta, cyan). Ditto
|
||||
% for pen widths (W#).
|
||||
%
|
||||
% PC and PW commands in the input stream will define/redefine these
|
||||
% appropriately, but some packages don't generate them...
|
||||
%
|
||||
/P0 { 1.0 1.0 1.0 setrgbcolor } bind def
|
||||
/P1 { 0.0 0.0 0.0 setrgbcolor } bind def
|
||||
/P2 { 1.0 0.0 0.0 setrgbcolor } bind def
|
||||
/P3 { 0.0 1.0 0.0 setrgbcolor } bind def
|
||||
/P4 { 1.0 1.0 0.0 setrgbcolor } bind def
|
||||
/P5 { 0.0 0.0 1.0 setrgbcolor } bind def
|
||||
/P6 { 1.0 0.0 1.0 setrgbcolor } bind def
|
||||
/P7 { 0.0 1.0 1.0 setrgbcolor } bind def
|
||||
/W0 { DefaultPenWidth PenScaling mul setlinewidth } bind def
|
||||
/W1 { DefaultPenWidth PenScaling mul setlinewidth } bind def
|
||||
/W2 { DefaultPenWidth PenScaling mul setlinewidth } bind def
|
||||
/W3 { DefaultPenWidth PenScaling mul setlinewidth } bind def
|
||||
/W4 { DefaultPenWidth PenScaling mul setlinewidth } bind def
|
||||
/W5 { DefaultPenWidth PenScaling mul setlinewidth } bind def
|
||||
/W6 { DefaultPenWidth PenScaling mul setlinewidth } bind def
|
||||
/W7 { DefaultPenWidth PenScaling mul setlinewidth } bind def
|
||||
%%EndResource
|
||||
+2
-2
@@ -48,8 +48,8 @@ clean:
|
||||
#
|
||||
|
||||
install:
|
||||
-$(MKDIR) $(DATADIR)/data
|
||||
$(CP) $(FILES) $(DATADIR)/data
|
||||
-$(MKDIR) $(DATADIR)
|
||||
$(CP) $(FILES) $(DATADIR)
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
|
||||
+1051
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+2
-2
@@ -42,7 +42,7 @@ include ../Makedefs
|
||||
#
|
||||
|
||||
DOCUMENTS = cmp.shtml idd.shtml sam.shtml sdd.shtml ssr.shtml \
|
||||
stp.shtml sum.shtml
|
||||
stp.shtml sum.shtml svd.shtml
|
||||
DOCIMAGES = images/cups-block-diagram.gif images/cups-large.gif \
|
||||
images/cups-medium.gif images/cups-small.gif
|
||||
WEBPAGES = cups.css cupsdoc.css index.html documentation.html
|
||||
@@ -86,7 +86,7 @@ install:
|
||||
|
||||
overview.pdf: overview.html
|
||||
echo Formatting $@...
|
||||
htmldoc --duplex --compression=9 --jpeg --webpage -f overview.pdf overview.html
|
||||
htmldoc --duplex --compression=9 --jpeg --webpage -f $@ $<
|
||||
|
||||
sam.html: sam.shtml
|
||||
echo Formatting $@...
|
||||
|
||||
+3
-3
@@ -152,10 +152,10 @@ sections:
|
||||
<UL>
|
||||
<LI>IEEE 1387.4, System Administration: Printing (draft) </LI>
|
||||
<LI>IPP/1.0: Additional Optional Operations - Set 1 </LI>
|
||||
<LI>IPP/1.0: Encoding and Transport </LI>
|
||||
<LI>IPP/1.0: Implementers Guide </LI>
|
||||
<LI>IPP/1.0: Model and Semantics </LI>
|
||||
<LI>RFC 1179, Line Printer Daemon Protocol </LI>
|
||||
<LI>RFC 2565, IPP/1.0: Encoding and Transport </LI>
|
||||
<LI>RFC 2566, IPP/1.0: Model and Semantics </LI>
|
||||
<LI>RFC 2639, IPP/1.0: Implementers Guide </LI>
|
||||
</UL>
|
||||
<H1><A NAME=3>3 File Management</A></H1>
|
||||
<H2><A NAME=3_1>3.1 Directory Structure</A></H2>
|
||||
|
||||
+121
-118
@@ -1,6 +1,6 @@
|
||||
%PDF-1.2
|
||||
%âãÏÓ
|
||||
1 0 obj<</Producer(htmldoc 2.0b1 Copyright 1997-1999 Michael Sweet, All Rights Reserved.)/CreationDate(D:19990922200456Z)/Title(CUPS Configuration Management Plan)/Author(Easy Software Products)>>endobj
|
||||
1 0 obj<</Producer(htmldoc 2.0b1 Copyright 1997-1999 Michael Sweet, All Rights Reserved.)/CreationDate(D:19990521210307Z)/Title(CUPS Configuration Management Plan)/Author(Easy Software Products)>>endobj
|
||||
2 0 obj<</Type/Encoding/BaseEncoding/WinAnsiEncoding>>endobj
|
||||
3 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier/Encoding 2 0 R>>endobj
|
||||
4 0 obj<</Type/Font/Subtype/Type1/BaseFont/Times-Roman/Encoding 2 0 R>>endobj
|
||||
@@ -400,10 +400,13 @@ endobj
|
||||
endobj
|
||||
204 0 obj<</Type/Page/Parent 191 0 R/Contents 205 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 4 0 R/F8 7 0 R/F9 8 0 R/Fc 9 0 R>>>>>>endobj
|
||||
205 0 obj<</Length 206 0 R/Filter/FlateDecode>>stream
|
||||
xÚ•ÁŽÚ0†ï<ÅY‰dI!áF��Š6%aO\ÜØW‰Mm£-o_*ºÊ!�Ì|ÿxæøÑñ ¯/F>!äUçSÖy~‰Á‹!+ô›p4€w}X‘‚Âr"Ÿ²ï6dèF6ÈF®
s=˜®“f<?T„)¤(g6a | ||||