cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2568 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
527f1743f6
Коммит
0998a64fb9
@ -1370,7 +1370,7 @@ int write_file(const char *name, bool tmp, int append, bool
|
||||
|
||||
anyexists = (lstat(realname, &lst) != -1);
|
||||
|
||||
/* New case: if the file exists, just give up. */
|
||||
/* If the temp file exists, give up. */
|
||||
if (tmp && anyexists)
|
||||
goto cleanup_and_exit;
|
||||
|
||||
@ -1395,7 +1395,6 @@ int write_file(const char *name, bool tmp, int append, bool
|
||||
if (ISSET(BACKUP_FILE) && !tmp && realexists &&
|
||||
(append != 0 || ISSET(MARK_ISSET) ||
|
||||
originalfilestat.st_mtime == st.st_mtime)) {
|
||||
|
||||
FILE *backup_file;
|
||||
char *backupname;
|
||||
struct utimbuf filetime;
|
||||
@ -1568,7 +1567,7 @@ int write_file(const char *name, bool tmp, int append, bool
|
||||
}
|
||||
|
||||
/* Now open the file in place. Use O_EXCL if tmp is TRUE. This is
|
||||
* now copied from joe, because wiggy says so *shrug*. */
|
||||
* copied from joe, because wiggy says so *shrug*. */
|
||||
fd = open(realname, O_WRONLY | O_CREAT |
|
||||
((append == 1) ? O_APPEND : (tmp ? O_EXCL : O_TRUNC)),
|
||||
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
|
||||
|
@ -2125,7 +2125,7 @@ const char *do_int_speller(const char *tempfile_name)
|
||||
|
||||
}
|
||||
|
||||
*read_buff_ptr = (char)NULL;
|
||||
*read_buff_ptr = '\0';
|
||||
close(uniq_fd[0]);
|
||||
|
||||
/* Process the spelling errors. */
|
||||
@ -2134,7 +2134,7 @@ const char *do_int_speller(const char *tempfile_name)
|
||||
while (*read_buff_ptr != '\0') {
|
||||
|
||||
if ((*read_buff_ptr == '\n') || (*read_buff_ptr == '\r')) {
|
||||
*read_buff_ptr = (char)NULL;
|
||||
*read_buff_ptr = '\0';
|
||||
if (read_buff_word != read_buff_ptr) {
|
||||
if (!do_int_spell_fix(read_buff_word)) {
|
||||
read_buff_word = read_buff_ptr;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user