Patch 8.1.1115
Problem: Cannot build with older C compiler.
Solution: Move variable declaration to start of block.
Files: src/autocmd.c
*** ../vim-8.1.1114/src/autocmd.c 2019-04-04 15:04:32.966792195 +0200
--- src/autocmd.c 2019-04-04 15:38:27.276170676 +0200
***************
*** 391,400 ****
prev_ap = &(first_autopat[(int)event]);
for (ap = *prev_ap; ap != NULL; ap = *prev_ap)
{
- // loop over all commands for this pattern
- prev_ac = &(ap->cmds);
int has_cmd = FALSE;
for (ac = *prev_ac; ac != NULL; ac = *prev_ac)
{
// remove the command if the pattern is to be deleted or when
--- 391,400 ----
prev_ap = &(first_autopat[(int)event]);
for (ap = *prev_ap; ap != NULL; ap = *prev_ap)
{
int has_cmd = FALSE;
+ // loop over all commands for this pattern
+ prev_ac = &(ap->cmds);
for (ac = *prev_ac; ac != NULL; ac = *prev_ac)
{
// remove the command if the pattern is to be deleted or when
***************
*** 405,421 ****
vim_free(ac->cmd);
vim_free(ac);
}
! else {
has_cmd = TRUE;
prev_ac = &(ac->next);
}
}
! if (ap->pat != NULL && !has_cmd) {
// Pattern was not marked for deletion, but all of its
// commands were. So mark the pattern for deletion.
au_remove_pat(ap);
- }
// remove the pattern if it has been marked for deletion
if (ap->pat == NULL)
--- 405,421 ----
vim_free(ac->cmd);
vim_free(ac);
}
! else
! {
has_cmd = TRUE;
prev_ac = &(ac->next);
}
}
! if (ap->pat != NULL && !has_cmd)
// Pattern was not marked for deletion, but all of its
// commands were. So mark the pattern for deletion.
au_remove_pat(ap);
// remove the pattern if it has been marked for deletion
if (ap->pat == NULL)
*** ../vim-8.1.1114/src/version.c 2019-04-04 15:35:42.833132544 +0200
--- src/version.c 2019-04-04 15:39:05.447951004 +0200
***************
*** 773,774 ****
--- 773,776 ----
{ /* Add new patch number below this line */
+ /**/
+ 1115,
/**/
--
% cat /usr/include/sys/errno.h
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
[...]
#define EMACS 666 /* Too many macros */
%
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ 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].
For more options, visit https://groups.google.com/d/optout.