~ubuntu-branches/ubuntu/oneiric/cups/oneiric-proposed

« back to all changes in this revision

Viewing changes to backend/snmp-supplies.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt, Till Kamppeter, Martin Pitt
  • Date: 2011-08-07 12:53:12 UTC
  • mfrom: (1.2.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20110807125312-s323cyb3oqaxaemo
Tags: 1.5.0-1
[ Till Kamppeter ]
* New upstream release
* debian/patches/usb-backend-no-segfault-on-bad-device-id.patch,
  debian/patches/usb-backend-accept-old-usblp-uris.patch,
  debian/patches/use-ps2write-ghostscript-device-for-pdftops-filter.patch:
  Removed, included upstream.
* debian/patches/poppler-based-pdftops-fixes.patch,
  debian/patches/do-not-emit-ps-level-3-with-poppler.patch: Replaced patch
  by a new one only containing the parts which remain after removing the
  parts included upstream.
* debian/patches/pidfile.patch,
  debian/patches/ppd-poll-with-client-conf.patch,
  debian/patches/cups-avahi.patch,
  debian/patches/drop_unnecessary_dependencies.patch,
  debian/patches/do-not-broadcast-with-hostnames.patch,
  debian/patches/ppdc-dynamic-linking.patch,
  debian/patches/pstops-based-workflow-only-for-printing-ps-on-a-ps-printer.patch:
  Manually regenerated to adapt to upstream changes.
* debian/patches/manpage-translations.patch,
  debian/patches/rootbackends-worldreadable.patch,
  debian/patches/no-conffile-timestamp.patch,
  debian/patches/read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.patch,
  debian/patches/cups-snmp-oids-device-id-hp-ricoh.patch,
  debian/patches/configure-default-browse-protocols.patch,
  debian/patches/logfiles_adm_readable.patch,
  debian/patches/confdirperms.patch,
  debian/patches/printer-filtering.patch,
  debian/patches/show-compile-command-lines.patch,
  debian/patches/log-debug-history-nearly-unlimited.patch:
  Refreshed using quilt.
* debian/patches/default-ripcache-size-auto.patch: Dropped, as once,
  Ghostscript 9.04 is ignoring the cache size value as it crashes easily
  otherwise (Ghostscript upstream bug #691586) and second, CUPS defaults to
  more reasonable 128 MB (now only used for imagetops).
* debian/patches/support-gzipped-charmaps.patch: Dropped, as the SBCS and
  VBCS character maps are not used any more by CUPS.
* debian/rules: Enable threads in the ./configure command line, as otherwise
  CUPS 1.5.0 does not build at all.
* debian/local/filters/pdf-filters/filter/pdftoijs.cxx,
  debian/local/filters/pdf-filters/filter/pdftoraster.cxx,
  debian/local/filters/pdf-filters/pdftoopvp/pdftoopvp.cxx,
  debian/local/filters/pdf-filters/pdftopdf/pdftopdf.cxx: Under CUPS 1.5.x.
  all programs using the PPD API of CUPS need to explicitly include
  "<cups/ppd.h>". Updated the PDF filter add-on package.
* debian/local/filters/pdf-filters/addtocups: Make the addition of the
  pdftopdf and pdftoopvp directories also work with CUPS 1.5.x.
* debian/local/filters/pdf-filters/addtocups,
  debian/local/filters/pdf-filters/removefromcups: Added a symbolic link
  cups/i18n.h, so that texttopdf builds.
* debian/cups-client.install: Install the new ipptool and its sample
  files and manpages.
* debian/cups-client.install: Commented out lines for dropped man page
  translations: ipptool, lppasswd, client.conf, ipptoolfile, cupsenable,
  lpadmin, lpinfo, cupsreject, cupsdisable, cupsaccept
* debian/cups-common.install, debian/rules: The /usr/share/cups/charmaps
  directory got removed from CUPS.
* debian/libcups2-dev.install: cups/i18n.h got renamed to
  cups/language-private.h. Install this as /usr/include/cups/i18n.h.
* debian/libcups2.symbols, debian/libcupsmime1.symbols: Updated.
* debian/cups.lintian-overrides, debian/cups.postinst, debian/cups.prerm,
  debian/cups.templates, debian/local/apparmor-profile: The "scsi"
  CUPS backend got dropped upstream, removed its treatment from these files.

[ Martin Pitt ]
* Add Serbian (Cyrillic) debconf translations, thanks Zlatan Todoric.
  (Closes: #635105)
* Add Serbian (Latin) debconf translations, thanks Zlatan Todoric.
  (Closes: #635108)
* debian/local/apparmor-profile: Allow access to serial printers on USB
  adapters. (LP: #677432)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * "$Id: snmp-supplies.c 9853 2011-07-06 20:27:31Z mike $"
 
2
 * "$Id: snmp-supplies.c 9793 2011-05-20 03:49:49Z mike $"
3
3
 *
4
4
 *   SNMP supplies functions for CUPS.
5
5
 *
40
40
#define CUPS_DEVELOPER_EMPTY            2
41
41
#define CUPS_MARKER_SUPPLY_LOW          4
42
42
#define CUPS_MARKER_SUPPLY_EMPTY        8
43
 
#define CUPS_MARKER_WASTE_ALMOST_FULL   16
44
 
#define CUPS_MARKER_WASTE_FULL          32
45
 
#define CUPS_OPC_NEAR_EOL               64
46
 
#define CUPS_OPC_LIFE_OVER              128
47
 
#define CUPS_TONER_LOW                  256
48
 
#define CUPS_TONER_EMPTY                512
 
43
#define CUPS_OPC_NEAR_EOL               16
 
44
#define CUPS_OPC_LIFE_OVER              32
 
45
#define CUPS_TONER_LOW                  64
 
46
#define CUPS_TONER_EMPTY                128
49
47
 
50
48
 
51
49
/*
172
170
                          { CUPS_DEVELOPER_EMPTY, "developer-empty-warning" },
173
171
                          { CUPS_MARKER_SUPPLY_LOW, "marker-supply-low-report" },
174
172
                          { CUPS_MARKER_SUPPLY_EMPTY, "marker-supply-empty-warning" },
175
 
                          { CUPS_MARKER_WASTE_ALMOST_FULL, "marker-waste-almost-full-report" },
176
 
                          { CUPS_MARKER_WASTE_FULL, "marker-waste-full-warning" },
177
173
                          { CUPS_OPC_NEAR_EOL, "opc-near-eol-report" },
178
174
                          { CUPS_OPC_LIFE_OVER, "opc-life-over-warning" },
179
175
                          { CUPS_TONER_LOW, "toner-low-report" },
251
247
              break;
252
248
          case CUPS_TC_wasteToner :
253
249
          case CUPS_TC_wasteInk :
254
 
              if (percent <= 1)
255
 
                new_supply_state |= CUPS_MARKER_WASTE_FULL;
256
 
              else
257
 
                new_supply_state |= CUPS_MARKER_WASTE_ALMOST_FULL;
258
250
              break;
259
251
          case CUPS_TC_ink :
260
252
          case CUPS_TC_inkCartridge :
479
471
 
480
472
  if ((ppd = ppdOpenFile(getenv("PPD"))) == NULL ||
481
473
      ((ppdattr = ppdFindAttr(ppd, "cupsSNMPSupplies", NULL)) != NULL &&
482
 
       ppdattr->value && strcasecmp(ppdattr->value, "true")))
 
474
       ppdattr->value && _cups_strcasecmp(ppdattr->value, "true")))
483
475
  {
484
476
    ppdClose(ppd);
485
477
    return;
989
981
 
990
982
 
991
983
/*
992
 
 * End of "$Id: snmp-supplies.c 9853 2011-07-06 20:27:31Z mike $".
 
984
 * End of "$Id: snmp-supplies.c 9793 2011-05-20 03:49:49Z mike $".
993
985
 */