Mercurial > octave-nkf
diff src/DLD-FUNCTIONS/sort.cc @ 4153:6b96ce9f5743
[project @ 2002-11-06 20:38:49 by jwe]
author | jwe |
---|---|
date | Wed, 06 Nov 2002 20:38:50 +0000 |
parents | 2184d16975a2 |
children | c0121a3b9cbe |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/sort.cc Wed Nov 06 18:41:50 2002 +0000 +++ b/src/DLD-FUNCTIONS/sort.cc Wed Nov 06 20:38:50 2002 +0000 @@ -25,6 +25,7 @@ #endif #include "lo-mappers.h" +#include "quit.h" #include "defun-dld.h" #include "error.h" @@ -120,6 +121,7 @@ SORT_INIT_PHASE(n); \ while (1) \ { \ + OCTAVE_QUIT; \ if (condition) \ { \ SORT_REORDER_PHASE_ONE; \ @@ -137,6 +139,7 @@ vs (0) = v (k-1); \ for (int i = 1; i < n; i++) \ { \ + OCTAVE_QUIT; \ k = l (static_cast<int> (idx (i-1))); \ idx (i) = k; \ vs (i) = v (k-1); \ @@ -148,6 +151,7 @@ ms (0, j) = m (k-1, j); \ for (int i = 1; i < nr; i++) \ { \ + OCTAVE_QUIT; \ k = l (static_cast<int> (idx (i-1, j))); \ idx (i, j) = k; \ ms (i, j) = m (k-1, j); \ @@ -247,11 +251,14 @@ bool all_elts_real = true; for (int i = 0; i < nr; i++) - if (imag (cm (i, j)) != 0.0) - { - all_elts_real = false; - break; - } + { + OCTAVE_QUIT; + if (imag (cm (i, j)) != 0.0) + { + all_elts_real = false; + break; + } + } DO_SORT (nr, ((all_elts_real && (xisnan (real (cm (p-1, j))) @@ -292,11 +299,14 @@ bool all_elts_real = true; for (int i = 0; i < n; i++) - if (imag (cv (i)) != 0.0) - { - all_elts_real = false; - break; - } + { + OCTAVE_QUIT; + if (imag (cv (i)) != 0.0) + { + all_elts_real = false; + break; + } + } DO_SORT (n, ((all_elts_real && (xisnan (real (cv (p-1)))