Skip to content

Commit 780d4c3

Browse files
committed
patch 7.4.1651
Problem: Some dead (MSDOS) code remains. Solution: Remove the unused lines. (Ken Takata)
1 parent f68f1d7 commit 780d4c3

File tree

2 files changed

+4
-43
lines changed

2 files changed

+4
-43
lines changed

src/misc1.c

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9737,18 +9737,6 @@ pstrcmp(const void *a, const void *b)
97379737
return (pathcmp(*(char **)a, *(char **)b, -1));
97389738
}
97399739

9740-
# ifndef WIN3264
9741-
static void
9742-
namelowcpy(
9743-
char_u *d,
9744-
char_u *s)
9745-
{
9746-
while (*s)
9747-
*d++ = TOLOWER_LOC(*s++);
9748-
*d = NUL;
9749-
}
9750-
# endif
9751-
97529740
/*
97539741
* Recursively expand one path component into all matching files and/or
97549742
* directories. Adds matches to "gap". Handles "*", "?", "[a-z]", "**", etc.
@@ -9777,16 +9765,12 @@ dos_expandpath(
97779765
int len;
97789766
int starstar = FALSE;
97799767
static int stardepth = 0; /* depth for "**" expansion */
9780-
#ifdef WIN3264
97819768
WIN32_FIND_DATA fb;
97829769
HANDLE hFind = (HANDLE)0;
97839770
# ifdef FEAT_MBYTE
97849771
WIN32_FIND_DATAW wfb;
97859772
WCHAR *wn = NULL; /* UCS-2 name, NULL when not used. */
97869773
# endif
9787-
#else
9788-
struct ffblk fb;
9789-
#endif
97909774
char_u *matchname;
97919775
int ok;
97929776

@@ -9827,7 +9811,7 @@ dos_expandpath(
98279811
else if (path_end >= path + wildoff
98289812
&& vim_strchr((char_u *)"*?[~", *path_end) != NULL)
98299813
e = p;
9830-
#ifdef FEAT_MBYTE
9814+
# ifdef FEAT_MBYTE
98319815
if (has_mbyte)
98329816
{
98339817
len = (*mb_ptr2len)(path_end);
@@ -9836,7 +9820,7 @@ dos_expandpath(
98369820
path_end += len;
98379821
}
98389822
else
9839-
#endif
9823+
# endif
98409824
*p++ = *path_end++;
98419825
}
98429826
e = p;
@@ -9897,7 +9881,6 @@ dos_expandpath(
98979881

98989882
/* Scan all files in the directory with "dir/ *.*" */
98999883
STRCPY(s, "*.*");
9900-
#ifdef WIN3264
99019884
# ifdef FEAT_MBYTE
99029885
if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
99039886
{
@@ -9921,24 +9904,15 @@ dos_expandpath(
99219904
# endif
99229905
hFind = FindFirstFile((LPCSTR)buf, &fb);
99239906
ok = (hFind != INVALID_HANDLE_VALUE);
9924-
#else
9925-
/* If we are expanding wildcards we try both files and directories */
9926-
ok = (findfirst((char *)buf, &fb,
9927-
(*path_end != NUL || (flags & EW_DIR)) ? FA_DIREC : 0) == 0);
9928-
#endif
99299907

99309908
while (ok)
99319909
{
9932-
#ifdef WIN3264
99339910
# ifdef FEAT_MBYTE
99349911
if (wn != NULL)
99359912
p = utf16_to_enc(wfb.cFileName, NULL); /* p is allocated here */
99369913
else
99379914
# endif
99389915
p = (char_u *)fb.cFileName;
9939-
#else
9940-
p = (char_u *)fb.ff_name;
9941-
#endif
99429916
/* Ignore entries starting with a dot, unless when asked for. Accept
99439917
* all entries found with "matchname". */
99449918
if ((p[0] != '.' || starts_with_dot
@@ -9950,11 +9924,7 @@ dos_expandpath(
99509924
|| ((flags & EW_NOTWILD)
99519925
&& fnamencmp(path + (s - buf), p, e - s) == 0)))
99529926
{
9953-
#ifdef WIN3264
99549927
STRCPY(s, p);
9955-
#else
9956-
namelowcpy(s, p);
9957-
#endif
99589928
len = (int)STRLEN(buf);
99599929

99609930
if (starstar && stardepth < 100)
@@ -9986,7 +9956,6 @@ dos_expandpath(
99869956
}
99879957
}
99889958

9989-
#ifdef WIN3264
99909959
# ifdef FEAT_MBYTE
99919960
if (wn != NULL)
99929961
{
@@ -9996,16 +9965,12 @@ dos_expandpath(
99969965
else
99979966
# endif
99989967
ok = FindNextFile(hFind, &fb);
9999-
#else
10000-
ok = (findnext(&fb) == 0);
10001-
#endif
100029968

100039969
/* If no more matches and no match was used, try expanding the name
100049970
* itself. Finds the long name of a short filename. */
100059971
if (!ok && matchname != NULL && gap->ga_len == start_len)
100069972
{
100079973
STRCPY(s, matchname);
10008-
#ifdef WIN3264
100099974
FindClose(hFind);
100109975
# ifdef FEAT_MBYTE
100119976
if (wn != NULL)
@@ -10019,21 +9984,15 @@ dos_expandpath(
100199984
# endif
100209985
hFind = FindFirstFile((LPCSTR)buf, &fb);
100219986
ok = (hFind != INVALID_HANDLE_VALUE);
10022-
#else
10023-
ok = (findfirst((char *)buf, &fb,
10024-
(*path_end != NUL || (flags & EW_DIR)) ? FA_DIREC : 0) == 0);
10025-
#endif
100269987
vim_free(matchname);
100279988
matchname = NULL;
100289989
}
100299990
}
100309991

10031-
#ifdef WIN3264
100329992
FindClose(hFind);
100339993
# ifdef FEAT_MBYTE
100349994
vim_free(wn);
100359995
# endif
10036-
#endif
100379996
vim_free(buf);
100389997
vim_regfree(regmatch.regprog);
100399998
vim_free(matchname);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ static char *(features[]) =
748748

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1651,
751753
/**/
752754
1650,
753755
/**/

0 commit comments

Comments
 (0)