Remove the always-FALSE shortname argument from buf_modname()

This commit is contained in:
Felipe Oliveira Carvalho 2014-04-27 22:13:24 -03:00 committed by Thiago de Arruda
parent 89e07185e9
commit 9b56e3a4cc
4 changed files with 9 additions and 18 deletions

View File

@ -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

View File

@ -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).

View File

@ -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);

View File

@ -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;