Home | History | Annotate | Download | only in dist

Lines Matching refs:cdata

81 cmd_source_file_complete(struct client *c, struct cmd_source_file_data *cdata)
87 if (cdata->retval == CMD_RETURN_ERROR &&
92 cmdq_insert_after(cdata->after, new_item);
95 for (i = 0; i < cdata->nfiles; i++)
96 free(cdata->files[i]);
97 free(cdata->files);
98 free(cdata);
105 struct cmd_source_file_data *cdata = data;
106 struct cmdq_item *item = cdata->item;
119 if (load_cfg_from_buffer(bdata, bsize, path, c, cdata->after,
120 target, cdata->flags, &new_item) < 0)
121 cdata->retval = CMD_RETURN_ERROR;
123 cdata->after = new_item;
126 n = ++cdata->current;
127 if (n < cdata->nfiles)
128 file_read(c, cdata->files[n], cmd_source_file_done, cdata);
130 cmd_source_file_complete(c, cdata);
136 cmd_source_file_add(struct cmd_source_file_data *cdata, const char *path)
139 cdata->files = xreallocarray(cdata->files, cdata->nfiles + 1,
140 sizeof *cdata->files);
141 cdata->files[cdata->nfiles++] = xstrdup(path);
163 struct cmd_source_file_data *cdata;
188 cdata = xcalloc(1, sizeof *cdata);
189 cdata->item = item;
192 cdata->flags |= CMD_PARSE_QUIET;
194 cdata->flags |= CMD_PARSE_PARSEONLY;
198 cdata->flags |= CMD_PARSE_VERBOSE;
211 cmd_source_file_add(cdata, "-");
223 (~cdata->flags & CMD_PARSE_QUIET)) {
240 cmd_source_file_add(cdata, g.gl_pathv[j]);
245 cdata->after = item;
246 cdata->retval = retval;
248 if (cdata->nfiles != 0) {
249 file_read(c, cdata->files[0], cmd_source_file_done, cdata);
252 cmd_source_file_complete(c, cdata);