mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-02 07:30:55 -08:00
- [Win32] Command-line arguments are now available for programs compiled with
:SYSTEM set to :WINDOWS - [Win32] si_trap_fpe is now exported by ecl.dl - [Win32] exports new finalizer functions si_[set/get]_finalizer
This commit is contained in:
parent
f058a1b847
commit
048cdbdc91
6 changed files with 40 additions and 2 deletions
|
|
@ -9,6 +9,8 @@ EXPORTS
|
|||
make_cons
|
||||
si_gc
|
||||
si_gc_dump
|
||||
si_set_finalizer
|
||||
si_get_finalizer
|
||||
|
||||
; all_symbols
|
||||
|
||||
|
|
@ -530,6 +532,7 @@ EXPORTS
|
|||
ecl_self DATA
|
||||
cl_boot
|
||||
cl_shutdown
|
||||
ecl_get_commandline_args
|
||||
|
||||
|
||||
; mapfun.c
|
||||
|
|
@ -1151,6 +1154,7 @@ EXPORTS
|
|||
si_catch_bad_signals
|
||||
si_uncatch_bad_signals
|
||||
si_check_pending_interrupts
|
||||
si_trap_fpe
|
||||
|
||||
|
||||
; unixsys.c
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ EXPORTS
|
|||
make_cons
|
||||
si_gc
|
||||
si_gc_dump
|
||||
si_set_finalizer
|
||||
si_get_finalizer
|
||||
|
||||
; all_symbols
|
||||
|
||||
|
|
@ -537,6 +539,7 @@ EXPORTS
|
|||
ecl_self DATA
|
||||
cl_boot
|
||||
cl_shutdown
|
||||
ecl_get_commandline_args
|
||||
|
||||
|
||||
; mapfun.c
|
||||
|
|
@ -1134,6 +1137,7 @@ EXPORTS
|
|||
si_catch_bad_signals
|
||||
si_uncatch_bad_signals
|
||||
si_check_pending_interrupts
|
||||
si_trap_fpe
|
||||
|
||||
|
||||
; unixsys.c
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ ECL 1.0:
|
|||
using SI:SET-FINALIZER and SI:GET-FINALIZER. Only one closure per
|
||||
object is allowed.
|
||||
|
||||
- [Win32] Command-line arguments are now available for programs compiled with
|
||||
:SYSTEM set to :WINDOWS (M. Goffioul)
|
||||
|
||||
|
||||
* Bugs fixed:
|
||||
|
||||
|
|
@ -50,6 +53,8 @@ ECL 1.0:
|
|||
|
||||
- [Win32] DIRECTORY did not take the drive letter into account.
|
||||
|
||||
- [Win32] si_trap_fpe is now exported by ecl.dll
|
||||
|
||||
;;; Local Variables: ***
|
||||
;;; mode:text ***
|
||||
;;; fill-column:79 ***
|
||||
|
|
|
|||
20
src/c/main.d
20
src/c/main.d
|
|
@ -566,3 +566,23 @@ si_pointer(cl_object x)
|
|||
{
|
||||
@(return make_unsigned_integer((cl_index)x))
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER) || defined(mingw32)
|
||||
void
|
||||
ecl_get_commandline_args(int* argc, char*** argv) {
|
||||
LPWSTR *wArgs;
|
||||
int i;
|
||||
|
||||
if (argc == NULL || argv == NULL)
|
||||
return;
|
||||
|
||||
wArgs = CommandLineToArgvW(GetCommandLineW(), argc);
|
||||
*argv = (char**)malloc(sizeof(char*)*(*argc));
|
||||
for (i=0; i<*argc; i++) {
|
||||
int len = wcslen(wArgs[i]);
|
||||
(*argv)[i] = (char*)malloc(2*(len+1));
|
||||
wcstombs((*argv)[i], wArgs[i], len+1);
|
||||
}
|
||||
LocalFree(wArgs);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -180,9 +180,11 @@ main(int argc, char **argv)
|
|||
int
|
||||
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
|
||||
{
|
||||
char *fake_argv = \"ecl.exe\";
|
||||
char **argv;
|
||||
int argc;
|
||||
~A
|
||||
cl_boot(1, &fake_argv);
|
||||
ecl_get_commandline_args(&argc, &argv);
|
||||
cl_boot(argc, argv);
|
||||
read_VV(OBJNULL, ~A);
|
||||
~A
|
||||
}")
|
||||
|
|
|
|||
|
|
@ -798,6 +798,9 @@ extern bool ecl_booted;
|
|||
extern const char *ecl_self;
|
||||
extern int cl_boot(int argc, char **argv);
|
||||
extern int cl_shutdown(void);
|
||||
#if defined(_MSC_VER) || defined(mingw32)
|
||||
extern void ecl_get_commandline_args(int* argc, char*** argv);
|
||||
#endif
|
||||
|
||||
|
||||
/* mapfun.c */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue