]> granicus.if.org Git - vim/commitdiff
patch 8.0.1182: cannot see or change mzscheme dll name v8.0.1182
authorBram Moolenaar <Bram@vim.org>
Sun, 8 Oct 2017 15:41:37 +0000 (17:41 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 8 Oct 2017 15:41:37 +0000 (17:41 +0200)
Problem:    Cannot see or change mzscheme dll name.
Solution:   Add 'mzschemedll' and 'mzschemegcdll'.

runtime/doc/if_mzsch.txt
runtime/doc/options.txt
src/if_mzsch.c
src/option.c
src/option.h
src/version.c

index 7e206f5190c07c5bd4b1a3652d172c7d89ff396b..a9a03139f4bae3d687baec790ed6bb2baa0546a8 100644 (file)
@@ -1,4 +1,4 @@
-*if_mzsch.txt*  For Vim version 8.0.  Last change: 2016 Jan 24
+*if_mzsch.txt*  For Vim version 8.0.  Last change: 2017 Oct 08
 
 
                  VIM REFERENCE MANUAL    by Sergey Khorev
@@ -278,12 +278,15 @@ When you don't use the MzScheme interface you don't need them, thus you can
 use Vim without these DLL files.
 NOTE: Newer version of MzScheme (Racket) require earlier (trampolined)
 initialisation via scheme_main_setup.  So Vim always loads the MzScheme DLL at
-startup if possible.
+startup if possible.  This may make Vim startup slower.
 
 To use the MzScheme interface the MzScheme DLLs must be in your search path.
 In a console window type "path" to see what directories are used.
 
-The names of the DLLs must match the MzScheme version Vim was compiled with.
+On MS-Windows the options 'mzschemedll' and 'mzschemegcdll' are used for the
+name of the library to load.  The initial value is specified at build time.
+
+The version of the DLL must match the MzScheme version Vim was compiled with.
 For MzScheme version 209 they will be "libmzsch209_000.dll" and
 "libmzgc209_000.dll". To know for sure look at the output of the ":version"
 command, look for -DDYNAMIC_MZSCH_DLL="something" and
index 56697d51de853dc27b84c794b3e412ce209414aa..ebe9c9262097410c69c0dc4241f7e3d15230af0b 100644 (file)
@@ -5468,6 +5468,31 @@ A jump table for the options with a short description can be found at |Q_op|.
        time in msec between two mouse clicks for the second click to be
        recognized as a multi click.
 
+                                               *'mzschemedll'*
+'mzschemedll'          string  (default depends on the build)
+                       global
+                       {not in Vi}
+                       {only available when compiled with the |+mzscheme/dyn|
+                       feature}
+       Specifies the name of the MzScheme shared library. The default is
+       DYNAMIC_MZSCH_DLL which was specified at compile time.
+       Environment variables are expanded |:set_env|.
+       This option cannot be set from a |modeline| or in the |sandbox|, for
+       security reasons.
+
+                                               *'mzschemegcdll'*
+'mzschemegcdll'                string  (default depends on the build)
+                       global
+                       {not in Vi}
+                       {only available when compiled with the |+mzscheme/dyn|
+                       feature}
+       Specifies the name of the MzScheme GC shared library. The default is
+       DYNAMIC_MZGC_DLL which was specified at compile time.
+       The value can be equal to 'mzschemedll' if it includes the GC code.
+       Environment variables are expanded |:set_env|.
+       This option cannot be set from a |modeline| or in the |sandbox|, for
+       security reasons.
+
                                                    *'mzquantum'* *'mzq'*
 'mzquantum' 'mzq'      number  (default 100)
                        global
index c9c5969483a29423f8468249e4aa94767632bc34..54474bd807a3cecb90deec125944772dc170266f 100644 (file)
@@ -757,7 +757,7 @@ mzscheme_runtime_link_init(char *sch_dll, char *gc_dll, int verbose)
 mzscheme_enabled(int verbose)
 {
     return mzscheme_runtime_link_init(
-           DYNAMIC_MZSCH_DLL, DYNAMIC_MZGC_DLL, verbose) == OK;
+           (char *)p_mzschemedll, (char *)p_mzschemegcdll, verbose) == OK;
 }
 
     static void
index 4e2b929693fe7494f081e2644317e9bb041dd5c3..2743f16071b027b9d68388458c92237e79162898 100644 (file)
@@ -2008,6 +2008,24 @@ static struct vimoption options[] =
     {"mousetime",   "mouset",  P_NUM|P_VI_DEF,
                            (char_u *)&p_mouset, PV_NONE,
                            {(char_u *)500L, (char_u *)0L} SCRIPTID_INIT},
+    {"mzschemedll", NULL,   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+#if defined(DYNAMIC_MZSCHEME)
+                           (char_u *)&p_mzschemedll, PV_NONE,
+                           {(char_u *)DYNAMIC_MZSCH_DLL, (char_u *)0L}
+#else
+                           (char_u *)NULL, PV_NONE,
+                           {(char_u *)"", (char_u *)0L}
+#endif
+                           SCRIPTID_INIT},
+    {"mzschemegcdll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
+#if defined(DYNAMIC_MZSCHEME)
+                           (char_u *)&p_mzschemegcdll, PV_NONE,
+                           {(char_u *)DYNAMIC_MZGC_DLL, (char_u *)0L}
+#else
+                           (char_u *)NULL, PV_NONE,
+                           {(char_u *)"", (char_u *)0L}
+#endif
+                           SCRIPTID_INIT},
     {"mzquantum",  "mzq",   P_NUM,
 #ifdef FEAT_MZSCHEME
                            (char_u *)&p_mzq, PV_NONE,
index ecd70dced93aa2f3eeb0925de52033e5babea1d6..88eadae4c81fc43b6867ae23c39b4a4850b2815e 100644 (file)
@@ -662,6 +662,10 @@ EXTERN long        p_mouset;       /* 'mousetime' */
 EXTERN int     p_more;         /* 'more' */
 #ifdef FEAT_MZSCHEME
 EXTERN long    p_mzq;          /* 'mzquantum */
+# if defined(DYNAMIC_MZSCHEME)
+EXTERN char_u  *p_mzschemedll; /* 'mzschemedll' */
+EXTERN char_u  *p_mzschemegcdll; /* 'mzschemegcdll' */
+# endif
 #endif
 #if defined(MSWIN)
 EXTERN int     p_odev;         /* 'opendevice' */
index 0ca3f055a5e1cea44e3d2a4a38bd02cd104b3b62..ce9fda8fcfd459c6ed1d29cc2b3201b36f91ac78 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1182,
 /**/
     1181,
 /**/