mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	Remove char_u: path_is_url()
This commit is contained in:
		| @@ -1521,16 +1521,14 @@ find_file_name_in_path ( | ||||
|   return file_name; | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * Check if the "://" of a URL is at the pointer, return URL_SLASH. | ||||
|  * Also check for ":\\", which MS Internet Explorer accepts, return | ||||
|  * URL_BACKSLASH. | ||||
|  */ | ||||
| int path_is_url(char_u *p) | ||||
| // Check if the "://" of a URL is at the pointer, return URL_SLASH. | ||||
| // Also check for ":\\", which MS Internet Explorer accepts, return | ||||
| // URL_BACKSLASH. | ||||
| int path_is_url(const char *p) | ||||
| { | ||||
|   if (STRNCMP(p, "://", (size_t)3) == 0) | ||||
|   if (strncmp(p, "://", 3) == 0) | ||||
|     return URL_SLASH; | ||||
|   else if (STRNCMP(p, ":\\\\", (size_t)3) == 0) | ||||
|   else if (strncmp(p, ":\\\\", 3) == 0) | ||||
|     return URL_BACKSLASH; | ||||
|   return 0; | ||||
| } | ||||
|   | ||||
| @@ -4916,7 +4916,7 @@ file_name_in_line ( | ||||
|     if (has_mbyte && (len = (size_t)((*mb_head_off)(line, ptr - 1))) > 0) | ||||
|       ptr -= len + 1; | ||||
|     else if (vim_isfilec(ptr[-1]) | ||||
|              || ((options & FNAME_HYP) && path_is_url(ptr - 1))) | ||||
|              || ((options & FNAME_HYP) && path_is_url((char *)ptr - 1))) | ||||
|       --ptr; | ||||
|     else | ||||
|       break; | ||||
| @@ -4928,7 +4928,7 @@ file_name_in_line ( | ||||
|    */ | ||||
|   len = 0; | ||||
|   while (vim_isfilec(ptr[len]) | ||||
|          || ((options & FNAME_HYP) && path_is_url(ptr + len))) | ||||
|          || ((options & FNAME_HYP) && path_is_url((char *)ptr + len))) | ||||
|     if (has_mbyte) | ||||
|       len += (size_t)(*mb_ptr2len)(ptr + len); | ||||
|     else | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Mark Bainter
					Mark Bainter