Patch 9.0.0978 (after 9.0.0977)
Problem:    Build errors without the +channel feature. (John Marriott)
Solution:   Adjust #ifdefs.
Files:      src/proto.h, src/globals.h, src/logfile.c, src/message.c,
            src/typval.c


*** ../vim-9.0.0977/src/proto.h 2022-11-30 18:11:52.686904299 +0000
--- src/proto.h 2022-11-30 20:07:13.054640919 +0000
***************
*** 263,273 ****
  # ifdef FEAT_JOB_CHANNEL
  #  include "job.pro"
  #  include "channel.pro"
  
  // 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_error(channel_T *ch, const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF(2, 
3);
- 
  # endif
  
  # if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL)
--- 263,274 ----
  # ifdef FEAT_JOB_CHANNEL
  #  include "job.pro"
  #  include "channel.pro"
+ # endif
  
+ # ifdef FEAT_EVAL
  // 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_error(channel_T *ch, const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF(2, 
3);
  # endif
  
  # if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL)
*** ../vim-9.0.0977/src/globals.h       2022-11-30 18:11:52.694904295 +0000
--- src/globals.h       2022-11-30 20:16:30.463055802 +0000
***************
*** 1998,2020 ****
  # endif
                ;
  
- EXTERN int did_repeated_msg INIT(= 0);
- # define REPEATED_MSG_LOOKING     1
- # define REPEATED_MSG_SAFESTATE           2
- 
- // This flag is set when outputting a terminal control code and reset in
- // out_flush() when characters have been written.
- EXTERN int ch_log_output INIT(= FALSE);
- 
  // Whether a redraw is needed for appending a line to a buffer.
  EXTERN int channel_need_redraw INIT(= FALSE);
  
! #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
  
  #if defined(FEAT_DIFF)
  #define FOR_ALL_DIFFBLOCKS_IN_TAB(tp, dp) \
      for ((dp) = (tp)->tp_first_diff; (dp) != NULL; (dp) = (dp)->df_next)
--- 1998,2022 ----
  # endif
                ;
  
  // Whether a redraw is needed for appending a line to a buffer.
  EXTERN int channel_need_redraw INIT(= FALSE);
  
! # 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
+ // out_flush() when characters have been written.
+ EXTERN int ch_log_output INIT(= FALSE);
+ 
+ EXTERN int did_repeated_msg INIT(= 0);
+ # define REPEATED_MSG_LOOKING     1
+ # define REPEATED_MSG_SAFESTATE           2
+ #endif
+ 
  #if defined(FEAT_DIFF)
  #define FOR_ALL_DIFFBLOCKS_IN_TAB(tp, dp) \
      for ((dp) = (tp)->tp_first_diff; (dp) != NULL; (dp) = (dp)->df_next)
*** ../vim-9.0.0977/src/logfile.c       2022-11-30 18:11:52.686904299 +0000
--- src/logfile.c       2022-11-30 20:11:06.314825831 +0000
***************
*** 75,81 ****
  }
  
      static void
! ch_log_lead(const char *what, channel_T *ch, ch_part_T part)
  {
      if (log_fd == NULL)
        return;
--- 75,81 ----
  }
  
      static void
! ch_log_lead(const char *what, channel_T *ch UNUSED, ch_part_T part UNUSED)
  {
      if (log_fd == NULL)
        return;
*** ../vim-9.0.0977/src/message.c       2022-11-30 18:11:52.690904297 +0000
--- src/message.c       2022-11-30 20:12:44.090897834 +0000
***************
*** 37,43 ****
  static char_u *confirm_msg_tail;              // tail of confirm_msg
  static void display_confirm_msg(void);
  #endif
! #ifdef FEAT_JOB_CHANNEL
  static int emsg_to_channel_log = FALSE;
  #endif
  
--- 37,43 ----
  static char_u *confirm_msg_tail;              // tail of confirm_msg
  static void display_confirm_msg(void);
  #endif
! #ifdef FEAT_EVAL
  static int emsg_to_channel_log = FALSE;
  #endif
  
*** ../vim-9.0.0977/src/typval.c        2022-11-02 13:30:37.542314565 +0000
--- src/typval.c        2022-11-30 20:16:12.151043395 +0000
***************
*** 619,624 ****
--- 619,634 ----
      return (args[idx].v_type == VAR_UNKNOWN
            || 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
  
  /*
*** ../vim-9.0.0977/src/version.c       2022-11-30 18:11:52.694904295 +0000
--- src/version.c       2022-11-30 20:10:27.078796164 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     978,
  /**/

-- 
I thought I was eating a crab salad.  It turned out to be a crap salad.

 /// 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/20221130202121.B4E001C06AE%40moolenaar.net.

Raspunde prin e-mail lui