Mercurial > hg > octave-terminal
changeset 9504:941e16338677
__gnuplot_ginput__: if read fails to return data, sleep before trying again
author | Olli Saarela <olli.saarela@gmail.com> |
---|---|
date | Fri, 07 Aug 2009 13:46:28 -0400 |
parents | edc657b9ec8a |
children | a321a1c227c8 |
files | scripts/ChangeLog scripts/plot/__gnuplot_ginput__.m |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-08-07 Olli Saarela <olli.saarela@gmail.com> + + * plot/__gnuplot_ginput__.m: If read fails to return data, sleep + before trying again. + 2009-08-06 John W. Eaton <jwe@octave.org> * plot/compass.m, plot/feather.m: Simplify argument processing.
--- a/scripts/plot/__gnuplot_ginput__.m +++ b/scripts/plot/__gnuplot_ginput__.m @@ -1,4 +1,4 @@ -## Copyright (C) 2004, 2006, 2008 Petr Mikulik +## Copyright (C) 2004, 2006, 2008, 2009 Petr Mikulik ## ## This file is part of Octave. ## @@ -110,7 +110,9 @@ str = {}; while (isempty (str)) str = char (fread (istream)'); - if (! isempty (str)) + if (isempty (str)) + sleep (0.05); + else str = regexp (str, 'OCTAVE:\s+[\d.\+-]+\s+[\d.\+-]+\s+\d*', 'match'); endif fclear (istream);