Mercurial > octave-nkf
comparison src/ov-fcn-inline.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 | cdef72fcd206 |
comparison
equal
deleted
inserted
replaced
5827:1fe78adb91bc | 5828:22e23bee74c8 |
---|---|
150 } | 150 } |
151 | 151 |
152 bool | 152 bool |
153 octave_fcn_inline::save_binary (std::ostream& os, bool&) | 153 octave_fcn_inline::save_binary (std::ostream& os, bool&) |
154 { | 154 { |
155 FOUR_BYTE_INT tmp = ifargs.length (); | 155 int32_t tmp = ifargs.length (); |
156 os.write (reinterpret_cast<char *> (&tmp), 4); | 156 os.write (reinterpret_cast<char *> (&tmp), 4); |
157 for (int i = 0; i < ifargs.length (); i++) | 157 for (int i = 0; i < ifargs.length (); i++) |
158 { | 158 { |
159 tmp = ifargs(i).length (); | 159 tmp = ifargs(i).length (); |
160 os.write (reinterpret_cast<char *> (&tmp), 4); | 160 os.write (reinterpret_cast<char *> (&tmp), 4); |
171 | 171 |
172 bool | 172 bool |
173 octave_fcn_inline::load_binary (std::istream& is, bool swap, | 173 octave_fcn_inline::load_binary (std::istream& is, bool swap, |
174 oct_mach_info::float_format) | 174 oct_mach_info::float_format) |
175 { | 175 { |
176 FOUR_BYTE_INT nargs; | 176 int32_t nargs; |
177 if (! is.read (reinterpret_cast<char *> (&nargs), 4)) | 177 if (! is.read (reinterpret_cast<char *> (&nargs), 4)) |
178 return false; | 178 return false; |
179 if (swap) | 179 if (swap) |
180 swap_bytes<4> (&nargs); | 180 swap_bytes<4> (&nargs); |
181 | 181 |
182 if (nargs < 1) | 182 if (nargs < 1) |
183 return false; | 183 return false; |
184 else | 184 else |
185 { | 185 { |
186 FOUR_BYTE_INT tmp; | 186 int32_t tmp; |
187 ifargs.resize (nargs); | 187 ifargs.resize (nargs); |
188 for (int i = 0; i < nargs; i++) | 188 for (int i = 0; i < nargs; i++) |
189 { | 189 { |
190 if (! is.read (reinterpret_cast<char *> (&tmp), 4)) | 190 if (! is.read (reinterpret_cast<char *> (&tmp), 4)) |
191 return false; | 191 return false; |