build: exclude the ability to open a FIFO from the tiny version
parent
f6e182ca72
commit
d972c17050
11
src/files.c
11
src/files.c
|
@ -442,6 +442,13 @@ bool open_buffer(const char *filename, bool new_buffer)
|
||||||
free(realname);
|
free(realname);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
#ifdef NANO_TINY
|
||||||
|
if (S_ISFIFO(fileinfo.st_mode)) {
|
||||||
|
statusline(ALERT, _("\"%s\" is a FIFO"), realname);
|
||||||
|
free(realname);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we're going to load into a new buffer, first create the new
|
/* If we're going to load into a new buffer, first create the new
|
||||||
|
@ -933,10 +940,10 @@ int open_file(const char *filename, bool newfie, FILE **f)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NANO_TINY
|
||||||
if (S_ISFIFO(fileinfo.st_mode))
|
if (S_ISFIFO(fileinfo.st_mode))
|
||||||
statusbar(_("Reading from FIFO..."));
|
statusbar(_("Reading from FIFO..."));
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
|
||||||
block_sigwinch(TRUE);
|
block_sigwinch(TRUE);
|
||||||
install_handler_for_Ctrl_C();
|
install_handler_for_Ctrl_C();
|
||||||
#endif
|
#endif
|
||||||
|
@ -1800,10 +1807,10 @@ bool write_file(const char *name, FILE *f_open, bool tmp,
|
||||||
goto cleanup_and_exit;
|
goto cleanup_and_exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* !NANO_TINY */
|
|
||||||
|
|
||||||
if (stat(realname, &st) == 0 && S_ISFIFO(st.st_mode))
|
if (stat(realname, &st) == 0 && S_ISFIFO(st.st_mode))
|
||||||
statusbar(_("Writing to FIFO..."));
|
statusbar(_("Writing to FIFO..."));
|
||||||
|
#endif /* !NANO_TINY */
|
||||||
|
|
||||||
if (f_open == NULL) {
|
if (f_open == NULL) {
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
|
|
Loading…
Reference in New Issue