view runtime/tools/blink.c @ 31555:5aa54cbc6e20 v9.0.1110

patch 9.0.1110: build fails on Mac OS X 10.4/10.5 Commit: https://github.com/vim/vim/commit/254480736f7db3667c7b84873efb49c2cb1d385f Author: Evan Miller <emmiller@gmail.com> Date: Fri Dec 30 10:42:23 2022 +0000 patch 9.0.1110: build fails on Mac OS X 10.4/10.5 Problem: Build fails on Mac OS X 10.4/10.5 . Solution: Check if the dispatch/dispatch.h header exists. (Evan Miller, closes #11746)
author Bram Moolenaar <Bram@vim.org>
date Fri, 30 Dec 2022 11:45:05 +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;
}