Mercurial > hg > xemacs-beta
comparison src/emodules.c @ 5420:b9167d522a9a
Rebase with 21.5 trunk.
author | Mats Lidell <matsl@xemacs.org> |
---|---|
date | Thu, 28 Oct 2010 23:53:24 +0200 |
parents | 308d34e9f07d 63f247c5da0a |
children | 56144c8593a8 |
comparison
equal
deleted
inserted
replaced
5419:eaf01113cd42 | 5420:b9167d522a9a |
---|---|
386 | 386 |
387 f = (const Extbyte **) dll_variable (dlhandle, | 387 f = (const Extbyte **) dll_variable (dlhandle, |
388 (const Ibyte *) "emodule_name"); | 388 (const Ibyte *) "emodule_name"); |
389 if (f == NULL || *f == NULL) | 389 if (f == NULL || *f == NULL) |
390 signal_error (Qdll_error, "Invalid dynamic module: Missing symbol `emodule_name'", Qunbound); | 390 signal_error (Qdll_error, "Invalid dynamic module: Missing symbol `emodule_name'", Qunbound); |
391 | 391 mname = EXTERNAL_TO_ITEXT (*f, Qemodule_string_encoding); |
392 mname = EXTERNAL_TO_ITEXT (f, Qemodule_string_encoding); | |
393 /* #### Not obvious we have to force an alloca copy here, but the old | |
394 code did so */ | |
395 IBYTE_STRING_TO_ALLOCA (mname, mname); | |
396 | 392 |
397 if (mname[0] == '\0') | 393 if (mname[0] == '\0') |
398 signal_error (Qdll_error, "Invalid dynamic module: Empty value for `emodule_name'", Qunbound); | 394 signal_error (Qdll_error, "Invalid dynamic module: Empty value for `emodule_name'", Qunbound); |
399 | 395 |
400 f = (const Extbyte **) dll_variable (dlhandle, | 396 f = (const Extbyte **) dll_variable (dlhandle, |
401 (const Ibyte *) "emodule_version"); | 397 (const Ibyte *) "emodule_version"); |
402 if (f == NULL || *f == NULL) | 398 if (f == NULL || *f == NULL) |
403 signal_error (Qdll_error, "Missing symbol `emodule_version': Invalid dynamic module", Qunbound); | 399 signal_error (Qdll_error, "Missing symbol `emodule_version': Invalid dynamic module", Qunbound); |
404 | 400 mver = EXTERNAL_TO_ITEXT (*f, Qemodule_string_encoding); |
405 mver = EXTERNAL_TO_ITEXT (f, Qemodule_string_encoding); | |
406 /* #### Not obvious we have to force an alloca copy here, but the old | |
407 code did so */ | |
408 IBYTE_STRING_TO_ALLOCA (mver, mver); | |
409 | 401 |
410 f = (const Extbyte **) dll_variable (dlhandle, | 402 f = (const Extbyte **) dll_variable (dlhandle, |
411 (const Ibyte *) "emodule_title"); | 403 (const Ibyte *) "emodule_title"); |
412 if (f == NULL || *f == NULL) | 404 if (f == NULL || *f == NULL) |
413 signal_error (Qdll_error, "Invalid dynamic module: Missing symbol `emodule_title'", Qunbound); | 405 signal_error (Qdll_error, "Invalid dynamic module: Missing symbol `emodule_title'", Qunbound); |
414 | 406 mtitle = EXTERNAL_TO_ITEXT (*f, Qemodule_string_encoding); |
415 mtitle = EXTERNAL_TO_ITEXT (f, Qemodule_string_encoding); | |
416 /* #### Not obvious we have to force an alloca copy here, but the old | |
417 code did so */ | |
418 IBYTE_STRING_TO_ALLOCA (mtitle, mtitle); | |
419 | 407 |
420 symname = alloca_ibytes (qxestrlen (mname) + 15); | 408 symname = alloca_ibytes (qxestrlen (mname) + 15); |
421 | 409 |
422 qxestrcpy_ascii (symname, "modules_of_"); | 410 qxestrcpy_ascii (symname, "modules_of_"); |
423 qxestrcat (symname, mname); | 411 qxestrcat (symname, mname); |