Mercurial > octave-nkf
comparison libinterp/corefcn/dynamic-ld.cc @ 20587:f90c8372b7ba
eliminate many more simple uses of error_state
* Cell.cc, __ichol__.cc, __ilu__.cc, balance.cc, bsxfun.cc, colloc.cc,
det.cc, dlmread.cc, dynamic-ld.cc, eig.cc, fft.cc, fft2.cc, fftn.cc,
gcd.cc, getgrent.cc, getpwent.cc, givens.cc, hess.cc, input.cc,
levenshtein.cc, load-path.cc, lookup.cc, ls-mat-ascii.cc, ls-mat4.cc,
lsode.cc, lu.cc, max.cc, md5sum.cc, mex.cc, pager.cc, pinv.cc,
pr-output.cc, qz.cc, schur.cc, sparse.cc, sqrtm.cc, str2double.cc,
strfns.cc, sub2ind.cc, sysdep.cc, time.cc, toplev.cc, tril.cc,
tsearch.cc, typecast.cc, __init_gnuplot__.cc, __magick_read__.cc,
__osmesa_print__.cc, amd.cc, audiodevinfo.cc, dmperm.cc, fftw.cc,
symrcm.cc, ov-base-diag.cc, ov-base-sparse.cc, ov-base.cc,
ov-bool-sparse.cc, ov-builtin.cc, ov-complex.cc, ov-cx-diag.cc,
ov-cx-mat.cc, ov-cx-sparse.cc, ov-fcn-handle.cc, ov-fcn-inline.cc,
ov-float.cc, ov-flt-complex.cc, ov-flt-cx-diag.cc, ov-flt-cx-mat.cc,
ov-flt-re-diag.cc, ov-flt-re-mat.cc, ov-lazy-idx.cc, ov-mex-fcn.cc,
ov-perm.cc, ov-range.cc, ov-re-diag.cc, ov-re-mat.cc, ov-re-sparse.cc,
ov-scalar.cc, ov-str-mat.cc, op-bm-b.cc, op-bm-bm.cc, op-sbm-b.cc,
op-sbm-bm.cc, op-str-m.cc, op-str-s.cc, oct-parse.in.yy, pt-cbinop.cc,
pt-colon.cc, pt-decl.cc, pt-exp.cc, pt-id.cc, pt-misc.cc,
pt-select.cc, pt-unop.cc: Eliminate simple uses of error_state.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 05 Oct 2015 19:29:36 -0400 |
parents | 7ac907da9fba |
children |
comparison
equal
deleted
inserted
replaced
20586:b7ac1e94266e | 20587:f90c8372b7ba |
---|---|
267 | 267 |
268 if (! oct_file) | 268 if (! oct_file) |
269 { | 269 { |
270 oct_file.open (file_name); | 270 oct_file.open (file_name); |
271 | 271 |
272 if (! error_state && oct_file) | 272 if (oct_file) |
273 octave_shlib_list::append (oct_file); | 273 octave_shlib_list::append (oct_file); |
274 } | 274 } |
275 | 275 |
276 if (! error_state) | 276 if (oct_file) |
277 { | 277 { |
278 if (oct_file) | 278 void *function = oct_file.search (fcn_name, name_mangler); |
279 | |
280 if (! function) | |
279 { | 281 { |
280 void *function = oct_file.search (fcn_name, name_mangler); | 282 // FIXME: can we determine this C mangling scheme |
281 | 283 // automatically at run time or configure time? |
282 if (! function) | 284 |
283 { | 285 function = oct_file.search (fcn_name, name_uscore_mangler); |
284 // FIXME: can we determine this C mangling scheme | |
285 // automatically at run time or configure time? | |
286 | |
287 function = oct_file.search (fcn_name, name_uscore_mangler); | |
288 } | |
289 | |
290 if (function) | |
291 { | |
292 octave_dld_fcn_getter f | |
293 = FCN_PTR_CAST (octave_dld_fcn_getter, function); | |
294 | |
295 retval = f (oct_file, relative); | |
296 | |
297 if (! retval) | |
298 error ("failed to install .oct file function '%s'", | |
299 fcn_name.c_str ()); | |
300 } | |
301 } | 286 } |
302 else | 287 |
303 error ("%s is not a valid shared library", file_name.c_str ()); | 288 if (function) |
304 } | 289 { |
290 octave_dld_fcn_getter f | |
291 = FCN_PTR_CAST (octave_dld_fcn_getter, function); | |
292 | |
293 retval = f (oct_file, relative); | |
294 | |
295 if (! retval) | |
296 error ("failed to install .oct file function '%s'", | |
297 fcn_name.c_str ()); | |
298 } | |
299 } | |
300 else | |
301 error ("%s is not a valid shared library", file_name.c_str ()); | |
305 | 302 |
306 return retval; | 303 return retval; |
307 } | 304 } |
308 | 305 |
309 octave_function * | 306 octave_function * |
326 | 323 |
327 if (! mex_file) | 324 if (! mex_file) |
328 { | 325 { |
329 mex_file.open (file_name); | 326 mex_file.open (file_name); |
330 | 327 |
331 if (! error_state && mex_file) | 328 if (mex_file) |
332 octave_shlib_list::append (mex_file); | 329 octave_shlib_list::append (mex_file); |
333 } | 330 } |
334 | 331 |
335 if (! error_state) | 332 if (mex_file) |
336 { | 333 { |
337 if (mex_file) | 334 void *function = 0; |
335 | |
336 bool have_fmex = false; | |
337 | |
338 function = mex_file.search (fcn_name, mex_mangler); | |
339 | |
340 if (! function) | |
338 { | 341 { |
339 void *function = 0; | 342 // FIXME: can we determine this C mangling scheme |
340 | 343 // automatically at run time or configure time? |
341 bool have_fmex = false; | 344 |
342 | 345 function = mex_file.search (fcn_name, mex_uscore_mangler); |
343 function = mex_file.search (fcn_name, mex_mangler); | |
344 | 346 |
345 if (! function) | 347 if (! function) |
346 { | 348 { |
347 // FIXME: can we determine this C mangling scheme | 349 function = mex_file.search (fcn_name, mex_f77_mangler); |
348 // automatically at run time or configure time? | 350 |
349 | 351 if (function) |
350 function = mex_file.search (fcn_name, mex_uscore_mangler); | 352 have_fmex = true; |
351 | |
352 if (! function) | |
353 { | |
354 function = mex_file.search (fcn_name, mex_f77_mangler); | |
355 | |
356 if (function) | |
357 have_fmex = true; | |
358 } | |
359 } | 353 } |
360 | |
361 if (function) | |
362 retval = new octave_mex_function (function, have_fmex, | |
363 mex_file, fcn_name); | |
364 else | |
365 error ("failed to install .mex file function '%s'", | |
366 fcn_name.c_str ()); | |
367 } | 354 } |
355 | |
356 if (function) | |
357 retval = new octave_mex_function (function, have_fmex, | |
358 mex_file, fcn_name); | |
368 else | 359 else |
369 error ("%s is not a valid shared library", file_name.c_str ()); | 360 error ("failed to install .mex file function '%s'", |
370 } | 361 fcn_name.c_str ()); |
362 } | |
363 else | |
364 error ("%s is not a valid shared library", file_name.c_str ()); | |
371 | 365 |
372 return retval; | 366 return retval; |
373 } | 367 } |
374 | 368 |
375 bool | 369 bool |