hi all, i am kind of new to software patching. i was looking for a fix for the "load .oct file" problem in octave 2.9.12 and stumbled across the below patch. figured out that i had to do a diff -u -u "old file" "new file" but can somebody guide me through the process. thanks for the help in advance. maverick. ================================================ RCS file: /cvs/octave/src/ov-bool-mat.cc,v retrieving revision 1.44 diff -u -u -r1.44 ov-bool-mat.cc --- src/ov-bool-mat.cc 3 Jun 2007 20:58:29 -0000 1.44 +++ src/ov-bool-mat.cc 13 Jun 2007 16:10:42 -0000 <at> <at> -204,24 +204,40 <at> <at> for (int i = 0; i < mdims; i++) is >> dv(i); - NDArray tmp(dv); - is >> tmp; + if (is) + { + boolNDArray btmp (dv); + + if (btmp.is_empty ()) + matrix = btmp; + else + { + NDArray tmp(dv); + is >> tmp; - if (!is) + if (is) + { + for (octave_idx_type i = 0; i < btmp.nelem (); i++) + btmp.elem (i) = (tmp.elem (i) != 0.); + + matrix = btmp; + } + else + { + error ("load: failed to load matrix constant"); + success = false; + } + } + } + else { - error ("load: failed to load matrix constant"); + error ("load: failed to extract dimensions"); success = false; } -
Patching Octave
Started by ●August 11, 2007
Reply by ●August 11, 20072007-08-11
maverick <maverickmint@gmail.com> writes:> hi all, > i am kind of new to software patching. i was looking for a > fix for the "load .oct file" problem in octave 2.9.12 and stumbled > across the below patch. figured out that i had to do a diff -u -u "old > file" "new file" but can somebody guide me through the process. > thanks for the help in advance. > maverick.Can't help you with the patch, but you should try posting your question to comp.soft-sys.octave. -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO http://home.earthlink.net/~yatescr
Reply by ●August 11, 20072007-08-11
On Aug 11, 9:08 am, Randy Yates <ya...@ieee.org> wrote:> maverick<maverickm...@gmail.com> writes: > > hi all, > > i am kind of new to software patching. i was looking for a > > fix for the "load .oct file" problem in octave 2.9.12 and stumbled > > across the below patch. figured out that i had to do a diff -u -u "old > > file" "new file" but can somebody guide me through the process. > > thanks for the help in advance. > > maverick. > > Can't help you with the patch, but you should try posting your > question to comp.soft-sys.octave. > -- > % Randy Yates % "...the answer lies within your soul > %% Fuquay-Varina, NC % 'cause no one knows which side > %%% 919-577-9882 % the coin will fall." > %%%% <ya...@ieee.org> % 'Big Wheels', *Out of the Blue*, ELOhttp://home.earthlink.net/~yatescrthanks randy.
Reply by ●August 11, 20072007-08-11
maverick wrote:> hi all, > i am kind of new to software patching. i was looking for a > fix for the "load .oct file" problem in octave 2.9.12 and stumbled > across the below patch. figured out that i had to do a diff -u -u "old > file" "new file" but can somebody guide me through the process. > thanks for the help in advance. > maverick.Under Linux there is a patch tool called "patch". Try man patch for how to use it. Cheers, Guenter