@@ -2352,6 +2352,7 @@ mch_restore_title(int which)
23522352
23532353/*
23542354 * Return TRUE if "name" looks like some xterm name.
2355+ * This matches "xterm.*", thus "xterm-256color", "xterm-kitty", etc.
23552356 * Seiichi Sato mentioned that "mlterm" works like xterm.
23562357 */
23572358 int
@@ -2409,6 +2410,9 @@ use_xterm_mouse(void)
24092410 return 0 ;
24102411}
24112412
2413+ /*
2414+ * Return TRUE if "name" is an iris-ansi terminal name.
2415+ */
24122416 int
24132417vim_is_iris (char_u * name )
24142418{
@@ -2418,14 +2422,18 @@ vim_is_iris(char_u *name)
24182422 || STRCMP (name , "builtin_iris-ansi" ) == 0 );
24192423}
24202424
2425+ /*
2426+ * Return TRUE if "name" is a vt300-like terminal name.
2427+ */
24212428 int
24222429vim_is_vt300 (char_u * name )
24232430{
24242431 if (name == NULL )
2425- return FALSE; // actually all ANSI comp. terminals should be here
2426- // catch VT100 - VT5xx
2432+ return FALSE;
2433+ // Actually all ANSI compatible terminals should be here.
2434+ // Catch at least VT1xx - VT5xx
24272435 return ((STRNICMP (name , "vt" , 2 ) == 0
2428- && vim_strchr ((char_u * )"12345" , name [2 ]) != NULL )
2436+ && vim_strchr ((char_u * )"12345" , name [2 ]) != NULL )
24292437 || STRCMP (name , "builtin_vt320" ) == 0 );
24302438}
24312439
@@ -5011,8 +5019,7 @@ mch_call_shell_fork(
50115019 || (!curbuf -> b_p_bin
50125020 && curbuf -> b_p_fixeol )
50135021 || (lnum != curbuf -> b_no_eol_lnum
5014- && (lnum !=
5015- curbuf -> b_ml .ml_line_count
5022+ && (lnum != curbuf -> b_ml .ml_line_count
50165023 || curbuf -> b_p_eol )))
50175024 vim_ignored = write (toshell_fd , "\n" ,
50185025 (size_t )1 );
@@ -8309,8 +8316,8 @@ stop_timeout(void)
83098316start_timeout (long msec )
83108317{
83118318 struct itimerspec interval = {
8312- {0 , 0 }, // Do not repeat.
8313- {msec / 1000 , (msec % 1000 ) * 1000000 }}; // Timeout interval
8319+ {0 , 0 }, // Do not repeat.
8320+ {msec / 1000 , (msec % 1000 ) * 1000000 }}; // Timeout interval
83148321 int ret ;
83158322
83168323 // This is really the caller's responsibility, but let's make sure the
@@ -8323,8 +8330,8 @@ start_timeout(long msec)
83238330
83248331 action .sigev_notify = SIGEV_THREAD ;
83258332 action .sigev_notify_function = set_flag ;
8326- ret = timer_create (CLOCK_MONOTONIC , & action , & timer_id );
8327- if (ret < 0 )
8333+ ret = timer_create (CLOCK_MONOTONIC , & action , & timer_id );
8334+ if (ret < 0 )
83288335 {
83298336 semsg (_ (e_could_not_set_timeout_str ), strerror (errno ));
83308337 return & timeout_flag ;
@@ -8362,10 +8369,10 @@ delete_timer(void)
83628369 * Implement timeout with setitimer()
83638370 */
83648371static struct sigaction prev_sigaction ;
8365- static volatile sig_atomic_t timeout_flag = FALSE;
8366- static int timer_active = FALSE;
8372+ static volatile sig_atomic_t timeout_flag = FALSE;
8373+ static int timer_active = FALSE;
83678374static int timer_handler_active = FALSE;
8368- static volatile sig_atomic_t alarm_pending = FALSE;
8375+ static volatile sig_atomic_t alarm_pending = FALSE;
83698376
83708377/*
83718378 * Handle SIGALRM for a timeout.
@@ -8424,8 +8431,8 @@ stop_timeout(void)
84248431start_timeout (long msec )
84258432{
84268433 struct itimerval interval = {
8427- {0 , 0 }, // Do not repeat.
8428- {msec / 1000 , (msec % 1000 ) * 1000 }}; // Timeout interval
8434+ {0 , 0 }, // Do not repeat.
8435+ {msec / 1000 , (msec % 1000 ) * 1000 }}; // Timeout interval
84298436 struct sigaction handle_alarm ;
84308437 int ret ;
84318438 sigset_t sigs ;
0 commit comments