Lines Matching refs:opt
914 InputOption *opt = NULL;
920 nt_list_for_each_entry(opt, list, list.next) {
921 if (strcmp(input_option_get_key(opt), key) == 0) {
922 input_option_set_value(opt, value);
928 opt = calloc(1, sizeof(InputOption));
929 if (!opt)
932 nt_list_init(opt, list.next);
933 input_option_set_key(opt, key);
934 input_option_set_value(opt, value);
937 nt_list_append(opt, list, InputOption, list.next);
942 return opt;
962 * Free the list pointed at by opt.
965 input_option_free_list(InputOption **opt)
969 nt_list_for_each_entry_safe(element, tmp, *opt, list.next) {
970 nt_list_del(element, *opt, InputOption, list.next);
974 *opt = NULL;
996 input_option_get_key(const InputOption *opt)
998 return opt->opt_name;
1002 input_option_get_value(const InputOption *opt)
1004 return opt->opt_val;
1008 input_option_set_key(InputOption *opt, const char *key)
1010 free(opt->opt_name);
1012 opt->opt_name = strdup(key);
1016 input_option_set_value(InputOption *opt, const char *value)
1018 free(opt->opt_val);
1020 opt->opt_val = strdup(value);