0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 9.0.0978: build errors without the +channel feature

Problem:    Build errors without the +channel feature. (John Marriott)
Solution:   Adjust #ifdefs.
This commit is contained in:
Bram Moolenaar
2022-11-30 20:20:56 +00:00
parent 4c5678ff0c
commit 3b8c7083b2
6 changed files with 28 additions and 13 deletions

View File

@@ -1998,21 +1998,23 @@ EXTERN char *ch_part_names[]
# endif # endif
; ;
EXTERN int did_repeated_msg INIT(= 0); // Whether a redraw is needed for appending a line to a buffer.
# define REPEATED_MSG_LOOKING 1 EXTERN int channel_need_redraw INIT(= FALSE);
# define REPEATED_MSG_SAFESTATE 2
# define FOR_ALL_CHANNELS(ch) \
for ((ch) = first_channel; (ch) != NULL; (ch) = (ch)->ch_next)
# define FOR_ALL_JOBS(job) \
for ((job) = first_job; (job) != NULL; (job) = (job)->jv_next)
#endif
#ifdef FEAT_EVAL
// This flag is set when outputting a terminal control code and reset in // This flag is set when outputting a terminal control code and reset in
// out_flush() when characters have been written. // out_flush() when characters have been written.
EXTERN int ch_log_output INIT(= FALSE); EXTERN int ch_log_output INIT(= FALSE);
// Whether a redraw is needed for appending a line to a buffer. EXTERN int did_repeated_msg INIT(= 0);
EXTERN int channel_need_redraw INIT(= FALSE); # define REPEATED_MSG_LOOKING 1
# define REPEATED_MSG_SAFESTATE 2
#define FOR_ALL_CHANNELS(ch) \
for ((ch) = first_channel; (ch) != NULL; (ch) = (ch)->ch_next)
#define FOR_ALL_JOBS(job) \
for ((job) = first_job; (job) != NULL; (job) = (job)->jv_next)
#endif #endif
#if defined(FEAT_DIFF) #if defined(FEAT_DIFF)

View File

@@ -75,7 +75,7 @@ ch_log_active(void)
} }
static void static void
ch_log_lead(const char *what, channel_T *ch, ch_part_T part) ch_log_lead(const char *what, channel_T *ch UNUSED, ch_part_T part UNUSED)
{ {
if (log_fd == NULL) if (log_fd == NULL)
return; return;

View File

@@ -37,7 +37,7 @@ static char_u *confirm_msg = NULL; // ":confirm" message
static char_u *confirm_msg_tail; // tail of confirm_msg static char_u *confirm_msg_tail; // tail of confirm_msg
static void display_confirm_msg(void); static void display_confirm_msg(void);
#endif #endif
#ifdef FEAT_JOB_CHANNEL #ifdef FEAT_EVAL
static int emsg_to_channel_log = FALSE; static int emsg_to_channel_log = FALSE;
#endif #endif

View File

@@ -263,11 +263,12 @@ void mbyte_im_set_active(int active_arg);
# ifdef FEAT_JOB_CHANNEL # ifdef FEAT_JOB_CHANNEL
# include "job.pro" # include "job.pro"
# include "channel.pro" # include "channel.pro"
# endif
# ifdef FEAT_EVAL
// Not generated automatically so that we can add an extra attribute. // Not generated automatically so that we can add an extra attribute.
void ch_log(channel_T *ch, const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3); void ch_log(channel_T *ch, const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
void ch_error(channel_T *ch, const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3); void ch_error(channel_T *ch, const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
# endif # endif
# if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL) # if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL)

View File

@@ -619,6 +619,16 @@ check_for_opt_job_arg(typval_T *args, int idx)
return (args[idx].v_type == VAR_UNKNOWN return (args[idx].v_type == VAR_UNKNOWN
|| check_for_job_arg(args, idx) != FAIL) ? OK : FAIL; || check_for_job_arg(args, idx) != FAIL) ? OK : FAIL;
} }
#else
/*
* Give an error and return FAIL unless "args[idx]" is an optional channel or a
* job. Used without the +channel feature, thus only VAR_UNKNOWN is accepted.
*/
int
check_for_opt_chan_or_job_arg(typval_T *args, int idx)
{
return args[idx].v_type == VAR_UNKNOWN ? OK : FAIL;
}
#endif #endif
/* /*

View File

@@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
978,
/**/ /**/
977, 977,
/**/ /**/