Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi,

The printer handling code in
libs-gui/vcl/unx/generic/printer/printerinfomanager.cxx gets the list of
print queues with a combination of hardcoded platform names and shell
commands :

  #if defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD)
  { "/usr/sbin/lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler },
  { "lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler },
  { "LANG=C;LC_ALL=C;export LANG LC_ALL;lpstat -s", "lp -d \"(PRINTER)\"", "system for ", ": ", 1, 
standardSysQueueTokenHandler }
  #else
  { "LANG=C;LC_ALL=C;export LANG LC_ALL;lpget list", "lp -d \"(PRINTER)\"", "", ":", 0, 
lpgetSysQueueTokenHandler },
  { "LANG=C;LC_ALL=C;export LANG LC_ALL;lpstat -s", "lp -d \"(PRINTER)\"", "system for ", ": ", 1, 
standardSysQueueTokenHandler },
  { "/usr/sbin/lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler },
  { "lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler }
  #endif

There are also some other things like this I don't like in this file:

  /*  TODO:
   *  porters: please append your platform to the Solaris
   *  case if your platform has SystemV printing per default.
   */

Trying to manage printers in one way or another depending on the operating
system name feels incredibly wrong for application code.

Shouldn't CUPS be the default printing system anywhere by now on Unix-like
systems ? Is there a reason to keep this sort of code as-is ?

-- 
Francois Tigeot

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.