diff options
Diffstat (limited to 'src/common.h')
| -rw-r--r-- | src/common.h | 39 | 
1 files changed, 29 insertions, 10 deletions
| diff --git a/src/common.h b/src/common.h index 7baedae..ca9e439 100644 --- a/src/common.h +++ b/src/common.h @@ -57,14 +57,30 @@  #include <libred.h> +  #ifdef ENABLE_NLS  # include <libintl.h>  #else  # define gettext(s) s  #endif + +/** + * List for translation, and translate in place + *  + * @param   s:string-literal  Translatable string + * @return  :const char *     Translation of `s` + */  #define _(s) gettext(s) + +/** + * List for translation without translating in place + * + * @param   s:string-literal  Translatable string + * @return  :string-literal   `s` as is + */  #define N_(s) s +  #if defined(__GNUC__)  # define GCC_ONLY(...) __VA_ARGS__  #else @@ -78,9 +94,6 @@  #define NEUTRAL_TEMP  6500 -#define SOLAR_CIVIL_TWILIGHT_ELEV    -6.0 - -  /**   * Truncate a value into a bounded range   *  @@ -234,6 +247,17 @@ struct location_provider {  }; +/** + * `NULL` terminated list of adjustment methods + */ +extern const struct gamma_method *gamma_methods[]; + +/** + * `NULL` terminated list of location providers + */ +extern const struct location_provider *location_providers[]; + +  #define LIST_RAMPS_STOP_VALUE_TYPES(X, D)\  	X(u8, uint8_t, UINT8_MAX, 8) D\  	X(u16, uint16_t, UINT16_MAX, 16) D\ @@ -290,12 +314,8 @@ struct config_ini_section *config_ini_get_section(struct config_ini_state *state  void options_init(struct options *options); -void options_parse_args(struct options *options, int argc, char *argv[], -                        const struct gamma_method *gamma_methods, -                        const struct location_provider *location_providers); -void options_parse_config_file(struct options *options, struct config_ini_state *config_state, -                               const struct gamma_method *gamma_methods, -                               const struct location_provider *location_providers); +void options_parse_args(struct options *options, int argc, char *argv[]); +void options_parse_config_file(struct options *options, struct config_ini_state *config_state);  void options_set_defaults(struct options *options); @@ -326,7 +346,6 @@ extern volatile sig_atomic_t exiting;   */  extern volatile sig_atomic_t disable; -  /**   * Install signal handlers for the process   */ | 
