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

2024-02-02 Fir de Conversatie Yegappan Lakshmanan
Hi,

On Fri, Feb 2, 2024 at 12:56 PM John Marriott  wrote:
>
>
>
> 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.
>

I have created PR #13964 to address this build error.

- Yegappan

-- 
-- 
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/CAAW7x7m0%2BtiG%3D49%3DoBfPm%2BxXBx8DNKSGsJxp99BdjYCRKNe2vQ%40mail.gmail.com.


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.