Lines Matching defs:paths
52 static int allocate_paths(struct xfer_context *xfer, char *const *paths,
63 xfer->paths = calloc(count, sizeof(xfer->paths[0]));
64 if (xfer->paths == NULL)
69 xfer->paths[0] = strdup("-");
70 if (xfer->paths[0] == NULL)
74 xfer->paths[i] = strndup(paths[i], PATH_MAX);
75 if (xfer->paths[i] == NULL)
180 !strcmp(xfer->paths[0], "-")) {
185 xfer->paths[0]);
196 if (!strcmp(xfer->paths[0], "-")) {
204 // container files, it can be used to generate several paths.
208 // Require several paths for containers.
433 xfer->paths[index] = malloc(len);
434 if (xfer->paths[index] == NULL)
438 snprintf(xfer->paths[index], len, single_format, template,
441 snprintf(xfer->paths[index], len, multiple_format, template,
461 xfer->paths[index] = malloc(len);
462 if (xfer->paths[index] == NULL)
466 snprintf(xfer->paths[index], len, single_format, template);
468 snprintf(xfer->paths[index], len, multiple_format, template,
507 assert(xfer->paths);
508 assert(xfer->paths[0]);
509 assert(xfer->paths[0][0] != '\0');
512 template = xfer->paths[0];
513 free(xfer->paths);
514 xfer->paths = NULL;
517 xfer->paths = calloc(path_count, sizeof(*xfer->paths));
518 if (xfer->paths == NULL) {
557 if (!strcmp(xfer->paths[i], allowed_duplication[j]))
563 template = xfer->paths[i];
564 xfer->paths[i] = NULL;
581 if (!strcmp(xfer->paths[0], "-"))
598 // Check duplication of the paths.
602 if (!strcmp(xfer->paths[i], allowed_duplication[j]))
609 if (!strcmp(xfer->paths[i], xfer->paths[j])) {
624 fprintf(stderr, " %d: %s\n", i, xfer->paths[i]);