poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Set the poke_interactive_p predicate before anything which might


From: John Darrington
Subject: [PATCH] Set the poke_interactive_p predicate before anything which might need to test it.
Date: Sat, 29 Feb 2020 10:59:01 +0100

---
 ChangeLog  | 6 ++++++
 src/poke.c | 6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ad0e4d0f..c3d305ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-02-29  John Darrington <address@hidden>
+
+       * src/poke.c (parse_args): Move assignment of poke_interactive_p
+       to a position *before* anything which might be interested
+       in reading it.
+
 2020-02-23  John Darrington <address@hidden>
 
        * src/pk-cmd.c (pk_cmd_exec_1)[case 'f']: Remove a lot
diff --git a/src/poke.c b/src/poke.c
index 3f86e264..48f5055c 100644
--- a/src/poke.c
+++ b/src/poke.c
@@ -267,19 +267,19 @@ parse_args (int argc, char *argv[])
         case 'c':
         case CMD_ARG:
           {
+            poke_interactive_p = 0;
             int ret = pk_cmd_exec (optarg);
             if (!ret)
               goto exit_failure;
-            poke_interactive_p = 0;
             break;
           }
         case 's':
         case SCRIPT_ARG:
           {
+            poke_interactive_p = 0;
             int ret = pk_cmd_exec_script (optarg);
             if (!ret)
               goto exit_failure;
-            poke_interactive_p = 0;
             break;
           }
           /* -L is handled below.  */
@@ -322,9 +322,9 @@ parse_args (int argc, char *argv[])
       switch (c)
         {
         case 'L':
+          poke_interactive_p = 0;
           if (!pkl_compile_file (poke_compiler, optarg))
             goto exit_success;
-          poke_interactive_p = 0;
           break;
         default:
           break;
-- 
2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]