Lines Matching refs:bufStart
577 char** bufStart, size_t* pos, in UTIL_prepareFileList() argument
616 nbFiles += UTIL_prepareFileList(path, bufStart, pos, bufEnd, followLinks); in UTIL_prepareFileList()
617 if (*bufStart == NULL) { free(path); FindClose(hFile); return 0; } in UTIL_prepareFileList()
621 if (*bufStart + *pos + pathLength >= *bufEnd) { in UTIL_prepareFileList()
622 ptrdiff_t const newListSize = (*bufEnd - *bufStart) + LIST_SIZE_INCREASE; in UTIL_prepareFileList()
623 *bufStart = (char*)UTIL_realloc(*bufStart, newListSize); in UTIL_prepareFileList()
624 if (*bufStart == NULL) { free(path); FindClose(hFile); return 0; } in UTIL_prepareFileList()
625 *bufEnd = *bufStart + newListSize; in UTIL_prepareFileList()
627 if (*bufStart + *pos + pathLength < *bufEnd) { in UTIL_prepareFileList()
628 memcpy(*bufStart + *pos, path, pathLength+1 /* include final \0 */); in UTIL_prepareFileList()
642 char** bufStart, size_t* pos, in UTIL_prepareFileList() argument
679 …nbFiles += UTIL_prepareFileList(path, bufStart, pos, bufEnd, followLinks); /* Recursively call "U… in UTIL_prepareFileList()
680 if (*bufStart == NULL) { free(path); closedir(dir); return 0; } in UTIL_prepareFileList()
682 if (*bufStart + *pos + pathLength >= *bufEnd) { in UTIL_prepareFileList()
683 ptrdiff_t newListSize = (*bufEnd - *bufStart) + LIST_SIZE_INCREASE; in UTIL_prepareFileList()
685 *bufStart = (char*)UTIL_realloc(*bufStart, (size_t)newListSize); in UTIL_prepareFileList()
686 *bufEnd = *bufStart + newListSize; in UTIL_prepareFileList()
687 if (*bufStart == NULL) { free(path); closedir(dir); return 0; } in UTIL_prepareFileList()
689 if (*bufStart + *pos + pathLength < *bufEnd) { in UTIL_prepareFileList()
690 memcpy(*bufStart + *pos, path, pathLength + 1); /* with final \0 */ in UTIL_prepareFileList()
700 free(*bufStart); in UTIL_prepareFileList()
701 *bufStart = NULL; in UTIL_prepareFileList()
710 char** bufStart, size_t* pos, in UTIL_prepareFileList() argument
713 (void)bufStart; (void)bufEnd; (void)pos; (void)followLinks; in UTIL_prepareFileList()