Mercurial > hg > octave-lojdl
changeset 4802:b3f20980be32
[project @ 2004-02-25 05:14:19 by jwe]
author | jwe |
---|---|
date | Wed, 25 Feb 2004 05:14:19 +0000 |
parents | b022780ac0b4 |
children | 62a606d49393 |
files | liboctave/ChangeLog liboctave/cmd-edit.h liboctave/cmd-hist.cc liboctave/cmd-hist.h liboctave/oct-rl-edit.c liboctave/oct-rl-edit.h src/ChangeLog src/input.cc |
diffstat | 8 files changed, 36 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,5 +1,16 @@ 2004-02-24 John W. Eaton <jwe@bevo.che.wisc.edu> + * oct-rl-edit.c (octave_rl_set_startup_hook, + octave_rl_get_startup_hook, octave_rl_set_event_hook, + octave_rl_get_event_hook): Omit casts. + * oct-rl-edit.h (rl_startup_hook_fcn_ptr, rl_event_hook_fcn_ptr): + Return value for function pointer typedef is now int. + * cmd-edit.h (command_editor::startup_hook_fcn, + command_editor::event_hook_fcn): Likewise. + * cmd-hist.cc, cmd-hist.h (command_history::goto_mark, + command_history::do_goto_mark, gnu_history::do_goto_mark): + Return type is now int. Return 0. + * EIG.cc (EIG::init, EIG::symmetric_init): Query Lapack for workspace size.
--- a/liboctave/cmd-edit.h +++ b/liboctave/cmd-edit.h @@ -39,9 +39,9 @@ public: - typedef void (*startup_hook_fcn) (void); + typedef int (*startup_hook_fcn) (void); - typedef void (*event_hook_fcn) (void); + typedef int (*event_hook_fcn) (void); typedef std::string (*completion_fcn) (const std::string&, int);
--- a/liboctave/cmd-hist.cc +++ b/liboctave/cmd-hist.cc @@ -87,7 +87,7 @@ void do_set_mark (int); - void do_goto_mark (void); + int do_goto_mark (void); void do_read (const std::string&, bool); @@ -187,7 +187,7 @@ mark = n; } -void +int gnu_history::do_goto_mark (void) { if (mark) @@ -206,6 +206,8 @@ // XXX FIXME XXX -- for operate_and_get_next. command_editor::restore_startup_hook (); + + return 0; } void @@ -528,11 +530,11 @@ instance->do_set_mark (n); } -void +int command_history::goto_mark (void) { - if (instance_ok ()) - instance->do_goto_mark (); + return (instance_ok ()) + ? instance->do_goto_mark () : 0; } void @@ -709,9 +711,10 @@ { } -void +int command_history::do_goto_mark (void) { + return 0; } void
--- a/liboctave/cmd-hist.h +++ b/liboctave/cmd-hist.h @@ -77,7 +77,7 @@ // Gag. This declaration has to match the Function typedef in // readline.h. - static void goto_mark (void); + static int goto_mark (void); static void read (bool = true); @@ -157,7 +157,7 @@ virtual void do_set_mark (int); - virtual void do_goto_mark (void); + virtual int do_goto_mark (void); virtual void do_read (const std::string&, bool);
--- a/liboctave/oct-rl-edit.c +++ b/liboctave/oct-rl-edit.c @@ -239,27 +239,25 @@ void octave_rl_set_startup_hook (rl_startup_hook_fcn_ptr f) { - void **fp = (void **) (&rl_startup_hook); - *fp = (void *) f; + rl_startup_hook = f; } rl_startup_hook_fcn_ptr octave_rl_get_startup_hook (void) { - return (rl_startup_hook_fcn_ptr) rl_startup_hook; + return rl_startup_hook; } void octave_rl_set_event_hook (rl_event_hook_fcn_ptr f) { - void **fp = (void **) (&rl_event_hook); - *fp = (void *) f; + rl_event_hook = f; } rl_event_hook_fcn_ptr octave_rl_get_event_hook (void) { - return (rl_event_hook_fcn_ptr) rl_event_hook; + return rl_event_hook; } char **
--- a/liboctave/oct-rl-edit.h +++ b/liboctave/oct-rl-edit.h @@ -23,9 +23,9 @@ #if !defined (octave_rl_edit_h) #define octave_rl_edit_h 1 -typedef void (*rl_startup_hook_fcn_ptr) (void); +typedef int (*rl_startup_hook_fcn_ptr) (void); -typedef void (*rl_event_hook_fcn_ptr) (void); +typedef int (*rl_event_hook_fcn_ptr) (void); typedef int (*rl_fcn_ptr) (int, int);
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2004-02-24 John W. Eaton <jwe@bevo.che.wisc.edu> + * input.cc (input_event_hook): Return type is now int. Return 0. + * file-io.cc (do_stream_open): Don't call ::error if stream can't be created. Don't call ::fopen if arch is invalid. Set error state for stream if fopen fails.
--- a/src/input.cc +++ b/src/input.cc @@ -949,7 +949,7 @@ static std::string hook_fcn; static octave_value user_data; -static void +static int input_event_hook (void) { if (is_valid_function (hook_fcn)) @@ -965,7 +965,9 @@ user_data = octave_value (); command_editor::set_event_hook (0); - } + } + + return 0; } DEFUN (input_event_hook, args, ,