summaryrefslogtreecommitdiff
path: root/backend/dvi/dvi-document.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-06-23 02:03:06 +0200
committerraveit65 <[email protected]>2016-06-24 20:48:20 +0200
commit3018425dc1ec8955ec790f84a5cc8793190d0179 (patch)
tree9a21fa21404d3c42d7e51feb7db5583c539d6862 /backend/dvi/dvi-document.c
parentf320383369c4105e8076a0a5248a728fac76a0c0 (diff)
downloadatril-3018425dc1ec8955ec790f84a5cc8793190d0179.tar.bz2
atril-3018425dc1ec8955ec790f84a5cc8793190d0179.tar.xz
Fix undefined variable warnings in dvi-backend
taken from: https://git.gnome.org/browse/evince/commit/?id=c8ce06b
Diffstat (limited to 'backend/dvi/dvi-document.c')
-rw-r--r--backend/dvi/dvi-document.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/backend/dvi/dvi-document.c b/backend/dvi/dvi-document.c
index 6ffa2514..c1e7d411 100644
--- a/backend/dvi/dvi-document.c
+++ b/backend/dvi/dvi-document.c
@@ -422,17 +422,17 @@ dvi_document_file_exporter_iface_init (EvFileExporterInterface *iface)
static gboolean
hsb2rgb (float h, float s, float v, guchar *red, guchar *green, guchar *blue)
{
- float i, f, p, q, t, r, g, b;
-
- if (h == 360)
- h = 0;
- else if ((h > 360) || (h < 0))
- return FALSE;
+ float f, p, q, t, r, g, b;
+ int i;
s /= 100;
v /= 100;
h /= 60;
i = floor (h);
+ if (i == 6)
+ i = 0;
+ else if ((i > 6) || (i < 0))
+ return FALSE;
f = h - i;
p = v * (1 - s);
q = v * (1 - (s * f));