comparison libinterp/corefcn/oct-stream.cc @ 18537:f958e8cd6348

maint: Periodic merge of gui-release to default.
author Rik <rik@octave.org>
date Sat, 01 Mar 2014 22:11:32 -0800
parents bc31d9359cf9 0bdecd41b2dd
children 359581bba58d
comparison
equal deleted inserted replaced
18528:9c8321ea6f58 18537:f958e8cd6348
3289 3289
3290 size_t gcount = is.gcount (); 3290 size_t gcount = is.gcount ();
3291 3291
3292 char_count += gcount; 3292 char_count += gcount;
3293 3293
3294 size_t nel = gcount / input_elt_size; 3294 octave_idx_type nel = gcount / input_elt_size;
3295 3295
3296 count += nel; 3296 count += nel;
3297 3297
3298 input_buf_list.push_back (input_buf); 3298 input_buf_list.push_back (input_buf);
3299 3299
3310 3310
3311 // Is it possible for this to fail to return us to 3311 // Is it possible for this to fail to return us to
3312 // the original position? 3312 // the original position?
3313 seek (orig_pos, SEEK_SET); 3313 seek (orig_pos, SEEK_SET);
3314 3314
3315 size_t remaining = eof_pos - orig_pos; 3315 off_t remaining = eof_pos - orig_pos;
3316 3316
3317 if (remaining < skip) 3317 if (remaining < skip)
3318 seek (0, SEEK_END); 3318 seek (0, SEEK_END);
3319 else 3319 else
3320 seek (skip, SEEK_CUR); 3320 seek (skip, SEEK_CUR);
3325 } 3325 }
3326 3326
3327 if (read_to_eof) 3327 if (read_to_eof)
3328 { 3328 {
3329 if (nc < 0) 3329 if (nc < 0)
3330 nc = count / nr + 1; 3330 {
3331 nc = count / nr;
3332
3333 if (count % nr != 0)
3334 nc ++;
3335 }
3331 else 3336 else
3332 nr = count; 3337 nr = count;
3333 } 3338 }
3334 else if (count == 0) 3339 else if (count == 0)
3335 { 3340 {