Re: [vim/vim] Refactor to remove STRLEN() part 6 (PR #14796)

2024-05-21 Fir de Conversatie John Marriott

On 21-May-2024 09:57, zeertzjq (Vim Github Repository) wrote:


*@zeertzjq* commented on this pull request.



In src/tag.c 
:


>tagp.tagname);
-   if (!do_search(NULL, '/', '/', pbuf, (long)1,
+   if (!do_search(NULL, '/', '/', pbuf, len, (long)1,

Why is |len| used here? Shouldn't this be |pbuflen|?

—
Reply to this email directly, view it on GitHub 
, 
or unsubscribe 
.
You are receiving this because you are subscribed to this 
thread.Message ID: 


--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/14796/review/2067231278%40github.com 
.

I think you're right. A typo. Sorry.

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/69d75db7-9e24-4432-adfd-9ca750bb2703%40internode.on.net.


Re: Commit: patch 9.1.0409: too many strlen() calls in the regexp engine

2024-05-11 Fir de Conversatie John Marriott


On 12-May-2024 08:54, Tony Mechelynck wrote:

On Sun, May 12, 2024 at 12:15 AM Christian Brabandt  wrote:

patch 9.1.0409: too many strlen() calls in the regexp engine

Commit: 
https://github.com/vim/vim/commit/82792db6315f7c7b0e299cdde1566f2932a463f8
Author: John Marriott 
Date:   Sun May 12 00:07:17 2024 +0200

 patch 9.1.0409: too many strlen() calls in the regexp engine

 Problem:  too many strlen() calls in the regexp engine
 Solution: refactor code to retrieve strlen differently, make use
   of bsearch() for getting the character class
   (John Marriott)

 closes: #14648

 Signed-off-by: John Marriott 
 Signed-off-by: Christian Brabandt 




Hi Tony,

Please try the fix in PR#14754 or the attached patch.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/377c4060-08ba-466b-a759-737cabc15ddb%40internode.on.net.
--- ../../../vim/git/vim/src/regexp.c   2024-05-12 13:12:31.495260800 +1000
+++ ./regexp.c  2024-05-12 13:03:01.987293700 +1000
@@ -642,7 +642,7 @@
{
if (dirc == '?' && newp != NULL && p[1] == '?')
{
-   size_t  startplen;
+   size_t  startplen = 0;
 
// change "\?" to "?", make a copy first.
if (*newp == NULL)


Re: Query about updating search stats

2024-05-10 Fir de Conversatie John Marriott


On 10-May-2024 06:30, John Marriott wrote:

Hi all,

Does anyone know why the update_search_stat() function (in search.c) 
considers the search direction and cursor position when deciding if it 
needs to recompute the search stats?


In my testing they don't seem to matter. In fact they just cause 
recomputation when it's not required.


What am I missing?

Thanks
John

Ah the penny has dropped. I've got it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/6c8556f7-dbe6-4213-b757-65cf02c74d5a%40internode.on.net.


Query about updating search stats

2024-05-09 Fir de Conversatie John Marriott

Hi all,

Does anyone know why the update_search_stat() function (in search.c) 
considers the search direction and cursor position when deciding if it 
needs to recompute the search stats?


In my testing they don't seem to matter. In fact they just cause 
recomputation when it's not required.


What am I missing?

Thanks
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/4ee9eb79-81f2-4b9a-a377-014e4346deda%40internode.on.net.


Re: [vim/vim] Refactor to remove STRLEN() part 1 (PR #14287)

2024-04-03 Fir de Conversatie John Marriott



On 03-Apr-2024 05:03, Christian Brabandt (Vim Github Repository) wrote:


Thanks, looks good to me. Did you meaure how much this saves (e.g. 
startup time)?


—
Reply to this email directly, view it on GitHub 
.
You are receiving this because you are subscribed to this 
thread.Message ID: 


--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/14287/c2032712670%40github.com 
.

Hi Christian,

I didn't measure startup time, but I did measure number of comparisons.

My measurements:
Before the change startup with an empty file, event_name2nr() 
executed 42306 total "comparisons". In this instance a "comparison" 
comprises a call to STRLEN() and a call to STRNICMP().
After the change startup with an empty file, event_name2nr() executed 
6150 total "comparisons". In this instance a "comparison" is a call to 
STRNICMP().


That's an 85% reduction.

Sorry I should have put these numbers into the PR.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/11a29ba6-9090-444c-ac45-0bc287459121%40internode.on.net.


Re: [vim/vim] Reduce number of calls to STRLEN() (Issue #14002)

2024-02-13 Fir de Conversatie John Marriott


On 12-Feb-2024 02:32, Christian Brabandt (Vim Github Repository) wrote:


can you make a PR for this please?

—
Reply to this email directly, view it on GitHub 
.
You are receiving this because you are subscribed to this 
thread.Message ID: 


--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/vim/vim/issues/14002/1937786687%40github.com 
.

Hi Christian,

I have made my first PR (#14029).

When I did so, I got a 9 failing checks which mostly appear to be 
failing tests, like this:


command line..script 
/home/runner/work/vim/vim/src/testdir/runtest.vim[642]..function 
RunTheTest[57]..Test_prop_below_split_line[25]..StopVimInTerminal[17]..WaitForAssert[2]..4_WaitForCommon[11]..38 
line 1: Expected 'finished' but got 'running'

Flaky test failed too often, giving up


I'm not sure how to proceed with this. This is my first PR.

Any suggestions would be appreciated.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/be04c922-1adb-4f1c-a9a2-2642728fddae%40internode.on.net.


Re: Commit: patch 9.1.0071: Need a diff() Vim script function

2024-02-03 Fir de Conversatie John Marriott




On 04-Feb-2024 03:44, Christian Brabandt wrote:

On Sa, 03 Feb 2024, John Marriott wrote:


Sorry, I'm not sure what the correct fix is.

I see Yegappan has already a patch for it in #13964. I'll merge it in a
second.

Jost wondering, are you usually building without the diff feature?

Thanks,
Christian

Hi Christian,

Yeah, I try to keep this build as small as possible.

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/28b8a4dc-f557-4647-bb20-1b1231da410a%40internode.on.net.


Re: Commit: patch 9.1.0071: Need a diff() Vim script function

2024-02-02 Fir de Conversatie John Marriott



On 02-Feb-2024 08:30, Christian Brabandt wrote:

patch 9.1.0071: Need a diff() Vim script function

Commit:https://github.com/vim/vim/commit/fa37835b8c0ed0f83952978fca4c332335ca7c46
Author: Yegappan Lakshmanan
Date:   Thu Feb 1 22:05:27 2024 +0100

 patch 9.1.0071: Need a diff() Vim script function
 
 Problem:  Need a diff() Vim script function

 Solution: Add the diff() Vim script function using the
   xdiff internal diff library, add support for
   "unified" and "indices" mode.
   (Yegappan Lakshmanan)
 
 fixes: #4241

 closes: #12321
 
 Signed-off-by: Yegappan Lakshmanan

 Signed-off-by: Christian Brabandt


After this patch, msys2 (clang x64 17.0.6) gives these errors if 
FEAT_DIFF is disabled:


clang -c -I. -Iproto -DWIN32 -DWINVER=0x0A00 -D_WIN32_WINNT=0x0A00 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD diff.c -o gobjx86-64/diff.o
diff.c:3499:25: error: use of undeclared identifier 
'DIFF_INTERNAL_OUTPUT_UNIFIED'

 3499 | *diff_output_fmt = DIFF_INTERNAL_OUTPUT_UNIFIED;
  |    ^
diff.c:3501:25: error: use of undeclared identifier 
'DIFF_INTERNAL_OUTPUT_INDICES'

 3501 | *diff_output_fmt = DIFF_INTERNAL_OUTPUT_INDICES;
  |    ^
diff.c:3510:15: error: use of undeclared identifier 'DIFF_IBLANK'
 3510 | *diffopts |= DIFF_IBLANK;
  |  ^
diff.c:3512:15: error: use of undeclared identifier 'DIFF_ICASE'
 3512 | *diffopts |= DIFF_ICASE;
  |  ^
diff.c:3514:15: error: use of undeclared identifier 'DIFF_IWHITE'
 3514 | *diffopts |= DIFF_IWHITE;
  |  ^
diff.c:3516:15: error: use of undeclared identifier 'DIFF_IWHITEALL'
 3516 | *diffopts |= DIFF_IWHITEALL;
  |  ^
diff.c:3518:15: error: use of undeclared identifier 'DIFF_IWHITEEOL'
 3518 | *diffopts |= DIFF_IWHITEEOL;
  |  ^
diff.c:3530:27: error: unknown type name 'diffin_T'
 3530 | list_to_diffin(list_T *l, diffin_T *din, int icase)
  |   ^
diff.c:3563:23: error: unknown type name 'diffhunk_T'
 3563 | get_diff_hunk_indices(diffhunk_T *hunk)
  |   ^
9 errors generated.
make: *** [Make_cyg_ming.mak:1214: gobjx86-64/diff.o] Error 1


Sorry, I'm not sure what the correct fix is.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/579cf8f5-e10f-4607-8ca3-2939cd29b218%40internode.on.net.


Re: Commit: patch 9.1.0061: UX of visual highlighting can be improved

2024-01-30 Fir de Conversatie John Marriott



On 31-Jan-2024 04:21, John Marriott wrote:



On 31-Jan-2024 03:56, Christian Brabandt wrote:

Can you try the following patch please? (this partly restores the old
behaviour for 8 color terminals):

#v+
diff --git a/src/highlight.c b/src/highlight.c
index 85726f828..df2b97c27 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -440,6 +440,8 @@ init_highlight(
  // Clear the attributes, needed when changing the t_Co value.
  if (t_colors <= 8)
  {
+   do_highlight((char_u *)"Visual cterm=reverse ctermbg=NONE",
+    FALSE, TRUE);
 if (*p_bg == 'l')
 do_highlight((char_u *)"Search ctermfg=black", FALSE, 
TRUE);

  }
#v-

Thanks,
Christian

Hi Christian,

Yes $TERM=vt220

:set t_Co? from inside vim gives:
t_Co=

I tried your patch and it seems to fix it. I don't understand why 
though. When I run :set t_Co inside my Windows GUI vim I get 
t_Co=16777216. If the number of colours is 16M, how can t_colors be <= 
8 to affect the outcome?


Cheers
John


Wait a minute. I reverted the patch (highlight.c now matches the git 
repository) and did a complete rebuilt and now it's working?!? What? 
Maybe my colour problem was caused by something else but it looks ok 
now. Patch not needed.


Crank call...


--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/acb971bd-52a3-4ea2-96d4-74f8e9da5cc2%40internode.on.net.


Re: Commit: patch 9.1.0061: UX of visual highlighting can be improved

2024-01-30 Fir de Conversatie John Marriott




On 31-Jan-2024 03:56, Christian Brabandt wrote:

On Mi, 31 Jan 2024, John Marriott wrote:


The terminal is VT220 emulation. Is that what you meant?

so $TERM=vt220?


I don't know about number of colours. How do you determine that?

>From within Vim :set t_Co?


Anyway, :hi Visual for 9.1.0060 gives:
Visual    term=reverse cterm=reverse guibh=LightGrey

:hi Visual for 9.1.0061+ gives:
Visual     xtermfg=15 xtermbg=8 guibg=LightGrey

I added:
hi Visual term=reverse cterm=NONE ctermbg=LightGrey guibg=LightGrey to my
.vimrc and I'm back to normal. Thanks. As for my windows GUI build with this
patch, my colours have lost the plot entirely. I use a slightly modified
"evening" colour scheme which usually looks like this: After this patch, it
looks like this: Adding the removed code from highlight.c fixes it: I hope
this makes sense. Cheers John

Can you try the following patch please? (this partly restores the old
behaviour for 8 color terminals):

#v+
diff --git a/src/highlight.c b/src/highlight.c
index 85726f828..df2b97c27 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -440,6 +440,8 @@ init_highlight(
  // Clear the attributes, needed when changing the t_Co value.
  if (t_colors <= 8)
  {
+   do_highlight((char_u *)"Visual cterm=reverse ctermbg=NONE",
+FALSE, TRUE);
 if (*p_bg == 'l')
 do_highlight((char_u *)"Search ctermfg=black", FALSE, TRUE);
  }
#v-

Thanks,
Christian

Hi Christian,

Yes $TERM=vt220

:set t_Co? from inside vim gives:
t_Co=

I tried your patch and it seems to fix it. I don't understand why 
though. When I run :set t_Co inside my Windows GUI vim I get 
t_Co=16777216. If the number of colours is 16M, how can t_colors be <= 8 
to affect the outcome?


Cheers
John


--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/0f840aca-748b-4b41-b830-2c615aca7eaf%40internode.on.net.


Re: Commit: patch 9.1.0061: UX of visual highlighting can be improved

2024-01-29 Fir de Conversatie John Marriott



On 29-Jan-2024 09:41, Christian Brabandt wrote:

I know this change could be considered quite controversial. However, I
hope I have improved readability and UX of visual highlighting quite a
bit, even so the syntax highlighting of the visual highlighted items got
lost.  Let me know if you think this is a problem.

Thanks,
Christian

Hi Christian,

After this patch I am getting some weird results in my console version 
of vim on HP-UX (old I know!).


Here is an example of line selection (shift-v) with version 9.1.0060, 
prior to this change (vim started with vim --clean):



Here is the same after the patch (again vim started with vim --clean):


You can see the bulk of the highlight is not visible, just a little 
reverse video at the two line ends.


Any ideas of what I can do to restore the previous behaviour with this 
patch?


Thanks
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/37ba8bd2-c506-4d74-b50c-54f0ae2a6f98%40internode.on.net.


Re: Commit: patch 9.1.0030: Cannot use terminal alternate font

2024-01-16 Fir de Conversatie John Marriott


On 16-Jan-2024 08:30, Christian Brabandt wrote:

patch 9.1.0030: Cannot use terminal alternate font

Commit:https://github.com/vim/vim/commit/a606f3ac036e5f3dc313f620e6b4bc00812314f9
Author: PMunch
Date:   Wed Nov 15 15:35:49 2023 +0100

 patch 9.1.0030: Cannot use terminal alternate font
 
 Problem:  Cannot use terminal alternate fonts (PMunch)

 Solution: Support terminal alternate fonts using
   CSI SGR 10-20 and t_CF code (PMunch)
 
 Add support for alternate font highlighting
 
 This adds support for alternate font highlighting using CSI SGR 10-20.

 Few terminals currently support this, but with added tool support this
 should improve over time. The change here is more or less taken from how
 colors are configured and applied, but there might be some parts I
 missed while implementing it. Changing fonts is done through the new
 `:hi ctermfont` attribute which takes a number, 0 is the normal font, and
 the numbers 1-9 select an "alternative" font. Which fonts are in use is
 up to the terminal.
 
 fixes: #13513

 closes: #13537
 
 Signed-off-by: PMunch

 Signed-off-by: Christian Brabandt


After this patch, clang x64 17.0.6 (msys2 on Windows 10), gives this 
warning:


clang -c -I. -Iproto -DWIN32 -DWINVER=0x0A00 -D_WIN32_WINNT=0x0A00 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE  term.c -o objx86-64/term.o

term.c:640:21: warning: unused variable 'special_term' [-Wunused-variable]

  640 | static tcap_entry_T special_term[] = {

  | ^~~~

1 warning generated.



The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/5f94db2f-3bdb-455f-8135-2f3011256913%40internode.on.net.
--- term.c.orig 2024-01-17 05:53:12.745304200 +1100
+++ term.c  2024-01-17 06:04:53.648668300 +1100
@@ -637,11 +637,13 @@
 };
 #endif
 
+#ifdef HAVE_TGETENT
 static tcap_entry_T special_term[] = {
 // These are printf strings, not terminal codes.
 {(int)KS_CF,   "\033[%dm"},
 {(int)KS_NAME, NULL}  // end marker
 };
+#endif
 
 /*
  * iris-ansi for Silicon Graphics machines.


Re: Commit: patch 9.0.1991: no cmdline completion for setting the font

2023-10-05 Fir de Conversatie John Marriott


On 06-Oct-2023 06:00, Christian Brabandt wrote:

patch 9.0.1991: no cmdline completion for setting the font

Commit:https://github.com/vim/vim/commit/290b887e8cc2c0d3dfc7f315b2052472c7c589cc
Author: Yee Cheng Chin
Date:   Thu Oct 5 20:54:21 2023 +0200

 patch 9.0.1991: no cmdline completion for setting the font
 
 Problem:  no cmdline completion for setting the font

 Solution: enable it on Win32 and GTK builds
 
 Add guifont cmdline completion (for Windows and GTK)
 
 For Windows, auto-complete will only suggest monospace fonts as that's

 the only types allowed. Will also suggest font options after the colon,
 including suggesting the current font size for convenience, and misc
 charset and quality options like `cANSI` and `qCLEARTYPE`.
 
 For GTK, auto-complete will suggest only monospace fonts for `guifont`

 but will include all fonts for `guifontwide`. The completion code
 doesn't currently suggest the current font size, as the GTK guifont
 format does not have a clear delimiter (':' for other platforms).
 
 closes: #13264
 
 Signed-off-by: Christian Brabandt

 Co-authored-by: Yee Cheng Chin



Hi All,

After this patch, clang 17.0.1 x64 (on msys2 x64, Win 8.1 x64) gives 
this warning for non-gui build:


optionstr.c:902:1: warning: unused function 'expand_set_opt_callback' 
[-Wunused-function]

  902 | expand_set_opt_callback(
  | ^~~
1 warning generated.


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/9ca36f83-d18e-45ef-9c4d-c09d0e1fc7ed%40internode.on.net.
--- optionstr.c.orig2023-10-06 05:58:30.484679800 +1100
+++ optionstr.c 2023-10-06 06:19:40.750410800 +1100
@@ -849,6 +849,7 @@
 return ret;
 }
 
+# if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK)
 static garray_T *expand_cb_ga;
 static optexpand_T *expand_cb_args;
 
@@ -938,6 +939,7 @@
 *numMatches = ga.ga_len;
 return OK;
 }
+#endif
 
 /*
  * Expand an option which is a list of flags.


Re: patch 9.0.1704: Cannot use positional arguments for printf()

2023-08-15 Fir de Conversatie John Marriott

On 14-Aug-2023 02:15, Christian Brabandt wrote:

patch 9.0.1704: Cannot use positional arguments for printf()

Commit: 
https://github.com/vim/vim/commit/0c6181fec4c362eb9682d5af583341eb20cb1af5
Author: Christ van Willegen 
Date:   Sun Aug 13 18:03:14 2023 +0200

 patch 9.0.1704: Cannot use positional arguments for printf()
 
 Problem: Cannot use positional arguments for printf()

 Solution: Support positional arguments in string formatting
 
 closes: #12140
 
 Signed-off-by: Christian Brabandt 

 Co-authored-by: Christ van Willegen 



Hi All,

After this patch my HPUX build fails with this linker error:

Starting make in the src directory.
If there are problems, cd to the src directory and run make there
    cd src && make first
    cc -c -I. -Iproto -DHAVE_CONFIG_H     -O2       -D_REENTRANT -o 
objects/strings.o strings.c
    cc -c -I. -Iproto -DHAVE_CONFIG_H     -O2       -D_REENTRANT 
version.c -o objects/version.o

link.sh: The file 'auto/link.sed' exists, which is going to be used now.
link.sh: If linking fails, try deleting the auto/link.sed file.
link.sh: If this fails too, try creating an empty auto/link.sed file.
link.sh: Using auto/link.sed file to omit a few libraries
  cc   -L/usr/local/lib     -o vim objects/alloc.o  objects/arabic.o 
 objects/arglist.o  objects/autocmd.o  objects/beval.o 
 objects/buffer.o  objects/change.o  objects/blob.o  objects/blowfish.o 
 objects/cindent.o  objects/clientserver.o  objects/clipboard.o 
 objects/cmdexpand.o  objects/cmdhist.o  objects/crypt.o 
 objects/crypt_zip.o  objects/debugger.o  objects/dict.o 
 objects/diff.o  objects/digraph.o  objects/drawline.o 
 objects/drawscreen.o  objects/edit.o  objects/eval.o 
 objects/evalbuffer.o  objects/evalfunc.o  objects/evalvars.o 
 objects/evalwindow.o  objects/ex_cmds.o  objects/ex_cmds2.o 
 objects/ex_docmd.o  objects/ex_eval.o  objects/ex_getln.o 
 objects/fileio.o  objects/filepath.o  objects/findfile.o 
 objects/float.o  objects/fold.o  objects/getchar.o  objects/gui_xim.o 
 objects/hardcopy.o  objects/hashtab.o  objects/help.o 
 objects/highlight.o  objects/if_cscope.o  objects/if_xcmdsrv.o 
 objects/indent.o  objects/insexpand.o  objects/list.o 
 objects/locale.o  objects/logfile.o  objects/map.o  objects/mark.o 
 objects/match.o  objects/mbyte.o  objects/memline.o  objects/menu.o 
 objects/misc1.o  objects/misc2.o  objects/mouse.o  objects/move.o 
 objects/normal.o  objects/ops.o  objects/option.o  objects/optionstr.o 
 objects/os_unix.o  objects/pathdef.o  objects/popupmenu.o 
 objects/popupwin.o  objects/profiler.o  objects/pty.o 
 objects/quickfix.o  objects/regexp.o  objects/register.o 
 objects/screen.o  objects/scriptfile.o  objects/search.o 
 objects/session.o  objects/sha256.o  objects/sign.o  objects/sound.o 
 objects/spell.o  objects/spellfile.o  objects/spellsuggest.o 
 objects/strings.o  objects/syntax.o  objects/tag.o  objects/term.o 
 objects/terminal.o  objects/testing.o  objects/textformat.o 
 objects/textobject.o  objects/textprop.o  objects/time.o 
 objects/typval.o  objects/ui.o  objects/undo.o  objects/usercmd.o 
 objects/userfunc.o  objects/version.o  objects/vim9class.o 
 objects/vim9cmds.o  objects/vim9compile.o  objects/vim9execute.o 
 objects/vim9expr.o  objects/vim9instr.o  objects/vim9script.o 
 objects/vim9type.o  objects/viminfo.o  objects/window.o 
 objects/bufwrite.o               objects/charset.o  objects/json.o 
 objects/main.o  objects/memfile.o  objects/message.o               -lm 
-ltermlib

/usr/ccs/bin/ld: Unsatisfied symbols:
   va_copy (first referenced in objects/strings.o) (code)
link.sh: Linking failed, making auto/link.sed empty and trying again
creating auto/pathdef.c
    cc -c -I. -Iproto -DHAVE_CONFIG_H     -O2       -D_REENTRANT -o 
objects/pathdef.o auto/pathdef.c

link.sh: Using unmodified link command
  cc   -L/usr/local/lib     -o vim objects/alloc.o  objects/arabic.o 
 objects/arglist.o  objects/autocmd.o  objects/beval.o 
 objects/buffer.o  objects/change.o  objects/blob.o  objects/blowfish.o 
 objects/cindent.o  objects/clientserver.o  objects/clipboard.o 
 objects/cmdexpand.o  objects/cmdhist.o  objects/crypt.o 
 objects/crypt_zip.o  objects/debugger.o  objects/dict.o 
 objects/diff.o  objects/digraph.o  objects/drawline.o 
 objects/drawscreen.o  objects/edit.o  objects/eval.o 
 objects/evalbuffer.o  objects/evalfunc.o  objects/evalvars.o 
 objects/evalwindow.o  objects/ex_cmds.o  objects/ex_cmds2.o 
 objects/ex_docmd.o  objects/ex_eval.o  objects/ex_getln.o 
 objects/fileio.o  objects/filepath.o  objects/findfile.o 
 objects/float.o  objects/fold.o  objects/getchar.o  objects/gui_xim.o 
 objects/hardcopy.o  objects/hashtab.o  objects/help.o 
 objects/highlight.o  objects/if_cscope.o  objects/if_xcmdsrv.o 
 objects/indent.o  objects/insexpand.o  objects/list.o 
 objects/locale.o  objects/logfile.o  objects/map.o  objects/mark.o 
 objects/match.o  objects/mbyte.o  objects/memline.o  objects/menu.o 
 

Re: Patch 9.0.1418

2023-03-21 Fir de Conversatie John Marriott


On 21-Mar-2023 04:31, Bram Moolenaar wrote:

Patch 9.0.1418
Problem:The included xdiff code is a bit outdated.
Solution:   Sync with the latest git xdiff code. (Yee Cheng Chin,
 closes #12181)
Files:  src/xdiff/README.txt, src/xdiff/xdiff.h, src/xdiff/xdiffi.c,
 src/xdiff/xdiffi.h, src/xdiff/xemit.c, src/xdiff/xhistogram.c,
 src/xdiff/xmacros.h, src/xdiff/xpatience.c, src/xdiff/xprepare.c,
 src/xdiff/xutils.c, src/xdiff/xutils.h




After this patch, my HPUX build fails with this error:

    cc -c -I. -Iproto -DHAVE_CONFIG_H -O2   -D_REENTRANT -o 
objects/xdiffi.o xdiff/xdiffi.c

cc: "xdiff/xdiffi.c", line 340: error 1588: "SIZE_MAX" undefined.
cc: "xdiff/xdiffi.c", line 340: error 1552: First expression of ?: must 
be arithmetic.

*** Error exit code 1

Stop.
*** Error exit code 1


The attached patch fixes it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/a5832fbb-6393-c4c5-33d0-7e45904a5aee%40internode.on.net.
--- xmacros.h.orig  2023-03-21 05:55:55.215756200 +1100
+++ xmacros.h   2023-03-22 05:46:58.549399200 +1100
@@ -23,8 +23,11 @@
 #if !defined(XMACROS_H)
 #define XMACROS_H
 
-
-
+#ifdef __hpux
+#ifndef SIZE_MAX
+#define SIZE_MAX ((size_t)(-1))
+#endif
+#endif
 
 #define XDL_MIN(a, b) ((a) < (b) ? (a): (b))
 #define XDL_MAX(a, b) ((a) > (b) ? (a): (b))


Re: Patch 9.0.1411

2023-03-17 Fir de Conversatie John Marriott


On 17-Mar-2023 08:43, Bram Moolenaar wrote:

Patch 9.0.1411
Problem:Accuracy of profiling is not optimal.
Solution:   Use CLOCK_MONOTONIC if possible. (Ernie Rael, closes #12129)
Files:  runtime/doc/builtin.txt, runtime/doc/repeat.txt, src/evalfunc.c,
 src/profiler.c, src/time.c, src/vim.h,
 src/testdir/test_profile.vim, src/testdir/test_sleep.vim



After this patch msys2-64 (clang 15.0.7) gives this warning:

clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD time.c -o gobjx86-64/time.o

time.c:261:17: warning: unused variable 'buf' [-Wunused-variable]
    static char buf[50];
    ^
1 warning generated.


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/cf38b163-2465-0e6f-8be1-b5b152b02c5e%40internode.on.net.
--- time.c.orig 2023-03-18 05:21:10.269170700 +1100
+++ time.c  2023-03-18 05:26:53.749919300 +1100
@@ -258,9 +258,12 @@
 void
 f_reltimestr(typval_T *argvars UNUSED, typval_T *rettv)
 {
-static char buf[50];
 # ifdef FEAT_RELTIME
 proftime_T tm;
+# ifdef MSWIN
+# else
+static char buf[50];
+# endif
 # endif
 
 rettv->v_type = VAR_STRING;


Re: Patch 9.0.1397

2023-03-15 Fir de Conversatie John Marriott



On 16-Mar-2023 04:09, Bram Moolenaar wrote:

John Marriott wrote:


On 11-Mar-2023 03:36, Bram Moolenaar wrote:

Patch 9.0.1397
Problem:Highlight for popupmenu kind and extra cannot be set.
Solution:   Add PmenuKind, PmenuKindSel, PmenuExtra and PmenuExtraSel
  highlight groups and use them. (Gianmaria Bajo, closes #12114)
Files:  runtime/doc/syntax.txt, runtime/doc/options.txt, src/highlight.c,
  src/optiondefs.h, src/popupmenu.c, src/vim.h,
  src/testdir/dumps/Test_pum_highlights_01.dump,
  src/testdir/dumps/Test_pum_highlights_02.dump,
  src/testdir/test_popup.vim



After this patch, my HP-UX build fails with this error:

      cc -c -I. -Iproto -DHAVE_CONFIG_H     -O2       -D_REENTRANT -o
objects/popupmenu.o popupmenu.c
cc: "popupmenu.c", line 439: error 1521: Incorrect initialization.
cc: "popupmenu.c", line 439: error 1521: Incorrect initialization.
cc: "popupmenu.c", line 439: error 1521: Incorrect initialization.
cc: "popupmenu.c", line 440: error 1521: Incorrect initialization.
cc: "popupmenu.c", line 440: error 1521: Incorrect initialization.
cc: "popupmenu.c", line 440: error 1521: Incorrect initialization.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.


The attached patch seems to fix it.

Thanks, I'll include it.  Perhaps changing "ha" to "highlight_attr" to
avoid the intermediate variable also works?


You da man.

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/4de44700-5d48-8c4c-76fa-7457931885e5%40internode.on.net.


Re: Patch 9.0.1397

2023-03-14 Fir de Conversatie John Marriott


On 11-Mar-2023 03:36, Bram Moolenaar wrote:

Patch 9.0.1397
Problem:Highlight for popupmenu kind and extra cannot be set.
Solution:   Add PmenuKind, PmenuKindSel, PmenuExtra and PmenuExtraSel
 highlight groups and use them. (Gianmaria Bajo, closes #12114)
Files:  runtime/doc/syntax.txt, runtime/doc/options.txt, src/highlight.c,
 src/optiondefs.h, src/popupmenu.c, src/vim.h,
 src/testdir/dumps/Test_pum_highlights_01.dump,
 src/testdir/dumps/Test_pum_highlights_02.dump,
 src/testdir/test_popup.vim



After this patch, my HP-UX build fails with this error:

    cc -c -I. -Iproto -DHAVE_CONFIG_H     -O2       -D_REENTRANT -o 
objects/popupmenu.o popupmenu.c

cc: "popupmenu.c", line 439: error 1521: Incorrect initialization.
cc: "popupmenu.c", line 439: error 1521: Incorrect initialization.
cc: "popupmenu.c", line 439: error 1521: Incorrect initialization.
cc: "popupmenu.c", line 440: error 1521: Incorrect initialization.
cc: "popupmenu.c", line 440: error 1521: Incorrect initialization.
cc: "popupmenu.c", line 440: error 1521: Incorrect initialization.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.


The attached patch seems to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/1694bf5f-88d8-a52e-b8cf-86d058b2c7e8%40internode.on.net.
--- popupmenu.c.orig2023-03-11 06:01:39.098424600 +1100
+++ popupmenu.c 2023-03-15 06:02:02.365739200 +1100
@@ -435,9 +435,20 @@
 intn;
 
 int *ha = highlight_attr;
-//  "word" "kind"  "extra text"
-intattrsNorm[3] = { ha[HLF_PNI],   ha[HLF_PNK],ha[HLF_PNX] };
-intattrsSel[3] =  { ha[HLF_PSI],   ha[HLF_PSK],ha[HLF_PSX] };
+intattrsNorm[3];
+intattrsSel[3];
+
+// "word"
+attrsNorm[0] = ha[HLF_PNI];
+attrsSel[0] = ha[HLF_PSI];
+
+// "kind"
+attrsNorm[1] = ha[HLF_PNK];
+attrsSel[1] = ha[HLF_PSK];
+
+// "extra text"
+attrsNorm[2] = ha[HLF_PNX];
+attrsSel[2] = ha[HLF_PSX];
 
 if (call_update_screen)
 {


Re: Patch 9.0.1320

2023-02-18 Fir de Conversatie John Marriott


On 19-Feb-2023 01:43, Bram Moolenaar wrote:

Patch 9.0.1320
Problem:Checking the type of a null object causes a crash.
Solution:   Don't try to get the class of a null object. (closes #12005)
 Handle error from calling a user function better.
Files:  src/vim9type.c, src/vim.h, src/userfunc.c, src/proto/userfunc.pro,
 src/evalfunc.c, src/proto/evalfunc.pro, src/vim9execute.c,
 src/if_lua.c, src/testdir/test_vim9_class.vim


After this patch, msys64 (clang 15.0.7) gives this warning on gui and 
non-gui builds:


clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD vim9expr.c -o gobjx86-64/vim9expr.o
vim9expr.c:993:57: warning: incompatible pointer types passing 'int *' 
to parameter of type 'funcerror_T *' [-Wincompatible-pointer-types]

    name = fname_trans_sid(namebuf, fname_buf, , );
    ^~
proto/userfunc.pro:12:88: note: passing argument to parameter 'error' here
char_u *fname_trans_sid(char_u *name, char_u *fname_buf, char_u 
**tofree, funcerror_T *error);

^
1 warning generated.


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/ef2654bb-6c9f-83bb-0b35-b22b4fde9383%40internode.on.net.
--- vim9expr.c.orig 2023-02-10 04:50:57.623550400 +1100
+++ vim9expr.c  2023-02-19 06:07:55.305866400 +1100
@@ -919,7 +919,7 @@
 char_u namebuf[MAX_FUNC_NAME_LEN];
 char_u fname_buf[FLEN_FIXED + 1];
 char_u *tofree = NULL;
-interror = FCERR_NONE;
+funcerror_Terror = FCERR_NONE;
 ufunc_T*ufunc = NULL;
 intres = FAIL;
 intis_autoload;


Re: Patch 9.0.1208

2023-01-16 Fir de Conversatie John Marriott



On 17-Jan-2023 06:35, Enan Ajmain wrote:

On Tue, 17 Jan 2023 06:09:22 +1100
John Marriott  wrote:

After this patch, msys64 (clang 15.0.5) gives this error:
[...]

Unrelated but wanted clarification.  By 'msys64' do you mean clang64
build system of msys2 (i.e., msys/clang64)?  or do you mean mingw64
system of msys2 (i.e., msys/mingw64) with $CC set to 'clang'?



Hi Enan,

msys64/ucrt64 with $CC = clang and $CXX=clang++.

My $MSYSTEM = UCRT64.

I hope this helps

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/cfceef83-94cd-46eb-7bbe-1a0fbee36c4d%40internode.on.net.


Re: Patch 9.0.1208

2023-01-16 Fir de Conversatie John Marriott


On 17-Jan-2023 05:19, Bram Moolenaar wrote:

Patch 9.0.1208
Problem:Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
 closes #11819)
Files:  src/netbeans.c, src/normal.c, src/ops.c, src/option.c,
 src/optionstr.c, src/os_amiga.c, src/os_mac_conv.c,
 src/os_mswin.c, src/os_qnx.c, src/os_unix.c, src/os_win32.c




After this patch, msys64 (clang 15.0.5) gives this error:

clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD os_mswin.c -o gobjx86-64/os_mswin.o

os_mswin.c:1574:5: error: expected expression
    DWORD err = CommDlgExtendedError();
    ^
os_mswin.c:1576:9: error: use of undeclared identifier 'err'; did you 
mean 'erf'?

    if (err)
    ^~~
    erf
D:/msys64/ucrt64/include/math.h:900:25: note: 'erf' declared here
  extern double __cdecl erf (double);
    ^
os_mswin.c:1585:9: error: use of undeclared identifier 'err'; did you 
mean 'erf'?

    NULL, err, 0, (LPTSTR)(), 0, NULL);
  ^~~
  erf
D:/msys64/ucrt64/include/math.h:900:25: note: 'erf' declared here
  extern double __cdecl erf (double);
    ^
3 errors generated.
make: *** [Make_cyg_ming.mak:1206: gobjx86-64/os_mswin.o] Error 1


The attach patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/358d3e7d-2486-6478-e38e-1a4dd6a7aedf%40internode.on.net.
--- os_mswin.c.orig 2023-01-17 05:56:58.987408500 +1100
+++ os_mswin.c  2023-01-17 06:04:55.972839800 +1100
@@ -1390,6 +1390,8 @@
 DEVNAMES   *devname;
 inti;
 
+DWORD  err;
+
 bUserAbort = &(psettings->user_abort);
 CLEAR_FIELD(prt_dlg);
 prt_dlg.lStructSize = sizeof(PRINTDLGW);
@@ -1571,7 +1573,7 @@
 return TRUE;
 
 init_fail_dlg:
-DWORD err = CommDlgExtendedError();
+err = CommDlgExtendedError();
 
 if (err)
 {


Re: Patch 9.0.1192

2023-01-13 Fir de Conversatie John Marriott


On 14-Jan-2023 04:37, Bram Moolenaar wrote:

Patch 9.0.1192
Problem:No error when class function argument shadows a member.
Solution:   Check for shadowing.
Files:  src/vim9class.c, src/testdir/test_vim9_class.vim



After this patch, msys64 (clang 15.0.5) gives this warning:

clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD vim9class.c -o gobjx86-64/vim9class.o
vim9class.c:720:39: warning: comparison between pointer and integer 
('int' and 'void *') [-Wpointer-integer-compare]
    if (STRNCMP(uf->uf_name, "new", 3) == NULL && 
il == 2)

    ~~ ^  
1 warning generated.


The attached patch tries to fix it. I hope I have the logic the right 
way around. 


Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/913b5df1-1023-da52-3f93-b5b28a698581%40internode.on.net.
--- vim9class.c.orig2023-01-14 05:30:05.371749200 +1100
+++ vim9class.c 2023-01-14 05:36:04.203555800 +1100
@@ -717,7 +717,7 @@
{
// For a "new()" function "this.member" arguments are
// OK.  TODO: check for the "this." prefix.
-   if (STRNCMP(uf->uf_name, "new", 3) == NULL && il == 2)
+   if (STRNCMP(uf->uf_name, "new", 3) == 0 && il == 2)
continue;
garray_T *mgap = il == 1 ?  : 
for (int mi = 0; mi < mgap->ga_len; ++mi)


Re: Patch 9.0.1175

2023-01-11 Fir de Conversatie John Marriott


On 11-Jan-2023 22:46, Bram Moolenaar wrote:

Patch 9.0.1175
Problem:The set_ref_in_item() function is too long.
Solution:   Use a separate function for more complicated types. (Yegappan
 Lakshmanan, closes #11802)
Files:  src/eval.c




After this patch msys64 (clang 15.0.5) gives this error message:

clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD eval.c -o gobjx86-64/eval.o
eval.c:5773:42: error: no member named 'v_job' in 'union 
typval_S::(unnamed at ./structs.h:1548:5)'

    return set_ref_in_item_job(tv->vval.v_job, copyID,
    ^
eval.c:5777:46: error: no member named 'v_channel' in 'union 
typval_S::(unnamed at ./structs.h:1548:5)'

    return set_ref_in_item_channel(tv->vval.v_channel, copyID,
    ^
2 errors generated.
make: *** [Make_cyg_ming.mak:1206: gobjx86-64/eval.o] Error 1


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/029b4220-a6b3-5dcf-aa38-fec5b8709308%40internode.on.net.
--- eval.c.orig 2023-01-12 05:46:53.096761500 +1100
+++ eval.c  2023-01-12 06:01:15.55792 +1100
@@ -5580,6 +5580,7 @@
 return abort;
 }
 
+#ifdef FEAT_JOB_CHANNEL
 /*
  * Mark the job "pt" with "copyID".
  * Also see set_ref_in_item().
@@ -5591,7 +5592,6 @@
 ht_stack_T **ht_stack,
 list_stack_T   **list_stack)
 {
-#ifdef FEAT_JOB_CHANNEL
 typval_Tdtv;
 
 if (job == NULL || job->jv_copyID == copyID)
@@ -5610,7 +5610,6 @@
dtv.vval.v_partial = job->jv_exit_cb.cb_partial;
set_ref_in_item(, copyID, ht_stack, list_stack);
 }
-#endif
 
 return FALSE;
 }
@@ -5626,7 +5625,6 @@
 ht_stack_T **ht_stack,
 list_stack_T   **list_stack)
 {
-#ifdef FEAT_JOB_CHANNEL
 typval_Tdtv;
 
 if (ch == NULL || ch->ch_copyID == copyID)
@@ -5665,10 +5663,10 @@
dtv.vval.v_partial = ch->ch_close_cb.cb_partial;
set_ref_in_item(, copyID, ht_stack, list_stack);
 }
-#endif
 
 return FALSE;
 }
+#endif
 
 /*
  * Mark the class "cl" with "copyID".
@@ -5770,12 +5768,20 @@
ht_stack, list_stack);
 
case VAR_JOB:
+#ifdef FEAT_JOB_CHANNEL
return set_ref_in_item_job(tv->vval.v_job, copyID,
 ht_stack, list_stack);
+#else
+   break;
+#endif
 
case VAR_CHANNEL:
+#ifdef FEAT_JOB_CHANNEL
return set_ref_in_item_channel(tv->vval.v_channel, copyID,
 ht_stack, list_stack);
+#else
+   break;
+#endif
 
case VAR_CLASS:
return set_ref_in_item_class(tv->vval.v_class, copyID,


Re: Patch 9.0.1168

2023-01-10 Fir de Conversatie John Marriott


On 10-Jan-2023 23:38, Bram Moolenaar wrote:

Patch 9.0.1168
Problem:Code to enable/disable mouse is not from terminfo/termcap.
Solution:   Request the "XM" entry and use it to set 'ttymouse' if possible.
Files:  runtime/doc/options.txt, src/term.c, src/proto/term.pro,
 src/termdefs.h, src/os_unix.c, src/optiondefs.h




After this patch msys64 (clang 15.0.5) gives this warning:

clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD term.c -o gobjx86-64/term.o
term.c:2164:9: warning: variable 'did_set_ttym' set but not used 
[-Wunused-but-set-variable]

    int did_set_ttym = FALSE;
    ^
1 warning generated.


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/8f0f4f93-f4a4-2d0b-74fc-825b2407cac4%40internode.on.net.
--- term.c.orig 2023-01-11 05:41:51.601366200 +1100
+++ term.c  2023-01-11 05:50:51.350287200 +1100
@@ -2159,6 +2159,7 @@
 init_term_props(FALSE);
 #endif
 
+#if defined(UNIX) || defined(VMS)
 // If the first number in t_XM is 1006 then the terminal will support SGR
 // mouse reporting.
 int did_set_ttym = FALSE;
@@ -2175,7 +2176,6 @@
}
 }
 
-#if defined(UNIX) || defined(VMS)
 /*
  * For Unix, set the 'ttymouse' option to the type of mouse to be used.
  * The termcode for the mouse is added as a side effect in option.c.


Re: Patch 9.0.1150

2023-01-05 Fir de Conversatie John Marriott



On 06-Jan-2023 07:00, Bram Moolenaar wrote:

Patch 9.0.1150
Problem::interface is not implemented yet.
Solution:   Implement the basics of :interface.
Files:  src/ex_cmds.h, src/ex_docmd.c, src/vim9class.c,
 src/proto/vim9class.pro, src/errors.h, src/vim.h, src/userfunc.c,
 src/proto/userfunc.pro, src/vim9compile.c, src/vim9execute.c,
 src/testdir/test_vim9_class.vim



After this patch msys64 (clang 15.0.5) gives these errors:

clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD vim9class.c -o gobjx86-64/vim9class.o

vim9class.c:450:10: error: no member named 'class_flags' in 'struct class_S'
    cl->class_flags = CLASS_INTERFACE;
    ~~  ^
vim9class.c:450:24: error: use of undeclared identifier 
'CLASS_INTERFACE'; did you mean 'TKIND_INTERFACE'?

    cl->class_flags = CLASS_INTERFACE;
  ^~~
  TKIND_INTERFACE
D:/msys64/ucrt64/include/oaidl.h:652:5: note: 'TKIND_INTERFACE' declared 
here

    TKIND_INTERFACE = 3,
    ^
2 errors generated.
make: *** [Make_cyg_ming.mak:1206: gobjx86-64/vim9class.o] Error 1


Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/3755d67a-7d91-13d5-a6c3-54e840040799%40internode.on.net.


Re: Patch 9.0.1111

2022-12-30 Fir de Conversatie John Marriott


On 30-Dec-2022 22:16, Bram Moolenaar wrote:

Patch 9.0.
Problem:Termcap entries for RGB colors are not set automatically.
Solution:   Always set the termcap entries when +termguicolors is enabled.
Files:  src/term.c



After this patch, msys2-64 (clang 15.0.5) gives this warning:

clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD term.c -o gobjx86-64/term.o
term.c:1685:1: warning: unused function 'term_strings_not_set' 
[-Wunused-function]

term_strings_not_set(enum SpecialKey idx)
^
1 warning generated.



The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/87b39efd-3d75-7311-6984-3ac60574a703%40internode.on.net.
--- term.c.orig 2022-12-31 05:27:59.650553400 +1100
+++ term.c  2022-12-31 05:46:33.375447100 +1100
@@ -1678,6 +1678,7 @@
 };
 #endif
 
+#if defined(HAVE_TGETENT) || defined(FEAT_TERMGUICOLORS)
 /*
  * Return TRUE if "term_strings[idx]" was not set.
  */
@@ -1686,6 +1687,7 @@
 {
 return TERM_STR(idx) == NULL || TERM_STR(idx) == empty_option;
 }
+#endif
 
 #ifdef HAVE_TGETENT
 /*


Re: Patch 9.0.1086

2022-12-23 Fir de Conversatie John Marriott




On 23-Dec-2022 09:37, Christopher Plewright wrote:

On 23-Dec-2022 00:44, Bram Moolenaar wrote:


Thanks again John.


No worries 

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/83fb989c-3f53-3278-2d54-50974a8e6b72%40internode.on.net.


Re: Patch 9.0.1086

2022-12-22 Fir de Conversatie John Marriott


On 23-Dec-2022 00:44, Bram Moolenaar wrote:

Patch 9.0.1086
Problem:Display wrong in Windows terminal after exiting Vim.
Solution:   Apply screen restore fix for Windows 11 also to Windows 10 builds.
 (Christopher Plewright, closes #11713, closes #11706)
Files:  src/os_win32.c



After this patch msys2 (clang 15.0.5 x64) gives this warning:

clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD os_win32.c -o gobjx86-64/os_win32.o
os_win32.c:260:13: warning: unused variable 
'use_alternate_screen_buffer' [-Wunused-variable]

static BOOL use_alternate_screen_buffer = FALSE;
    ^
1 warning generated.


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/e43a469c-b6f3-e00b-c708-8bf0613ec18b%40internode.on.net.
--- os_win32.c.orig 2022-12-23 05:25:08.900346500 +1100
+++ os_win32.c  2022-12-23 05:33:23.155461500 +1100
@@ -257,7 +257,9 @@
 
 static BOOL win8_or_later = FALSE;
 static BOOL win10_22H2_or_later = FALSE;
+#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
 static BOOL use_alternate_screen_buffer = FALSE;
+#endif
 
 /*
  * Get version number including build number


Re: Patch 9.0.1084

2022-12-20 Fir de Conversatie John Marriott


On 21-Dec-2022 07:02, Bram Moolenaar wrote:

Patch 9.0.1084
Problem:Code handling low level MS-Windows events cannot be tested.
Solution:   Add test_mswin_event() and tests using it. (Christopher Plewright,
 closes #11622)
Files:  runtime/doc/builtin.txt, runtime/doc/testing.txt,
 runtime/doc/usr_41.txt, src/evalfunc.c, src/gui_w32.c,
 src/os_win32.c, src/proto/gui_w32.pro, src/proto/os_win32.pro,
 src/proto/testing.pro, src/term.c, src/testing.c,
 src/testdir/Make_all.mak, src/testdir/mouse.vim,
 src/testdir/test_gui.vim, src/testdir/test_mswin_event.vim,
 src/testdir/test_termcodes.vim



After this patch, msys64 (clang 15.0.5) reports these warnings:

clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE  os_win32.c -o 
objx86-64/os_win32.o
os_win32.c:1760:9: warning: variable 'mods' is used uninitialized 
whenever 'if' condition is true [-Wsometimes-uninitialized]

    if (move)
    ^~~~
os_win32.c:1826:9: note: uninitialized use occurs here
    if (mods != 0)
    ^~~~
os_win32.c:1760:5: note: remove the 'if' if its condition is always false
    if (move)
    ^
os_win32.c:1738:15: note: initialize the variable 'mods' to silence this 
warning

    int_u   mods;
    ^
 = 0
os_win32.c:1883:1: warning: unused function 'peek_input_record_buffer' 
[-Wunused-function]

peek_input_record_buffer(INPUT_RECORD* irEvents, int nMaxLength)
^
2 warnings generated.


The attached patch tries to fix both warnings.

It seems that the function peek_input_record_buffer() is not used 
anywhere. So the patch removes it.


Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/87deea88-7ebb-0ef0-f3b6-c98fa228253a%40internode.on.net.
--- os_win32.c.orig 2022-12-21 07:22:07.211294800 +1100
+++ os_win32.c  2022-12-21 07:28:29.770357500 +1100
@@ -193,7 +193,6 @@
 int length;
 } input_record_buffer_T;
 static input_record_buffer_T input_record_buffer;
-static int peek_input_record_buffer(INPUT_RECORD* irEvents, int nMaxLength);
 static int read_input_record_buffer(INPUT_RECORD* irEvents, int nMaxLength);
 static int write_input_record_buffer(INPUT_RECORD* irEvents, int nLength);
 #endif
@@ -1735,7 +1734,7 @@
 introw;
 intcol;
 intrepeated_click;
-int_u  mods;
+int_u  mods = 0;
 intmove;
 
 if (!dict_has_key(args, "row") || !dict_has_key(args, "col"))
@@ -1879,18 +1878,6 @@
 }
 return nCount;
 }
-static int
-peek_input_record_buffer(INPUT_RECORD* irEvents, int nMaxLength)
-{
-int nCount = 0;
-input_record_buffer_node_T *temp =  input_record_buffer.head;
-while (nCount < nMaxLength && temp != NULL)
-{
-   irEvents[nCount++] = temp->ir;
-   temp = temp->next;
-}
-return nCount;
-}
 #endif // !FEAT_GUI_MSWIN || VIMDLL
 
 #ifdef FEAT_EVAL


Re: Patch 9.0.0977

2022-12-01 Fir de Conversatie John Marriott



On 01-Dec-2022 07:19, Bram Moolenaar wrote:

John Marriott wrote:


On 01-Dec-2022 05:12, Bram Moolenaar wrote:

Patch 9.0.0977
Problem:It is not easy to see what client-server commands are doing.
Solution:   Add channel log messages if ch_log() is available.  Move the
  channel logging and make it available with the +eval feature.
Files:  Filelist, runtime/doc/starting.txt, src/if_xcmdsrv.c,
  src/clientserver.c, src/logfile.c, src/proto/logfile.pro,
  src/proto.h, src/channel.c, src/proto/channel.pro, src/evalfunc.c,
  src/gui_gtk_x11.c, src/main.c, src/message.c, src/os_unix.c,
  src/os_win32.c, src/regexp_bt.c, src/regexp_nfa.c, src/term.c,
  src/time.c, src/ui.c, src/globals.h, src/Makefile,
  src/Make_ami.mak, src/Make_mvc.mak, src/Make_vms.mms,
  src/Make_cyg_ming.mak

After this patch mingw64 (clang 15.0.5) gives these errors/warnings. I
have FEAT_JOB_CHANNEL disabled for this build so I reckon it has
something to do with that.

I can reproduce this when configuring with "--disable-channel".
I'll adjust the #ifdefs.


Fixed after patch 9.0.0978. Thanks!

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/d941e70f-44bf-7818-0f8c-f982f3e1821e%40internode.on.net.


Re: Patch 9.0.0977

2022-11-30 Fir de Conversatie John Marriott


On 01-Dec-2022 05:12, Bram Moolenaar wrote:

Patch 9.0.0977
Problem:It is not easy to see what client-server commands are doing.
Solution:   Add channel log messages if ch_log() is available.  Move the
 channel logging and make it available with the +eval feature.
Files:  Filelist, runtime/doc/starting.txt, src/if_xcmdsrv.c,
 src/clientserver.c, src/logfile.c, src/proto/logfile.pro,
 src/proto.h, src/channel.c, src/proto/channel.pro, src/evalfunc.c,
 src/gui_gtk_x11.c, src/main.c, src/message.c, src/os_unix.c,
 src/os_win32.c, src/regexp_bt.c, src/regexp_nfa.c, src/term.c,
 src/time.c, src/ui.c, src/globals.h, src/Makefile,
 src/Make_ami.mak, src/Make_mvc.mak, src/Make_vms.mms,
 src/Make_cyg_ming.mak


After this patch mingw64 (clang 15.0.5) gives these errors/warnings. I 
have FEAT_JOB_CHANNEL disabled for this build so I reckon it has 
something to do with that.


clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD logfile.c -o gobjx

86-64/logfile.o
logfile.c:35:6: warning: call to undeclared function 'ch_log'; ISO C99 
and later do not support implicit function declarations 
[-Wimplicit-function-declaration]

    ch_log(NULL, "closing this logfile, opening %s", fname);
    ^
logfile.c:44:5: error: use of undeclared identifier 'ch_log_output'
    ch_log_output = vim_strchr(opt, 'o') != NULL ? LOG_ALWAYS : FALSE;
    ^
logfile.c:105:1: error: conflicting types for 'ch_log'
ch_log(channel_T *ch, const char *fmt, ...)
^
logfile.c:35:6: note: previous implicit declaration is here
    ch_log(NULL, "closing this logfile, opening %s", fname);
    ^
logfile.c:118:5: error: use of undeclared identifier 'did_repeated_msg'
    did_repeated_msg = 0;
    ^
logfile.c:135:5: error: use of undeclared identifier 'did_repeated_msg'
    did_repeated_msg = 0;
    ^
1 warning and 4 errors generated.



clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD main.c -o gobjx86-64/main.o
main.c:1091:2: warning: call to undeclared function 'ch_log'; ISO C99 
and later do not support implicit function declarations 
[-Wimplicit-function-declaration]

    ch_log(NULL, is_safe ? "SafeState: Start triggering"
    ^
main.c:1109:2: warning: call to undeclared function 'ch_log'; ISO C99 
and later do not support implicit function declarations 
[-Wimplicit-function-declaration]

    ch_log(NULL, "SafeState: reset: %s", reason);
    ^
main.c:1567:5: warning: call to undeclared function 'ch_log'; ISO C99 
and later do not support implicit function declarations 
[-Wimplicit-function-declaration]

    ch_log(NULL, "Exiting...");
    ^
3 warnings generated.



clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD message.c -o gobjx86-64/message.o

message.c:165:9: error: use of undeclared identifier 'emsg_to_channel_log'
    if (emsg_to_channel_log)
    ^
message.c:167:2: warning: call to undeclared function 'ch_log'; ISO C99 
and later do not support implicit function declarations 
[-Wimplicit-function-declaration]

    ch_log(NULL, "ERROR: %s", s);
    ^
message.c:729:6: warning: call to undeclared function 'ch_log'; ISO C99 
and later do not support implicit function declarations 
[-Wimplicit-function-declaration]

    ch_log(NULL, "ERROR silent: %s", (char *)s);
    ^
2 warnings and 1 error generated.



clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD os_win32.c -o gobjx86-64/os_win32.o
os_win32.c:4927:5: warning: call to undeclared function 'ch_log'; ISO 
C99 and later do not support implicit function declarations 
[-Wimplicit-function-declaration]

    ch_log(NULL, "executing shell command: %s", cmd);
    ^
1 warning generated.


clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD term.c -o gobjx86-64/term.o
term.c:2645:6: error: use of undeclared identifier 'ch_log_output'; did 
you mean 'ch_log_active'?

    if (ch_log_output != FALSE)
    ^
    ch_log_active
proto/logfile.pro:3:5: note: 'ch_log_active' declared here
int ch_log_active(void);
    ^
term.c:2648:6: warning: call to 

Re: Patch 9.0.0965

2022-11-28 Fir de Conversatie John Marriott


On 29-Nov-2022 05:52, Bram Moolenaar wrote:

Patch 9.0.0965
Problem:Using one window for executing autocommands is insufficient.
Solution:   Use up to five windows for executing autocommands.
Files:  src/globals.h, src/structs.h, src/autocmd.c,
 src/proto/autocmd.pro, src/main.c, src/eval.c, src/evalwindow.c,
 src/ex_docmd.c, src/screen.c, src/terminal.c, src/window.c,
 src/buffer.c, src/bufwrite.c, src/channel.c, src/diff.c,
 src/evalbuffer.c, src/evalvars.c, src/ex_cmds2.c, src/fileio.c,
 src/if_ruby.c, src/os_unix.c, src/os_win32.c, src/quickfix.c,
 src/term.c, src/if_perl.xs, src/if_py_both.h,
 src/testdir/test_autocmd.vim



After this patch mingw64 (clang 15.0.5) gives this build error:

clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD screen.c -o gobjx86-64/screen.o

screen.c:2513:5: error: expected expression
    int found_null = FALSE;
    ^
screen.c:2517:6: error: use of undeclared identifier 'found_null'
    found_null = TRUE;
    ^
screen.c:2521:52: error: use of undeclared identifier 'found_null'; did 
you mean 'func_call'?

    || (enc_utf8 && (new_ScreenLinesUC == NULL || found_null))
  ^~
  func_call
proto/userfunc.pro:35:5: note: 'func_call' declared here
int func_call(char_u *name, typval_T *args, partial_T *partial, dict_T 
*selfdict, typval_T *rettv);

    ^
screen.c:2521:52: warning: address of function 'func_call' will always 
evaluate to 'true' [-Wpointer-bool-conversion]

    || (enc_utf8 && (new_ScreenLinesUC == NULL || found_null))
   ~~ ^~
screen.c:2521:52: note: prefix with the address-of operator to silence 
this warning

    || (enc_utf8 && (new_ScreenLinesUC == NULL || found_null))
  ^
  &
1 warning and 3 errors generated.
make: *** [Make_cyg_ming.mak:1204: gobjx86-64/screen.o] Error 1



The attached patch tries to fix it.
Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/4a390bf7-605d-ccd7-9099-8703a86995c4%40internode.on.net.
--- screen.c.orig   2022-11-29 05:57:29.576345800 +1100
+++ screen.c2022-11-29 06:01:48.438552200 +1100
@@ -2383,6 +2383,7 @@
 static int entered = FALSE;// avoid recursiveness
 static int done_outofmem_msg = FALSE;  // did outofmem message
 intretry_count = 0;
+intfound_null;
 
 retry:
 /*
@@ -2510,7 +2511,7 @@
 
 give_up:
 
-int found_null = FALSE;
+found_null = FALSE;
 for (int i = 0; i < p_mco; ++i)
if (new_ScreenLinesC[i] == NULL)
{


clang 15.0.4 windres error

2022-11-11 Fir de Conversatie John Marriott

Hi All,

When compiling with clang x64 15.0.4 (from msys2) on Win8.1 x64, I get 
this error from windres:


windres  -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF 
-DFEAT_NORMAL -DHAVE_STDINT_H -DMS_WIN64 -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD \

    --input-format=rc --output-format=coff -i vim.rc -o gobjx86-64/vimres.o
windres: preprocessing failed.
make: *** [Make_cyg_ming.mak:1222: gobjx86-64/vimres.o] Error 1


The attached patch is probably not the best fix but it corrects it for me.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/e6116376-98c8-b211-192f-2a416399a499%40internode.on.net.
--- Make_cyg_ming.mak.orig  2022-10-15 06:24:24.0 +1100
+++ Make_cyg_ming.mak   2022-11-12 06:48:03.371617100 +1100
@@ -227,7 +227,11 @@
 ifeq ($(UNDER_CYGWIN),yes)
 WINDRES := $(CROSS_COMPILE)windres
 else
+ifeq ($(findstring clang,$(CC)),)
 WINDRES := windres
+else
+WINDRES := llvm-windres
+endif
 endif
 
 # Get the default ARCH.


clang 15.0.4 warnings

2022-11-05 Fir de Conversatie John Marriott

Hi All,

clang x64 15.0.4 on Win8.1 x64 gives these 3 warnings:

clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD os_win32.c -o gobjx86-64/os_win32.o
os_win32.c:4397:10: warning: variable 'repeatCount' set but not used 
[-Wunused-but-set-variable]

    int repeatCount;
    ^
1 warning generated.



clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD gui.c -o gobjx86-64/gui.o
gui.c:67:16: warning: variable 'recursive' set but not used 
[-Wunused-but-set-variable]

    static int  recursive = 0;
    ^
1 warning generated.



clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD gui_w32.c -o gobjx86-64/gui_w32.o
gui_w32.c:6193:7: warning: variable 'clen' set but not used 
[-Wunused-but-set-variable]

    int clen;   // string length in characters
    ^
1 warning generated.


The attached patches try to fix them.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/baf9d888-7a0e-92c9-b7e6-e478c661b801%40internode.on.net.
--- gui_w32.c.orig  2022-11-03 05:27:40.534333000 +1100
+++ gui_w32.c   2022-11-06 10:01:56.012821800 +1100
@@ -6190,13 +6190,11 @@
// handled here.
int i;
int wlen;   // string length in words
-   int clen;   // string length in characters
int cells;  // cell width of string up to composing char
int cw; // width of current cell
int c;
 
wlen = 0;
-   clen = 0;
cells = 0;
for (i = 0; i < len; )
{
@@ -6236,7 +6234,6 @@
}
cells += cw;
i += utf_ptr2len_len(text + i, len - i);
-   ++clen;
}
 #if defined(FEAT_DIRECTX)
if (IS_ENABLE_DIRECTX())
--- gui.c.orig  2022-10-05 05:54:09.097265500 +1100
+++ gui.c   2022-11-06 10:00:44.761904700 +1100
@@ -64,7 +64,9 @@
 gui_start(char_u *arg UNUSED)
 {
 char_u *old_term;
+#ifdef GUI_MAY_FORK
 static int recursive = 0;
+#endif
 #if defined(GUI_MAY_SPAWN) && defined(EXPERIMENTAL_GUI_CMD)
 char   *msg = NULL;
 #endif
@@ -76,9 +78,10 @@
cursor_on();// needed for ":gui" in .vimrc
 full_screen = FALSE;
 
+#ifdef GUI_MAY_FORK
+
 ++recursive;
 
-#ifdef GUI_MAY_FORK
 /*
  * Quit the current process and continue in the child.
  * Makes "gvim file" disconnect from the shell it was started in.
@@ -153,7 +156,9 @@
 gui_mch_update();
 apply_autocmds(gui.in_use ? EVENT_GUIENTER : EVENT_GUIFAILED,
   NULL, NULL, FALSE, curbuf);
+#ifdef GUI_MAY_FORK
 --recursive;
+#endif
 }
 
 /*
--- os_win32.c.orig 2022-11-03 05:27:40.568343700 +1100
+++ os_win32.c  2022-11-06 09:56:19.550102700 +1100
@@ -4394,7 +4394,6 @@
 intret;
 DWORD  len;
 DWORD  toRead;
-intrepeatCount;
 
 // we query the pipe to see if there is any data to read
 // to avoid to perform a blocking read
@@ -4405,11 +4404,9 @@
,// available bytes total
NULL);  // byteLeft
 
-repeatCount = 0;
 // We got real data in the pipe, read it
 while (ret != 0 && availableBytes > 0)
 {
-   repeatCount++;
toRead = (DWORD)(BUFLEN - *buffer_off);
toRead = availableBytes < toRead ? availableBytes : toRead;
ReadFile(g_hChildStd_OUT_Rd, buffer + *buffer_off, toRead , , NULL);


Re: Patch 9.0.0787

2022-10-18 Fir de Conversatie John Marriott


On 18-Oct-2022 23:34, Bram Moolenaar wrote:

Patch 9.0.0787 (after 9.0.0775)
Problem:MS-Windows: mouse scrolling in terminal misbehaves without dll.
Solution:   Add #ifdef as a temporary solution. (Christopher Plewright,
 closes #11392)
Files:  src/os_win32.c


I know this was a temporary solution, but after this patch mingw64 (gcc 
12.2.0) gives this warning in a non-gui build:


gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -Wall -O3 -fomit-frame-pointer -freg-struct-return -fpie -fPIE  
os_win32.c -o objx86-64/os_win32.o os_win32.c:1257:1: warning: 
'decode_mouse_wheel' defined but not used [-Wunused-function]

 1257 | decode_mouse_wheel(MOUSE_EVENT_RECORD *pmer)
  | ^~


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/8c9c415f-8e41-c7a0-6dbc-1a4821e9118e%40internode.on.net.
--- os_win32.c.orig 2022-10-19 05:53:52.120873800 +1100
+++ os_win32.c  2022-10-19 06:00:33.470687000 +1100
@@ -1231,7 +1231,7 @@
 }
 # endif
 
-
+#ifdef VIMDLL
 /*
  * Win32 console mouse scroll event handler.
  * Loosely based on the _OnMouseWheel() function in gui_w32.c
@@ -1324,6 +1324,7 @@
 
 return;
 }
+#endif
 
 /*
  * Decode a MOUSE_EVENT.  If it's a valid event, return MOUSE_LEFT,


Re: Patch 9.0.0683

2022-10-07 Fir de Conversatie John Marriott


On 08-Oct-2022 01:11, Bram Moolenaar wrote:

Patch 9.0.0683
Problem:Cannot specify a time for :echowindow.
Solution:   A count can be used to specify the display time. Add
 popup_findecho().
Files:  runtime/doc/eval.txt, runtime/doc/popup.txt,
 runtime/doc/builtin.txt, runtime/doc/usr_41.txt, src/eval.c,
 src/popupwin.c, src/proto/popupwin.pro, src/evalfunc.c,
 src/ex_cmds.h, src/vim9.h, src/vim9compile.c, src/vim9execute.c,
 src/vim9cmds.c, src/proto/vim9cmds.pro, src/vim9instr.c,
 src/proto/vim9instr.pro, src/testdir/test_vim9_disassemble.vim,
 src/testdir/test_messages.vim,
 src/testdir/dumps/Test_echowindow_8.dump,
 src/testdir/dumps/Test_echowindow_9.dump


After this patch mingw64 (gcc 12.2.0) spits out this warning if 
HAS_MESSAGE_WINDOW is not defined:


gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD vim9compile.c -o 
gobjnative/vim9compile.o
vim9compile.c:2691:1: warning: 'get_cmd_count' defined but not used 
[-Wunused-function]

 2691 | get_cmd_count(char_u *line, exarg_T *eap)
  | ^


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/a11c12f7-4e5b-5356-2be0-ce6fde1d9c89%40internode.on.net.
--- vim9compile.c.orig  2022-10-08 08:24:06.703862100 +1100
+++ vim9compile.c   2022-10-08 08:34:02.065949600 +1100
@@ -2682,6 +2682,7 @@
 return r;
 }
 
+#ifdef HAS_MESSAGE_WINDOW
 /*
  * Get a count before a command.  Can only be a number.
  * Returns zero if there is no count.
@@ -2707,6 +2708,7 @@
 }
 return atol((char *)p);
 }
+#endif
 
 /*
  * Get the compilation type that should be used for "ufunc".


Re: Patch 9.0.0466

2022-09-14 Fir de Conversatie John Marriott


On 15-Sept-2022 07:14, Bram Moolenaar wrote:

Patch 9.0.0466
Problem:Virtual text wrong after adding line break after line.
Solution:   Pass an "eol" flag to where text properties are adjusted.
 (closes #11131)
Files:  src/change.c, src/textprop.c, src/proto/textprop.pro,
 src/testdir/test_textprop.vim,
 src/testdir/dumps/Test_prop_below_split_line_1.dump



After this patch mingw64 (gcc 12.2.0) throws this error:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD ex_cmds.c -o 
gobjnative/ex_cmds.o

ex_cmds.c: In function 'ex_substitute':
ex_cmds.c:4687:29: error: too few arguments to function 
'adjust_props_for_split'
 4687 | adjust_props_for_split(lnum + 1, 
lnum, plen, 1);

  | ^~
In file included from proto.h:201,
 from vim.h:2266,
 from ex_cmds.c:14:
proto/textprop.pro:25:6: note: declared here
   25 | void adjust_props_for_split(linenr_T lnum_props, linenr_T 
lnum_top, int kept, int deleted, int at_eol);

  |  ^~
make: *** [Make_cyg_ming.mak:1217: gobjnative/ex_cmds.o] Error 1


Sorry I don't have a patch for this.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/a391c966-58a1-249d-2f4c-86b8940d1be4%40internode.on.net.


Re: Patch 9.0.0419

2022-09-08 Fir de Conversatie John Marriott

On 09-Sept-2022 04:53, Bram Moolenaar wrote:

Patch 9.0.0419
Problem:The :defer command does not check the function argument count and
 types.
Solution:   Check the function arguments when adding a deferred function.
Files:  src/userfunc.c, src/vim9instr.c, src/proto/vim9instr.pro,
 src/vim9cmds.c, src/testdir/test_user_func.vim


After this patch mingw64 (gcc 12.2.0) spits out this linker error:

gcc -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD -Wl,-nxcompat,-dynamicbase 
-municode -s -mwindows -o gvim.exe gobjnative/alloc.o 
gobjnative/arabic.o gobjnative/arglist.o gobjnative/autocmd.o 
gobjnative/beval.o gobjnative/blob.o gobjnative/blowfish.o 
gobjnative/buffer.o gobjnative/bufwrite.o gobjnative/change.o 
gobjnative/charset.o gobjnative/cindent.o gobjnative/clientserver.o 
gobjnative/clipboard.o gobjnative/cmdexpand.o gobjnative/cmdhist.o 
gobjnative/crypt.o gobjnative/crypt_zip.o gobjnative/debugger.o 
gobjnative/dict.o gobjnative/diff.o gobjnative/digraph.o 
gobjnative/drawline.o gobjnative/drawscreen.o gobjnative/edit.o 
gobjnative/eval.o gobjnative/evalbuffer.o gobjnative/evalfunc.o 
gobjnative/evalvars.o gobjnative/evalwindow.o gobjnative/ex_cmds.o 
gobjnative/ex_cmds2.o gobjnative/ex_docmd.o gobjnative/ex_eval.o 
gobjnative/ex_getln.o gobjnative/fileio.o gobjnative/filepath.o 
gobjnative/findfile.o gobjnative/float.o gobjnative/fold.o 
gobjnative/getchar.o gobjnative/gui_xim.o gobjnative/hardcopy.o 
gobjnative/hashtab.o gobjnative/help.o gobjnative/highlight.o 
gobjnative/if_cscope.o gobjnative/indent.o gobjnative/insexpand.o 
gobjnative/json.o gobjnative/list.o gobjnative/locale.o 
gobjnative/main.o gobjnative/map.o gobjnative/mark.o gobjnative/match.o 
gobjnative/memfile.o gobjnative/memline.o gobjnative/menu.o 
gobjnative/message.o gobjnative/misc1.o gobjnative/misc2.o 
gobjnative/mouse.o gobjnative/move.o gobjnative/mbyte.o 
gobjnative/normal.o gobjnative/ops.o gobjnative/option.o 
gobjnative/optionstr.o gobjnative/os_mswin.o gobjnative/os_win32.o 
gobjnative/pathdef.o gobjnative/popupmenu.o gobjnative/popupwin.o 
gobjnative/profiler.o gobjnative/quickfix.o gobjnative/regexp.o 
gobjnative/register.o gobjnative/scriptfile.o gobjnative/screen.o 
gobjnative/search.o gobjnative/session.o gobjnative/sha256.o 
gobjnative/sign.o gobjnative/spell.o gobjnative/spellfile.o 
gobjnative/spellsuggest.o gobjnative/strings.o gobjnative/syntax.o 
gobjnative/tag.o gobjnative/term.o gobjnative/testing.o 
gobjnative/textformat.o gobjnative/textobject.o gobjnative/textprop.o 
gobjnative/time.o gobjnative/typval.o gobjnative/ui.o gobjnative/undo.o 
gobjnative/usercmd.o gobjnative/userfunc.o gobjnative/version.o 
gobjnative/vim9cmds.o gobjnative/vim9compile.o gobjnative/vim9execute.o 
gobjnative/vim9expr.o gobjnative/vim9instr.o gobjnative/vim9script.o 
gobjnative/vim9type.o gobjnative/viminfo.o gobjnative/winclip.o 
gobjnative/window.o gobjnative/os_w32exe.o gobjnative/vimres.o 
gobjnative/xdiffi.o gobjnative/xemit.o gobjnative/xprepare.o 
gobjnative/xutils.o gobjnative/xhistogram.o gobjnative/xpatience.o 
gobjnative/gui.o gobjnative/gui_w32.o gobjnative/gui_beval.o -lkernel32 
-luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lnetapi32 -lversion 
-lole32 -luuid
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/vim9cmds.o:vim9cmds.c:(.text+0x2628): undefined reference to 
`get_defer_var_idx'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/vim9expr.o:vim9expr.c:(.text+0x5a9d): undefined reference to 
`get_defer_var_idx'

collect2.exe: error: ld returned 1 exit status
make: *** [Make_cyg_ming.mak:1137: gvim.exe] Error 1


This patch removed the function but not all of the calls.

Also, it looks like the contents of patch 9.0.0418 are the same as 9.0.0419.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/a8955527-beea-9d92-f457-99d9c64b5dea%40internode.on.net.


Re: Patch 9.0.0366

2022-09-03 Fir de Conversatie John Marriott


On 03-Sept-2022 21:09, Bram Moolenaar wrote:

Patch 9.0.0366
Problem:Cannot use import->Func() in lambda. (Israel Chauca Fuentes)
Solution:   Adjust how an expression in a lambda is parsed. (closes #11042)
Files:  src/eval.c, src/testdir/test_vim9_import.vim



After this patch mingw64 (gcc 12.2.0) spits out this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD eval.c -o gobjnative/eval.o

In function 'deref_function_name',
    inlined from 'eval_method' at eval.c:4392:14,
    inlined from 'handle_subscript' at eval.c:6451:13:
eval.c:756:29: warning: 'save_flags' may be used uninitialized 
[-Wmaybe-uninitialized]

  756 | evalarg->eval_flags = save_flags;
  | ^~~~
eval.c: In function 'handle_subscript':
eval.c:697:17: note: 'save_flags' was declared here
  697 | int save_flags;
  | ^~


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/bfb5875b-93ea-e182-6529-6a66a6c9d286%40internode.on.net.
--- eval.c.orig 2022-09-04 05:09:47.575898000 +1000
+++ eval.c  2022-09-04 05:13:40.942988700 +1000
@@ -694,7 +694,7 @@
 {
 typval_T   ref;
 char_u *name = *arg;
-intsave_flags;
+intsave_flags = 0;
 
 ref.v_type = VAR_UNKNOWN;
 if (evalarg != NULL)


Re: Patch 9.0.0067

2022-07-25 Fir de Conversatie John Marriott


On 26-July-2022 03:14, Bram Moolenaar wrote:

Patch 9.0.0067
Problem:Cannot show virtual text.
Solution:   Initial changes for virtual text support, using text properties.
Files:  runtime/doc/textprop.txt, src/beval.c, src/charset.c,
 src/drawline.c, src/edit.c, src/errors.h, src/evalfunc.c,
 src/getchar.c, src/indent.c, src/misc1.c, src/misc2.c,
 src/mouse.c, src/ops.c, src/popupwin.c, src/proto/charset.pro,
 src/proto/textprop.pro, src/regexp.c, src/regexp_bt.c,
 src/regexp_nfa.c, src/register.c, src/structs.h, src/textprop.c,
 src/testdir/test_textprop.vim,
 src/testdir/dumps/Test_prop_inserts_text.dump



After this patch, mingw64 (gcc 12.1.0) gives this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD drawline.c -o 
gobjnative/drawline.o
drawline.c:858:16: warning: 'charsize' may be used uninitialized 
[-Wmaybe-uninitialized]
  858 | if (( (*mb_ptr2cells)(ptr) >= charsize || *ptr == 
TAB) && col == 0)

  |    ^
drawline.c:822:25: note: 'charsize' was declared here
  822 | int charsize;
  | ^~~~


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/93c98f39-974f-e785-f4b9-b073b9b75d52%40internode.on.net.
--- drawline.c.orig 2022-07-26 05:56:43.552462500 +1000
+++ drawline.c  2022-07-26 06:02:55.006725800 +1000
@@ -819,7 +819,7 @@
 {
char_u  *prev_ptr = ptr;
chartabsize_T   cts;
-   int charsize;
+   int charsize = 0;
 
init_chartabsize_arg(, wp, lnum, vcol, line, ptr);
while (cts.cts_vcol < v && *cts.cts_ptr != NUL)


Re: Patch 9.0.0058

2022-07-23 Fir de Conversatie John Marriott


On 23-July-2022 14:05, Bram Moolenaar wrote:

Patch 9.0.0058
Problem:Win32: cannot test low level events.
Solution:   Add "sendevent" to test_gui_event(). (Yegappan Lakshmanan,
 closes #10679)
Files:  runtime/doc/testing.txt, src/errors.h, src/gui_w32.c,
 src/proto/gui_w32.pro, src/testing.c, src/testdir/test_gui.vim



After this patch, mingw64 (gcc 12.1.0) throws this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD gui_w32.c -o 
gobjnative/gui_w32.o
gui_w32.c:8552:35: warning: pointer targets in passing argument 2 of 
'dict_get_string' differ in signedness [-Wpointer-sign]

 8552 | event = dict_get_string(args, "event", TRUE);
  |   ^~~
  |   |
  |   char *
In file included from proto.h:75,
 from vim.h:2263,
 from gui_w32.c:26:
proto/dict.pro:32:44: note: expected 'char_u *' {aka 'unsigned char *'} 
but argument is of type 'char *'

   32 | char_u *dict_get_string(dict_T *d, char_u *key, int save);
  |    ^~~
gui_w32.c:8562:44: warning: pointer targets in passing argument 2 of 
'dict_get_number_def' differ in signedness [-Wpointer-sign]

 8562 | vkCode = dict_get_number_def(args, "keycode", 0);
  |    ^
  |    |
  |    char *
proto/dict.pro:34:52: note: expected 'char_u *' {aka 'unsigned char *'} 
but argument is of type 'char *'

   34 | varnumber_T dict_get_number_def(dict_T *d, char_u *key, int def);
  |    ^~~


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/ea1584af-b2a2-2ac0-6268-2dca5afaa46f%40internode.on.net.
--- gui_w32.c.orig  2022-07-23 16:39:07.751350900 +1000
+++ gui_w32.c   2022-07-23 16:46:55.972852600 +1000
@@ -8549,7 +8549,7 @@
 char_u *event;
 INPUT  inputs[1];
 
-event = dict_get_string(args, "event", TRUE);
+event = dict_get_string(args, (char_u *)"event", TRUE);
 if (event == NULL)
return FALSE;
 
@@ -8559,7 +8559,7 @@
 {
WORDvkCode;
 
-   vkCode = dict_get_number_def(args, "keycode", 0);
+   vkCode = dict_get_number_def(args, (char_u *)"keycode", 0);
if (vkCode <= 0 || vkCode >= 0xFF)
{
semsg(_(e_invalid_argument_nr), (long)vkCode);


Re: Patch 9.0.0025

2022-07-02 Fir de Conversatie John Marriott


On 02-July-2022 22:43, Bram Moolenaar wrote:

Patch 9.0.0025
Problem:Accessing beyond allocated memory when using the cmdline window in
 Ex mode.
Solution:   Use "*" instead of "'<,'>" for Visual mode.
Files:  src/ex_docmd.c, src/testdir/test_cmdline.vim
   
   		// Special case: empty command uses "+":

!   //  "'<,'>mods" -> "mods *+
!   //  Use "*" instead of "'<,'>" to avoid the command getting
!   //  longer, in case is was allocated.
mch_memmove(orig_cmd, cmd_start, len);


In ex_docmd.c:
:3123 s/in case*is *was allocated/in case*it *was allocated

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/a944b1e9-cdcd-99fd-3e56-e5a3da7de2d1%40internode.on.net.


Re: Vim 9.0 is released!

2022-06-28 Fir de Conversatie John Marriott



On 29-June-2022 00:55, Bram Moolenaar wrote:


Hello Vim users!

Announcing:  Vim (Vi IMproved) version 9.0



Congratulations and thank-you to you Bram and to everyone involved.

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/1e959193-d2e1-23df-bc8a-414a942225cc%40internode.on.net.


Re: Patch 8.2.5087

2022-06-14 Fir de Conversatie John Marriott




On 15-June-2022 05:57, Yegappan Lakshmanan wrote:

Hi,

On Tue, Jun 14, 2022 at 12:41 PM John Marriott
 wrote:

On 15-June-2022 05:34, Christian J. Robinson wrote:

This is related to my problem. I temporarily fixed the problem with
this command-line:
CC='' CXX='' make ...


Thanks :-)


Can you try the attached patch and see whether you can build Vim?

Thanks,
Yegappan


Hi Yegappan,

This patch works for me.

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/102db0d0-fdd1-7f0e-85a8-288cbbd17148%40internode.on.net.


Re: Patch 8.2.5087

2022-06-14 Fir de Conversatie John Marriott




On 15-June-2022 05:34, Christian J. Robinson wrote:
This is related to my problem. I temporarily fixed the problem with 
this command-line:

CC='' CXX='' make ...


Thanks :-)

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/52c0cd14-ecba-6127-93bc-0c02d13f6ef2%40internode.on.net.


Re: Patch 8.2.5087

2022-06-14 Fir de Conversatie John Marriott



On 14-June-2022 21:31, Bram Moolenaar wrote:

Patch 8.2.5087
Problem:Cannot build with clang on MS-Windows.
Solution:   Add support for building with clang. (Yegappan Lakshmanan,
 closes #10557)
Files:  src/GvimExt/Make_ming.mak, src/INSTALLpc.txt,
 src/Make_cyg_ming.mak


After this patch mingw64 (gcc 12.1) is spitting out lots of errors, one 
for each source file:


make 
--directory=D:/Users/John/Documents/software/Utility/Vim/git/vim/src 
FEATURES=NORMAL OPTIMIZE=MAXSPEED DIRECTX=no ICONV= GETTEXT= IME=no 
DYNAMIC_IME=no POSTSCRIPT=no OLE=no WINVER=0x0603 CSCOPE=no NETBEANS=no 
CHANNEL=no TERMINAL=no SOUND=no ARCH=native XPM=no GUI=yes CFLAGS=-I. 
-Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF 
-DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO -pipe 
-march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return -fpie 
-fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD 
LFLAGS=-Wl,-nxcompat,-dynamicbase -municode -s -mwindows 
--environment-overrides --jobs=9 --keep-going --output-sync 
--no-print-directory --makefile=Make_ming.mak gvim.exe
process_begin: CreateProcess(NULL, cc -c -I. -Iproto -DWIN32 
-DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL 
-DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO -pipe -march=native -Wall -O3 
-fomit-frame-pointer -freg-struct-return -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD alloc.c -o gobjnative/alloc.o, ...) failed.

make (e=2): The system cannot find the file specified.
make: *** [Make_cyg_ming.mak:1215: gobjnative/alloc.o] Error 2
cc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD alloc.c -o gobjnative/alloc.o
process_begin: CreateProcess(NULL, cc -c -I. -Iproto -DWIN32 
-DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL 
-DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO -pipe -march=native -Wall -O3 
-fomit-frame-pointer -freg-struct-return -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD arabic.c -o gobjnative/arabic.o, ...) failed.

make (e=2): The system cannot find the file specified.
make: *** [Make_cyg_ming.mak:1215: gobjnative/arabic.o] Error 2
cc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD arabic.c -o 
gobjnative/arabic.o
process_begin: CreateProcess(NULL, cc -c -I. -Iproto -DWIN32 
-DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL 
-DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO -pipe -march=native -Wall -O3 
-fomit-frame-pointer -freg-struct-return -fpie -fPIE -DFEAT_GUI_MSWIN 
-DFEAT_CLIPBOARD arglist.c -o gobjnative/arglist.o, ...) failed.

make (e=2): The system cannot find the file specified.
make: *** [Make_cyg_ming.mak:1215: gobjnative/arglist.o] Error 2
...


I don't have the command "cc", only gcc.

I think line problem is in lines 220 to 222 in Make_cyg_ming.mak:

ifeq ($(CC),)
CC := $(CROSS_COMPILE)gcc
endif


Checking if $CC is empty won't work for gnu make because it predefines 
it to have the value "cc". So for me, $CC remains with the value "cc" 
and not "gcc".


Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/69fba827-41da-68d8-9e4f-044e75f431e8%40internode.on.net.


Re: Patch 8.2.5084

2022-06-13 Fir de Conversatie John Marriott


On 14-June-2022 06:43, Bram Moolenaar wrote:

Patch 8.2.5084
Problem:When the GUI shows a dialog tests get stuck.
Solution:   Add the --gui-dialog-file argument.
Files:  runtime/doc/starting.txt, src/Make_mvc.mak, src/gui.c, src/main.c,
 src/message.c, src/os_mswin.c, src/proto/gui.pro,
 src/proto/main.pro, src/structs.h, src/testdir/Make_dos.mak,
 src/testdir/Make_ming.mak, src/testdir/Makefile,
 src/testdir/runtest.vim, src/testdir/shared.vim



After this patch mingw64 (gcc 12.1) spits out this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD os_mswin.c -o 
gobjnative/os_mswin.oos_mswin.c: In function 'display_errors':


os_mswin.c:681:61: warning: pointer targets in passing argument 2 of 
'gui_dialog_log' differ in signedness [-Wpointer-sign]

  681 | if (!gui_dialog_log((char_u *)"Errors", p))
  | ^
  | |
  | char *
In file included from proto.h:278,
 from vim.h:2255,
 from os_mswin.c:16:
proto/gui.pro:70:43: note: expected 'char_u *' {aka 'unsigned char *'} 
but argument is of type 'char *'

   70 | int gui_dialog_log(char_u *title, char_u *message);
  |   ^~~


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/ce924c87-9ed8-9043-fd47-99e896950ac4%40internode.on.net.
--- os_mswin.c.orig 2022-06-14 06:49:16.421594200 +1000
+++ os_mswin.c  2022-06-14 07:02:23.343442700 +1000
@@ -664,7 +664,7 @@
 display_errors(void)
 {
 # ifdef FEAT_GUI
-char *p;
+char_u *p;
 
 #  ifdef VIMDLL
 if (gui.in_use || gui.starting)
@@ -673,7 +673,7 @@
if (error_ga.ga_data != NULL)
{
// avoid putting up a message box with blanks only
-   for (p = (char *)error_ga.ga_data; *p; ++p)
+   for (p = (char_u *)error_ga.ga_data; *p; ++p)
if (!isspace(*p))
{
// Only use a dialog when not using --gui-dialog-file:


Re: mingw64 gcc 12.1.0 warnings

2022-06-09 Fir de Conversatie John Marriott


On 07-June-2022 07:15, Bram Moolenaar wrote:

John Marriott wrote:


I just moved up to mingw64 with gcc 12.1.0 on my windows 8.1 x64 box.

I now have two warnings. The first:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD ui.c -o gobjnative/ui.o
In file included from ui.c:18:
In function 'read_from_input_buf',
      inlined from 'inchar_loop' at ui.c:396:12:
vim.h:1776:37: warning: 'memmove' offset [-2147483647, -1] is out of the
bounds [0, 256] of object 'inbuf' with type 'char_u[256]' {aka 'unsigned
char[256]'} [-Warray-bounds]
   1776 | # define mch_memmove(to, from, len) memmove((char*)(to),
(char*)(from), (size_t)(len))
    | ^~
vim.h:1776:37: note: in definition of macro 'mch_memmove'
   1776 | # define mch_memmove(to, from, len) memmove((char*)(to),
(char*)(from), (size_t)(len))
    | ^~~
ui.c: In function 'inchar_loop':
ui.c:750:17: note: 'inbuf' declared here
    750 | static char_u   inbuf[INBUFLEN + MAX_KEY_CODE_LEN];
    | ^


No idea what's wrong here, probably nothing.


This is probably a better patch.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/1ae1e9e4-ff32-a09f-d27b-71df260585f3%40internode.on.net.
--- ui.c.orig   2022-05-10 05:59:19.635047500 +1000
+++ ui.c2022-06-10 14:07:53.256663900 +1000
@@ -898,7 +898,7 @@
 mch_memmove(buf, inbuf, (size_t)maxlen);
 inbufcount -= maxlen;
 if (inbufcount)
-   mch_memmove(inbuf, inbuf + maxlen, (size_t)inbufcount);
+   mch_memmove(inbuf, inbuf + ((maxlen < 0) ? 0 : maxlen), 
(size_t)inbufcount);
 return (int)maxlen;
 }
 


Re: mingw64 gcc 12.1.0 warnings

2022-06-09 Fir de Conversatie John Marriott



On 07-June-2022 07:15, Bram Moolenaar wrote:

John Marriott wrote:


I just moved up to mingw64 with gcc 12.1.0 on my windows 8.1 x64 box.

I now have two warnings. The first:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD ui.c -o gobjnative/ui.o
In file included from ui.c:18:
In function 'read_from_input_buf',
      inlined from 'inchar_loop' at ui.c:396:12:
vim.h:1776:37: warning: 'memmove' offset [-2147483647, -1] is out of the
bounds [0, 256] of object 'inbuf' with type 'char_u[256]' {aka 'unsigned
char[256]'} [-Warray-bounds]
   1776 | # define mch_memmove(to, from, len) memmove((char*)(to),
(char*)(from), (size_t)(len))
    | ^~
vim.h:1776:37: note: in definition of macro 'mch_memmove'
   1776 | # define mch_memmove(to, from, len) memmove((char*)(to),
(char*)(from), (size_t)(len))
    | ^~~
ui.c: In function 'inchar_loop':
ui.c:750:17: note: 'inbuf' declared here
    750 | static char_u   inbuf[INBUFLEN + MAX_KEY_CODE_LEN];
    | ^


No idea what's wrong here, probably nothing.

The attached patch shuts gcc 12.1 up.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/4f178c98-085a-4bb6-4e2d-d84a286f1678%40internode.on.net.
--- ui.c.orig   2022-05-10 05:59:19.635047500 +1000
+++ ui.c2022-06-10 07:28:20.750625000 +1000
@@ -897,7 +897,7 @@
maxlen = inbufcount;
 mch_memmove(buf, inbuf, (size_t)maxlen);
 inbufcount -= maxlen;
-if (inbufcount)
+if (inbufcount > 0 && maxlen > 0)
mch_memmove(inbuf, inbuf + maxlen, (size_t)inbufcount);
 return (int)maxlen;
 }


Re: mingw64 gcc 12.1.0 warnings

2022-06-07 Fir de Conversatie John Marriott


On 07-June-2022 07:15, Bram Moolenaar wrote:

John Marriott wrote:


I just moved up to mingw64 with gcc 12.1.0 on my windows 8.1 x64 box.

I now have two warnings. The first:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD ui.c -o gobjnative/ui.o
In file included from ui.c:18:
In function 'read_from_input_buf',
      inlined from 'inchar_loop' at ui.c:396:12:
vim.h:1776:37: warning: 'memmove' offset [-2147483647, -1] is out of the
bounds [0, 256] of object 'inbuf' with type 'char_u[256]' {aka 'unsigned
char[256]'} [-Warray-bounds]
   1776 | # define mch_memmove(to, from, len) memmove((char*)(to),
(char*)(from), (size_t)(len))
    | ^~
vim.h:1776:37: note: in definition of macro 'mch_memmove'
   1776 | # define mch_memmove(to, from, len) memmove((char*)(to),
(char*)(from), (size_t)(len))
    | ^~~
ui.c: In function 'inchar_loop':
ui.c:750:17: note: 'inbuf' declared here
    750 | static char_u   inbuf[INBUFLEN + MAX_KEY_CODE_LEN];
    | ^


No idea what's wrong here, probably nothing.

I don't know either.




tee.c:122:24: warning: argument 1 range [18446744071562067968,
18446744073709551615] exceeds maximum object size 9223372036854775807
[-Walloc-size-larger-than=]
    122 | filepointers = calloc(numfiles, sizeof(FILE *));
    |    ^~~~
In file included from tee.c:33:
d:\users\john\documents\software\mingw\mingw64\x86_64-w64-mingw32\include\malloc.h:57:17:
note: in a call to allocation function 'calloc' declared here
     57 |   void *__cdecl calloc(size_t _NumOfElements,size_t
_SizeOfElements);
    | ^~


No idea.


The attached patch seems to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/ced94114-cc42-c995-0ffb-639d3eb6bab8%40internode.on.net.
--- tee.c.orig  2022-06-07 07:17:03.103963000 +1000
+++ tee.c   2022-06-08 05:56:58.200364300 +1000
@@ -82,7 +82,7 @@
 main(int argc, char *argv[])
 {
int append = 0;
-   int numfiles;
+   size_t  numfiles;
int maxfiles;
FILE**filepointers;
int i;
@@ -121,7 +121,7 @@
filepointers = calloc(numfiles, sizeof(FILE *));
if (filepointers == NULL)
{
-   fprintf(stderr, "Error allocating memory for %d files\n", 
numfiles);
+   fprintf(stderr, "Error allocating memory for %lld files\n", 
numfiles);
exit(1);
}
for (i = 0; i < numfiles; i++)


mingw64 gcc 12.1.0 warnings

2022-06-06 Fir de Conversatie John Marriott

Hi All,

I just moved up to mingw64 with gcc 12.1.0 on my windows 8.1 x64 box.

I now have two warnings. The first:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD ui.c -o gobjnative/ui.o

In file included from ui.c:18:
In function 'read_from_input_buf',
    inlined from 'inchar_loop' at ui.c:396:12:
vim.h:1776:37: warning: 'memmove' offset [-2147483647, -1] is out of the 
bounds [0, 256] of object 'inbuf' with type 'char_u[256]' {aka 'unsigned 
char[256]'} [-Warray-bounds]
 1776 | # define mch_memmove(to, from, len) memmove((char*)(to), 
(char*)(from), (size_t)(len))

  | ^~
vim.h:1776:37: note: in definition of macro 'mch_memmove'
 1776 | # define mch_memmove(to, from, len) memmove((char*)(to), 
(char*)(from), (size_t)(len))

  | ^~~
ui.c: In function 'inchar_loop':
ui.c:750:17: note: 'inbuf' declared here
  750 | static char_u   inbuf[INBUFLEN + MAX_KEY_CODE_LEN];
  | ^


The second:

gcc -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE  -c tee.c

ing: return type of 'main' is not 'int' [-Wmain]
   82 | main(int argc, char *argv[])
  | ^~~~
tee.c: In function 'main':
tee.c:86:17: warning: unused variable 'opt' [-Wunused-variable]
   86 | int opt;
  | ^~~
tee.c:122:24: warning: argument 1 range [18446744071562067968, 
18446744073709551615] exceeds maximum object size 9223372036854775807 
[-Walloc-size-larger-than=]

  122 | filepointers = calloc(numfiles, sizeof(FILE *));
  |    ^~~~
In file included from tee.c:33:
d:\users\john\documents\software\mingw\mingw64\x86_64-w64-mingw32\include\malloc.h:57:17: 
note: in a call to allocation function 'calloc' declared here
   57 |   void *__cdecl calloc(size_t _NumOfElements,size_t 
_SizeOfElements);

  | ^~


Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/655faf6b-33cf-2540-27b9-ce0f8ef29715%40internode.on.net.


Re: Patch 8.2.5030

2022-05-27 Fir de Conversatie John Marriott


On 28-May-2022 03:06, Bram Moolenaar wrote:

Patch 8.2.5030
Problem:autocmd_add() can only handle one event and pattern.
Solution:   Support a list of events and patterns. (Yegappan Lakshmanan,
 closes #10483)
Files:  runtime/doc/builtin.txt, src/autocmd.c, src/errors.h,
 src/testdir/test_autocmd.vim



After this patch mingw64 (gcc 11.3.0) spits out this error if 
FEAT_QUICKFIX is not defined:


gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD autocmd.c -o 
gobjnative/autocmd.o

In file included from autocmd.c:14:
autocmd.c: In function 'autocmd_add_or_delete':
autocmd.c:2828:24: error: 'e_string_or_list_expected' undeclared (first 
use in this function)

 2828 | emsg(_(e_string_or_list_expected));
  |    ^
vim.h:564:25: note: in definition of macro '_'
  564 | # define _(x) ((char *)(x))
  | ^
autocmd.c:2828:24: note: each undeclared identifier is reported only 
once for each function it appears in

 2828 | emsg(_(e_string_or_list_expected));
  |    ^
vim.h:564:25: note: in definition of macro '_'
  564 | # define _(x) ((char *)(x))
  | ^
make: *** [Make_cyg_ming.mak:1187: gobjnative/autocmd.o] Error 1


The attached patch of errors.h tries to fix it.



After applying this patch, mingw64 then spat out this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD autocmd.c -o 
gobjnative/autocmd.o

autocmd.c: In function 'f_autocmd_add':
autocmd.c:2967:20: warning: 'p' may be used uninitialized in this 
function [-Wmaybe-uninitialized]

 2967 | if (p == NULL)
  |    ^
autocmd.c:2772:18: note: 'p' was declared here
 2772 | char_u  *p;
  |  ^
autocmd.c: In function 'f_autocmd_delete':
autocmd.c:2967:20: warning: 'p' may be used uninitialized in this 
function [-Wmaybe-uninitialized]

 2967 | if (p == NULL)
  |    ^
autocmd.c:2772:18: note: 'p' was declared here
 2772 | char_u  *p;
  |  ^


The attached patch of autocmd.c tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/933e88bd-1f57-492a-d871-1882302a9cdd%40internode.on.net.
--- autocmd.c.orig  2022-05-28 05:16:51.294478700 +1000
+++ autocmd.c   2022-05-28 05:17:06.085181100 +1000
@@ -2769,7 +2769,6 @@
 listitem_T *pli;
 char_u *cmd = NULL;
 char_u *end;
-char_u *p;
 intonce;
 intnested;
 intreplace;// replace the cmd for a 
group/event
@@ -2937,6 +2936,8 @@
}
else
{
+   char_u  *p = NULL;
+
eli = NULL;
end = NULL;
while (TRUE)
--- errors.h.orig   2022-05-28 04:59:44.487914400 +1000
+++ errors.h2022-05-28 05:07:11.723421600 +1000
@@ -1953,10 +1953,10 @@
 #ifdef FEAT_QUICKFIX
 EXTERN char e_no_location_list[]
INIT(= N_("E776: No location list"));
+#endif
 # ifdef FEAT_EVAL
 EXTERN char e_string_or_list_expected[]
INIT(= N_("E777: String or List expected"));
-# endif
 #endif
 #ifdef FEAT_SPELL
 EXTERN char e_this_does_not_look_like_sug_file_str[]


Re: Patch 8.2.5003

2022-05-22 Fir de Conversatie John Marriott




On 23-May-2022 05:08, John Marriott wrote:



On 23-May-2022 04:14, Bram Moolenaar wrote:

Patch 8.2.5003
Problem:    Cannot do bitwise shifts.
Solution:   Add the >> and << operators. (Yegappan Lakshmanan, closes 
#8457)
Files:  runtime/doc/eval.txt, src/errors.h, src/eval.c, 
src/structs.h,

 src/vim.h, src/vim9execute.c, src/vim9expr.c,
 src/testdir/test_expr.vim, 
src/testdir/test_vim9_disassemble.vim,

 src/testdir/test_vim9_expr.vim



After this patch, mingw64 (gcc 11.3.0) throws this compile warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD vim9expr.c -o 
gobjnative/vim9expr.o

vim9expr.c: In function 'compile_expr5':
vim9expr.c:2718:36: warning: 'tv1' may be used uninitialized in this 
function [-Wmaybe-uninitialized]

 2718 | tv1->vval.v_number = 0;
  | ~~~^~~


Sorry I don't have a patch for this. I'm not sure what the purpose of 
tv1 is. It gets set (lines 2718 to 2722) but I don't see where it is 
used.


Cheers
John


Ah, I think I get what tv1 is doing now.

I still don't have a patch though. ;)

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/6b65d1e8-8e20-b90c-2876-c9c922be8a16%40internode.on.net.


Re: Patch 8.2.5003

2022-05-22 Fir de Conversatie John Marriott




On 23-May-2022 04:14, Bram Moolenaar wrote:

Patch 8.2.5003
Problem:Cannot do bitwise shifts.
Solution:   Add the >> and << operators. (Yegappan Lakshmanan, closes #8457)
Files:  runtime/doc/eval.txt, src/errors.h, src/eval.c, src/structs.h,
 src/vim.h, src/vim9execute.c, src/vim9expr.c,
 src/testdir/test_expr.vim, src/testdir/test_vim9_disassemble.vim,
 src/testdir/test_vim9_expr.vim



After this patch, mingw64 (gcc 11.3.0) throws this compile warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD vim9expr.c -o 
gobjnative/vim9expr.o

vim9expr.c: In function 'compile_expr5':
vim9expr.c:2718:36: warning: 'tv1' may be used uninitialized in this 
function [-Wmaybe-uninitialized]

 2718 | tv1->vval.v_number = 0;
  | ~~~^~~


Sorry I don't have a patch for this. I'm not sure what the purpose of 
tv1 is. It gets set (lines 2718 to 2722) but I don't see where it is used.


Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/b11362a7-2c50-80b0-c17e-8119f140f03d%40internode.on.net.


Link failure if FEAT_PROP_POPUP is defined without FEAT_SPELL or FEAT_QUICKFIX

2022-05-15 Fir de Conversatie John Marriott

Hi All,

mingw64 (gcc 11.3.0) link fails if FEAT_PROP_POPUP is defined but 
FEAT_QUICKFIX and FEAT_SPELL are not with this error message:


gcc -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -Wl,-nxcompat,-dynamicbase -municode -s  -o vim.exe 
objnative/alloc.o objnative/arabic.o objnative/arglist.o 
objnative/autocmd.o objnative/beval.o objnative/blob.o 
objnative/blowfish.o objnative/buffer.o objnative/bufwrite.o 
objnative/change.o objnative/charset.o objnative/cindent.o 
objnative/clientserver.o objnative/clipboard.o objnative/cmdexpand.o 
objnative/cmdhist.o objnative/crypt.o objnative/crypt_zip.o 
objnative/debugger.o objnative/dict.o objnative/diff.o 
objnative/digraph.o objnative/drawline.o objnative/drawscreen.o 
objnative/edit.o objnative/eval.o objnative/evalbuffer.o 
objnative/evalfunc.o objnative/evalvars.o objnative/evalwindow.o 
objnative/ex_cmds.o objnative/ex_cmds2.o objnative/ex_docmd.o 
objnative/ex_eval.o objnative/ex_getln.o objnative/fileio.o 
objnative/filepath.o objnative/findfile.o objnative/float.o 
objnative/fold.o objnative/getchar.o objnative/gui_xim.o 
objnative/hardcopy.o objnative/hashtab.o objnative/help.o 
objnative/highlight.o objnative/if_cscope.o objnative/indent.o 
objnative/insexpand.o objnative/json.o objnative/list.o 
objnative/locale.o objnative/main.o objnative/map.o objnative/mark.o 
objnative/match.o objnative/memfile.o objnative/memline.o 
objnative/menu.o objnative/message.o objnative/misc1.o objnative/misc2.o 
objnative/mouse.o objnative/move.o objnative/mbyte.o objnative/normal.o 
objnative/ops.o objnative/option.o objnative/optionstr.o 
objnative/os_mswin.o objnative/os_win32.o objnative/pathdef.o 
objnative/popupmenu.o objnative/popupwin.o objnative/profiler.o 
objnative/quickfix.o objnative/regexp.o objnative/register.o 
objnative/scriptfile.o objnative/screen.o objnative/search.o 
objnative/session.o objnative/sha256.o objnative/sign.o 
objnative/spell.o objnative/spellfile.o objnative/spellsuggest.o 
objnative/strings.o objnative/syntax.o objnative/tag.o objnative/term.o 
objnative/testing.o objnative/textformat.o objnative/textobject.o 
objnative/textprop.o objnative/time.o objnative/typval.o objnative/ui.o 
objnative/undo.o objnative/usercmd.o objnative/userfunc.o 
objnative/version.o objnative/vim9cmds.o objnative/vim9compile.o 
objnative/vim9execute.o objnative/vim9expr.o objnative/vim9instr.o 
objnative/vim9script.o objnative/vim9type.o objnative/viminfo.o 
objnative/winclip.o objnative/window.o objnative/os_w32exe.o 
objnative/vimres.o objnative/xdiffi.o objnative/xemit.o 
objnative/xprepare.o objnative/xutils.o objnative/xhistogram.o 
objnative/xpatience.o objnative/iscygpty.o -lkernel32 -luser32 -lgdi32 
-ladvapi32 -lcomdlg32 -lcomctl32 -lnetapi32 -lversion -lole32 -luuid
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
objnative/popupwin.o:popupwin.c:(.text+0xd96): undefined reference to 
`ml_append_buf'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
objnative/popupwin.o:popupwin.c:(.text+0xdf5): undefined reference to 
`ml_append_buf'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
objnative/popupwin.o:popupwin.c:(.text+0xe4a): undefined reference to 
`ml_append_buf'

collect2.exe: error: ld returned 1 exit status
make: *** [Make_cyg_ming.mak:1107: vim.exe] Error 1
make: Target 'all' not remade because of errors.

The attached patch seems to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/b6cd9081-20cc-34c2-8709-45229727c5dd%40internode.on.net.
--- memline.c.orig  2022-04-16 05:45:42.822622300 +1000
+++ memline.c   2022-05-16 06:48:24.486973300 +1000
@@ -3361,7 +3361,7 @@
 }
 
 
-#if defined(FEAT_SPELL) || defined(FEAT_QUICKFIX) || defined(PROTO)
+#if defined(FEAT_SPELL) || defined(FEAT_QUICKFIX) || defined(FEAT_PROP_POPUP) 
|| defined(PROTO)
 /*
  * Like ml_append() but for an arbitrary buffer.  The buffer must already have
  * a memline.


Re: Patch 8.2.4902

2022-05-08 Fir de Conversatie John Marriott


On 07-May-2022 21:26, Bram Moolenaar wrote:

Patch 8.2.4902
Problem:Mouse wheel scrolling is inconsistent.
Solution:   Use the MS-Winows system setting. (closes #10368)
Files:  runtime/doc/scroll.txt, src/gui_w32.c, src/mouse.c,
 src/proto/mouse.pro, src/testing.c, src/testdir/test_gui.vim



After this patch, mingw64 (gcc 11.3.0) throws this compile warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD gui_w32.c -o 
gobjnative/gui_w32.o
gui_w32.c:4008:12: warning: 'mouse_scroll_chars' defined but not used 
[-Wunused-variable]

 4008 | static int mouse_scroll_chars = 0;
  |    ^~
gui_w32.c:4007:12: warning: 'mouse_scroll_lines' defined but not used 
[-Wunused-variable]

 4007 | static int mouse_scroll_lines = 0;
  |    ^~


The attached patch seems to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/dca04564-19db-e1cb-0f56-bef88091c893%40internode.on.net.
--- gui_w32.c.orig  2022-05-08 06:48:49.682886000 +1000
+++ gui_w32.c   2022-05-09 06:25:38.072099800 +1000
@@ -4003,10 +4003,6 @@
 
 static int dialog_default_button = -1;
 
-// Intellimouse support
-static int mouse_scroll_lines = 0;
-static int mouse_scroll_chars = 0;
-
 #ifdef FEAT_TOOLBAR
 static void initialise_toolbar(void);
 static void update_toolbar_size(void);


Re: Patch 8.2.4850

2022-04-30 Fir de Conversatie John Marriott


On 01-May-2022 06:50, Tony Mechelynck wrote:

On Sat, Apr 30, 2022 at 5:12 PM Bram Moolenaar  wrote:


Patch 8.2.4850
Problem:Mksession mixes up "tabpages" and "curdir" arguments.
Solution:   Correct logic for storing tabpage in session. (closes #10312)
Files:  src/session.c, src/testdir/test_mksession.vim

At this patchlevel, I get one warning in Huge, two each (but related)
in Big and Normal, none in Small and Tiny. The following comes from my
Normal build:

gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
-I/usr/include/gtk-3.0 -I/usr/include/pango-1.0
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/harfbuzz -I/usr/include/freetype2
-I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi
-I/usr/include/uuid -I/usr/include/cairo -I/usr/include/pixman-1
-I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0
-I/usr/include/gio-unix-2.0 -I/usr/include/wayland
-I/usr/include/libxkbcommon -I/usr/include/atk-1.0
-I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0
-I/usr/lib64/dbus-1.0/include -I/usr/include/at-spi-2.0 -pthread
-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations
-D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1-o
objects/session.o session.c
session.c: In function ‘ex_mkrc’:
session.c:982:21: warning: ‘tab_firstwin’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
   982 | if (tab_firstwin->w_next != NULL)
   | ^~~~
session.c:627:18: note: ‘tab_firstwin’ was declared here
   627 | win_T   *tab_firstwin;
   |  ^~~~

The message from my Huge build is (only slightly) different:

gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
-I/usr/include/gtk-3.0 -I/usr/include/pango-1.0
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/harfbuzz -I/usr/include/freetype2
-I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi
-I/usr/include/uuid -I/usr/include/cairo -I/usr/include/pixman-1
-I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0
-I/usr/include/gio-unix-2.0 -I/usr/include/wayland
-I/usr/include/libxkbcommon -I/usr/include/atk-1.0
-I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0
-I/usr/lib64/dbus-1.0/include -I/usr/include/at-spi-2.0 -pthread
-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations
-D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1-o
objects/session.o session.c
session.c: In function ‘makeopens’:
session.c:982:21: warning: ‘tab_firstwin’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
   982 | if (tab_firstwin->w_next != NULL)
   | ^~~~


Best regards,
Tony.


Hi Tony,

Try this patch.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/6e13fa5d-a469-a55e-5b05-0b3e907c4eed%40internode.on.net.
--- session.c.orig  2022-05-01 06:45:20.891175000 +1000
+++ session.c   2022-05-01 07:51:19.647761100 +1000
@@ -624,7 +624,7 @@
 char_u *sname;
 win_T  *edited_win = NULL;
 intrestore_stal = FALSE;
-win_T  *tab_firstwin;
+win_T  *tab_firstwin = NULL;
 frame_T*tab_topframe;
 intcur_arg_idx = 0;
 intnext_arg_idx = 0;


Patch 8.2.4792

2022-04-19 Fir de Conversatie John Marriott

After this patch, mingw (gcc 11.2.0) throws this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD indent.c -o 
gobjnative/indent.o

indent.c: In function 'op_reindent':
indent.c:1118:34: warning: 'i' may be used uninitialized in this 
function [-Wmaybe-uninitialized]

 1118 | i = oap->line_count - (i + 1);
  |   ~~~^~~~


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/1dd96083-42d1-fe7c-1ad9-5de8c3fc9efb%40internode.on.net.
--- indent.c.orig   2022-04-20 05:43:23.489963300 +1000
+++ indent.c2022-04-20 05:48:25.280911900 +1000
@@ -1046,7 +1046,7 @@
 void
 op_reindent(oparg_T *oap, int (*how)(void))
 {
-long   i;
+long   i = 0;
 char_u *l;
 intamount;
 linenr_T   first_changed = 0;


Re: Compile warning on ucrt build of mingw

2022-04-17 Fir de Conversatie John Marriott



On 17-Apr-2022 19:58, Bram Moolenaar wrote:

John Marriott wrote:


I recently started using a ucrt enabled build of mingw64 (gcc 11.2.0)
which gives me this compile warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD evalfunc.c -o
gobjnative/evalfunc.o
In file included from os_win32.h:77,
   from vim.h:279,
   from evalfunc.c:15:
evalfunc.c: In function 'f_environ':
evalfunc.c:3679:27: warning: '__p__environ' redeclared without dllimport
attribute: previous dllimport ignored [-Wattributes]
   3679 | extern char **environ;
    |   ^~~


The attach patch seems to fix it.

Hmm, the warning is for __p__environ, while it points to "environ", and
the added #ifdef removes the extern for _wenviron.  Confusing, but if
this works, then fine.


Hi Bram,

Patch 8.2.4769 fixes it, thanks.

Happy Easter!

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/f6359366-567f-d9f0-22fe-584e2108df3d%40internode.on.net.


Compile warning on ucrt build of mingw

2022-04-16 Fir de Conversatie John Marriott
I recently started using a ucrt enabled build of mingw64 (gcc 11.2.0) 
which gives me this compile warning:


gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD evalfunc.c -o 
gobjnative/evalfunc.o

In file included from os_win32.h:77,
 from vim.h:279,
 from evalfunc.c:15:
evalfunc.c: In function 'f_environ':
evalfunc.c:3679:27: warning: '__p__environ' redeclared without dllimport 
attribute: previous dllimport ignored [-Wattributes]

 3679 | extern char **environ;
  |   ^~~


The attach patch seems to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/04caf53e-998a-1980-583d-5aafac64e468%40internode.on.net.
--- evalfunc.c.orig 2022-04-17 06:26:12.533038800 +1000
+++ evalfunc.c  2022-04-17 07:42:49.876641800 +1000
@@ -3673,8 +3673,10 @@
 #if !defined(AMIGA)
 inti = 0;
 char_u *entry, *value;
-# ifdef MSWIN
+# if defined (MSWIN)
+# if !defined(_UCRT)
 extern wchar_t **_wenviron;
+# endif
 # else
 extern char**environ;
 # endif


Re: Patch 8.2.4678

2022-04-03 Fir de Conversatie John Marriott


On 04-Apr-2022 06:12, Bram Moolenaar wrote:

Patch 8.2.4678
Problem:Vim9: not all code is tested.
Solution:   Add a few more tests.
Files:  src/vim9execute.c, src/testdir/test_vim9_script.vim,
 src/testdir/test_vim9_import.vim, src/testdir/test_vim9_cmd.vim




After this patch, mingw64 (gcc 11.2.0) throws this error:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD vim9execute.c -o 
gobjnative/vim9execute.o

In file included from vim9execute.c:15:
vim9execute.c: In function 'exec_instructions':
vim9execute.c:2640:37: error: 'e_cant_open_file_str_2' undeclared (first 
use in this function); did you mean 'e_cant_open_file_str'?
 2640 | semsg(_(e_cant_open_file_str_2), 
si->sn_name);

  | ^~
vim.h:564:25: note: in definition of macro '_'
  564 | # define _(x) ((char *)(x))
  | ^
vim9execute.c:2640:37: note: each undeclared identifier is reported only 
once for each function it appears in
 2640 | semsg(_(e_cant_open_file_str_2), 
si->sn_name);

  | ^~
vim.h:564:25: note: in definition of macro '_'
  564 | # define _(x) ((char *)(x))
  | ^
make: *** [Make_cyg_ming.mak:1187: gobjnative/vim9execute.o] Error 1


The attached patch tries to fix it.

Also, I noticed that two error messages have the same error number in 
errors.h:




Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/7060f31a-7608-b503-bd4b-361487bf2494%40internode.on.net.
--- errors.h.orig   2022-04-01 05:46:13.356515400 +1100
+++ errors.h2022-04-04 06:42:25.760817400 +1000
@@ -1123,8 +1123,10 @@
 #ifdef FEAT_POSTSCRIPT
 EXTERN char e_error_writing_to_postscript_output_file[]
INIT(= N_("E455: Error writing to PostScript output file"));
+#endif
 EXTERN char e_cant_open_file_str_2[]
INIT(= N_("E456: Can't open file \"%s\""));
+#ifdef FEAT_POSTSCRIPT
 EXTERN char e_cant_find_postscript_resource_file_str_ps[]
INIT(= N_("E456: Can't find PostScript resource file \"%s.ps\""));
 EXTERN char e_cant_read_postscript_resource_file_str[]


Re: Patch 8.2.4670

2022-04-03 Fir de Conversatie John Marriott


On 04-Apr-2022 06:10, John Marriott wrote:


On 03-Apr-2022 20:23, Bram Moolenaar wrote:

Patch 8.2.4670
Problem:    Memory allocation failures for new tab page not tested.
Solution:   Add tests with failing memory allocation. (Yegappan 
Lakshmanan,

 closes #10067)
Files:  src/alloc.h, src/blob.c, src/buffer.c, src/window.c,
 src/testdir/test_blob.vim, src/testdir/test_buffer.vim,
 src/testdir/test_tabpage.vim, 
src/testdir/test_window_cmd.vim



After applying patches 8.2.4670 to 8.2.4677, mingw64 (gcc 11.2.0) 
throws this linker error:


gcc -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD 
-Wl,-nxcompat,-dynamicbase -municode -s -mwindows -o gvim.exe 
gobjnative/alloc.o gobjnative/arabic.o gobjnative/arglist.o 
gobjnative/autocmd.o gobjnative/beval.o gobjnative/blob.o 
gobjnative/blowfish.o gobjnative/buffer.o gobjnative/bufwrite.o 
gobjnative/change.o gobjnative/charset.o gobjnative/cindent.o 
gobjnative/clientserver.o gobjnative/clipboard.o 
gobjnative/cmdexpand.o gobjnative/cmdhist.o gobjnative/crypt.o 
gobjnative/crypt_zip.o gobjnative/debugger.o gobjnative/dict.o 
gobjnative/diff.o gobjnative/digraph.o gobjnative/drawline.o 
gobjnative/drawscreen.o gobjnative/edit.o gobjnative/eval.o 
gobjnative/evalbuffer.o gobjnative/evalfunc.o gobjnative/evalvars.o 
gobjnative/evalwindow.o gobjnative/ex_cmds.o gobjnative/ex_cmds2.o 
gobjnative/ex_docmd.o gobjnative/ex_eval.o gobjnative/ex_getln.o 
gobjnative/fileio.o gobjnative/filepath.o gobjnative/findfile.o 
gobjnative/float.o gobjnative/fold.o gobjnative/getchar.o 
gobjnative/gui_xim.o gobjnative/hardcopy.o gobjnative/hashtab.o 
gobjnative/help.o gobjnative/highlight.o gobjnative/if_cscope.o 
gobjnative/indent.o gobjnative/insexpand.o gobjnative/json.o 
gobjnative/list.o gobjnative/locale.o gobjnative/main.o 
gobjnative/map.o gobjnative/mark.o gobjnative/match.o 
gobjnative/memfile.o gobjnative/memline.o gobjnative/menu.o 
gobjnative/message.o gobjnative/misc1.o gobjnative/misc2.o 
gobjnative/mouse.o gobjnative/move.o gobjnative/mbyte.o 
gobjnative/normal.o gobjnative/ops.o gobjnative/option.o 
gobjnative/optionstr.o gobjnative/os_mswin.o gobjnative/os_win32.o 
gobjnative/pathdef.o gobjnative/popupmenu.o gobjnative/popupwin.o 
gobjnative/profiler.o gobjnative/quickfix.o gobjnative/regexp.o 
gobjnative/register.o gobjnative/scriptfile.o gobjnative/screen.o 
gobjnative/search.o gobjnative/session.o gobjnative/sha256.o 
gobjnative/sign.o gobjnative/spell.o gobjnative/spellfile.o 
gobjnative/spellsuggest.o gobjnative/strings.o gobjnative/syntax.o 
gobjnative/tag.o gobjnative/term.o gobjnative/testing.o 
gobjnative/textformat.o gobjnative/textobject.o gobjnative/textprop.o 
gobjnative/time.o gobjnative/typval.o gobjnative/ui.o 
gobjnative/undo.o gobjnative/usercmd.o gobjnative/userfunc.o 
gobjnative/version.o gobjnative/vim9cmds.o gobjnative/vim9compile.o 
gobjnative/vim9execute.o gobjnative/vim9expr.o gobjnative/vim9instr.o 
gobjnative/vim9script.o gobjnative/vim9type.o gobjnative/viminfo.o 
gobjnative/winclip.o gobjnative/window.o gobjnative/os_w32exe.o 
gobjnative/vimres.o gobjnative/xdiffi.o gobjnative/xemit.o 
gobjnative/xprepare.o gobjnative/xutils.o gobjnative/xhistogram.o 
gobjnative/xpatience.o gobjnative/gui.o gobjnative/gui_w32.o 
gobjnative/gui_beval.o -lkernel32 -luser32 -lgdi32 -ladvapi32 
-lcomdlg32 -lcomctl32 -lnetapi32 -lversion -lole32 -luuid
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/blob.o:blob.c:(.text+0x11): undefined reference to 
`alloc_clear_id'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/blob.o:blob.c:(.text+0x54): undefined reference to 
`alloc_clear_id'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/blob.o:blob.c:(.text+0xe1): undefined reference to 
`alloc_clear_id'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/blob.o:blob.c:(.text+0x4e7): undefined reference to 
`alloc_clear_id'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/blob.o:blob.c:(.text+0x70b): undefined reference to 
`alloc_clear_id'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/blob.o:blob.c:(.text+0xa61): more undefined references to 
`alloc_clear_id' follow

collect2.exe: error: ld returned 1 exit status
make: *** [Make_cyg_ming.mak:1107: gvim.exe] Error 2

Re: Patch 8.2.4670

2022-04-03 Fir de Conversatie John Marriott



On 03-Apr-2022 20:23, Bram Moolenaar wrote:

Patch 8.2.4670
Problem:Memory allocation failures for new tab page not tested.
Solution:   Add tests with failing memory allocation. (Yegappan Lakshmanan,
 closes #10067)
Files:  src/alloc.h, src/blob.c, src/buffer.c, src/window.c,
 src/testdir/test_blob.vim, src/testdir/test_buffer.vim,
 src/testdir/test_tabpage.vim, src/testdir/test_window_cmd.vim


After applying patches 8.2.4670 to 8.2.4677, mingw64 (gcc 11.2.0) throws 
this linker error:


gcc -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD -Wl,-nxcompat,-dynamicbase 
-municode -s -mwindows -o gvim.exe gobjnative/alloc.o 
gobjnative/arabic.o gobjnative/arglist.o gobjnative/autocmd.o 
gobjnative/beval.o gobjnative/blob.o gobjnative/blowfish.o 
gobjnative/buffer.o gobjnative/bufwrite.o gobjnative/change.o 
gobjnative/charset.o gobjnative/cindent.o gobjnative/clientserver.o 
gobjnative/clipboard.o gobjnative/cmdexpand.o gobjnative/cmdhist.o 
gobjnative/crypt.o gobjnative/crypt_zip.o gobjnative/debugger.o 
gobjnative/dict.o gobjnative/diff.o gobjnative/digraph.o 
gobjnative/drawline.o gobjnative/drawscreen.o gobjnative/edit.o 
gobjnative/eval.o gobjnative/evalbuffer.o gobjnative/evalfunc.o 
gobjnative/evalvars.o gobjnative/evalwindow.o gobjnative/ex_cmds.o 
gobjnative/ex_cmds2.o gobjnative/ex_docmd.o gobjnative/ex_eval.o 
gobjnative/ex_getln.o gobjnative/fileio.o gobjnative/filepath.o 
gobjnative/findfile.o gobjnative/float.o gobjnative/fold.o 
gobjnative/getchar.o gobjnative/gui_xim.o gobjnative/hardcopy.o 
gobjnative/hashtab.o gobjnative/help.o gobjnative/highlight.o 
gobjnative/if_cscope.o gobjnative/indent.o gobjnative/insexpand.o 
gobjnative/json.o gobjnative/list.o gobjnative/locale.o 
gobjnative/main.o gobjnative/map.o gobjnative/mark.o gobjnative/match.o 
gobjnative/memfile.o gobjnative/memline.o gobjnative/menu.o 
gobjnative/message.o gobjnative/misc1.o gobjnative/misc2.o 
gobjnative/mouse.o gobjnative/move.o gobjnative/mbyte.o 
gobjnative/normal.o gobjnative/ops.o gobjnative/option.o 
gobjnative/optionstr.o gobjnative/os_mswin.o gobjnative/os_win32.o 
gobjnative/pathdef.o gobjnative/popupmenu.o gobjnative/popupwin.o 
gobjnative/profiler.o gobjnative/quickfix.o gobjnative/regexp.o 
gobjnative/register.o gobjnative/scriptfile.o gobjnative/screen.o 
gobjnative/search.o gobjnative/session.o gobjnative/sha256.o 
gobjnative/sign.o gobjnative/spell.o gobjnative/spellfile.o 
gobjnative/spellsuggest.o gobjnative/strings.o gobjnative/syntax.o 
gobjnative/tag.o gobjnative/term.o gobjnative/testing.o 
gobjnative/textformat.o gobjnative/textobject.o gobjnative/textprop.o 
gobjnative/time.o gobjnative/typval.o gobjnative/ui.o gobjnative/undo.o 
gobjnative/usercmd.o gobjnative/userfunc.o gobjnative/version.o 
gobjnative/vim9cmds.o gobjnative/vim9compile.o gobjnative/vim9execute.o 
gobjnative/vim9expr.o gobjnative/vim9instr.o gobjnative/vim9script.o 
gobjnative/vim9type.o gobjnative/viminfo.o gobjnative/winclip.o 
gobjnative/window.o gobjnative/os_w32exe.o gobjnative/vimres.o 
gobjnative/xdiffi.o gobjnative/xemit.o gobjnative/xprepare.o 
gobjnative/xutils.o gobjnative/xhistogram.o gobjnative/xpatience.o 
gobjnative/gui.o gobjnative/gui_w32.o gobjnative/gui_beval.o -lkernel32 
-luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lnetapi32 -lversion 
-lole32 -luuid
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/blob.o:blob.c:(.text+0x11): undefined reference to 
`alloc_clear_id'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/blob.o:blob.c:(.text+0x54): undefined reference to 
`alloc_clear_id'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/blob.o:blob.c:(.text+0xe1): undefined reference to 
`alloc_clear_id'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/blob.o:blob.c:(.text+0x4e7): undefined reference to 
`alloc_clear_id'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/blob.o:blob.c:(.text+0x70b): undefined reference to 
`alloc_clear_id'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/blob.o:blob.c:(.text+0xa61): more undefined references to 
`alloc_clear_id' follow

collect2.exe: error: ld returned 1 exit status
make: *** [Make_cyg_ming.mak:1107: gvim.exe] Error 2


Sorry I don't have a patch.

Cheers
John

--
--

Re: Patch 8.2.4559

2022-03-13 Fir de Conversatie John Marriott



On 14-Mar-2022 02:53, Bram Moolenaar wrote:

Patch 8.2.4559 (after 8.24555)
Problem:getmousepos() returns the screen column. (Ernie Rael)
Solution:   Return the text column, as documented.
Files:  src/mouse.c, src/testdir/test_functions.vim


After this patch, mingw64 (gcc 11.2.0) throws this linker error for a 
non-gui build:


gcc -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -Wl,-nxcompat,-dynamicbase -municode -s  -o vim.exe 
objnative/alloc.o objnative/arabic.o objnative/arglist.o 
objnative/autocmd.o objnative/beval.o objnative/blob.o 
objnative/blowfish.o objnative/buffer.o objnative/bufwrite.o 
objnative/change.o objnative/charset.o objnative/cindent.o 
objnative/clientserver.o objnative/clipboard.o objnative/cmdexpand.o 
objnative/cmdhist.o objnative/crypt.o objnative/crypt_zip.o 
objnative/debugger.o objnative/dict.o objnative/diff.o 
objnative/digraph.o objnative/drawline.o objnative/drawscreen.o 
objnative/edit.o objnative/eval.o objnative/evalbuffer.o 
objnative/evalfunc.o objnative/evalvars.o objnative/evalwindow.o 
objnative/ex_cmds.o objnative/ex_cmds2.o objnative/ex_docmd.o 
objnative/ex_eval.o objnative/ex_getln.o objnative/fileio.o 
objnative/filepath.o objnative/findfile.o objnative/float.o 
objnative/fold.o objnative/getchar.o objnative/gui_xim.o 
objnative/hardcopy.o objnative/hashtab.o objnative/help.o 
objnative/highlight.o objnative/if_cscope.o objnative/indent.o 
objnative/insexpand.o objnative/json.o objnative/list.o 
objnative/locale.o objnative/main.o objnative/map.o objnative/mark.o 
objnative/match.o objnative/memfile.o objnative/memline.o 
objnative/menu.o objnative/message.o objnative/misc1.o objnative/misc2.o 
objnative/mouse.o objnative/move.o objnative/mbyte.o objnative/normal.o 
objnative/ops.o objnative/option.o objnative/optionstr.o 
objnative/os_mswin.o objnative/os_win32.o objnative/pathdef.o 
objnative/popupmenu.o objnative/popupwin.o objnative/profiler.o 
objnative/quickfix.o objnative/regexp.o objnative/register.o 
objnative/scriptfile.o objnative/screen.o objnative/search.o 
objnative/session.o objnative/sha256.o objnative/sign.o 
objnative/spell.o objnative/spellfile.o objnative/spellsuggest.o 
objnative/strings.o objnative/syntax.o objnative/tag.o objnative/term.o 
objnative/testing.o objnative/textformat.o objnative/textobject.o 
objnative/textprop.o objnative/time.o objnative/typval.o objnative/ui.o 
objnative/undo.o objnative/usercmd.o objnative/userfunc.o 
objnative/version.o objnative/vim9cmds.o objnative/vim9compile.o 
objnative/vim9execute.o objnative/vim9expr.o objnative/vim9instr.o 
objnative/vim9script.o objnative/vim9type.o objnative/viminfo.o 
objnative/winclip.o objnative/window.o objnative/os_w32exe.o 
objnative/vimres.o objnative/xdiffi.o objnative/xemit.o 
objnative/xprepare.o objnative/xutils.o objnative/xhistogram.o 
objnative/xpatience.o objnative/iscygpty.o -lkernel32 -luser32 -lgdi32 
-ladvapi32 -lcomdlg32 -lcomctl32 -lnetapi32 -lversion -lole32 -luuid
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
objnative/mouse.o:mouse.c:(.text+0x318c): undefined reference to `vcol2col'

collect2.exe: error: ld returned 1 exit status
make: *** [Make_cyg_ming.mak:1107: vim.exe] Error 1
make: Target 'all' not remade because of errors.


Sorry, I don't have a patch for this.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/21dfc216-3df5-e138-5c28-45af5f677195%40internode.on.net.


Re: Patch 8.2.4528

2022-03-08 Fir de Conversatie John Marriott


On 09-Mar-2022 03:53, Bram Moolenaar wrote:

Patch 8.2.4528
Problem:Crash when using null_function for a partial.
Solution:   Don't call fname_trans_sid() with NULL. (closes #9908)
Files:  src/userfunc.c, src/testdir/test_vim9_func.vim



After this patch, mingw64 (gcc 11.2.0) throws this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD userfunc.c -o 
gobjnative/userfunc.o

userfunc.c: In function 'make_partial':
userfunc.c:5755:27: warning: 'fp' may be used uninitialized in this 
function [-Wmaybe-uninitialized]

 5755 | if ((fp != NULL && (fp->uf_flags & FC_DICT))
  | ~~^~


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/1a0fde44-ae60-14a6-deec-7380b73467f8%40internode.on.net.
--- userfunc.c.orig 2022-03-09 05:24:14.896079100 +1100
+++ userfunc.c  2022-03-09 05:28:17.780679800 +1100
@@ -5730,7 +5730,7 @@
 make_partial(dict_T *selfdict_in, typval_T *rettv)
 {
 char_u  *fname;
-ufunc_T *fp;
+ufunc_T *fp = NULL;
 char_u  fname_buf[FLEN_FIXED + 1];
 int error;
 dict_T  *selfdict = selfdict_in;


Re: Patch 8.2.4520

2022-03-06 Fir de Conversatie John Marriott



On 07-Mar-2022 06:56, Bram Moolenaar wrote:

Patch 8.2.4520
Problem:Using wrong highlight for cursor line number.
Solution:   Take filler lines into account when using CursorLineNr.
 (closes #9897)
Files:  src/drawline.c, src/testdir/test_diffmode.vim,
 src/testdir/dumps/Test_diff_with_cursorline_number_01.dump,
 src/testdir/dumps/Test_diff_with_cursorline_number_02.dump


After this match mingw64 (gcc 11.2.0) spits out this error if FEAT_DIFF 
or FEAT_SIGNS are not defined:


gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD drawline.c -o 
gobjnative/drawline.o

drawline.c: In function 'win_line':
drawline.c:1197:53: error: 'filler_lines' undeclared (first use in this 
function)

 1197 |   && (row == startrow + filler_lines
  | ^~~~
drawline.c:1197:53: note: each undeclared identifier is reported only 
once for each function it appears in

make: *** [Make_cyg_ming.mak:1184: gobjnative/drawline.o] Error 1


Not sure the best way to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/3b8c69b0-eb3a-ab32-5754-31ecd24c1503%40internode.on.net.


Re: Patch 8.2.4487

2022-03-01 Fir de Conversatie John Marriott


On 02-Mar-2022 06:23, Bram Moolenaar wrote:

Patch 8.2.4487
Problem:Vim9: cannot compare with v:null.
Solution:   Allow comparing anything with v:null. (closes #9866)
Files:  src/vim9instr.c, src/typval.c, src/proto/typval.pro,
 src/vim9.h, src/vim9execute.c, src/evalvars.c,
 src/testdir/test_vim9_expr.vim,
 src/testdir/test_vim9_disassemble.vim


After this patch mingw64 (gcc 11.2.0) spits out this error if 
FEAT_JOB_CHANNEL is not defined:


gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD typval.c -o 
gobjnative/typval.o

typval.c: In function 'typval_compare_null':
typval.c:1397:46: error: 'union ' has no member named 'v_channel'
 1397 | case VAR_CHANNEL: return tv->vval.v_channel == NULL;
  |  ^
typval.c:1400:43: error: 'union ' has no member named 
'v_job'; did you mean 'v_blob'?

 1400 | case VAR_JOB: return tv->vval.v_job == NULL;
  |   ^
  |   v_blob
make: *** [Make_cyg_ming.mak:1183: gobjnative/typval.o] Error 1


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/43c1a7a4-b200-ed83-de67-bc31cdbffdb0%40internode.on.net.
--- typval.c.orig   2022-03-02 06:31:51.382661100 +1100
+++ typval.c2022-03-02 06:39:18.365574500 +1100
@@ -1394,10 +1394,14 @@
switch (tv->v_type)
{
case VAR_BLOB: return tv->vval.v_blob == NULL;
+#ifdef FEAT_JOB_CHANNEL
case VAR_CHANNEL: return tv->vval.v_channel == NULL;
+#endif
case VAR_DICT: return tv->vval.v_dict == NULL;
case VAR_FUNC: return tv->vval.v_string == NULL;
+#ifdef FEAT_JOB_CHANNEL
case VAR_JOB: return tv->vval.v_job == NULL;
+#endif
case VAR_LIST: return tv->vval.v_list == NULL;
case VAR_PARTIAL: return tv->vval.v_partial == NULL;
case VAR_STRING: return tv->vval.v_string == NULL;


Re: Patch 8.2.4482

2022-02-28 Fir de Conversatie John Marriott


On 28-Feb-2022 08:03, Bram Moolenaar wrote:

Patch 8.2.4482
Problem:No fuzzy cmdline completion for user defined completion.
Solution:   Add fuzzy completion for user defined completion. (Yegappan
 Lakshmanan, closes #9858)
Files:  src/cmdexpand.c, src/testdir/test_cmdline.vim




After this patch, mingw64 (gcc 11.2.0) throws this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD cmdexpand.c -o 
gobjnative/cmdexpand.o

cmdexpand.c: In function 'ExpandFromContext':
cmdexpand.c:3056:33: warning: 'score' may be used uninitialized in this 
function [-Wmaybe-uninitialized]

 3056 | fuzmatch->score = score;
  | ^~~
cmdexpand.c:3006:17: note: 'score' was declared here
 3006 | int score;
  | ^


The attached patch tries to fix it.
Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/3d9eba67-11c9-2f42-abb5-45cb756b7e4a%40internode.on.net.
--- cmdexpand.c.orig2022-03-01 05:56:52.611353000 +1100
+++ cmdexpand.c 2022-03-01 06:17:08.904664100 +1100
@@ -3003,7 +3003,7 @@
 garray_T   ga;
 intfuzzy;
 intmatch;
-intscore;
+intscore = 0;
 
 fuzzy = cmdline_fuzzy_complete(pat);
 *matches = NULL;


Re: Patch 8.2.4264

2022-01-30 Fir de Conversatie John Marriott




On 31-Jan-2022 07:01, Bram Moolenaar wrote:


I saw your patch only after sending out patch 8.2.4266.  The effect
should be the same.


By the way, are we sure that line 4833 (did_emsg |= saved_did_emsg) is
correct? Shouldn't it be: did_emsg = save_did_emsg?

We don't want to reset did_emsg here.  It's a corner case anyway, the
comment mentions "magic braces":

 // An error in a function call during evaluation of an expression in magic
 // braces should not cause the function not to be defined.

I'm not sure this is true, we usually abort when an error is detected.
But I don't like to change old behavior unless we know why it was done
that way.



No worries.

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/04efd22b-5f10-b702-68bd-66515797d3ef%40internode.on.net.


Re: Patch 8.2.4264

2022-01-30 Fir de Conversatie John Marriott


On 31-Jan-2022 05:41, Bram Moolenaar wrote:

Patch 8.2.4264
Problem:Vim9: can use old style autoload function name.
Solution:   Give an error for old style autoload function name.
Files:  src/errors.h, src/userfunc.c, src/testdir/test_vim9_import.vim,
 src/testdir/test_vim9_func.vim, src/testdir/test_vim9_script.vim




After this patch, mingw64 (gcc 11.2.0) throws this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD userfunc.c -o 
gobjnative/userfunc.o

userfunc.c: In function 'define_function':
userfunc.c:4833:14: warning: 'saved_did_emsg' may be used uninitialized 
in this function [-Wmaybe-uninitialized]

 4833 | did_emsg |= saved_did_emsg;
  |  ^~


The attached patch tries to fix it.

By the way, are we sure that line 4833 (did_emsg |= saved_did_emsg) is 
correct? Shouldn't it be: did_emsg = save_did_emsg?


Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/a8bc2db2-75a1-50eb-db9f-b672562b1770%40internode.on.net.
--- userfunc.c.orig 2022-01-31 05:45:05.539685500 +1100
+++ userfunc.c  2022-01-31 06:09:47.930548300 +1100
@@ -4173,6 +4173,11 @@
 ga_init();
 ga_init(_args);
 
+// An error in a function call during evaluation of an expression in magic
+// braces should not cause the function not to be defined.
+saved_did_emsg = did_emsg;
+did_emsg = FALSE;
+
 /*
  * Get the function name.  There are these situations:
  * funcnormal function name
@@ -4239,11 +4244,6 @@
}
 }
 
-// An error in a function call during evaluation of an expression in magic
-// braces should not cause the function not to be defined.
-saved_did_emsg = did_emsg;
-did_emsg = FALSE;
-
 /*
  * ":function func" with only function name: list function.
  */


Re: Patch 8.2.4050

2022-01-09 Fir de Conversatie John Marriott


On 10-Jan-2022 08:37, Bram Moolenaar wrote:

Patch 8.2.4050
Problem:Vim9: need to prefix every item in an autoload script.
Solution:   First step in supporting "vim9script autoload" and "import
 autoload".
Files:  runtime/doc/repeat.txt, runtime/doc/vim9.txt, src/structs.h,
 src/errors.h, src/vim9script.c, src/scriptfile.c,
 src/proto/scriptfile.pro, src/userfunc.c, src/eval.c,
 src/evalvars.c, src/vim9compile.c, src/proto/vim9compile.pro,
 src/vim9expr.c, src/testdir/test_vim9_script.vim




After this patch, mingw64 (gcc 11.2.0) comes up with this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD scriptfile.c -o 
gobjnative/scriptfile.o

scriptfile.c: In function 'get_new_scriptitem':
scriptfile.c:309:23: warning: 'si' may be used uninitialized in this 
function [-Wmaybe-uninitialized]

  309 | si->sn_script_seq = current_sctx.sc_seq;
  | ~~^


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/f70329f7-b2da-5b83-c382-2a583ef5d25c%40internode.on.net.
--- scriptfile.c.orig   2022-01-10 11:43:15.993375400 +1100
+++ scriptfile.c2022-01-10 12:26:48.817073500 +1100
@@ -274,7 +274,7 @@
 {
 static scid_T   last_current_SID = 0;
 intsid = ++last_current_SID;
-scriptitem_T*si;
+scriptitem_T*si = NULL;
 
 if (ga_grow(_items, (int)(sid - script_items.ga_len)) == FAIL)
 {
@@ -305,8 +305,11 @@
 # endif
 }
 
-// Used to check script variable index is still valid.
-si->sn_script_seq = current_sctx.sc_seq;
+if (si != NULL)
+{
+   // Used to check script variable index is still valid.
+   si->sn_script_seq = current_sctx.sc_seq;
+}
 
 return sid;
 }


Re: Patch 8.2.4008

2022-01-05 Fir de Conversatie John Marriott


On 06-Jan-2022 03:09, Bram Moolenaar wrote:

Patch 8.2.4008
Problem:Error messages are spread out.
Solution:   Move more error messages to errors.h.
Files:  src/errors.h, src/diff.c, src/digraph.c, src/evalfunc.c,
 src/evalvars.c, src/ex_cmds.c, src/ex_docmd.c, src/ex_getln.c,
 src/insexpand.c, src/match.c, src/memline.c, src/menu.c,
 src/ops.c, src/profiler.c, src/quickfix.c, src/regexp.c,
 src/regexp_bt.c, src/regexp_nfa.c, src/register.c, src/spell.c,
 src/spell.h, src/spellfile.c, src/strings.c, src/syntax.c,
 src/typval.c, src/undo.c, src/userfunc.c


After this patch, mingw64 (gcc 11.2.0) spits out this error message if 
FEAT_SPELL is not defined:


gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD insexpand.c -o 
gobjnative/insexpand.o

In file included from insexpand.c:14:
insexpand.c: In function 'get_userdefined_compl_info':
insexpand.c:4485:17: error: 'e_option_str_is_not_set' undeclared (first 
use in this function)

 4485 | semsg(_(e_option_str_is_not_set), ctrl_x_mode_function()
  | ^~~
vim.h:569:25: note: in definition of macro '_'
  569 | # define _(x) ((char *)(x))
  | ^
insexpand.c:4485:17: note: each undeclared identifier is reported only 
once for each function it appears in

 4485 | semsg(_(e_option_str_is_not_set), ctrl_x_mode_function()
  | ^~~
vim.h:569:25: note: in definition of macro '_'
  569 | # define _(x) ((char *)(x))
  | ^
make: *** [Make_cyg_ming.mak:1162: gobjnative/insexpand.o] Error 1


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/9e78450d-fce4-ed41-63c1-b81965180ede%40internode.on.net.
--- errors.h.orig   2022-01-06 05:42:33.900598700 +1100
+++ errors.h2022-01-06 06:05:19.374632700 +1100
@@ -1742,17 +1742,19 @@
 EXTERN char e_first_use_profile_start_fname[]
INIT(= N_("E750: First use \":profile start {fname}\""));
 #endif
-#ifdef FEAT_SPELL
 EXTERN char e_output_file_name_must_not_have_region_name[]
INIT(= N_("E751: Output file name must not have region name"));
+#ifdef FEAT_SPELL
 EXTERN char e_no_previous_spell_replacement[]
INIT(= N_("E752: No previous spell replacement"));
+#endif
 EXTERN char e_not_found_str[]
INIT(= N_("E753: Not found: %s"));
 EXTERN char e_only_up_to_nr_regions_supported[]
INIT(= N_("E754: Only up to %d regions supported"));
 EXTERN char e_invalid_region_in_str[]
INIT(= N_("E755: Invalid region in %s"));
+#ifdef FEAT_SPELL
 EXTERN char e_spell_checking_is_not_possible[]
INIT(= N_("E756: Spell checking is not possible"));
 EXTERN char e_this_does_not_look_like_spell_file[]
@@ -1761,6 +1763,7 @@
INIT(= N_("E758: Truncated spell file"));
 EXTERN char e_format_error_in_spell_file[]
INIT(= N_("E759: Format error in spell file"));
+#endif
 EXTERN char e_no_word_count_in_str[]
INIT(= N_("E760: No word count in %s"));
 EXTERN char e_format_error_in_affix_file_fol_low_or_upp[]
@@ -1773,6 +1776,7 @@
 EXTERN char e_option_str_is_not_set[]
INIT(= N_("E764: Option '%s' is not set"));
 #endif
+#ifdef FEAT_SPELL
 EXTERN char e_spellfile_does_not_have_nr_entries[]
INIT(= N_("E765: 'spellfile' does not have %d entries"));
 #endif


Re: Patch 8.2.3897

2022-01-04 Fir de Conversatie John Marriott


On 26-Dec-2021 08:48, Bram Moolenaar wrote:

Patch 8.2.3897
Problem:Vim9: the second argument of map() and filter() is not checked at
 compile time.
Solution:   Add more specific type check for the second argument.
Files:  src/evalfunc.c, src/globals.h, src/list.c,
 src/testdir/test_vim9_builtin.vim, src/testdir/test_vim9_expr.vim,
 src/testdir/test_vim9_script.vim



After this patch, HP-UX's ancient compiler spits out this error:

    cc -c -I. -Iproto -DHAVE_CONFIG_H     -O2       -D_REENTRANT -o 
objects/evalfunc.o evalfunc.c

cc: "evalfunc.c", line 528: error 1521: Incorrect initialization.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1


The attached patch tries to fix it.

Note the patch is against the v8.2.4002.

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/5cb07e36-0954-8251-8136-bba1f1595c6c%40internode.on.net.
--- evalfunc.c.orig 2022-01-05 05:22:35.180498100 +1100
+++ evalfunc.c  2022-01-05 05:34:43.227143800 +1100
@@ -525,7 +525,9 @@
if (expected != NULL)
{
type_T t_func_exp = {VAR_FUNC, -1, 0, TTFLAG_STATIC,
-  expected, NULL};
+  NULL, NULL};
+
+   t_func_exp.tt_member = expected;
 
return check_arg_type(_func_exp, type, context);
}


Re: Patch 8.2.3920

2021-12-28 Fir de Conversatie John Marriott


On 29-Dec-2021 00:16, Bram Moolenaar wrote:

Patch 8.2.3920
Problem:Restoring directory after using another window is inefficient.
Solution:   Only restore the directory for win_execute().  Apply 'autochdir'
 only when needed.
Files:  src/evalwindow.c, src/testdir/test_autochdir.vim



After this patch, mingw64 (gcc 11.2.0) spits out this error message if 
FEAT_AUTOCHDIR is not defined (which is only defined if 
FEAT_NETBEANS_INTG or FEAT_BIG are defined):


gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD evalwindow.c -o 
gobjnative/evalwindow.o

evalwindow.c: In function 'f_win_execute':
evalwindow.c:719:33: error: 'p_acd' undeclared (first use in this function)
  719 | if (cwd_status == OK && p_acd)
  | ^
evalwindow.c:719:33: note: each undeclared identifier is reported only 
once for each function it appears in

make: *** [Make_cyg_ming.mak:1162: gobjnative/evalwindow.o] Error 1


The attached patch makes the error go away but I'm not sure that it is 
correct.


Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/d5abd208-c29c-5912-bed1-6f47b4d7f651%40internode.on.net.
--- evalwindow.c.orig   2021-12-29 06:15:24.855364100 +1100
+++ evalwindow.c2021-12-29 06:38:46.01094 +1100
@@ -707,6 +707,7 @@
 if (wp != NULL && tp != NULL)
 {
pos_T   curpos = wp->w_cursor;
+#ifdef FEAT_AUTOCHDIR
char_u  cwd[MAXPATHL];
int cwd_status;
char_u  autocwd[MAXPATHL];
@@ -722,6 +723,7 @@
apply_acd = mch_dirname(autocwd, MAXPATHL) == OK
  && STRCMP(cwd, autocwd) == 0;
}
+#endif
 
if (switch_win_noblock(_curwin, _curtab, wp, tp, TRUE) == OK)
{
@@ -729,10 +731,12 @@
execute_common(argvars, rettv, 1);
}
restore_win_noblock(save_curwin, save_curtab, TRUE);
+#ifdef FEAT_AUTOCHDIR
if (apply_acd)
do_autochdir();
else if (cwd_status == OK)
mch_chdir((char *)cwd);
+#endif
 
// Update the status line if the cursor moved.
if (win_valid(wp) && !EQUAL_POS(curpos, wp->w_cursor))


Re: Patch 8.2.3871

2021-12-22 Fir de Conversatie John Marriott



On 23-Dec-2021 06:19, Bram Moolenaar wrote:

John Marriott wrote:


On 23-Dec-2021 05:20, Bram Moolenaar wrote:

Patch 8.2.3871
Problem:List.c contains code for dict and blob.
Solution:   Refactor to put code where it belongs. (Yegappan Lakshmanan,
  closes #9386)
Files:  src/blob.c, src/dict.c, src/list.c, src/proto/blob.pro,
  src/proto/dict.pro, src/proto/list.pro, src/proto/strings.pro,
  src/strings.c, src/structs.h, src/testdir/test_filter_map.vim,
  src/testdir/test_listdict.vim, src/testdir/test_sort.vim



Is that because of the "actually longer" thing?

Yeah I think so.

Any idea how to avoid the error?



The attached patch changes dictitem_alloc() to use the same mechanism as 
dictitem_copy() just below it.


What do you think?

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/f9082c33-d8c1-3ba8-91ac-3a32b80045e7%40internode.on.net.
--- dict.c.orig 2021-12-23 05:28:28.586848100 +1100
+++ dict.c  2021-12-23 07:12:53.587225300 +1100
@@ -222,11 +222,12 @@
 dictitem_alloc(char_u *key)
 {
 dictitem_T *di;
+size_t len = STRLEN(key);
 
-di = alloc(offsetof(dictitem_T, di_key) + STRLEN(key) + 1);
+di = alloc(offsetof(dictitem_T, di_key) + len + 1);
 if (di != NULL)
 {
-   STRCPY(di->di_key, key);
+   mch_memmove(di->di_key, key, len + 1);
di->di_flags = DI_FLAGS_ALLOC;
di->di_tv.v_lock = 0;
di->di_tv.v_type = VAR_UNKNOWN;


Re: Patch 8.2.3871

2021-12-22 Fir de Conversatie John Marriott



On 23-Dec-2021 05:20, Bram Moolenaar wrote:

Patch 8.2.3871
Problem:List.c contains code for dict and blob.
Solution:   Refactor to put code where it belongs. (Yegappan Lakshmanan,
 closes #9386)
Files:  src/blob.c, src/dict.c, src/list.c, src/proto/blob.pro,
 src/proto/dict.pro, src/proto/list.pro, src/proto/strings.pro,
 src/strings.c, src/structs.h, src/testdir/test_filter_map.vim,
 src/testdir/test_listdict.vim, src/testdir/test_sort.vim



After this patch, mingw64 (gcc 11.2.0) spits out this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD dict.c -o gobjnative/dict.o

In file included from dict.c:14:
In function 'dictitem_alloc',
    inlined from 'dict_add_tv' at dict.c:491:12,
    inlined from 'dict_filter_map' at dict.c:1370:7:
vim.h:1629:29: warning: 'strcpy' offset 0 from the object at '' 
is out of the bounds of referenced subobject 'di_key' with type 
'char_u[1]' {aka 'unsigned char[1]'} at offset 0 [-Warray-bounds]

 1629 | #define STRCPY(d, s)    strcpy((char *)(d), (char *)(s))
  | ^~~~
vim.h:1629:29: note: in definition of macro 'STRCPY'
 1629 | #define STRCPY(d, s)    strcpy((char *)(d), (char *)(s))
  | ^~
In file included from vim.h:1878,
 from dict.c:14:
dict.c: In function 'dict_filter_map':
structs.h:1538:17: note: subobject 'di_key' declared here
 1538 | char_u  di_key[1];  // key (actually longer!)
  | ^~


Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/c69a6da9-875d-32ca-11d8-07723c06d4ff%40internode.on.net.


Re: Patch 8.2.3787

2021-12-12 Fir de Conversatie John Marriott



On 13-Dec-2021 01:17, Bram Moolenaar wrote:

Patch 8.2.3787
Problem:No proper formatting of a C line comment after a statement.
Solution:   Find the start of the line comment, insert the comment leader and
 indent the comment properly.
Files:  src/change.c, src/proto/change.pro, src/search.c,
 src/proto/search.pro, src/cindent.c, src/edit.c, src/normal.c,
 src/textformat.c, src/testdir/test_textformat.vim,
 src/testdir/test_cindent.vim


Hi All,

After this patch, mingw64 (gcc 11.2.0) spits out this compile error if 
FEAT_SMARTINDENT is not defined:


gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE  change.c -o objnative/change.o

change.c: In function 'open_line':
change.c:1644:5: error: 'do_cindent' undeclared (first use in this 
function); did you mean 'f_cindent'?

 1644 | do_cindent = !p_paste && (curbuf->b_p_cin
  | ^~
  | f_cindent
change.c:1644:5: note: each undeclared identifier is reported only once 
for each function it appears in

make: *** [Make_cyg_ming.mak:1159: objnative/change.o] Error 1


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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/449414f0-f1db-7a5c-452d-2f65ae523993%40internode.on.net.
--- change.c.orig   2021-12-13 05:21:09.297546200 +1100
+++ change.c2021-12-13 05:41:58.654631600 +1100
@@ -1388,6 +1388,9 @@
 char_u *p;
 intsaved_char = NUL;   // init for GCC
 pos_T  *pos;
+#ifdef FEAT_CINDENT
+intdo_cindent;
+#endif
 #ifdef FEAT_SMARTINDENT
 intdo_si = (!p_paste && curbuf->b_p_si
 # ifdef FEAT_CINDENT
@@ -1397,9 +1400,6 @@
&& *curbuf->b_p_inde == NUL
 # endif
);
-#ifdef FEAT_CINDENT
-intdo_cindent;
-#endif
 intno_si = FALSE;  // reset did_si afterwards
 intfirst_char = NUL;   // init for GCC
 #endif


Re: Patch 8.2.3700

2021-12-01 Fir de Conversatie John Marriott


On 30-Nov-2021 08:13, Bram Moolenaar wrote:

Patch 8.2.3700
Problem:Text property highlighting continues over breakindent.
Solution:   Stop before the end column. (closes #9242)
Files:  src/drawline.c, src/testdir/test_textprop.vim,
 src/testdir/dumps/Test_prop_linebreak.dump


After this patch, mingw64 (gcc 11.2.0) throws this warning if 
FEAT_LINEBREAK is defined but FEAT_PROP_POPUP is not:


gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD drawline.c -o 
gobjnative/drawline.o

drawline.c: In function 'win_line':
drawline.c:269:17: warning: variable 'in_linebreak' set but not used 
[-Wunused-but-set-variable]
  269 | int in_linebreak = FALSE;   // n_extra set for 
showing linebreak

  | ^~~~


After enabling FEAT_PROP_POPUP, the linker then throws this error if 
FEAT_SPELL, FEAT_QUICKFIX or PROTO are not defined (see memline.c, line 
#3361):


gcc -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD -Wl,-nxcompat,-dynamicbase 
-municode -s -mwindows -o gvim.exe gobjnative/alloc.o 
gobjnative/arabic.o gobjnative/arglist.o gobjnative/autocmd.o 
gobjnative/beval.o gobjnative/blob.o gobjnative/blowfish.o 
gobjnative/buffer.o gobjnative/bufwrite.o gobjnative/change.o 
gobjnative/charset.o gobjnative/cindent.o gobjnative/clientserver.o 
gobjnative/clipboard.o gobjnative/cmdexpand.o gobjnative/cmdhist.o 
gobjnative/crypt.o gobjnative/crypt_zip.o gobjnative/debugger.o 
gobjnative/dict.o gobjnative/diff.o gobjnative/digraph.o 
gobjnative/drawline.o gobjnative/drawscreen.o gobjnative/edit.o 
gobjnative/eval.o gobjnative/evalbuffer.o gobjnative/evalfunc.o 
gobjnative/evalvars.o gobjnative/evalwindow.o gobjnative/ex_cmds.o 
gobjnative/ex_cmds2.o gobjnative/ex_docmd.o gobjnative/ex_eval.o 
gobjnative/ex_getln.o gobjnative/fileio.o gobjnative/filepath.o 
gobjnative/findfile.o gobjnative/float.o gobjnative/fold.o 
gobjnative/getchar.o gobjnative/gui_xim.o gobjnative/hardcopy.o 
gobjnative/hashtab.o gobjnative/help.o gobjnative/highlight.o 
gobjnative/if_cscope.o gobjnative/indent.o gobjnative/insexpand.o 
gobjnative/json.o gobjnative/list.o gobjnative/locale.o 
gobjnative/main.o gobjnative/map.o gobjnative/mark.o gobjnative/match.o 
gobjnative/memfile.o gobjnative/memline.o gobjnative/menu.o 
gobjnative/message.o gobjnative/misc1.o gobjnative/misc2.o 
gobjnative/mouse.o gobjnative/move.o gobjnative/mbyte.o 
gobjnative/normal.o gobjnative/ops.o gobjnative/option.o 
gobjnative/optionstr.o gobjnative/os_mswin.o gobjnative/os_win32.o 
gobjnative/pathdef.o gobjnative/popupmenu.o gobjnative/popupwin.o 
gobjnative/profiler.o gobjnative/quickfix.o gobjnative/regexp.o 
gobjnative/register.o gobjnative/scriptfile.o gobjnative/screen.o 
gobjnative/search.o gobjnative/session.o gobjnative/sha256.o 
gobjnative/sign.o gobjnative/spell.o gobjnative/spellfile.o 
gobjnative/spellsuggest.o gobjnative/strings.o gobjnative/syntax.o 
gobjnative/tag.o gobjnative/term.o gobjnative/testing.o 
gobjnative/textformat.o gobjnative/textobject.o gobjnative/textprop.o 
gobjnative/time.o gobjnative/typval.o gobjnative/ui.o gobjnative/undo.o 
gobjnative/usercmd.o gobjnative/userfunc.o gobjnative/version.o 
gobjnative/vim9compile.o gobjnative/vim9execute.o 
gobjnative/vim9script.o gobjnative/vim9type.o gobjnative/viminfo.o 
gobjnative/winclip.o gobjnative/window.o gobjnative/os_w32exe.o 
gobjnative/vimres.o gobjnative/xdiffi.o gobjnative/xemit.o 
gobjnative/xprepare.o gobjnative/xutils.o gobjnative/xhistogram.o 
gobjnative/xpatience.o gobjnative/gui.o gobjnative/gui_w32.o 
gobjnative/gui_beval.o -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 
-lcomctl32 -lnetapi32 -lversion -lole32 -luuid


d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/popupwin.o:popupwin.c:(.text+0xd86): undefined reference to 
`ml_append_buf'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/popupwin.o:popupwin.c:(.text+0xde5): undefined reference to 
`ml_append_buf'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/popupwin.o:popupwin.c:(.text+0xe3a): undefined reference to 
`ml_append_buf'

collect2.exe: error: ld returned 1 exit status
make: *** [Make_cyg_ming.mak:1089: gvim.exe] Error 1


I don't have a patch for this issue.

However, I found that the in_linebreak variable is surrounded by a test 
for FEAT_LINEBREAK everywhere inside function 

Re: Patch 8.2.3562

2021-10-25 Fir de Conversatie John Marriott



On 25-Oct-2021 20:37, Bram Moolenaar wrote:

Thanks, I'll include that. Next time please use a context or unified
diff, makes it a bit easier to understand the patch.


Whoops! Sorry about the diff.


--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/ec827ade-5aec-a009-a5ca-8a958024e317%40internode.on.net.


Re: Patch 8.2.3562

2021-10-24 Fir de Conversatie John Marriott


On 25-Oct-2021 06:35, Bram Moolenaar wrote:

Patch 8.2.3562
Problem:Cannot add color names.
Solution:   Add the v:colornames dictionary. (Drew Vogel, closes #8761)
Files:  Filelist, READMEdir/README_extra.txt, nsis/gvim.nsi,
 runtime/colors/README.txt, runtime/colors/lists/csscolors.vim,
 runtime/colors/lists/default.vim, runtime/doc/eval.txt,
 runtime/doc/gui_w32.txt, runtime/doc/message.txt,
 runtime/doc/os_haiku.txt, runtime/doc/syntax.txt,
 runtime/doc/usr_06.txt, src/Makefile, src/evalvars.c,
 src/gui_haiku.cc, src/highlight.c, src/gui.c, src/job.c,
 src/proto/highlight.pro, src/proto/term.pro, src/term.c,
 src/vim.h, src/globals.h, src/errors.h,
 src/testdir/test_highlight.vim


After this patch, mingw64 (gcc 11.2.0) throws this link error for a 
non-GUI build:


gcc -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -Wl,-nxcompat,-dynamicbase -municode -s  -o vim.exe 
objnative/alloc.o objnative/arabic.o objnative/arglist.o 
objnative/autocmd.o objnative/beval.o objnative/blob.o 
objnative/blowfish.o objnative/buffer.o objnative/bufwrite.o 
objnative/change.o objnative/charset.o objnative/cindent.o 
objnative/clientserver.o objnative/clipboard.o objnative/cmdexpand.o 
objnative/cmdhist.o objnative/crypt.o objnative/crypt_zip.o 
objnative/debugger.o objnative/dict.o objnative/diff.o 
objnative/digraph.o objnative/drawline.o objnative/drawscreen.o 
objnative/edit.o objnative/eval.o objnative/evalbuffer.o 
objnative/evalfunc.o objnative/evalvars.o objnative/evalwindow.o 
objnative/ex_cmds.o objnative/ex_cmds2.o objnative/ex_docmd.o 
objnative/ex_eval.o objnative/ex_getln.o objnative/fileio.o 
objnative/filepath.o objnative/findfile.o objnative/float.o 
objnative/fold.o objnative/getchar.o objnative/gui_xim.o 
objnative/hardcopy.o objnative/hashtab.o objnative/help.o 
objnative/highlight.o objnative/if_cscope.o objnative/indent.o 
objnative/insexpand.o objnative/json.o objnative/list.o 
objnative/locale.o objnative/main.o objnative/map.o objnative/mark.o 
objnative/match.o objnative/memfile.o objnative/memline.o 
objnative/menu.o objnative/message.o objnative/misc1.o objnative/misc2.o 
objnative/mouse.o objnative/move.o objnative/mbyte.o objnative/normal.o 
objnative/ops.o objnative/option.o objnative/optionstr.o 
objnative/os_mswin.o objnative/os_win32.o objnative/pathdef.o 
objnative/popupmenu.o objnative/popupwin.o objnative/profiler.o 
objnative/quickfix.o objnative/regexp.o objnative/register.o 
objnative/scriptfile.o objnative/screen.o objnative/search.o 
objnative/session.o objnative/sha256.o objnative/sign.o 
objnative/spell.o objnative/spellfile.o objnative/spellsuggest.o 
objnative/strings.o objnative/syntax.o objnative/tag.o objnative/term.o 
objnative/testing.o objnative/textformat.o objnative/textobject.o 
objnative/textprop.o objnative/time.o objnative/typval.o objnative/ui.o 
objnative/undo.o objnative/usercmd.o objnative/userfunc.o 
objnative/version.o objnative/vim9compile.o objnative/vim9execute.o 
objnative/vim9script.o objnative/vim9type.o objnative/viminfo.o 
objnative/winclip.o objnative/window.o objnative/os_w32exe.o 
objnative/vimres.o objnative/xdiffi.o objnative/xemit.o 
objnative/xprepare.o objnative/xutils.o objnative/xhistogram.o 
objnative/xpatience.o objnative/iscygpty.o -lkernel32 -luser32 -lgdi32 
-ladvapi32 -lcomdlg32 -lcomctl32 -lnetapi32 -lversion -lole32 -luuid
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
objnative/highlight.o:highlight.c:(.text+0x162): undefined reference to 
`load_default_colors_lists'

collect2.exe: error: ld returned 1 exit status
make: *** [Make_cyg_ming.mak:1089: vim.exe] Error 1
make: Target 'all' not remade because of errors.


load_default_colors_lists() is only defined if FEAT_EVAL and either 
FEAT_GUI or FEAT_TERMGUICOLORS or FEAT_PROTO are defined.


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/e4eefb8c-cf84-7725-6ae6-4db2e6df92ce%40internode.on.net.
478c478
< #ifdef FEAT_EVAL
---
> #if defined(FEAT_EVAL) && (defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS) 
> || defined(PROTO))
2289c2289
< #if defined(FEAT_EVAL)
---
> #ifdef FEAT_EVAL
2380c2380
< #endif
---
> #endif// 

Re: Patch 8.2.3536

2021-10-19 Fir de Conversatie John Marriott


On 19-Oct-2021 08:14, Bram Moolenaar wrote:

Patch 8.2.3536
Problem:The do_highlight() function is way too long.
Solution:   Split it into several functions. (Yegappan Lakshmanan,
 closes #9011)
Files:  src/highlight.c



After this patch mingw64 (gcc 11.2) throws these warnings when *not* 
compiled as a GUI:


gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE  highlight.c -o objnative/highlight.o

highlight.c: In function 'highlight_set_guifg':
highlight.c::17: warning: unused variable 'i' [-Wunused-variable]
  | long    i;
  | ^
highlight.c: In function 'highlight_set_guibg':
highlight.c:1178:17: warning: unused variable 'i' [-Wunused-variable]
 1178 | int i;
  | ^


Attached is a patch that tries to fix it, but I'm not sure that it's 
correct.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/6acebb2e-0d71-f006-ef80-ba00c4ead520%40internode.on.net.
1110a
> # if defined(FEAT_GUI)
a1113
> #endif
1177a1180
> # if defined(FEAT_GUI)
1178a1182
> #endif


Re: Patch 8.2.3424

2021-09-10 Fir de Conversatie John Marriott


On 11-Sept-2021 00:59, Bram Moolenaar wrote:

Patch 8.2.3424
Problem:A sequence of spaces is hard to see in list mode.
Solution:   Add the "multispace" option to 'listchars'. (closes #8834)
Files:  runtime/doc/options.txt, src/drawline.c, src/message.c,
 src/screen.c, src/structs.h, src/testdir/test_listchars.vim



After this patch, mingw64 (gcc 11.2) throws this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD screen.c -o 
gobjnative/screen.o

screen.c: In function 'set_chars_option':
screen.c:4957:32: warning: 'last_multispace' may be used uninitialized 
in this function [-Wmaybe-uninitialized]

 4957 | if (p == last_multispace)
  |    ^


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/18e9fa7d-a2be-a0a1-fac0-f87e37168868%40internode.on.net.
--- screen.c.orig   2021-09-11 04:47:47.826424500 +1000
+++ screen.c2021-09-11 05:00:25.932565700 +1000
@@ -4787,7 +4787,7 @@
 intround, i, len, entries;
 char_u *p, *s;
 intc1 = 0, c2 = 0, c3 = 0;
-char_u *last_multispace;   // Last occurrence of "multispace:"
+char_u *last_multispace = NULL;// Last occurrence of 
"multispace:"
 intmultispace_len = 0; // Length of lcs-multispace 
string
 struct charstab
 {


Re: Patch 8.2.3348

2021-08-16 Fir de Conversatie John Marriott




On 16-Aug-2021 18:24, Bram Moolenaar wrote:


John Marriott wrote:


On 15-Aug-2021 22:32, Bram Moolenaar wrote:

Patch 8.2.3348
Problem:line2byte() returns wrong value after adding textprop. (Yuto
   Kimura)
Solution:   Reduce the length by the size of the text property. (closes #8759)
Files:  src/memline.c, src/testdir/test_textprop.vim



Hi All,

After this patch, mingw64 (gcc 11.2.0) spits out this error message if
FEAT_PROP_POPUP is not defined:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return
-fpie -fPIE  memline.c -o objnative/memline.o memline.c: In function
'ml_flush_line':
memline.c:4002:24: error: 'buf_T' {aka 'struct file_buffer'} has no
member named 'b_has_textprop'
    4002 | if (buf->b_has_textprop)
     |    ^~
memline.c:4011:24: error: 'buf_T' {aka 'struct file_buffer'} has no
member named 'b_has_textprop'
    4011 | if (buf->b_has_textprop)
     |    ^~
make: *** [Make_cyg_ming.mak:1159: objnative/memline.o] Error 1


...
The #ifdef should check both FEAT_BYTEOFF and FEAT_PROP_POPUP, the code
is only needed when both are defined.  I'll make a patch.


Hi Bram,

Now something definitely isn't right. After patch 8.2.3354 I get this
link error (FEAT_PROP_POPUP, FEAT_QUICKFIX and FEAT_SPELL are all
disabled for this build):

This looks like you need to do "make clean".


Hi Bram,

You're right of course. A "make clean" and all is well again.

Thanks

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/05bfc183-46a6-726e-a44d-0f684fdce9cb%40internode.on.net.


Re: Patch 8.2.3348

2021-08-15 Fir de Conversatie John Marriott



On 16-Aug-2021 06:11, Bram Moolenaar wrote:

John Marriott wrote:


On 15-Aug-2021 22:32, Bram Moolenaar wrote:

Patch 8.2.3348
Problem:line2byte() returns wrong value after adding textprop. (Yuto
  Kimura)
Solution:   Reduce the length by the size of the text property. (closes #8759)
Files:  src/memline.c, src/testdir/test_textprop.vim



Hi All,

After this patch, mingw64 (gcc 11.2.0) spits out this error message if
FEAT_PROP_POPUP is not defined:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return
-fpie -fPIE  memline.c -o objnative/memline.o memline.c: In function
'ml_flush_line':
memline.c:4002:24: error: 'buf_T' {aka 'struct file_buffer'} has no
member named 'b_has_textprop'
   4002 | if (buf->b_has_textprop)
    |    ^~
memline.c:4011:24: error: 'buf_T' {aka 'struct file_buffer'} has no
member named 'b_has_textprop'
   4011 | if (buf->b_has_textprop)
    |    ^~
make: *** [Make_cyg_ming.mak:1159: objnative/memline.o] Error 1


...



The #ifdef should check both FEAT_BYTEOFF and FEAT_PROP_POPUP, the code
is only needed when both are defined.  I'll make a patch.


Hi Bram,

Now something definitely isn't right. After patch 8.2.3354 I get this 
link error (FEAT_PROP_POPUP, FEAT_QUICKFIX and FEAT_SPELL are all 
disabled for this build):


gcc -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD -Wl,-nxcompat,-dynamicbase 
-municode -s -mwindows -o gvim.exe gobjnative/alloc.o 
gobjnative/arabic.o gobjnative/arglist.o gobjnative/autocmd.o 
gobjnative/beval.o gobjnative/blob.o gobjnative/blowfish.o 
gobjnative/buffer.o gobjnative/bufwrite.o gobjnative/change.o 
gobjnative/charset.o gobjnative/cindent.o gobjnative/clientserver.o 
gobjnative/clipboard.o gobjnative/cmdexpand.o gobjnative/cmdhist.o 
gobjnative/crypt.o gobjnative/crypt_zip.o gobjnative/debugger.o 
gobjnative/dict.o gobjnative/diff.o gobjnative/digraph.o 
gobjnative/drawline.o gobjnative/drawscreen.o gobjnative/edit.o 
gobjnative/eval.o gobjnative/evalbuffer.o gobjnative/evalfunc.o 
gobjnative/evalvars.o gobjnative/evalwindow.o gobjnative/ex_cmds.o 
gobjnative/ex_cmds2.o gobjnative/ex_docmd.o gobjnative/ex_eval.o 
gobjnative/ex_getln.o gobjnative/fileio.o gobjnative/filepath.o 
gobjnative/findfile.o gobjnative/float.o gobjnative/fold.o 
gobjnative/getchar.o gobjnative/gui_xim.o gobjnative/hardcopy.o 
gobjnative/hashtab.o gobjnative/help.o gobjnative/highlight.o 
gobjnative/if_cscope.o gobjnative/indent.o gobjnative/insexpand.o 
gobjnative/json.o gobjnative/list.o gobjnative/locale.o 
gobjnative/main.o gobjnative/map.o gobjnative/mark.o gobjnative/match.o 
gobjnative/memfile.o gobjnative/memline.o gobjnative/menu.o 
gobjnative/message.o gobjnative/misc1.o gobjnative/misc2.o 
gobjnative/mouse.o gobjnative/move.o gobjnative/mbyte.o 
gobjnative/normal.o gobjnative/ops.o gobjnative/option.o 
gobjnative/optionstr.o gobjnative/os_mswin.o gobjnative/os_win32.o 
gobjnative/pathdef.o gobjnative/popupmenu.o gobjnative/popupwin.o 
gobjnative/profiler.o gobjnative/quickfix.o gobjnative/regexp.o 
gobjnative/register.o gobjnative/scriptfile.o gobjnative/screen.o 
gobjnative/search.o gobjnative/session.o gobjnative/sha256.o 
gobjnative/sign.o gobjnative/spell.o gobjnative/spellfile.o 
gobjnative/spellsuggest.o gobjnative/strings.o gobjnative/syntax.o 
gobjnative/tag.o gobjnative/term.o gobjnative/testing.o 
gobjnative/textformat.o gobjnative/textobject.o gobjnative/textprop.o 
gobjnative/time.o gobjnative/typval.o gobjnative/ui.o gobjnative/undo.o 
gobjnative/usercmd.o gobjnative/userfunc.o gobjnative/version.o 
gobjnative/vim9compile.o gobjnative/vim9execute.o 
gobjnative/vim9script.o gobjnative/vim9type.o gobjnative/viminfo.o 
gobjnative/winclip.o gobjnative/window.o gobjnative/os_w32exe.o 
gobjnative/vimres.o gobjnative/xdiffi.o gobjnative/xemit.o 
gobjnative/xprepare.o gobjnative/xutils.o gobjnative/xhistogram.o 
gobjnative/xpatience.o gobjnative/gui.o gobjnative/gui_w32.o 
gobjnative/gui_beval.o -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 
-lcomctl32 -lnetapi32 -lversion -lole32 -luuid
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/drawline.o:drawline.c:(.text+0x238): undefined reference to 
`bt_quickfix'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/drawline.o:drawline.c:(.text+0x6bc): undefined reference to 
`bt_quickfix'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/

Re: Patch 8.2.3348

2021-08-15 Fir de Conversatie John Marriott



On 15-Aug-2021 22:32, Bram Moolenaar wrote:

Patch 8.2.3348
Problem:line2byte() returns wrong value after adding textprop. (Yuto
 Kimura)
Solution:   Reduce the length by the size of the text property. (closes #8759)
Files:  src/memline.c, src/testdir/test_textprop.vim



Hi All,

After this patch, mingw64 (gcc 11.2.0) spits out this error message if 
FEAT_PROP_POPUP is not defined:


gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE  memline.c -o objnative/memline.o memline.c: In function 
'ml_flush_line':
memline.c:4002:24: error: 'buf_T' {aka 'struct file_buffer'} has no 
member named 'b_has_textprop'

 4002 | if (buf->b_has_textprop)
  |    ^~
memline.c:4011:24: error: 'buf_T' {aka 'struct file_buffer'} has no 
member named 'b_has_textprop'

 4011 | if (buf->b_has_textprop)
  |    ^~
make: *** [Make_cyg_ming.mak:1159: objnative/memline.o] Error 1


There might be a mismatch of ifdef tests here.
structs.h includes "b_has_textprop" if FEAT_PROP_POPUP is defined (line 
3038 in structs.h):


#ifdef FEAT_PROP_POPUP
    int        b_has_textprop;    // TRUE when text props were added
    hashtab_T    *b_proptypes;    // text property types local to buffer
#endif


But this patch tries to use it if FEAT_BYTEOFF is defined (line 4001 in 
memline.c):


#ifdef FEAT_BYTEOFF
    if (buf->b_has_textprop)
        old_prop_len = old_len - STRLEN(new_line) - 1;
#endif


(line 4009 in memline.,c):

#ifdef FEAT_BYTEOFF
    // The else case is already covered by the insert and delete
    if (buf->b_has_textprop)
    {
        // Do not count the size of any text properties.
        extra += old_prop_len;
        extra -= new_len - STRLEN(new_line) - 1;
    }
    if (extra != 0)
        ml_updatechunk(buf, lnum, (long)extra, ML_CHNK_UPDLINE);
#endif


Defining FEAT_PROP_POPUP fixes the problem providing FEAT_SPELL or 
FEAT_QUICKFIX is also defined.


Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/c8f452c4-3262-42db-e3f5-38f034bc6b31%40internode.on.net.


Re: Patch 8.2.3263

2021-07-31 Fir de Conversatie John Marriott


On 01-Aug-2021 06:51, Bram Moolenaar wrote:

Patch 8.2.3263
Problem:Vim9: "..=" does not accept same types as the ".." operator.
Solution:   Convert value to string like ".." does. (issue #8664)
Files:  src/vim9compile.c, src/testdir/test_vim9_assign.vim,
 src/testdir/test_vim9_disassemble.vim


After this patch mingw64 (gcc 11.2.0) spits out this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD vim9compile.c -o 
gobjnative/vim9compile.o

vim9compile.c: In function 'compile_assignment':
vim9compile.c:7114:21: warning: 'stacktype' may be used uninitialized in 
this function [-Wmaybe-uninitialized]

 7114 | if (generate_add_instr(cctx,
  | ^~~~
 7115 | operator_type(lhs.lhs_member_type, stacktype),
  | ~~
 7116 |    lhs.lhs_member_type, 
stacktype) == FAIL)

  | ~~~


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/85052b90-939f-50fd-1521-a2bfc0df138a%40internode.on.net.
--- vim9compile.c.orig  2021-08-01 07:03:21.539288100 +1000
+++ vim9compile.c   2021-08-01 07:13:50.975729000 +1000
@@ -7083,7 +7083,7 @@
if (oplen > 0 && *op != '=')
{
type_T  *expected;
-   type_T  *stacktype;
+   type_T  *stacktype = NULL;
 
if (*op == '.')
{


Re: Patch 8.2.2996

2021-06-14 Fir de Conversatie John Marriott


On 15-Jun-2021 04:41, Bram Moolenaar wrote:

Patch 8.2.2996
Problem:Vim9: when debugging cannot inspect local variables.
Solution:   Make local variables available when debugging.
Files:  src/vim9execute.c, src/proto/vim9execute.pro, src/vim9compile.c,
 src/vim9.h, src/debugger.c, src/testdir/test_debugger.vim



After this patch, mingw64 (gcc 11.1.0) spits out this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD vim9compile.c -o 
gobjnative/vim9compile.o

vim9compile.c: In function 'compile_def_function':
vim9compile.c:9065:12: warning: 'instr_dest' may be used uninitialized 
in this function [-Wmaybe-uninitialized]

 9065 | if (instr_dest != NULL)
  |    ^


The attached patch tries to fix it.
Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/fa493f46-0c30-88ff-a003-e5c7bdec98d0%40internode.on.net.
--- vim9compile.c.orig  2021-06-15 05:45:54.975650800 +1000
+++ vim9compile.c   2021-06-15 05:56:43.812403400 +1000
@@ -9051,7 +9051,7 @@
 {
dfunc_T *dfunc = ((dfunc_T *)def_functions.ga_data)
 + ufunc->uf_dfunc_idx;
-   isn_T   *instr_dest;
+   isn_T   *instr_dest = NULL;
 
switch (compile_type)
{


Re: Patch 8.2.2944

2021-06-05 Fir de Conversatie John Marriott



On 06-Jun-2021 04:52, Bram Moolenaar wrote:

Patch 8.2.2944
Problem:Vim9: no error when using job or channel as a string.
Solution:   Be more strict about conversion to string. (closes #8312)
Files:  src/typval.c, src/job.c, src/proto/job.pro, src/channel.c,
 src/proto/channel.pro, src/eval.c, src/vim9execute.c,
 src/testdir/test_vim9_builtin.vim


After this patch, mingw64 (gcc 11.1.0) throws this warning and then this 
linker error if FEAT_JOB_CHANNEL is disabled:


gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD eval.c -o gobjnative/eval.o

eval.c: In function 'echo_string_core':
eval.c:5063:41: warning: implicit declaration of function 
'job_to_string_buf' [-Wimplicit-function-declaration]
 5063 | r = tv->v_type == VAR_JOB ? job_to_string_buf(tv, 
numbuf)

  | ^
eval.c:5064:46: warning: implicit declaration of function 
'channel_to_string_buf' [-Wimplicit-function-declaration]
 5064 |    : 
channel_to_string_buf(tv, numbuf);

  | ^
eval.c:5063:15: warning: assignment to 'char_u *' {aka 'unsigned char 
*'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
 5063 | r = tv->v_type == VAR_JOB ? job_to_string_buf(tv, 
numbuf)

  |   ^
...
gcc -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD -Wl,-nxcompat,-dynamicbase 
-municode -s -mwindows -o gvim.exe gobjnative/arabic.o 
gobjnative/arglist.o gobjnative/autocmd.o gobjnative/beval.o 
gobjnative/blob.o gobjnative/blowfish.o gobjnative/buffer.o 
gobjnative/bufwrite.o gobjnative/change.o gobjnative/charset.o 
gobjnative/cindent.o gobjnative/clientserver.o gobjnative/clipboard.o 
gobjnative/cmdexpand.o gobjnative/cmdhist.o gobjnative/crypt.o 
gobjnative/crypt_zip.o gobjnative/debugger.o gobjnative/dict.o 
gobjnative/diff.o gobjnative/digraph.o gobjnative/drawline.o 
gobjnative/drawscreen.o gobjnative/edit.o gobjnative/eval.o 
gobjnative/evalbuffer.o gobjnative/evalfunc.o gobjnative/evalvars.o 
gobjnative/evalwindow.o gobjnative/ex_cmds.o gobjnative/ex_cmds2.o 
gobjnative/ex_docmd.o gobjnative/ex_eval.o gobjnative/ex_getln.o 
gobjnative/fileio.o gobjnative/filepath.o gobjnative/findfile.o 
gobjnative/float.o gobjnative/fold.o gobjnative/getchar.o 
gobjnative/gui_xim.o gobjnative/hardcopy.o gobjnative/hashtab.o 
gobjnative/help.o gobjnative/highlight.o gobjnative/if_cscope.o 
gobjnative/indent.o gobjnative/insexpand.o gobjnative/json.o 
gobjnative/list.o gobjnative/locale.o gobjnative/main.o gobjnative/map.o 
gobjnative/mark.o gobjnative/match.o gobjnative/memfile.o 
gobjnative/memline.o gobjnative/menu.o gobjnative/message.o 
gobjnative/misc1.o gobjnative/misc2.o gobjnative/mouse.o 
gobjnative/move.o gobjnative/mbyte.o gobjnative/normal.o 
gobjnative/ops.o gobjnative/option.o gobjnative/optionstr.o 
gobjnative/os_mswin.o gobjnative/os_win32.o gobjnative/pathdef.o 
gobjnative/popupmenu.o gobjnative/popupwin.o gobjnative/profiler.o 
gobjnative/quickfix.o gobjnative/regexp.o gobjnative/register.o 
gobjnative/scriptfile.o gobjnative/screen.o gobjnative/search.o 
gobjnative/session.o gobjnative/sha256.o gobjnative/sign.o 
gobjnative/spell.o gobjnative/spellfile.o gobjnative/spellsuggest.o 
gobjnative/syntax.o gobjnative/tag.o gobjnative/term.o 
gobjnative/testing.o gobjnative/textformat.o gobjnative/textobject.o 
gobjnative/textprop.o gobjnative/time.o gobjnative/typval.o 
gobjnative/ui.o gobjnative/undo.o gobjnative/usercmd.o 
gobjnative/userfunc.o gobjnative/version.o gobjnative/vim9compile.o 
gobjnative/vim9execute.o gobjnative/vim9script.o gobjnative/vim9type.o 
gobjnative/viminfo.o gobjnative/winclip.o gobjnative/window.o 
gobjnative/os_w32exe.o gobjnative/vimres.o gobjnative/xdiffi.o 
gobjnative/xemit.o gobjnative/xprepare.o gobjnative/xutils.o 
gobjnative/xhistogram.o gobjnative/xpatience.o gobjnative/gui.o 
gobjnative/gui_w32.o gobjnative/gui_beval.o -lkernel32 -luser32 -lgdi32 
-ladvapi32 -lcomdlg32 -lcomctl32 -lnetapi32 -lversion -lole32 -luuid
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/eval.o:eval.c:(.text+0x3f19): undefined reference to 
`channel_to_string_buf'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/eval.o:eval.c:(.text+0x41c1): undefined reference to 
`job_to_string_buf'

collect2.exe: error: ld returned 1 exit status
make: *** 

Re: Patch 8.2.2834

2021-05-05 Fir de Conversatie John Marriott



On 06-May-2021 05:59, John Marriott wrote:


On 06-May-2021 05:32, Bram Moolenaar wrote:

Patch 8.2.2834
Problem:    Vim9: :cexpr does not work with local variables.
Solution:   Compile :cexpr.
Files:  src/vim9compile.c, src/vim9.h, src/vim9execute.c, 
src/quickfix.c,
 src/proto/quickfix.pro, 
src/testdir/test_quickfix.vim,

 src/testdir/test_vim9_disassemble.vim


After this patch, mingw64 (gcc 11.1.0) spits out this linker error if 
FEAT_QUICKFIX is not defined:


gcc -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD 
-Wl,-nxcompat,-dynamicbase -municode -s -mwindows -o gvim.exe 
gobjnative/arabic.o gobjnative/arglist.o gobjnative/autocmd.o 
gobjnative/beval.o gobjnative/blob.o gobjnative/blowfish.o 
gobjnative/buffer.o gobjnative/bufwrite.o gobjnative/change.o 
gobjnative/charset.o gobjnative/cindent.o gobjnative/clientserver.o 
gobjnative/clipboard.o gobjnative/cmdexpand.o gobjnative/cmdhist.o 
gobjnative/crypt.o gobjnative/crypt_zip.o gobjnative/debugger.o 
gobjnative/dict.o gobjnative/diff.o gobjnative/digraph.o 
gobjnative/drawline.o gobjnative/drawscreen.o gobjnative/edit.o 
gobjnative/eval.o gobjnative/evalbuffer.o gobjnative/evalfunc.o 
gobjnative/evalvars.o gobjnative/evalwindow.o gobjnative/ex_cmds.o 
gobjnative/ex_cmds2.o gobjnative/ex_docmd.o gobjnative/ex_eval.o 
gobjnative/ex_getln.o gobjnative/fileio.o gobjnative/filepath.o 
gobjnative/findfile.o gobjnative/fold.o gobjnative/getchar.o 
gobjnative/gui_xim.o gobjnative/hardcopy.o gobjnative/hashtab.o 
gobjnative/help.o gobjnative/highlight.o gobjnative/if_cscope.o 
gobjnative/indent.o gobjnative/insexpand.o gobjnative/json.o 
gobjnative/list.o gobjnative/locale.o gobjnative/main.o 
gobjnative/map.o gobjnative/mark.o gobjnative/match.o 
gobjnative/memfile.o gobjnative/memline.o gobjnative/menu.o 
gobjnative/message.o gobjnative/misc1.o gobjnative/misc2.o 
gobjnative/mouse.o gobjnative/move.o gobjnative/mbyte.o 
gobjnative/normal.o gobjnative/ops.o gobjnative/option.o 
gobjnative/optionstr.o gobjnative/os_mswin.o gobjnative/os_win32.o 
gobjnative/pathdef.o gobjnative/popupmenu.o gobjnative/popupwin.o 
gobjnative/profiler.o gobjnative/quickfix.o gobjnative/regexp.o 
gobjnative/register.o gobjnative/scriptfile.o gobjnative/screen.o 
gobjnative/search.o gobjnative/session.o gobjnative/sha256.o 
gobjnative/sign.o gobjnative/spell.o gobjnative/spellfile.o 
gobjnative/spellsuggest.o gobjnative/syntax.o gobjnative/tag.o 
gobjnative/term.o gobjnative/testing.o gobjnative/textformat.o 
gobjnative/textobject.o gobjnative/textprop.o gobjnative/time.o 
gobjnative/typval.o gobjnative/ui.o gobjnative/undo.o 
gobjnative/usercmd.o gobjnative/userfunc.o gobjnative/version.o 
gobjnative/vim9compile.o gobjnative/vim9execute.o 
gobjnative/vim9script.o gobjnative/vim9type.o gobjnative/viminfo.o 
gobjnative/winclip.o gobjnative/window.o gobjnative/os_w32exe.o 
gobjnative/vimrc.o gobjnative/xdiffi.o gobjnative/xemit.o 
gobjnative/xprepare.o gobjnative/xutils.o gobjnative/xhistogram.o 
gobjnative/xpatience.o gobjnative/gui.o gobjnative/gui_w32.o 
gobjnative/gui_beval.o -lkernel32 -luser32 -lgdi32 -ladvapi32 
-lcomdlg32 -lcomctl32 -lnetapi32 -lversion -lole32 -luuid
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/vim9execute.o:vim9execute.c:(.text+0x13d0): undefined 
reference to `cexpr_get_auname'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/vim9execute.o:vim9execute.c:(.text+0x1dd6): undefined 
reference to `cexpr_get_auname'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/vim9execute.o:vim9execute.c:(.text+0x4477): undefined 
reference to `cexpr_core'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/vim9execute.o:vim9execute.c:(.text+0x4ebb): undefined 
reference to `trigger_cexpr_autocmd'

collect2.exe: error: ld returned 1 exit status
make: *** [Make_cyg_ming.mak:1075: gvim.exe] Error 1


Cheers
John


Hi Bram,

After patch 8.2.2836, the problem is fixed. Thanks!

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google

Re: Patch 8.2.2834

2021-05-05 Fir de Conversatie John Marriott



On 06-May-2021 05:32, Bram Moolenaar wrote:

Patch 8.2.2834
Problem:Vim9: :cexpr does not work with local variables.
Solution:   Compile :cexpr.
Files:  src/vim9compile.c, src/vim9.h, src/vim9execute.c, src/quickfix.c,
 src/proto/quickfix.pro, src/testdir/test_quickfix.vim,
 src/testdir/test_vim9_disassemble.vim


After this patch, mingw64 (gcc 11.1.0) spits out this linker error if 
FEAT_QUICKFIX is not defined:


gcc -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD -Wl,-nxcompat,-dynamicbase 
-municode -s -mwindows -o gvim.exe gobjnative/arabic.o 
gobjnative/arglist.o gobjnative/autocmd.o gobjnative/beval.o 
gobjnative/blob.o gobjnative/blowfish.o gobjnative/buffer.o 
gobjnative/bufwrite.o gobjnative/change.o gobjnative/charset.o 
gobjnative/cindent.o gobjnative/clientserver.o gobjnative/clipboard.o 
gobjnative/cmdexpand.o gobjnative/cmdhist.o gobjnative/crypt.o 
gobjnative/crypt_zip.o gobjnative/debugger.o gobjnative/dict.o 
gobjnative/diff.o gobjnative/digraph.o gobjnative/drawline.o 
gobjnative/drawscreen.o gobjnative/edit.o gobjnative/eval.o 
gobjnative/evalbuffer.o gobjnative/evalfunc.o gobjnative/evalvars.o 
gobjnative/evalwindow.o gobjnative/ex_cmds.o gobjnative/ex_cmds2.o 
gobjnative/ex_docmd.o gobjnative/ex_eval.o gobjnative/ex_getln.o 
gobjnative/fileio.o gobjnative/filepath.o gobjnative/findfile.o 
gobjnative/fold.o gobjnative/getchar.o gobjnative/gui_xim.o 
gobjnative/hardcopy.o gobjnative/hashtab.o gobjnative/help.o 
gobjnative/highlight.o gobjnative/if_cscope.o gobjnative/indent.o 
gobjnative/insexpand.o gobjnative/json.o gobjnative/list.o 
gobjnative/locale.o gobjnative/main.o gobjnative/map.o gobjnative/mark.o 
gobjnative/match.o gobjnative/memfile.o gobjnative/memline.o 
gobjnative/menu.o gobjnative/message.o gobjnative/misc1.o 
gobjnative/misc2.o gobjnative/mouse.o gobjnative/move.o 
gobjnative/mbyte.o gobjnative/normal.o gobjnative/ops.o 
gobjnative/option.o gobjnative/optionstr.o gobjnative/os_mswin.o 
gobjnative/os_win32.o gobjnative/pathdef.o gobjnative/popupmenu.o 
gobjnative/popupwin.o gobjnative/profiler.o gobjnative/quickfix.o 
gobjnative/regexp.o gobjnative/register.o gobjnative/scriptfile.o 
gobjnative/screen.o gobjnative/search.o gobjnative/session.o 
gobjnative/sha256.o gobjnative/sign.o gobjnative/spell.o 
gobjnative/spellfile.o gobjnative/spellsuggest.o gobjnative/syntax.o 
gobjnative/tag.o gobjnative/term.o gobjnative/testing.o 
gobjnative/textformat.o gobjnative/textobject.o gobjnative/textprop.o 
gobjnative/time.o gobjnative/typval.o gobjnative/ui.o gobjnative/undo.o 
gobjnative/usercmd.o gobjnative/userfunc.o gobjnative/version.o 
gobjnative/vim9compile.o gobjnative/vim9execute.o 
gobjnative/vim9script.o gobjnative/vim9type.o gobjnative/viminfo.o 
gobjnative/winclip.o gobjnative/window.o gobjnative/os_w32exe.o 
gobjnative/vimrc.o gobjnative/xdiffi.o gobjnative/xemit.o 
gobjnative/xprepare.o gobjnative/xutils.o gobjnative/xhistogram.o 
gobjnative/xpatience.o gobjnative/gui.o gobjnative/gui_w32.o 
gobjnative/gui_beval.o -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 
-lcomctl32 -lnetapi32 -lversion -lole32 -luuid
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/vim9execute.o:vim9execute.c:(.text+0x13d0): undefined 
reference to `cexpr_get_auname'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/vim9execute.o:vim9execute.c:(.text+0x1dd6): undefined 
reference to `cexpr_get_auname'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/vim9execute.o:vim9execute.c:(.text+0x4477): undefined 
reference to `cexpr_core'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/vim9execute.o:vim9execute.c:(.text+0x4ebb): undefined 
reference to `trigger_cexpr_autocmd'

collect2.exe: error: ld returned 1 exit status
make: *** [Make_cyg_ming.mak:1075: gvim.exe] Error 1


Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/fbff4715-be9a-b235-a3b4-7c31e6dbbb27%40internode.on.net.


Re: Patch 8.2.2812

2021-04-26 Fir de Conversatie John Marriott


On 27-Apr-2021 04:33, Bram Moolenaar wrote:

Patch 8.2.2812
Problem:Vim9: still crash when using substitute expression.
Solution:   Put the instruction list in the stack frame. (closes #8154)
Files:  src/vim9execute.c, src/vim9.h, src/testdir/test_vim9_cmd.vim



After this patch I noticed this warning from mingw64 (gcc 10.3.0):

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD vim9execute.c -o 
gobjnative/vim9execute.o

vim9execute.c: In function 'func_return':
vim9execute.c:546:14: warning: unused variable 'prev_dfunc' 
[-Wunused-variable]

  546 | dfunc_T *prev_dfunc = ((dfunc_T *)def_functions.ga_data)
  |  ^~


I think this warning came from patch 8.2.2530 which is where the 
relevant lines were added but it is weird that I hadn't noticed the 
warning before.


Anyway, 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/bb780dc2-016d-491f-169b-aaba2add8cc8%40internode.on.net.
--- vim9execute.c.orig  2021-04-27 04:59:56.101619600 +1000
+++ vim9execute.c   2021-04-27 05:02:22.228856000 +1000
@@ -543,8 +543,10 @@
 estack_T   *entry;
 intprev_dfunc_idx = STACK_TV(ectx->ec_frame_idx
+ STACK_FRAME_FUNC_OFF)->vval.v_number;
+#ifdef FEAT_PROFILE
 dfunc_T*prev_dfunc = ((dfunc_T *)def_functions.ga_data)
  + prev_dfunc_idx;
+#endif
 funclocal_T*floc;
 
 #ifdef FEAT_PROFILE


Re: Patch 8.2.2759

2021-04-13 Fir de Conversatie John Marriott



On 14-Apr-2021 04:54, Bram Moolenaar wrote:

Patch 8.2.2759
Problem:Vim9: for loop infers type of loop variable.
Solution:   Do not get the member type. (closes #8102)
Files:  src/vim9type.c, src/proto/vim9type.pro, src/list.c,
 src/vim9script.c, src/proto/vim9script.pro, src/vim.h,
 src/testdir/test_vim9_script.vim



After this patch mingw64 (gcc 10.3.0) spits out this error:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE  evalvars.c -o objnative/evalvars.o

evalvars.c: In function 'set_var_const':
evalvars.c:3258:3: error: too few arguments to function 
'update_vim9_script_var'

 3258 |   update_vim9_script_var(FALSE, di, flags, tv, );
  |   ^~
In file included from proto.h:236,
 from vim.h:2165,
 from evalvars.c:14:
proto/vim9script.pro:15:6: note: declared here
   15 | void update_vim9_script_var(int create, dictitem_T *di, int 
flags, typval_T *tv, type_T **type, int do_member);

  |  ^~
evalvars.c:3356:6: error: too few arguments to function 
'update_vim9_script_var'

 3356 |  update_vim9_script_var(TRUE, di, flags, tv, );
  |  ^~
In file included from proto.h:236,
 from vim.h:2165,
 from evalvars.c:14:
proto/vim9script.pro:15:6: note: declared here
   15 | void update_vim9_script_var(int create, dictitem_T *di, int 
flags, typval_T *tv, type_T **type, int do_member);

  |  ^~
make: *** [Make_cyg_ming.mak:1145: objnative/evalvars.o] Error 1


Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/0c4d0031-433a-f1f9-1225-3314cc24a437%40internode.on.net.


Re: Patch 8.2.2518

2021-02-16 Fir de Conversatie John Marriott




On 17-Feb-2021 08:26, Bram Moolenaar wrote:


I used another solution in patch 8.2.2521.  I hope it works for this
compiler.


Patch 8.2.2521 works ok with HP-UX.

Thanks
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/381ec86c-b08a-baca-cf73-c19ce09f038b%40internode.on.net.


Re: Patch 8.2.2518

2021-02-16 Fir de Conversatie John Marriott


On 16-Feb-2021 06:39, Bram Moolenaar wrote:

Patch 8.2.2518
Problem:'listchars' should be window-local.
Solution:   Make 'listchars' global-local. (Yegappan Lakshmanan, Marco Hinz,
 closes #5206, closes #7850)
Files:  runtime/doc/options.txt, src/buffer.c, src/charset.c,
 src/drawline.c, src/drawscreen.c, src/evalfunc.c, src/globals.h,
 src/indent.c, src/message.c, src/misc1.c, src/option.c,
 src/option.h, src/optiondefs.h, src/optionstr.c,
 src/proto/screen.pro, src/screen.c, src/structs.h,
 src/testdir/test_listchars.vim, src/testdir/test_listlbr.vim



After this patch, HP-UX throws this error message:

    cc -c -I. -Iproto -DHAVE_CONFIG_H -O2   
-D_REENTRANT -o objects/screen.o screen.c

cc: "screen.c", line 4773: error 1521: Incorrect initialization.
cc: "screen.c", line 4774: error 1521: Incorrect initialization.
cc: "screen.c", line 4775: error 1521: Incorrect initialization.
cc: "screen.c", line 4776: error 1521: Incorrect initialization.
cc: "screen.c", line 4777: error 1521: Incorrect initialization.
cc: "screen.c", line 4778: error 1521: Incorrect initialization.
cc: "screen.c", line 4779: error 1521: Incorrect initialization.
cc: "screen.c", line 4780: error 1521: Incorrect initialization.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.


The attached patch is one attempt to make the compiler happy. Not the 
most elegant though.


Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/cb5d059f-59f7-6093-8b68-e562e13d2bd4%40internode.on.net.
--- screen.c2021-02-16 07:07:19.084563500 +1100
+++ screen_new.c2021-02-16 13:39:00.789096500 +1100
@@ -4770,19 +4770,15 @@
 };
 struct charstab lcstab[] =
 {
-   {>w_lcs_chars.eol,  "eol"},
-   {>w_lcs_chars.ext,  "extends"},
-   {>w_lcs_chars.nbsp, "nbsp"},
-   {>w_lcs_chars.prec, "precedes"},
-   {>w_lcs_chars.space,"space"},
-   {>w_lcs_chars.tab2, "tab"},
-   {>w_lcs_chars.trail,"trail"},
-   {>w_lcs_chars.lead, "lead"},
-#ifdef FEAT_CONCEAL
-   {>w_lcs_chars.conceal,  "conceal"},
-#else
-   {NULL,  "conceal"},
-#endif
+   {NULL,  "eol"},
+   {NULL,  "extends"},
+   {NULL,  "nbsp"},
+   {NULL,  "precedes"},
+   {NULL,  "space"},
+   {NULL,  "tab"},
+   {NULL,  "trail"},
+   {NULL,  "lead"},
+   {NULL,  "conceal"},
 };
 struct charstab *tab;
 
@@ -4792,6 +4788,38 @@
entries = sizeof(lcstab) / sizeof(struct charstab);
if (varp == >w_p_lcs && wp->w_p_lcs[0] == NUL)
varp = _lcs;
+
+   for (i = 0; i < entries; i++) {
+   if (strcmp(tab[i].name, "eol") == 0) {
+   tab[i].cp = >w_lcs_chars.eol;
+   }
+   else if (strcmp(tab[i].name, "extends") == 0) {
+   tab[i].cp = >w_lcs_chars.ext;
+   }
+   else if (strcmp(tab[i].name, "nbsp") == 0) {
+   tab[i].cp = >w_lcs_chars.nbsp;
+   }
+   else if (strcmp(tab[i].name, "precedes") == 0) {
+   tab[i].cp = >w_lcs_chars.prec;
+   }
+   else if (strcmp(tab[i].name, "space") == 0) {
+   tab[i].cp = >w_lcs_chars.space;
+   }
+   else if (strcmp(tab[i].name, "tab") == 0) {
+   tab[i].cp = >w_lcs_chars.tab2;
+   }
+   else if (strcmp(tab[i].name, "trail") == 0) {
+   tab[i].cp = >w_lcs_chars.trail;
+   }
+   else if (strcmp(tab[i].name, "lead") == 0) {
+   tab[i].cp = >w_lcs_chars.lead;
+   }
+#ifdef FEAT_CONCEAL
+   else if (strcmp(tab[i].name, "conceal") == 0) {
+   tab[i].cp = >w_lcs_chars.conceal;
+   }
+#endif
+   }
 }
 else
 {


Re: Patch 8.2.2409

2021-01-25 Fir de Conversatie John Marriott


On 26-Jan-2021 07:02, Bram Moolenaar wrote:

Patch 8.2.2409
Problem:Vim9: profiling only works for one function.
Solution:   Select the right instructions when calling and returning.
 (closes #7743)
Files:  src/vim9compile.c, src/vim9execute.c, src/vim9.h,
 src/testdir/test_profile.vim


After this patch, mingw64 (gcc 10.2), spits out this if FEAT_PROFILE is 
not defined:


gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD vim9compile.c -o 
gobjnative/vim9compile.o
In file included from 
d:\users\john\documents\software\mingw\mingw64\x86_64-w64-mingw32\include\windef.h:9,
 from 
d:\users\john\documents\software\mingw\mingw64\x86_64-w64-mingw32\include\windows.h:69,

 from os_win32.h:95,
 from vim.h:262,
 from vim9compile.c:15:
vim9compile.c: In function 'generate_CALL':
vim9.h:418:20: error: called object is not a function or function pointer
  418 | # define PROFILING FALSE
  |    ^
vim9compile.c:1778:34: note: in expansion of macro 'PROFILING'
 1778 |  if (func_needs_compiling(ufunc, PROFILING(ufunc))
  |  ^
vim9.h:418:20: error: called object is not a function or function pointer
  418 | # define PROFILING FALSE
  |    ^
vim9compile.c:1780:13: note: in expansion of macro 'PROFILING'
 1780 | PROFILING(ufunc), NULL) == FAIL)
  | ^
vim9compile.c: In function 'generate_funcref':
vim9.h:418:20: error: called object is not a function or function pointer
  418 | # define PROFILING FALSE
  |    ^
vim9compile.c:2618:37: note: in expansion of macro 'PROFILING'
 2618 | if (func_needs_compiling(ufunc, PROFILING(ufunc))
  | ^
vim9.h:418:20: error: called object is not a function or function pointer
  418 | # define PROFILING FALSE
  |    ^
vim9compile.c:2619:43: note: in expansion of macro 'PROFILING'
 2619 |  && compile_def_function(ufunc, TRUE, PROFILING(ufunc), NULL)
  |   ^
vim9compile.c: In function 'compile_lambda':
vim9.h:418:20: error: called object is not a function or function pointer
  418 | # define PROFILING FALSE
  |    ^
vim9compile.c:3114:39: note: in expansion of macro 'PROFILING'
 3114 | compile_def_function(ufunc, TRUE, PROFILING(ufunc), cctx);
  |   ^
vim9compile.c: In function 'compile_nested_function':
vim9.h:418:20: error: called object is not a function or function pointer
  418 | # define PROFILING FALSE
  |    ^
vim9compile.c:5091:37: note: in expansion of macro 'PROFILING'
 5091 | if (func_needs_compiling(ufunc, PROFILING(ufunc))
  | ^
vim9.h:418:20: error: called object is not a function or function pointer
  418 | # define PROFILING FALSE
  |    ^
vim9compile.c:5092:43: note: in expansion of macro 'PROFILING'
 5092 |  && compile_def_function(ufunc, TRUE, PROFILING(ufunc), cctx)
  |   ^
make: *** [Make_cyg_ming.mak:1145: gobjnative/vim9compile.o] Error 1


and this:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD vim9execute.c -o 
gobjnative/vim9execute.o
In file included from 
d:\users\john\documents\software\mingw\mingw64\x86_64-w64-mingw32\include\windef.h:9,
 from 
d:\users\john\documents\software\mingw\mingw64\x86_64-w64-mingw32\include\windows.h:69,

 from os_win32.h:95,
 from vim.h:262,
 from vim9execute.c:15:
vim9execute.c: In function 'call_def_function':
vim9.h:418:20: error: called object is not a function or function pointer
  418 | # define PROFILING FALSE
  |    ^
vim9execute.c:1161:38: note: in expansion of macro 'PROFILING'
 1161 |  || (func_needs_compiling(ufunc, PROFILING(ufunc))
  |  ^
vim9.h:418:20: error: called object is not a function or function pointer
  418 | # define PROFILING FALSE
  |    ^
vim9execute.c:1162:41: note: in expansion of macro 'PROFILING'
 1162 |   && compile_def_function(ufunc, FALSE, PROFILING(ufunc), NULL)
  | ^
make: *** [Make_cyg_ming.mak:1145: gobjnative/vim9execute.o] Error 1


The attached patch tries to fix it.

Cheers

Re: Patch 8.2.2345

2021-01-17 Fir de Conversatie John Marriott

Hi Bram,

I manually remove features that I don't need for each of my builds.
My work's HP-UX machine is very old and is lacking in resources so I try 
to keep the build as small as workable. Because with this machine I have 
no mouse capability I comment out all of the mouse related features in 
feature.h, including FEAT_MOUSE_XTERM.


Sorry for any confusion.

Cheers
John

On 16-Jan-2021 08:28, Bram Moolenaar wrote:

John Marriott wrote:


On 15-Jan-2021 03:35, Bram Moolenaar wrote:

Patch 8.2.2345
Problem:No focus events in a terminal.
Solution:   Add the t_fd and t_fe termcap entries and implement detecting
  focus events. (Hayaki Saito, Magnus Groß, closes #7673,
  closes #609, closes #5526)
Files:  runtime/doc/term.txt, src/optiondefs.h, src/term.c, src/term.h



After this patch, HP-UX spits out this linker error if FEAT_MOUSE_XTERM
is not defined:

   cc   -L/usr/local/lib -o vim objects/arabic.o

[...]


/usr/ccs/bin/ld: Unsatisfied symbols:
     use_xterm_like_mouse (first referenced in objects/term.o) (code)
link.sh: Linking doesn't work at all, removing auto/link.sed
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.


It looks like a mismatch of #defines.
In term.c, lines 2057-2074 are conditionally included if UNIX or VMS are
defined. However, the function use_xterm_like_mouse() is only included
(in os_unix.c) if FEAT_MOUSE_XTERM or PROTO are also defined (line 2326).

Hmm, I wonder how you got the defines in this state.  The feature.h file
contains:

#if defined(UNIX) || defined(VMS)
# define FEAT_MOUSE_XTERM

We can adjust the #ifdef, but I still wonder why it doensn't work for
you currently.  Is FEAT_MOUSE_XTERM undefined somehow?



--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/04a36f76-6241-c42a-9fa6-e13da5421a9f%40internode.on.net.


Re: Patch 8.2.2345

2021-01-15 Fir de Conversatie John Marriott



On 15-Jan-2021 03:35, Bram Moolenaar wrote:

Patch 8.2.2345
Problem:No focus events in a terminal.
Solution:   Add the t_fd and t_fe termcap entries and implement detecting
 focus events. (Hayaki Saito, Magnus Groß, closes #7673,
 closes #609, closes #5526)
Files:  runtime/doc/term.txt, src/optiondefs.h, src/term.c, src/term.h


After this patch, HP-UX spits out this linker error if FEAT_MOUSE_XTERM 
is not defined:


 cc   -L/usr/local/lib -o vim objects/arabic.o  
objects/arglist.o  objects/autocmd.o objects/beval.o  objects/buffer.o  
objects/change.o objects/blob.o  objects/blowfish.o  objects/cindent.o 
objects/clientserver.o  objects/clipboard.o  objects/cmdexpand.o 
objects/cmdhist.o  objects/crypt.o  objects/crypt_zip.o 
objects/debugger.o  objects/dict.o  objects/diff.o objects/digraph.o  
objects/drawline.o  objects/drawscreen.o objects/edit.o  objects/eval.o  
objects/evalbuffer.o objects/evalfunc.o  objects/evalvars.o  
objects/evalwindow.o objects/ex_cmds.o  objects/ex_cmds2.o  
objects/ex_docmd.o objects/ex_eval.o  objects/ex_getln.o  
objects/fileio.o objects/filepath.o  objects/findfile.o  objects/fold.o 
objects/getchar.o  objects/gui_xim.o  objects/hardcopy.o 
objects/hashtab.o  objects/help.o  objects/highlight.o 
objects/if_cscope.o  objects/if_xcmdsrv.o  objects/indent.o 
objects/insexpand.o  objects/list.o  objects/locale.o objects/map.o  
objects/mark.o  objects/match.o  objects/mbyte.o objects/memline.o  
objects/menu.o  objects/misc1.o objects/misc2.o  objects/mouse.o  
objects/move.o objects/normal.o  objects/ops.o  objects/option.o 
objects/optionstr.o  objects/os_unix.o  objects/pathdef.o 
objects/popupmenu.o  objects/popupwin.o  objects/profiler.o 
objects/pty.o  objects/quickfix.o  objects/regexp.o objects/register.o  
objects/screen.o  objects/scriptfile.o objects/search.o  
objects/session.o  objects/sha256.o objects/sign.o  objects/sound.o  
objects/spell.o objects/spellfile.o  objects/spellsuggest.o  
objects/syntax.o objects/tag.o  objects/term.o  objects/terminal.o 
objects/testing.o  objects/textformat.o  objects/textobject.o 
objects/textprop.o  objects/time.o  objects/typval.o objects/ui.o  
objects/undo.o  objects/usercmd.o objects/userfunc.o  objects/version.o  
objects/vim9compile.o objects/vim9execute.o  objects/vim9script.o  
objects/vim9type.o objects/viminfo.o  objects/window.o 
objects/bufwrite.o  objects/xdiffi.o 
objects/xemit.o  objects/xprepare.o  objects/xutils.o 
objects/xhistogram.o  objects/xpatience.o objects/charset.o 
objects/json.o  objects/main.o  objects/memfile.o 
objects/message.o   -lm -ltermlib -lelf

/usr/ccs/bin/ld: Unsatisfied symbols:
   use_xterm_like_mouse (first referenced in objects/term.o) (code)
link.sh: Linking doesn't work at all, removing auto/link.sed
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.


It looks like a mismatch of #defines.
In term.c, lines 2057-2074 are conditionally included if UNIX or VMS are 
defined. However, the function use_xterm_like_mouse() is only included 
(in os_unix.c) if FEAT_MOUSE_XTERM or PROTO are also defined (line 2326).


Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/73bfc4c3-46fc-9021-0e18-0f1d6b72d249%40internode.on.net.


Re: Patch 8.2.2324

2021-01-10 Fir de Conversatie John Marriott


On 11-Jan-2021 06:23, Bram Moolenaar wrote:

Patch 8.2.2324
Problem:Not easy to get mark en cursor posotion by character count.
Solution:   Add functions that use character index. (Yegappan Lakshmanan,
 closes #7648)
Files:  runtime/doc/eval.txt, runtime/doc/usr_41.txt, src/eval.c,
 src/evalfunc.c, src/proto/eval.pro, src/tag.c,
 src/testdir/test_cursor_func.vim, src/typval.c


After this patch, mingw64 (gcc 10.2) spits out this linker error if 
FEAT_SPELL is not defined:


gcc -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD -Wl,-nxcompat,-dynamicbase 
-municode -s -mwindows -o gvim.exe gobjnative/arabic.o 
gobjnative/arglist.o gobjnative/autocmd.o gobjnative/beval.o 
gobjnative/blob.o gobjnative/blowfish.o gobjnative/buffer.o 
gobjnative/bufwrite.o gobjnative/change.o gobjnative/charset.o 
gobjnative/cindent.o gobjnative/clientserver.o gobjnative/clipboard.o 
gobjnative/cmdexpand.o gobjnative/cmdhist.o gobjnative/crypt.o 
gobjnative/crypt_zip.o gobjnative/debugger.o gobjnative/dict.o 
gobjnative/diff.o gobjnative/digraph.o gobjnative/drawline.o 
gobjnative/drawscreen.o gobjnative/edit.o gobjnative/eval.o 
gobjnative/evalbuffer.o gobjnative/evalfunc.o gobjnative/evalvars.o 
gobjnative/evalwindow.o gobjnative/ex_cmds.o gobjnative/ex_cmds2.o 
gobjnative/ex_docmd.o gobjnative/ex_eval.o gobjnative/ex_getln.o 
gobjnative/fileio.o gobjnative/filepath.o gobjnative/findfile.o 
gobjnative/fold.o gobjnative/getchar.o gobjnative/gui_xim.o 
gobjnative/hardcopy.o gobjnative/hashtab.o gobjnative/help.o 
gobjnative/highlight.o gobjnative/if_cscope.o gobjnative/indent.o 
gobjnative/insexpand.o gobjnative/json.o gobjnative/list.o 
gobjnative/locale.o gobjnative/main.o gobjnative/map.o gobjnative/mark.o 
gobjnative/match.o gobjnative/memfile.o gobjnative/memline.o 
gobjnative/menu.o gobjnative/message.o gobjnative/misc1.o 
gobjnative/misc2.o gobjnative/mouse.o gobjnative/move.o 
gobjnative/mbyte.o gobjnative/normal.o gobjnative/ops.o 
gobjnative/option.o gobjnative/optionstr.o gobjnative/os_mswin.o 
gobjnative/os_win32.o gobjnative/pathdef.o gobjnative/popupmenu.o 
gobjnative/popupwin.o gobjnative/profiler.o gobjnative/quickfix.o 
gobjnative/regexp.o gobjnative/register.o gobjnative/scriptfile.o 
gobjnative/screen.o gobjnative/search.o gobjnative/session.o 
gobjnative/sha256.o gobjnative/sign.o gobjnative/spell.o 
gobjnative/spellfile.o gobjnative/spellsuggest.o gobjnative/syntax.o 
gobjnative/tag.o gobjnative/term.o gobjnative/testing.o 
gobjnative/textformat.o gobjnative/textobject.o gobjnative/textprop.o 
gobjnative/time.o gobjnative/typval.o gobjnative/ui.o gobjnative/undo.o 
gobjnative/usercmd.o gobjnative/userfunc.o gobjnative/version.o 
gobjnative/vim9compile.o gobjnative/vim9execute.o 
gobjnative/vim9script.o gobjnative/vim9type.o gobjnative/viminfo.o 
gobjnative/winclip.o gobjnative/window.o gobjnative/os_w32exe.o 
gobjnative/vimrc.o gobjnative/xdiffi.o gobjnative/xemit.o 
gobjnative/xprepare.o gobjnative/xutils.o gobjnative/xhistogram.o 
gobjnative/xpatience.o gobjnative/gui.o gobjnative/gui_w32.o 
gobjnative/gui_beval.o -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 
-lcomctl32 -lnetapi32 -lversion -lole32 -luuid
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/eval.o:eval.c:(.text+0x44a6): undefined reference to 
`mb_charlen_len'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/eval.o:eval.c:(.text+0x461e): undefined reference to 
`mb_charlen_len'
d:/users/john/documents/software/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
gobjnative/eval.o:eval.c:(.text+0x41c9): undefined reference to 
`mb_charlen_len'

collect2.exe: error: ld returned 1 exit status
make: *** [Make_cyg_ming.mak:1075: gvim.exe] Error 1


The function mb_charlen_len() is defined conditionally (dependent on 
FEAT_SPELL being defined) in mbyte.c.

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/321ffdf0-979f-25a3-448a-51004fecf9e0%40internode.on.net.
--- mbyte.c.orig2020-12-10 05:22:06.686347500 +1100
+++ mbyte.c 2021-01-11 06:29:42.618284300 +1100
@@ -4299,7 +4299,6 @@
  

Re: Patch 8.2.2002

2020-11-17 Fir de Conversatie John Marriott


On 18-Nov-2020 04:51, Bram Moolenaar wrote:

Patch 8.2.2002
Problem:Vim9: lambda argument shadowed by function name.
Solution:   Let function name be shadowed by lambda argument. (closes #7313)
Files:  src/vim9compile.c, src/testdir/test_vim9_func.vim




After this patch, mingw64 (gcc 10.2) throws this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD vim9compile.c -o 
gobjnative/vim9compile.o

vim9compile.c: In function 'compile_call':
vim9compile.c:2746:8: warning: 'ufunc' may be used uninitialized in this 
function [-Wmaybe-uninitialized]

 2746 | if (ufunc != NULL)
  |    ^


The attached patch tries to fix it.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/4d258aeb-2372-1651-f90c-c8f0dd4ce293%40internode.on.net.
--- vim9compile.c.orig  2020-11-18 05:09:12.243811200 +1100
+++ vim9compile.c   2020-11-18 05:22:03.131561300 +1100
@@ -2626,7 +2626,7 @@
 char_u fname_buf[FLEN_FIXED + 1];
 char_u *tofree = NULL;
 interror = FCERR_NONE;
-ufunc_T*ufunc;
+ufunc_T*ufunc = NULL;
 intres = FAIL;
 intis_autoload;
 


Re: Patch 8.2.1880

2020-10-21 Fir de Conversatie John Marriott



On 22-Oct-2020 01:50, Bram Moolenaar wrote:

Patch 8.2.1880
Problem:Vim9: Asan complains about adding zero to NULL.
Solution:   Check for argument count first.
Files:  src/vim9compile.c




After this patch mingw64 (gcc 10.2) throws this warning:

gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
-pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
-fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD vim9compile.c -o 
gobjnative/vim9compile.o

vim9compile.c: In function 'compile_call':
vim9compile.c:1496:6: warning: 'argtypes' may be used uninitialized in 
this function [-Wmaybe-uninitialized]

 1496 |  internal_func_ret_type(func_idx, argcount, argtypes);
  |  ^~~~
vim9compile.c:1463:14: note: 'argtypes' was declared here
 1463 | type_T **argtypes;
  |  ^~~~


Not sure what the fix should be. Perhaps as simple as initialising 
argtypes to NULL?


Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/8456d43f-f5ae-a41e-ff02-c777f9e9de89%40internode.on.net.


  1   2   3   >