Anonymous avatar Anonymous committed 82792ad

get rid of bell option, this can be done with sed

Comments (0)

Files changed (2)

 .SH SYNOPSIS
 .SY srw
 .OP \-p prompt
-.OP \-b
 .OP \-v
 .I cmd
 .RI [ args... ]
 .BI \-p " prompt"
 override the default prompt (>)
 .TP
-.B \-b
-write bell (^G) when there is new output (helpful if your terminal can set urgent hint on bell)
-.TP
 .B \-v
 print version information and exit
 
 #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();
 		}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.