aboutsummaryrefslogtreecommitdiff
path: root/src/memline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/memline.c')
-rw-r--r--src/memline.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/src/memline.c b/src/memline.c
index 5df8034e69..6db8a17579 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -1808,16 +1808,11 @@ static time_t swapfile_info(char_u *fname)
static int recov_file_names(char_u **names, char_u *path, int prepend_dot)
{
int num_names;
-
-#ifdef SHORT_FNAME
- names[0] = modname(path, (char_u *)".sw?", FALSE);
- num_names = 1;
-#else /* !SHORT_FNAME */
- /*
- * (Win32 and Win64) never short names, but do prepend a dot.
- * (Neither Win32 nor Win64) maybe short name, maybe not: Try both.
- * Only use the short name if it is different.
- */
+ /*
+ * (Win32 and Win64) never short names, but do prepend a dot.
+ * (Not MS-DOS or Win32 or Win64) maybe short name, maybe not: Try both.
+ * Only use the short name if it is different.
+ */
char_u *p;
int i;
int shortname = curbuf->b_shortname;
@@ -1875,7 +1870,6 @@ static int recov_file_names(char_u **names, char_u *path, int prepend_dot)
end:
curbuf->b_shortname = shortname;
-#endif /* !SHORT_FNAME */
return num_names;
}
@@ -3410,20 +3404,12 @@ char_u *makeswapname(char_u *fname, char_u *ffname, buf_T *buf, char_u *dir_name
#endif
r = buf_modname(
-#ifdef SHORT_FNAME
- TRUE,
-#else
(buf->b_p_sn || buf->b_shortname),
-#endif
fname_res,
(char_u *)
".swp",
-#ifdef SHORT_FNAME /* always 8.3 file name */
- FALSE
-#else
/* Prepend a '.' to the swap file name for the current directory. */
dir_name[0] == '.' && dir_name[1] == NUL
-#endif
);
if (r == NULL) /* out of memory */
return NULL;
@@ -3588,12 +3574,10 @@ findswapname (
char_u *fname;
int n;
char_u *dir_name;
-#ifndef SHORT_FNAME
int r;
-#endif
char_u *buf_fname = buf->b_fname;
-#if !defined(SHORT_FNAME) && !defined(UNIX)
+#if !defined(UNIX)
# define CREATE_DUMMY_FILE
FILE *dummyfd = NULL;
@@ -3633,7 +3617,7 @@ findswapname (
fname = NULL;
break;
}
-#if defined(UNIX) && !defined(SHORT_FNAME)
+#if defined(UNIX)
/*
* Some systems have a MS-DOS compatible filesystem that use 8.3 character
* file names. If this is the first try and the swap file name does not fit in
@@ -3743,7 +3727,6 @@ findswapname (
* get here when file already exists
*/
if (fname[n - 2] == 'w' && fname[n - 1] == 'p') { /* first try */
-#ifndef SHORT_FNAME
/*
* on MS-DOS compatible filesystems (e.g. messydos) file.doc.swp
* and file.doc are the same file. To guess if this problem is
@@ -3764,7 +3747,6 @@ findswapname (
continue; /* try again with '.' replaced with '_' */
}
}
-#endif
/*
* If we get here the ".swp" file really exists.
* Give an error message, unless recovering, no file name, we are