Lines Matching +refs:val +refs:list
17 char **list;
23 * Initialize the string list abstraction.
25 static errcode_t init_list(struct profile_string_list *list)
27 list->num = 0;
28 list->max = 10;
29 list->list = malloc(list->max * sizeof (char *));
30 if (list->list == 0)
32 list->list[0] = 0;
38 * built up list in *ret_list if it is non-null.
40 static void end_list(struct profile_string_list *list, char ***ret_list)
44 if (list == 0)
48 *ret_list = list->list;
51 for (cp = list->list; *cp; cp++)
53 free(list->list);
55 list->num = list->max = 0;
56 list->list = 0;
60 * Add a string to the list.
62 static errcode_t add_to_list(struct profile_string_list *list, const char *str)
67 if (list->num+1 >= list->max) {
68 newmax = list->max + 10;
69 newlist = realloc(list->list, newmax * sizeof (char *));
72 list->max = newmax;
73 list->list = newlist;
79 list->list[list->num++] = newstr;
80 list->list[list->num] = 0;
852 * char **val, boolean_t master_required, boolean_t kdc_required)
859 * (val returns realm validated)
862 * (val returns default realm configured)
865 * (val returns realm configured)
868 * (val returns realm not found)
871 * (val returns realm specified)
874 * (val returns realm specified)
877 * (val returns realm specified)
880 * (val returns realm specified)
883 * (val returns realm specified)
887 * (val returns the domain/host name)
890 * (val returns the realm specified)
891 * where val is the associated errant value, associated with val_err. This
912 k5_profile_validate(profile_t profile, char *realm, int *val_err, char **val,
920 if (profile == NULL || realm == NULL || val_err == NULL || val == NULL)
924 *val = NULL;
932 *val = strdup(*trealms);
933 if (*val == NULL)
944 if ((*val = strdup(realm)) == NULL)
952 if ((*val = strdup(realm)) == NULL)
967 if ((*val = strdup(*domains)) == NULL)
978 if ((*val = strdup(realm)) == NULL)
994 if ((*val = strdup(realm)) == NULL)
1009 if ((*val = strdup(realm)) == NULL)
1021 if ((*val = strdup(default_realm)) == NULL)
1028 if ((*val = strdup(realm)) == NULL)
1043 if ((*val = strdup(default_realm)) == NULL)
1048 if ((*val = strdup(realm)) == NULL)
1129 * k5_profile_validate_get_error_msg(profile_t profile, int err, char *val,
1135 * where val is the val returned by the k5_profile_validate function
1144 k5_profile_validate_get_error_msg(profile_t profile, int err, char *val,
1151 if (profile == NULL || val == NULL || err_msg == NULL)
1198 if (asprintf(err_msg, "%s: %s: %s", f, m, val) == -1)