diff options
-rw-r--r-- | DEPENDENCIES | 4 | ||||
-rw-r--r-- | coopgammad.c | 5 | ||||
-rw-r--r-- | servers-crtc.h | 2 | ||||
-rw-r--r-- | servers-gamma.c | 18 | ||||
-rw-r--r-- | state.c | 6 | ||||
-rw-r--r-- | state.h | 6 | ||||
-rw-r--r-- | types-output.h | 2 | ||||
-rw-r--r-- | types-ramps.h | 12 |
8 files changed, 28 insertions, 27 deletions
diff --git a/DEPENDENCIES b/DEPENDENCIES index c449ab4..ff47212 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -1,13 +1,13 @@ RUNTIME DEPENDENCIES: libc - libgamma + libgamma>=0.7.4 BUILD DEPENDENCIES: libc - libgamma + libgamma>=0.7.4 libclut cc make diff --git a/coopgammad.c b/coopgammad.c index 50ba53b..ecf4619 100644 --- a/coopgammad.c +++ b/coopgammad.c @@ -664,6 +664,7 @@ static int print_method_and_site(int query) { const char *restrict methodname = NULL; + const char *const_sitename; char *p; if (query == 1) { @@ -682,8 +683,8 @@ print_method_and_site(int query) } if (!sitename) - if ((sitename = libgamma_method_default_site(method))) - if (!(sitename = memdup(sitename, strlen(sitename) + 1))) + if ((const_sitename = libgamma_method_default_site(method))) + if (!(sitename = memdup(const_sitename, strlen(const_sitename) + 1))) return -1; if (sitename) { diff --git a/servers-crtc.h b/servers-crtc.h index 08e4b02..64606b2 100644 --- a/servers-crtc.h +++ b/servers-crtc.h @@ -33,7 +33,7 @@ int handle_enumerate_crtcs(size_t conn, const char *restrict message_id); * @return The name of the CRTC, `NULL` on error */ GCC_ONLY(__attribute__((__nonnull__))) -char *get_crtc_name(const libgamma_crtc_information_t *restrict info, const libgamma_crtc_state_t *restrict crtc); +char *get_crtc_name(const struct libgamma_crtc_information *restrict info, const struct libgamma_crtc_state *restrict crtc); /** * Initialise the site diff --git a/servers-gamma.c b/servers-gamma.c index 8907e8f..3b480b3 100644 --- a/servers-gamma.c +++ b/servers-gamma.c @@ -120,12 +120,12 @@ set_gamma(const struct output *restrict output, const union gamma_ramps *restric return; switch (output->depth) { - case 8: r = libgamma_crtc_set_gamma_ramps8(output->crtc, ramps->u8); break; - case 16: r = libgamma_crtc_set_gamma_ramps16(output->crtc, ramps->u16); break; - case 32: r = libgamma_crtc_set_gamma_ramps32(output->crtc, ramps->u32); break; - case 64: r = libgamma_crtc_set_gamma_ramps64(output->crtc, ramps->u64); break; - case -1: r = libgamma_crtc_set_gamma_rampsf(output->crtc, ramps->f); break; - case -2: r = libgamma_crtc_set_gamma_rampsd(output->crtc, ramps->d); break; + case 8: r = libgamma_crtc_set_gamma_ramps8(output->crtc, &ramps->u8); break; + case 16: r = libgamma_crtc_set_gamma_ramps16(output->crtc, &ramps->u16); break; + case 32: r = libgamma_crtc_set_gamma_ramps32(output->crtc, &ramps->u32); break; + case 64: r = libgamma_crtc_set_gamma_ramps64(output->crtc, &ramps->u64); break; + case -1: r = libgamma_crtc_set_gamma_rampsf(output->crtc, &ramps->f); break; + case -2: r = libgamma_crtc_set_gamma_rampsd(output->crtc, &ramps->d); break; default: abort(); } @@ -224,12 +224,12 @@ parse_edid(struct output *restrict output, const unsigned char *restrict edid, s int initialise_gamma_info(void) { - libgamma_crtc_information_t info; + struct libgamma_crtc_information info; int saved_errno; size_t i; for (i = 0; i < outputs_n; i++) { - libgamma_get_crtc_information(&info, crtcs + i, + libgamma_get_crtc_information(&info, sizeof(info), &crtcs[i], LIBGAMMA_CRTC_INFO_EDID | LIBGAMMA_CRTC_INFO_MACRO_RAMP | LIBGAMMA_CRTC_INFO_GAMMA_SUPPORT | @@ -334,7 +334,7 @@ restore_gamma(void) #define RESTORE_RAMPS(SUFFIX, MEMBER)\ do {\ if (outputs[i].saved_ramps.MEMBER.red) {\ - gerror = libgamma_crtc_set_gamma_ramps##SUFFIX(outputs[i].crtc, outputs[i].saved_ramps.MEMBER);\ + gerror = libgamma_crtc_set_gamma_ramps##SUFFIX(outputs[i].crtc, &outputs[i].saved_ramps.MEMBER);\ if (gerror)\ libgamma_perror(argv0, gerror);\ }\ @@ -107,17 +107,17 @@ char *restrict sitename = NULL; /** * The libgamma site state */ -libgamma_site_state_t site; /* do not marshal */ +struct libgamma_site_state site; /* do not marshal */ /** * The libgamma partition states */ -libgamma_partition_state_t *restrict partitions = NULL; /* do not marshal */ +struct libgamma_partition_state *restrict partitions = NULL; /* do not marshal */ /** * The libgamma CRTC states */ -libgamma_crtc_state_t *restrict crtcs = NULL; /* do not marshal */ +struct libgamma_crtc_state *restrict crtcs = NULL; /* do not marshal */ /** * Preserve gamma ramps at priority 0? @@ -118,17 +118,17 @@ extern char *restrict sitename; /** * The libgamma site state */ -extern libgamma_site_state_t site; +extern struct libgamma_site_state site; /** * The libgamma partition states */ -extern libgamma_partition_state_t *restrict partitions; +extern struct libgamma_partition_state *restrict partitions; /** * The libgamma CRTC states */ -extern libgamma_crtc_state_t *restrict crtcs; +extern struct libgamma_crtc_state *restrict crtcs; /** * Preserve gamma ramps at priority 0? diff --git a/types-output.h b/types-output.h index ca5bf61..17890a0 100644 --- a/types-output.h +++ b/types-output.h @@ -184,7 +184,7 @@ struct output { /** * The libgamma state for the output */ - libgamma_crtc_state_t *restrict crtc; + struct libgamma_crtc_state *restrict crtc; /** * Saved gamma ramps diff --git a/types-ramps.h b/types-ramps.h index e8e6956..6e64efc 100644 --- a/types-ramps.h +++ b/types-ramps.h @@ -20,32 +20,32 @@ union gamma_ramps { /** * Ramps with 8-bit value */ - libgamma_gamma_ramps8_t u8; + struct libgamma_gamma_ramps8 u8; /** * Ramps with 16-bit value */ - libgamma_gamma_ramps16_t u16; + struct libgamma_gamma_ramps16 u16; /** * Ramps with 32-bit value */ - libgamma_gamma_ramps32_t u32; + struct libgamma_gamma_ramps32 u32; /** * Ramps with 64-bit value */ - libgamma_gamma_ramps64_t u64; + struct libgamma_gamma_ramps64 u64; /** * Ramps with `float` value */ - libgamma_gamma_rampsf_t f; + struct libgamma_gamma_rampsf f; /** * Ramps with `double` value */ - libgamma_gamma_rampsd_t d; + struct libgamma_gamma_rampsd d; }; /** |