aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2013-12-09 11:06:04 -0500
committerJon Lund Steffensen <jonlst@gmail.com>2013-12-09 12:28:45 -0500
commita4f7cf89ebd158d9e93bcdcb7a3709fd2a4a8e37 (patch)
tree6a68ea400a7905dfc39e4d4393e01d22f133a993
parentWhen in print mode do not start a gamma method (diff)
downloadredshift-ng-a4f7cf89ebd158d9e93bcdcb7a3709fd2a4a8e37.tar.gz
redshift-ng-a4f7cf89ebd158d9e93bcdcb7a3709fd2a4a8e37.tar.bz2
redshift-ng-a4f7cf89ebd158d9e93bcdcb7a3709fd2a4a8e37.tar.xz
Constify gamma parameter to set_temperature() methods
-rw-r--r--src/colorramp.c2
-rw-r--r--src/colorramp.h2
-rw-r--r--src/gamma-dummy.c2
-rw-r--r--src/gamma-dummy.h2
-rw-r--r--src/gamma-randr.c4
-rw-r--r--src/gamma-randr.h2
-rw-r--r--src/gamma-vidmode.c2
-rw-r--r--src/gamma-vidmode.h2
-rw-r--r--src/gamma-w32gdi.c2
-rw-r--r--src/gamma-w32gdi.h2
-rw-r--r--src/redshift.h2
11 files changed, 12 insertions, 12 deletions
diff --git a/src/colorramp.c b/src/colorramp.c
index 158f7cd..cd43e7b 100644
--- a/src/colorramp.c
+++ b/src/colorramp.c
@@ -282,7 +282,7 @@ interpolate_color(float a, const float *c1, const float *c2, float *c)
void
colorramp_fill(uint16_t *gamma_r, uint16_t *gamma_g, uint16_t *gamma_b,
- int size, int temp, float brightness, float gamma[3])
+ int size, int temp, float brightness, const float gamma[3])
{
/* Approximate white point */
float white_point[3];
diff --git a/src/colorramp.h b/src/colorramp.h
index 326969e..f391082 100644
--- a/src/colorramp.h
+++ b/src/colorramp.h
@@ -23,6 +23,6 @@
#include <stdint.h>
void colorramp_fill(uint16_t *gamma_r, uint16_t *gamma_g, uint16_t *gamma_b,
- int size, int temp, float brightness, float gamma[3]);
+ int size, int temp, float brightness, const float gamma[3]);
#endif /* ! _REDSHIFT_COLORRAMP_H */
diff --git a/src/gamma-dummy.c b/src/gamma-dummy.c
index ce7033f..dac9f41 100644
--- a/src/gamma-dummy.c
+++ b/src/gamma-dummy.c
@@ -69,7 +69,7 @@ gamma_dummy_set_option(void *state, const char *key, const char *value)
int
gamma_dummy_set_temperature(void *state, int temp, float brightness,
- float gamma[3])
+ const float gamma[3])
{
printf(_("Temperature: %i\n"), temp);
return 0;
diff --git a/src/gamma-dummy.h b/src/gamma-dummy.h
index ae4c904..a092408 100644
--- a/src/gamma-dummy.h
+++ b/src/gamma-dummy.h
@@ -32,7 +32,7 @@ int gamma_dummy_set_option(void *state, const char *key, const char *value);
void gamma_dummy_restore(void *state);
int gamma_dummy_set_temperature(void *state, int temp, float brightness,
- float gamma[3]);
+ const float gamma[3]);
#endif /* ! _REDSHIFT_GAMMA_DUMMY_H */
diff --git a/src/gamma-randr.c b/src/gamma-randr.c
index c6320f9..983e43b 100644
--- a/src/gamma-randr.c
+++ b/src/gamma-randr.c
@@ -301,7 +301,7 @@ randr_set_option(randr_state_t *state, const char *key, const char *value)
static int
randr_set_temperature_for_crtc(randr_state_t *state, int crtc_num, int temp,
- float brightness, float gamma[3])
+ float brightness, const float gamma[3])
{
xcb_generic_error_t *error;
@@ -356,7 +356,7 @@ randr_set_temperature_for_crtc(randr_state_t *state, int crtc_num, int temp,
int
randr_set_temperature(randr_state_t *state, int temp, float brightness,
- float gamma[3])
+ const float gamma[3])
{
int r;
diff --git a/src/gamma-randr.h b/src/gamma-randr.h
index 11818fa..d8bb86b 100644
--- a/src/gamma-randr.h
+++ b/src/gamma-randr.h
@@ -55,7 +55,7 @@ int randr_set_option(randr_state_t *state, const char *key, const char *value);
void randr_restore(randr_state_t *state);
int randr_set_temperature(randr_state_t *state, int temp, float brightness,
- float gamma[3]);
+ const float gamma[3]);
#endif /* ! _REDSHIFT_GAMMA_RANDR_H */
diff --git a/src/gamma-vidmode.c b/src/gamma-vidmode.c
index a083658..cde69eb 100644
--- a/src/gamma-vidmode.c
+++ b/src/gamma-vidmode.c
@@ -170,7 +170,7 @@ vidmode_restore(vidmode_state_t *state)
int
vidmode_set_temperature(vidmode_state_t *state, int temp, float brightness,
- float gamma[3])
+ const float gamma[3])
{
int r;
diff --git a/src/gamma-vidmode.h b/src/gamma-vidmode.h
index 735ba1f..9a2b7d9 100644
--- a/src/gamma-vidmode.h
+++ b/src/gamma-vidmode.h
@@ -43,7 +43,7 @@ int vidmode_set_option(vidmode_state_t *state, const char *key,
void vidmode_restore(vidmode_state_t *state);
int vidmode_set_temperature(vidmode_state_t *state, int temp, float brightness,
- float gamma[3]);
+ const float gamma[3]);
#endif /* ! _REDSHIFT_GAMMA_VIDMODE_H */
diff --git a/src/gamma-w32gdi.c b/src/gamma-w32gdi.c
index d23bf72..7193bc9 100644
--- a/src/gamma-w32gdi.c
+++ b/src/gamma-w32gdi.c
@@ -130,7 +130,7 @@ w32gdi_restore(w32gdi_state_t *state)
int
w32gdi_set_temperature(w32gdi_state_t *state, int temp, float brightness,
- float gamma[3])
+ const float gamma[3])
{
BOOL r;
diff --git a/src/gamma-w32gdi.h b/src/gamma-w32gdi.h
index 57a604f..5178991 100644
--- a/src/gamma-w32gdi.h
+++ b/src/gamma-w32gdi.h
@@ -39,7 +39,7 @@ int w32gdi_set_option(w32gdi_state_t *state, const char *key,
void w32gdi_restore(w32gdi_state_t *state);
int w32gdi_set_temperature(w32gdi_state_t *state, int temp, float brightness,
- float gamma[3]);
+ const float gamma[3]);
#endif /* ! _REDSHIFT_GAMMA_W32GDI_H */
diff --git a/src/redshift.h b/src/redshift.h
index c3d1239..a7489ce 100644
--- a/src/redshift.h
+++ b/src/redshift.h
@@ -34,7 +34,7 @@ typedef int gamma_method_set_option_func(void *state, const char *key,
typedef void gamma_method_restore_func(void *state);
typedef int gamma_method_set_temperature_func(void *state, int temp,
float brightness,
- float gamma[3]);
+ const float gamma[3]);
typedef struct {
char *name;