[gtk+] printing: Fix build with CUPS older than 1.6
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] printing: Fix build with CUPS older than 1.6
- Date: Thu, 27 Nov 2014 16:08:07 +0000 (UTC)
commit 059fc5d3d909a4a8590de903cd5e86f6c2d9d481
Author: Marek Kasik <mkasik redhat com>
Date: Thu Nov 27 17:04:47 2014 +0100
printing: Fix build with CUPS older than 1.6
Define missing functions ippFirstAttribute(), ippNextAttribute()
and macro ippGetCollection(). These were added in CUPS 1.6.
https://bugzilla.gnome.org/show_bug.cgi?id=740358
modules/printbackends/cups/gtkprintbackendcups.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c
b/modules/printbackends/cups/gtkprintbackendcups.c
index c90c5ef..15546f7 100644
--- a/modules/printbackends/cups/gtkprintbackendcups.c
+++ b/modules/printbackends/cups/gtkprintbackendcups.c
@@ -297,6 +297,7 @@ pb_module_create (void)
#define ippGetName(attr) attr->name
#define ippGetCount(attr) attr->num_values
#define ippGetGroupTag(attr) attr->group_tag
+#define ippGetCollection(attr, index) attr->values[index].collection
static int
ippGetRange (ipp_attribute_t *attr,
@@ -306,6 +307,24 @@ ippGetRange (ipp_attribute_t *attr,
*upper = attr->values[element].range.upper;
return (attr->values[element].range.lower);
}
+
+static ipp_attribute_t *
+ippFirstAttribute (ipp_t *ipp)
+{
+ if (!ipp)
+ return (NULL);
+
+ return (ipp->current = ipp->attrs);
+}
+
+static ipp_attribute_t *
+ippNextAttribute (ipp_t *ipp)
+{
+ if (!ipp || !ipp->current)
+ return (NULL);
+
+ return (ipp->current = ipp->current->next);
+}
#endif
/*
* GtkPrintBackendCups
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]