# HG changeset patch # User Rik # Date 1311570686 25200 # Node ID ff264eae88cf46a2b4192f806641b6d5bcc5afc2 # Parent c3b305e7e59fc6096d4c09663f57730b254e284d textread.m, textscan.m: Read entire file when format repeat count is -1 * textread.m, textscan.m: Read entire file when format repeat count is -1. diff -r c3b305e7e59f -r ff264eae88cf scripts/io/textread.m --- a/scripts/io/textread.m Sun Jul 24 22:00:15 2011 -0700 +++ b/scripts/io/textread.m Sun Jul 24 22:11:26 2011 -0700 @@ -78,7 +78,7 @@ nlines = Inf; endif - if (isfinite (nlines)) + if (isfinite (nlines) && (nlines >= 0)) str = tmp_str = ""; n = 0; ## FIXME: Can this be done without slow loop? diff -r c3b305e7e59f -r ff264eae88cf scripts/io/textscan.m --- a/scripts/io/textscan.m Sun Jul 24 22:00:15 2011 -0700 +++ b/scripts/io/textscan.m Sun Jul 24 22:11:26 2011 -0700 @@ -139,7 +139,7 @@ fskipl (fid, varargin{headerlines + 1}); args(headerlines:headerlines+1) = []; endif - if (isfinite (nlines)) + if (isfinite (nlines) && (nlines >= 0)) str = tmp_str = ""; n = 0; ## FIXME: Can this be done without slow loop?