summaryrefslogtreecommitdiff
path: root/libre/epdfview-libre/epdfview-0.1.8-modern-cups.patch
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2014-09-04 02:29:56 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2014-09-04 02:29:56 -0300
commitdcb9f94b1f184a61c9838b20919eef1842a07091 (patch)
tree96f4746cd14de68b4ed56a8536ab444df2a6b01b /libre/epdfview-libre/epdfview-0.1.8-modern-cups.patch
parentfc353061e3e6b3e8542d2000b89ca2ecfc604b1b (diff)
downloadabslibre-dcb9f94b1f184a61c9838b20919eef1842a07091.tar.gz
abslibre-dcb9f94b1f184a61c9838b20919eef1842a07091.tar.bz2
abslibre-dcb9f94b1f184a61c9838b20919eef1842a07091.zip
rename to epdfview
Diffstat (limited to 'libre/epdfview-libre/epdfview-0.1.8-modern-cups.patch')
-rw-r--r--libre/epdfview-libre/epdfview-0.1.8-modern-cups.patch74
1 files changed, 0 insertions, 74 deletions
diff --git a/libre/epdfview-libre/epdfview-0.1.8-modern-cups.patch b/libre/epdfview-libre/epdfview-0.1.8-modern-cups.patch
deleted file mode 100644
index 64988789f..000000000
--- a/libre/epdfview-libre/epdfview-0.1.8-modern-cups.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-diff -Naur epdfview-0.1.8.orig/src/PrintPter.cxx epdfview-0.1.8/src/PrintPter.cxx
---- epdfview-0.1.8.orig/src/PrintPter.cxx 2011-05-28 11:25:01.000000000 +0100
-+++ epdfview-0.1.8/src/PrintPter.cxx 2012-08-22 20:11:46.362436859 +0100
-@@ -22,6 +22,40 @@
- #include <locale.h>
- #include "epdfview.h"
-
-+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
-+#define HAVE_CUPS_1_6 1
-+#endif
-+
-+#ifndef HAVE_CUPS_1_6
-+inline int ippGetInteger (ipp_attribute_t *attr, int element)
-+{
-+ return (attr->values[element].integer);
-+}
-+
-+inline const char * ippGetString (ipp_attribute_t *attr,
-+ int element,
-+ const char **language /*UNUSED*/)
-+{
-+ return (attr->values[element].string.text);
-+}
-+
-+inline int ippSetOperation (ipp_t *ipp, ipp_op_t op)
-+{
-+ if (!ipp)
-+ return (0);
-+ ipp->request.op.operation_id = op;
-+ return (1);
-+}
-+
-+inline int ippSetRequestId (ipp_t *ipp, int request_id)
-+{
-+ if (!ipp)
-+ return (0);
-+ ipp->request.any.request_id = request_id;
-+ return (1);
-+}
-+#endif
-+
- using namespace ePDFView;
-
- // Structures
-@@ -380,8 +414,8 @@
-
- ipp_t *request = ippNew ();
-
-- request->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
-- request->request.op.request_id = 1;
-+ ippSetOperation(request, IPP_GET_PRINTER_ATTRIBUTES);
-+ ippSetRequestId(request, 1);
-
- ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
- "attributes-charset", NULL, "utf-8");
-@@ -403,7 +437,7 @@
- ippFindAttribute (answer, "printer-state", IPP_TAG_ZERO);
- if ( NULL != state )
- {
-- switch (state->values[0].integer)
-+ switch (ippGetInteger (state, 0))
- {
- case IPP_PRINTER_IDLE:
- attributes->state = g_strdup (_("Idle"));
-@@ -425,7 +459,7 @@
- ippFindAttribute (answer, "printer-location", IPP_TAG_ZERO);
- if ( NULL != location )
- {
-- attributes->location = g_strdup (location->values[0].string.text);
-+ attributes->location = g_strdup (ippGetString (location, 0, NULL));
- }
-
- ippDelete (answer);
-