tweaks: reshuffle some lines, to put things in order of option name

master
Benno Schulenberg 2018-09-30 10:33:43 +02:00
parent 5ca444e5df
commit 2ee2407e63
1 changed files with 12 additions and 12 deletions

View File

@ -2318,9 +2318,6 @@ int main(int argc, char **argv)
#ifdef ENABLE_NANORC
if (!no_rcfiles) {
/* Back up the command-line options, then read the rcfile(s). */
#ifdef ENABLE_OPERATINGDIR
char *operating_dir_cpy = operating_dir;
#endif
#ifdef ENABLED_WRAPORJUSTIFY
ssize_t fill_cpy = fill;
#endif
@ -2328,6 +2325,9 @@ int main(int argc, char **argv)
char *backup_dir_cpy = backup_dir;
char *word_chars_cpy = word_chars;
#endif
#ifdef ENABLE_OPERATINGDIR
char *operating_dir_cpy = operating_dir;
#endif
#ifdef ENABLE_JUSTIFY
char *quotestr_cpy = quotestr;
#endif
@ -2340,13 +2340,13 @@ int main(int argc, char **argv)
memcpy(flags_cpy, flags, sizeof(flags_cpy));
#ifdef ENABLE_OPERATINGDIR
operating_dir = NULL;
#endif
#ifndef NANO_TINY
backup_dir = NULL;
word_chars = NULL;
#endif
#ifdef ENABLE_OPERATINGDIR
operating_dir = NULL;
#endif
#ifdef ENABLE_JUSTIFY
quotestr = NULL;
#endif
@ -2362,12 +2362,6 @@ int main(int argc, char **argv)
#endif
/* If the backed-up command-line options have a value, restore them. */
#ifdef ENABLE_OPERATINGDIR
if (operating_dir_cpy != NULL || ISSET(RESTRICTED)) {
free(operating_dir);
operating_dir = operating_dir_cpy;
}
#endif
#ifdef ENABLED_WRAPORJUSTIFY
if (fill_used)
fill = fill_cpy;
@ -2382,6 +2376,12 @@ int main(int argc, char **argv)
word_chars = word_chars_cpy;
}
#endif
#ifdef ENABLE_OPERATINGDIR
if (operating_dir_cpy != NULL || ISSET(RESTRICTED)) {
free(operating_dir);
operating_dir = operating_dir_cpy;
}
#endif
#ifdef ENABLE_JUSTIFY
if (quotestr_cpy != NULL) {
free(quotestr);