From 969af9354e118a6b5143fc66521774d4be8c56fd Mon Sep 17 00:00:00 2001 From: msweet Date: Fri, 28 Mar 2014 15:55:05 +0000 Subject: [PATCH] Add cups(1) man page with CUPS overview information and relevant links. Fix link embedding for man pages. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11773 a1ca3aef-8c08-0410-bb20-df032aa958be --- CHANGES-1.7.txt | 2 + doc/Makefile | 19 ++--- doc/help/man-cups.html | 119 +++++++++++++++++++++++++++++++ doc/help/man-cupsaddsmb.html | 2 +- doc/help/man-cupsfilter.html | 4 +- doc/help/man-filter.html | 2 +- doc/help/man-ippfind.html | 4 +- man/Makefile | 1 + man/cups.man | 132 +++++++++++++++++++++++++++++++++++ man/filter.man | 2 +- man/mantohtml.c | 10 ++- 11 files changed, 280 insertions(+), 17 deletions(-) create mode 100644 doc/help/man-cups.html create mode 100644 man/cups.man diff --git a/CHANGES-1.7.txt b/CHANGES-1.7.txt index 14d69d665..49544805a 100644 --- a/CHANGES-1.7.txt +++ b/CHANGES-1.7.txt @@ -8,6 +8,8 @@ CHANGES IN CUPS V1.7.2 - Documentation fixes (STR #3259, STR #4346, STR #4355) - Fixed the Japanese localization (STR #4385) - Added a German localization (STR #4363) + - The cupsfilter command incorrectly read the cupsd.conf file; it now + reads the cups-files.conf file instead. - Fixed OS X builds with Xcode 5.x () - Fixed SSL support on Windows (STR #4358) - Fixed documentation and naming of Create-Job/Printer-Subscriptions diff --git a/doc/Makefile b/doc/Makefile index c59d12e96..8e64da64a 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,16 +1,16 @@ # # "$Id$" # -# Documentation makefile for CUPS. +# Documentation makefile for CUPS. # -# Copyright 2007-2012 by Apple Inc. -# Copyright 1997-2007 by Easy Software Products. +# Copyright 2007-2014 by Apple Inc. +# Copyright 1997-2007 by Easy Software Products. # -# These coded instructions, statements, and computer programs are the -# property of Apple Inc. and are protected by Federal copyright -# law. Distribution and use rights are outlined in the file "LICENSE.txt" -# which should have been included with this file. If this file is -# file is missing or damaged, see the license at "http://www.cups.org/". +# These coded instructions, statements, and computer programs are the +# property of Apple Inc. and are protected by Federal copyright +# law. Distribution and use rights are outlined in the file "LICENSE.txt" +# which should have been included with this file. If this file is +# file is missing or damaged, see the license at "http://www.cups.org/". # include ../Makedefs @@ -62,12 +62,13 @@ HELPFILES = \ help/glossary.html \ help/kerberos.html \ help/license.html \ - help/man-cupsaccept.html \ help/man-backend.html \ help/man-cancel.html \ + help/man-cups.html \ help/man-cups-config.html \ help/man-cups-lpd.html \ help/man-cups-snmp.html \ + help/man-cupsaccept.html \ help/man-cupsaddsmb.html \ help/man-cupsd.html \ help/man-cupsenable.html \ diff --git a/doc/help/man-cups.html b/doc/help/man-cups.html new file mode 100644 index 000000000..2a692f180 --- /dev/null +++ b/doc/help/man-cups.html @@ -0,0 +1,119 @@ + + + + + + cups(1) + + +

cups(1)

+

Name

+cups - a standards-based, open source printing system +

Description

+CUPS +is the software you use to print from applications like word processors, email readers, photo editors, and web browsers. It converts the page descriptions produced by your application (put a paragraph here, draw a line there, and so forth) into something your printer can understand and then sends the information to the printer for printing. +

Now, since every printer manufacturer does things differently, printing can be very complicated. +CUPS +does its best to hide this from you and your application so that you can concentrate on printing and less on how to print. Generally, the only time you need to know anything about your printer is when you use it for the first time, and even then +CUPS +can often figure things out on its own. +

How Does It Work?

+The first time you print to a printer, +CUPS +creates a queue to keep track of the current status of the printer (everything OK, out of paper, etc.) and any pages you have printed. Most of the time the queue points to a printer connected directly to your computer via a USB port, however it can also point to a printer on your network, a printer on the Internet, or multiple printers depending on the configuration. Regardless of where the queue points, it will look like any other printer to you and your applications. +

Every time you print something, +CUPS +creates a job which contains the queue you are sending the print to, the name of the document you are printing, and the page descriptions. Job are numbered (queue-1, queue-2, and so forth) so you can monitor the job as it is printed or cancel it if you see a mistake. When +CUPS +gets a job for printing, it determines the best programs (filters, printer drivers, port monitors, and backends) to convert the pages into a printable format and then runs them to actually print the job. +

When the print job is completely printed, +CUPS +removes the job from the queue and moves on to any other jobs you have submitted. You can also be notified when the job is finished, or if there are any errors during printing, in several different ways. +

Where Do I Begin?

+The easiest way to start is by using the +CUPS +web interface to configure your printer. Go to "http://localhost:631" and choose the Administration tab at the top of the page. Click/press on the Add Printer button and follow the prompts. +

When you are asked for a username and password, enter your login username and password or the "root" username and password. +

After the printer is added, +CUPS +will ask you to set the default printer options (paper size, output mode, etc.) for the printer. Make any changes as needed and then click on the Set Default Options button to save them. Some printers also support auto-configuration - click on the Query Printer for Default Options button to update the options automatically. +

Once you have added the printer, you can print to it from any application. You can also choose Print Test Page from the maintenance menu to print a simple test page and verify that everything is working properly. +

You can also use the +lpadmin(8) +and +lpinfo(8) +commands to add printers to +CUPS. +Additionally, your operating system may include graphical user interfaces or automatically create printer queues when you connect a printer to your computer. +

Environment

+CUPS +commands use the following environment variables to override the default locations of files and so forth. For security reasons, these environment variables are ignored for setuid programs: +

CUPS_SERVER +
+The hostname/IP address and port number of the CUPS scheduler (hostname:port or ipaddress:port). +

CUPS_ANYROOT +
+Whether to allow any X.509 certificate root (Y or N). +

CUPS_CACHEDIR +
+The directory where semi-persistent cache files can be found. +

CUPS_DATADIR +
+The directory where data files can be found. +

CUPS_ENCRYPTION +
+The default level of encryption (Always, IfRequested, Never, Required). +

CUPS_EXPIREDROOT +
+Whether to allow expired X.509 certificate roots (Y or N). +

CUPS_EXPIREDCERTS +
+Whether to allow expired X.509 certificates (Y or N). +

CUPS_GSSSERVICENAME +
+The Kerberos service name used for authentication. +

CUPS_SERVERBIN +
+The directory where server helper programs, filters, backend, etc. can be found. +

CUPS_SERVERROOT +
+The root directory of the server. +

CUPS_STATEDIR +
+The directory where state files can be found. +

CUPS_USER +
+Specifies the name of the user for print requests. +

HOME +
+Specifies the home directory of the current user. +

IPP_PORT +
+Specifies the default port number for IPP requests. +

LOCALEDIR +
+Specifies the location of localization files. +

LPDEST +
+Specifies the default print queue (System V standard). +

PRINTER +
+Specifies the default print queue (Berkeley standard). +

TMPDIR +
+Specifies the location of temporary files. +

Files

+~/.cups/client.conf, ~/.cups/lpoptions +

Conforming To

+CUPS +conforms to the Internet Printing Protocol version 2.1 and implements the Berkeley and System V UNIX print commands. +

See Also

+cancel(1), client.conf(7), cupsctl(8), cupsd(8), lp(1), lpadmin(8), lpinfo(8), lpoptions(1), lpr(1), lprm(1), lpq(1), lpstat(1), +http://localhost:631/help, +http://www.CUPS.org, +http://www.pwg.org/ipp +

Copyright

+Copyright © 2007-2014 by Apple Inc. + + + diff --git a/doc/help/man-cupsaddsmb.html b/doc/help/man-cupsaddsmb.html index 6586b6be5..abe6439e0 100644 --- a/doc/help/man-cupsaddsmb.html +++ b/doc/help/man-cupsaddsmb.html @@ -130,7 +130,7 @@ you use the lowercase filenames shown above, otherwise

Adobe Postscript Drivers For Windows 95, 98, And Me

cupsaddsmb can use the Adobe PostScript printer driver for Windows 95, 98, and ME, which are available for download from the -Adobe web site (http://www.adobe.com). +Adobe web site (http://www.adobe.com).

The Adobe driver does not support the page-label, job-billing, or job-hold-until options.

Once you have installed the driver on a Windows system, copy the diff --git a/doc/help/man-cupsfilter.html b/doc/help/man-cupsfilter.html index 84d816923..62daa981d 100644 --- a/doc/help/man-cupsfilter.html +++ b/doc/help/man-cupsfilter.html @@ -86,7 +86,7 @@ Delete the PPD file after conversion. returns a non-zero exit status on any error.

Environment

All of the standard -cups(1) +cups(1) environment variables affect the operation of cupsfilter.

Files

@@ -101,7 +101,7 @@ The following command will generate a PDF preview of job 42 for a printer named cupsfilter -m application/pdf -d myprinter -j 42 >preview.pdf

See Also

-cups(1), cupsd.conf(5), filter(7), mime.convs(7), mime.types(7), +cups(1), cupsd.conf(5), filter(7), mime.convs(7), mime.types(7), http://localhost:631/help

Copyright

Copyright © 2007-2014 by Apple Inc. diff --git a/doc/help/man-filter.html b/doc/help/man-filter.html index 5e2166b67..4827d5ecb 100644 --- a/doc/help/man-filter.html +++ b/doc/help/man-filter.html @@ -149,7 +149,7 @@ application/postscript).

CUPS_CACHEDIR

-The directory for semi-persistent cache files can be found. +The directory where semi-persistent cache files can be found.

CUPS_DATADIR

diff --git a/doc/help/man-ippfind.html b/doc/help/man-ippfind.html index ee1adbfa9..ebe9518c8 100644 --- a/doc/help/man-ippfind.html +++ b/doc/help/man-ippfind.html @@ -196,7 +196,7 @@ DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc. URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.

{service_uri}
-URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc. etc. +URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.

{txt_key}
Value of TXT record key (lowercase). @@ -223,7 +223,7 @@ DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc. URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.

IPPFIND_SERVICE_URI
-URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc. etc. +URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.

IPPFIND_TXT_KEY
Values of TXT record KEY (uppercase). diff --git a/man/Makefile b/man/Makefile index 38e309f87..c239951d2 100644 --- a/man/Makefile +++ b/man/Makefile @@ -21,6 +21,7 @@ include ../Makedefs # MAN1 = cancel.$(MAN1EXT) \ + cups.$(MAN1EXT) \ cups-config.$(MAN1EXT) \ cupstestdsc.$(MAN1EXT) \ cupstestppd.$(MAN1EXT) \ diff --git a/man/cups.man b/man/cups.man new file mode 100644 index 000000000..8eeaa8973 --- /dev/null +++ b/man/cups.man @@ -0,0 +1,132 @@ +.\" +.\" "$Id$" +.\" +.\" cups (intro) man page for CUPS. +.\" +.\" Copyright 2007-2014 by Apple Inc. +.\" Copyright 1997-2006 by Easy Software Products. +.\" +.\" These coded instructions, statements, and computer programs are the +.\" property of Apple Inc. and are protected by Federal copyright +.\" law. Distribution and use rights are outlined in the file "LICENSE.txt" +.\" which should have been included with this file. If this file is +.\" file is missing or damaged, see the license at "http://www.cups.org/". +.\" +.TH cups 1 "CUPS" "4 March 2014" "Apple Inc." +.SH NAME +cups \- a standards-based, open source printing system +.SH DESCRIPTION +.B CUPS +is the software you use to print from applications like word processors, email readers, photo editors, and web browsers. It converts the page descriptions produced by your application (put a paragraph here, draw a line there, and so forth) into something your printer can understand and then sends the information to the printer for printing. +.LP +Now, since every printer manufacturer does things differently, printing can be very complicated. +.B CUPS +does its best to hide this from you and your application so that you can concentrate on printing and less on how to print. Generally, the only time you need to know anything about your printer is when you use it for the first time, and even then +.B CUPS +can often figure things out on its own. +.SH HOW DOES IT WORK? +The first time you print to a printer, +.B CUPS +creates a queue to keep track of the current status of the printer (everything OK, out of paper, etc.) and any pages you have printed. Most of the time the queue points to a printer connected directly to your computer via a USB port, however it can also point to a printer on your network, a printer on the Internet, or multiple printers depending on the configuration. Regardless of where the queue points, it will look like any other printer to you and your applications. +.LP +Every time you print something, +.B CUPS +creates a job which contains the queue you are sending the print to, the name of the document you are printing, and the page descriptions. Job are numbered (queue-1, queue-2, and so forth) so you can monitor the job as it is printed or cancel it if you see a mistake. When +.B CUPS +gets a job for printing, it determines the best programs (filters, printer drivers, port monitors, and backends) to convert the pages into a printable format and then runs them to actually print the job. +.LP +When the print job is completely printed, +.B CUPS +removes the job from the queue and moves on to any other jobs you have submitted. You can also be notified when the job is finished, or if there are any errors during printing, in several different ways. +.SH WHERE DO I BEGIN? +The easiest way to start is by using the +.B CUPS +web interface to configure your printer. Go to "http://localhost:631" and choose the Administration tab at the top of the page. Click/press on the Add Printer button and follow the prompts. +.LP +When you are asked for a username and password, enter your login username and password or the "root" username and password. +.LP +After the printer is added, +.B CUPS +will ask you to set the default printer options (paper size, output mode, etc.) for the printer. Make any changes as needed and then click on the Set Default Options button to save them. Some printers also support auto-configuration - click on the Query Printer for Default Options button to update the options automatically. +.LP +Once you have added the printer, you can print to it from any application. You can also choose Print Test Page from the maintenance menu to print a simple test page and verify that everything is working properly. +.LP +You can also use the +.BR lpadmin (8) +and +.BR lpinfo (8) +commands to add printers to +.BR CUPS . +Additionally, your operating system may include graphical user interfaces or automatically create printer queues when you connect a printer to your computer. +.SH ENVIRONMENT +.B CUPS +commands use the following environment variables to override the default locations of files and so forth. For security reasons, these environment variables are ignored for setuid programs: +.TP 5 +CUPS_SERVER +The hostname/IP address and port number of the CUPS scheduler (hostname:port or ipaddress:port). +.TP 5 +CUPS_ANYROOT +Whether to allow any X.509 certificate root (Y or N). +.TP 5 +CUPS_CACHEDIR +The directory where semi-persistent cache files can be found. +.TP 5 +CUPS_DATADIR +The directory where data files can be found. +.TP 5 +CUPS_ENCRYPTION +The default level of encryption (Always, IfRequested, Never, Required). +.TP 5 +CUPS_EXPIREDROOT +Whether to allow expired X.509 certificate roots (Y or N). +.TP 5 +CUPS_EXPIREDCERTS +Whether to allow expired X.509 certificates (Y or N). +.TP 5 +CUPS_GSSSERVICENAME +The Kerberos service name used for authentication. +.TP 5 +CUPS_SERVERBIN +The directory where server helper programs, filters, backend, etc. can be found. +.TP 5 +CUPS_SERVERROOT +The root directory of the server. +.TP 5 +CUPS_STATEDIR +The directory where state files can be found. +.TP 5 +CUPS_USER +Specifies the name of the user for print requests. +.TP 5 +HOME +Specifies the home directory of the current user. +.TP 5 +IPP_PORT +Specifies the default port number for IPP requests. +.TP 5 +LOCALEDIR +Specifies the location of localization files. +.TP 5 +LPDEST +Specifies the default print queue (System V standard). +.TP 5 +PRINTER +Specifies the default print queue (Berkeley standard). +.TP 5 +TMPDIR +Specifies the location of temporary files. +.SH FILES +~/.cups/client.conf, ~/.cups/lpoptions +.SH CONFORMING TO +.B CUPS +conforms to the Internet Printing Protocol version 2.1 and implements the Berkeley and System V UNIX print commands. +.SH SEE ALSO +.BR cancel (1), client.conf (7), cupsctl (8), cupsd (8), lp (1), lpadmin (8), lpinfo (8), lpoptions (1), lpr (1), lprm (1), lpq (1), lpstat (1), +http://localhost:631/help, +http://www.CUPS.org, +http://www.pwg.org/ipp +.SH COPYRIGHT +Copyright \[co] 2007-2014 by Apple Inc. +.\" +.\" End of "$Id$". +.\" diff --git a/man/filter.man b/man/filter.man index ff3ddcdd3..738fde8ca 100644 --- a/man/filter.man +++ b/man/filter.man @@ -158,7 +158,7 @@ application/postscript). .TP 5 CUPS_CACHEDIR .br -The directory for semi-persistent cache files can be found. +The directory where semi-persistent cache files can be found. .TP 5 CUPS_DATADIR .br diff --git a/man/mantohtml.c b/man/mantohtml.c index d498903b1..61cc65474 100644 --- a/man/mantohtml.c +++ b/man/mantohtml.c @@ -912,12 +912,20 @@ html_fputs(const char *s, /* I - String */ * Embed URL... */ + char temp[1024]; /* Temporary string */ const char *end = s + 6; /* End of URL */ while (*end && !isspace(*end & 255)) end ++; - fprintf(fp, "%*s", (int)(end - s), s, (int)(end - s), s); + if (end[-1] == ',' || end[-1] == '.') + end --; + + strlcpy(temp, s, sizeof(temp)); + if ((size_t)(end -s) < sizeof(temp)) + temp[end - s] = '\0'; + + fprintf(fp, "%s", temp, temp); s = end; } else -- 2.39.2