John Marriott wrote:

> 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:
> <snip>
> 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
> </snip>
> 
> The attached patch tries to fix it.

That looks good, I'll include it.  Thanks!

-- 
In many of the more relaxed civilizations on the Outer Eastern Rim of the
Galaxy, "The Hitchhiker's Guide to the Galaxy" has already supplanted the
great "Encyclopedia Galactica" as the standard repository of all knowledge
and wisdom, for though it has many omissions and contains much that is
apocryphal, or at least wildly inaccurate, it scores over the older, more
pedestrian work in two important respects.
First, it is slightly cheaper; and second, it has the words "DON'T PANIC"
inscribed in large friendly letters on its cover.
                -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211212191126.478371C0D69%40moolenaar.net.

Raspunde prin e-mail lui