[evince] Fix undefined variable warnings in dvi-backend
- From: Jan-Joost Spanjers <jspanjers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] Fix undefined variable warnings in dvi-backend
- Date: Sun, 25 Dec 2011 21:40:07 +0000 (UTC)
commit c8ce06bbed325b002066ae4745abd01fcbb85716
Author: Hib Eris <hib hiberis nl>
Date: Mon Dec 19 14:32:38 2011 +0100
Fix undefined variable warnings in dvi-backend
backend/dvi/dvi-document.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/backend/dvi/dvi-document.c b/backend/dvi/dvi-document.c
index 8155283..345155a 100644
--- a/backend/dvi/dvi-document.c
+++ b/backend/dvi/dvi-document.c
@@ -356,17 +356,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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]