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:5813–5830  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5811}
5812
5813static bool cli_windows_path_segment_equal(const wchar_t *segment, size_t segment_length,
5814 const wchar_t *directory) {
5815 while (segment_length > 0 && (*segment == L' ' || *segment == L'\t')) {
5816 segment++;
5817 segment_length--;
5818 }
5819 while (segment_length > 0 &&
5820 (segment[segment_length - 1U] == L' ' || segment[segment_length - 1U] == L'\t' ||
5821 segment[segment_length - 1U] == L'/' || segment[segment_length - 1U] == L'\\')) {
5822 segment_length--;
5823 }
5824 size_t directory_length = wcslen(directory);
5825 while (directory_length > 0 && (directory[directory_length - 1U] == L'/' ||
5826 directory[directory_length - 1U] == L'\\')) {
5827 directory_length--;
5828 }
5829 return segment_length == directory_length && _wcsnicmp(segment, directory, segment_length) == 0;
5830}
5831
5832static bool cli_windows_smoke_download_url_valid(void) {
5833 wchar_t url[CLI_BUF_128];

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected