#endif
"./");
- if (i != -1) {
+ if (i < 0) {
+ statusbar(_("Cancelled"));
+ } else {
int old_current_x = current_x;
ans = mallocstrcpy(ans, answer);
/* Refresh the screen. */
edit_refresh();
- } else
- statusbar(_("Cancelled"));
+ }
free(ans);
}
/* The temp file name we write to on prepend. */
assert(name != NULL);
- if (name[0] == '\0') {
- statusbar(_("Cancelled"));
+ if (name[0] == '\0')
return -1;
- }
if (!tmp)
titlebar(NULL);
}
#endif /* !NANO_SMALL */
-int do_writeout(int exiting)
+int do_writeout(bool exiting)
{
int i;
int append = 0;
free(ans);
#endif
- if (i == -1) {
+ if (i < 0) {
statusbar(_("Cancelled"));
display_main_list();
return -1;
ret = get_next_filename(die_filename);
if (ret[0] != '\0')
- failed = -1 == write_file(ret, TRUE, FALSE, TRUE);
+ failed = (write_file(ret, TRUE, FALSE, TRUE) == -1);
if (!failed)
fprintf(stderr, _("\nBuffer written to %s\n"), ret);
#ifndef NANO_SMALL
int write_marked(const char *name, int tmp, int append);
#endif
-int do_writeout(int exiting);
+int do_writeout(bool exiting);
void do_writeout_void(void);
char *real_dir_from_tilde(const char *buf);
#ifndef DISABLE_TABCOMP