Source

srw / srw.c

Diff from to
 #define MIN(x,y) ((x) < (y) ? (x) : (y))
 #define MAX(x,y) ((x) > (y) ? (x) : (y))
 
-#define BELL        CTRL('g')
 #define BACKSPACE   CTRL('h')
-#define TAB         CTRL('i')
 #define LINEFEED    CTRL('j')
 #define RETURN      CTRL('m')
 #define ESC         0x1b
 #define cursor_clr()  printf("\033[J")
 #define cursor_beg()  printf("\033[1G")
 #define cursor_fwd(n) printf("\033[%dC", MAX(1, (n)))
-#define cursor_bak(n) printf("\033[%dD", MAX(1, (n)))
 
 char  buf[4096], usrbuf[4096];
 char  scrl_prompt_left[]  = "<";
 int mfd;
 pid_t child;
 
-int bell = 0;
-
 void usage(void)
 {
 	printf("Usage: srw [-p prompt] cmd [args]...\n");
 
 			erase_usr();
 			my_write(STDOUT, buf, rdlen);
-			if (bell)
-				my_write(STDOUT, "\07", strlen("\07"));
 			print_usr();
 		}
 	}
 			usage();
 		switch (argv[i][1]) {
 			case 'p' : nrml_prompt = argv[++i]; break;
-			case 'b' : bell = 1; break;
 			case 'v' : printf("srw-"VERSION" © Evan Gates\n"); exit(1);
 			default  : usage();
 		}