load: if file doesn't have an extension try it

Until now ECL have tried to guess the file extension first, before
verifying if the file without the extension exists. First try loading
file without an extension, only after that try guessing. Fixes #284.
This commit is contained in:
Daniel Kochmański 2016-09-05 16:53:16 +02:00
parent 326829fd58
commit 05ecb5dfd0

View file

@ -714,23 +714,29 @@ cl_boot(int argc, char **argv)
ECL_SET(@'mp::+load-compile-lock+',
ecl_make_lock(@'mp::+load-compile-lock+', 1));
#endif
aux = cl_list(
#ifdef ENABLE_DLOPEN
11,
aux = cl_list(11,
CONS(ECL_NIL, @'si::load-source'),
CONS(str_fas, @'si::load-binary'),
CONS(str_fasl, @'si::load-binary'),
CONS(str_fasb, @'si::load-binary'),
CONS(str_FASB, @'si::load-binary'),
#else
7,
#endif
CONS(str_lsp, @'si::load-source'),
CONS(str_lisp, @'si::load-source'),
CONS(str_LSP, @'si::load-source'),
CONS(str_LISP, @'si::load-source'),
CONS(str_fasc, @'si::load-bytecodes'),
CONS(str_FASC, @'si::load-bytecodes'),
CONS(ECL_NIL, @'si::load-source'));
CONS(str_FASC, @'si::load-bytecodes'));
#else
aux = cl_list(7,
CONS(ECL_NIL, @'si::load-source'),
CONS(str_lsp, @'si::load-source'),
CONS(str_lisp, @'si::load-source'),
CONS(str_LSP, @'si::load-source'),
CONS(str_LISP, @'si::load-source'),
CONS(str_fasc, @'si::load-bytecodes'),
CONS(str_FASC, @'si::load-bytecodes'));
#endif
ECL_SET(@'ext::*load-hooks*', aux);
init_error();
init_macros();