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

Source from the content-addressed store, hash-verified

5888}
5889
5890static bool cli_windows_path_segment_equal(const wchar_t *segment, size_t segment_length,
5891 const wchar_t *directory) {
5892 while (segment_length > 0 && (*segment == L' ' || *segment == L'\t')) {
5893 segment++;
5894 segment_length--;
5895 }
5896 while (segment_length > 0 &&
5897 (segment[segment_length - 1U] == L' ' || segment[segment_length - 1U] == L'\t' ||
5898 segment[segment_length - 1U] == L'/' || segment[segment_length - 1U] == L'\\')) {
5899 segment_length--;
5900 }
5901 size_t directory_length = wcslen(directory);
5902 while (directory_length > 0 && (directory[directory_length - 1U] == L'/' ||
5903 directory[directory_length - 1U] == L'\\')) {
5904 directory_length--;
5905 }
5906 return segment_length == directory_length && _wcsnicmp(segment, directory, segment_length) == 0;
5907}
5908
5909static bool cli_windows_smoke_download_url_valid(void) {
5910 wchar_t url[CLI_BUF_128];

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected