On 04-May-2019 23:48, Bram Moolenaar wrote:
Patch 8.1.1262
Problem:    Cannot simulate a mouse click in a test.
Solution:   Add test_setmouse().
Files:      src/evalfunc.c, runtime/doc/eval.txt, runtime/doc/usr_41.txt


After this patch HP_UX throws this error, if FEAT_MOUSE is not defined:
    cc -c -I. -Iproto -DHAVE_CONFIG_H     -O2        -o objects/evalfunc.o evalfunc.c
cc: "evalfunc.c", line 14505: error 1588: "mouse_row" undefined.
cc: "evalfunc.c", line 14506: error 1588: "mouse_col" undefined.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.

The attached patch tries to fix it.

Cheers

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--- evalfunc.c.orig     2019-05-05 06:14:21.254357600 +1000
+++ evalfunc.c  2019-05-06 08:58:11.781532800 +1000
@@ -456,7 +456,9 @@
 #ifdef FEAT_GUI
 static void f_test_scrollbar(typval_T *argvars, typval_T *rettv);
 #endif
+#ifdef FEAT_MOUSE
 static void f_test_setmouse(typval_T *argvars, typval_T *rettv);
+#endif
 static void f_test_settime(typval_T *argvars, typval_T *rettv);
 #ifdef FEAT_FLOAT
 static void f_tan(typval_T *argvars, typval_T *rettv);
@@ -994,7 +996,9 @@
 #ifdef FEAT_GUI
     {"test_scrollbar", 3, 3, f_test_scrollbar},
 #endif
+#ifdef FEAT_MOUSE
     {"test_setmouse",  2, 2, f_test_setmouse},
+#endif
     {"test_settime",   1, 1, f_test_settime},
 #ifdef FEAT_TIMERS
     {"timer_info",     0, 1, f_timer_info},
@@ -14499,12 +14503,14 @@
 }
 #endif
 
+#ifdef FEAT_MOUSE
     static void
 f_test_setmouse(typval_T *argvars, typval_T *rettv UNUSED)
 {
     mouse_row = (time_t)tv_get_number(&argvars[0]) - 1;
     mouse_col = (time_t)tv_get_number(&argvars[1]) - 1;
 }
+#endif
 
     static void
 f_test_settime(typval_T *argvars, typval_T *rettv UNUSED)

Raspunde prin e-mail lui