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

Source from the content-addressed store, hash-verified

5867}
5868
5869static bool cli_windows_path_segment_equal(const wchar_t *segment, size_t segment_length,
5870 const wchar_t *directory) {
5871 while (segment_length > 0 && (*segment == L' ' || *segment == L'\t')) {
5872 segment++;
5873 segment_length--;
5874 }
5875 while (segment_length > 0 &&
5876 (segment[segment_length - 1U] == L' ' || segment[segment_length - 1U] == L'\t' ||
5877 segment[segment_length - 1U] == L'/' || segment[segment_length - 1U] == L'\\')) {
5878 segment_length--;
5879 }
5880 size_t directory_length = wcslen(directory);
5881 while (directory_length > 0 && (directory[directory_length - 1U] == L'/' ||
5882 directory[directory_length - 1U] == L'\\')) {
5883 directory_length--;
5884 }
5885 return segment_length == directory_length && _wcsnicmp(segment, directory, segment_length) == 0;
5886}
5887
5888static bool cli_windows_smoke_download_url_valid(void) {
5889 wchar_t url[CLI_BUF_128];

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected