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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected