Mercurial > hg > octave-terminal
changeset 3951:e6f67a1ed814
[project @ 2002-05-23 03:41:25 by jwe]
author | jwe |
---|---|
date | Thu, 23 May 2002 03:41:25 +0000 |
parents | 9be12c29c7d5 |
children | 945e8c160191 |
files | libcruft/ChangeLog libcruft/ordered-qz/dsubsp.f liboctave/ChangeLog liboctave/cmd-edit.cc src/ChangeLog src/c-file-ptr-stream.h src/oct-prcstrm.cc src/oct-stdstrm.h |
diffstat | 8 files changed, 63 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/libcruft/ChangeLog +++ b/libcruft/ChangeLog @@ -1,5 +1,7 @@ 2002-05-22 John W. Eaton <jwe@bevo.che.wisc.edu> + * ordered-qz/dsubsp.f (DSUBSP): Delete decl for unused variable J. + * misc/f77-fcn.c (xstopx): Return type is void, not volatile void. * misc/f77-fcn.h (xstopx): Provide decl. Add special gcc noreturn attribute here.
--- a/libcruft/ordered-qz/dsubsp.f +++ b/libcruft/ordered-qz/dsubsp.f @@ -35,7 +35,7 @@ C* *IND AN INTEGER WORKING ARRAY OF DIMENSION AT LEAST N C* INTEGER L, LS, LS1, LS2, L1, LL, NUM, IS, L2I, L2K, I, K, II, - * ISTEP, IFIRST, J + * ISTEP, IFIRST DOUBLE PRECISION S, P, D, ALPHA, BETA FAIL = .TRUE. NDIM = 0
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,10 @@ +2002-05-22 John W. Eaton <jwe@bevo.che.wisc.edu> + + * cmd-edit.cc (gnu_readline::history_search_backward): New function. + (gnu_readline::history_search_forward): Likewise. + (gnu_readline::gnu_readline): Use them instead of passing pointers + to extern "C" functions to octave_rl_ad_defun. + 2002-05-22 Mumit Khan <khan@nanotech.wisc.edu> * DASPK.cc (ddaspk_psol): Return value.
--- a/liboctave/cmd-edit.cc +++ b/liboctave/cmd-edit.cc @@ -123,6 +123,10 @@ static int operate_and_get_next (int, int); + static int history_search_backward (int, int); + + static int history_search_forward (int, int); + private: startup_hook_fcn previous_startup_hook; @@ -160,11 +164,11 @@ /* And the history search functions. */ octave_rl_add_defun ("history-search-backward", - octave_rl_history_search_backward, + gnu_readline::history_search_backward, octave_rl_meta ('P')); octave_rl_add_defun ("history-search-forward", - octave_rl_history_search_forward, + gnu_readline::history_search_forward, octave_rl_meta ('N')); } @@ -391,6 +395,18 @@ return 0; } +int +gnu_readline::history_search_backward (int count, int c) +{ + return octave_rl_history_search_backward (count, c); +} + +int +gnu_readline::history_search_forward (int count, int c) +{ + return octave_rl_history_search_forward (count, c); +} + char * gnu_readline::command_generator (const char *text, int state) {
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,21 @@ 2002-05-22 John W. Eaton <jwe@bevo.che.wisc.edu> + * c-file-ptr-stream.h (c_file_ptr_buf::fclose): New function. + (c_file_ptr_buf::c_file_ptr_buf): Use it as default argument + instead of extern "C" fclose function. + (i_c_file_ptr_stream::i_c_file_ptr_stream): Likewise. + (o_c_file_ptr_stream::o_c_file_ptr_stream): Likewise. + * oct-stdstrm.h (octave_istdiostream::octave_istdiostream): Likewise. + (octave_istdiostream::create): Likewise. + * oct-stdstrm.h (octave_ostdiostream::octave_ostdiostream): Likewise. + (octave_ostdiostream::create): Likewise. + + * oct-prcstrm.cc (cxx_pclose): New static function. + (octave_iprocstream::octave_iprocstream): Pass it to + octave_istdiostream constructor instead of extern "C" pclose function. + (octave_oprocstream::octave_oprocstream): Pass it to + octave_ostdiostream constructor instead of extern "C" pclose function. + * debug.cc (Fdbtype): Use C++ strings, not C strings. 2002-05-22 Mumit Khan <khan@nanotech.wisc.edu>
--- a/src/c-file-ptr-stream.h +++ b/src/c-file-ptr-stream.h @@ -68,7 +68,7 @@ FILE* stdiofile (void) const { return f; } - c_file_ptr_buf (FILE *f_arg, close_fcn cf_arg = ::fclose) + c_file_ptr_buf (FILE *f_arg, close_fcn cf_arg = fclose) : #if defined __GNUC__ && __GNUC__ >= 3 OCTAVE_STD_FILEBUF (f_arg, std::ios::in | std::ios::out), @@ -107,6 +107,8 @@ int file_number () const { return fd; } + static int fclose (FILE *f) { return ::fclose (f); } + protected: FILE *f; @@ -125,7 +127,8 @@ { public: - i_c_file_ptr_stream (FILE* f, c_file_ptr_buf::close_fcn cf = ::fclose) + i_c_file_ptr_stream (FILE* f, + c_file_ptr_buf::close_fcn cf = c_file_ptr_buf::fclose) : std::istream (0), buf (new c_file_ptr_buf (f, cf)) { init (buf); } ~i_c_file_ptr_stream (void) { delete buf; buf = 0; } @@ -144,7 +147,8 @@ { public: - o_c_file_ptr_stream (FILE* f, c_file_ptr_buf::close_fcn cf = ::fclose) + o_c_file_ptr_stream (FILE* f, + c_file_ptr_buf::close_fcn cf = c_file_ptr_buf::fclose) : std::ostream (0), buf (new c_file_ptr_buf (f, cf)) { init (buf); } ~o_c_file_ptr_stream (void) { delete buf; buf = 0; }
--- a/src/oct-prcstrm.cc +++ b/src/oct-prcstrm.cc @@ -28,6 +28,12 @@ #include "oct-prcstrm.h" +static int +cxx_pclose (FILE *f) +{ + return ::pclose (f); +} + octave_stream octave_iprocstream::create (const std::string& n, std::ios::openmode arg_md, oct_mach_info::float_format flt_fmt) @@ -38,7 +44,7 @@ octave_iprocstream::octave_iprocstream (const std::string& n, std::ios::openmode arg_md, oct_mach_info::float_format flt_fmt) - : octave_istdiostream (n, ::popen (n.c_str (), "r"), ::pclose, + : octave_istdiostream (n, ::popen (n.c_str (), "r"), cxx_pclose, arg_md, flt_fmt) { } @@ -58,7 +64,7 @@ octave_oprocstream::octave_oprocstream (const std::string& n, std::ios::openmode arg_md, oct_mach_info::float_format flt_fmt) - : octave_ostdiostream (n, ::popen (n.c_str (), "w"), ::pclose, + : octave_ostdiostream (n, ::popen (n.c_str (), "w"), cxx_pclose, arg_md, flt_fmt) { }
--- a/src/oct-stdstrm.h +++ b/src/oct-stdstrm.h @@ -74,14 +74,14 @@ public: octave_istdiostream (const std::string& n, FILE *f = 0, - c_file_ptr_buf::close_fcn cf = ::fclose, + c_file_ptr_buf::close_fcn cf = c_file_ptr_buf::fclose, std::ios::openmode arg_md = std::ios::in, oct_mach_info::float_format flt_fmt = oct_mach_info::native); static octave_stream create (const std::string& n, FILE *f = 0, - c_file_ptr_buf::close_fcn cf = ::fclose, + c_file_ptr_buf::close_fcn cf = c_file_ptr_buf::fclose, std::ios::openmode arg_md = std::ios::in, oct_mach_info::float_format flt_fmt = oct_mach_info::native); @@ -128,14 +128,14 @@ public: octave_ostdiostream (const std::string& n, FILE *f = 0, - c_file_ptr_buf::close_fcn cf = ::fclose, + c_file_ptr_buf::close_fcn cf = c_file_ptr_buf::fclose, std::ios::openmode arg_md = std::ios::out, oct_mach_info::float_format flt_fmt = oct_mach_info::native); static octave_stream create (const std::string& n, FILE *f = 0, - c_file_ptr_buf::close_fcn cf = ::fclose, + c_file_ptr_buf::close_fcn cf = c_file_ptr_buf::fclose, std::ios::openmode arg_md = std::ios::out, oct_mach_info::float_format flt_fmt = oct_mach_info::native);