diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ex_cmds.c | 2 | ||||
| -rw-r--r-- | src/fileio.c | 11 | ||||
| -rw-r--r-- | src/fileio.h | 3 | ||||
| -rw-r--r-- | src/memline.c | 11 | 
4 files changed, 9 insertions, 18 deletions
| diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 77523a043f..57584fb37d 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -1569,7 +1569,7 @@ void write_viminfo(char_u *file, int forceit)  #endif      // Make tempname -    tempname = buf_modname(FALSE, fname, (char_u *)".tmp", FALSE); +    tempname = buf_modname(fname, (char_u *)".tmp", FALSE);      if (tempname != NULL) {        /*         * Check if tempfile already exists.  Never overwrite an diff --git a/src/fileio.c b/src/fileio.c index 39fd97e21d..0296f65608 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3039,7 +3039,7 @@ buf_write (            /*             * Make backup file name.             */ -          backup = buf_modname(FALSE, rootname, backup_ext, FALSE); +          backup = buf_modname(rootname, backup_ext, FALSE);            if (backup == NULL) {              vim_free(rootname);              some_error = TRUE;                          /* out of memory */ @@ -3215,7 +3215,7 @@ nobackup:          if (rootname == NULL)            backup = NULL;          else { -          backup = buf_modname(FALSE, rootname, backup_ext, FALSE); +          backup = buf_modname(rootname, backup_ext, FALSE);            vim_free(rootname);          } @@ -3852,7 +3852,7 @@ restore_backup:     * the backup file our 'original' file.     */    if (*p_pm && dobackup) { -    char *org = (char *)buf_modname(FALSE, fname, p_pm, FALSE); +    char *org = (char *)buf_modname(fname, p_pm, FALSE);      if (backup != NULL) {        struct stat st; @@ -4644,12 +4644,11 @@ modname (      int prepend_dot                /* may prepend a '.' to file name */  )  { -  return buf_modname(FALSE, fname, ext, prepend_dot); +  return buf_modname(fname, ext, prepend_dot);  }  char_u *  buf_modname ( -    int shortname,           // use 8.3 file name, should always be FALSE now      char_u *fname,      char_u *ext,      int prepend_dot                /* may prepend a '.' to file name */ @@ -4663,8 +4662,6 @@ buf_modname (    extlen = (int)STRLEN(ext); -  assert(!shortname); -    /*     * If there is no file name we must get the name of the current directory     * (we need the full path in case :cd is used). diff --git a/src/fileio.h b/src/fileio.h index 301d951bdf..ce6e649b10 100644 --- a/src/fileio.h +++ b/src/fileio.h @@ -35,8 +35,7 @@ void msg_add_fname(buf_T *buf, char_u *fname);  void msg_add_lines(int insert_space, long lnum, off_t nchars);  void shorten_fnames(int force);  char_u *modname(char_u *fname, char_u *ext, int prepend_dot); -char_u *buf_modname(int shortname, char_u *fname, char_u *ext, -                    int prepend_dot); +char_u *buf_modname(char_u *fname, char_u *ext, int prepend_dot);  int vim_fgets(char_u *buf, int size, FILE *fp);  int tag_fgets(char_u *buf, int size, FILE *fp);  int vim_rename(char_u *from, char_u *to); diff --git a/src/memline.c b/src/memline.c index 0978e10cc1..38b68344b9 100644 --- a/src/memline.c +++ b/src/memline.c @@ -3371,14 +3371,9 @@ char_u *makeswapname(char_u *fname, char_u *ffname, buf_T *buf, char_u *dir_name      fname_res = fname_buf;  #endif -  r = buf_modname( -      FALSE, -      fname_res, -      (char_u *) -      ".swp", -      /* Prepend a '.' to the swap file name for the current directory. */ -      dir_name[0] == '.' && dir_name[1] == NUL -      ); +  // Prepend a '.' to the swap file name for the current directory. +  r = buf_modname(fname_res, (char_u *)".swp", +                  dir_name[0] == '.' && dir_name[1] == NUL);    if (r == NULL)            /* out of memory */      return NULL; | 
