Mercurial > hg > octave-lojdl
changeset 16552:8fc1f6535380
new function, __octave_link_enabled__
* octave-link.h (octave_link::enabled): Now public.
(F__octave_link_enabled__): New function.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 22 Apr 2013 15:07:21 -0400 |
parents | 6ae555fc8c43 |
children | 2ed5bc680c71 03a28487fa9d |
files | libinterp/interpfcn/octave-link.cc libinterp/interpfcn/octave-link.h |
diffstat | 2 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/interpfcn/octave-link.cc +++ b/libinterp/interpfcn/octave-link.cc @@ -102,6 +102,15 @@ event_queue_mutex->unlock (); } +DEFUN (__octave_link_enabled__, , , + "-*- texinfo -*-\n\ +@deftypefn {Built-in Function} {} __octave_link_enabled__ ()\n\ +Undocumented internal function.\n\ +@end deftypefn") +{ + return octave_value (octave_link::enabled ()); +} + DEFUN (__octave_link_edit_file__, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} __octave_link_edit_file__ (@var{file})\n\
--- a/libinterp/interpfcn/octave-link.h +++ b/libinterp/interpfcn/octave-link.h @@ -280,6 +280,11 @@ instance->do_set_default_prompts (ps1, ps2, ps4); } + static bool enabled (void) + { + return instance_ok () ? instance->link_enabled : false; + } + private: static octave_link *instance; @@ -292,11 +297,6 @@ static bool instance_ok (void) { return instance != 0; } - static bool enabled (void) - { - return instance_ok () ? instance->link_enabled : false; - } - protected: // Semaphore to lock access to the event queue.