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

Source from the content-addressed store, hash-verified

6031}
6032
6033static bool cli_windows_path_segment_equal(const wchar_t *segment, size_t segment_length,
6034 const wchar_t *directory) {
6035 while (segment_length > 0 && (*segment == L' ' || *segment == L'\t')) {
6036 segment++;
6037 segment_length--;
6038 }
6039 while (segment_length > 0 &&
6040 (segment[segment_length - 1U] == L' ' || segment[segment_length - 1U] == L'\t' ||
6041 segment[segment_length - 1U] == L'/' || segment[segment_length - 1U] == L'\\')) {
6042 segment_length--;
6043 }
6044 size_t directory_length = wcslen(directory);
6045 while (directory_length > 0 && (directory[directory_length - 1U] == L'/' ||
6046 directory[directory_length - 1U] == L'\\')) {
6047 directory_length--;
6048 }
6049 return segment_length == directory_length && _wcsnicmp(segment, directory, segment_length) == 0;
6050}
6051
6052static bool cli_windows_smoke_download_url_valid(void) {
6053 wchar_t url[CLI_BUF_128];

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected