# HG changeset patch # User Olli Saarela # Date 1249667188 14400 # Node ID 941e163386773819f93ca122e090d328c651caa8 # Parent edc657b9ec8ad794534944d4412ab2505ceca1d3 __gnuplot_ginput__: if read fails to return data, sleep before trying again diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-08-07 Olli Saarela + + * plot/__gnuplot_ginput__.m: If read fails to return data, sleep + before trying again. + 2009-08-06 John W. Eaton * plot/compass.m, plot/feather.m: Simplify argument processing. diff --git a/scripts/plot/__gnuplot_ginput__.m b/scripts/plot/__gnuplot_ginput__.m --- 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);