diff options
author | Mattias Andrée <maandree@kth.se> | 2021-03-07 22:51:21 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-03-07 22:51:21 +0100 |
commit | baa6a1cf7979c095c1081daa2a2d1134c76d2f1b (patch) | |
tree | d0525238a334091eb4d241b0b83da1a4a1793d5b /libgamma_dummy_internal_crtc_restore_forced.c | |
parent | Start replacing info manual with man pages (diff) | |
download | libgamma-baa6a1cf7979c095c1081daa2a2d1134c76d2f1b.tar.gz libgamma-baa6a1cf7979c095c1081daa2a2d1134c76d2f1b.tar.bz2 libgamma-baa6a1cf7979c095c1081daa2a2d1134c76d2f1b.tar.xz |
misc
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libgamma_dummy_internal_crtc_restore_forced.c')
-rw-r--r-- | libgamma_dummy_internal_crtc_restore_forced.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libgamma_dummy_internal_crtc_restore_forced.c b/libgamma_dummy_internal_crtc_restore_forced.c index ab4cf50..a3c460f 100644 --- a/libgamma_dummy_internal_crtc_restore_forced.c +++ b/libgamma_dummy_internal_crtc_restore_forced.c @@ -12,7 +12,7 @@ * error identifier provided by this library */ int -libgamma_dummy_internal_crtc_restore_forced(libgamma_dummy_crtc_t *restrict data) +libgamma_dummy_internal_crtc_restore_forced(struct libgamma_dummy_crtc *restrict data) { size_t rn = data->info. red_gamma_size; size_t gn = data->info.green_gamma_size; @@ -22,7 +22,7 @@ libgamma_dummy_internal_crtc_restore_forced(libgamma_dummy_crtc_t *restrict data if (!data->gamma_red) return 0; -#define __reset_ramps(TYPE, MAX)\ +#define RESET_RAMPS(TYPE, MAX)\ do {\ TYPE *red = data->gamma_red;\ TYPE *green = data->gamma_green;\ @@ -32,14 +32,14 @@ libgamma_dummy_internal_crtc_restore_forced(libgamma_dummy_crtc_t *restrict data for (i = 0; i < bn; i++) blue [i] = (TYPE)((double)(MAX) * ((double)i / (double)(bn - 1)));\ } while (0) - if (data->info.gamma_depth == 8) __reset_ramps(uint8_t, INT8_MAX); - else if (data->info.gamma_depth == 16) __reset_ramps(uint16_t, INT16_MAX); - else if (data->info.gamma_depth == 32) __reset_ramps(uint32_t, INT32_MAX); - else if (data->info.gamma_depth == 64) __reset_ramps(uint64_t, INT64_MAX); - else if (data->info.gamma_depth == -1) __reset_ramps(float, 1); - else __reset_ramps(double, 1); + if (data->info.gamma_depth == 8) RESET_RAMPS(uint8_t, INT8_MAX); + else if (data->info.gamma_depth == 16) RESET_RAMPS(uint16_t, INT16_MAX); + else if (data->info.gamma_depth == 32) RESET_RAMPS(uint32_t, INT32_MAX); + else if (data->info.gamma_depth == 64) RESET_RAMPS(uint64_t, INT64_MAX); + else if (data->info.gamma_depth == -1) RESET_RAMPS(float, 1); + else RESET_RAMPS(double, 1); -#undef __reset_ramps +#undef RESET_RAMPS return 0; } |