diff options
Diffstat (limited to 'apps/nshlib/nsh_script.c')
-rw-r--r-- | apps/nshlib/nsh_script.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/nshlib/nsh_script.c b/apps/nshlib/nsh_script.c index e5c1958a1..b115dc8fb 100644 --- a/apps/nshlib/nsh_script.c +++ b/apps/nshlib/nsh_script.c @@ -129,10 +129,11 @@ int nsh_script(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, do { - /* Get the next line of input from the file */ + /* Flush any output generated by the previous line */ fflush(stdout); +#ifndef CONFIG_NSH_DISABLE_LOOPS /* Get the current file position. This is used to control * looping. If a loop begins in the next line, then this file * offset will be needed to locate the top of the loop in the @@ -146,6 +147,7 @@ int nsh_script(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, { nsh_output(vtbl, g_fmtcmdfailed, "loop", "ftell", NSH_ERRNO); } +#endif /* Now read the next line from the script file */ |