From 857bbe3ac143463bbac2bd4ff2e24cd871a1ca7d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 9 Sep 2015 20:59:01 -0700 Subject: C++: fix goto repl which skips initializations. * txr.c (txr_main): Move the labeled code to the end of the function, so it's not sitting in the scope of of names whose initialization is skipped. This is a better organization: thank you, C++. --- txr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/txr.c b/txr.c index a7777c1f..5c4e7a56 100644 --- a/txr.c +++ b/txr.c @@ -757,11 +757,11 @@ int txr_main(int argc, char **argv) if (!enter_repl) return result ? 0 : EXIT_FAILURE; + } repl: #if HAVE_TERMIOS - repl(bindings, std_input, std_output); + repl(bindings, std_input, std_output); #endif - return 0; - } + return 0; } -- cgit v1.2.3