comparison src/ov-list.cc @ 5828:22e23bee74c8

[project @ 2006-05-23 06:05:14 by jwe]
author jwe
date Tue, 23 May 2006 06:05:14 +0000
parents 080c08b192d8
children bd3041e30d97
comparison
equal deleted inserted replaced
5827:1fe78adb91bc 5828:22e23bee74c8
613 bool 613 bool
614 octave_list::save_binary (std::ostream& os, bool& save_as_floats) 614 octave_list::save_binary (std::ostream& os, bool& save_as_floats)
615 { 615 {
616 octave_value_list lst = list_value (); 616 octave_value_list lst = list_value ();
617 617
618 FOUR_BYTE_INT len = lst.length(); 618 int32_t len = lst.length();
619 os.write (reinterpret_cast<char *> (&len), 4); 619 os.write (reinterpret_cast<char *> (&len), 4);
620 620
621 for (int i = 0; i < lst.length (); i++) 621 for (int i = 0; i < lst.length (); i++)
622 { 622 {
623 // should we use lst.name_tags () to label the elements? 623 // should we use lst.name_tags () to label the elements?
639 639
640 bool 640 bool
641 octave_list::load_binary (std::istream& is, bool swap, 641 octave_list::load_binary (std::istream& is, bool swap,
642 oct_mach_info::float_format fmt) 642 oct_mach_info::float_format fmt)
643 { 643 {
644 FOUR_BYTE_INT len; 644 int32_t len;
645 if (! is.read (reinterpret_cast<char *> (&len), 4)) 645 if (! is.read (reinterpret_cast<char *> (&len), 4))
646 return false; 646 return false;
647 if (swap) 647 if (swap)
648 swap_bytes<4> (&len); 648 swap_bytes<4> (&len);
649 649