diff options
Diffstat (limited to 'src/memline.c')
-rw-r--r-- | src/memline.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/memline.c b/src/memline.c index 0dd07436a6..5df8034e69 100644 --- a/src/memline.c +++ b/src/memline.c @@ -1709,8 +1709,7 @@ static char_u *make_percent_swname(char_u *dir, char_u *name) } #endif -#if (defined(UNIX) || defined(__EMX__) || defined(VMS)) && \ - (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)) +#if defined(UNIX) && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)) static int process_still_running; #endif @@ -1784,8 +1783,7 @@ static time_t swapfile_info(char_u *fname) if (char_to_long(b0.b0_pid) != 0L) { MSG_PUTS(_("\n process ID: ")); msg_outnum(char_to_long(b0.b0_pid)); -#if defined(UNIX) || defined(__EMX__) - /* EMX kill() not working correctly, it seems */ +#if defined(UNIX) if (kill((pid_t)char_to_long(b0.b0_pid), 0) == 0) { MSG_PUTS(_(" (still running)")); process_still_running = TRUE; @@ -1812,15 +1810,12 @@ static int recov_file_names(char_u **names, char_u *path, int prepend_dot) int num_names; #ifdef SHORT_FNAME - /* - * (MS-DOS) always short names - */ 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. - * (Not MS-DOS or Win32 or Win64) maybe short name, maybe not: Try both. + * (Neither Win32 nor Win64) maybe short name, maybe not: Try both. * Only use the short name if it is different. */ char_u *p; @@ -3598,8 +3593,7 @@ findswapname ( #endif char_u *buf_fname = buf->b_fname; -#if !defined(SHORT_FNAME) \ - && ((!defined(UNIX) && !defined(OS2)) || defined(ARCHIE)) +#if !defined(SHORT_FNAME) && !defined(UNIX) # define CREATE_DUMMY_FILE FILE *dummyfd = NULL; @@ -3639,7 +3633,7 @@ findswapname ( fname = NULL; break; } -#if (defined(UNIX) || defined(OS2)) && !defined(ARCHIE) && !defined(SHORT_FNAME) +#if defined(UNIX) && !defined(SHORT_FNAME) /* * 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 @@ -3850,8 +3844,7 @@ findswapname ( } #endif -#if (defined(UNIX) || defined(__EMX__) || defined(VMS)) && \ - (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)) +#if defined(UNIX) && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)) process_still_running = FALSE; #endif /* @@ -3887,7 +3880,7 @@ findswapname ( name == NULL ? (char_u *)_("Swap file already exists!") : name, -# if defined(UNIX) || defined(__EMX__) || defined(VMS) +# if defined(UNIX) process_still_running ? (char_u *)_( "&Open Read-Only\n&Edit anyway\n&Recover\n&Quit\n&Abort") : @@ -3896,7 +3889,7 @@ findswapname ( "&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"), 1, NULL, FALSE); -# if defined(UNIX) || defined(__EMX__) || defined(VMS) +# if defined(UNIX) if (process_still_running && choice >= 4) choice++; /* Skip missing "Delete it" button */ # endif |