annotate liboctave/util/action-container.cc @ 27919:1891570abac8

update Octave Project Developers copyright for the new year In files that have the "Octave Project Developers" copyright notice, update for 2020.
author John W. Eaton <jwe@octave.org>
date Mon, 06 Jan 2020 22:29:51 -0500
parents b442ec6dda5c
children bd51beb6205e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27338
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 /*
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2
27919
1891570abac8 update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 27918
diff changeset
3 Copyright (C) 1993-2020 The Octave Project Developers
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 27339
diff changeset
4
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 27339
diff changeset
5 See the file COPYRIGHT.md in the top-level directory of this distribution
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 27339
diff changeset
6 or <https://octave.org/COPYRIGHT.html/>.
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 27339
diff changeset
7
27338
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 This file is part of Octave.
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 Octave is free software: you can redistribute it and/or modify it
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
12 under the terms of the GNU General Public License as published by
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
13 the Free Software Foundation, either version 3 of the License, or
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 (at your option) any later version.
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
16 Octave is distributed in the hope that it will be useful, but
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
17 WITHOUT ANY WARRANTY; without even the implied warranty of
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
19 GNU General Public License for more details.
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
20
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
21 You should have received a copy of the GNU General Public License
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
22 along with Octave; see the file COPYING. If not, see
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
23 <https://www.gnu.org/licenses/>.
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
24
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25 */
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27 #include "action-container.h"
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28 #include "cmd-edit.h"
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
29
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
30 namespace octave
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
31 {
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
32 void action_container::run (size_t num)
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
33 {
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
34 if (num > size ())
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
35 num = size ();
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
36
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
37 for (size_t i = 0; i < num; i++)
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
38 {
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
39 run_first ();
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
40
27339
64289bf338da use separate variable for interrupting command editor event loop (bug #56738)
John W. Eaton <jwe@octave.org>
parents: 27338
diff changeset
41 // If event_loop_interrupted is TRUE, a user callback event has
27338
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
42 // requested that we break out of the readline event handler to
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
43 // process a command or other action.
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
44
27339
64289bf338da use separate variable for interrupting command editor event loop (bug #56738)
John W. Eaton <jwe@octave.org>
parents: 27338
diff changeset
45 if (command_editor::event_loop_interrupted ())
64289bf338da use separate variable for interrupting command editor event loop (bug #56738)
John W. Eaton <jwe@octave.org>
parents: 27338
diff changeset
46 {
64289bf338da use separate variable for interrupting command editor event loop (bug #56738)
John W. Eaton <jwe@octave.org>
parents: 27338
diff changeset
47 command_editor::interrupt_event_loop (false);
64289bf338da use separate variable for interrupting command editor event loop (bug #56738)
John W. Eaton <jwe@octave.org>
parents: 27338
diff changeset
48 break;
64289bf338da use separate variable for interrupting command editor event loop (bug #56738)
John W. Eaton <jwe@octave.org>
parents: 27338
diff changeset
49 }
27338
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
50 }
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
51 }
829d9efb7730 allow gui events to interrupt readline event processing (bug #56738)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
52 }