1 /* 2 * An extremely simple program to make the cursor blink in an xterm. 3 * This is useful when the cursor is hard to spot in a highlighted file. 4 * Start in the background: "blink&" Stop by killing it. 5 * Bram Moolenaar 980109 (based on an idea from John Lange). 6 */ 7 8 #include <stdio.h> 9 #include <unistd.h> 10 11 int 12 main(void) 13 { 14 while (1) 15 { 16 printf("\e[?25h"); 17 fflush(stdout); 18 usleep(400000); /* on time */ 19 printf("\e[?25l"); 20 fflush(stdout); 21 usleep(250000); /* off time */ 22 } 23 return 0; 24 } 25