# HG changeset patch # User Mike Miller # Date 1373948266 14400 # Node ID aabe12e5fdc1fc6ab88845507e41d54438d76d6b # Parent df66488b8d438b4271a4564a56d69bc60fd7820b Allow exit/quit to properly pass all possible exit status values * toplev.cc (main_loop): Return zero when the parser returns EOF. (clean_up_and_exit): Remove special-case handling of EOF exit status. diff -r df66488b8d43 -r aabe12e5fdc1 libinterp/corefcn/toplev.cc --- a/libinterp/corefcn/toplev.cc Sun Jul 14 16:00:26 2013 -0700 +++ b/libinterp/corefcn/toplev.cc Tue Jul 16 00:17:46 2013 -0400 @@ -634,6 +634,9 @@ } while (retval == 0); + if (retval == EOF) + retval = 0; + return retval; } @@ -751,7 +754,7 @@ else { if (octave_exit) - (*octave_exit) (retval == EOF ? 0 : retval); + (*octave_exit) (retval); } }