mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-27 04:39:45 +03:00
Fixing compilation with --enable-tiny: file formats don't exist then.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5349 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
90798fbfba
commit
eac0446c86
@ -3,6 +3,9 @@
|
||||
src/winio.c (display_string, statusbar): Allow toggling the display
|
||||
of whitespace also when support for nanorc files was not built in,
|
||||
because the default values are quite usable.
|
||||
* src/files.c (read_file), src/rcfile.c, src/nano.c (main, usage):
|
||||
Fix compilation with --enable-tiny; file formats are not available
|
||||
then, so option --unix has no place; also add its description.
|
||||
|
||||
2015-08-08 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/winio.c (display_string): For some reason the reallocation done
|
||||
|
@ -909,8 +909,10 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable, bool checkw
|
||||
"Read %lu lines (Warning: No write permission)",
|
||||
(unsigned long)num_lines), (unsigned long)num_lines);
|
||||
|
||||
#ifndef NANO_TINY
|
||||
if (ISSET(MAKE_IT_UNIX))
|
||||
openfile->fmt = NIX_FILE;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Open the file (and decide if it exists). If newfie is TRUE, display
|
||||
|
@ -954,6 +954,9 @@ void usage(void)
|
||||
N_("Enable alternate speller"));
|
||||
#endif
|
||||
print_opt("-t", "--tempfile", N_("Auto save on exit, don't prompt"));
|
||||
#ifndef NANO_TINY
|
||||
print_opt("-u", "--unix", N_("Save a file by default in Unix format"));
|
||||
#endif
|
||||
print_opt("-v", "--view", N_("View mode (read-only)"));
|
||||
#ifndef DISABLE_WRAPPING
|
||||
print_opt("-w", "--nowrap", N_("Don't hard-wrap long lines"));
|
||||
@ -2166,7 +2169,6 @@ int main(int argc, char **argv)
|
||||
{"speller", 1, NULL, 's'},
|
||||
#endif
|
||||
{"tempfile", 0, NULL, 't'},
|
||||
{"unix", 0, NULL, 'u'},
|
||||
{"view", 0, NULL, 'v'},
|
||||
#ifndef DISABLE_WRAPPING
|
||||
{"nowrap", 0, NULL, 'w'},
|
||||
@ -2188,6 +2190,7 @@ int main(int argc, char **argv)
|
||||
{"wordbounds", 0, NULL, 'W'},
|
||||
{"autoindent", 0, NULL, 'i'},
|
||||
{"cut", 0, NULL, 'k'},
|
||||
{"unix", 0, NULL, 'u'},
|
||||
{"softwrap", 0, NULL, '$'},
|
||||
#endif
|
||||
{NULL, 0, NULL, 0}
|
||||
@ -2401,9 +2404,11 @@ int main(int argc, char **argv)
|
||||
case 't':
|
||||
SET(TEMP_FILE);
|
||||
break;
|
||||
#ifndef NANO_TINY
|
||||
case 'u':
|
||||
SET(MAKE_IT_UNIX);
|
||||
break;
|
||||
#endif
|
||||
case 'v':
|
||||
SET(VIEW_MODE);
|
||||
break;
|
||||
|
@ -82,7 +82,6 @@ static const rcoption rcopts[] = {
|
||||
{"suspend", SUSPEND},
|
||||
{"tabsize", 0},
|
||||
{"tempfile", TEMP_FILE},
|
||||
{"unix", MAKE_IT_UNIX},
|
||||
{"view", VIEW_MODE},
|
||||
#ifndef NANO_TINY
|
||||
{"allow_insecure_backup", INSECURE_BACKUP},
|
||||
@ -101,6 +100,7 @@ static const rcoption rcopts[] = {
|
||||
{"smooth", SMOOTH_SCROLL},
|
||||
{"softwrap", SOFTWRAP},
|
||||
{"tabstospaces", TABS_TO_SPACES},
|
||||
{"unix", MAKE_IT_UNIX},
|
||||
{"whitespace", 0},
|
||||
{"wordbounds", WORD_BOUNDS},
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user