Index: man/lpstat.man =================================================================== --- man/lpstat.man (revision 7919) +++ man/lpstat.man (working copy) @@ -3,7 +3,7 @@ .\" .\" lpstat man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -12,12 +12,12 @@ .\" 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 lpstat 1 "Common UNIX Printing System" "23 March 2006" "Apple Inc." +.TH lpstat 1 "Common UNIX Printing System" "10 September 2008" "Apple Inc." .SH NAME lpstat \- print cups status information .SH SYNOPSIS .B lpstat -[ -E ] [ -U +[ -E ] [ -H ] [ -U .I username ] [ -h .I hostname[:port] @@ -47,6 +47,10 @@ .br Forces encryption when connecting to the server. .TP 5 +-H +.br +Shows the server hostname and port. +.TP 5 -R .br Shows the ranking of print jobs. @@ -133,7 +137,7 @@ .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id$". .\" Index: systemv/lpstat.c =================================================================== --- systemv/lpstat.c (revision 7919) +++ systemv/lpstat.c (working copy) @@ -3,7 +3,7 @@ * * "lpstat" command for the Common UNIX Printing System (CUPS). * - * Copyright 2007 by Apple Inc. + * Copyright 2007-2008 by Apple Inc. * Copyright 1997-2006 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -112,6 +112,13 @@ #endif /* HAVE_SSL */ break; + case 'H' : /* Show server and port */ + if (cupsServer()[0] == '/') + _cupsLangPrintf(stdout, "%s\n", cupsServer()); + else + _cupsLangPrintf(stdout, "%s:%d\n", cupsServer(), ippPort()); + break; + case 'P' : /* Show paper types */ op = 'P'; break;