diff options
Diffstat (limited to 'src/spiceqxl_spice_server.c')
-rw-r--r-- | src/spiceqxl_spice_server.c | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/src/spiceqxl_spice_server.c b/src/spiceqxl_spice_server.c index 61f20d1..b7206cc 100644 --- a/src/spiceqxl_spice_server.c +++ b/src/spiceqxl_spice_server.c @@ -27,6 +27,7 @@ */ #include "qxl.h" +#include "qxl_option_helpers.h" #include "spiceqxl_spice_server.h" /* Single instance of spice server per Xorg executable. @@ -40,40 +41,6 @@ SpiceServer *xspice_get_spice_server(void) return spice_server; } -static -int get_int_option(OptionInfoPtr options, int option_index, - const char *env_name) -{ - if (getenv(env_name)) { - return atoi(getenv(env_name)); - } - return options[option_index].value.num; -} - -static -const char *get_str_option(OptionInfoPtr options, int option_index, - const char *env_name) -{ - if (getenv(env_name)) { - return getenv(env_name); - } - return options[option_index].value.str; -} - -static -int get_bool_option(OptionInfoPtr options, int option_index, - const char *env_name) -{ - if (getenv(env_name)) { - /* we don't support the whole range of boolean true and - * false values documented in man xorg.conf, just the c - * convention - 0 is false, anything else is true, so - * just like a number. */ - return !!atoi(getenv(env_name)); - } - return options[option_index].value.bool; -} - #define X509_CA_CERT_FILE "ca-cert.pem" #define X509_SERVER_KEY_FILE "server-key.pem" #define X509_SERVER_CERT_FILE "server-cert.pem" |