view runtime/tools/blink.c @ 10960:d7b78cbf85e4 v8.0.0369

patch 8.0.0369: a few options are not defined, depending on features commit https://github.com/vim/vim/commit/c43a8b8de0676caf8a460b6af1310d7aba8221bb Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 25 21:12:29 2017 +0100 patch 8.0.0369: a few options are not defined, depending on features Problem: The 'balloondelay', 'ballooneval' and 'balloonexpr' options are not defined without the +balloon_eval feature. Testing that an option value fails does not work for unsupported options. Solution: Make the options defined but not supported. Don't test if setting unsupported options fails.
author Christian Brabandt <cb@256bit.org>
date Sat, 25 Feb 2017 21:15:03 +0100
parents 64035abb986b
children
line wrap: on
line source

/*
 * An extremely simple program to make the cursor blink in an xterm.
 * This is useful when the cursor is hard to spot in a highlighted file.
 * Start in the background: "blink&"  Stop by killing it.
 * Bram Moolenaar  980109  (based on an idea from John Lange).
 */

#include <stdio.h>
#include <unistd.h>

	int
main(void)
{
	while (1)
	{
		printf("\e[?25h");
		fflush(stdout);
		usleep(400000);		/* on time */
		printf("\e[?25l");
		fflush(stdout);
		usleep(250000);		/* off time */
	}
	return 0;
}