To: vim_dev@googlegroups.com Subject: Patch 7.4.1651 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1651 Problem: Some dead (MSDOS) code remains. Solution: Remove the unused lines. (Ken Takata) Files: src/misc1.c *** ../vim-7.4.1650/src/misc1.c 2016-03-19 22:11:47.424674965 +0100 --- src/misc1.c 2016-03-25 17:19:12.072192268 +0100 *************** *** 9737,9754 **** return (pathcmp(*(char **)a, *(char **)b, -1)); } - # ifndef WIN3264 - static void - namelowcpy( - char_u *d, - char_u *s) - { - while (*s) - *d++ = TOLOWER_LOC(*s++); - *d = NUL; - } - # endif - /* * Recursively expand one path component into all matching files and/or * directories. Adds matches to "gap". Handles "*", "?", "[a-z]", "**", etc. --- 9737,9742 ---- *************** *** 9777,9792 **** int len; int starstar = FALSE; static int stardepth = 0; /* depth for "**" expansion */ - #ifdef WIN3264 WIN32_FIND_DATA fb; HANDLE hFind = (HANDLE)0; # ifdef FEAT_MBYTE WIN32_FIND_DATAW wfb; WCHAR *wn = NULL; /* UCS-2 name, NULL when not used. */ # endif - #else - struct ffblk fb; - #endif char_u *matchname; int ok; --- 9765,9776 ---- *************** *** 9827,9833 **** else if (path_end >= path + wildoff && vim_strchr((char_u *)"*?[~", *path_end) != NULL) e = p; ! #ifdef FEAT_MBYTE if (has_mbyte) { len = (*mb_ptr2len)(path_end); --- 9811,9817 ---- else if (path_end >= path + wildoff && vim_strchr((char_u *)"*?[~", *path_end) != NULL) e = p; ! # ifdef FEAT_MBYTE if (has_mbyte) { len = (*mb_ptr2len)(path_end); *************** *** 9836,9842 **** path_end += len; } else ! #endif *p++ = *path_end++; } e = p; --- 9820,9826 ---- path_end += len; } else ! # endif *p++ = *path_end++; } e = p; *************** *** 9897,9903 **** /* Scan all files in the directory with "dir/ *.*" */ STRCPY(s, "*.*"); - #ifdef WIN3264 # ifdef FEAT_MBYTE if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) { --- 9881,9886 ---- *************** *** 9921,9944 **** # endif hFind = FindFirstFile((LPCSTR)buf, &fb); ok = (hFind != INVALID_HANDLE_VALUE); - #else - /* If we are expanding wildcards we try both files and directories */ - ok = (findfirst((char *)buf, &fb, - (*path_end != NUL || (flags & EW_DIR)) ? FA_DIREC : 0) == 0); - #endif while (ok) { - #ifdef WIN3264 # ifdef FEAT_MBYTE if (wn != NULL) p = utf16_to_enc(wfb.cFileName, NULL); /* p is allocated here */ else # endif p = (char_u *)fb.cFileName; - #else - p = (char_u *)fb.ff_name; - #endif /* Ignore entries starting with a dot, unless when asked for. Accept * all entries found with "matchname". */ if ((p[0] != '.' || starts_with_dot --- 9904,9918 ---- *************** *** 9950,9960 **** || ((flags & EW_NOTWILD) && fnamencmp(path + (s - buf), p, e - s) == 0))) { - #ifdef WIN3264 STRCPY(s, p); - #else - namelowcpy(s, p); - #endif len = (int)STRLEN(buf); if (starstar && stardepth < 100) --- 9924,9930 ---- *************** *** 9986,9992 **** } } - #ifdef WIN3264 # ifdef FEAT_MBYTE if (wn != NULL) { --- 9956,9961 ---- *************** *** 9996,10011 **** else # endif ok = FindNextFile(hFind, &fb); - #else - ok = (findnext(&fb) == 0); - #endif /* If no more matches and no match was used, try expanding the name * itself. Finds the long name of a short filename. */ if (!ok && matchname != NULL && gap->ga_len == start_len) { STRCPY(s, matchname); - #ifdef WIN3264 FindClose(hFind); # ifdef FEAT_MBYTE if (wn != NULL) --- 9965,9976 ---- *************** *** 10019,10039 **** # endif hFind = FindFirstFile((LPCSTR)buf, &fb); ok = (hFind != INVALID_HANDLE_VALUE); - #else - ok = (findfirst((char *)buf, &fb, - (*path_end != NUL || (flags & EW_DIR)) ? FA_DIREC : 0) == 0); - #endif vim_free(matchname); matchname = NULL; } } - #ifdef WIN3264 FindClose(hFind); # ifdef FEAT_MBYTE vim_free(wn); # endif - #endif vim_free(buf); vim_regfree(regmatch.regprog); vim_free(matchname); --- 9984,9998 ---- *** ../vim-7.4.1650/src/version.c 2016-03-25 17:14:03.179330015 +0100 --- src/version.c 2016-03-25 17:20:05.955644872 +0100 *************** *** 750,751 **** --- 750,753 ---- { /* Add new patch number below this line */ + /**/ + 1651, /**/ -- "Computers in the future may weigh no more than 1.5 tons." Popular Mechanics, 1949 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///