From: David B. <Dav...@mo...> - 2003-09-12 14:45:04
|
Seeing as no one responded to this message and that I wanted OctaveForge to work with the latest CVS I've gone ahead and committed the follwoing modifications: * Protected the in-built variables that are used in 2.1.50 and earlier that no longer exist in the CVS and included as appropriate the corresponding warn variable in the dot-m files. An example is dfi = do_fortran_indexing; unwind_protect do_fortran_indexing = 1; unwind_protect_cleanup do_fortran_indexing = dfi; end_unwind_protect is replaced with try dfi = do_fortran_indexing; catch dfi = 0; end try wfi = warn_fortran_indexing; catch wfi = 0; end unwind_protect do_fortran_indexing = 1; warn_fortran_indexing = 0; unwind_protect_cleanup do_fortran_indexing = dfi; warn_fortrabn_indexing = wfi; end_unwind_protect This was done for the following variables if I found them in the entire OctaveForge sources Old Variable New Variable -------------- -------------- empty_list_elements_ok warn_empty_list_elements ok_to_lose_imaginary_part warn_imag_to_real treat_neg_dim_as_zero warn_neg_dim_as_zero implicit_num_to_str_ok warn_num_to_str resize_on_range_error warn_resize_on_range_error implicit_str_to_num_ok warn_str_to_num do_fortran_indexing warn_fortran_indexing prefer_zero_one_indexing <none> prefer_column_vectors <none> propagate_empty_matrices <none> If I missing a variable tell me. The changes I made should maintain backwards compatibility * Added to configure.base and Makeconf.base the variables HAVE_DO_FORTRAN_INDEXING HAVE_PROPAGATE_EMPTY_MATRICES HAVE_OK_TO_LOSE_IMAGINARY_PART to test for the Vdo_fortran_indexing, Vpropagate_empty_matrices and Vok_to_lose_imaginary_part variables. These are for use in the C++ code that requires them (I think this is only in the comms toolbox at the moment). Although OctaveForge doesn't contain code using Vok_to_lose_imaginary_part yet, I intend to submit some code soon with this and so its presence helps me. * Got rid of the references to resize_fill_value() method instatiated from Array.h that is no longer in the octave CVS. Again this appears to only be in the comms toolbox * Changes the name of the matrix_identity function in optim/lp.cc to lp_matrix_identity function so as not to clash with the one in utils.h in the current octave CVS. I couldn't use the one in the octave CVS since I didn't want to break backwards compatiablity. I think that is all of the changes I had to make Regards David According to David Bateman <Dav...@mo...> (on 09/09/03): > Dear All, > > There are a number of problems with Octave-Forge for the latest CVS. > Firstly the > > static T resize_fill_value (void) { return T (); } > > has been commented out of Array.h, so if you use this template in a > type this no longer works. I think I'm the only who supplied code that > did this, so this one isn't too big a problem. > > The major problem is that the variables do_fortran_indexing, > propagate_empty_matrices etc no longer exist. Removing them and using > the new options like warn_fortran_indexing will break all backwards > compatiablity within Octave-Forge. No doing it and the functions > will fail when a new release is made. > > A solution like > > have_fortran_indexing = 1; > try > tmp = do_fortran_indexing; > catch > have_fortran_indexing = 0; > end > > is possible, but looking at the number of places it'll need doing (including > in some C++ code) this is an ugly solution. > > Does anyone have any ideas? > > Regards > David > > > -- > David Bateman Dav...@mo... > Motorola CRM +33 1 69 35 48 04 (Ph) > Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) > 91193 Gif-Sur-Yvette FRANCE > > The information contained in this communication has been classified as: > > [x] General Business Information > [ ] Motorola Internal Use Only > [ ] Motorola Confidential Proprietary -- David Bateman Dav...@mo... Motorola CRM +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary |