int conspy_main(int argc UNUSED_PARAM, char **argv)
{
char tty_name[sizeof(DEV_TTY "NN")];
-#define keybuf bb_common_bufsiz1
-#define sizeof_keybuf COMMON_BUFSIZE
struct termios termbuf;
unsigned opts;
unsigned ttynum;
applet_long_options = getopt_longopts;
#endif
+#define keybuf bb_common_bufsiz1
+ setup_common_bufsiz();
+
INIT_G();
strcpy(G.vcsa_name, DEV_VCSA);
- opt_complementary = "x+:y+"; // numeric params
- opts = getopt32(argv, "vcQsndfFx:y:", &G.x, &G.y);
+ // numeric params
+ opts = getopt32(argv, "vcQsndfFx:+y:+", &G.x, &G.y);
argv += optind;
ttynum = 0;
if (argv[0]) {
default:
// Read the keys pressed
k = keybuf + G.key_count;
- bytes_read = read(G.kbd_fd, k, sizeof_keybuf - G.key_count);
+ bytes_read = read(G.kbd_fd, k, COMMON_BUFSIZE - G.key_count);
if (bytes_read < 0)
goto abort;