add minor cosmetic fixes, and do another int -> bool conversion
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1961 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
f1c395da79
Коммит
951d7148d1
15
src/files.c
15
src/files.c
@ -538,7 +538,9 @@ void do_insertfile(
|
|||||||
#endif
|
#endif
|
||||||
"./");
|
"./");
|
||||||
|
|
||||||
if (i != -1) {
|
if (i < 0) {
|
||||||
|
statusbar(_("Cancelled"));
|
||||||
|
} else {
|
||||||
int old_current_x = current_x;
|
int old_current_x = current_x;
|
||||||
|
|
||||||
ans = mallocstrcpy(ans, answer);
|
ans = mallocstrcpy(ans, answer);
|
||||||
@ -599,8 +601,7 @@ void do_insertfile(
|
|||||||
|
|
||||||
/* Refresh the screen. */
|
/* Refresh the screen. */
|
||||||
edit_refresh();
|
edit_refresh();
|
||||||
} else
|
}
|
||||||
statusbar(_("Cancelled"));
|
|
||||||
|
|
||||||
free(ans);
|
free(ans);
|
||||||
}
|
}
|
||||||
@ -1395,10 +1396,8 @@ int write_file(const char *name, int tmp, int append, int nonamechange)
|
|||||||
/* The temp file name we write to on prepend. */
|
/* The temp file name we write to on prepend. */
|
||||||
|
|
||||||
assert(name != NULL);
|
assert(name != NULL);
|
||||||
if (name[0] == '\0') {
|
if (name[0] == '\0')
|
||||||
statusbar(_("Cancelled"));
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
titlebar(NULL);
|
titlebar(NULL);
|
||||||
|
|
||||||
@ -1765,7 +1764,7 @@ int write_marked(const char *name, int tmp, int append)
|
|||||||
}
|
}
|
||||||
#endif /* !NANO_SMALL */
|
#endif /* !NANO_SMALL */
|
||||||
|
|
||||||
int do_writeout(int exiting)
|
int do_writeout(bool exiting)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int append = 0;
|
int append = 0;
|
||||||
@ -1844,7 +1843,7 @@ int do_writeout(int exiting)
|
|||||||
free(ans);
|
free(ans);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (i == -1) {
|
if (i < 0) {
|
||||||
statusbar(_("Cancelled"));
|
statusbar(_("Cancelled"));
|
||||||
display_main_list();
|
display_main_list();
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -173,7 +173,7 @@ void die_save_file(const char *die_filename)
|
|||||||
|
|
||||||
ret = get_next_filename(die_filename);
|
ret = get_next_filename(die_filename);
|
||||||
if (ret[0] != '\0')
|
if (ret[0] != '\0')
|
||||||
failed = -1 == write_file(ret, TRUE, FALSE, TRUE);
|
failed = (write_file(ret, TRUE, FALSE, TRUE) == -1);
|
||||||
|
|
||||||
if (!failed)
|
if (!failed)
|
||||||
fprintf(stderr, _("\nBuffer written to %s\n"), ret);
|
fprintf(stderr, _("\nBuffer written to %s\n"), ret);
|
||||||
|
@ -217,7 +217,7 @@ int write_file(const char *name, int tmp, int append, int nonamechange);
|
|||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
int write_marked(const char *name, int tmp, int append);
|
int write_marked(const char *name, int tmp, int append);
|
||||||
#endif
|
#endif
|
||||||
int do_writeout(int exiting);
|
int do_writeout(bool exiting);
|
||||||
void do_writeout_void(void);
|
void do_writeout_void(void);
|
||||||
char *real_dir_from_tilde(const char *buf);
|
char *real_dir_from_tilde(const char *buf);
|
||||||
#ifndef DISABLE_TABCOMP
|
#ifndef DISABLE_TABCOMP
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user