MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cli_windows_path_segment_equal

Function cli_windows_path_segment_equal

src/cli/cli.c:6700–6717  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6698}
6699
6700static bool cli_windows_path_segment_equal(const wchar_t *segment, size_t segment_length,
6701 const wchar_t *directory) {
6702 while (segment_length > 0 && (*segment == L' ' || *segment == L'\t')) {
6703 segment++;
6704 segment_length--;
6705 }
6706 while (segment_length > 0 &&
6707 (segment[segment_length - 1U] == L' ' || segment[segment_length - 1U] == L'\t' ||
6708 segment[segment_length - 1U] == L'/' || segment[segment_length - 1U] == L'\\')) {
6709 segment_length--;
6710 }
6711 size_t directory_length = wcslen(directory);
6712 while (directory_length > 0 && (directory[directory_length - 1U] == L'/' ||
6713 directory[directory_length - 1U] == L'\\')) {
6714 directory_length--;
6715 }
6716 return segment_length == directory_length && _wcsnicmp(segment, directory, segment_length) == 0;
6717}
6718
6719static bool cli_windows_smoke_download_url_valid(void) {
6720 wchar_t url[CLI_BUF_128];

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected