do_insertfile()
- Readd the NANO_SMALL #ifdef around the start_again: label to
avoid a warning. (DLR)
- - Simplify by reusing variables whereever possible. (DLR)
+ - Simplify by reusing variables whereever possible, and add a
+ parameter execute to indicate whether or not to be in "Execute
+ Command" mode. (DLR)
- global.c:
shortcut_init()
- Remove redundant NANO_SMALL #ifdef. (DLR)
- nanorc.sample:
- Remove specific references to control key shortcuts other than
XON and XOFF. (DLR)
+ - Add continue and goto to the "c-file" regexes. (DLR)
- doc/man/fr/nano.1, doc/man/fr/nanorc.1:
- Updated manpage translations by Jean-Philippe Guérard.
- Consolidate some if blocks to remove some redundant code.
(David Benbennick)
- Fix warnings when compiling with ENABLE_NLS undefined and with
- -the fwritable-strings option. (David Benbennick)
+ the fwritable-strings option. (David Benbennick)
- Add various #ifdefs to fix warnings and compilation problems
when compiling with every option manually turned on, including
NANO_SMALL. (David Benbennick)
# syntax "c-file" "\.(c|h)$"
# color red "\<[A-Z_]{2,}\>"
# color green "\<(float|double|char|int|short|long|enum|void|static|const|struct|union|typedef|extern|signed|unsigned|inline)\>"
-# color brightyellow "\<(for|if|while|do|else|case|switch|break)\>"
+# color brightyellow "\<(for|if|while|do|else|case|switch|goto|continue|break)\>"
# color brightcyan "^ *# *(define|undef|include|ifn?def|endif|elif|else|if)"
##
## You will in general want your comments and strings to come last,
load_file();
}
-void do_insertfile(void)
+void do_insertfile(
+#ifndef NANO_SMALL
+ bool execute
+#else
+ void
+#endif
+ )
{
int i;
const char *msg;
char *ans = mallocstrcpy(NULL, "");
/* The last answer the user typed on the statusbar. Saved for if
* they do M-F or cancel the file browser. */
-#ifndef NANO_SMALL
- bool extcmd = FALSE;
-#endif
wrap_reset();
#endif
#ifndef NANO_SMALL
- if (extcmd) {
+ if (execute) {
#ifdef ENABLE_MULTIBUFFER
if (ISSET(MULTIBUFFER))
msg = N_("Command to execute in new buffer [from %s] ");
i = statusq(TRUE,
#ifndef NANO_SMALL
- extcmd ? extcmd_list :
+ execute ? extcmd_list :
#endif
insertfile_list, ans,
#ifndef NANO_SMALL
#ifndef NANO_SMALL
if (i == NANO_TOOTHERINSERT_KEY) {
- extcmd = !extcmd;
+ execute = !execute;
goto start_again;
}
- if (extcmd)
+ if (execute)
execute_command(answer);
else {
#endif
statusbar(_("Key illegal in non-multibuffer mode"));
else
#endif
- do_insertfile();
+ do_insertfile(
+#ifndef NANO_SMALL
+ FALSE
+#endif
+ );
display_main_list();
}
} else
#endif /* !NANO_SMALL */
if (i == NANO_PREPEND_KEY) {
- append = append == 2 ? 0 : 2;
+ append = (append == 2) ? 0 : 2;
continue;
} else if (i == NANO_APPEND_KEY) {
- append = append == 1 ? 0 : 1;
+ append = (append == 1) ? 0 : 1;
continue;
}
void execute_command(const char *command);
#endif
void load_buffer(const char *name);
-void do_insertfile(void);
+void do_insertfile(
+#ifndef NANO_SMALL
+ bool execute
+#else
+ void
+#endif
+ );
void do_insertfile_void(void);
#ifdef ENABLE_MULTIBUFFER
openfilestruct *make_new_opennode(openfilestruct *prevnode);