comparison scripts/io/textread.m @ 20626:5fc798a9b32c

maint: Periodic merge of stable to default.
author Rik <rik@octave.org>
date Fri, 09 Oct 2015 19:28:05 -0700
parents 3e8c188b20a7 66adbb6e88ad
children
comparison
equal deleted inserted replaced
20624:7c0e10f035bd 20626:5fc798a9b32c
141 ## Avoid conveying floats to fskipl 141 ## Avoid conveying floats to fskipl
142 varargin{headerlines + 1} = round (varargin{headerlines + 1}); 142 varargin{headerlines + 1} = round (varargin{headerlines + 1});
143 ## Beware of zero valued headerline, fskipl would skip to EOF 143 ## Beware of zero valued headerline, fskipl would skip to EOF
144 if (varargin{headerlines + 1} > 0) 144 if (varargin{headerlines + 1} > 0)
145 fskipl (fid, varargin{headerlines + 1}); 145 fskipl (fid, varargin{headerlines + 1});
146 varargin(headerlines:headerlines+1) = [];
147 elseif (varargin{headerlines + 1} < 0) 146 elseif (varargin{headerlines + 1} < 0)
148 warning ("textread: negative headerline value ignored"); 147 warning ("textread: negative headerline value ignored");
149 endif 148 endif
149 varargin(headerlines:headerlines+1) = [];
150 endif 150 endif
151 st_pos = ftell (fid); 151 st_pos = ftell (fid);
152 152
153 ## Read a first file chunk. Rest follows after endofline processing 153 ## Read a first file chunk. Rest follows after endofline processing
154 [str, count] = fscanf (fid, "%c", BUFLENGTH); 154 [str, count] = fscanf (fid, "%c", BUFLENGTH);