Lines Matching refs:data
50 static int nodups_specs(struct saved_data *data, const char *path)
54 struct spec *curr_spec, *spec_arr = data->spec_arr;
56 for (ii = 0; ii < data->nspec; ii++) {
58 for (jj = ii + 1; jj < data->nspec; jj++) {
90 struct saved_data *data = (struct saved_data *)rec->data;
91 spec_t *spec_arr = data->spec_arr;
92 unsigned int nspec = data->nspec;
139 data->nspec = ++nspec;
146 struct saved_data *data = (struct saved_data *)rec->data;
181 data->nspec = 0;
184 && data->nspec < maxnspec) {
191 status = nodups_specs(data, path);
199 if (data->nspec == 0) {
204 if (NULL == (data->spec_arr =
205 malloc(sizeof(spec_t) * data->nspec)))
208 memset(data->spec_arr, 0, sizeof(spec_t)*data->nspec);
209 maxnspec = data->nspec;
214 qsort(data->spec_arr, data->nspec, sizeof(struct spec), cmp);
227 struct saved_data *data = (struct saved_data *)rec->data;
231 for (i = 0; i < data->nspec; i++) {
232 spec = &data->spec_arr[i];
238 if (data->spec_arr)
239 free(data->spec_arr);
241 free(data);
248 struct saved_data *data = (struct saved_data *)rec->data;
249 spec_t *spec_arr = data->spec_arr;
253 if (!data->nspec) {
258 for (i = 0; i < data->nspec; i++) {
267 if (i >= data->nspec) {
288 struct saved_data *data;
290 data = (struct saved_data *)malloc(sizeof(*data));
291 if (!data)
293 memset(data, 0, sizeof(*data));
295 rec->data = data;